@golstats/gsc-reports 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{FilterConditions-55d68355-BUvCA8gG-DOPuF6DO-7eu1Svgi.js → FilterConditions-55d68355-BUvCA8gG-DOPuF6DO-P9MnDxsi.js} +1 -1
- package/dist/{FilterField-59a73e38-C85AzksG-DmuvTtAz-BmNm5paO.js → FilterField-59a73e38-C85AzksG-DmuvTtAz-CbE6LlTK.js} +1 -1
- package/dist/{FilterSubcategories-a9b32cc9-B7ERo60D-DtViHC0Z-C1n4t3nS.js → FilterSubcategories-a9b32cc9-B7ERo60D-DtViHC0Z-NjE5EJDL.js} +1 -1
- package/dist/css/fonts.css +83 -83
- package/dist/gsc-reports.css +1 -1
- package/dist/gsc-reports.es.js +1 -1
- package/dist/gsc-reports.umd.js +5 -5
- package/dist/{index-DoqzReEF.js → index-CVXgGOzI.js} +1768 -1753
- package/package.json +1 -1
- package/src/components/TemplatesSection.vue +1 -0
- package/src/components/elementsTemplates/ModalDeleteReport.vue +246 -246
- package/src/components/elementsTemplates/ModalDeleteTemplate.vue +249 -249
- package/src/components/elementsTemplates/ModalRenameReporte.vue +330 -330
- package/src/components/elementsTemplates/ModalRenameTemplate.vue +337 -337
- package/src/components/elementsTemplates/ModalSoloEscritorio.vue +83 -83
- package/src/components/elementsTemplates/ModalduplicateTemplate.vue +300 -300
- package/src/components/elementsTemplates/TemplateItem.vue +11 -1
- package/src/components/elementsTemplates/TooltipReportOptions.vue +97 -97
- package/src/components/elementsTemplates/TooltipTemplateOptions.vue +168 -161
- package/src/components/filters.vue +935 -935
- package/src/components/thumbnails-reports/AnalisisPostMatchType1.vue +741 -741
- package/src/components/thumbnails-reports/AnalisisPostMatchType2.vue +743 -743
- package/src/components/thumbnails-reports/AnalisisPostMatchType3.vue +463 -463
- package/src/components/thumbnails-reports/AnalisisPostMatchType4.vue +462 -462
- package/src/components/thumbnails-reports/AnalisisPrematchType1.vue +164 -164
- package/src/components/thumbnails-reports/AnalisisPrematchType2.vue +163 -163
- package/src/components/thumbnails-reports/AnalisisPrematchType3.vue +173 -173
- package/src/components/thumbnails-reports/AnalisisPrematchType4.vue +173 -173
- package/src/index.js +4 -4
- package/src/types.d.ts +45 -45
- package/src/utils/dateUtils.js +52 -52
package/dist/gsc-reports.umd.js
CHANGED
|
@@ -4078,16 +4078,16 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4078
4078
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(d){return d instanceof this?d:new this(d)}static concat(d,...A){const j=new this(d);return A.forEach(ae=>j.set(ae)),j}static accessor(d){const j=(this[u4]=this[u4]={accessors:{}}).accessors,ae=this.prototype;function N(E){const t=qf(E);j[t]||(moe(ae,E),j[t]=!0)}return Gn.isArray(d)?d.forEach(N):N(d),this}};cu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Gn.reduceDescriptors(cu.prototype,({value:a},d)=>{let A=d[0].toUpperCase()+d.slice(1);return{get:()=>a,set(j){this[A]=j}}}),Gn.freezeMethods(cu);function ob(a,d){const A=this||jf,j=d||A,ae=cu.from(j.headers);let N=j.data;return Gn.forEach(a,function(t){N=t.call(A,N,ae.normalize(),d?d.status:void 0)}),ae.normalize(),N}function d4(a){return!!(a&&a.__CANCEL__)}function Mp(a,d,A){mi.call(this,a??"canceled",mi.ERR_CANCELED,d,A),this.name="CanceledError"}Gn.inherits(Mp,mi,{__CANCEL__:!0});function h4(a,d,A){const j=A.config.validateStatus;!A.status||!j||j(A.status)?a(A):d(new mi("Request failed with status code "+A.status,[mi.ERR_BAD_REQUEST,mi.ERR_BAD_RESPONSE][Math.floor(A.status/100)-4],A.config,A.request,A))}function goe(a){const d=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return d&&d[1]||""}function yoe(a,d){a=a||10;const A=new Array(a),j=new Array(a);let ae=0,N=0,E;return d=d!==void 0?d:1e3,function(x){const u=Date.now(),e=j[N];E||(E=u),A[ae]=x,j[ae]=u;let b=N,f=0;for(;b!==ae;)f+=A[b++],b=b%a;if(ae=(ae+1)%a,ae===N&&(N=(N+1)%a),u-E<d)return;const v=e&&u-e;return v?Math.round(f*1e3/v):void 0}}function voe(a,d){let A=0,j=1e3/d,ae,N;const E=(u,e=Date.now())=>{A=e,ae=null,N&&(clearTimeout(N),N=null),a(...u)};return[(...u)=>{const e=Date.now(),b=e-A;b>=j?E(u,e):(ae=u,N||(N=setTimeout(()=>{N=null,E(ae)},j-b)))},()=>ae&&E(ae)]}const Lg=(a,d,A=3)=>{let j=0;const ae=yoe(50,250);return voe(N=>{const E=N.loaded,t=N.lengthComputable?N.total:void 0,x=E-j,u=ae(x),e=E<=t;j=E;const b={loaded:E,total:t,progress:t?E/t:void 0,bytes:x,rate:u||void 0,estimated:u&&t&&e?(t-E)/u:void 0,event:N,lengthComputable:t!=null,[d?"download":"upload"]:!0};a(b)},A)},p4=(a,d)=>{const A=a!=null;return[j=>d[0]({lengthComputable:A,total:a,loaded:j}),d[1]]},f4=a=>(...d)=>Gn.asap(()=>a(...d)),boe=Ec.hasStandardBrowserEnv?((a,d)=>A=>(A=new URL(A,Ec.origin),a.protocol===A.protocol&&a.host===A.host&&(d||a.port===A.port)))(new URL(Ec.origin),Ec.navigator&&/(msie|trident)/i.test(Ec.navigator.userAgent)):()=>!0,xoe=Ec.hasStandardBrowserEnv?{write(a,d,A,j,ae,N){const E=[a+"="+encodeURIComponent(d)];Gn.isNumber(A)&&E.push("expires="+new Date(A).toGMTString()),Gn.isString(j)&&E.push("path="+j),Gn.isString(ae)&&E.push("domain="+ae),N===!0&&E.push("secure"),document.cookie=E.join("; ")},read(a){const d=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _oe(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function woe(a,d){return d?a.replace(/\/?\/$/,"")+"/"+d.replace(/^\/+/,""):a}function m4(a,d,A){let j=!_oe(d);return a&&(j||A==!1)?woe(a,d):d}const g4=a=>a instanceof cu?{...a}:a;function Bh(a,d){d=d||{};const A={};function j(u,e,b,f){return Gn.isPlainObject(u)&&Gn.isPlainObject(e)?Gn.merge.call({caseless:f},u,e):Gn.isPlainObject(e)?Gn.merge({},e):Gn.isArray(e)?e.slice():e}function ae(u,e,b,f){if(Gn.isUndefined(e)){if(!Gn.isUndefined(u))return j(void 0,u,b,f)}else return j(u,e,b,f)}function N(u,e){if(!Gn.isUndefined(e))return j(void 0,e)}function E(u,e){if(Gn.isUndefined(e)){if(!Gn.isUndefined(u))return j(void 0,u)}else return j(void 0,e)}function t(u,e,b){if(b in d)return j(u,e);if(b in a)return j(void 0,u)}const x={url:N,method:N,data:N,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:t,headers:(u,e,b)=>ae(g4(u),g4(e),b,!0)};return Gn.forEach(Object.keys({...a,...d}),function(e){const b=x[e]||ae,f=b(a[e],d[e],e);Gn.isUndefined(f)&&b!==t||(A[e]=f)}),A}const y4=a=>{const d=Bh({},a);let{data:A,withXSRFToken:j,xsrfHeaderName:ae,xsrfCookieName:N,headers:E,auth:t}=d;d.headers=E=cu.from(E),d.url=o4(m4(d.baseURL,d.url,d.allowAbsoluteUrls),a.params,a.paramsSerializer),t&&E.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):"")));let x;if(Gn.isFormData(A)){if(Ec.hasStandardBrowserEnv||Ec.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if((x=E.getContentType())!==!1){const[u,...e]=x?x.split(";").map(b=>b.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...e].join("; "))}}if(Ec.hasStandardBrowserEnv&&(j&&Gn.isFunction(j)&&(j=j(d)),j||j!==!1&&boe(d.url))){const u=ae&&N&&xoe.read(N);u&&E.set(ae,u)}return d},koe=typeof XMLHttpRequest<"u"&&function(a){return new Promise(function(A,j){const ae=y4(a);let N=ae.data;const E=cu.from(ae.headers).normalize();let{responseType:t,onUploadProgress:x,onDownloadProgress:u}=ae,e,b,f,v,h;function r(){v&&v(),h&&h(),ae.cancelToken&&ae.cancelToken.unsubscribe(e),ae.signal&&ae.signal.removeEventListener("abort",e)}let n=new XMLHttpRequest;n.open(ae.method.toUpperCase(),ae.url,!0),n.timeout=ae.timeout;function c(){if(!n)return;const l=cu.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),g={data:!t||t==="text"||t==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:l,config:a,request:n};h4(function(S){A(S),r()},function(S){j(S),r()},g),n=null}"onloadend"in n?n.onloadend=c:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(c)},n.onabort=function(){n&&(j(new mi("Request aborted",mi.ECONNABORTED,a,n)),n=null)},n.onerror=function(){j(new mi("Network Error",mi.ERR_NETWORK,a,n)),n=null},n.ontimeout=function(){let p=ae.timeout?"timeout of "+ae.timeout+"ms exceeded":"timeout exceeded";const g=ae.transitional||l4;ae.timeoutErrorMessage&&(p=ae.timeoutErrorMessage),j(new mi(p,g.clarifyTimeoutError?mi.ETIMEDOUT:mi.ECONNABORTED,a,n)),n=null},N===void 0&&E.setContentType(null),"setRequestHeader"in n&&Gn.forEach(E.toJSON(),function(p,g){n.setRequestHeader(g,p)}),Gn.isUndefined(ae.withCredentials)||(n.withCredentials=!!ae.withCredentials),t&&t!=="json"&&(n.responseType=ae.responseType),u&&([f,h]=Lg(u,!0),n.addEventListener("progress",f)),x&&n.upload&&([b,v]=Lg(x),n.upload.addEventListener("progress",b),n.upload.addEventListener("loadend",v)),(ae.cancelToken||ae.signal)&&(e=l=>{n&&(j(!l||l.type?new Mp(null,a,n):l),n.abort(),n=null)},ae.cancelToken&&ae.cancelToken.subscribe(e),ae.signal&&(ae.signal.aborted?e():ae.signal.addEventListener("abort",e)));const o=goe(ae.url);if(o&&Ec.protocols.indexOf(o)===-1){j(new mi("Unsupported protocol "+o+":",mi.ERR_BAD_REQUEST,a));return}n.send(N||null)})},Toe=(a,d)=>{const{length:A}=a=a?a.filter(Boolean):[];if(d||A){let j=new AbortController,ae;const N=function(u){if(!ae){ae=!0,t();const e=u instanceof Error?u:this.reason;j.abort(e instanceof mi?e:new Mp(e instanceof Error?e.message:e))}};let E=d&&setTimeout(()=>{E=null,N(new mi(`timeout ${d} of ms exceeded`,mi.ETIMEDOUT))},d);const t=()=>{a&&(E&&clearTimeout(E),E=null,a.forEach(u=>{u.unsubscribe?u.unsubscribe(N):u.removeEventListener("abort",N)}),a=null)};a.forEach(u=>u.addEventListener("abort",N));const{signal:x}=j;return x.unsubscribe=()=>Gn.asap(t),x}},Soe=function*(a,d){let A=a.byteLength;if(A<d){yield a;return}let j=0,ae;for(;j<A;)ae=j+d,yield a.slice(j,ae),j=ae},Aoe=async function*(a,d){for await(const A of Eoe(a))yield*Soe(A,d)},Eoe=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const d=a.getReader();try{for(;;){const{done:A,value:j}=await d.read();if(A)break;yield j}}finally{await d.cancel()}},v4=(a,d,A,j)=>{const ae=Aoe(a,d);let N=0,E,t=x=>{E||(E=!0,j&&j(x))};return new ReadableStream({async pull(x){try{const{done:u,value:e}=await ae.next();if(u){t(),x.close();return}let b=e.byteLength;if(A){let f=N+=b;A(f)}x.enqueue(new Uint8Array(e))}catch(u){throw t(u),u}},cancel(x){return t(x),ae.return()}},{highWaterMark:2})},zg=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",b4=zg&&typeof ReadableStream=="function",Coe=zg&&(typeof TextEncoder=="function"?(a=>d=>a.encode(d))(new TextEncoder):async a=>new Uint8Array(await new Response(a).arrayBuffer())),x4=(a,...d)=>{try{return!!a(...d)}catch{return!1}},Moe=b4&&x4(()=>{let a=!1;const d=new Request(Ec.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!d}),_4=64*1024,sb=b4&&x4(()=>Gn.isReadableStream(new Response("").body)),Ng={stream:sb&&(a=>a.body)};zg&&(a=>{["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!Ng[d]&&(Ng[d]=Gn.isFunction(a[d])?A=>A[d]():(A,j)=>{throw new mi(`Response type '${d}' is not supported`,mi.ERR_NOT_SUPPORT,j)})})})(new Response);const Poe=async a=>{if(a==null)return 0;if(Gn.isBlob(a))return a.size;if(Gn.isSpecCompliantForm(a))return(await new Request(Ec.origin,{method:"POST",body:a}).arrayBuffer()).byteLength;if(Gn.isArrayBufferView(a)||Gn.isArrayBuffer(a))return a.byteLength;if(Gn.isURLSearchParams(a)&&(a=a+""),Gn.isString(a))return(await Coe(a)).byteLength},Loe=async(a,d)=>{const A=Gn.toFiniteNumber(a.getContentLength());return A??Poe(d)},lb={http:Yie,xhr:koe,fetch:zg&&(async a=>{let{url:d,method:A,data:j,signal:ae,cancelToken:N,timeout:E,onDownloadProgress:t,onUploadProgress:x,responseType:u,headers:e,withCredentials:b="same-origin",fetchOptions:f}=y4(a);u=u?(u+"").toLowerCase():"text";let v=Toe([ae,N&&N.toAbortSignal()],E),h;const r=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let n;try{if(x&&Moe&&A!=="get"&&A!=="head"&&(n=await Loe(e,j))!==0){let g=new Request(d,{method:"POST",body:j,duplex:"half"}),w;if(Gn.isFormData(j)&&(w=g.headers.get("content-type"))&&e.setContentType(w),g.body){const[S,T]=p4(n,Lg(f4(x)));j=v4(g.body,_4,S,T)}}Gn.isString(b)||(b=b?"include":"omit");const c="credentials"in Request.prototype;h=new Request(d,{...f,signal:v,method:A.toUpperCase(),headers:e.normalize().toJSON(),body:j,duplex:"half",credentials:c?b:void 0});let o=await fetch(h,f);const l=sb&&(u==="stream"||u==="response");if(sb&&(t||l&&r)){const g={};["status","statusText","headers"].forEach(M=>{g[M]=o[M]});const w=Gn.toFiniteNumber(o.headers.get("content-length")),[S,T]=t&&p4(w,Lg(f4(t),!0))||[];o=new Response(v4(o.body,_4,S,()=>{T&&T(),r&&r()}),g)}u=u||"text";let p=await Ng[Gn.findKey(Ng,u)||"text"](o,a);return!l&&r&&r(),await new Promise((g,w)=>{h4(g,w,{data:p,headers:cu.from(o.headers),status:o.status,statusText:o.statusText,config:a,request:h})})}catch(c){throw r&&r(),c&&c.name==="TypeError"&&/Load failed|fetch/i.test(c.message)?Object.assign(new mi("Network Error",mi.ERR_NETWORK,a,h),{cause:c.cause||c}):mi.from(c,c&&c.code,a,h)}})};Gn.forEach(lb,(a,d)=>{if(a){try{Object.defineProperty(a,"name",{value:d})}catch{}Object.defineProperty(a,"adapterName",{value:d})}});const w4=a=>`- ${a}`,zoe=a=>Gn.isFunction(a)||a===null||a===!1,k4={getAdapter:a=>{a=Gn.isArray(a)?a:[a];const{length:d}=a;let A,j;const ae={};for(let N=0;N<d;N++){A=a[N];let E;if(j=A,!zoe(A)&&(j=lb[(E=String(A)).toLowerCase()],j===void 0))throw new mi(`Unknown adapter '${E}'`);if(j)break;ae[E||"#"+N]=j}if(!j){const N=Object.entries(ae).map(([t,x])=>`adapter ${t} `+(x===!1?"is not supported by the environment":"is not available in the build"));let E=d?N.length>1?`since :
|
|
4079
4079
|
`+N.map(w4).join(`
|
|
4080
4080
|
`):" "+w4(N[0]):"as no adapter specified";throw new mi("There is no suitable adapter to dispatch the request "+E,"ERR_NOT_SUPPORT")}return j},adapters:lb};function cb(a){if(a.cancelToken&&a.cancelToken.throwIfRequested(),a.signal&&a.signal.aborted)throw new Mp(null,a)}function T4(a){return cb(a),a.headers=cu.from(a.headers),a.data=ob.call(a,a.transformRequest),["post","put","patch"].indexOf(a.method)!==-1&&a.headers.setContentType("application/x-www-form-urlencoded",!1),k4.getAdapter(a.adapter||jf.adapter)(a).then(function(j){return cb(a),j.data=ob.call(a,a.transformResponse,j),j.headers=cu.from(j.headers),j},function(j){return d4(j)||(cb(a),j&&j.response&&(j.response.data=ob.call(a,a.transformResponse,j.response),j.response.headers=cu.from(j.response.headers))),Promise.reject(j)})}const S4="1.11.0",Og={};["object","boolean","number","function","string","symbol"].forEach((a,d)=>{Og[a]=function(j){return typeof j===a||"a"+(d<1?"n ":" ")+a}});const A4={};Og.transitional=function(d,A,j){function ae(N,E){return"[Axios v"+S4+"] Transitional option '"+N+"'"+E+(j?". "+j:"")}return(N,E,t)=>{if(d===!1)throw new mi(ae(E," has been removed"+(A?" in "+A:"")),mi.ERR_DEPRECATED);return A&&!A4[E]&&(A4[E]=!0,console.warn(ae(E," has been deprecated since v"+A+" and will be removed in the near future"))),d?d(N,E,t):!0}},Og.spelling=function(d){return(A,j)=>(console.warn(`${j} is likely a misspelling of ${d}`),!0)};function Noe(a,d,A){if(typeof a!="object")throw new mi("options must be an object",mi.ERR_BAD_OPTION_VALUE);const j=Object.keys(a);let ae=j.length;for(;ae-- >0;){const N=j[ae],E=d[N];if(E){const t=a[N],x=t===void 0||E(t,N,a);if(x!==!0)throw new mi("option "+N+" must be "+x,mi.ERR_BAD_OPTION_VALUE);continue}if(A!==!0)throw new mi("Unknown option "+N,mi.ERR_BAD_OPTION)}}const Rg={assertOptions:Noe,validators:Og},hd=Rg.validators;let Uh=class{constructor(d){this.defaults=d||{},this.interceptors={request:new s4,response:new s4}}async request(d,A){try{return await this._request(d,A)}catch(j){if(j instanceof Error){let ae={};Error.captureStackTrace?Error.captureStackTrace(ae):ae=new Error;const N=ae.stack?ae.stack.replace(/^.+\n/,""):"";try{j.stack?N&&!String(j.stack).endsWith(N.replace(/^.+\n.+\n/,""))&&(j.stack+=`
|
|
4081
|
-
`+N):j.stack=N}catch{}}throw j}}_request(d,A){typeof d=="string"?(A=A||{},A.url=d):A=d||{},A=Bh(this.defaults,A);const{transitional:j,paramsSerializer:ae,headers:N}=A;j!==void 0&&Rg.assertOptions(j,{silentJSONParsing:hd.transitional(hd.boolean),forcedJSONParsing:hd.transitional(hd.boolean),clarifyTimeoutError:hd.transitional(hd.boolean)},!1),ae!=null&&(Gn.isFunction(ae)?A.paramsSerializer={serialize:ae}:Rg.assertOptions(ae,{encode:hd.function,serialize:hd.function},!0)),A.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?A.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:A.allowAbsoluteUrls=!0),Rg.assertOptions(A,{baseUrl:hd.spelling("baseURL"),withXsrfToken:hd.spelling("withXSRFToken")},!0),A.method=(A.method||this.defaults.method||"get").toLowerCase();let E=N&&Gn.merge(N.common,N[A.method]);N&&Gn.forEach(["delete","get","head","post","put","patch","common"],h=>{delete N[h]}),A.headers=cu.concat(E,N);const t=[];let x=!0;this.interceptors.request.forEach(function(r){typeof r.runWhen=="function"&&r.runWhen(A)===!1||(x=x&&r.synchronous,t.unshift(r.fulfilled,r.rejected))});const u=[];this.interceptors.response.forEach(function(r){u.push(r.fulfilled,r.rejected)});let e,b=0,f;if(!x){const h=[T4.bind(this),void 0];for(h.unshift(...t),h.push(...u),f=h.length,e=Promise.resolve(A);b<f;)e=e.then(h[b++],h[b++]);return e}f=t.length;let v=A;for(b=0;b<f;){const h=t[b++],r=t[b++];try{v=h(v)}catch(n){r.call(this,n);break}}try{e=T4.call(this,v)}catch(h){return Promise.reject(h)}for(b=0,f=u.length;b<f;)e=e.then(u[b++],u[b++]);return e}getUri(d){d=Bh(this.defaults,d);const A=m4(d.baseURL,d.url,d.allowAbsoluteUrls);return o4(A,d.params,d.paramsSerializer)}};Gn.forEach(["delete","get","head","options"],function(d){Uh.prototype[d]=function(A,j){return this.request(Bh(j||{},{method:d,url:A,data:(j||{}).data}))}}),Gn.forEach(["post","put","patch"],function(d){function A(j){return function(N,E,t){return this.request(Bh(t||{},{method:d,headers:j?{"Content-Type":"multipart/form-data"}:{},url:N,data:E}))}}Uh.prototype[d]=A(),Uh.prototype[d+"Form"]=A(!0)});let Ooe=class Z4{constructor(d){if(typeof d!="function")throw new TypeError("executor must be a function.");let A;this.promise=new Promise(function(N){A=N});const j=this;this.promise.then(ae=>{if(!j._listeners)return;let N=j._listeners.length;for(;N-- >0;)j._listeners[N](ae);j._listeners=null}),this.promise.then=ae=>{let N;const E=new Promise(t=>{j.subscribe(t),N=t}).then(ae);return E.cancel=function(){j.unsubscribe(N)},E},d(function(N,E,t){j.reason||(j.reason=new Mp(N,E,t),A(j.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){if(this.reason){d(this.reason);return}this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;const A=this._listeners.indexOf(d);A!==-1&&this._listeners.splice(A,1)}toAbortSignal(){const d=new AbortController,A=j=>{d.abort(j)};return this.subscribe(A),d.signal.unsubscribe=()=>this.unsubscribe(A),d.signal}static source(){let d;return{token:new Z4(function(ae){d=ae}),cancel:d}}};function Roe(a){return function(A){return a.apply(null,A)}}function Doe(a){return Gn.isObject(a)&&a.isAxiosError===!0}const ub={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(ub).forEach(([a,d])=>{ub[d]=a});function E4(a){const d=new Uh(a),A=G5(Uh.prototype.request,d);return Gn.extend(A,Uh.prototype,d,{allOwnKeys:!0}),Gn.extend(A,d,null,{allOwnKeys:!0}),A.create=function(ae){return E4(Bh(a,ae))},A}const Qi=E4(jf);Qi.Axios=Uh,Qi.CanceledError=Mp,Qi.CancelToken=Ooe,Qi.isCancel=d4,Qi.VERSION=S4,Qi.toFormData=Mg,Qi.AxiosError=mi,Qi.Cancel=Qi.CanceledError,Qi.all=function(d){return Promise.all(d)},Qi.spread=Roe,Qi.isAxiosError=Doe,Qi.mergeConfig=Bh,Qi.AxiosHeaders=cu,Qi.formToJSON=a=>c4(Gn.isHTMLForm(a)?new FormData(a):a),Qi.getAdapter=k4.getAdapter,Qi.HttpStatusCode=ub,Qi.default=Qi;const{Axios:Kfe,AxiosError:Jfe,CanceledError:$fe,isCancel:Zfe,CancelToken:Yfe,VERSION:Qfe,all:eme,Cancel:tme,isAxiosError:rme,spread:nme,toFormData:ame,AxiosHeaders:ime,HttpStatusCode:ome,formToJSON:sme,getAdapter:lme,mergeConfig:cme}=Qi,xs=(a,d)=>{const A=a.__vccOpts||a;for(const[j,ae]of d)A[j]=ae;return A},Ioe={class:"tooltip-template-options"},Foe=xs({__name:"TooltipTemplateOptions",emits:["generar-reporte","renombrar","editar","duplicar","eliminar"],setup(a,{emit:d}){return(A,j)=>(m.openBlock(),m.createElementBlock("div",Ioe,[m.createElementVNode("ul",null,[m.createElementVNode("li",{class:"option",onClick:j[0]||(j[0]=ae=>A.$emit("generar-reporte"))},j[5]||(j[5]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report.svg",alt:"Generar reporte",class:"icon"},null,-1),m.createTextVNode(" Generar reporte ",-1)])),m.createElementVNode("li",{class:"option",onClick:j[1]||(j[1]=ae=>A.$emit("renombrar"))},j[6]||(j[6]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1),m.createTextVNode(" Renombrar template ",-1)])),m.createElementVNode("li",{class:"option",onClick:j[2]||(j[2]=ae=>A.$emit("editar"))},j[7]||(j[7]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-edit.svg",alt:"Editar template",class:"icon"},null,-1),m.createTextVNode(" Editar template ",-1)])),m.createElementVNode("li",{class:"option",onClick:j[3]||(j[3]=ae=>A.$emit("duplicar"))},j[8]||(j[8]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate.svg",alt:"Duplicar template",class:"icon"},null,-1),m.createTextVNode(" Duplicar template ",-1)])),m.createElementVNode("li",{class:"option",onClick:j[4]||(j[4]=ae=>A.$emit("eliminar"))},j[9]||(j[9]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1),m.createTextVNode(" Eliminar template ",-1)]))])]))}},[["__scopeId","data-v-f536ab48"]]),Voe={class:"template-card postpartido",style:{position:"relative"}},Boe={key:0,class:"template-img-placeholder",style:{position:"relative"}},Uoe={key:0,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-01.jpg",alt:"Template Prematch Type 1",class:"template-img"},joe={key:1,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-01.jpg",alt:"Template Postmatch Type 1",class:"template-img"},qoe={key:2,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-02.jpg",alt:"Template Prematch Type 2",class:"template-img"},Woe={key:3,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-02.jpg",alt:"Template Postmatch Type 2",class:"template-img"},Goe={key:4,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-03.jpg",alt:"Template Prematch Type 3",class:"template-img"},Hoe={key:5,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-03.jpg",alt:"Template Postmatch Type 3",class:"template-img"},Xoe={key:6,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-04.jpg",alt:"Template Prematch Type 4",class:"template-img"},Koe={key:7,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-04.jpg",alt:"Template Postmatch Type 4",class:"template-img"},Joe={key:8,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumb1.png",alt:"Template Default",class:"template-img"},$oe={class:"inner-card-postpartido"},Zoe={class:"postpartido-footer"},Yoe={class:"postpartido-version"},Qoe={class:"postpartido-status"},ese={class:"tipo-value"},tse=xs({__name:"TemplateItem",props:{template:{type:Object,required:!0}},emits:["generar-reporte","renombrar","duplicar","eliminar","edit-template"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(!1);function N(){console.log("generar-reporte"),ae.value=!1,j("generar-reporte")}function E(){console.log("renombrar"),ae.value=!1;const b=A.template.name||"";j("renombrar",b)}function t(){console.log("editar"),ae.value=!1,j("edit-template",A.template)}function x(){console.log("duplicar"),ae.value=!1;const b=A.template.name||"";j("duplicar",b)}function u(){console.log("eliminar"),ae.value=!1,j("eliminar",A.template)}function e(b){console.log("toggle-autogen",b)}return(b,f)=>(m.openBlock(),m.createElementBlock("div",Voe,[m.createElementVNode("div",{class:"three-dots",onClick:f[0]||(f[0]=m.withModifiers(v=>ae.value=!ae.value,["stop"]))},f[5]||(f[5]=[m.createElementVNode("span",null,null,-1),m.createElementVNode("span",null,null,-1),m.createElementVNode("span",null,null,-1)])),a.template.pages&&a.template.pages[0]?(m.openBlock(),m.createElementBlock("div",Boe,[a.template.template_type===1&&a.template.pages[0].type==1?(m.openBlock(),m.createElementBlock("img",Uoe)):a.template.template_type===2&&a.template.pages[0].type==1?(m.openBlock(),m.createElementBlock("img",joe)):a.template.template_type===1&&a.template.pages[0].type==2?(m.openBlock(),m.createElementBlock("img",qoe)):a.template.template_type===2&&a.template.pages[0].type==2?(m.openBlock(),m.createElementBlock("img",Woe)):a.template.template_type===1&&a.template.pages[0].type==3?(m.openBlock(),m.createElementBlock("img",Goe)):a.template.template_type===2&&a.template.pages[0].type==3?(m.openBlock(),m.createElementBlock("img",Hoe)):a.template.template_type===1&&a.template.pages[0].type==4?(m.openBlock(),m.createElementBlock("img",Xoe)):a.template.template_type===2&&a.template.pages[0].type==4?(m.openBlock(),m.createElementBlock("img",Koe)):(m.openBlock(),m.createElementBlock("img",Joe))])):m.createCommentVNode("",!0),m.createElementVNode("div",$oe,[m.createElementVNode("div",Zoe,[m.createElementVNode("div",Yoe,m.toDisplayString(a.template.name),1),m.createElementVNode("div",Qoe,[f[6]||(f[6]=m.createElementVNode("span",{class:"tipo-label"},"Tipo:",-1)),m.createElementVNode("span",ese," "+m.toDisplayString(a.template.template_type==1?"Prepartido":"Postpartido"),1)]),m.createElementVNode("button",{class:"postpartido-btn",onClick:f[1]||(f[1]=v=>j("generar-reporte"))},"Generar reporte")])]),ae.value?(m.openBlock(),m.createBlock(Foe,{key:1,onClick:f[2]||(f[2]=m.withModifiers(v=>ae.value=!1,["self"])),onMouseleave:f[3]||(f[3]=v=>ae.value=!1),onGenerarReporte:N,onRenombrar:E,onEditar:t,onDuplicar:x,onEliminar:u,onToggleAutogen:e})):m.createCommentVNode("",!0),ae.value?(m.openBlock(),m.createElementBlock("div",{key:2,class:"tooltip-overlay",onClick:f[4]||(f[4]=v=>ae.value=!1)})):m.createCommentVNode("",!0)]))}},[["__scopeId","data-v-4b2d5116"]]),rse={class:"modal-overlay"},nse={class:"modal-content"},ase={class:"modal-body"},ise={class:"radio-group"},ose=["disabled"],sse={key:0,class:"error-message"},lse={class:"modal-footer"},cse=["disabled"],use=["disabled"],dse=["disabled"],hse={key:0,class:"loading-spinner"},pse={key:1},C4=xs({__name:"ModalCreateTemplate",props:{token:{type:String,required:!0},team:{type:Number,required:!0}},emits:["close","template-created","open-modal-new-template"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(1),N=m.ref("pre"),E=m.ref(""),t=m.ref(!1),x=m.ref(""),u=async()=>{var e;if(!(E.value.trim().length<3)){t.value=!0,x.value="";try{const b={name:E.value.trim(),team_id:A.team,template_type:N.value==="pre"?1:2};console.log("toke mostrado es: ",A.token);const v=await Qi.create({headers:{Authorization:`${A.token}`}}).post("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates",b);console.log("response.data",v.data),j("template-created",v.data),j("open-modal-new-template",(e=v.data)==null?void 0:e.data),j("close")}catch(b){console.error("Error al guardar template:",b),b.response&&b.response.status===409&&(x.value="Ya existe un template con el mismo nombre")}finally{t.value=!1}}};return m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""}),(e,b)=>(m.openBlock(),m.createElementBlock("div",rse,[m.createElementVNode("div",nse,[m.createElementVNode("button",{class:"close-btn",onClick:b[0]||(b[0]=f=>e.$emit("close"))},b[6]||(b[6]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),b[11]||(b[11]=m.createElementVNode("div",{class:"modal-header"},[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-editar-withe.svg",class:"icon-title",alt:"icon"}),m.createElementVNode("span",{class:"modal-title"},"Crear Template")],-1)),b[12]||(b[12]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",ase,[ae.value===1?(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[b[9]||(b[9]=m.createElementVNode("div",{class:"modal-label"},"Define el tipo de análisis para tu template:",-1)),m.createElementVNode("div",ise,[m.createElementVNode("label",{class:m.normalizeClass(["radio-label",{selected:N.value==="pre"}])},[m.withDirectives(m.createElementVNode("input",{type:"radio",value:"pre","onUpdate:modelValue":b[1]||(b[1]=f=>N.value=f)},null,512),[[m.vModelRadio,N.value]]),b[7]||(b[7]=m.createTextVNode(" Prepartido ",-1))],2),m.createElementVNode("label",{class:m.normalizeClass(["radio-label",{selected:N.value==="post"}])},[m.withDirectives(m.createElementVNode("input",{type:"radio",value:"post","onUpdate:modelValue":b[2]||(b[2]=f=>N.value=f)},null,512),[[m.vModelRadio,N.value]]),b[8]||(b[8]=m.createTextVNode(" Postpartido ",-1))],2)])],64)):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[b[10]||(b[10]=m.createElementVNode("div",{class:"modal-label"},"Agrega un nombre a tu template:",-1)),m.withDirectives(m.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":b[3]||(b[3]=f=>E.value=f),placeholder:"Untitled",maxlength:"40",autocomplete:"off",disabled:t.value},null,8,ose),[[m.vModelText,E.value]]),x.value?(m.openBlock(),m.createElementBlock("div",sse,m.toDisplayString(x.value),1)):m.createCommentVNode("",!0)],64))]),b[13]||(b[13]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",lse,[m.createElementVNode("button",{class:"cancel-btn",onClick:b[4]||(b[4]=f=>e.$emit("close")),disabled:t.value},"Cancelar",8,cse),ae.value===1?(m.openBlock(),m.createElementBlock("button",{key:0,class:"next-btn",disabled:!N.value,onClick:b[5]||(b[5]=f=>ae.value=2)}," Siguiente ",8,use)):(m.openBlock(),m.createElementBlock("button",{key:1,class:"next-btn",disabled:E.value.trim().length<3||t.value,onClick:u},[t.value?(m.openBlock(),m.createElementBlock("div",hse)):(m.openBlock(),m.createElementBlock("span",pse,"Guardar"))],8,dse))])])]))}},[["__scopeId","data-v-7e85c356"]]),fse={class:"modal-overlay"},mse={class:"modal-content"},gse={class:"modal-body"},yse={key:0,class:"error-message-container"},vse={key:1},bse={class:"modal-group"},xse={key:0,class:"placeholder"},_se={key:0,class:"placeholder"},wse={key:1},kse={key:0,class:"custom-select-dropdown"},Tse=["onMousedown"],Sse={class:"modal-row"},Ase={class:"modal-group"},Ese={key:0,class:"placeholder"},Cse={key:0,class:"placeholder"},Mse={key:1},Pse={key:0,class:"custom-select-dropdown"},Lse=["onMousedown"],zse={class:"modal-group"},Nse={key:0,class:"placeholder"},Ose={key:0,class:"placeholder"},Rse={key:1},Dse={key:0,class:"custom-select-dropdown"},Ise=["onMousedown"],Fse={class:"modal-group"},Vse={key:0,class:"placeholder"},Bse={key:0,class:"placeholder"},Use=["src"],jse=["src"],qse={key:0,class:"custom-select-dropdown"},Wse=["onMousedown"],Gse=["src"],Hse=["src"],Xse={key:0,class:"header-separator"},Kse={key:1,class:"modal-footer"},Jse=["disabled"],$se={key:0,class:"loading-spinner select-spinner"},Zse=xs({__name:"ModalGenerarReporte",props:{userId:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0},templateType:{type:String,required:!1}},emits:["close","generar","switch-to-reports"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref([]),N=m.ref([]),E=m.ref([]),t=m.ref([]),x=m.ref(""),u=m.ref(""),e=m.ref(""),b=m.ref(null),f=Qi.create({headers:{Authorization:A.token}}),v=m.ref(!1),h=m.ref(!1),r=m.ref(!1),n=m.ref(!1),c=m.ref(!1),o=m.ref([]),l=m.ref([]),p=m.ref(!1),g=m.ref(!1),w=m.ref(!1);function S(q){x.value=q,p.value=!1,P()}function T(q){u.value=q,g.value=!1,C()}function M(q){e.value=q,w.value=!1,z()}async function L(){try{h.value=!0;const q=await Qi.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments");q.data&&Array.isArray(q.data)&&(o.value=q.data,ae.value=q.data.map($=>$.tournament).sort(($,te)=>$.order&&te.order?$.order-te.order:$.order&&!te.order?-1:!$.order&&te.order?1:0),x.value="",N.value=[],u.value="",E.value=[],e.value="",t.value=[],b.value=null)}catch(q){console.error("Error al cargar torneos:",q),ae.value=[{name:"Concacaf Copa Oro"},{name:"Liga MX"},{name:"MLS"}],N.value=[],E.value=[],x.value="",u.value="",e.value="",b.value=null}finally{h.value=!1}}function k(q){const $=o.value.find(te=>te.tournament&&te.tournament.name===q.name);$&&Array.isArray($.seasons)?(N.value=$.seasons,u.value="",E.value=[],e.value="",t.value=[],b.value=null):(N.value=[],u.value="",E.value=[],e.value="",t.value=[],b.value=null)}function P(){u.value="",e.value="",b.value=null,x.value?k(x.value):(N.value=[],E.value=[],t.value=[])}function C(){if(n.value=!0,e.value="",b.value=null,E.value=[],t.value=[],u.value&&u.value.id){const q=[u.value.id];if(u.value.related_seasons&&Array.isArray(u.value.related_seasons)){const $=u.value.related_seasons.map(te=>te.id).filter(Boolean);q.push(...$),console.log("relatedIds",$)}_(q)}setTimeout(()=>{n.value=!1},400)}async function _(q){r.value=!0;try{const $=Array.isArray(q)?q.join("&seasons="):q,te=await f.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons=${$}`);if(console.log("response.data:: 2",te.data),te.data.data&&Array.isArray(te.data.data)){console.log("response.data:: 4ddd",te.data.data);const X=te.data.data.reduce((J,Z)=>Z.games&&Array.isArray(Z.games)?J.concat(Z.games):J,[]);console.log("Todos los partidos unidos:",X),l.value=X.map(J=>({label:J.label||`${J.home_team_acronym||"Local"} vs ${J.visiting_team_acronym||"Visitante"}`,localLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+J.home_team+".png"||"",visitanteLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+J.visiting_team+".png"||"",...J}));let re=l.value;A.templateType==="2"||A.templateType===2?re=re.filter(J=>J.game_status===1):(A.templateType==="1"||A.templateType===1)&&(re=re.filter(J=>J.game_status===4));const ee=[...new Set(re.map(J=>J.matchday_id).filter(Boolean))];E.value=ee.map(J=>{const Z=l.value.find(ce=>ce.matchday_id&&ce.matchday_id===J);return{id:J,name:Z.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta")}}).sort((J,Z)=>{const ce=J.name.startsWith("Jornada"),de=Z.name.startsWith("Jornada");return ce&&de?J.id-Z.id:ce&&!de?-1:!ce&&de?1:0}),console.log("jornadas: ",E),e.value="",t.value=[],b.value=null}else l.value=[],E.value=[],e.value="",t.value=[],b.value=null}catch($){console.error("Error al cargar partidos:",$),l.value=[],E.value=[],e.value="",t.value=[],b.value=null}finally{r.value=!1}}function z(){b.value=null,t.value=[],e.value&&e.value.id&&y(e.value)}function y(q){if(!q||!q.id){t.value=[];return}let $=l.value.filter(te=>te.matchday_id===q.id);A.templateType==="2"||A.templateType===2?$=$.filter(te=>te.game_status===1):(A.templateType==="1"||A.templateType===1)&&($=$.filter(te=>te.game_status===4)),t.value=$}async function O(){try{h.value=!0;let q="";u.value&&u.value.name&&(q=u.value.name);const $={template_id:A.templateId,user_id:parseInt(A.userId),tournament_id:x.value.id||1,tournament_name:x.value.name,season_id:b.value.season_id,season_name:q,game_id:b.value.id||b.value.game_id},te=await Qi.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/reports`,$,{headers:{Authorization:A.token,"Content-Type":"application/json"}});console.log("Reporte generado exitosamente:",te.data),j("generar",{liga:x.value,torneo:u.value,jornada:e.value,partido:b.value,reportData:te.data}),j("switch-to-reports"),j("close")}catch(q){console.error("Error al generar el reporte:",q),q.response&&q.response.status===409?c.value=!0:alert("Error al generar el reporte. Por favor, intenta de nuevo.")}finally{h.value=!1}}function I(q){b.value=q,v.value=!1}function V(){document.body.style.overflow="hidden"}function U(){document.body.style.overflow=""}m.onMounted(()=>{L(),V()}),m.onUnmounted(()=>{U()});function W(){c.value=!1,U(),j("close")}return(q,$)=>(m.openBlock(),m.createElementBlock("div",fse,[m.createElementVNode("div",mse,[m.createElementVNode("button",{class:"close-btn",onClick:$[0]||($[0]=te=>q.$emit("close"))},$[10]||($[10]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),$[24]||($[24]=m.createElementVNode("div",{class:"modal-header"},[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report-white.svg",class:"icon-title",alt:"icono reporte blanco"}),m.createElementVNode("span",{class:"modal-title"},"Generar reporte")],-1)),$[25]||($[25]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",gse,[c.value?(m.openBlock(),m.createElementBlock("div",yse,[$[11]||($[11]=m.createElementVNode("p",{class:"error-text"},[m.createTextVNode(" Este reporte ya fue generado previamente"),m.createElementVNode("br"),m.createTextVNode(" con este template para el partido seleccionado. ")],-1)),m.createElementVNode("button",{class:"accept-btn",onClick:W},"Aceptar")])):(m.openBlock(),m.createElementBlock("div",vse,[m.createElementVNode("div",bse,[$[14]||($[14]=m.createElementVNode("label",null,"1. Elige la liga",-1)),m.createElementVNode("div",{class:"select-wrapper custom-dropdown liga-select",tabindex:"0",onClick:$[1]||($[1]=te=>p.value=!p.value),onBlur:$[2]||($[2]=te=>p.value=!1)},[m.createElementVNode("div",{class:m.normalizeClass(["custom-select-display",{disabled:h.value||ae.value.length===0}])},[h.value?(m.openBlock(),m.createElementBlock("span",xse,$[12]||($[12]=[m.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),m.createTextVNode("Cargando ligas...",-1)]))):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[x.value?(m.openBlock(),m.createElementBlock("span",wse,m.toDisplayString(x.value.name),1)):(m.openBlock(),m.createElementBlock("span",_se,"Selecciona la liga"))],64)),m.createElementVNode("span",{class:m.normalizeClass(["select-chevron",{open:p.value}])},$[13]||($[13]=[m.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),p.value&&ae.value.length>0?(m.openBlock(),m.createElementBlock("div",kse,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(ae.value,te=>(m.openBlock(),m.createElementBlock("div",{key:te.name,class:"custom-select-option",onMousedown:m.withModifiers(X=>S(te),["prevent"])},m.toDisplayString(te.name),41,Tse))),128))])):m.createCommentVNode("",!0)],32)]),m.createElementVNode("div",Sse,[m.createElementVNode("div",Ase,[$[17]||($[17]=m.createElementVNode("label",null,"2. Elige el torneo",-1)),m.createElementVNode("div",{class:"select-wrapper custom-dropdown torneo-select",tabindex:"0",onClick:$[3]||($[3]=te=>g.value=!g.value),onBlur:$[4]||($[4]=te=>g.value=!1)},[m.createElementVNode("div",{class:m.normalizeClass(["custom-select-display",{disabled:!x.value||N.value.length===0||h.value}])},[h.value?(m.openBlock(),m.createElementBlock("span",Ese,$[15]||($[15]=[m.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),m.createTextVNode("Cargando torneos...",-1)]))):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[u.value?(m.openBlock(),m.createElementBlock("span",Mse,m.toDisplayString(u.value.name),1)):(m.openBlock(),m.createElementBlock("span",Cse,"Elige el torneo"))],64)),m.createElementVNode("span",{class:m.normalizeClass(["select-chevron",{open:g.value}])},$[16]||($[16]=[m.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),g.value&&N.value.length>0&&x.value?(m.openBlock(),m.createElementBlock("div",Pse,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(N.value,te=>(m.openBlock(),m.createElementBlock("div",{key:te.id,class:"custom-select-option",onMousedown:m.withModifiers(X=>T(te),["prevent"])},m.toDisplayString(te.name),41,Lse))),128))])):m.createCommentVNode("",!0)],32)]),m.createElementVNode("div",zse,[$[20]||($[20]=m.createElementVNode("label",null,"3. Elige la jornada",-1)),m.createElementVNode("div",{class:"select-wrapper custom-dropdown jornada-select",tabindex:"0",onClick:$[5]||($[5]=te=>w.value=!w.value),onBlur:$[6]||($[6]=te=>w.value=!1)},[m.createElementVNode("div",{class:m.normalizeClass(["custom-select-display",{disabled:!u.value||E.value.length===0||n.value}])},[n.value?(m.openBlock(),m.createElementBlock("span",Nse,$[18]||($[18]=[m.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),m.createTextVNode("Cargando jornadas...",-1)]))):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[e.value?(m.openBlock(),m.createElementBlock("span",Rse,m.toDisplayString(e.value.name),1)):(m.openBlock(),m.createElementBlock("span",Ose,"Elige la jornada"))],64)),m.createElementVNode("span",{class:m.normalizeClass(["select-chevron",{open:w.value}])},$[19]||($[19]=[m.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),w.value&&E.value.length>0&&u.value?(m.openBlock(),m.createElementBlock("div",Dse,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(E.value,te=>(m.openBlock(),m.createElementBlock("div",{key:te.id,class:"custom-select-option",onMousedown:m.withModifiers(X=>M(te),["prevent"])},m.toDisplayString(te.name),41,Ise))),128))])):m.createCommentVNode("",!0)],32)])]),m.createElementVNode("div",Fse,[$[23]||($[23]=m.createElementVNode("label",null,"4. Elige el partido",-1)),m.createElementVNode("div",{class:"select-wrapper partido-select",tabindex:"0",onClick:$[7]||($[7]=te=>v.value=!v.value),onBlur:$[8]||($[8]=te=>v.value=!1)},[m.createElementVNode("div",{class:m.normalizeClass(["custom-select-display",{disabled:!e.value||r.value}])},[r.value?(m.openBlock(),m.createElementBlock("span",Vse,$[21]||($[21]=[m.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),m.createTextVNode("Cargando partidos...",-1)]))):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[b.value?(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[b.value.localLogo?(m.openBlock(),m.createElementBlock("img",{key:0,src:b.value.localLogo,class:"logo-equipo",alt:"local"},null,8,Use)):m.createCommentVNode("",!0),m.createElementVNode("span",null,m.toDisplayString(b.value.label),1),b.value.visitanteLogo?(m.openBlock(),m.createElementBlock("img",{key:1,src:b.value.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,jse)):m.createCommentVNode("",!0)],64)):(m.openBlock(),m.createElementBlock("span",Bse,"Selecciona el partido"))],64)),m.createElementVNode("span",{class:m.normalizeClass(["select-chevron",{open:v.value}])},$[22]||($[22]=[m.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),v.value&&!r.value&&e.value?(m.openBlock(),m.createElementBlock("div",qse,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(t.value,te=>(m.openBlock(),m.createElementBlock("div",{key:te.label,class:"custom-select-option",onMousedown:m.withModifiers(X=>I(te),["prevent"])},[m.createElementVNode("img",{src:te.localLogo,class:"logo-equipo",alt:"local"},null,8,Gse),m.createElementVNode("span",null,m.toDisplayString(te.label),1),m.createElementVNode("img",{src:te.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,Hse)],40,Wse))),128))])):m.createCommentVNode("",!0)],32)])]))]),c.value?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",Xse)),c.value?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",Kse,[m.createElementVNode("button",{class:"cancel-btn",onClick:$[9]||($[9]=te=>q.$emit("close"))},"Cancelar"),m.createElementVNode("button",{class:"next-btn",disabled:!x.value||!u.value||!e.value||!b.value||h.value,onClick:O},[h.value?(m.openBlock(),m.createElementBlock("span",$se)):m.createCommentVNode("",!0),m.createTextVNode(" "+m.toDisplayString(h.value?"Generando...":"Generar"),1)],8,Jse)]))])]))}},[["__scopeId","data-v-d86b1497"]]),Yse={class:"modal-overlay"},Qse={class:"modal-content"},ele={class:"modal-body"},tle=["placeholder","disabled"],rle={key:0,class:"error-message"},nle={class:"modal-footer"},ale=["disabled"],ile=["disabled"],ole={key:0},sle={key:1},lle=xs({__name:"ModalRenameTemplate",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","rename","refresh"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(A.initialName),N=m.ref(!1),E=m.ref("");m.watch(()=>A.initialName,x=>{ae.value=x,E.value=""}),m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""});async function t(){var x;if(console.log("acceptRename"),!(ae.value.trim().length<3)){console.log("acceptRename 22"),N.value=!0,E.value="";try{await Qi.put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/templates/${A.templateId}/general`,{name:ae.value.trim()},{headers:{Authorization:`${A.token}`,"Content-Type":"application/json"}}),j("rename",ae.value.trim()),j("refresh"),j("close")}catch(u){console.error("Error al renombrar el template:",u),((x=u.response)==null?void 0:x.status)===409?E.value="Ya existe un template con el mismo nombre":E.value="Error al renombrar el template. Inténtalo de nuevo."}finally{N.value=!1}}}return(x,u)=>(m.openBlock(),m.createElementBlock("div",Yse,[m.createElementVNode("div",Qse,[m.createElementVNode("button",{class:"close-btn",onClick:u[0]||(u[0]=e=>x.$emit("close"))},u[3]||(u[3]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),u[5]||(u[5]=m.createElementVNode("div",{class:"modal-header"},[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),m.createElementVNode("span",{class:"modal-title"},"Renombrar Template")],-1)),u[6]||(u[6]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",ele,[u[4]||(u[4]=m.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),m.withDirectives(m.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":u[1]||(u[1]=e=>ae.value=e),placeholder:a.initialName,maxlength:"40",autocomplete:"off",disabled:N.value},null,8,tle),[[m.vModelText,ae.value]]),E.value?(m.openBlock(),m.createElementBlock("div",rle,m.toDisplayString(E.value),1)):m.createCommentVNode("",!0)]),u[7]||(u[7]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",nle,[m.createElementVNode("button",{class:"cancel-btn",onClick:u[2]||(u[2]=e=>x.$emit("close")),disabled:N.value},"Cancelar",8,ale),m.createElementVNode("button",{class:"next-btn",disabled:ae.value.trim().length<3||N.value,onClick:t},[N.value?(m.openBlock(),m.createElementBlock("span",ole,"Guardando...")):(m.openBlock(),m.createElementBlock("span",sle,"Guardar"))],8,ile)])])]))}},[["__scopeId","data-v-2f6df9c1"]]),cle={class:"modal-overlay"},ule={class:"modal-content"},dle={class:"modal-body"},hle=["placeholder"],ple={class:"modal-footer"},fle=["disabled"],mle=xs({__name:"ModalduplicateTemplate",props:{initialName:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","duplicate","template-duplicated"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(A.initialName+" copy"),N=m.ref(!1);m.watch(()=>A.initialName,t=>{ae.value=t+" copy"}),m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""});async function E(){if(ae.value.trim().length>=3&&!N.value){N.value=!0;try{const t=await Qi.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/${A.templateId}/duplicate`,{name:ae.value.trim()},{headers:{Authorization:`${A.token}`,"Content-Type":"application/json"}});j("template-duplicated",{originalTemplateId:A.templateId,newTemplateName:ae.value.trim(),responseData:t.data}),j("close")}catch(t){console.error("Error al duplicar template:",t),alert("Error al duplicar el template. Por favor, intenta de nuevo.")}finally{N.value=!1}}}return(t,x)=>(m.openBlock(),m.createElementBlock("div",cle,[m.createElementVNode("div",ule,[m.createElementVNode("button",{class:"close-btn",onClick:x[0]||(x[0]=u=>t.$emit("close"))},x[3]||(x[3]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),x[5]||(x[5]=m.createElementVNode("div",{class:"modal-header"},[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate-white.svg",class:"icon-title",alt:"icon"}),m.createElementVNode("span",{class:"modal-title"},"Duplicar template")],-1)),x[6]||(x[6]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",dle,[x[4]||(x[4]=m.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),m.withDirectives(m.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":x[1]||(x[1]=u=>ae.value=u),placeholder:a.initialName,maxlength:"40",autocomplete:"off"},null,8,hle),[[m.vModelText,ae.value]])]),x[7]||(x[7]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",ple,[m.createElementVNode("button",{class:"cancel-btn",onClick:x[2]||(x[2]=u=>t.$emit("close"))},"Cancelar"),m.createElementVNode("button",{class:"next-btn",disabled:ae.value.trim().length<3||N.value,onClick:E},m.toDisplayString(N.value?"Duplicando...":"Aceptar"),9,fle)])])]))}},[["__scopeId","data-v-abfffcd1"]]),gle={class:"modal-overlay"},yle={class:"modal-content"},vle={class:"modal-footer"},ble=["disabled"],xle=xs({__name:"ModalDeleteTemplate",props:{templateId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","templateDeleted"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(!1);m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""});const N=async()=>{try{ae.value=!0;const t=await Qi.create({headers:{Authorization:`${A.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/templates/${A.templateId}`);(t.status===200||t.status===204)&&(j("templateDeleted",A.templateId),j("close"))}catch(E){console.error("Error al eliminar template:",E),alert("Error al eliminar el template. Por favor, inténtalo de nuevo.")}finally{ae.value=!1}};return(E,t)=>(m.openBlock(),m.createElementBlock("div",gle,[m.createElementVNode("div",yle,[m.createElementVNode("button",{class:"close-btn",onClick:t[0]||(t[0]=x=>E.$emit("close"))},t[2]||(t[2]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),t[3]||(t[3]=m.createStaticVNode('<div class="modal-header" data-v-93a27145><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-93a27145><span class="modal-title" data-v-93a27145>Eliminar template</span></div><div class="header-separator" data-v-93a27145></div><div class="modal-body confirm-text" data-v-93a27145> ¿Estás seguro que deseas eliminar<br data-v-93a27145> este template? Si lo haces no habrá manera<br data-v-93a27145> de recuperarlo. </div><div class="header-separator" data-v-93a27145></div>',4)),m.createElementVNode("div",vle,[m.createElementVNode("button",{class:"cancel-btn",onClick:t[1]||(t[1]=x=>E.$emit("close"))},"Cancelar"),m.createElementVNode("button",{class:"delete-btn",onClick:N,disabled:ae.value},m.toDisplayString(ae.value?"Eliminando...":"Eliminar"),9,ble)])])]))}},[["__scopeId","data-v-93a27145"]]),_le={class:"templates-header"},wle={class:"count"},kle={key:0,class:"sort-options"},Tle=["onClick"],Sle={key:0,class:"checkmark"},Ale={key:0,class:"loading-state"},Ele=xs({__name:"TemplatesSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["switch-to-reports","open-modal-new-template","edit-template"],setup(a,{emit:d}){const A=d,j=a,ae=m.ref(!1),N=m.ref(null),E=m.ref(!1),t=m.ref(!1),x=m.ref(!1),u=m.ref(!1),e=m.ref(!1),b=m.ref(""),f=m.ref(""),v=m.ref(""),h=m.ref(""),r=m.ref(""),n=m.ref(""),c=m.ref(""),o=m.ref(""),l=m.ref(""),p=m.ref(null),g=m.ref(null),w=m.ref(null),S=m.ref(0),T=m.ref([]),M=m.ref(!1),L=m.ref(null);m.watch([()=>j.team,()=>j.token],()=>{j.team&&j.token&&P()},{immediate:!1});const k=[{label:"A - Z",value:"name-asc"},{label:"Más recientes",value:"date-desc"}],P=async()=>{try{M.value=!0,L.value=null;const $=await Qi.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/teams/${j.team}`,{headers:{Authorization:`${j.token}`,"Content-Type":"application/json"}});$.data&&Array.isArray($.data)?T.value=$.data:$.data&&$.data.templates?T.value=$.data.templates:$.data&&$.data.data?T.value=$.data.data:T.value=[]}catch($){console.error("Error al obtener templates:",$),console.error("Error response:",$.response),L.value=$.message||"Error al cargar los templates",T.value=[]}finally{M.value=!1}},C=m.computed(()=>{if(!T.value.length)return[];let $=[...T.value];if(j.searchQuery.trim()){const te=j.searchQuery.toLowerCase().trim();$=$.filter(X=>X.name.toLowerCase().includes(te))}switch(N.value){case"name-asc":return $.sort((te,X)=>te.name.localeCompare(X.name));case"date-desc":return $.sort((te,X)=>new Date(X.created_at)-new Date(te.created_at));default:return $}}),_=m.computed(()=>{if(!S.value)return"grid-1-column";const $=340,te=20,re=S.value-40,ee=Math.floor((re+te)/($+te)),J=Math.max(1,ee);return J>=4?"grid-4-columns":J>=3?"grid-3-columns":J>=2?"grid-2-columns":"grid-1-column"}),z=()=>{ae.value=!ae.value},y=$=>{N.value=$,ae.value=!1},O=$=>{const te=k.find(X=>X.value===$);return te?te.label:null},I=$=>{ae.value&&p.value&&!p.value.contains($.target)&&(ae.value=!1)},V=()=>{g.value&&(S.value=g.value.offsetWidth)};function U($){A("edit-template",$)}let W=null;m.onMounted(async()=>{document.addEventListener("mousedown",I),await m.nextTick(),V(),window.ResizeObserver?(W=new ResizeObserver(()=>{V()}),g.value&&W.observe(g.value)):window.addEventListener("resize",V),P()});function q($){console.log("onOpenModalNewTemplate template section, called with data:",$),A("open-modal-new-template",$)}return m.onBeforeUnmount(()=>{document.removeEventListener("mousedown",I),W?W.disconnect():window.removeEventListener("resize",V)}),($,te)=>(m.openBlock(),m.createElementBlock("div",{class:"templates-section",ref_key:"templatesSectionRef",ref:g},[m.createElementVNode("div",_le,[m.createElementVNode("span",null,[te[11]||(te[11]=m.createTextVNode("Templates ",-1)),m.createElementVNode("span",wle,"("+m.toDisplayString(C.value.length)+")",1)]),m.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:p},[m.createElementVNode("button",{class:"sort-button",onClick:z},[m.createTextVNode(m.toDisplayString(O(N.value)||"Ordenar")+" ",1),m.createElementVNode("span",{class:m.normalizeClass(["dropdown-arrow",{rotated:ae.value}])},null,2)]),ae.value?(m.openBlock(),m.createElementBlock("div",kle,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(k,X=>m.createElementVNode("div",{key:X.value,class:m.normalizeClass(["sort-option",{selected:N.value===X.value}]),onClick:re=>y(X.value)},[m.createElementVNode("span",null,m.toDisplayString(X.label),1),N.value===X.value?(m.openBlock(),m.createElementBlock("span",Sle,te[12]||(te[12]=[m.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):m.createCommentVNode("",!0)],10,Tle)),64))])):m.createCommentVNode("",!0)],512)]),M.value?(m.openBlock(),m.createElementBlock("div",Ale,te[13]||(te[13]=[m.createElementVNode("div",{class:"loading-spinner"},null,-1),m.createElementVNode("p",null,"Cargando templates...",-1)]))):(m.openBlock(),m.createElementBlock("div",{key:1,class:m.normalizeClass(["templates-list",_.value]),ref_key:"templatesListRef",ref:w},[m.createElementVNode("div",{class:"template-card create",onClick:te[0]||(te[0]=X=>E.value=!0)},te[14]||(te[14]=[m.createElementVNode("div",{class:"inner-card"},[m.createElementVNode("div",{class:"plus"},[m.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-add@3x.png",alt:"Agregar"})]),m.createElementVNode("div",{class:"create-text"},"Crear Template")],-1)])),(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(C.value,X=>(m.openBlock(),m.createBlock(tse,{key:X.id,template:X,onGenerarReporte:re=>{c.value=X.id,l.value=X.template_type,t.value=!0},onRenombrar:re=>{o.value=X.id,b.value=re,f.value=X.template_type,x.value=!0},onDuplicar:re=>{n.value=X.id,v.value=re,u.value=!0},onEliminar:re=>{h.value=re.name,r.value=re.id,e.value=!0},onEditTemplate:U},null,8,["template","onGenerarReporte","onRenombrar","onDuplicar","onEliminar"]))),128))],2)),E.value?(m.openBlock(),m.createBlock(C4,{key:2,token:a.token,team:a.team,onClose:te[1]||(te[1]=X=>E.value=!1),onOpenModalNewTemplate:q},null,8,["token","team"])):m.createCommentVNode("",!0),t.value?(m.openBlock(),m.createBlock(Zse,{key:3,"user-id":a.userId,token:a.token,"template-id":c.value,"template-type":l.value,onClose:te[2]||(te[2]=X=>t.value=!1),onSwitchToReports:te[3]||(te[3]=X=>$.$emit("switch-to-reports"))},null,8,["user-id","token","template-id","template-type"])):m.createCommentVNode("",!0),x.value?(m.openBlock(),m.createBlock(lle,{key:4,initialName:b.value,token:a.token,"template-id":o.value,"template-type":f.value,"user-id":a.userId,onRefresh:te[4]||(te[4]=X=>P()),onClose:te[5]||(te[5]=X=>x.value=!1),onRename:te[6]||(te[6]=X=>{x.value=!1})},null,8,["initialName","token","template-id","template-type","user-id"])):m.createCommentVNode("",!0),u.value?(m.openBlock(),m.createBlock(mle,{key:5,initialName:v.value,token:a.token,"template-id":n.value,onClose:te[7]||(te[7]=X=>u.value=!1),onTemplateDuplicated:te[8]||(te[8]=X=>{u.value=!1,P()})},null,8,["initialName","token","template-id"])):m.createCommentVNode("",!0),e.value?(m.openBlock(),m.createBlock(xle,{key:6,"template-id":r.value,"user-id":a.userId,token:a.token,onClose:te[9]||(te[9]=X=>e.value=!1),onTemplateDeleted:te[10]||(te[10]=X=>{e.value=!1,P()})},null,8,["template-id","user-id","token"])):m.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-86a6a808"]]),Cle={class:"tooltip-report-options"},Mle=xs({__name:"TooltipReportOptions",emits:["ver-reporte","renombrar","editar","duplicar","descargar","eliminar"],setup(a,{emit:d}){return(A,j)=>(m.openBlock(),m.createElementBlock("div",Cle,[m.createElementVNode("ul",null,[m.createElementVNode("li",{class:"option",onClick:j[0]||(j[0]=ae=>A.$emit("renombrar"))},j[3]||(j[3]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar reporte",class:"icon"},null,-1),m.createTextVNode(" Renombrar reporte ",-1)])),m.createElementVNode("li",{class:"option",onClick:j[1]||(j[1]=ae=>A.$emit("descargar"))},j[4]||(j[4]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-download.svg",alt:"Descargar reporte",class:"icon"},null,-1),m.createTextVNode(" Descargar reporte ",-1)])),m.createElementVNode("li",{class:"option",onClick:j[2]||(j[2]=ae=>A.$emit("eliminar"))},j[5]||(j[5]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar reporte",class:"icon"},null,-1),m.createTextVNode(" Eliminar reporte ",-1)]))])]))}},[["__scopeId","data-v-246ad2d7"]]);function Pd(a){if(!a)return"";const d=new Date(a);if(isNaN(d.getTime()))return"";const A=d.getDate(),j=d.toLocaleDateString("es-ES",{month:"short"}),ae=d.getFullYear();return`${A} ${j}, ${ae}`}const Ple={class:"prematch-bg"},Lle={class:"subtitle"},zle={class:"jornada"},Nle={class:"fecha"},Ole={class:"teams-row"},Rle={class:"team team-local"},Dle={class:"escudo-svg"},Ile=["src"],Fle={class:"team-name"},Vle={class:"team team-visitor"},Ble={class:"escudo-svg"},Ule=["src"],jle={class:"team-name"},qle=xs({__name:"AnalisisPrematchType1",props:{report:{type:Object,default:()=>({})}},setup(a){function d(j){return j?j.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;return(j,ae)=>(m.openBlock(),m.createElementBlock("div",Ple,[ae[0]||(ae[0]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),m.createElementVNode("div",Lle,[m.createElementVNode("span",zle,m.toDisplayString(d(A.report.game.matchday_name)),1),m.createElementVNode("span",Nle," - "+m.toDisplayString(m.unref(Pd)(A.report.game.date_time_utc)),1)]),m.createElementVNode("div",Ole,[m.createElementVNode("div",Rle,[m.createElementVNode("span",Dle,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.home_team+".png"},null,8,Ile)]),m.createElementVNode("span",Fle,m.toDisplayString(A.report.game.home_team_acronym),1)]),m.createElementVNode("div",Vle,[m.createElementVNode("span",Ble,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.visiting_team+".png"},null,8,Ule)]),m.createElementVNode("span",jle,m.toDisplayString(A.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-8646ef7d"]]),Wle={class:"prematch-bg"},Gle={class:"background-shields"},Hle={class:"shield-left"},Xle=["src"],Kle={class:"shield-right"},Jle=["src"],$le={class:"subtitle"},Zle={class:"jornada"},Yle={class:"fecha"},Qle={class:"teams-grid"},ece={class:"row row-top"},tce={class:"team team-local"},rce={class:"escudo-svg"},nce=["src"],ace={class:"team-name"},ice={class:"score"},oce={class:"score-text"},sce={class:"team team-visitor"},lce={class:"team-name"},cce={class:"escudo-svg"},uce=["src"],dce={class:"row row-bottom"},hce={class:"team-stats"},pce={class:"stat red"},fce={class:"stat-number"},mce={class:"stat yellow"},gce={class:"stat-number"},yce={class:"team-stats"},vce={class:"stat-number"},bce={class:"stat-number"},xce=xs({__name:"AnalisisPostMatchType1",props:{report:{type:Object,default:()=>({})}},setup(a){function d(u){return u?u.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a,j=m.computed(()=>{var b,f,v;const u=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.minutes)==null?void 0:v.home_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const e=u.map(h=>{const r=h.match(/(\d+)'$/);return r?r[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),r=e.slice(5).join(", ");return`${h}
|
|
4081
|
+
`+N):j.stack=N}catch{}}throw j}}_request(d,A){typeof d=="string"?(A=A||{},A.url=d):A=d||{},A=Bh(this.defaults,A);const{transitional:j,paramsSerializer:ae,headers:N}=A;j!==void 0&&Rg.assertOptions(j,{silentJSONParsing:hd.transitional(hd.boolean),forcedJSONParsing:hd.transitional(hd.boolean),clarifyTimeoutError:hd.transitional(hd.boolean)},!1),ae!=null&&(Gn.isFunction(ae)?A.paramsSerializer={serialize:ae}:Rg.assertOptions(ae,{encode:hd.function,serialize:hd.function},!0)),A.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?A.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:A.allowAbsoluteUrls=!0),Rg.assertOptions(A,{baseUrl:hd.spelling("baseURL"),withXsrfToken:hd.spelling("withXSRFToken")},!0),A.method=(A.method||this.defaults.method||"get").toLowerCase();let E=N&&Gn.merge(N.common,N[A.method]);N&&Gn.forEach(["delete","get","head","post","put","patch","common"],h=>{delete N[h]}),A.headers=cu.concat(E,N);const t=[];let x=!0;this.interceptors.request.forEach(function(r){typeof r.runWhen=="function"&&r.runWhen(A)===!1||(x=x&&r.synchronous,t.unshift(r.fulfilled,r.rejected))});const u=[];this.interceptors.response.forEach(function(r){u.push(r.fulfilled,r.rejected)});let e,b=0,f;if(!x){const h=[T4.bind(this),void 0];for(h.unshift(...t),h.push(...u),f=h.length,e=Promise.resolve(A);b<f;)e=e.then(h[b++],h[b++]);return e}f=t.length;let v=A;for(b=0;b<f;){const h=t[b++],r=t[b++];try{v=h(v)}catch(n){r.call(this,n);break}}try{e=T4.call(this,v)}catch(h){return Promise.reject(h)}for(b=0,f=u.length;b<f;)e=e.then(u[b++],u[b++]);return e}getUri(d){d=Bh(this.defaults,d);const A=m4(d.baseURL,d.url,d.allowAbsoluteUrls);return o4(A,d.params,d.paramsSerializer)}};Gn.forEach(["delete","get","head","options"],function(d){Uh.prototype[d]=function(A,j){return this.request(Bh(j||{},{method:d,url:A,data:(j||{}).data}))}}),Gn.forEach(["post","put","patch"],function(d){function A(j){return function(N,E,t){return this.request(Bh(t||{},{method:d,headers:j?{"Content-Type":"multipart/form-data"}:{},url:N,data:E}))}}Uh.prototype[d]=A(),Uh.prototype[d+"Form"]=A(!0)});let Ooe=class Z4{constructor(d){if(typeof d!="function")throw new TypeError("executor must be a function.");let A;this.promise=new Promise(function(N){A=N});const j=this;this.promise.then(ae=>{if(!j._listeners)return;let N=j._listeners.length;for(;N-- >0;)j._listeners[N](ae);j._listeners=null}),this.promise.then=ae=>{let N;const E=new Promise(t=>{j.subscribe(t),N=t}).then(ae);return E.cancel=function(){j.unsubscribe(N)},E},d(function(N,E,t){j.reason||(j.reason=new Mp(N,E,t),A(j.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){if(this.reason){d(this.reason);return}this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;const A=this._listeners.indexOf(d);A!==-1&&this._listeners.splice(A,1)}toAbortSignal(){const d=new AbortController,A=j=>{d.abort(j)};return this.subscribe(A),d.signal.unsubscribe=()=>this.unsubscribe(A),d.signal}static source(){let d;return{token:new Z4(function(ae){d=ae}),cancel:d}}};function Roe(a){return function(A){return a.apply(null,A)}}function Doe(a){return Gn.isObject(a)&&a.isAxiosError===!0}const ub={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(ub).forEach(([a,d])=>{ub[d]=a});function E4(a){const d=new Uh(a),A=G5(Uh.prototype.request,d);return Gn.extend(A,Uh.prototype,d,{allOwnKeys:!0}),Gn.extend(A,d,null,{allOwnKeys:!0}),A.create=function(ae){return E4(Bh(a,ae))},A}const Qi=E4(jf);Qi.Axios=Uh,Qi.CanceledError=Mp,Qi.CancelToken=Ooe,Qi.isCancel=d4,Qi.VERSION=S4,Qi.toFormData=Mg,Qi.AxiosError=mi,Qi.Cancel=Qi.CanceledError,Qi.all=function(d){return Promise.all(d)},Qi.spread=Roe,Qi.isAxiosError=Doe,Qi.mergeConfig=Bh,Qi.AxiosHeaders=cu,Qi.formToJSON=a=>c4(Gn.isHTMLForm(a)?new FormData(a):a),Qi.getAdapter=k4.getAdapter,Qi.HttpStatusCode=ub,Qi.default=Qi;const{Axios:Kfe,AxiosError:Jfe,CanceledError:$fe,isCancel:Zfe,CancelToken:Yfe,VERSION:Qfe,all:eme,Cancel:tme,isAxiosError:rme,spread:nme,toFormData:ame,AxiosHeaders:ime,HttpStatusCode:ome,formToJSON:sme,getAdapter:lme,mergeConfig:cme}=Qi,xs=(a,d)=>{const A=a.__vccOpts||a;for(const[j,ae]of d)A[j]=ae;return A},Ioe={class:"tooltip-template-options"},Foe=xs({__name:"TooltipTemplateOptions",props:{canEdit:{type:Boolean,default:!0}},emits:["generar-reporte","renombrar","editar","duplicar","eliminar"],setup(a,{emit:d}){return(A,j)=>(m.openBlock(),m.createElementBlock("div",Ioe,[m.createElementVNode("ul",null,[m.createElementVNode("li",{class:"option",onClick:j[0]||(j[0]=ae=>A.$emit("generar-reporte"))},j[5]||(j[5]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report.svg",alt:"Generar reporte",class:"icon"},null,-1),m.createTextVNode(" Generar reporte ",-1)])),a.canEdit?(m.openBlock(),m.createElementBlock("li",{key:0,class:"option",onClick:j[1]||(j[1]=ae=>A.$emit("renombrar"))},j[6]||(j[6]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1),m.createTextVNode(" Renombrar template ",-1)]))):m.createCommentVNode("",!0),a.canEdit?(m.openBlock(),m.createElementBlock("li",{key:1,class:"option",onClick:j[2]||(j[2]=ae=>A.$emit("editar"))},j[7]||(j[7]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-edit.svg",alt:"Editar template",class:"icon"},null,-1),m.createTextVNode(" Editar template ",-1)]))):m.createCommentVNode("",!0),m.createElementVNode("li",{class:"option",onClick:j[3]||(j[3]=ae=>A.$emit("duplicar"))},j[8]||(j[8]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate.svg",alt:"Duplicar template",class:"icon"},null,-1),m.createTextVNode(" Duplicar template ",-1)])),a.canEdit?(m.openBlock(),m.createElementBlock("li",{key:2,class:"option",onClick:j[4]||(j[4]=ae=>A.$emit("eliminar"))},j[9]||(j[9]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1),m.createTextVNode(" Eliminar template ",-1)]))):m.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-137412ab"]]),Voe={class:"template-card postpartido",style:{position:"relative"}},Boe={key:0,class:"template-img-placeholder",style:{position:"relative"}},Uoe={key:0,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-01.jpg",alt:"Template Prematch Type 1",class:"template-img"},joe={key:1,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-01.jpg",alt:"Template Postmatch Type 1",class:"template-img"},qoe={key:2,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-02.jpg",alt:"Template Prematch Type 2",class:"template-img"},Woe={key:3,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-02.jpg",alt:"Template Postmatch Type 2",class:"template-img"},Goe={key:4,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-03.jpg",alt:"Template Prematch Type 3",class:"template-img"},Hoe={key:5,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-03.jpg",alt:"Template Postmatch Type 3",class:"template-img"},Xoe={key:6,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-04.jpg",alt:"Template Prematch Type 4",class:"template-img"},Koe={key:7,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-04.jpg",alt:"Template Postmatch Type 4",class:"template-img"},Joe={key:8,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumb1.png",alt:"Template Default",class:"template-img"},$oe={class:"inner-card-postpartido"},Zoe={class:"postpartido-footer"},Yoe={class:"postpartido-version"},Qoe={class:"postpartido-status"},ese={class:"tipo-value"},tse=xs({__name:"TemplateItem",props:{template:{type:Object,required:!0},userId:{type:Number,required:!0}},emits:["generar-reporte","renombrar","duplicar","eliminar","edit-template"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(!1),N=m.computed(()=>A.userId===A.template.user_id);function E(){console.log("generar-reporte"),ae.value=!1,j("generar-reporte")}function t(){console.log("renombrar"),ae.value=!1;const f=A.template.name||"";j("renombrar",f)}function x(){console.log("editar"),ae.value=!1,j("edit-template",A.template)}function u(){console.log("duplicar"),ae.value=!1;const f=A.template.name||"";j("duplicar",f)}function e(){console.log("eliminar"),ae.value=!1,j("eliminar",A.template)}function b(f){console.log("toggle-autogen",f)}return(f,v)=>(m.openBlock(),m.createElementBlock("div",Voe,[m.createElementVNode("div",{class:"three-dots",onClick:v[0]||(v[0]=m.withModifiers(h=>ae.value=!ae.value,["stop"]))},v[5]||(v[5]=[m.createElementVNode("span",null,null,-1),m.createElementVNode("span",null,null,-1),m.createElementVNode("span",null,null,-1)])),a.template.pages&&a.template.pages[0]?(m.openBlock(),m.createElementBlock("div",Boe,[a.template.template_type===1&&a.template.pages[0].type==1?(m.openBlock(),m.createElementBlock("img",Uoe)):a.template.template_type===2&&a.template.pages[0].type==1?(m.openBlock(),m.createElementBlock("img",joe)):a.template.template_type===1&&a.template.pages[0].type==2?(m.openBlock(),m.createElementBlock("img",qoe)):a.template.template_type===2&&a.template.pages[0].type==2?(m.openBlock(),m.createElementBlock("img",Woe)):a.template.template_type===1&&a.template.pages[0].type==3?(m.openBlock(),m.createElementBlock("img",Goe)):a.template.template_type===2&&a.template.pages[0].type==3?(m.openBlock(),m.createElementBlock("img",Hoe)):a.template.template_type===1&&a.template.pages[0].type==4?(m.openBlock(),m.createElementBlock("img",Xoe)):a.template.template_type===2&&a.template.pages[0].type==4?(m.openBlock(),m.createElementBlock("img",Koe)):(m.openBlock(),m.createElementBlock("img",Joe))])):m.createCommentVNode("",!0),m.createElementVNode("div",$oe,[m.createElementVNode("div",Zoe,[m.createElementVNode("div",Yoe,m.toDisplayString(a.template.name),1),m.createElementVNode("div",Qoe,[v[6]||(v[6]=m.createElementVNode("span",{class:"tipo-label"},"Tipo:",-1)),m.createElementVNode("span",ese," "+m.toDisplayString(a.template.template_type==1?"Prepartido":"Postpartido"),1)]),m.createElementVNode("button",{class:"postpartido-btn",onClick:v[1]||(v[1]=h=>j("generar-reporte"))},"Generar reporte")])]),ae.value?(m.openBlock(),m.createBlock(Foe,{key:1,"can-edit":N.value,onClick:v[2]||(v[2]=m.withModifiers(h=>ae.value=!1,["self"])),onMouseleave:v[3]||(v[3]=h=>ae.value=!1),onGenerarReporte:E,onRenombrar:t,onEditar:x,onDuplicar:u,onEliminar:e,onToggleAutogen:b},null,8,["can-edit"])):m.createCommentVNode("",!0),ae.value?(m.openBlock(),m.createElementBlock("div",{key:2,class:"tooltip-overlay",onClick:v[4]||(v[4]=h=>ae.value=!1)})):m.createCommentVNode("",!0)]))}},[["__scopeId","data-v-06712795"]]),rse={class:"modal-overlay"},nse={class:"modal-content"},ase={class:"modal-body"},ise={class:"radio-group"},ose=["disabled"],sse={key:0,class:"error-message"},lse={class:"modal-footer"},cse=["disabled"],use=["disabled"],dse=["disabled"],hse={key:0,class:"loading-spinner"},pse={key:1},C4=xs({__name:"ModalCreateTemplate",props:{token:{type:String,required:!0},team:{type:Number,required:!0}},emits:["close","template-created","open-modal-new-template"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(1),N=m.ref("pre"),E=m.ref(""),t=m.ref(!1),x=m.ref(""),u=async()=>{var e;if(!(E.value.trim().length<3)){t.value=!0,x.value="";try{const b={name:E.value.trim(),team_id:A.team,template_type:N.value==="pre"?1:2};console.log("toke mostrado es: ",A.token);const v=await Qi.create({headers:{Authorization:`${A.token}`}}).post("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates",b);console.log("response.data",v.data),j("template-created",v.data),j("open-modal-new-template",(e=v.data)==null?void 0:e.data),j("close")}catch(b){console.error("Error al guardar template:",b),b.response&&b.response.status===409&&(x.value="Ya existe un template con el mismo nombre")}finally{t.value=!1}}};return m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""}),(e,b)=>(m.openBlock(),m.createElementBlock("div",rse,[m.createElementVNode("div",nse,[m.createElementVNode("button",{class:"close-btn",onClick:b[0]||(b[0]=f=>e.$emit("close"))},b[6]||(b[6]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),b[11]||(b[11]=m.createElementVNode("div",{class:"modal-header"},[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-editar-withe.svg",class:"icon-title",alt:"icon"}),m.createElementVNode("span",{class:"modal-title"},"Crear Template")],-1)),b[12]||(b[12]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",ase,[ae.value===1?(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[b[9]||(b[9]=m.createElementVNode("div",{class:"modal-label"},"Define el tipo de análisis para tu template:",-1)),m.createElementVNode("div",ise,[m.createElementVNode("label",{class:m.normalizeClass(["radio-label",{selected:N.value==="pre"}])},[m.withDirectives(m.createElementVNode("input",{type:"radio",value:"pre","onUpdate:modelValue":b[1]||(b[1]=f=>N.value=f)},null,512),[[m.vModelRadio,N.value]]),b[7]||(b[7]=m.createTextVNode(" Prepartido ",-1))],2),m.createElementVNode("label",{class:m.normalizeClass(["radio-label",{selected:N.value==="post"}])},[m.withDirectives(m.createElementVNode("input",{type:"radio",value:"post","onUpdate:modelValue":b[2]||(b[2]=f=>N.value=f)},null,512),[[m.vModelRadio,N.value]]),b[8]||(b[8]=m.createTextVNode(" Postpartido ",-1))],2)])],64)):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[b[10]||(b[10]=m.createElementVNode("div",{class:"modal-label"},"Agrega un nombre a tu template:",-1)),m.withDirectives(m.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":b[3]||(b[3]=f=>E.value=f),placeholder:"Untitled",maxlength:"40",autocomplete:"off",disabled:t.value},null,8,ose),[[m.vModelText,E.value]]),x.value?(m.openBlock(),m.createElementBlock("div",sse,m.toDisplayString(x.value),1)):m.createCommentVNode("",!0)],64))]),b[13]||(b[13]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",lse,[m.createElementVNode("button",{class:"cancel-btn",onClick:b[4]||(b[4]=f=>e.$emit("close")),disabled:t.value},"Cancelar",8,cse),ae.value===1?(m.openBlock(),m.createElementBlock("button",{key:0,class:"next-btn",disabled:!N.value,onClick:b[5]||(b[5]=f=>ae.value=2)}," Siguiente ",8,use)):(m.openBlock(),m.createElementBlock("button",{key:1,class:"next-btn",disabled:E.value.trim().length<3||t.value,onClick:u},[t.value?(m.openBlock(),m.createElementBlock("div",hse)):(m.openBlock(),m.createElementBlock("span",pse,"Guardar"))],8,dse))])])]))}},[["__scopeId","data-v-7e85c356"]]),fse={class:"modal-overlay"},mse={class:"modal-content"},gse={class:"modal-body"},yse={key:0,class:"error-message-container"},vse={key:1},bse={class:"modal-group"},xse={key:0,class:"placeholder"},_se={key:0,class:"placeholder"},wse={key:1},kse={key:0,class:"custom-select-dropdown"},Tse=["onMousedown"],Sse={class:"modal-row"},Ase={class:"modal-group"},Ese={key:0,class:"placeholder"},Cse={key:0,class:"placeholder"},Mse={key:1},Pse={key:0,class:"custom-select-dropdown"},Lse=["onMousedown"],zse={class:"modal-group"},Nse={key:0,class:"placeholder"},Ose={key:0,class:"placeholder"},Rse={key:1},Dse={key:0,class:"custom-select-dropdown"},Ise=["onMousedown"],Fse={class:"modal-group"},Vse={key:0,class:"placeholder"},Bse={key:0,class:"placeholder"},Use=["src"],jse=["src"],qse={key:0,class:"custom-select-dropdown"},Wse=["onMousedown"],Gse=["src"],Hse=["src"],Xse={key:0,class:"header-separator"},Kse={key:1,class:"modal-footer"},Jse=["disabled"],$se={key:0,class:"loading-spinner select-spinner"},Zse=xs({__name:"ModalGenerarReporte",props:{userId:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0},templateType:{type:String,required:!1}},emits:["close","generar","switch-to-reports"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref([]),N=m.ref([]),E=m.ref([]),t=m.ref([]),x=m.ref(""),u=m.ref(""),e=m.ref(""),b=m.ref(null),f=Qi.create({headers:{Authorization:A.token}}),v=m.ref(!1),h=m.ref(!1),r=m.ref(!1),n=m.ref(!1),c=m.ref(!1),o=m.ref([]),l=m.ref([]),p=m.ref(!1),g=m.ref(!1),w=m.ref(!1);function S(q){x.value=q,p.value=!1,P()}function T(q){u.value=q,g.value=!1,C()}function M(q){e.value=q,w.value=!1,z()}async function L(){try{h.value=!0;const q=await Qi.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments");q.data&&Array.isArray(q.data)&&(o.value=q.data,ae.value=q.data.map($=>$.tournament).sort(($,te)=>$.order&&te.order?$.order-te.order:$.order&&!te.order?-1:!$.order&&te.order?1:0),x.value="",N.value=[],u.value="",E.value=[],e.value="",t.value=[],b.value=null)}catch(q){console.error("Error al cargar torneos:",q),ae.value=[{name:"Concacaf Copa Oro"},{name:"Liga MX"},{name:"MLS"}],N.value=[],E.value=[],x.value="",u.value="",e.value="",b.value=null}finally{h.value=!1}}function k(q){const $=o.value.find(te=>te.tournament&&te.tournament.name===q.name);$&&Array.isArray($.seasons)?(N.value=$.seasons,u.value="",E.value=[],e.value="",t.value=[],b.value=null):(N.value=[],u.value="",E.value=[],e.value="",t.value=[],b.value=null)}function P(){u.value="",e.value="",b.value=null,x.value?k(x.value):(N.value=[],E.value=[],t.value=[])}function C(){if(n.value=!0,e.value="",b.value=null,E.value=[],t.value=[],u.value&&u.value.id){const q=[u.value.id];if(u.value.related_seasons&&Array.isArray(u.value.related_seasons)){const $=u.value.related_seasons.map(te=>te.id).filter(Boolean);q.push(...$),console.log("relatedIds",$)}_(q)}setTimeout(()=>{n.value=!1},400)}async function _(q){r.value=!0;try{const $=Array.isArray(q)?q.join("&seasons="):q,te=await f.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons=${$}`);if(console.log("response.data:: 2",te.data),te.data.data&&Array.isArray(te.data.data)){console.log("response.data:: 4ddd",te.data.data);const X=te.data.data.reduce((J,Z)=>Z.games&&Array.isArray(Z.games)?J.concat(Z.games):J,[]);console.log("Todos los partidos unidos:",X),l.value=X.map(J=>({label:J.label||`${J.home_team_acronym||"Local"} vs ${J.visiting_team_acronym||"Visitante"}`,localLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+J.home_team+".png"||"",visitanteLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+J.visiting_team+".png"||"",...J}));let re=l.value;A.templateType==="2"||A.templateType===2?re=re.filter(J=>J.game_status===1):(A.templateType==="1"||A.templateType===1)&&(re=re.filter(J=>J.game_status===4));const ee=[...new Set(re.map(J=>J.matchday_id).filter(Boolean))];E.value=ee.map(J=>{const Z=l.value.find(ce=>ce.matchday_id&&ce.matchday_id===J);return{id:J,name:Z.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta")}}).sort((J,Z)=>{const ce=J.name.startsWith("Jornada"),de=Z.name.startsWith("Jornada");return ce&&de?J.id-Z.id:ce&&!de?-1:!ce&&de?1:0}),console.log("jornadas: ",E),e.value="",t.value=[],b.value=null}else l.value=[],E.value=[],e.value="",t.value=[],b.value=null}catch($){console.error("Error al cargar partidos:",$),l.value=[],E.value=[],e.value="",t.value=[],b.value=null}finally{r.value=!1}}function z(){b.value=null,t.value=[],e.value&&e.value.id&&y(e.value)}function y(q){if(!q||!q.id){t.value=[];return}let $=l.value.filter(te=>te.matchday_id===q.id);A.templateType==="2"||A.templateType===2?$=$.filter(te=>te.game_status===1):(A.templateType==="1"||A.templateType===1)&&($=$.filter(te=>te.game_status===4)),t.value=$}async function O(){try{h.value=!0;let q="";u.value&&u.value.name&&(q=u.value.name);const $={template_id:A.templateId,user_id:parseInt(A.userId),tournament_id:x.value.id||1,tournament_name:x.value.name,season_id:b.value.season_id,season_name:q,game_id:b.value.id||b.value.game_id},te=await Qi.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/reports`,$,{headers:{Authorization:A.token,"Content-Type":"application/json"}});console.log("Reporte generado exitosamente:",te.data),j("generar",{liga:x.value,torneo:u.value,jornada:e.value,partido:b.value,reportData:te.data}),j("switch-to-reports"),j("close")}catch(q){console.error("Error al generar el reporte:",q),q.response&&q.response.status===409?c.value=!0:alert("Error al generar el reporte. Por favor, intenta de nuevo.")}finally{h.value=!1}}function I(q){b.value=q,v.value=!1}function V(){document.body.style.overflow="hidden"}function U(){document.body.style.overflow=""}m.onMounted(()=>{L(),V()}),m.onUnmounted(()=>{U()});function W(){c.value=!1,U(),j("close")}return(q,$)=>(m.openBlock(),m.createElementBlock("div",fse,[m.createElementVNode("div",mse,[m.createElementVNode("button",{class:"close-btn",onClick:$[0]||($[0]=te=>q.$emit("close"))},$[10]||($[10]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),$[24]||($[24]=m.createElementVNode("div",{class:"modal-header"},[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report-white.svg",class:"icon-title",alt:"icono reporte blanco"}),m.createElementVNode("span",{class:"modal-title"},"Generar reporte")],-1)),$[25]||($[25]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",gse,[c.value?(m.openBlock(),m.createElementBlock("div",yse,[$[11]||($[11]=m.createElementVNode("p",{class:"error-text"},[m.createTextVNode(" Este reporte ya fue generado previamente"),m.createElementVNode("br"),m.createTextVNode(" con este template para el partido seleccionado. ")],-1)),m.createElementVNode("button",{class:"accept-btn",onClick:W},"Aceptar")])):(m.openBlock(),m.createElementBlock("div",vse,[m.createElementVNode("div",bse,[$[14]||($[14]=m.createElementVNode("label",null,"1. Elige la liga",-1)),m.createElementVNode("div",{class:"select-wrapper custom-dropdown liga-select",tabindex:"0",onClick:$[1]||($[1]=te=>p.value=!p.value),onBlur:$[2]||($[2]=te=>p.value=!1)},[m.createElementVNode("div",{class:m.normalizeClass(["custom-select-display",{disabled:h.value||ae.value.length===0}])},[h.value?(m.openBlock(),m.createElementBlock("span",xse,$[12]||($[12]=[m.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),m.createTextVNode("Cargando ligas...",-1)]))):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[x.value?(m.openBlock(),m.createElementBlock("span",wse,m.toDisplayString(x.value.name),1)):(m.openBlock(),m.createElementBlock("span",_se,"Selecciona la liga"))],64)),m.createElementVNode("span",{class:m.normalizeClass(["select-chevron",{open:p.value}])},$[13]||($[13]=[m.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),p.value&&ae.value.length>0?(m.openBlock(),m.createElementBlock("div",kse,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(ae.value,te=>(m.openBlock(),m.createElementBlock("div",{key:te.name,class:"custom-select-option",onMousedown:m.withModifiers(X=>S(te),["prevent"])},m.toDisplayString(te.name),41,Tse))),128))])):m.createCommentVNode("",!0)],32)]),m.createElementVNode("div",Sse,[m.createElementVNode("div",Ase,[$[17]||($[17]=m.createElementVNode("label",null,"2. Elige el torneo",-1)),m.createElementVNode("div",{class:"select-wrapper custom-dropdown torneo-select",tabindex:"0",onClick:$[3]||($[3]=te=>g.value=!g.value),onBlur:$[4]||($[4]=te=>g.value=!1)},[m.createElementVNode("div",{class:m.normalizeClass(["custom-select-display",{disabled:!x.value||N.value.length===0||h.value}])},[h.value?(m.openBlock(),m.createElementBlock("span",Ese,$[15]||($[15]=[m.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),m.createTextVNode("Cargando torneos...",-1)]))):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[u.value?(m.openBlock(),m.createElementBlock("span",Mse,m.toDisplayString(u.value.name),1)):(m.openBlock(),m.createElementBlock("span",Cse,"Elige el torneo"))],64)),m.createElementVNode("span",{class:m.normalizeClass(["select-chevron",{open:g.value}])},$[16]||($[16]=[m.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),g.value&&N.value.length>0&&x.value?(m.openBlock(),m.createElementBlock("div",Pse,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(N.value,te=>(m.openBlock(),m.createElementBlock("div",{key:te.id,class:"custom-select-option",onMousedown:m.withModifiers(X=>T(te),["prevent"])},m.toDisplayString(te.name),41,Lse))),128))])):m.createCommentVNode("",!0)],32)]),m.createElementVNode("div",zse,[$[20]||($[20]=m.createElementVNode("label",null,"3. Elige la jornada",-1)),m.createElementVNode("div",{class:"select-wrapper custom-dropdown jornada-select",tabindex:"0",onClick:$[5]||($[5]=te=>w.value=!w.value),onBlur:$[6]||($[6]=te=>w.value=!1)},[m.createElementVNode("div",{class:m.normalizeClass(["custom-select-display",{disabled:!u.value||E.value.length===0||n.value}])},[n.value?(m.openBlock(),m.createElementBlock("span",Nse,$[18]||($[18]=[m.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),m.createTextVNode("Cargando jornadas...",-1)]))):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[e.value?(m.openBlock(),m.createElementBlock("span",Rse,m.toDisplayString(e.value.name),1)):(m.openBlock(),m.createElementBlock("span",Ose,"Elige la jornada"))],64)),m.createElementVNode("span",{class:m.normalizeClass(["select-chevron",{open:w.value}])},$[19]||($[19]=[m.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),w.value&&E.value.length>0&&u.value?(m.openBlock(),m.createElementBlock("div",Dse,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(E.value,te=>(m.openBlock(),m.createElementBlock("div",{key:te.id,class:"custom-select-option",onMousedown:m.withModifiers(X=>M(te),["prevent"])},m.toDisplayString(te.name),41,Ise))),128))])):m.createCommentVNode("",!0)],32)])]),m.createElementVNode("div",Fse,[$[23]||($[23]=m.createElementVNode("label",null,"4. Elige el partido",-1)),m.createElementVNode("div",{class:"select-wrapper partido-select",tabindex:"0",onClick:$[7]||($[7]=te=>v.value=!v.value),onBlur:$[8]||($[8]=te=>v.value=!1)},[m.createElementVNode("div",{class:m.normalizeClass(["custom-select-display",{disabled:!e.value||r.value}])},[r.value?(m.openBlock(),m.createElementBlock("span",Vse,$[21]||($[21]=[m.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),m.createTextVNode("Cargando partidos...",-1)]))):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[b.value?(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[b.value.localLogo?(m.openBlock(),m.createElementBlock("img",{key:0,src:b.value.localLogo,class:"logo-equipo",alt:"local"},null,8,Use)):m.createCommentVNode("",!0),m.createElementVNode("span",null,m.toDisplayString(b.value.label),1),b.value.visitanteLogo?(m.openBlock(),m.createElementBlock("img",{key:1,src:b.value.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,jse)):m.createCommentVNode("",!0)],64)):(m.openBlock(),m.createElementBlock("span",Bse,"Selecciona el partido"))],64)),m.createElementVNode("span",{class:m.normalizeClass(["select-chevron",{open:v.value}])},$[22]||($[22]=[m.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),v.value&&!r.value&&e.value?(m.openBlock(),m.createElementBlock("div",qse,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(t.value,te=>(m.openBlock(),m.createElementBlock("div",{key:te.label,class:"custom-select-option",onMousedown:m.withModifiers(X=>I(te),["prevent"])},[m.createElementVNode("img",{src:te.localLogo,class:"logo-equipo",alt:"local"},null,8,Gse),m.createElementVNode("span",null,m.toDisplayString(te.label),1),m.createElementVNode("img",{src:te.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,Hse)],40,Wse))),128))])):m.createCommentVNode("",!0)],32)])]))]),c.value?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",Xse)),c.value?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",Kse,[m.createElementVNode("button",{class:"cancel-btn",onClick:$[9]||($[9]=te=>q.$emit("close"))},"Cancelar"),m.createElementVNode("button",{class:"next-btn",disabled:!x.value||!u.value||!e.value||!b.value||h.value,onClick:O},[h.value?(m.openBlock(),m.createElementBlock("span",$se)):m.createCommentVNode("",!0),m.createTextVNode(" "+m.toDisplayString(h.value?"Generando...":"Generar"),1)],8,Jse)]))])]))}},[["__scopeId","data-v-d86b1497"]]),Yse={class:"modal-overlay"},Qse={class:"modal-content"},ele={class:"modal-body"},tle=["placeholder","disabled"],rle={key:0,class:"error-message"},nle={class:"modal-footer"},ale=["disabled"],ile=["disabled"],ole={key:0},sle={key:1},lle=xs({__name:"ModalRenameTemplate",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","rename","refresh"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(A.initialName),N=m.ref(!1),E=m.ref("");m.watch(()=>A.initialName,x=>{ae.value=x,E.value=""}),m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""});async function t(){var x;if(console.log("acceptRename"),!(ae.value.trim().length<3)){console.log("acceptRename 22"),N.value=!0,E.value="";try{await Qi.put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/templates/${A.templateId}/general`,{name:ae.value.trim()},{headers:{Authorization:`${A.token}`,"Content-Type":"application/json"}}),j("rename",ae.value.trim()),j("refresh"),j("close")}catch(u){console.error("Error al renombrar el template:",u),((x=u.response)==null?void 0:x.status)===409?E.value="Ya existe un template con el mismo nombre":E.value="Error al renombrar el template. Inténtalo de nuevo."}finally{N.value=!1}}}return(x,u)=>(m.openBlock(),m.createElementBlock("div",Yse,[m.createElementVNode("div",Qse,[m.createElementVNode("button",{class:"close-btn",onClick:u[0]||(u[0]=e=>x.$emit("close"))},u[3]||(u[3]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),u[5]||(u[5]=m.createElementVNode("div",{class:"modal-header"},[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),m.createElementVNode("span",{class:"modal-title"},"Renombrar Template")],-1)),u[6]||(u[6]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",ele,[u[4]||(u[4]=m.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),m.withDirectives(m.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":u[1]||(u[1]=e=>ae.value=e),placeholder:a.initialName,maxlength:"40",autocomplete:"off",disabled:N.value},null,8,tle),[[m.vModelText,ae.value]]),E.value?(m.openBlock(),m.createElementBlock("div",rle,m.toDisplayString(E.value),1)):m.createCommentVNode("",!0)]),u[7]||(u[7]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",nle,[m.createElementVNode("button",{class:"cancel-btn",onClick:u[2]||(u[2]=e=>x.$emit("close")),disabled:N.value},"Cancelar",8,ale),m.createElementVNode("button",{class:"next-btn",disabled:ae.value.trim().length<3||N.value,onClick:t},[N.value?(m.openBlock(),m.createElementBlock("span",ole,"Guardando...")):(m.openBlock(),m.createElementBlock("span",sle,"Guardar"))],8,ile)])])]))}},[["__scopeId","data-v-95975b9e"]]),cle={class:"modal-overlay"},ule={class:"modal-content"},dle={class:"modal-body"},hle=["placeholder"],ple={class:"modal-footer"},fle=["disabled"],mle=xs({__name:"ModalduplicateTemplate",props:{initialName:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","duplicate","template-duplicated"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(A.initialName+" copy"),N=m.ref(!1);m.watch(()=>A.initialName,t=>{ae.value=t+" copy"}),m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""});async function E(){if(ae.value.trim().length>=3&&!N.value){N.value=!0;try{const t=await Qi.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/${A.templateId}/duplicate`,{name:ae.value.trim()},{headers:{Authorization:`${A.token}`,"Content-Type":"application/json"}});j("template-duplicated",{originalTemplateId:A.templateId,newTemplateName:ae.value.trim(),responseData:t.data}),j("close")}catch(t){console.error("Error al duplicar template:",t),alert("Error al duplicar el template. Por favor, intenta de nuevo.")}finally{N.value=!1}}}return(t,x)=>(m.openBlock(),m.createElementBlock("div",cle,[m.createElementVNode("div",ule,[m.createElementVNode("button",{class:"close-btn",onClick:x[0]||(x[0]=u=>t.$emit("close"))},x[3]||(x[3]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),x[5]||(x[5]=m.createElementVNode("div",{class:"modal-header"},[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate-white.svg",class:"icon-title",alt:"icon"}),m.createElementVNode("span",{class:"modal-title"},"Duplicar template")],-1)),x[6]||(x[6]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",dle,[x[4]||(x[4]=m.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),m.withDirectives(m.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":x[1]||(x[1]=u=>ae.value=u),placeholder:a.initialName,maxlength:"40",autocomplete:"off"},null,8,hle),[[m.vModelText,ae.value]])]),x[7]||(x[7]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",ple,[m.createElementVNode("button",{class:"cancel-btn",onClick:x[2]||(x[2]=u=>t.$emit("close"))},"Cancelar"),m.createElementVNode("button",{class:"next-btn",disabled:ae.value.trim().length<3||N.value,onClick:E},m.toDisplayString(N.value?"Duplicando...":"Aceptar"),9,fle)])])]))}},[["__scopeId","data-v-98cd9dcd"]]),gle={class:"modal-overlay"},yle={class:"modal-content"},vle={class:"modal-footer"},ble=["disabled"],xle=xs({__name:"ModalDeleteTemplate",props:{templateId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","templateDeleted"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(!1);m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""});const N=async()=>{try{ae.value=!0;const t=await Qi.create({headers:{Authorization:`${A.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/templates/${A.templateId}`);(t.status===200||t.status===204)&&(j("templateDeleted",A.templateId),j("close"))}catch(E){console.error("Error al eliminar template:",E),alert("Error al eliminar el template. Por favor, inténtalo de nuevo.")}finally{ae.value=!1}};return(E,t)=>(m.openBlock(),m.createElementBlock("div",gle,[m.createElementVNode("div",yle,[m.createElementVNode("button",{class:"close-btn",onClick:t[0]||(t[0]=x=>E.$emit("close"))},t[2]||(t[2]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),t[3]||(t[3]=m.createStaticVNode('<div class="modal-header" data-v-65422842><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-65422842><span class="modal-title" data-v-65422842>Eliminar template</span></div><div class="header-separator" data-v-65422842></div><div class="modal-body confirm-text" data-v-65422842> ¿Estás seguro que deseas eliminar<br data-v-65422842> este template? Si lo haces no habrá manera<br data-v-65422842> de recuperarlo. </div><div class="header-separator" data-v-65422842></div>',4)),m.createElementVNode("div",vle,[m.createElementVNode("button",{class:"cancel-btn",onClick:t[1]||(t[1]=x=>E.$emit("close"))},"Cancelar"),m.createElementVNode("button",{class:"delete-btn",onClick:N,disabled:ae.value},m.toDisplayString(ae.value?"Eliminando...":"Eliminar"),9,ble)])])]))}},[["__scopeId","data-v-65422842"]]),_le={class:"templates-header"},wle={class:"count"},kle={key:0,class:"sort-options"},Tle=["onClick"],Sle={key:0,class:"checkmark"},Ale={key:0,class:"loading-state"},Ele=xs({__name:"TemplatesSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["switch-to-reports","open-modal-new-template","edit-template"],setup(a,{emit:d}){const A=d,j=a,ae=m.ref(!1),N=m.ref(null),E=m.ref(!1),t=m.ref(!1),x=m.ref(!1),u=m.ref(!1),e=m.ref(!1),b=m.ref(""),f=m.ref(""),v=m.ref(""),h=m.ref(""),r=m.ref(""),n=m.ref(""),c=m.ref(""),o=m.ref(""),l=m.ref(""),p=m.ref(null),g=m.ref(null),w=m.ref(null),S=m.ref(0),T=m.ref([]),M=m.ref(!1),L=m.ref(null);m.watch([()=>j.team,()=>j.token],()=>{j.team&&j.token&&P()},{immediate:!1});const k=[{label:"A - Z",value:"name-asc"},{label:"Más recientes",value:"date-desc"}],P=async()=>{try{M.value=!0,L.value=null;const $=await Qi.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/teams/${j.team}`,{headers:{Authorization:`${j.token}`,"Content-Type":"application/json"}});$.data&&Array.isArray($.data)?T.value=$.data:$.data&&$.data.templates?T.value=$.data.templates:$.data&&$.data.data?T.value=$.data.data:T.value=[]}catch($){console.error("Error al obtener templates:",$),console.error("Error response:",$.response),L.value=$.message||"Error al cargar los templates",T.value=[]}finally{M.value=!1}},C=m.computed(()=>{if(!T.value.length)return[];let $=[...T.value];if(j.searchQuery.trim()){const te=j.searchQuery.toLowerCase().trim();$=$.filter(X=>X.name.toLowerCase().includes(te))}switch(N.value){case"name-asc":return $.sort((te,X)=>te.name.localeCompare(X.name));case"date-desc":return $.sort((te,X)=>new Date(X.created_at)-new Date(te.created_at));default:return $}}),_=m.computed(()=>{if(!S.value)return"grid-1-column";const $=340,te=20,re=S.value-40,ee=Math.floor((re+te)/($+te)),J=Math.max(1,ee);return J>=4?"grid-4-columns":J>=3?"grid-3-columns":J>=2?"grid-2-columns":"grid-1-column"}),z=()=>{ae.value=!ae.value},y=$=>{N.value=$,ae.value=!1},O=$=>{const te=k.find(X=>X.value===$);return te?te.label:null},I=$=>{ae.value&&p.value&&!p.value.contains($.target)&&(ae.value=!1)},V=()=>{g.value&&(S.value=g.value.offsetWidth)};function U($){A("edit-template",$)}let W=null;m.onMounted(async()=>{document.addEventListener("mousedown",I),await m.nextTick(),V(),window.ResizeObserver?(W=new ResizeObserver(()=>{V()}),g.value&&W.observe(g.value)):window.addEventListener("resize",V),P()});function q($){console.log("onOpenModalNewTemplate template section, called with data:",$),A("open-modal-new-template",$)}return m.onBeforeUnmount(()=>{document.removeEventListener("mousedown",I),W?W.disconnect():window.removeEventListener("resize",V)}),($,te)=>(m.openBlock(),m.createElementBlock("div",{class:"templates-section",ref_key:"templatesSectionRef",ref:g},[m.createElementVNode("div",_le,[m.createElementVNode("span",null,[te[11]||(te[11]=m.createTextVNode("Templates ",-1)),m.createElementVNode("span",wle,"("+m.toDisplayString(C.value.length)+")",1)]),m.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:p},[m.createElementVNode("button",{class:"sort-button",onClick:z},[m.createTextVNode(m.toDisplayString(O(N.value)||"Ordenar")+" ",1),m.createElementVNode("span",{class:m.normalizeClass(["dropdown-arrow",{rotated:ae.value}])},null,2)]),ae.value?(m.openBlock(),m.createElementBlock("div",kle,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(k,X=>m.createElementVNode("div",{key:X.value,class:m.normalizeClass(["sort-option",{selected:N.value===X.value}]),onClick:re=>y(X.value)},[m.createElementVNode("span",null,m.toDisplayString(X.label),1),N.value===X.value?(m.openBlock(),m.createElementBlock("span",Sle,te[12]||(te[12]=[m.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):m.createCommentVNode("",!0)],10,Tle)),64))])):m.createCommentVNode("",!0)],512)]),M.value?(m.openBlock(),m.createElementBlock("div",Ale,te[13]||(te[13]=[m.createElementVNode("div",{class:"loading-spinner"},null,-1),m.createElementVNode("p",null,"Cargando templates...",-1)]))):(m.openBlock(),m.createElementBlock("div",{key:1,class:m.normalizeClass(["templates-list",_.value]),ref_key:"templatesListRef",ref:w},[m.createElementVNode("div",{class:"template-card create",onClick:te[0]||(te[0]=X=>E.value=!0)},te[14]||(te[14]=[m.createElementVNode("div",{class:"inner-card"},[m.createElementVNode("div",{class:"plus"},[m.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-add@3x.png",alt:"Agregar"})]),m.createElementVNode("div",{class:"create-text"},"Crear Template")],-1)])),(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(C.value,X=>(m.openBlock(),m.createBlock(tse,{key:X.id,template:X,"user-id":a.userId,onGenerarReporte:re=>{c.value=X.id,l.value=X.template_type,t.value=!0},onRenombrar:re=>{o.value=X.id,b.value=re,f.value=X.template_type,x.value=!0},onDuplicar:re=>{n.value=X.id,v.value=re,u.value=!0},onEliminar:re=>{h.value=re.name,r.value=re.id,e.value=!0},onEditTemplate:U},null,8,["template","user-id","onGenerarReporte","onRenombrar","onDuplicar","onEliminar"]))),128))],2)),E.value?(m.openBlock(),m.createBlock(C4,{key:2,token:a.token,team:a.team,onClose:te[1]||(te[1]=X=>E.value=!1),onOpenModalNewTemplate:q},null,8,["token","team"])):m.createCommentVNode("",!0),t.value?(m.openBlock(),m.createBlock(Zse,{key:3,"user-id":a.userId,token:a.token,"template-id":c.value,"template-type":l.value,onClose:te[2]||(te[2]=X=>t.value=!1),onSwitchToReports:te[3]||(te[3]=X=>$.$emit("switch-to-reports"))},null,8,["user-id","token","template-id","template-type"])):m.createCommentVNode("",!0),x.value?(m.openBlock(),m.createBlock(lle,{key:4,initialName:b.value,token:a.token,"template-id":o.value,"template-type":f.value,"user-id":a.userId,onRefresh:te[4]||(te[4]=X=>P()),onClose:te[5]||(te[5]=X=>x.value=!1),onRename:te[6]||(te[6]=X=>{x.value=!1})},null,8,["initialName","token","template-id","template-type","user-id"])):m.createCommentVNode("",!0),u.value?(m.openBlock(),m.createBlock(mle,{key:5,initialName:v.value,token:a.token,"template-id":n.value,onClose:te[7]||(te[7]=X=>u.value=!1),onTemplateDuplicated:te[8]||(te[8]=X=>{u.value=!1,P()})},null,8,["initialName","token","template-id"])):m.createCommentVNode("",!0),e.value?(m.openBlock(),m.createBlock(xle,{key:6,"template-id":r.value,"user-id":a.userId,token:a.token,onClose:te[9]||(te[9]=X=>e.value=!1),onTemplateDeleted:te[10]||(te[10]=X=>{e.value=!1,P()})},null,8,["template-id","user-id","token"])):m.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-0e242605"]]),Cle={class:"tooltip-report-options"},Mle=xs({__name:"TooltipReportOptions",emits:["ver-reporte","renombrar","editar","duplicar","descargar","eliminar"],setup(a,{emit:d}){return(A,j)=>(m.openBlock(),m.createElementBlock("div",Cle,[m.createElementVNode("ul",null,[m.createElementVNode("li",{class:"option",onClick:j[0]||(j[0]=ae=>A.$emit("renombrar"))},j[3]||(j[3]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar reporte",class:"icon"},null,-1),m.createTextVNode(" Renombrar reporte ",-1)])),m.createElementVNode("li",{class:"option",onClick:j[1]||(j[1]=ae=>A.$emit("descargar"))},j[4]||(j[4]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-download.svg",alt:"Descargar reporte",class:"icon"},null,-1),m.createTextVNode(" Descargar reporte ",-1)])),m.createElementVNode("li",{class:"option",onClick:j[2]||(j[2]=ae=>A.$emit("eliminar"))},j[5]||(j[5]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar reporte",class:"icon"},null,-1),m.createTextVNode(" Eliminar reporte ",-1)]))])]))}},[["__scopeId","data-v-d17eb1eb"]]);function Pd(a){if(!a)return"";const d=new Date(a);if(isNaN(d.getTime()))return"";const A=d.getDate(),j=d.toLocaleDateString("es-ES",{month:"short"}),ae=d.getFullYear();return`${A} ${j}, ${ae}`}const Ple={class:"prematch-bg"},Lle={class:"subtitle"},zle={class:"jornada"},Nle={class:"fecha"},Ole={class:"teams-row"},Rle={class:"team team-local"},Dle={class:"escudo-svg"},Ile=["src"],Fle={class:"team-name"},Vle={class:"team team-visitor"},Ble={class:"escudo-svg"},Ule=["src"],jle={class:"team-name"},qle=xs({__name:"AnalisisPrematchType1",props:{report:{type:Object,default:()=>({})}},setup(a){function d(j){return j?j.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;return(j,ae)=>(m.openBlock(),m.createElementBlock("div",Ple,[ae[0]||(ae[0]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),m.createElementVNode("div",Lle,[m.createElementVNode("span",zle,m.toDisplayString(d(A.report.game.matchday_name)),1),m.createElementVNode("span",Nle," - "+m.toDisplayString(m.unref(Pd)(A.report.game.date_time_utc)),1)]),m.createElementVNode("div",Ole,[m.createElementVNode("div",Rle,[m.createElementVNode("span",Dle,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.home_team+".png"},null,8,Ile)]),m.createElementVNode("span",Fle,m.toDisplayString(A.report.game.home_team_acronym),1)]),m.createElementVNode("div",Vle,[m.createElementVNode("span",Ble,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.visiting_team+".png"},null,8,Ule)]),m.createElementVNode("span",jle,m.toDisplayString(A.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-0c222d1b"]]),Wle={class:"prematch-bg"},Gle={class:"background-shields"},Hle={class:"shield-left"},Xle=["src"],Kle={class:"shield-right"},Jle=["src"],$le={class:"subtitle"},Zle={class:"jornada"},Yle={class:"fecha"},Qle={class:"teams-grid"},ece={class:"row row-top"},tce={class:"team team-local"},rce={class:"escudo-svg"},nce=["src"],ace={class:"team-name"},ice={class:"score"},oce={class:"score-text"},sce={class:"team team-visitor"},lce={class:"team-name"},cce={class:"escudo-svg"},uce=["src"],dce={class:"row row-bottom"},hce={class:"team-stats"},pce={class:"stat red"},fce={class:"stat-number"},mce={class:"stat yellow"},gce={class:"stat-number"},yce={class:"team-stats"},vce={class:"stat-number"},bce={class:"stat-number"},xce=xs({__name:"AnalisisPostMatchType1",props:{report:{type:Object,default:()=>({})}},setup(a){function d(u){return u?u.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a,j=m.computed(()=>{var b,f,v;const u=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.minutes)==null?void 0:v.home_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const e=u.map(h=>{const r=h.match(/(\d+)'$/);return r?r[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),r=e.slice(5).join(", ");return`${h}
|
|
4082
4082
|
${r}`}return e.join(", ")}),ae=m.computed(()=>{var b,f,v;const u=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.minutes)==null?void 0:v.visiting_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const e=u.map(h=>{const r=h.match(/(\d+)'$/);return r?r[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),r=e.slice(5).join(", ");return`${h}
|
|
4083
|
-
${r}`}return e.join(", ")}),N=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.home_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),E=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.home_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),t=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.away_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),x=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.away_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null});return(u,e)=>(m.openBlock(),m.createElementBlock("div",Wle,[m.createElementVNode("div",Gle,[m.createElementVNode("div",Hle,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,Xle)]),m.createElementVNode("div",Kle,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Jle)])]),e[7]||(e[7]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),m.createElementVNode("div",$le,[m.createElementVNode("span",Zle,m.toDisplayString(d(a.report.game.matchday_name)),1),m.createElementVNode("span",Yle," - "+m.toDisplayString(m.unref(Pd)(a.report.game.date_time_utc)),1)]),m.createElementVNode("div",Qle,[m.createElementVNode("div",ece,[m.createElementVNode("div",tce,[m.createElementVNode("span",rce,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,nce)]),m.createElementVNode("span",ace,m.toDisplayString(a.report.game.home_team_acronym),1)]),m.createElementVNode("div",ice,[m.createElementVNode("span",oce,m.toDisplayString(a.report.game.score[0])+":"+m.toDisplayString(a.report.game.score[1]),1)]),m.createElementVNode("div",sce,[m.createElementVNode("span",lce,m.toDisplayString(a.report.game.visiting_team_acronym),1),m.createElementVNode("span",cce,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,uce)])])]),m.createElementVNode("div",dce,[m.createElementVNode("div",hce,[e[2]||(e[2]=m.createStaticVNode('<span class="stat ball" data-v-
|
|
4083
|
+
${r}`}return e.join(", ")}),N=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.home_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),E=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.home_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),t=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.away_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),x=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.away_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null});return(u,e)=>(m.openBlock(),m.createElementBlock("div",Wle,[m.createElementVNode("div",Gle,[m.createElementVNode("div",Hle,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,Xle)]),m.createElementVNode("div",Kle,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Jle)])]),e[7]||(e[7]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),m.createElementVNode("div",$le,[m.createElementVNode("span",Zle,m.toDisplayString(d(a.report.game.matchday_name)),1),m.createElementVNode("span",Yle," - "+m.toDisplayString(m.unref(Pd)(a.report.game.date_time_utc)),1)]),m.createElementVNode("div",Qle,[m.createElementVNode("div",ece,[m.createElementVNode("div",tce,[m.createElementVNode("span",rce,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,nce)]),m.createElementVNode("span",ace,m.toDisplayString(a.report.game.home_team_acronym),1)]),m.createElementVNode("div",ice,[m.createElementVNode("span",oce,m.toDisplayString(a.report.game.score[0])+":"+m.toDisplayString(a.report.game.score[1]),1)]),m.createElementVNode("div",sce,[m.createElementVNode("span",lce,m.toDisplayString(a.report.game.visiting_team_acronym),1),m.createElementVNode("span",cce,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,uce)])])]),m.createElementVNode("div",dce,[m.createElementVNode("div",hce,[e[2]||(e[2]=m.createStaticVNode('<span class="stat ball" data-v-7dd14646><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-7dd14646><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path></svg></span>',1)),j.value!==null?(m.openBlock(),m.createElementBlock("span",{key:0,class:m.normalizeClass(["stat time",{"two-lines":j.value&&j.value.includes(`
|
|
4084
4084
|
`)}])},m.toDisplayString(j.value),3)):m.createCommentVNode("",!0),m.createElementVNode("div",{class:m.normalizeClass(["separator",{"two-lines":j.value&&j.value.includes(`
|
|
4085
4085
|
`)}])},null,2),m.createElementVNode("span",pce,[e[0]||(e[0]=m.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})],-1)),m.createElementVNode("span",fce,m.toDisplayString(N.value||0),1)]),m.createElementVNode("span",mce,[e[1]||(e[1]=m.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})],-1)),m.createElementVNode("span",gce,m.toDisplayString(E.value||0),1)])]),e[6]||(e[6]=m.createElementVNode("div",{class:"empty"},null,-1)),m.createElementVNode("div",yce,[m.createElementVNode("span",vce,m.toDisplayString(t.value||0),1),e[3]||(e[3]=m.createElementVNode("span",{class:"stat yellow"},[m.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})])],-1)),m.createElementVNode("span",bce,m.toDisplayString(x.value||0),1),e[4]||(e[4]=m.createElementVNode("span",{class:"stat red"},[m.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})])],-1)),m.createElementVNode("div",{class:m.normalizeClass(["separator",{"two-lines":ae.value&&ae.value.includes(`
|
|
4086
4086
|
`)}])},null,2),ae.value!==null?(m.openBlock(),m.createElementBlock("span",{key:0,class:m.normalizeClass(["stat time",{"two-lines":ae.value&&ae.value.includes(`
|
|
4087
|
-
`)}])},m.toDisplayString(ae.value),3)):m.createCommentVNode("",!0),e[5]||(e[5]=m.createStaticVNode('<span class="stat ball" data-v-
|
|
4087
|
+
`)}])},m.toDisplayString(ae.value),3)):m.createCommentVNode("",!0),e[5]||(e[5]=m.createStaticVNode('<span class="stat ball" data-v-7dd14646><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-7dd14646><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path></svg></span>',1))])])])]))}},[["__scopeId","data-v-7dd14646"]]),_ce={class:"prematch-bg"},wce={class:"subtitle"},kce={class:"jornada"},Tce={class:"fecha"},Sce={class:"teams-row"},Ace={class:"team team-local"},Ece={class:"escudo-svg"},Cce=["src"],Mce={class:"team-name"},Pce={class:"team team-visitor"},Lce={class:"escudo-svg"},zce=["src"],Nce={class:"team-name"},Oce=xs({__name:"AnalisisPrematchType2",props:{report:{type:Object,default:()=>({})}},setup(a){function d(j){return j?j.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;return(j,ae)=>(m.openBlock(),m.createElementBlock("div",_ce,[ae[0]||(ae[0]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),m.createElementVNode("div",wce,[m.createElementVNode("span",kce,m.toDisplayString(d(A.report.game.matchday_name)),1),m.createElementVNode("span",Tce," - "+m.toDisplayString(m.unref(Pd)(A.report.game.date_time_utc)),1)]),m.createElementVNode("div",Sce,[m.createElementVNode("div",Ace,[m.createElementVNode("span",Ece,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.home_team+".png"},null,8,Cce)]),m.createElementVNode("span",Mce,m.toDisplayString(A.report.game.home_team_acronym),1)]),m.createElementVNode("div",Pce,[m.createElementVNode("span",Lce,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.visiting_team+".png"},null,8,zce)]),m.createElementVNode("span",Nce,m.toDisplayString(A.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-16777c2c"]]),Rce={class:"prematch-bg"},Dce={class:"background-shields"},Ice={class:"shield-left"},Fce=["src"],Vce={class:"shield-right"},Bce=["src"],Uce={class:"subtitle"},jce={class:"jornada"},qce={class:"fecha"},Wce={class:"teams-grid"},Gce={class:"row row-top"},Hce={class:"team team-local"},Xce={class:"escudo-svg"},Kce=["src"],Jce={class:"team-name"},$ce={class:"score"},Zce={class:"score-text"},Yce={class:"team team-visitor"},Qce={class:"team-name"},eue={class:"escudo-svg"},tue=["src"],rue={class:"row row-bottom"},nue={class:"team-stats"},aue={class:"stat red"},iue={class:"stat-number"},oue={class:"stat yellow"},sue={class:"stat-number"},lue={class:"team-stats"},cue={class:"stat-number"},uue={class:"stat-number"},due=xs({__name:"AnalisisPostMatchType2",props:{report:{type:Object,default:()=>({})}},setup(a){function d(u){return u?u.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a,j=m.computed(()=>{var b,f,v;const u=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.minutes)==null?void 0:v.home_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const e=u.map(h=>{const r=h.match(/(\d+)'$/);return r?r[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),r=e.slice(5).join(", ");return`${h}
|
|
4088
4088
|
${r}`}return e.join(", ")}),ae=m.computed(()=>{var b,f,v;const u=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.minutes)==null?void 0:v.visiting_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const e=u.map(h=>{const r=h.match(/(\d+)'$/);return r?r[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),r=e.slice(5).join(", ");return`${h}
|
|
4089
|
-
${r}`}return e.join(", ")}),N=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.home_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),E=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.home_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),t=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.away_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),x=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.away_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null});return(u,e)=>(m.openBlock(),m.createElementBlock("div",Rce,[m.createElementVNode("div",Dce,[m.createElementVNode("div",Ice,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,Fce)]),m.createElementVNode("div",Vce,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Bce)])]),e[7]||(e[7]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),m.createElementVNode("div",Uce,[m.createElementVNode("span",jce,"Jornada "+m.toDisplayString(d(a.report.game.matchday_name)),1),m.createElementVNode("span",qce," - "+m.toDisplayString(m.unref(Pd)(a.report.game.date_time_utc)),1)]),m.createElementVNode("div",Wce,[m.createElementVNode("div",Gce,[m.createElementVNode("div",Hce,[m.createElementVNode("span",Xce,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,Kce)]),m.createElementVNode("span",Jce,m.toDisplayString(a.report.game.home_team_acronym),1)]),m.createElementVNode("div",$ce,[m.createElementVNode("span",Zce,m.toDisplayString(a.report.game.score[0])+":"+m.toDisplayString(a.report.game.score[1]),1)]),m.createElementVNode("div",Yce,[m.createElementVNode("span",Qce,m.toDisplayString(a.report.game.visiting_team_acronym),1),m.createElementVNode("span",eue,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,tue)])])]),m.createElementVNode("div",rue,[m.createElementVNode("div",nue,[e[2]||(e[2]=m.createStaticVNode('<span class="stat ball" data-v-
|
|
4089
|
+
${r}`}return e.join(", ")}),N=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.home_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),E=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.home_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),t=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.away_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),x=m.computed(()=>{var e,b,f;const u=(f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.minutes)==null?void 0:f.away_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null});return(u,e)=>(m.openBlock(),m.createElementBlock("div",Rce,[m.createElementVNode("div",Dce,[m.createElementVNode("div",Ice,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,Fce)]),m.createElementVNode("div",Vce,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Bce)])]),e[7]||(e[7]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),m.createElementVNode("div",Uce,[m.createElementVNode("span",jce,"Jornada "+m.toDisplayString(d(a.report.game.matchday_name)),1),m.createElementVNode("span",qce," - "+m.toDisplayString(m.unref(Pd)(a.report.game.date_time_utc)),1)]),m.createElementVNode("div",Wce,[m.createElementVNode("div",Gce,[m.createElementVNode("div",Hce,[m.createElementVNode("span",Xce,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,Kce)]),m.createElementVNode("span",Jce,m.toDisplayString(a.report.game.home_team_acronym),1)]),m.createElementVNode("div",$ce,[m.createElementVNode("span",Zce,m.toDisplayString(a.report.game.score[0])+":"+m.toDisplayString(a.report.game.score[1]),1)]),m.createElementVNode("div",Yce,[m.createElementVNode("span",Qce,m.toDisplayString(a.report.game.visiting_team_acronym),1),m.createElementVNode("span",eue,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,tue)])])]),m.createElementVNode("div",rue,[m.createElementVNode("div",nue,[e[2]||(e[2]=m.createStaticVNode('<span class="stat ball" data-v-63a8a7f8><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-63a8a7f8><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path></svg></span>',1)),j.value!==null?(m.openBlock(),m.createElementBlock("span",{key:0,class:m.normalizeClass(["stat time",{"two-lines":j.value&&j.value.includes(`
|
|
4090
4090
|
`)}])},m.toDisplayString(j.value),3)):m.createCommentVNode("",!0),m.createElementVNode("div",{class:m.normalizeClass(["separator",{"two-lines":j.value&&j.value.includes(`
|
|
4091
4091
|
`)}])},null,2),m.createElementVNode("span",aue,[e[0]||(e[0]=m.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})],-1)),m.createElementVNode("span",iue,m.toDisplayString(N.value||0),1)]),m.createElementVNode("span",oue,[e[1]||(e[1]=m.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})],-1)),m.createElementVNode("span",sue,m.toDisplayString(E.value||0),1)])]),e[6]||(e[6]=m.createElementVNode("div",{class:"empty"},null,-1)),m.createElementVNode("div",lue,[m.createElementVNode("span",cue,m.toDisplayString(t.value||0),1),e[3]||(e[3]=m.createElementVNode("span",{class:"stat yellow"},[m.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})])],-1)),m.createElementVNode("span",uue,m.toDisplayString(x.value||0),1),e[4]||(e[4]=m.createElementVNode("span",{class:"stat red"},[m.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})])],-1)),m.createElementVNode("div",{class:m.normalizeClass(["separator",{"two-lines":ae.value&&ae.value.includes(`
|
|
4092
4092
|
`)}])},null,2),ae.value!==null?(m.openBlock(),m.createElementBlock("span",{key:0,class:m.normalizeClass(["stat time",{"two-lines":ae.value&&ae.value.includes(`
|
|
4093
|
-
`)}])},m.toDisplayString(ae.value),3)):m.createCommentVNode("",!0),e[5]||(e[5]=m.createStaticVNode('<span class="stat ball" data-v-2a752817><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-2a752817><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path></svg></span>',1))])])])]))}},[["__scopeId","data-v-2a752817"]]),hue={class:"prematch-bg"},pue={class:"subtitle"},fue={class:"jornada"},mue={class:"fecha"},gue={class:"teams-row"},yue={class:"team team-local"},vue={class:"escudo-svg"},bue=["src"],xue={class:"team team-visitor"},_ue={class:"escudo-svg"},wue=["src"],kue=xs({__name:"AnalisisPrematchType3",props:{report:{type:Object,default:()=>({})}},setup(a){function d(j){return j?j.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;return(j,ae)=>(m.openBlock(),m.createElementBlock("div",hue,[ae[1]||(ae[1]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),m.createElementVNode("div",pue,[m.createElementVNode("span",fue,m.toDisplayString(d(A.report.game.matchday_name)),1),m.createElementVNode("span",mue," - "+m.toDisplayString(m.unref(Pd)(A.report.game.date_time_utc)),1)]),m.createElementVNode("div",gue,[m.createElementVNode("div",yue,[m.createElementVNode("span",vue,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.home_team+".png"},null,8,bue)])]),ae[0]||(ae[0]=m.createElementVNode("div",{class:"divider-line"},[m.createElementVNode("div",{class:"dotted-line"})],-1)),m.createElementVNode("div",xue,[m.createElementVNode("span",_ue,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.visiting_team+".png"},null,8,wue)])])])]))}},[["__scopeId","data-v-23601285"]]),Tue={class:"prematch-bg"},Sue={class:"background-shields"},Aue={class:"shield-left"},Eue=["src"],Cue={class:"shield-right"},Mue=["src"],Pue={class:"subtitle"},Lue={class:"jornada"},zue={class:"fecha"},Nue={class:"teams-row"},Oue={class:"team team-local"},Rue={class:"team-header"},Due={class:"escudo-svg"},Iue=["src"],Fue={class:"score"},Vue={class:"players-list"},Bue={class:"player-name"},Uue={key:0,class:"more-events-indicator"},jue={class:"team team-visitor"},que={class:"team-header"},Wue={class:"score"},Gue={class:"escudo-svg"},Hue=["src"],Xue={class:"players-list"},Kue={class:"player-name"},Jue={key:0},$ue={key:0,class:"more-events-indicator"},Zue=xs({__name:"AnalisisPostMatchType3",props:{report:{type:Object,default:()=>({})}},setup(a){var x,u;function d(e){return e?e.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;console.log("Props report: ",A.report),console.log("Game minutes: ",(u=(x=A.report)==null?void 0:x.game)==null?void 0:u.report_minutes);const j=m.computed(()=>{var e,b,f;return(((f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.report_minutes)==null?void 0:f.home_goals_minutes)||[]).slice(0,5)}),ae=m.computed(()=>{var e,b,f;return(((f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.report_minutes)==null?void 0:f.visiting_goals_minutes)||[]).slice(0,5)});function N(e){const b=Array.from(e.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),f=e.match(/^(.*?)\s*\d+'/),v=f?" "+f[1].trim():"";return{minutos:b,nombre:v}}const E=m.computed(()=>{var b,f,v,h;return(((h=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.report_minutes)==null?void 0:v.home_goals_minutes)==null?void 0:h.length)||0)>5}),t=m.computed(()=>{var b,f,v,h;return(((h=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.report_minutes)==null?void 0:v.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(e,b)=>(m.openBlock(),m.createElementBlock("div",Tue,[m.createElementVNode("div",Sue,[m.createElementVNode("div",Aue,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,Eue)]),m.createElementVNode("div",Cue,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Mue)])]),b[5]||(b[5]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),m.createElementVNode("div",Pue,[m.createElementVNode("span",Lue,"Jornada "+m.toDisplayString(d(a.report.game.matchday_name)),1),m.createElementVNode("span",zue," - "+m.toDisplayString(m.unref(Pd)(a.report.game.date_time_utc)),1)]),m.createElementVNode("div",Nue,[m.createElementVNode("div",Oue,[m.createElementVNode("div",Rue,[m.createElementVNode("span",Due,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,Iue)]),m.createElementVNode("div",Fue,m.toDisplayString(a.report.game.score[0]),1)]),m.createElementVNode("div",Vue,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(j.value,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`home-event-${v}`,class:"player-item"},[m.createElementVNode("span",Bue,m.toDisplayString(f)+" ",1),b[0]||(b[0]=m.createElementVNode("span",{class:"player-icon"},[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1))]))),128)),E.value?(m.openBlock(),m.createElementBlock("div",Uue,b[1]||(b[1]=[m.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):m.createCommentVNode("",!0)])]),b[4]||(b[4]=m.createElementVNode("div",{class:"divider-line"},[m.createElementVNode("div",{class:"dotted-line"})],-1)),m.createElementVNode("div",jue,[m.createElementVNode("div",que,[m.createElementVNode("div",Wue,m.toDisplayString(a.report.game.score[1]),1),m.createElementVNode("span",Gue,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,Hue)])]),m.createElementVNode("div",Xue,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(ae.value,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`visiting-event-${v}`,class:"player-item"},[b[2]||(b[2]=m.createElementVNode("span",{class:"player-icon"},[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),m.createElementVNode("span",Kue,[m.createTextVNode(m.toDisplayString(N(f).minutos)+" ",1),N(f).nombre?(m.openBlock(),m.createElementBlock("span",Jue,m.toDisplayString(N(f).nombre),1)):m.createCommentVNode("",!0)])]))),128)),t.value?(m.openBlock(),m.createElementBlock("div",$ue,b[3]||(b[3]=[m.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):m.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-55d29d0e"]]),Yue={class:"prematch-bg"},Que={class:"subtitle"},ede={class:"jornada"},tde={class:"fecha"},rde={class:"teams-row"},nde={class:"team team-local"},ade={class:"escudo-svg"},ide=["src"],ode={class:"team team-visitor"},sde={class:"escudo-svg"},lde=["src"],cde=xs({__name:"AnalisisPrematchType4",props:{report:{type:Object,default:()=>({})}},setup(a){function d(j){return j?j.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;return(j,ae)=>(m.openBlock(),m.createElementBlock("div",Yue,[ae[1]||(ae[1]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),m.createElementVNode("div",Que,[m.createElementVNode("span",ede,m.toDisplayString(d(A.report.game.matchday_name)),1),m.createElementVNode("span",tde," - "+m.toDisplayString(m.unref(Pd)(A.report.game.date_time_utc)),1)]),m.createElementVNode("div",rde,[m.createElementVNode("div",nde,[m.createElementVNode("span",ade,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.home_team+".png"},null,8,ide)])]),ae[0]||(ae[0]=m.createElementVNode("div",{class:"divider-line"},[m.createElementVNode("div",{class:"dotted-line"})],-1)),m.createElementVNode("div",ode,[m.createElementVNode("span",sde,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.visiting_team+".png"},null,8,lde)])])])]))}},[["__scopeId","data-v-347d4c02"]]),ude={class:"prematch-bg"},dde={class:"background-shields"},hde={class:"shield-left"},pde=["src"],fde={class:"shield-right"},mde=["src"],gde={class:"subtitle"},yde={class:"jornada"},vde={class:"fecha"},bde={class:"teams-row"},xde={class:"team team-local"},_de={class:"team-header"},wde={class:"escudo-svg"},kde=["src"],Tde={class:"score"},Sde={class:"players-list"},Ade={class:"player-name"},Ede={key:0,class:"more-events-indicator"},Cde={class:"team team-visitor"},Mde={class:"team-header"},Pde={class:"score"},Lde={class:"escudo-svg"},zde=["src"],Nde={class:"players-list"},Ode={class:"player-name"},Rde={key:0},Dde={key:0,class:"more-events-indicator"},Ide=xs({__name:"AnalisisPostMatchType4",props:{report:{type:Object,default:()=>({})}},setup(a){var x,u;function d(e){return e?e.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;console.log("Props report: ",A.report),console.log("Game minutes: ",(u=(x=A.report)==null?void 0:x.game)==null?void 0:u.report_minutes);const j=m.computed(()=>{var e,b,f;return(((f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.report_minutes)==null?void 0:f.home_goals_minutes)||[]).slice(0,5)}),ae=m.computed(()=>{var e,b,f;return(((f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.report_minutes)==null?void 0:f.visiting_goals_minutes)||[]).slice(0,5)});function N(e){const b=Array.from(e.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),f=e.match(/^(.*?)\s*\d+'/),v=f?f[1].trim():"";return{minutos:b,nombre:v}}const E=m.computed(()=>{var b,f,v,h;return(((h=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.report_minutes)==null?void 0:v.home_goals_minutes)==null?void 0:h.length)||0)>5}),t=m.computed(()=>{var b,f,v,h;return(((h=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.report_minutes)==null?void 0:v.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(e,b)=>(m.openBlock(),m.createElementBlock("div",ude,[m.createElementVNode("div",dde,[m.createElementVNode("div",hde,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,pde)]),m.createElementVNode("div",fde,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,mde)])]),b[5]||(b[5]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),m.createElementVNode("div",gde,[m.createElementVNode("span",yde,"Jornada "+m.toDisplayString(d(a.report.game.matchday_name)),1),m.createElementVNode("span",vde," - "+m.toDisplayString(m.unref(Pd)(a.report.game.date_time_utc)),1)]),m.createElementVNode("div",bde,[m.createElementVNode("div",xde,[m.createElementVNode("div",_de,[m.createElementVNode("span",wde,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,kde)]),m.createElementVNode("div",Tde,m.toDisplayString(a.report.game.score[0]),1)]),m.createElementVNode("div",Sde,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(j.value,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`home-event-${v}`,class:"player-item"},[m.createElementVNode("span",Ade,m.toDisplayString(f)+" ",1),b[0]||(b[0]=m.createElementVNode("span",{class:"player-icon"},[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1))]))),128)),E.value?(m.openBlock(),m.createElementBlock("div",Ede,b[1]||(b[1]=[m.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):m.createCommentVNode("",!0)])]),b[4]||(b[4]=m.createElementVNode("div",{class:"divider-line"},[m.createElementVNode("div",{class:"dotted-line"})],-1)),m.createElementVNode("div",Cde,[m.createElementVNode("div",Mde,[m.createElementVNode("div",Pde,m.toDisplayString(a.report.game.score[1]),1),m.createElementVNode("span",Lde,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,zde)])]),m.createElementVNode("div",Nde,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(ae.value,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`visiting-event-${v}`,class:"player-item"},[b[2]||(b[2]=m.createElementVNode("span",{class:"player-icon"},[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),m.createElementVNode("span",Ode,[m.createTextVNode(m.toDisplayString(N(f).minutos)+" ",1),N(f).nombre?(m.openBlock(),m.createElementBlock("span",Rde," "+m.toDisplayString(N(f).nombre),1)):m.createCommentVNode("",!0)])]))),128)),t.value?(m.openBlock(),m.createElementBlock("div",Dde,b[3]||(b[3]=[m.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):m.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-4a4e18cd"]]),Fde={class:"report-card",style:{position:"relative"}},Vde={class:"report-img-placeholder",style:{position:"relative"}},Bde={class:"inner-card-report"},Ude={class:"report-footer"},jde={class:"report-title"},qde={class:"report-template"},Wde={class:"template-name"},Gde={class:"report-league"},Hde={class:"report-tournament"},Xde=xs({__name:"ReportItem",props:{type:{type:Number,default:1},localTeam:{type:String,default:"América"},report:{type:Object,default:()=>{}},visitorTeam:{type:String,default:"Chivas"},localScore:{type:Number,default:2},visitorScore:{type:Number,default:1},league:{type:String,default:"Liga MX"},date:{type:String,default:"15 Nov 2024"}},emits:["ver-reporte","renombrar","eliminar","edit-template","open-report","download-report"],setup(a,{emit:d}){const A=d,j=a,ae=m.ref(!1);function N(){ae.value=!1,A("open-report",j.report)}function E(){console.log("renombrar"),ae.value=!1,A("renombrar",j.report.report_name||"Reporte",j.report.id)}function t(){console.log("editar"),ae.value=!1,A("edit-template",j.report)}function x(){console.log("duplicar"),ae.value=!1}function u(){console.log("eliminar"),ae.value=!1,A("eliminar",j.report)}function e(){console.log("descargar"),A("download-report",j.report),ae.value=!1}function b(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}function f(){A("open-report",j.report)}return(v,h)=>(m.openBlock(),m.createElementBlock("div",Fde,[m.createElementVNode("div",{class:"three-dots",onClick:h[0]||(h[0]=m.withModifiers(r=>ae.value=!ae.value,["stop"]))},h[4]||(h[4]=[m.createElementVNode("span",null,null,-1),m.createElementVNode("span",null,null,-1),m.createElementVNode("span",null,null,-1)])),m.createElementVNode("div",Vde,[a.report.template_type===1&&a.report.pages[0].type==1?(m.openBlock(),m.createBlock(qle,{key:0,"local-team":a.localTeam,"visitor-team":a.visitorTeam,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","league","date","report"])):a.report.template_type===2&&a.report.pages[0].type==1?(m.openBlock(),m.createBlock(xce,{key:1,"local-team":a.localTeam,"visitor-team":a.visitorTeam,"local-score":a.localScore,"visitor-score":a.visitorScore,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):m.createCommentVNode("",!0),a.report.template_type===1&&a.report.pages[0].type==2?(m.openBlock(),m.createBlock(Oce,{key:2,"local-team":a.localTeam,"visitor-team":a.visitorTeam,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","league","date","report"])):a.report.template_type===2&&a.report.pages[0].type==2?(m.openBlock(),m.createBlock(due,{key:3,"local-team":a.localTeam,"visitor-team":a.visitorTeam,"local-score":a.localScore,"visitor-score":a.visitorScore,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):m.createCommentVNode("",!0),a.report.template_type===1&&a.report.pages[0].type==3?(m.openBlock(),m.createBlock(kue,{key:4,"local-team":a.localTeam,"visitor-team":a.visitorTeam,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","league","date","report"])):a.report.template_type===2&&a.report.pages[0].type==3?(m.openBlock(),m.createBlock(Zue,{key:5,"local-team":a.localTeam,"visitor-team":a.visitorTeam,"local-score":a.localScore,"visitor-score":a.visitorScore,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):a.report.template_type===1&&a.report.pages[0].type==4?(m.openBlock(),m.createBlock(cde,{key:6,"local-team":a.localTeam,"visitor-team":a.visitorTeam,"local-score":a.localScore,"visitor-score":a.visitorScore,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):a.report.template_type===2&&a.report.pages[0].type==4?(m.openBlock(),m.createBlock(Ide,{key:7,"local-team":a.localTeam,"visitor-team":a.visitorTeam,"local-score":a.localScore,"visitor-score":a.visitorScore,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):m.createCommentVNode("",!0),m.createElementVNode("div",{class:"report-img-overlay"},[m.createElementVNode("button",{class:"report-img-button",onClick:f},"Ver reporte")])]),m.createElementVNode("div",Bde,[m.createElementVNode("div",Ude,[m.createElementVNode("div",jde,m.toDisplayString(a.report.report_name),1),m.createElementVNode("div",qde,[h[5]||(h[5]=m.createTextVNode(" Template: ",-1)),m.createElementVNode("span",Wde,m.toDisplayString(a.report.name),1)]),m.createElementVNode("div",Gde,m.toDisplayString(a.report.season_name)+" - "+m.toDisplayString(b(a.report.game.matchday_name))+" | "+m.toDisplayString(m.unref(Pd)(a.report.game.date_time_utc)),1),m.createElementVNode("div",Hde,m.toDisplayString(a.report.tournament_name),1)])]),ae.value?(m.openBlock(),m.createBlock(Mle,{key:0,onClick:h[1]||(h[1]=m.withModifiers(r=>ae.value=!1,["self"])),onMouseleave:h[2]||(h[2]=r=>ae.value=!1),onVerReporte:N,onRenombrar:E,onEditar:t,onDuplicar:x,onEliminar:u,onDescargar:e})):m.createCommentVNode("",!0),ae.value?(m.openBlock(),m.createElementBlock("div",{key:1,class:"tooltip-overlay",onClick:h[3]||(h[3]=r=>ae.value=!1)})):m.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a75289c7"]]),Kde={class:"modal-overlay"},Jde={class:"modal-content"},$de={class:"modal-body"},Zde=["placeholder","disabled"],Yde={key:0,class:"error-message"},Qde={class:"modal-footer"},ehe=["disabled"],the=["disabled"],rhe={key:0},nhe={key:1},ahe=xs({__name:"ModalRenameReporte",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:[String,Number],required:!0},reportId:{type:[String,Number],required:!0}},emits:["close","rename","refresh"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(A.initialName),N=m.ref(!1),E=m.ref("");m.watch(()=>A.initialName,x=>{ae.value=x,E.value=""});async function t(){var x;if(console.log("acceptRename"),!(ae.value.trim().length<3)){console.log("acceptRename 22"),N.value=!0,E.value="";try{await Qi.create({headers:{Authorization:`${A.token}`}}).put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/reports/${A.reportId}/rename`,{name:ae.value.trim()}),j("rename",ae.value.trim()),j("refresh"),j("close")}catch(u){console.error("Error al renombrar el reporte:",u),((x=u.response)==null?void 0:x.status)===409?E.value="Ya existe un reporte con el mismo nombre":E.value="Error al renombrar el reporte. Inténtalo de nuevo."}finally{N.value=!1}}}return m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""}),(x,u)=>(m.openBlock(),m.createElementBlock("div",Kde,[m.createElementVNode("div",Jde,[m.createElementVNode("button",{class:"close-btn",onClick:u[0]||(u[0]=e=>x.$emit("close"))},u[3]||(u[3]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),u[5]||(u[5]=m.createElementVNode("div",{class:"modal-header"},[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),m.createElementVNode("span",{class:"modal-title"},"Renombrar Reporte")],-1)),u[6]||(u[6]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",$de,[u[4]||(u[4]=m.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),m.withDirectives(m.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":u[1]||(u[1]=e=>ae.value=e),placeholder:a.initialName,maxlength:"40",autocomplete:"off",disabled:N.value},null,8,Zde),[[m.vModelText,ae.value]]),E.value?(m.openBlock(),m.createElementBlock("div",Yde,m.toDisplayString(E.value),1)):m.createCommentVNode("",!0)]),u[7]||(u[7]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",Qde,[m.createElementVNode("button",{class:"cancel-btn",onClick:u[2]||(u[2]=e=>x.$emit("close")),disabled:N.value},"Cancelar",8,ehe),m.createElementVNode("button",{class:"next-btn",disabled:ae.value.trim().length<3||N.value,onClick:t},[N.value?(m.openBlock(),m.createElementBlock("span",rhe,"Guardando...")):(m.openBlock(),m.createElementBlock("span",nhe,"Guardar"))],8,the)])])]))}},[["__scopeId","data-v-3a66dd5f"]]),ihe={class:"modal-overlay"},ohe={class:"modal-content"},she={class:"modal-footer"},lhe=["disabled"],che=["disabled"],uhe=xs({__name:"ModalDeleteReport",props:{reportId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","reportDeleted"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(!1),N=async()=>{try{ae.value=!0;const t=await Qi.create({headers:{Authorization:`${A.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/reports/${A.reportId}`);console.log("Reporte eliminado exitosamente:",t.data),j("reportDeleted",A.reportId),j("close")}catch(E){console.error("Error al eliminar el reporte:",E),alert("Error al eliminar el reporte. Por favor, intenta de nuevo.")}finally{ae.value=!1}};return m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""}),(E,t)=>(m.openBlock(),m.createElementBlock("div",ihe,[m.createElementVNode("div",ohe,[m.createElementVNode("button",{class:"close-btn",onClick:t[0]||(t[0]=x=>E.$emit("close"))},t[2]||(t[2]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),t[3]||(t[3]=m.createStaticVNode('<div class="modal-header" data-v-8c239161><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-8c239161><span class="modal-title" data-v-8c239161>Eliminar reporte</span></div><div class="header-separator" data-v-8c239161></div><div class="modal-body confirm-text" data-v-8c239161> ¿Estás seguro que deseas eliminar<br data-v-8c239161> este reporte? Si lo haces no habrá manera<br data-v-8c239161> de recuperarlo. </div><div class="header-separator" data-v-8c239161></div>',4)),m.createElementVNode("div",she,[m.createElementVNode("button",{class:"cancel-btn",onClick:t[1]||(t[1]=x=>E.$emit("close")),disabled:ae.value},"Cancelar",8,lhe),m.createElementVNode("button",{class:"delete-btn",onClick:N,disabled:ae.value},m.toDisplayString(ae.value?"Eliminando...":"Eliminar"),9,che)])])]))}},[["__scopeId","data-v-8c239161"]]),dhe={class:"reports-header"},hhe={class:"count"},phe={key:0,class:"sort-options"},fhe=["onClick"],mhe={key:0,class:"checkmark"},ghe={key:0,class:"loading-state"},yhe={key:1,class:"error-state"},vhe={key:3,class:"empty-reports"},bhe={key:4,class:"empty-reports"},xhe=xs({__name:"ReportsSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["open-report"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref([]),N=m.ref(!1),E=m.ref(null),t=m.computed(()=>{let V=ae.value;if(A.searchQuery.trim()){const U=A.searchQuery.toLowerCase().trim();V=ae.value.filter(W=>{var re,ee,J,Z,ce,de,he;return!!((((re=W.report_name)==null?void 0:re.toLowerCase())||"").includes(U)||(((ee=W.name)==null?void 0:ee.toLowerCase())||"").includes(U)||W.created_at&&new Date(W.created_at).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(U)||(J=W.game)!=null&&J.date_time_utc&&new Date(W.game.date_time_utc).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(U)||(((ce=(Z=W.game)==null?void 0:Z.season_name)==null?void 0:ce.toLowerCase())||"").includes(U)||(((de=W.tournament_name)==null?void 0:de.toLowerCase())||"").includes(U)||(he=W.game)!=null&&he.matchday&&W.game.matchday.toString().includes(U))})}return u.value&&(V=[...V].sort((U,W)=>{var q,$;if(u.value==="A - Z"){const te=(U.report_name||"").toLowerCase(),X=(W.report_name||"").toLowerCase();return te.localeCompare(X,"es",{sensitivity:"base"})}else if(u.value==="Más recientes"){const te=new Date(U.created_at||0);return new Date(W.created_at||0)-te}else if(u.value==="Torneo"){const te=(U.tournament_name||"").toLowerCase(),X=(W.tournament_name||"").toLowerCase();if(te!==X)return te.localeCompare(X,"es",{sensitivity:"base"});const re=U.season_id||0;return(W.season_id||0)-re}else if(u.value==="Jornada"){const te=((q=U.game)==null?void 0:q.matchday_id)||0,X=(($=W.game)==null?void 0:$.matchday_id)||0;return te-X}return 0})),V}),x=m.ref(!1),u=m.ref("Más recientes"),e=m.ref(!1),b=m.ref(""),f=m.ref(""),v=m.ref(""),h=m.ref(!1),r=m.ref(""),n=m.ref(""),c=m.ref(null),o=m.ref(null),l=m.ref(null),p=m.ref(0),g=[{label:"A - Z",value:"A - Z"},{label:"Más recientes",value:"Más recientes"},{label:"Torneo",value:"Torneo"},{label:"Jornada",value:"Jornada"}],w=async()=>{N.value=!0,E.value=null;try{const V=await Qi.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/reports`,{headers:{Authorization:`${A.token}`,"Content-Type":"application/json"}});V.data&&Array.isArray(V.data)?ae.value=V.data:V.data&&V.data.reports?ae.value=V.data.reports:V.data&&V.data.data?ae.value=V.data.data:ae.value=[]}catch(V){console.error("Error cargando reportes:",V),console.error("Error response:",V.response),E.value=V.message||"Error al cargar los reportes",ae.value=[]}finally{N.value=!1}},S=m.computed(()=>{if(!p.value)return"grid-1-column";const V=340,U=20,q=p.value-40,$=Math.floor((q+U)/(V+U)),te=Math.max(1,$);return te>=4?"grid-4-columns":te>=3?"grid-3-columns":te>=2?"grid-2-columns":"grid-1-column"}),T=()=>{x.value=!x.value},M=V=>{console.log("Ordenando por:",V),u.value=V,x.value=!1};function L(V){console.log("reports section onOpenReport",V),j("open-report",V)}const k=(V,U)=>{b.value=V,f.value=U;const W=ae.value.find(q=>q.id===U);v.value=W?W.template_type:"",e.value=!0},P=V=>{console.log("Renombrar reporte de",b.value,"a",V),e.value=!1;const U=ae.value.findIndex(W=>W.id===f.value);U!==-1&&(ae.value[U].report_name=V)},C=V=>{r.value=V.report_name||"Reporte",n.value=V.id,h.value=!0},_=V=>{h.value=!1,ae.value=ae.value.filter(U=>U.id!==V)};function z(V){console.log("Descargando reporte:",V),j("download-report",V)}const y=V=>{x.value&&c.value&&!c.value.contains(V.target)&&(x.value=!1)},O=()=>{o.value&&(p.value=o.value.offsetWidth)};let I=null;return m.onMounted(async()=>{document.addEventListener("mousedown",y),await w(),await m.nextTick(),O(),window.ResizeObserver?(I=new ResizeObserver(()=>{O()}),o.value&&I.observe(o.value)):window.addEventListener("resize",O)}),m.onBeforeUnmount(()=>{document.removeEventListener("mousedown",y),I?I.disconnect():window.removeEventListener("resize",O)}),(V,U)=>(m.openBlock(),m.createElementBlock("div",{class:"reports-section",ref_key:"reportsSectionRef",ref:o},[m.createElementVNode("div",dhe,[m.createElementVNode("span",null,[U[2]||(U[2]=m.createTextVNode("Reportes ",-1)),m.createElementVNode("span",hhe,"("+m.toDisplayString(t.value.length)+")",1)]),m.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:c},[m.createElementVNode("button",{class:"sort-button",onClick:T},[m.createTextVNode(m.toDisplayString(u.value||"Ordenar")+" ",1),m.createElementVNode("span",{class:m.normalizeClass(["dropdown-arrow",{rotated:x.value}])},null,2)]),x.value?(m.openBlock(),m.createElementBlock("div",phe,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(g,W=>m.createElementVNode("div",{key:W.value,class:m.normalizeClass(["sort-option",{selected:u.value===W.value}]),onClick:q=>u.value!==W.value&&M(W.value)},[m.createElementVNode("span",null,m.toDisplayString(W.label),1),u.value===W.value?(m.openBlock(),m.createElementBlock("span",mhe,U[3]||(U[3]=[m.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):m.createCommentVNode("",!0)],10,fhe)),64))])):m.createCommentVNode("",!0)],512)]),N.value?(m.openBlock(),m.createElementBlock("div",ghe,U[4]||(U[4]=[m.createElementVNode("div",{class:"loading-spinner"},null,-1),m.createElementVNode("p",null,"Cargando reportes...",-1)]))):E.value?(m.openBlock(),m.createElementBlock("div",yhe,[m.createElementVNode("p",null,"Error al cargar reportes: "+m.toDisplayString(E.value),1),m.createElementVNode("button",{onClick:w,class:"retry-button"},"Reintentar")])):(m.openBlock(),m.createElementBlock("div",{key:2,class:m.normalizeClass(["reports-grid",S.value]),ref_key:"reportsGridRef",ref:l},[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(t.value,W=>(m.openBlock(),m.createBlock(Xde,{key:W.id,report:W,onOpenReport:L,onRenombrar:k,onEliminar:C,onDownloadReport:z},null,8,["report"]))),128))],2)),!N.value&&!E.value&&ae.value.length===0?(m.openBlock(),m.createElementBlock("div",vhe," No tienes reportes aún. ")):m.createCommentVNode("",!0),!N.value&&!E.value&&ae.value.length>0&&t.value.length===0?(m.openBlock(),m.createElementBlock("div",bhe," No se encontraron reportes que coincidan con tu búsqueda. ")):m.createCommentVNode("",!0),e.value?(m.openBlock(),m.createBlock(ahe,{key:5,initialName:b.value,templateType:v.value,token:a.token,userId:a.userId,reportId:f.value,onClose:U[0]||(U[0]=W=>e.value=!1),onRename:P,onRefresh:w},null,8,["initialName","templateType","token","userId","reportId"])):m.createCommentVNode("",!0),h.value?(m.openBlock(),m.createBlock(uhe,{key:6,"report-id":n.value,"user-id":a.userId,token:a.token,onClose:U[1]||(U[1]=W=>h.value=!1),onReportDeleted:_},null,8,["report-id","user-id","token"])):m.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-70130c65"]]),_he={class:"modal-overlay"},whe={class:"modal-content"},khe=xs({__name:"ModalSoloEscritorio",setup(a){return(d,A)=>(m.openBlock(),m.createElementBlock("div",_he,[m.createElementVNode("div",whe,[A[1]||(A[1]=m.createStaticVNode('<div class="modal-icon" data-v-76d7f6ed><svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-76d7f6ed><rect x="8" y="10" width="32" height="20" rx="2" stroke="#C0CBE0" stroke-width="2" data-v-76d7f6ed></rect><rect x="16" y="34" width="16" height="2" rx="1" fill="#C0CBE0" data-v-76d7f6ed></rect></svg></div><div class="modal-text" data-v-76d7f6ed> Esta sección solo está disponible para<br data-v-76d7f6ed> escritorio. Utiliza tu computadora <br data-v-76d7f6ed>para ingresar. </div>',2)),m.createElementVNode("button",{class:"modal-btn",onClick:A[0]||(A[0]=j=>d.$emit("toHome"))},"OK")])]))}},[["__scopeId","data-v-76d7f6ed"]]),The={class:"top-bar"},She={class:"tabs-container"},Ahe={class:"tabs"},Ehe={key:0,class:"actions"},Che={class:"search-container"},Mhe={key:1,class:"actions"},Phe={class:"search-container"},Lhe=xs({__name:"gsc-reports",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0}},emits:["toHome","download-report"],setup(a,{emit:d}){const A=a,{userId:j,team:ae,token:N}=A,E=m.ref("templates"),t=m.ref(!1),x=m.ref(null),u=m.ref(!1),e=m.ref(""),b=m.ref(""),f=m.ref(null),v=d;function h(){if(x.value){const w=x.value.offsetWidth;t.value=w<1028}}m.watch(t,w=>{w?document.body.style.overflow="hidden":document.body.style.overflow=""}),m.onBeforeUnmount(()=>{document.body.style.overflow=""}),m.onMounted(()=>{h(),window.addEventListener("resize",h)}),m.onBeforeUnmount(()=>{window.removeEventListener("resize",h)});function r(w){console.log("onOpenModalNewTemplate, gsc-reports:",w),n(w)}function n(w){console.log("onEditTemplate, template:",w),f.value.show({template:w,isTemplateMode:!0})}const c=()=>{e.value=""},o=()=>{b.value=""};function l(w){console.log("gsc-report onOpenReport, report:",w),f.value&&f.value.show({template:w,isTemplateMode:!1})}function p(w){v("download-report",w)}function g(){v("toHome")}return(w,S)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(m.unref(pie),{ref_key:"reportTemplateMaker",ref:f,token:m.unref(N)},null,8,["token"]),m.createElementVNode("div",{ref_key:"containerRef",ref:x,class:"reports-container"},[t.value?(m.openBlock(),m.createBlock(khe,{key:0,onToHome:g})):m.createCommentVNode("",!0),S[12]||(S[12]=m.createElementVNode("h1",{class:"title"},"Mis reportes",-1)),m.createElementVNode("div",The,[m.createElementVNode("div",She,[m.createElementVNode("div",Ahe,[m.createElementVNode("div",{class:m.normalizeClass(["tab tab-templates",{active:E.value==="templates"}]),onClick:S[0]||(S[0]=T=>E.value="templates")}," Templates ",2),m.createElementVNode("div",{class:m.normalizeClass(["tab tab-reports",{active:E.value==="reports"}]),onClick:S[1]||(S[1]=T=>E.value="reports")}," Tus reportes ",2)])]),E.value==="templates"?(m.openBlock(),m.createElementBlock("div",Ehe,[m.createElementVNode("div",Che,[S[8]||(S[8]=m.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":S[2]||(S[2]=T=>e.value=T),class:"search",type:"text",placeholder:"Buscar template"},null,512),[[m.vModelText,e.value]]),e.value?(m.openBlock(),m.createElementBlock("button",{key:0,onClick:c,class:"clear-search-btn",type:"button"},S[7]||(S[7]=[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):m.createCommentVNode("",!0)]),m.createElementVNode("button",{class:"create-template-btn",onClick:S[3]||(S[3]=T=>u.value=!0)},S[9]||(S[9]=[m.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-agregar@3x.png",alt:"Agregar",class:"create-icon"},null,-1),m.createTextVNode(" Crear template ",-1)]))])):m.createCommentVNode("",!0),E.value==="reports"?(m.openBlock(),m.createElementBlock("div",Mhe,[m.createElementVNode("div",Phe,[S[11]||(S[11]=m.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":S[4]||(S[4]=T=>b.value=T),class:"search search-reports",type:"text",placeholder:"Buscar reporte"},null,512),[[m.vModelText,b.value]]),b.value?(m.openBlock(),m.createElementBlock("button",{key:0,onClick:o,class:"clear-search-btn",type:"button"},S[10]||(S[10]=[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):m.createCommentVNode("",!0)])])):m.createCommentVNode("",!0)]),E.value==="templates"?(m.openBlock(),m.createBlock(Ele,{key:1,userId:m.unref(j),token:m.unref(N),team:m.unref(ae),searchQuery:e.value,onSwitchToReports:S[5]||(S[5]=T=>E.value="reports"),onOpenModalNewTemplate:r,onEditTemplate:n},null,8,["userId","token","team","searchQuery"])):(m.openBlock(),m.createBlock(xhe,{key:2,userId:m.unref(j),token:m.unref(N),team:m.unref(ae),searchQuery:b.value,onOpenReport:l,onDownloadReport:p},null,8,["userId","token","team","searchQuery"])),u.value?(m.openBlock(),m.createBlock(C4,{key:3,token:m.unref(N),team:m.unref(ae),onOpenModalNewTemplate:r,onClose:S[6]||(S[6]=T=>u.value=!1)},null,8,["token","team"])):m.createCommentVNode("",!0)],512)],64))}},[["__scopeId","data-v-df5ec613"]]),zhe={class:"subcategory-group"},Nhe={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(a){return(d,A)=>(m.openBlock(),m.createElementBlock("div",zhe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(a.subcategoryGroup,j=>(m.openBlock(),m.createBlock(m.unref(f1),{key:j.id,modelValue:j.isSelected,"onUpdate:modelValue":ae=>j.isSelected=ae,label:j.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},Ohe=Qc(Nhe,[["__scopeId","data-v-ae6f3d72"]]),Rhe={class:"filter-subcategories"},Dhe=Object.freeze(Object.defineProperty({__proto__:null,default:Qc({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(a){return(d,A)=>(m.openBlock(),m.createElementBlock("div",Rhe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(a.subcategoryGroups,j=>(m.openBlock(),m.createElementBlock("div",{key:j.id,class:"filter-subcategories__group"},[m.createVNode(Ohe,{subcategoryGroup:j},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),Dg=a=>(m.pushScopeId("data-v-80d9c265"),a=a(),m.popScopeId(),a),Ihe={class:"details__header"},Fhe=Dg(()=>m.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),Vhe={class:"details__header__checkbox"},Bhe={class:"details__body"},Uhe={class:"details__body__playing-as"},jhe=["onClick"],qhe={class:"details__header"},Whe=Dg(()=>m.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),Ghe={class:"details__header__checkbox"},Hhe={class:"details__body"},Xhe=Dg(()=>m.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),Khe={class:"details__body__game-section"},Jhe=["onClick"],$he={class:"details__body"},Zhe=Dg(()=>m.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),Yhe={class:"details__body__game-section"},Qhe=["onClick"],epe=Object.freeze(Object.defineProperty({__proto__:null,default:Qc({__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(a){const d=a;m.useCssVars(e=>({"49cba245":a.buttonsBackgroundColor,"52f02da6":a.buttonsTextColor,"7d3f686a":a.buttonsBorderWidth,"7c286a07":a.buttonsBorderColor,"24a6f4aa":a.buttonsBackgroundColorActive,cd8d7768:a.buttonsTextColorActive,"35fa5c10":a.buttonsBorderWidthActive,"0cde1826":a.buttonsBorderColorActive}));const A=m.computed(()=>d.playingAs.every(e=>e.isSelected)),j=m.computed(()=>d.gameSections.every(e=>e.isSelected)),ae=m.computed(()=>d.gameSections.reduce((e,b)=>(b.value<=3?e.firstHalf.push(b):e.secondHalf.push(b),e),{firstHalf:[],secondHalf:[]})),N=m.computed(()=>({"--border-radius-first-button":`${d.buttonsBorderRadius} 0 0 ${d.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${d.buttonsBorderRadius} ${d.buttonsBorderRadius} 0`}));function E(e){e?d.playingAs.forEach(b=>{b.isSelected=!0}):d.playingAs.forEach((b,f)=>{b.isSelected=f===0})}function t(e){d.playingAs.filter(b=>b.isSelected).length===1&&e.isSelected||(e.isSelected=!e.isSelected)}function x(e){d.gameSections.filter(b=>b.isSelected).length===1&&e.isSelected||(e.isSelected=!e.isSelected)}function u(e){e?d.gameSections.forEach(b=>{b.isSelected=!0}):d.gameSections.forEach((b,f)=>{b.isSelected=f===0})}return(e,b)=>(m.openBlock(),m.createElementBlock("div",{class:"details",style:m.normalizeStyle(N.value)},[m.createElementVNode("div",Ihe,[Fhe,m.createElementVNode("div",Vhe,[m.createVNode(m.unref(f1),{label:"Todos","model-value":A.value,"onUpdate:modelValue":E},null,8,["model-value"])])]),m.createElementVNode("div",Bhe,[m.createElementVNode("div",Uhe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(d.playingAs,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`pa${v}`,class:m.normalizeClass(["details__body__button",{active:f.isSelected}]),onClick:h=>t(f)},m.toDisplayString(f.name),11,jhe))),128))])]),m.createElementVNode("div",qhe,[Whe,m.createElementVNode("div",Ghe,[m.createVNode(m.unref(f1),{label:"Todos","model-value":j.value,"onUpdate:modelValue":u},null,8,["model-value"])])]),m.createElementVNode("div",Hhe,[Xhe,m.createElementVNode("div",Khe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(ae.value.firstHalf,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`pa${v}`,class:m.normalizeClass(["details__body__button",{active:f.isSelected}]),onClick:h=>x(f)},m.toDisplayString(f.text),11,Jhe))),128))])]),m.createElementVNode("div",$he,[Zhe,m.createElementVNode("div",Yhe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(ae.value.secondHalf,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`pa${v}`,class:m.normalizeClass(["details__body__button",{active:f.isSelected}]),onClick:h=>x(f)},m.toDisplayString(f.text),11,Qhe))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),tpe={class:"filter-field"},rpe=Object.freeze(Object.defineProperty({__proto__:null,default:Qc({__name:"FilterField",setup(a){const d=m.ref(Array.from({length:16},(j,ae)=>ae+1));function A(){}return(j,ae)=>(m.openBlock(),m.createElementBlock("div",tpe,[m.createVNode(m.unref(mL),{width:"100%","background-color":"#2E3B46",value:d.value,"onUpdate:modelValue":A},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));yh.GSCReports=Lhe,Object.defineProperty(yh,Symbol.toStringTag,{value:"Module"})});
|
|
4093
|
+
`)}])},m.toDisplayString(ae.value),3)):m.createCommentVNode("",!0),e[5]||(e[5]=m.createStaticVNode('<span class="stat ball" data-v-63a8a7f8><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-63a8a7f8><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path></svg></span>',1))])])])]))}},[["__scopeId","data-v-63a8a7f8"]]),hue={class:"prematch-bg"},pue={class:"subtitle"},fue={class:"jornada"},mue={class:"fecha"},gue={class:"teams-row"},yue={class:"team team-local"},vue={class:"escudo-svg"},bue=["src"],xue={class:"team team-visitor"},_ue={class:"escudo-svg"},wue=["src"],kue=xs({__name:"AnalisisPrematchType3",props:{report:{type:Object,default:()=>({})}},setup(a){function d(j){return j?j.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;return(j,ae)=>(m.openBlock(),m.createElementBlock("div",hue,[ae[1]||(ae[1]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),m.createElementVNode("div",pue,[m.createElementVNode("span",fue,m.toDisplayString(d(A.report.game.matchday_name)),1),m.createElementVNode("span",mue," - "+m.toDisplayString(m.unref(Pd)(A.report.game.date_time_utc)),1)]),m.createElementVNode("div",gue,[m.createElementVNode("div",yue,[m.createElementVNode("span",vue,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.home_team+".png"},null,8,bue)])]),ae[0]||(ae[0]=m.createElementVNode("div",{class:"divider-line"},[m.createElementVNode("div",{class:"dotted-line"})],-1)),m.createElementVNode("div",xue,[m.createElementVNode("span",_ue,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.visiting_team+".png"},null,8,wue)])])])]))}},[["__scopeId","data-v-b31afbdf"]]),Tue={class:"prematch-bg"},Sue={class:"background-shields"},Aue={class:"shield-left"},Eue=["src"],Cue={class:"shield-right"},Mue=["src"],Pue={class:"subtitle"},Lue={class:"jornada"},zue={class:"fecha"},Nue={class:"teams-row"},Oue={class:"team team-local"},Rue={class:"team-header"},Due={class:"escudo-svg"},Iue=["src"],Fue={class:"score"},Vue={class:"players-list"},Bue={class:"player-name"},Uue={key:0,class:"more-events-indicator"},jue={class:"team team-visitor"},que={class:"team-header"},Wue={class:"score"},Gue={class:"escudo-svg"},Hue=["src"],Xue={class:"players-list"},Kue={class:"player-name"},Jue={key:0},$ue={key:0,class:"more-events-indicator"},Zue=xs({__name:"AnalisisPostMatchType3",props:{report:{type:Object,default:()=>({})}},setup(a){var x,u;function d(e){return e?e.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;console.log("Props report: ",A.report),console.log("Game minutes: ",(u=(x=A.report)==null?void 0:x.game)==null?void 0:u.report_minutes);const j=m.computed(()=>{var e,b,f;return(((f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.report_minutes)==null?void 0:f.home_goals_minutes)||[]).slice(0,5)}),ae=m.computed(()=>{var e,b,f;return(((f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.report_minutes)==null?void 0:f.visiting_goals_minutes)||[]).slice(0,5)});function N(e){const b=Array.from(e.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),f=e.match(/^(.*?)\s*\d+'/),v=f?" "+f[1].trim():"";return{minutos:b,nombre:v}}const E=m.computed(()=>{var b,f,v,h;return(((h=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.report_minutes)==null?void 0:v.home_goals_minutes)==null?void 0:h.length)||0)>5}),t=m.computed(()=>{var b,f,v,h;return(((h=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.report_minutes)==null?void 0:v.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(e,b)=>(m.openBlock(),m.createElementBlock("div",Tue,[m.createElementVNode("div",Sue,[m.createElementVNode("div",Aue,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,Eue)]),m.createElementVNode("div",Cue,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Mue)])]),b[5]||(b[5]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),m.createElementVNode("div",Pue,[m.createElementVNode("span",Lue,"Jornada "+m.toDisplayString(d(a.report.game.matchday_name)),1),m.createElementVNode("span",zue," - "+m.toDisplayString(m.unref(Pd)(a.report.game.date_time_utc)),1)]),m.createElementVNode("div",Nue,[m.createElementVNode("div",Oue,[m.createElementVNode("div",Rue,[m.createElementVNode("span",Due,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,Iue)]),m.createElementVNode("div",Fue,m.toDisplayString(a.report.game.score[0]),1)]),m.createElementVNode("div",Vue,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(j.value,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`home-event-${v}`,class:"player-item"},[m.createElementVNode("span",Bue,m.toDisplayString(f)+" ",1),b[0]||(b[0]=m.createElementVNode("span",{class:"player-icon"},[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1))]))),128)),E.value?(m.openBlock(),m.createElementBlock("div",Uue,b[1]||(b[1]=[m.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):m.createCommentVNode("",!0)])]),b[4]||(b[4]=m.createElementVNode("div",{class:"divider-line"},[m.createElementVNode("div",{class:"dotted-line"})],-1)),m.createElementVNode("div",jue,[m.createElementVNode("div",que,[m.createElementVNode("div",Wue,m.toDisplayString(a.report.game.score[1]),1),m.createElementVNode("span",Gue,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,Hue)])]),m.createElementVNode("div",Xue,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(ae.value,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`visiting-event-${v}`,class:"player-item"},[b[2]||(b[2]=m.createElementVNode("span",{class:"player-icon"},[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),m.createElementVNode("span",Kue,[m.createTextVNode(m.toDisplayString(N(f).minutos)+" ",1),N(f).nombre?(m.openBlock(),m.createElementBlock("span",Jue,m.toDisplayString(N(f).nombre),1)):m.createCommentVNode("",!0)])]))),128)),t.value?(m.openBlock(),m.createElementBlock("div",$ue,b[3]||(b[3]=[m.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):m.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-68c1aac1"]]),Yue={class:"prematch-bg"},Que={class:"subtitle"},ede={class:"jornada"},tde={class:"fecha"},rde={class:"teams-row"},nde={class:"team team-local"},ade={class:"escudo-svg"},ide=["src"],ode={class:"team team-visitor"},sde={class:"escudo-svg"},lde=["src"],cde=xs({__name:"AnalisisPrematchType4",props:{report:{type:Object,default:()=>({})}},setup(a){function d(j){return j?j.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;return(j,ae)=>(m.openBlock(),m.createElementBlock("div",Yue,[ae[1]||(ae[1]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),m.createElementVNode("div",Que,[m.createElementVNode("span",ede,m.toDisplayString(d(A.report.game.matchday_name)),1),m.createElementVNode("span",tde," - "+m.toDisplayString(m.unref(Pd)(A.report.game.date_time_utc)),1)]),m.createElementVNode("div",rde,[m.createElementVNode("div",nde,[m.createElementVNode("span",ade,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.home_team+".png"},null,8,ide)])]),ae[0]||(ae[0]=m.createElementVNode("div",{class:"divider-line"},[m.createElementVNode("div",{class:"dotted-line"})],-1)),m.createElementVNode("div",ode,[m.createElementVNode("span",sde,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+A.report.game.visiting_team+".png"},null,8,lde)])])])]))}},[["__scopeId","data-v-ef3bf0e5"]]),ude={class:"prematch-bg"},dde={class:"background-shields"},hde={class:"shield-left"},pde=["src"],fde={class:"shield-right"},mde=["src"],gde={class:"subtitle"},yde={class:"jornada"},vde={class:"fecha"},bde={class:"teams-row"},xde={class:"team team-local"},_de={class:"team-header"},wde={class:"escudo-svg"},kde=["src"],Tde={class:"score"},Sde={class:"players-list"},Ade={class:"player-name"},Ede={key:0,class:"more-events-indicator"},Cde={class:"team team-visitor"},Mde={class:"team-header"},Pde={class:"score"},Lde={class:"escudo-svg"},zde=["src"],Nde={class:"players-list"},Ode={class:"player-name"},Rde={key:0},Dde={key:0,class:"more-events-indicator"},Ide=xs({__name:"AnalisisPostMatchType4",props:{report:{type:Object,default:()=>({})}},setup(a){var x,u;function d(e){return e?e.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const A=a;console.log("Props report: ",A.report),console.log("Game minutes: ",(u=(x=A.report)==null?void 0:x.game)==null?void 0:u.report_minutes);const j=m.computed(()=>{var e,b,f;return(((f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.report_minutes)==null?void 0:f.home_goals_minutes)||[]).slice(0,5)}),ae=m.computed(()=>{var e,b,f;return(((f=(b=(e=A.report)==null?void 0:e.game)==null?void 0:b.report_minutes)==null?void 0:f.visiting_goals_minutes)||[]).slice(0,5)});function N(e){const b=Array.from(e.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),f=e.match(/^(.*?)\s*\d+'/),v=f?f[1].trim():"";return{minutos:b,nombre:v}}const E=m.computed(()=>{var b,f,v,h;return(((h=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.report_minutes)==null?void 0:v.home_goals_minutes)==null?void 0:h.length)||0)>5}),t=m.computed(()=>{var b,f,v,h;return(((h=(v=(f=(b=A.report)==null?void 0:b.game)==null?void 0:f.report_minutes)==null?void 0:v.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(e,b)=>(m.openBlock(),m.createElementBlock("div",ude,[m.createElementVNode("div",dde,[m.createElementVNode("div",hde,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,pde)]),m.createElementVNode("div",fde,[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,mde)])]),b[5]||(b[5]=m.createElementVNode("div",{class:"title"},[m.createTextVNode("Análisis "),m.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),m.createElementVNode("div",gde,[m.createElementVNode("span",yde,"Jornada "+m.toDisplayString(d(a.report.game.matchday_name)),1),m.createElementVNode("span",vde," - "+m.toDisplayString(m.unref(Pd)(a.report.game.date_time_utc)),1)]),m.createElementVNode("div",bde,[m.createElementVNode("div",xde,[m.createElementVNode("div",_de,[m.createElementVNode("span",wde,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,kde)]),m.createElementVNode("div",Tde,m.toDisplayString(a.report.game.score[0]),1)]),m.createElementVNode("div",Sde,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(j.value,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`home-event-${v}`,class:"player-item"},[m.createElementVNode("span",Ade,m.toDisplayString(f)+" ",1),b[0]||(b[0]=m.createElementVNode("span",{class:"player-icon"},[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1))]))),128)),E.value?(m.openBlock(),m.createElementBlock("div",Ede,b[1]||(b[1]=[m.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):m.createCommentVNode("",!0)])]),b[4]||(b[4]=m.createElementVNode("div",{class:"divider-line"},[m.createElementVNode("div",{class:"dotted-line"})],-1)),m.createElementVNode("div",Cde,[m.createElementVNode("div",Mde,[m.createElementVNode("div",Pde,m.toDisplayString(a.report.game.score[1]),1),m.createElementVNode("span",Lde,[m.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,zde)])]),m.createElementVNode("div",Nde,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(ae.value,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`visiting-event-${v}`,class:"player-item"},[b[2]||(b[2]=m.createElementVNode("span",{class:"player-icon"},[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),m.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),m.createElementVNode("span",Ode,[m.createTextVNode(m.toDisplayString(N(f).minutos)+" ",1),N(f).nombre?(m.openBlock(),m.createElementBlock("span",Rde," "+m.toDisplayString(N(f).nombre),1)):m.createCommentVNode("",!0)])]))),128)),t.value?(m.openBlock(),m.createElementBlock("div",Dde,b[3]||(b[3]=[m.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):m.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-5cd30395"]]),Fde={class:"report-card",style:{position:"relative"}},Vde={class:"report-img-placeholder",style:{position:"relative"}},Bde={class:"inner-card-report"},Ude={class:"report-footer"},jde={class:"report-title"},qde={class:"report-template"},Wde={class:"template-name"},Gde={class:"report-league"},Hde={class:"report-tournament"},Xde=xs({__name:"ReportItem",props:{type:{type:Number,default:1},localTeam:{type:String,default:"América"},report:{type:Object,default:()=>{}},visitorTeam:{type:String,default:"Chivas"},localScore:{type:Number,default:2},visitorScore:{type:Number,default:1},league:{type:String,default:"Liga MX"},date:{type:String,default:"15 Nov 2024"}},emits:["ver-reporte","renombrar","eliminar","edit-template","open-report","download-report"],setup(a,{emit:d}){const A=d,j=a,ae=m.ref(!1);function N(){ae.value=!1,A("open-report",j.report)}function E(){console.log("renombrar"),ae.value=!1,A("renombrar",j.report.report_name||"Reporte",j.report.id)}function t(){console.log("editar"),ae.value=!1,A("edit-template",j.report)}function x(){console.log("duplicar"),ae.value=!1}function u(){console.log("eliminar"),ae.value=!1,A("eliminar",j.report)}function e(){console.log("descargar"),A("download-report",j.report),ae.value=!1}function b(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}function f(){A("open-report",j.report)}return(v,h)=>(m.openBlock(),m.createElementBlock("div",Fde,[m.createElementVNode("div",{class:"three-dots",onClick:h[0]||(h[0]=m.withModifiers(r=>ae.value=!ae.value,["stop"]))},h[4]||(h[4]=[m.createElementVNode("span",null,null,-1),m.createElementVNode("span",null,null,-1),m.createElementVNode("span",null,null,-1)])),m.createElementVNode("div",Vde,[a.report.template_type===1&&a.report.pages[0].type==1?(m.openBlock(),m.createBlock(qle,{key:0,"local-team":a.localTeam,"visitor-team":a.visitorTeam,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","league","date","report"])):a.report.template_type===2&&a.report.pages[0].type==1?(m.openBlock(),m.createBlock(xce,{key:1,"local-team":a.localTeam,"visitor-team":a.visitorTeam,"local-score":a.localScore,"visitor-score":a.visitorScore,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):m.createCommentVNode("",!0),a.report.template_type===1&&a.report.pages[0].type==2?(m.openBlock(),m.createBlock(Oce,{key:2,"local-team":a.localTeam,"visitor-team":a.visitorTeam,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","league","date","report"])):a.report.template_type===2&&a.report.pages[0].type==2?(m.openBlock(),m.createBlock(due,{key:3,"local-team":a.localTeam,"visitor-team":a.visitorTeam,"local-score":a.localScore,"visitor-score":a.visitorScore,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):m.createCommentVNode("",!0),a.report.template_type===1&&a.report.pages[0].type==3?(m.openBlock(),m.createBlock(kue,{key:4,"local-team":a.localTeam,"visitor-team":a.visitorTeam,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","league","date","report"])):a.report.template_type===2&&a.report.pages[0].type==3?(m.openBlock(),m.createBlock(Zue,{key:5,"local-team":a.localTeam,"visitor-team":a.visitorTeam,"local-score":a.localScore,"visitor-score":a.visitorScore,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):a.report.template_type===1&&a.report.pages[0].type==4?(m.openBlock(),m.createBlock(cde,{key:6,"local-team":a.localTeam,"visitor-team":a.visitorTeam,"local-score":a.localScore,"visitor-score":a.visitorScore,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):a.report.template_type===2&&a.report.pages[0].type==4?(m.openBlock(),m.createBlock(Ide,{key:7,"local-team":a.localTeam,"visitor-team":a.visitorTeam,"local-score":a.localScore,"visitor-score":a.visitorScore,league:a.league,date:a.date,report:a.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):m.createCommentVNode("",!0),m.createElementVNode("div",{class:"report-img-overlay"},[m.createElementVNode("button",{class:"report-img-button",onClick:f},"Ver reporte")])]),m.createElementVNode("div",Bde,[m.createElementVNode("div",Ude,[m.createElementVNode("div",jde,m.toDisplayString(a.report.report_name),1),m.createElementVNode("div",qde,[h[5]||(h[5]=m.createTextVNode(" Template: ",-1)),m.createElementVNode("span",Wde,m.toDisplayString(a.report.name),1)]),m.createElementVNode("div",Gde,m.toDisplayString(a.report.season_name)+" - "+m.toDisplayString(b(a.report.game.matchday_name))+" | "+m.toDisplayString(m.unref(Pd)(a.report.game.date_time_utc)),1),m.createElementVNode("div",Hde,m.toDisplayString(a.report.tournament_name),1)])]),ae.value?(m.openBlock(),m.createBlock(Mle,{key:0,onClick:h[1]||(h[1]=m.withModifiers(r=>ae.value=!1,["self"])),onMouseleave:h[2]||(h[2]=r=>ae.value=!1),onVerReporte:N,onRenombrar:E,onEditar:t,onDuplicar:x,onEliminar:u,onDescargar:e})):m.createCommentVNode("",!0),ae.value?(m.openBlock(),m.createElementBlock("div",{key:1,class:"tooltip-overlay",onClick:h[3]||(h[3]=r=>ae.value=!1)})):m.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a75289c7"]]),Kde={class:"modal-overlay"},Jde={class:"modal-content"},$de={class:"modal-body"},Zde=["placeholder","disabled"],Yde={key:0,class:"error-message"},Qde={class:"modal-footer"},ehe=["disabled"],the=["disabled"],rhe={key:0},nhe={key:1},ahe=xs({__name:"ModalRenameReporte",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:[String,Number],required:!0},reportId:{type:[String,Number],required:!0}},emits:["close","rename","refresh"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(A.initialName),N=m.ref(!1),E=m.ref("");m.watch(()=>A.initialName,x=>{ae.value=x,E.value=""});async function t(){var x;if(console.log("acceptRename"),!(ae.value.trim().length<3)){console.log("acceptRename 22"),N.value=!0,E.value="";try{await Qi.create({headers:{Authorization:`${A.token}`}}).put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/reports/${A.reportId}/rename`,{name:ae.value.trim()}),j("rename",ae.value.trim()),j("refresh"),j("close")}catch(u){console.error("Error al renombrar el reporte:",u),((x=u.response)==null?void 0:x.status)===409?E.value="Ya existe un reporte con el mismo nombre":E.value="Error al renombrar el reporte. Inténtalo de nuevo."}finally{N.value=!1}}}return m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""}),(x,u)=>(m.openBlock(),m.createElementBlock("div",Kde,[m.createElementVNode("div",Jde,[m.createElementVNode("button",{class:"close-btn",onClick:u[0]||(u[0]=e=>x.$emit("close"))},u[3]||(u[3]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),u[5]||(u[5]=m.createElementVNode("div",{class:"modal-header"},[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),m.createElementVNode("span",{class:"modal-title"},"Renombrar Reporte")],-1)),u[6]||(u[6]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",$de,[u[4]||(u[4]=m.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),m.withDirectives(m.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":u[1]||(u[1]=e=>ae.value=e),placeholder:a.initialName,maxlength:"40",autocomplete:"off",disabled:N.value},null,8,Zde),[[m.vModelText,ae.value]]),E.value?(m.openBlock(),m.createElementBlock("div",Yde,m.toDisplayString(E.value),1)):m.createCommentVNode("",!0)]),u[7]||(u[7]=m.createElementVNode("div",{class:"header-separator"},null,-1)),m.createElementVNode("div",Qde,[m.createElementVNode("button",{class:"cancel-btn",onClick:u[2]||(u[2]=e=>x.$emit("close")),disabled:N.value},"Cancelar",8,ehe),m.createElementVNode("button",{class:"next-btn",disabled:ae.value.trim().length<3||N.value,onClick:t},[N.value?(m.openBlock(),m.createElementBlock("span",rhe,"Guardando...")):(m.openBlock(),m.createElementBlock("span",nhe,"Guardar"))],8,the)])])]))}},[["__scopeId","data-v-21795291"]]),ihe={class:"modal-overlay"},ohe={class:"modal-content"},she={class:"modal-footer"},lhe=["disabled"],che=["disabled"],uhe=xs({__name:"ModalDeleteReport",props:{reportId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","reportDeleted"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref(!1),N=async()=>{try{ae.value=!0;const t=await Qi.create({headers:{Authorization:`${A.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/reports/${A.reportId}`);console.log("Reporte eliminado exitosamente:",t.data),j("reportDeleted",A.reportId),j("close")}catch(E){console.error("Error al eliminar el reporte:",E),alert("Error al eliminar el reporte. Por favor, intenta de nuevo.")}finally{ae.value=!1}};return m.onMounted(()=>{document.body.style.overflow="hidden"}),m.onUnmounted(()=>{document.body.style.overflow=""}),(E,t)=>(m.openBlock(),m.createElementBlock("div",ihe,[m.createElementVNode("div",ohe,[m.createElementVNode("button",{class:"close-btn",onClick:t[0]||(t[0]=x=>E.$emit("close"))},t[2]||(t[2]=[m.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),t[3]||(t[3]=m.createStaticVNode('<div class="modal-header" data-v-faeee5ba><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-faeee5ba><span class="modal-title" data-v-faeee5ba>Eliminar reporte</span></div><div class="header-separator" data-v-faeee5ba></div><div class="modal-body confirm-text" data-v-faeee5ba> ¿Estás seguro que deseas eliminar<br data-v-faeee5ba> este reporte? Si lo haces no habrá manera<br data-v-faeee5ba> de recuperarlo. </div><div class="header-separator" data-v-faeee5ba></div>',4)),m.createElementVNode("div",she,[m.createElementVNode("button",{class:"cancel-btn",onClick:t[1]||(t[1]=x=>E.$emit("close")),disabled:ae.value},"Cancelar",8,lhe),m.createElementVNode("button",{class:"delete-btn",onClick:N,disabled:ae.value},m.toDisplayString(ae.value?"Eliminando...":"Eliminar"),9,che)])])]))}},[["__scopeId","data-v-faeee5ba"]]),dhe={class:"reports-header"},hhe={class:"count"},phe={key:0,class:"sort-options"},fhe=["onClick"],mhe={key:0,class:"checkmark"},ghe={key:0,class:"loading-state"},yhe={key:1,class:"error-state"},vhe={key:3,class:"empty-reports"},bhe={key:4,class:"empty-reports"},xhe=xs({__name:"ReportsSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["open-report"],setup(a,{emit:d}){const A=a,j=d,ae=m.ref([]),N=m.ref(!1),E=m.ref(null),t=m.computed(()=>{let V=ae.value;if(A.searchQuery.trim()){const U=A.searchQuery.toLowerCase().trim();V=ae.value.filter(W=>{var re,ee,J,Z,ce,de,he;return!!((((re=W.report_name)==null?void 0:re.toLowerCase())||"").includes(U)||(((ee=W.name)==null?void 0:ee.toLowerCase())||"").includes(U)||W.created_at&&new Date(W.created_at).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(U)||(J=W.game)!=null&&J.date_time_utc&&new Date(W.game.date_time_utc).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(U)||(((ce=(Z=W.game)==null?void 0:Z.season_name)==null?void 0:ce.toLowerCase())||"").includes(U)||(((de=W.tournament_name)==null?void 0:de.toLowerCase())||"").includes(U)||(he=W.game)!=null&&he.matchday&&W.game.matchday.toString().includes(U))})}return u.value&&(V=[...V].sort((U,W)=>{var q,$;if(u.value==="A - Z"){const te=(U.report_name||"").toLowerCase(),X=(W.report_name||"").toLowerCase();return te.localeCompare(X,"es",{sensitivity:"base"})}else if(u.value==="Más recientes"){const te=new Date(U.created_at||0);return new Date(W.created_at||0)-te}else if(u.value==="Torneo"){const te=(U.tournament_name||"").toLowerCase(),X=(W.tournament_name||"").toLowerCase();if(te!==X)return te.localeCompare(X,"es",{sensitivity:"base"});const re=U.season_id||0;return(W.season_id||0)-re}else if(u.value==="Jornada"){const te=((q=U.game)==null?void 0:q.matchday_id)||0,X=(($=W.game)==null?void 0:$.matchday_id)||0;return te-X}return 0})),V}),x=m.ref(!1),u=m.ref("Más recientes"),e=m.ref(!1),b=m.ref(""),f=m.ref(""),v=m.ref(""),h=m.ref(!1),r=m.ref(""),n=m.ref(""),c=m.ref(null),o=m.ref(null),l=m.ref(null),p=m.ref(0),g=[{label:"A - Z",value:"A - Z"},{label:"Más recientes",value:"Más recientes"},{label:"Torneo",value:"Torneo"},{label:"Jornada",value:"Jornada"}],w=async()=>{N.value=!0,E.value=null;try{const V=await Qi.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${A.userId}/reports`,{headers:{Authorization:`${A.token}`,"Content-Type":"application/json"}});V.data&&Array.isArray(V.data)?ae.value=V.data:V.data&&V.data.reports?ae.value=V.data.reports:V.data&&V.data.data?ae.value=V.data.data:ae.value=[]}catch(V){console.error("Error cargando reportes:",V),console.error("Error response:",V.response),E.value=V.message||"Error al cargar los reportes",ae.value=[]}finally{N.value=!1}},S=m.computed(()=>{if(!p.value)return"grid-1-column";const V=340,U=20,q=p.value-40,$=Math.floor((q+U)/(V+U)),te=Math.max(1,$);return te>=4?"grid-4-columns":te>=3?"grid-3-columns":te>=2?"grid-2-columns":"grid-1-column"}),T=()=>{x.value=!x.value},M=V=>{console.log("Ordenando por:",V),u.value=V,x.value=!1};function L(V){console.log("reports section onOpenReport",V),j("open-report",V)}const k=(V,U)=>{b.value=V,f.value=U;const W=ae.value.find(q=>q.id===U);v.value=W?W.template_type:"",e.value=!0},P=V=>{console.log("Renombrar reporte de",b.value,"a",V),e.value=!1;const U=ae.value.findIndex(W=>W.id===f.value);U!==-1&&(ae.value[U].report_name=V)},C=V=>{r.value=V.report_name||"Reporte",n.value=V.id,h.value=!0},_=V=>{h.value=!1,ae.value=ae.value.filter(U=>U.id!==V)};function z(V){console.log("Descargando reporte:",V),j("download-report",V)}const y=V=>{x.value&&c.value&&!c.value.contains(V.target)&&(x.value=!1)},O=()=>{o.value&&(p.value=o.value.offsetWidth)};let I=null;return m.onMounted(async()=>{document.addEventListener("mousedown",y),await w(),await m.nextTick(),O(),window.ResizeObserver?(I=new ResizeObserver(()=>{O()}),o.value&&I.observe(o.value)):window.addEventListener("resize",O)}),m.onBeforeUnmount(()=>{document.removeEventListener("mousedown",y),I?I.disconnect():window.removeEventListener("resize",O)}),(V,U)=>(m.openBlock(),m.createElementBlock("div",{class:"reports-section",ref_key:"reportsSectionRef",ref:o},[m.createElementVNode("div",dhe,[m.createElementVNode("span",null,[U[2]||(U[2]=m.createTextVNode("Reportes ",-1)),m.createElementVNode("span",hhe,"("+m.toDisplayString(t.value.length)+")",1)]),m.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:c},[m.createElementVNode("button",{class:"sort-button",onClick:T},[m.createTextVNode(m.toDisplayString(u.value||"Ordenar")+" ",1),m.createElementVNode("span",{class:m.normalizeClass(["dropdown-arrow",{rotated:x.value}])},null,2)]),x.value?(m.openBlock(),m.createElementBlock("div",phe,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(g,W=>m.createElementVNode("div",{key:W.value,class:m.normalizeClass(["sort-option",{selected:u.value===W.value}]),onClick:q=>u.value!==W.value&&M(W.value)},[m.createElementVNode("span",null,m.toDisplayString(W.label),1),u.value===W.value?(m.openBlock(),m.createElementBlock("span",mhe,U[3]||(U[3]=[m.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):m.createCommentVNode("",!0)],10,fhe)),64))])):m.createCommentVNode("",!0)],512)]),N.value?(m.openBlock(),m.createElementBlock("div",ghe,U[4]||(U[4]=[m.createElementVNode("div",{class:"loading-spinner"},null,-1),m.createElementVNode("p",null,"Cargando reportes...",-1)]))):E.value?(m.openBlock(),m.createElementBlock("div",yhe,[m.createElementVNode("p",null,"Error al cargar reportes: "+m.toDisplayString(E.value),1),m.createElementVNode("button",{onClick:w,class:"retry-button"},"Reintentar")])):(m.openBlock(),m.createElementBlock("div",{key:2,class:m.normalizeClass(["reports-grid",S.value]),ref_key:"reportsGridRef",ref:l},[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(t.value,W=>(m.openBlock(),m.createBlock(Xde,{key:W.id,report:W,onOpenReport:L,onRenombrar:k,onEliminar:C,onDownloadReport:z},null,8,["report"]))),128))],2)),!N.value&&!E.value&&ae.value.length===0?(m.openBlock(),m.createElementBlock("div",vhe," No tienes reportes aún. ")):m.createCommentVNode("",!0),!N.value&&!E.value&&ae.value.length>0&&t.value.length===0?(m.openBlock(),m.createElementBlock("div",bhe," No se encontraron reportes que coincidan con tu búsqueda. ")):m.createCommentVNode("",!0),e.value?(m.openBlock(),m.createBlock(ahe,{key:5,initialName:b.value,templateType:v.value,token:a.token,userId:a.userId,reportId:f.value,onClose:U[0]||(U[0]=W=>e.value=!1),onRename:P,onRefresh:w},null,8,["initialName","templateType","token","userId","reportId"])):m.createCommentVNode("",!0),h.value?(m.openBlock(),m.createBlock(uhe,{key:6,"report-id":n.value,"user-id":a.userId,token:a.token,onClose:U[1]||(U[1]=W=>h.value=!1),onReportDeleted:_},null,8,["report-id","user-id","token"])):m.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-70130c65"]]),_he={class:"modal-overlay"},whe={class:"modal-content"},khe=xs({__name:"ModalSoloEscritorio",setup(a){return(d,A)=>(m.openBlock(),m.createElementBlock("div",_he,[m.createElementVNode("div",whe,[A[1]||(A[1]=m.createStaticVNode('<div class="modal-icon" data-v-30303ebd><svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-30303ebd><rect x="8" y="10" width="32" height="20" rx="2" stroke="#C0CBE0" stroke-width="2" data-v-30303ebd></rect><rect x="16" y="34" width="16" height="2" rx="1" fill="#C0CBE0" data-v-30303ebd></rect></svg></div><div class="modal-text" data-v-30303ebd> Esta sección solo está disponible para<br data-v-30303ebd> escritorio. Utiliza tu computadora <br data-v-30303ebd>para ingresar. </div>',2)),m.createElementVNode("button",{class:"modal-btn",onClick:A[0]||(A[0]=j=>d.$emit("toHome"))},"OK")])]))}},[["__scopeId","data-v-30303ebd"]]),The={class:"top-bar"},She={class:"tabs-container"},Ahe={class:"tabs"},Ehe={key:0,class:"actions"},Che={class:"search-container"},Mhe={key:1,class:"actions"},Phe={class:"search-container"},Lhe=xs({__name:"gsc-reports",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0}},emits:["toHome","download-report"],setup(a,{emit:d}){const A=a,{userId:j,team:ae,token:N}=A,E=m.ref("templates"),t=m.ref(!1),x=m.ref(null),u=m.ref(!1),e=m.ref(""),b=m.ref(""),f=m.ref(null),v=d;function h(){if(x.value){const w=x.value.offsetWidth;t.value=w<1028}}m.watch(t,w=>{w?document.body.style.overflow="hidden":document.body.style.overflow=""}),m.onBeforeUnmount(()=>{document.body.style.overflow=""}),m.onMounted(()=>{h(),window.addEventListener("resize",h)}),m.onBeforeUnmount(()=>{window.removeEventListener("resize",h)});function r(w){console.log("onOpenModalNewTemplate, gsc-reports:",w),n(w)}function n(w){console.log("onEditTemplate, template:",w),f.value.show({template:w,isTemplateMode:!0})}const c=()=>{e.value=""},o=()=>{b.value=""};function l(w){console.log("gsc-report onOpenReport, report:",w),f.value&&f.value.show({template:w,isTemplateMode:!1})}function p(w){v("download-report",w)}function g(){v("toHome")}return(w,S)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(m.unref(pie),{ref_key:"reportTemplateMaker",ref:f,token:m.unref(N)},null,8,["token"]),m.createElementVNode("div",{ref_key:"containerRef",ref:x,class:"reports-container"},[t.value?(m.openBlock(),m.createBlock(khe,{key:0,onToHome:g})):m.createCommentVNode("",!0),S[12]||(S[12]=m.createElementVNode("h1",{class:"title"},"Mis reportes",-1)),m.createElementVNode("div",The,[m.createElementVNode("div",She,[m.createElementVNode("div",Ahe,[m.createElementVNode("div",{class:m.normalizeClass(["tab tab-templates",{active:E.value==="templates"}]),onClick:S[0]||(S[0]=T=>E.value="templates")}," Templates ",2),m.createElementVNode("div",{class:m.normalizeClass(["tab tab-reports",{active:E.value==="reports"}]),onClick:S[1]||(S[1]=T=>E.value="reports")}," Tus reportes ",2)])]),E.value==="templates"?(m.openBlock(),m.createElementBlock("div",Ehe,[m.createElementVNode("div",Che,[S[8]||(S[8]=m.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":S[2]||(S[2]=T=>e.value=T),class:"search",type:"text",placeholder:"Buscar template"},null,512),[[m.vModelText,e.value]]),e.value?(m.openBlock(),m.createElementBlock("button",{key:0,onClick:c,class:"clear-search-btn",type:"button"},S[7]||(S[7]=[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):m.createCommentVNode("",!0)]),m.createElementVNode("button",{class:"create-template-btn",onClick:S[3]||(S[3]=T=>u.value=!0)},S[9]||(S[9]=[m.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-agregar@3x.png",alt:"Agregar",class:"create-icon"},null,-1),m.createTextVNode(" Crear template ",-1)]))])):m.createCommentVNode("",!0),E.value==="reports"?(m.openBlock(),m.createElementBlock("div",Mhe,[m.createElementVNode("div",Phe,[S[11]||(S[11]=m.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":S[4]||(S[4]=T=>b.value=T),class:"search search-reports",type:"text",placeholder:"Buscar reporte"},null,512),[[m.vModelText,b.value]]),b.value?(m.openBlock(),m.createElementBlock("button",{key:0,onClick:o,class:"clear-search-btn",type:"button"},S[10]||(S[10]=[m.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):m.createCommentVNode("",!0)])])):m.createCommentVNode("",!0)]),E.value==="templates"?(m.openBlock(),m.createBlock(Ele,{key:1,userId:m.unref(j),token:m.unref(N),team:m.unref(ae),searchQuery:e.value,onSwitchToReports:S[5]||(S[5]=T=>E.value="reports"),onOpenModalNewTemplate:r,onEditTemplate:n},null,8,["userId","token","team","searchQuery"])):(m.openBlock(),m.createBlock(xhe,{key:2,userId:m.unref(j),token:m.unref(N),team:m.unref(ae),searchQuery:b.value,onOpenReport:l,onDownloadReport:p},null,8,["userId","token","team","searchQuery"])),u.value?(m.openBlock(),m.createBlock(C4,{key:3,token:m.unref(N),team:m.unref(ae),onOpenModalNewTemplate:r,onClose:S[6]||(S[6]=T=>u.value=!1)},null,8,["token","team"])):m.createCommentVNode("",!0)],512)],64))}},[["__scopeId","data-v-df5ec613"]]),zhe={class:"subcategory-group"},Nhe={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(a){return(d,A)=>(m.openBlock(),m.createElementBlock("div",zhe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(a.subcategoryGroup,j=>(m.openBlock(),m.createBlock(m.unref(f1),{key:j.id,modelValue:j.isSelected,"onUpdate:modelValue":ae=>j.isSelected=ae,label:j.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},Ohe=Qc(Nhe,[["__scopeId","data-v-ae6f3d72"]]),Rhe={class:"filter-subcategories"},Dhe=Object.freeze(Object.defineProperty({__proto__:null,default:Qc({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(a){return(d,A)=>(m.openBlock(),m.createElementBlock("div",Rhe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(a.subcategoryGroups,j=>(m.openBlock(),m.createElementBlock("div",{key:j.id,class:"filter-subcategories__group"},[m.createVNode(Ohe,{subcategoryGroup:j},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),Dg=a=>(m.pushScopeId("data-v-80d9c265"),a=a(),m.popScopeId(),a),Ihe={class:"details__header"},Fhe=Dg(()=>m.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),Vhe={class:"details__header__checkbox"},Bhe={class:"details__body"},Uhe={class:"details__body__playing-as"},jhe=["onClick"],qhe={class:"details__header"},Whe=Dg(()=>m.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),Ghe={class:"details__header__checkbox"},Hhe={class:"details__body"},Xhe=Dg(()=>m.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),Khe={class:"details__body__game-section"},Jhe=["onClick"],$he={class:"details__body"},Zhe=Dg(()=>m.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),Yhe={class:"details__body__game-section"},Qhe=["onClick"],epe=Object.freeze(Object.defineProperty({__proto__:null,default:Qc({__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(a){const d=a;m.useCssVars(e=>({"49cba245":a.buttonsBackgroundColor,"52f02da6":a.buttonsTextColor,"7d3f686a":a.buttonsBorderWidth,"7c286a07":a.buttonsBorderColor,"24a6f4aa":a.buttonsBackgroundColorActive,cd8d7768:a.buttonsTextColorActive,"35fa5c10":a.buttonsBorderWidthActive,"0cde1826":a.buttonsBorderColorActive}));const A=m.computed(()=>d.playingAs.every(e=>e.isSelected)),j=m.computed(()=>d.gameSections.every(e=>e.isSelected)),ae=m.computed(()=>d.gameSections.reduce((e,b)=>(b.value<=3?e.firstHalf.push(b):e.secondHalf.push(b),e),{firstHalf:[],secondHalf:[]})),N=m.computed(()=>({"--border-radius-first-button":`${d.buttonsBorderRadius} 0 0 ${d.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${d.buttonsBorderRadius} ${d.buttonsBorderRadius} 0`}));function E(e){e?d.playingAs.forEach(b=>{b.isSelected=!0}):d.playingAs.forEach((b,f)=>{b.isSelected=f===0})}function t(e){d.playingAs.filter(b=>b.isSelected).length===1&&e.isSelected||(e.isSelected=!e.isSelected)}function x(e){d.gameSections.filter(b=>b.isSelected).length===1&&e.isSelected||(e.isSelected=!e.isSelected)}function u(e){e?d.gameSections.forEach(b=>{b.isSelected=!0}):d.gameSections.forEach((b,f)=>{b.isSelected=f===0})}return(e,b)=>(m.openBlock(),m.createElementBlock("div",{class:"details",style:m.normalizeStyle(N.value)},[m.createElementVNode("div",Ihe,[Fhe,m.createElementVNode("div",Vhe,[m.createVNode(m.unref(f1),{label:"Todos","model-value":A.value,"onUpdate:modelValue":E},null,8,["model-value"])])]),m.createElementVNode("div",Bhe,[m.createElementVNode("div",Uhe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(d.playingAs,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`pa${v}`,class:m.normalizeClass(["details__body__button",{active:f.isSelected}]),onClick:h=>t(f)},m.toDisplayString(f.name),11,jhe))),128))])]),m.createElementVNode("div",qhe,[Whe,m.createElementVNode("div",Ghe,[m.createVNode(m.unref(f1),{label:"Todos","model-value":j.value,"onUpdate:modelValue":u},null,8,["model-value"])])]),m.createElementVNode("div",Hhe,[Xhe,m.createElementVNode("div",Khe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(ae.value.firstHalf,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`pa${v}`,class:m.normalizeClass(["details__body__button",{active:f.isSelected}]),onClick:h=>x(f)},m.toDisplayString(f.text),11,Jhe))),128))])]),m.createElementVNode("div",$he,[Zhe,m.createElementVNode("div",Yhe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(ae.value.secondHalf,(f,v)=>(m.openBlock(),m.createElementBlock("div",{key:`pa${v}`,class:m.normalizeClass(["details__body__button",{active:f.isSelected}]),onClick:h=>x(f)},m.toDisplayString(f.text),11,Qhe))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),tpe={class:"filter-field"},rpe=Object.freeze(Object.defineProperty({__proto__:null,default:Qc({__name:"FilterField",setup(a){const d=m.ref(Array.from({length:16},(j,ae)=>ae+1));function A(){}return(j,ae)=>(m.openBlock(),m.createElementBlock("div",tpe,[m.createVNode(m.unref(mL),{width:"100%","background-color":"#2E3B46",value:d.value,"onUpdate:modelValue":A},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));yh.GSCReports=Lhe,Object.defineProperty(yh,Symbol.toStringTag,{value:"Module"})});
|