@golstats/gsc-reports 1.0.65 → 1.0.66

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.
Files changed (31) hide show
  1. package/README.md +2 -2
  2. package/dist/{FilterConditions-55d68355-DMqzcKBO-BmIhhD-B-C4qyyd53.js → FilterConditions-55d68355-DMqzcKBO-BmIhhD-B-BGQIEaLr.js} +1 -1
  3. package/dist/{FilterField-59a73e38-CNaE03Ge-BTX2xPpF-DyOvLsHN.js → FilterField-59a73e38-CNaE03Ge-BTX2xPpF-D9vcJGsy.js} +1 -1
  4. package/dist/{FilterSubcategories-a9b32cc9-_h5FCZ4r-DZeIIQAW-AfkN74dp.js → FilterSubcategories-a9b32cc9-_h5FCZ4r-DZeIIQAW-CLBX_KE1.js} +1 -1
  5. package/dist/css/fonts.css +83 -83
  6. package/dist/gsc-reports.css +1 -1
  7. package/dist/gsc-reports.es.js +1 -1
  8. package/dist/gsc-reports.umd.js +5 -5
  9. package/dist/{index-C5ej7_M-.js → index-Bt6tyu0M.js} +27 -27
  10. package/package.json +1 -1
  11. package/src/components/elementsTemplates/ModalDeleteReport.vue +246 -246
  12. package/src/components/elementsTemplates/ModalDeleteTemplate.vue +249 -249
  13. package/src/components/elementsTemplates/ModalRenameReporte.vue +330 -330
  14. package/src/components/elementsTemplates/ModalRenameTemplate.vue +337 -337
  15. package/src/components/elementsTemplates/ModalSoloEscritorio.vue +83 -83
  16. package/src/components/elementsTemplates/ModalduplicateTemplate.vue +300 -300
  17. package/src/components/elementsTemplates/ReportItem.vue +14 -14
  18. package/src/components/elementsTemplates/TooltipReportOptions.vue +97 -97
  19. package/src/components/elementsTemplates/TooltipTemplateOptions.vue +168 -168
  20. package/src/components/filters.vue +935 -935
  21. package/src/components/thumbnails-reports/AnalisisPostMatchType1.vue +741 -741
  22. package/src/components/thumbnails-reports/AnalisisPostMatchType2.vue +743 -743
  23. package/src/components/thumbnails-reports/AnalisisPostMatchType3.vue +441 -441
  24. package/src/components/thumbnails-reports/AnalisisPostMatchType4.vue +440 -440
  25. package/src/components/thumbnails-reports/AnalisisPrematchType1.vue +232 -232
  26. package/src/components/thumbnails-reports/AnalisisPrematchType2.vue +231 -231
  27. package/src/components/thumbnails-reports/AnalisisPrematchType3.vue +173 -173
  28. package/src/components/thumbnails-reports/AnalisisPrematchType4.vue +173 -173
  29. package/src/index.js +4 -4
  30. package/src/types.d.ts +45 -45
  31. package/src/utils/dateUtils.js +52 -52
@@ -4083,16 +4083,16 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4083
4083
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...g){const B=new this(a);return g.forEach(J=>B.set(J)),B}static accessor(a){const B=(this[tT]=this[tT]={accessors:{}}).accessors,J=this.prototype;function C(x){const e=um(x);B[e]||(Ide(J,x),B[e]=!0)}return Hn.isArray(a)?a.forEach(C):C(a),this}};mu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Hn.reduceDescriptors(mu.prototype,({value:r},a)=>{let g=a[0].toUpperCase()+a.slice(1);return{get:()=>r,set(B){this[g]=B}}}),Hn.freezeMethods(mu);function $2(r,a){const g=this||cm,B=a||g,J=mu.from(B.headers);let C=B.data;return Hn.forEach(r,function(e){C=e.call(g,C,J.normalize(),a?a.status:void 0)}),J.normalize(),C}function rT(r){return!!(r&&r.__CANCEL__)}function Wp(r,a,g){va.call(this,r??"canceled",va.ERR_CANCELED,a,g),this.name="CanceledError"}Hn.inherits(Wp,va,{__CANCEL__:!0});function nT(r,a,g){const B=g.config.validateStatus;!g.status||!B||B(g.status)?r(g):a(new va("Request failed with status code "+g.status,[va.ERR_BAD_REQUEST,va.ERR_BAD_RESPONSE][Math.floor(g.status/100)-4],g.config,g.request,g))}function Rde(r){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return a&&a[1]||""}function Lde(r,a){r=r||10;const g=new Array(r),B=new Array(r);let J=0,C=0,x;return a=a!==void 0?a:1e3,function(v){const u=Date.now(),t=B[C];x||(x=u),g[J]=v,B[J]=u;let w=C,y=0;for(;w!==J;)y+=g[w++],w=w%r;if(J=(J+1)%r,J===C&&(C=(C+1)%r),u-x<a)return;const b=t&&u-t;return b?Math.round(y*1e3/b):void 0}}function zde(r,a){let g=0,B=1e3/a,J,C;const x=(u,t=Date.now())=>{g=t,J=null,C&&(clearTimeout(C),C=null),r(...u)};return[(...u)=>{const t=Date.now(),w=t-g;w>=B?x(u,t):(J=u,C||(C=setTimeout(()=>{C=null,x(J)},B-w)))},()=>J&&x(J)]}const hy=(r,a,g=3)=>{let B=0;const J=Lde(50,250);return zde(C=>{const x=C.loaded,e=C.lengthComputable?C.total:void 0,v=x-B,u=J(v),t=x<=e;B=x;const w={loaded:x,total:e,progress:e?x/e:void 0,bytes:v,rate:u||void 0,estimated:u&&e&&t?(e-x)/u:void 0,event:C,lengthComputable:e!=null,[a?"download":"upload"]:!0};r(w)},g)},iT=(r,a)=>{const g=r!=null;return[B=>a[0]({lengthComputable:g,total:r,loaded:B}),a[1]]},aT=r=>(...a)=>Hn.asap(()=>r(...a)),Dde=Nc.hasStandardBrowserEnv?((r,a)=>g=>(g=new URL(g,Nc.origin),r.protocol===g.protocol&&r.host===g.host&&(a||r.port===g.port)))(new URL(Nc.origin),Nc.navigator&&/(msie|trident)/i.test(Nc.navigator.userAgent)):()=>!0,Bde=Nc.hasStandardBrowserEnv?{write(r,a,g,B,J,C){const x=[r+"="+encodeURIComponent(a)];Hn.isNumber(g)&&x.push("expires="+new Date(g).toGMTString()),Hn.isString(B)&&x.push("path="+B),Hn.isString(J)&&x.push("domain="+J),C===!0&&x.push("secure"),document.cookie=x.join("; ")},read(r){const a=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vde(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Fde(r,a){return a?r.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):r}function oT(r,a,g){let B=!Vde(a);return r&&(B||g==!1)?Fde(r,a):a}const sT=r=>r instanceof mu?{...r}:r;function Qh(r,a){a=a||{};const g={};function B(u,t,w,y){return Hn.isPlainObject(u)&&Hn.isPlainObject(t)?Hn.merge.call({caseless:y},u,t):Hn.isPlainObject(t)?Hn.merge({},t):Hn.isArray(t)?t.slice():t}function J(u,t,w,y){if(Hn.isUndefined(t)){if(!Hn.isUndefined(u))return B(void 0,u,w,y)}else return B(u,t,w,y)}function C(u,t){if(!Hn.isUndefined(t))return B(void 0,t)}function x(u,t){if(Hn.isUndefined(t)){if(!Hn.isUndefined(u))return B(void 0,u)}else return B(void 0,t)}function e(u,t,w){if(w in a)return B(u,t);if(w in r)return B(void 0,u)}const v={url:C,method:C,data:C,baseURL:x,transformRequest:x,transformResponse:x,paramsSerializer:x,timeout:x,timeoutMessage:x,withCredentials:x,withXSRFToken:x,adapter:x,responseType:x,xsrfCookieName:x,xsrfHeaderName:x,onUploadProgress:x,onDownloadProgress:x,decompress:x,maxContentLength:x,maxBodyLength:x,beforeRedirect:x,transport:x,httpAgent:x,httpsAgent:x,cancelToken:x,socketPath:x,responseEncoding:x,validateStatus:e,headers:(u,t,w)=>J(sT(u),sT(t),w,!0)};return Hn.forEach(Object.keys({...r,...a}),function(t){const w=v[t]||J,y=w(r[t],a[t],t);Hn.isUndefined(y)&&w!==e||(g[t]=y)}),g}const lT=r=>{const a=Qh({},r);let{data:g,withXSRFToken:B,xsrfHeaderName:J,xsrfCookieName:C,headers:x,auth:e}=a;a.headers=x=mu.from(x),a.url=Z6(oT(a.baseURL,a.url,a.allowAbsoluteUrls),r.params,r.paramsSerializer),e&&x.set("Authorization","Basic "+btoa((e.username||"")+":"+(e.password?unescape(encodeURIComponent(e.password)):"")));let v;if(Hn.isFormData(g)){if(Nc.hasStandardBrowserEnv||Nc.hasStandardBrowserWebWorkerEnv)x.setContentType(void 0);else if((v=x.getContentType())!==!1){const[u,...t]=v?v.split(";").map(w=>w.trim()).filter(Boolean):[];x.setContentType([u||"multipart/form-data",...t].join("; "))}}if(Nc.hasStandardBrowserEnv&&(B&&Hn.isFunction(B)&&(B=B(a)),B||B!==!1&&Dde(a.url))){const u=J&&C&&Bde.read(C);u&&x.set(J,u)}return a},jde=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(g,B){const J=lT(r);let C=J.data;const x=mu.from(J.headers).normalize();let{responseType:e,onUploadProgress:v,onDownloadProgress:u}=J,t,w,y,b,h;function n(){b&&b(),h&&h(),J.cancelToken&&J.cancelToken.unsubscribe(t),J.signal&&J.signal.removeEventListener("abort",t)}let i=new XMLHttpRequest;i.open(J.method.toUpperCase(),J.url,!0),i.timeout=J.timeout;function d(){if(!i)return;const c=mu.from("getAllResponseHeaders"in i&&i.getAllResponseHeaders()),m={data:!e||e==="text"||e==="json"?i.responseText:i.response,status:i.status,statusText:i.statusText,headers:c,config:r,request:i};nT(function(E){g(E),n()},function(E){B(E),n()},m),i=null}"onloadend"in i?i.onloadend=d:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(d)},i.onabort=function(){i&&(B(new va("Request aborted",va.ECONNABORTED,r,i)),i=null)},i.onerror=function(){B(new va("Network Error",va.ERR_NETWORK,r,i)),i=null},i.ontimeout=function(){let f=J.timeout?"timeout of "+J.timeout+"ms exceeded":"timeout exceeded";const m=J.transitional||$6;J.timeoutErrorMessage&&(f=J.timeoutErrorMessage),B(new va(f,m.clarifyTimeoutError?va.ETIMEDOUT:va.ECONNABORTED,r,i)),i=null},C===void 0&&x.setContentType(null),"setRequestHeader"in i&&Hn.forEach(x.toJSON(),function(f,m){i.setRequestHeader(m,f)}),Hn.isUndefined(J.withCredentials)||(i.withCredentials=!!J.withCredentials),e&&e!=="json"&&(i.responseType=J.responseType),u&&([y,h]=hy(u,!0),i.addEventListener("progress",y)),v&&i.upload&&([w,b]=hy(v),i.upload.addEventListener("progress",w),i.upload.addEventListener("loadend",b)),(J.cancelToken||J.signal)&&(t=c=>{i&&(B(!c||c.type?new Wp(null,r,i):c),i.abort(),i=null)},J.cancelToken&&J.cancelToken.subscribe(t),J.signal&&(J.signal.aborted?t():J.signal.addEventListener("abort",t)));const s=Rde(J.url);if(s&&Nc.protocols.indexOf(s)===-1){B(new va("Unsupported protocol "+s+":",va.ERR_BAD_REQUEST,r));return}i.send(C||null)})},Ude=(r,a)=>{const{length:g}=r=r?r.filter(Boolean):[];if(a||g){let B=new AbortController,J;const C=function(u){if(!J){J=!0,e();const t=u instanceof Error?u:this.reason;B.abort(t instanceof va?t:new Wp(t instanceof Error?t.message:t))}};let x=a&&setTimeout(()=>{x=null,C(new va(`timeout ${a} of ms exceeded`,va.ETIMEDOUT))},a);const e=()=>{r&&(x&&clearTimeout(x),x=null,r.forEach(u=>{u.unsubscribe?u.unsubscribe(C):u.removeEventListener("abort",C)}),r=null)};r.forEach(u=>u.addEventListener("abort",C));const{signal:v}=B;return v.unsubscribe=()=>Hn.asap(e),v}},qde=function*(r,a){let g=r.byteLength;if(g<a){yield r;return}let B=0,J;for(;B<g;)J=B+a,yield r.slice(B,J),B=J},Wde=async function*(r,a){for await(const g of Gde(r))yield*qde(g,a)},Gde=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const a=r.getReader();try{for(;;){const{done:g,value:B}=await a.read();if(g)break;yield B}}finally{await a.cancel()}},cT=(r,a,g,B)=>{const J=Wde(r,a);let C=0,x,e=v=>{x||(x=!0,B&&B(v))};return new ReadableStream({async pull(v){try{const{done:u,value:t}=await J.next();if(u){e(),v.close();return}let w=t.byteLength;if(g){let y=C+=w;g(y)}v.enqueue(new Uint8Array(t))}catch(u){throw e(u),u}},cancel(v){return e(v),J.return()}},{highWaterMark:2})},py=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",uT=py&&typeof ReadableStream=="function",Hde=py&&(typeof TextEncoder=="function"?(r=>a=>r.encode(a))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),dT=(r,...a)=>{try{return!!r(...a)}catch{return!1}},Xde=uT&&dT(()=>{let r=!1;const a=new Request(Nc.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!a}),hT=64*1024,eb=uT&&dT(()=>Hn.isReadableStream(new Response("").body)),fy={stream:eb&&(r=>r.body)};py&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(a=>{!fy[a]&&(fy[a]=Hn.isFunction(r[a])?g=>g[a]():(g,B)=>{throw new va(`Response type '${a}' is not supported`,va.ERR_NOT_SUPPORT,B)})})})(new Response);const Yde=async r=>{if(r==null)return 0;if(Hn.isBlob(r))return r.size;if(Hn.isSpecCompliantForm(r))return(await new Request(Nc.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(Hn.isArrayBufferView(r)||Hn.isArrayBuffer(r))return r.byteLength;if(Hn.isURLSearchParams(r)&&(r=r+""),Hn.isString(r))return(await Hde(r)).byteLength},Jde=async(r,a)=>{const g=Hn.toFiniteNumber(r.getContentLength());return g??Yde(a)},tb={http:gde,xhr:jde,fetch:py&&(async r=>{let{url:a,method:g,data:B,signal:J,cancelToken:C,timeout:x,onDownloadProgress:e,onUploadProgress:v,responseType:u,headers:t,withCredentials:w="same-origin",fetchOptions:y}=lT(r);u=u?(u+"").toLowerCase():"text";let b=Ude([J,C&&C.toAbortSignal()],x),h;const n=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let i;try{if(v&&Xde&&g!=="get"&&g!=="head"&&(i=await Jde(t,B))!==0){let m=new Request(a,{method:"POST",body:B,duplex:"half"}),T;if(Hn.isFormData(B)&&(T=m.headers.get("content-type"))&&t.setContentType(T),m.body){const[E,S]=iT(i,hy(aT(v)));B=cT(m.body,hT,E,S)}}Hn.isString(w)||(w=w?"include":"omit");const d="credentials"in Request.prototype;h=new Request(a,{...y,signal:b,method:g.toUpperCase(),headers:t.normalize().toJSON(),body:B,duplex:"half",credentials:d?w:void 0});let s=await fetch(h,y);const c=eb&&(u==="stream"||u==="response");if(eb&&(e||c&&n)){const m={};["status","statusText","headers"].forEach(P=>{m[P]=s[P]});const T=Hn.toFiniteNumber(s.headers.get("content-length")),[E,S]=e&&iT(T,hy(aT(e),!0))||[];s=new Response(cT(s.body,hT,E,()=>{S&&S(),n&&n()}),m)}u=u||"text";let f=await fy[Hn.findKey(fy,u)||"text"](s,r);return!c&&n&&n(),await new Promise((m,T)=>{nT(m,T,{data:f,headers:mu.from(s.headers),status:s.status,statusText:s.statusText,config:r,request:h})})}catch(d){throw n&&n(),d&&d.name==="TypeError"&&/Load failed|fetch/i.test(d.message)?Object.assign(new va("Network Error",va.ERR_NETWORK,r,h),{cause:d.cause||d}):va.from(d,d&&d.code,r,h)}})};Hn.forEach(tb,(r,a)=>{if(r){try{Object.defineProperty(r,"name",{value:a})}catch{}Object.defineProperty(r,"adapterName",{value:a})}});const pT=r=>`- ${r}`,Kde=r=>Hn.isFunction(r)||r===null||r===!1,fT={getAdapter:r=>{r=Hn.isArray(r)?r:[r];const{length:a}=r;let g,B;const J={};for(let C=0;C<a;C++){g=r[C];let x;if(B=g,!Kde(g)&&(B=tb[(x=String(g)).toLowerCase()],B===void 0))throw new va(`Unknown adapter '${x}'`);if(B)break;J[x||"#"+C]=B}if(!B){const C=Object.entries(J).map(([e,v])=>`adapter ${e} `+(v===!1?"is not supported by the environment":"is not available in the build"));let x=a?C.length>1?`since :
4084
4084
  `+C.map(pT).join(`
4085
4085
  `):" "+pT(C[0]):"as no adapter specified";throw new va("There is no suitable adapter to dispatch the request "+x,"ERR_NOT_SUPPORT")}return B},adapters:tb};function rb(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Wp(null,r)}function mT(r){return rb(r),r.headers=mu.from(r.headers),r.data=$2.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),fT.getAdapter(r.adapter||cm.adapter)(r).then(function(B){return rb(r),B.data=$2.call(r,r.transformResponse,B),B.headers=mu.from(B.headers),B},function(B){return rT(B)||(rb(r),B&&B.response&&(B.response.data=$2.call(r,r.transformResponse,B.response),B.response.headers=mu.from(B.response.headers))),Promise.reject(B)})}const gT="1.11.0",my={};["object","boolean","number","function","string","symbol"].forEach((r,a)=>{my[r]=function(B){return typeof B===r||"a"+(a<1?"n ":" ")+r}});const yT={};my.transitional=function(a,g,B){function J(C,x){return"[Axios v"+gT+"] Transitional option '"+C+"'"+x+(B?". "+B:"")}return(C,x,e)=>{if(a===!1)throw new va(J(x," has been removed"+(g?" in "+g:"")),va.ERR_DEPRECATED);return g&&!yT[x]&&(yT[x]=!0,console.warn(J(x," has been deprecated since v"+g+" and will be removed in the near future"))),a?a(C,x,e):!0}},my.spelling=function(a){return(g,B)=>(console.warn(`${B} is likely a misspelling of ${a}`),!0)};function Zde(r,a,g){if(typeof r!="object")throw new va("options must be an object",va.ERR_BAD_OPTION_VALUE);const B=Object.keys(r);let J=B.length;for(;J-- >0;){const C=B[J],x=a[C];if(x){const e=r[C],v=e===void 0||x(e,C,r);if(v!==!0)throw new va("option "+C+" must be "+v,va.ERR_BAD_OPTION_VALUE);continue}if(g!==!0)throw new va("Unknown option "+C,va.ERR_BAD_OPTION)}}const gy={assertOptions:Zde,validators:my},wd=gy.validators;let $h=class{constructor(a){this.defaults=a||{},this.interceptors={request:new Q6,response:new Q6}}async request(a,g){try{return await this._request(a,g)}catch(B){if(B instanceof Error){let J={};Error.captureStackTrace?Error.captureStackTrace(J):J=new Error;const C=J.stack?J.stack.replace(/^.+\n/,""):"";try{B.stack?C&&!String(B.stack).endsWith(C.replace(/^.+\n.+\n/,""))&&(B.stack+=`
4086
- `+C):B.stack=C}catch{}}throw B}}_request(a,g){typeof a=="string"?(g=g||{},g.url=a):g=a||{},g=Qh(this.defaults,g);const{transitional:B,paramsSerializer:J,headers:C}=g;B!==void 0&&gy.assertOptions(B,{silentJSONParsing:wd.transitional(wd.boolean),forcedJSONParsing:wd.transitional(wd.boolean),clarifyTimeoutError:wd.transitional(wd.boolean)},!1),J!=null&&(Hn.isFunction(J)?g.paramsSerializer={serialize:J}:gy.assertOptions(J,{encode:wd.function,serialize:wd.function},!0)),g.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?g.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:g.allowAbsoluteUrls=!0),gy.assertOptions(g,{baseUrl:wd.spelling("baseURL"),withXsrfToken:wd.spelling("withXSRFToken")},!0),g.method=(g.method||this.defaults.method||"get").toLowerCase();let x=C&&Hn.merge(C.common,C[g.method]);C&&Hn.forEach(["delete","get","head","post","put","patch","common"],h=>{delete C[h]}),g.headers=mu.concat(x,C);const e=[];let v=!0;this.interceptors.request.forEach(function(n){typeof n.runWhen=="function"&&n.runWhen(g)===!1||(v=v&&n.synchronous,e.unshift(n.fulfilled,n.rejected))});const u=[];this.interceptors.response.forEach(function(n){u.push(n.fulfilled,n.rejected)});let t,w=0,y;if(!v){const h=[mT.bind(this),void 0];for(h.unshift(...e),h.push(...u),y=h.length,t=Promise.resolve(g);w<y;)t=t.then(h[w++],h[w++]);return t}y=e.length;let b=g;for(w=0;w<y;){const h=e[w++],n=e[w++];try{b=h(b)}catch(i){n.call(this,i);break}}try{t=mT.call(this,b)}catch(h){return Promise.reject(h)}for(w=0,y=u.length;w<y;)t=t.then(u[w++],u[w++]);return t}getUri(a){a=Qh(this.defaults,a);const g=oT(a.baseURL,a.url,a.allowAbsoluteUrls);return Z6(g,a.params,a.paramsSerializer)}};Hn.forEach(["delete","get","head","options"],function(a){$h.prototype[a]=function(g,B){return this.request(Qh(B||{},{method:a,url:g,data:(B||{}).data}))}}),Hn.forEach(["post","put","patch"],function(a){function g(B){return function(C,x,e){return this.request(Qh(e||{},{method:a,headers:B?{"Content-Type":"multipart/form-data"}:{},url:C,data:x}))}}$h.prototype[a]=g(),$h.prototype[a+"Form"]=g(!0)});let Qde=class WT{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(C){g=C});const B=this;this.promise.then(J=>{if(!B._listeners)return;let C=B._listeners.length;for(;C-- >0;)B._listeners[C](J);B._listeners=null}),this.promise.then=J=>{let C;const x=new Promise(e=>{B.subscribe(e),C=e}).then(J);return x.cancel=function(){B.unsubscribe(C)},x},a(function(C,x,e){B.reason||(B.reason=new Wp(C,x,e),g(B.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const g=this._listeners.indexOf(a);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const a=new AbortController,g=B=>{a.abort(B)};return this.subscribe(g),a.signal.unsubscribe=()=>this.unsubscribe(g),a.signal}static source(){let a;return{token:new WT(function(J){a=J}),cancel:a}}};function $de(r){return function(g){return r.apply(null,g)}}function ehe(r){return Hn.isObject(r)&&r.isAxiosError===!0}const nb={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(nb).forEach(([r,a])=>{nb[a]=r});function vT(r){const a=new $h(r),g=z6($h.prototype.request,a);return Hn.extend(g,$h.prototype,a,{allOwnKeys:!0}),Hn.extend(g,a,null,{allOwnKeys:!0}),g.create=function(J){return vT(Qh(r,J))},g}const to=vT(cm);to.Axios=$h,to.CanceledError=Wp,to.CancelToken=Qde,to.isCancel=rT,to.VERSION=gT,to.toFormData=uy,to.AxiosError=va,to.Cancel=to.CanceledError,to.all=function(a){return Promise.all(a)},to.spread=$de,to.isAxiosError=ehe,to.mergeConfig=Qh,to.AxiosHeaders=mu,to.formToJSON=r=>eT(Hn.isHTMLForm(r)?new FormData(r):r),to.getAdapter=fT.getAdapter,to.HttpStatusCode=nb,to.default=to;const{Axios:Nve,AxiosError:Ove,CanceledError:Ive,isCancel:Rve,CancelToken:Lve,VERSION:zve,all:Dve,Cancel:Bve,isAxiosError:Vve,spread:Fve,toFormData:jve,AxiosHeaders:Uve,HttpStatusCode:qve,formToJSON:Wve,getAdapter:Gve,mergeConfig:Hve}=to,ws=(r,a)=>{const g=r.__vccOpts||r;for(const[B,J]of a)g[B]=J;return g},the={class:"tooltip-template-options"},rhe=ws({__name:"TooltipTemplateOptions",props:{canEdit:{type:Boolean,default:!0}},emits:["generar-reporte","renombrar","editar","duplicar","eliminar"],setup(r,{emit:a}){return(g,B)=>(p.openBlock(),p.createElementBlock("div",the,[p.createElementVNode("ul",null,[p.createElementVNode("li",{class:"option",onClick:B[0]||(B[0]=J=>g.$emit("generar-reporte"))},[...B[5]||(B[5]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report.svg",alt:"Generar reporte",class:"icon"},null,-1),p.createTextVNode(" Generar reporte ",-1)])]),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:0,class:"option",onClick:B[1]||(B[1]=J=>g.$emit("renombrar"))},[...B[6]||(B[6]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1),p.createTextVNode(" Renombrar template ",-1)])])):p.createCommentVNode("",!0),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:1,class:"option",onClick:B[2]||(B[2]=J=>g.$emit("editar"))},[...B[7]||(B[7]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-edit.svg",alt:"Editar template",class:"icon"},null,-1),p.createTextVNode(" Editar template ",-1)])])):p.createCommentVNode("",!0),p.createElementVNode("li",{class:"option",onClick:B[3]||(B[3]=J=>g.$emit("duplicar"))},[...B[8]||(B[8]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate.svg",alt:"Duplicar template",class:"icon"},null,-1),p.createTextVNode(" Duplicar template ",-1)])]),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:2,class:"option",onClick:B[4]||(B[4]=J=>g.$emit("eliminar"))},[...B[9]||(B[9]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1),p.createTextVNode(" Eliminar template ",-1)])])):p.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-127740d3"]]),nhe={class:"template-card postpartido",style:{position:"relative"}},ihe={key:0,class:"template-img-placeholder",style:{position:"relative"}},ahe={key:0,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-01.jpg",alt:"Template Prematch Type 1",class:"template-img"},ohe={key:1,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-01.jpg",alt:"Template Postmatch Type 1",class:"template-img"},she={key:2,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-02.jpg",alt:"Template Prematch Type 2",class:"template-img"},lhe={key:3,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-02.jpg",alt:"Template Postmatch Type 2",class:"template-img"},che={key:4,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-03.jpg",alt:"Template Prematch Type 3",class:"template-img"},uhe={key:5,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-03.jpg",alt:"Template Postmatch Type 3",class:"template-img"},dhe={key:6,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-04.jpg",alt:"Template Prematch Type 4",class:"template-img"},hhe={key:7,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-04.jpg",alt:"Template Postmatch Type 4",class:"template-img"},phe={key:8,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumb1.png",alt:"Template Default",class:"template-img"},fhe={class:"inner-card-postpartido"},mhe={class:"postpartido-footer"},ghe={class:"postpartido-version"},yhe={class:"postpartido-status"},vhe={class:"tipo-value"},bhe=ws({__name:"TemplateItem",props:{template:{type:Object,required:!0},userId:{type:Number,required:!0}},emits:["generar-reporte","renombrar","duplicar","eliminar","edit-template"],setup(r,{emit:a}){const g=r,B=a,J=p.ref(!1),C=p.computed(()=>g.userId===g.template.user_id);function x(){console.log("generar-reporte"),J.value=!1,B("generar-reporte")}function e(){console.log("renombrar"),J.value=!1;const y=g.template.name||"";B("renombrar",y)}function v(){console.log("editar"),J.value=!1,B("edit-template",g.template)}function u(){console.log("duplicar"),J.value=!1;const y=g.template.name||"";B("duplicar",y)}function t(){console.log("eliminar"),J.value=!1,B("eliminar",g.template)}function w(y){console.log("toggle-autogen",y)}return(y,b)=>(p.openBlock(),p.createElementBlock("div",nhe,[p.createElementVNode("div",{class:"three-dots",onClick:b[0]||(b[0]=p.withModifiers(h=>J.value=!J.value,["stop"]))},[...b[5]||(b[5]=[p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1)])]),r.template.pages&&r.template.pages[0]?(p.openBlock(),p.createElementBlock("div",ihe,[r.template.template_type===1&&r.template.pages[0].type==1?(p.openBlock(),p.createElementBlock("img",ahe)):r.template.template_type===2&&r.template.pages[0].type==1?(p.openBlock(),p.createElementBlock("img",ohe)):r.template.template_type===1&&r.template.pages[0].type==2?(p.openBlock(),p.createElementBlock("img",she)):r.template.template_type===2&&r.template.pages[0].type==2?(p.openBlock(),p.createElementBlock("img",lhe)):r.template.template_type===1&&r.template.pages[0].type==3?(p.openBlock(),p.createElementBlock("img",che)):r.template.template_type===2&&r.template.pages[0].type==3?(p.openBlock(),p.createElementBlock("img",uhe)):r.template.template_type===1&&r.template.pages[0].type==4?(p.openBlock(),p.createElementBlock("img",dhe)):r.template.template_type===2&&r.template.pages[0].type==4?(p.openBlock(),p.createElementBlock("img",hhe)):(p.openBlock(),p.createElementBlock("img",phe))])):p.createCommentVNode("",!0),p.createElementVNode("div",fhe,[p.createElementVNode("div",mhe,[p.createElementVNode("div",ghe,p.toDisplayString(r.template.name),1),p.createElementVNode("div",yhe,[b[6]||(b[6]=p.createElementVNode("span",{class:"tipo-label"},"Tipo:",-1)),p.createElementVNode("span",vhe," "+p.toDisplayString(r.template.template_type==1?"Prepartido":"Postpartido"),1)]),p.createElementVNode("button",{class:"postpartido-btn",onClick:b[1]||(b[1]=h=>B("generar-reporte"))},"Generar reporte")])]),J.value?(p.openBlock(),p.createBlock(rhe,{key:1,"can-edit":C.value,onClick:b[2]||(b[2]=p.withModifiers(h=>J.value=!1,["self"])),onMouseleave:b[3]||(b[3]=h=>J.value=!1),onGenerarReporte:x,onRenombrar:e,onEditar:v,onDuplicar:u,onEliminar:t,onToggleAutogen:w},null,8,["can-edit"])):p.createCommentVNode("",!0),J.value?(p.openBlock(),p.createElementBlock("div",{key:2,class:"tooltip-overlay",onClick:b[4]||(b[4]=h=>J.value=!1)})):p.createCommentVNode("",!0)]))}},[["__scopeId","data-v-06712795"]]),xhe={class:"modal-overlay"},_he={class:"modal-content"},whe={class:"modal-body"},The={class:"radio-group"},khe=["disabled"],She={key:0,class:"error-message"},Ehe={class:"modal-footer"},Ahe=["disabled"],Che=["disabled"],Mhe=["disabled"],Phe={key:0,class:"loading-spinner"},Nhe={key:1},bT=ws({__name:"ModalCreateTemplate",props:{token:{type:String,required:!0},team:{type:Number,required:!0}},emits:["close","template-created","open-modal-new-template"],setup(r,{emit:a}){const g=r,B=a,J=p.ref(1),C=p.ref("pre"),x=p.ref(""),e=p.ref(!1),v=p.ref(""),u=async()=>{var t;if(!(x.value.trim().length<3)){e.value=!0,v.value="";try{const w={name:x.value.trim(),team_id:g.team,template_type:C.value==="pre"?1:2};console.log("toke mostrado es: ",g.token);const b=await to.create({headers:{Authorization:`${g.token}`}}).post("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates",w);console.log("response.data",b.data),B("template-created",b.data),B("open-modal-new-template",(t=b.data)==null?void 0:t.data),B("close")}catch(w){console.error("Error al guardar template:",w),w.response&&w.response.status===409&&(v.value="Ya existe un template con el mismo nombre")}finally{e.value=!1}}};return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(t,w)=>(p.openBlock(),p.createElementBlock("div",xhe,[p.createElementVNode("div",_he,[p.createElementVNode("button",{class:"close-btn",onClick:w[0]||(w[0]=y=>t.$emit("close"))},[...w[6]||(w[6]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),w[11]||(w[11]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-editar-withe.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Crear Template")],-1)),w[12]||(w[12]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",whe,[J.value===1?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[w[9]||(w[9]=p.createElementVNode("div",{class:"modal-label"},"Define el tipo de análisis para tu template:",-1)),p.createElementVNode("div",The,[p.createElementVNode("label",{class:p.normalizeClass(["radio-label",{selected:C.value==="pre"}])},[p.withDirectives(p.createElementVNode("input",{type:"radio",value:"pre","onUpdate:modelValue":w[1]||(w[1]=y=>C.value=y)},null,512),[[p.vModelRadio,C.value]]),w[7]||(w[7]=p.createTextVNode(" Prepartido ",-1))],2),p.createElementVNode("label",{class:p.normalizeClass(["radio-label",{selected:C.value==="post"}])},[p.withDirectives(p.createElementVNode("input",{type:"radio",value:"post","onUpdate:modelValue":w[2]||(w[2]=y=>C.value=y)},null,512),[[p.vModelRadio,C.value]]),w[8]||(w[8]=p.createTextVNode(" Postpartido ",-1))],2)])],64)):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[w[10]||(w[10]=p.createElementVNode("div",{class:"modal-label"},"Agrega un nombre a tu template:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":w[3]||(w[3]=y=>x.value=y),placeholder:"Untitled",maxlength:"40",autocomplete:"off",disabled:e.value},null,8,khe),[[p.vModelText,x.value]]),v.value?(p.openBlock(),p.createElementBlock("div",She,p.toDisplayString(v.value),1)):p.createCommentVNode("",!0)],64))]),w[13]||(w[13]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Ehe,[p.createElementVNode("button",{class:"cancel-btn",onClick:w[4]||(w[4]=y=>t.$emit("close")),disabled:e.value},"Cancelar",8,Ahe),J.value===1?(p.openBlock(),p.createElementBlock("button",{key:0,class:"next-btn",disabled:!C.value,onClick:w[5]||(w[5]=y=>J.value=2)}," Siguiente ",8,Che)):(p.openBlock(),p.createElementBlock("button",{key:1,class:"next-btn",disabled:x.value.trim().length<3||e.value,onClick:u},[e.value?(p.openBlock(),p.createElementBlock("div",Phe)):(p.openBlock(),p.createElementBlock("span",Nhe,"Guardar"))],8,Mhe))])])]))}},[["__scopeId","data-v-7e85c356"]]),Ohe={class:"modal-overlay"},Ihe={class:"modal-content"},Rhe={class:"modal-body"},Lhe={key:0,class:"error-message-container"},zhe={key:1,style:{position:"relative"}},Dhe={key:0,class:"loading-autoseteo-overlay"},Bhe={class:"modal-group"},Vhe={key:0,class:"placeholder"},Fhe={key:0,class:"placeholder"},jhe={key:1},Uhe={key:0,class:"custom-select-dropdown"},qhe=["onMousedown"],Whe={class:"modal-row"},Ghe={class:"modal-group"},Hhe={key:0,class:"placeholder"},Xhe={key:0,class:"placeholder"},Yhe={key:1},Jhe={key:0,class:"custom-select-dropdown"},Khe=["onMousedown"],Zhe={class:"modal-group"},Qhe={key:0,class:"placeholder"},$he={key:0,class:"placeholder"},epe={key:1},tpe={key:0,class:"custom-select-dropdown"},rpe=["onMousedown"],npe={class:"modal-group"},ipe={key:0,class:"placeholder"},ape={key:0,class:"placeholder"},ope=["src"],spe=["src"],lpe={key:0,class:"custom-select-dropdown"},cpe=["onMousedown"],upe=["src"],dpe=["src"],hpe={key:0,class:"header-separator"},ppe={key:1,class:"modal-footer"},fpe=["disabled"],mpe={key:0,class:"loading-spinner select-spinner"},gpe=ws({__name:"ModalGenerarReporte",props:{userId:{type:String,required:!0},token:{type:String,required:!0},team:{type:Number,required:!0},templateId:{type:String,required:!0},templateType:{type:String,required:!1},template:{type:Object,required:!1}},emits:["close","generar","switch-to-reports"],setup(r,{emit:a}){const g=r,B=a,J=p.ref([]),C=p.ref([]),x=p.ref([]),e=p.ref([]),v=p.ref(""),u=p.ref(""),t=p.ref(""),w=p.ref(null),y=to.create({headers:{Authorization:g.token}}),b=p.ref(!1),h=p.ref(!1),n=p.ref(!1),i=p.ref(!1),d=p.ref(!1),s=p.ref(!1),c=p.ref(!1),f=p.ref(!1),m=p.ref([]),T=p.ref([]),E=p.ref(!1),S=p.ref(!1),P=p.ref(!1);function N(ae){s.value&&(s.value=!1,d.value=!1),c.value=!1,v.value=ae,E.value=!1,_()}function A(ae){s.value&&(s.value=!1,d.value=!1),c.value=!1,u.value=ae,S.value=!1,R()}function O(ae){s.value&&(s.value=!1,d.value=!1),c.value=!1,t.value=ae,P.value=!1,V()}const M=p.ref(null);async function k(){try{h.value=!0;const ae=await to.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments");if(ae.data&&Array.isArray(ae.data)){if(m.value=ae.data,J.value=ae.data.map(oe=>oe.tournament).sort((oe,he)=>oe.order&&he.order?oe.order-he.order:oe.order&&!he.order?-1:!oe.order&&he.order?1:0),v.value="",C.value=[],u.value="",x.value=[],t.value="",e.value=[],w.value=null,M.value)setTimeout(()=>{ee(M.value)},100);else if(J.value.length>0){const oe=J.value[0];v.value=oe,I(oe)}}}catch(ae){console.error("Error al cargar torneos:",ae),J.value=[{name:"Concacaf Copa Oro"},{name:"Liga MX"},{name:"MLS"}],C.value=[],x.value=[],v.value="",u.value="",t.value="",w.value=null}finally{h.value=!1}}function I(ae){const oe=m.value.find(he=>he.tournament&&he.tournament.name===ae.name);oe&&Array.isArray(oe.seasons)?(C.value=oe.seasons,u.value="",x.value=[],t.value="",e.value=[],w.value=null):(C.value=[],u.value="",x.value=[],t.value="",e.value=[],w.value=null)}function _(){u.value="",t.value="",w.value=null,v.value?I(v.value):(C.value=[],x.value=[],e.value=[])}function R(){if(i.value=!0,t.value="",w.value=null,x.value=[],e.value=[],u.value&&u.value.id){const ae=[u.value.id];if(u.value.related_seasons&&Array.isArray(u.value.related_seasons)){const oe=u.value.related_seasons.map(he=>he.id).filter(Boolean);ae.push(...oe)}z(ae)}else i.value=!1}async function z(ae){n.value=!0;try{const oe=Array.isArray(ae)?ae.join("&seasons="):ae,he=await y.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons=${oe}`);if(he.data.data&&Array.isArray(he.data.data)){const fe=he.data.data.reduce((ye,_e)=>_e.games&&Array.isArray(_e.games)?ye.concat(_e.games):ye,[]);T.value=fe.map(ye=>({label:ye.label||`${ye.home_team_acronym||"Local"} vs ${ye.visiting_team_acronym||"Visitante"}`,localLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+ye.home_team+".png"||"",visitanteLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+ye.visiting_team+".png"||"",...ye}));let se=T.value;g.templateType==="2"||g.templateType===2?se=se.filter(ye=>ye.game_status===1):(g.templateType==="1"||g.templateType===1)&&(se=se.filter(ye=>ye.game_status===4));const ue=se.map(ye=>ye.matchday_id).filter(Boolean),de=[...new Set(ue)];x.value=de.map(ye=>{const _e=T.value.find(xe=>xe.matchday_id&&xe.matchday_id===ye);return _e?{id:ye,name:_e.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")}:null}).filter(Boolean).sort((ye,_e)=>{const xe=ye.name.startsWith("Jornada"),Se=_e.name.startsWith("Jornada");return xe&&Se?ye.id-_e.id:xe&&!Se?-1:!xe&&Se?1:0}),t.value="",e.value=[],w.value=null,i.value=!1,M.value&&s.value&&setTimeout(()=>{K(M.value)},200)}else T.value=[],x.value=[],t.value="",e.value=[],w.value=null}catch(oe){console.error("Error al cargar partidos:",oe),T.value=[],x.value=[],t.value="",e.value=[],w.value=null,i.value=!1}finally{n.value=!1}}function V(){w.value=null,e.value=[],t.value&&t.value.id&&U(t.value)}function U(ae){if(console.log("LLEga aqui mero ******************************"),!ae||!ae.id){e.value=[];return}let oe=T.value.filter(he=>he.matchday_id===ae.id);console.log("////////////////////LLEga aqui mero partidosFiltrados ******************************",oe),console.log("El template Type Es: ",g.templateType),g.templateType==="2"||g.templateType===2?(console.log("Si es postmatch prematch: el template"),console.log("partidosFiltrados; ",oe),oe=oe.filter(he=>he.game_status===1),console.log("******************* partidos cvon game estatus 1: ",oe)):(g.templateType==="1"||g.templateType===1)&&(console.log("Si es prematch: el template"),console.log("partidosFiltrados; ",oe),oe=oe.filter(he=>he.game_status===4),console.log("******************* partidos cvon game estatus 4: ",oe)),e.value=oe}async function q(){try{h.value=!0;let ae="";u.value&&u.value.name&&(ae=u.value.name);const oe={template_id:g.templateId,user_id:g.template&&g.template.user_id?parseInt(g.template.user_id):parseInt(g.userId),tournament_id:v.value.id||1,tournament_name:v.value.name,season_id:w.value.season_id,season_name:ae,game_id:w.value.id||w.value.game_id},he=await to.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/reports`,oe,{headers:{Authorization:g.token,"Content-Type":"application/json"}});B("generar",{liga:v.value,torneo:u.value,jornada:t.value,partido:w.value,reportData:he.data}),B("switch-to-reports"),B("close")}catch(ae){console.error("Error al generar el reporte:",ae),ae.response&&ae.response.status===409?f.value=!0:alert("Error al generar el reporte. Por favor, intenta de nuevo.")}finally{h.value=!1}}function W(){P.value=!P.value}function Z(ae){s.value&&(s.value=!1,d.value=!1),c.value=!1,w.value=ae,b.value=!1}function ne(){document.body.style.overflow="hidden"}function X(){document.body.style.overflow=""}p.onMounted(()=>{k(),ne(),re(),M.value&&(d.value=!0,s.value=!0)}),p.watch(v,(ae,oe)=>{if(ae&&M.value&&s.value&&!oe&&!c.value){const he=C.value.find(fe=>fe.id===M.value.season_id);he&&(c.value=!0,u.value=he,c.value=!1)}}),p.watch(u,(ae,oe)=>{ae&&M.value&&s.value&&!oe&&!c.value?setTimeout(()=>{const he=x.value.find(fe=>fe.id===M.value.matchday_id);he&&(c.value=!0,t.value=he,U(he),c.value=!1)},500):ae&&oe&&s.value&&(s.value=!1,d.value=!1)}),p.watch(t,(ae,oe)=>{ae&&M.value&&s.value&&!oe&&!c.value?setTimeout(()=>{const he=e.value.find(se=>se.game_id===M.value.game_id||se.id===M.value.game_id);if(U(ae),he){w.value=he,d.value=!1,s.value=!1;return}const fe=e.value.find(se=>se.home_team===M.value.home_team&&se.visiting_team===M.value.visiting_team);if(fe){w.value=fe,d.value=!1,s.value=!1;return}if(T.value.length>0){const se=T.value.find(ue=>ue.game_id===M.value.game_id||ue.id===M.value.game_id);if(se){w.value=se,d.value=!1,s.value=!1;return}}d.value=!1,s.value=!1},1e3):ae&&oe&&s.value&&(s.value=!1,d.value=!1)}),p.onUnmounted(()=>{X()});async function re(){try{const ae=await y.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/teams/${g.team}/last-games`);g.templateType==="1"||g.templateType===1?(M.value=ae.data.data.prematch,ae.data.data.prematch&&(d.value=!0,s.value=!0,ae.data.data.prematch.season_id&&await z([ae.data.data.prematch.season_id]))):(g.templateType==="2"||g.templateType===2)&&(M.value=ae.data.data.postmatch,ae.data.data.postmatch&&(d.value=!0,s.value=!0,ae.data.data.postmatch.season_id&&await z([ae.data.data.postmatch.season_id])))}catch(ae){console.error("Error al cargar últimos juegos:",ae)}}function ee(ae){if(!(!ae||!ae.game_id)&&ae.tournament_id&&J.value.length>0){const oe=J.value.find(he=>he.id===ae.tournament_id);oe&&(v.value=oe,I(oe))}}function K(ae){if(!(!ae||!ae.game_id)&&ae.tournament_id&&J.value.length>0){const oe=J.value.find(he=>he.id===ae.tournament_id);if(oe&&(v.value=oe,ae.season_id&&C.value.length>0)){const he=C.value.find(fe=>fe.id===ae.season_id);if(he&&(u.value=he,ae.matchday_id&&x.value.length>0)){const fe=x.value.find(se=>se.id===ae.matchday_id);if(fe&&(t.value=fe,ae.game_id&&e.value.length>0)){const se=e.value.find(ue=>ue.game_id===ae.game_id||ue.id===ae.game_id);if(se)w.value=se;else{const ue=e.value.find(de=>de.home_team===ae.home_team&&de.visiting_team===ae.visiting_team);ue&&(w.value=ue)}}}}}}function te(){f.value=!1,v.value="",u.value="",t.value="",w.value=null,C.value=[],x.value=[],e.value=[],E.value=!1,S.value=!1,P.value=!1,b.value=!1,X(),B("close")}return(ae,oe)=>(p.openBlock(),p.createElementBlock("div",Ohe,[p.createElementVNode("div",Ihe,[p.createElementVNode("button",{class:"close-btn",onClick:te},[...oe[7]||(oe[7]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),oe[22]||(oe[22]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report-white.svg",class:"icon-title",alt:"icono reporte blanco"}),p.createElementVNode("span",{class:"modal-title"},"Generar reporte")],-1)),oe[23]||(oe[23]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Rhe,[f.value?(p.openBlock(),p.createElementBlock("div",Lhe,[oe[8]||(oe[8]=p.createElementVNode("p",{class:"error-text"},[p.createTextVNode(" Este reporte ya fue generado previamente"),p.createElementVNode("br"),p.createTextVNode(" con este template para el partido seleccionado. ")],-1)),p.createElementVNode("button",{class:"accept-btn",onClick:te},"Aceptar")])):(p.openBlock(),p.createElementBlock("div",zhe,[d.value?(p.openBlock(),p.createElementBlock("div",Dhe,[...oe[9]||(oe[9]=[p.createElementVNode("div",{class:"loading-autoseteo-content"},[p.createElementVNode("div",{class:"loading-spinner"})],-1)])])):p.createCommentVNode("",!0),p.createElementVNode("div",Bhe,[oe[12]||(oe[12]=p.createElementVNode("label",null,"1. Elige el torneo",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown liga-select",tabindex:"0",onClick:oe[0]||(oe[0]=he=>E.value=!E.value),onBlur:oe[1]||(oe[1]=he=>E.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:h.value||J.value.length===0}])},[h.value?(p.openBlock(),p.createElementBlock("span",Vhe,[...oe[10]||(oe[10]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando torneos...",-1)])])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[v.value?(p.openBlock(),p.createElementBlock("span",jhe,p.toDisplayString(v.value.name),1)):(p.openBlock(),p.createElementBlock("span",Fhe,"Selecciona el torneo"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:E.value}])},[...oe[11]||(oe[11]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),E.value&&J.value.length>0?(p.openBlock(),p.createElementBlock("div",Uhe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(J.value,he=>(p.openBlock(),p.createElementBlock("div",{key:he.name,class:"custom-select-option",onMousedown:p.withModifiers(fe=>N(he),["prevent"])},p.toDisplayString(he.name),41,qhe))),128))])):p.createCommentVNode("",!0)],32)]),p.createElementVNode("div",Whe,[p.createElementVNode("div",Ghe,[oe[15]||(oe[15]=p.createElementVNode("label",null,"2. Elige la temporada",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown torneo-select",tabindex:"0",onClick:oe[2]||(oe[2]=he=>S.value=!S.value),onBlur:oe[3]||(oe[3]=he=>S.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!v.value||C.value.length===0||h.value}])},[h.value?(p.openBlock(),p.createElementBlock("span",Hhe,[...oe[13]||(oe[13]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando temporada...",-1)])])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[u.value?(p.openBlock(),p.createElementBlock("span",Yhe,p.toDisplayString(u.value.name),1)):(p.openBlock(),p.createElementBlock("span",Xhe,"Elige la temporada"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:S.value}])},[...oe[14]||(oe[14]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),S.value&&C.value.length>0&&v.value?(p.openBlock(),p.createElementBlock("div",Jhe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(C.value,he=>(p.openBlock(),p.createElementBlock("div",{key:he.id,class:"custom-select-option",onMousedown:p.withModifiers(fe=>A(he),["prevent"])},p.toDisplayString(he.name),41,Khe))),128))])):p.createCommentVNode("",!0)],32)]),p.createElementVNode("div",Zhe,[oe[18]||(oe[18]=p.createElementVNode("label",null,"3. Elige la jornada",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown jornada-select",tabindex:"0",onClick:W,onBlur:oe[4]||(oe[4]=he=>P.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!u.value||x.value.length===0||i.value}])},[i.value?(p.openBlock(),p.createElementBlock("span",Qhe,[...oe[16]||(oe[16]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando jornadas...",-1)])])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[t.value?(p.openBlock(),p.createElementBlock("span",epe,p.toDisplayString(t.value.name),1)):(p.openBlock(),p.createElementBlock("span",$he,"Elige la jornada"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:P.value}])},[...oe[17]||(oe[17]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),P.value&&x.value.length>0?(p.openBlock(),p.createElementBlock("div",tpe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(x.value,he=>(p.openBlock(),p.createElementBlock("div",{key:he.id,class:"custom-select-option",onMousedown:p.withModifiers(fe=>O(he),["prevent"])},p.toDisplayString(he.name),41,rpe))),128))])):p.createCommentVNode("",!0)],32)])]),p.createElementVNode("div",npe,[oe[21]||(oe[21]=p.createElementVNode("label",null,"4. Elige el partido",-1)),p.createElementVNode("div",{class:"select-wrapper partido-select",tabindex:"0",onClick:oe[5]||(oe[5]=he=>b.value=!b.value),onBlur:oe[6]||(oe[6]=he=>b.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!t.value||n.value}])},[n.value?(p.openBlock(),p.createElementBlock("span",ipe,[...oe[19]||(oe[19]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando partidos...",-1)])])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[w.value?(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[w.value.localLogo?(p.openBlock(),p.createElementBlock("img",{key:0,src:w.value.localLogo,class:"logo-equipo",alt:"local"},null,8,ope)):p.createCommentVNode("",!0),p.createElementVNode("span",null,p.toDisplayString(w.value.label),1),w.value.visitanteLogo?(p.openBlock(),p.createElementBlock("img",{key:1,src:w.value.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,spe)):p.createCommentVNode("",!0)],64)):(p.openBlock(),p.createElementBlock("span",ape,"Selecciona el partido"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:b.value}])},[...oe[20]||(oe[20]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),b.value&&!n.value&&t.value?(p.openBlock(),p.createElementBlock("div",lpe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(e.value,he=>(p.openBlock(),p.createElementBlock("div",{key:he.label,class:"custom-select-option",onMousedown:p.withModifiers(fe=>Z(he),["prevent"])},[p.createElementVNode("img",{src:he.localLogo,class:"logo-equipo",alt:"local"},null,8,upe),p.createElementVNode("span",null,p.toDisplayString(he.label),1),p.createElementVNode("img",{src:he.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,dpe)],40,cpe))),128))])):p.createCommentVNode("",!0)],32)])]))]),f.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",hpe)),f.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",ppe,[p.createElementVNode("button",{class:"cancel-btn",onClick:te},"Cancelar"),p.createElementVNode("button",{class:"next-btn",disabled:!v.value||!u.value||!t.value||!w.value||h.value,onClick:q},[h.value?(p.openBlock(),p.createElementBlock("span",mpe)):p.createCommentVNode("",!0),p.createTextVNode(" "+p.toDisplayString(h.value?"Generando...":"Generar"),1)],8,fpe)]))])]))}},[["__scopeId","data-v-a851350e"]]),ype={class:"modal-overlay"},vpe={class:"modal-content"},bpe={class:"modal-body"},xpe=["placeholder","disabled"],_pe={key:0,class:"error-message"},wpe={class:"modal-footer"},Tpe=["disabled"],kpe=["disabled"],Spe={key:0},Epe={key:1},Ape=ws({__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(r,{emit:a}){const g=r,B=a,J=p.ref(g.initialName),C=p.ref(!1),x=p.ref("");p.watch(()=>g.initialName,v=>{J.value=v,x.value=""}),p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});async function e(){var v;if(console.log("acceptRename"),!(J.value.trim().length<3)){console.log("acceptRename 22"),C.value=!0,x.value="";try{await to.put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/templates/${g.templateId}/general`,{name:J.value.trim()},{headers:{Authorization:`${g.token}`,"Content-Type":"application/json"}}),B("rename",J.value.trim()),B("refresh"),B("close")}catch(u){console.error("Error al renombrar el template:",u),((v=u.response)==null?void 0:v.status)===409?x.value="Ya existe un template con el mismo nombre":x.value="Error al renombrar el template. Inténtalo de nuevo."}finally{C.value=!1}}}return(v,u)=>(p.openBlock(),p.createElementBlock("div",ype,[p.createElementVNode("div",vpe,[p.createElementVNode("button",{class:"close-btn",onClick:u[0]||(u[0]=t=>v.$emit("close"))},[...u[3]||(u[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),u[5]||(u[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Renombrar Template")],-1)),u[6]||(u[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",bpe,[u[4]||(u[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":u[1]||(u[1]=t=>J.value=t),placeholder:r.initialName,maxlength:"40",autocomplete:"off",disabled:C.value},null,8,xpe),[[p.vModelText,J.value]]),x.value?(p.openBlock(),p.createElementBlock("div",_pe,p.toDisplayString(x.value),1)):p.createCommentVNode("",!0)]),u[7]||(u[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",wpe,[p.createElementVNode("button",{class:"cancel-btn",onClick:u[2]||(u[2]=t=>v.$emit("close")),disabled:C.value},"Cancelar",8,Tpe),p.createElementVNode("button",{class:"next-btn",disabled:J.value.trim().length<3||C.value,onClick:e},[C.value?(p.openBlock(),p.createElementBlock("span",Spe,"Guardando...")):(p.openBlock(),p.createElementBlock("span",Epe,"Guardar"))],8,kpe)])])]))}},[["__scopeId","data-v-2f6df9c1"]]),Cpe={class:"modal-overlay"},Mpe={class:"modal-content"},Ppe={class:"modal-body"},Npe=["placeholder"],Ope={class:"modal-footer"},Ipe=["disabled"],Rpe=ws({__name:"ModalduplicateTemplate",props:{initialName:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","duplicate","template-duplicated"],setup(r,{emit:a}){const g=r,B=a,J=p.ref(g.initialName+" copy"),C=p.ref(!1);p.watch(()=>g.initialName,e=>{J.value=e+" copy"}),p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});async function x(){if(J.value.trim().length>=3&&!C.value){C.value=!0;try{const e=await to.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/${g.templateId}/duplicate`,{name:J.value.trim()},{headers:{Authorization:`${g.token}`,"Content-Type":"application/json"}});B("template-duplicated",{originalTemplateId:g.templateId,newTemplateName:J.value.trim(),responseData:e.data}),B("close")}catch(e){console.error("Error al duplicar template:",e),alert("Error al duplicar el template. Por favor, intenta de nuevo.")}finally{C.value=!1}}}return(e,v)=>(p.openBlock(),p.createElementBlock("div",Cpe,[p.createElementVNode("div",Mpe,[p.createElementVNode("button",{class:"close-btn",onClick:v[0]||(v[0]=u=>e.$emit("close"))},[...v[3]||(v[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),v[5]||(v[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Duplicar template")],-1)),v[6]||(v[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Ppe,[v[4]||(v[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":v[1]||(v[1]=u=>J.value=u),placeholder:r.initialName,maxlength:"40",autocomplete:"off"},null,8,Npe),[[p.vModelText,J.value]])]),v[7]||(v[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Ope,[p.createElementVNode("button",{class:"cancel-btn",onClick:v[2]||(v[2]=u=>e.$emit("close"))},"Cancelar"),p.createElementVNode("button",{class:"next-btn",disabled:J.value.trim().length<3||C.value,onClick:x},p.toDisplayString(C.value?"Duplicando...":"Aceptar"),9,Ipe)])])]))}},[["__scopeId","data-v-abfffcd1"]]),Lpe={class:"modal-overlay"},zpe={class:"modal-content"},Dpe={class:"modal-footer"},Bpe=["disabled"],Vpe=ws({__name:"ModalDeleteTemplate",props:{templateId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","templateDeleted"],setup(r,{emit:a}){const g=r,B=a,J=p.ref(!1);p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});const C=async()=>{try{J.value=!0;const e=await to.create({headers:{Authorization:`${g.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/templates/${g.templateId}`);(e.status===200||e.status===204)&&(B("templateDeleted",g.templateId),B("close"))}catch(x){console.error("Error al eliminar template:",x),alert("Error al eliminar el template. Por favor, inténtalo de nuevo.")}finally{J.value=!1}};return(x,e)=>(p.openBlock(),p.createElementBlock("div",Lpe,[p.createElementVNode("div",zpe,[p.createElementVNode("button",{class:"close-btn",onClick:e[0]||(e[0]=v=>x.$emit("close"))},[...e[2]||(e[2]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),e[3]||(e[3]=p.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)),p.createElementVNode("div",Dpe,[p.createElementVNode("button",{class:"cancel-btn",onClick:e[1]||(e[1]=v=>x.$emit("close"))},"Cancelar"),p.createElementVNode("button",{class:"delete-btn",onClick:C,disabled:J.value},p.toDisplayString(J.value?"Eliminando...":"Eliminar"),9,Bpe)])])]))}},[["__scopeId","data-v-93a27145"]]),Fpe={class:"templates-header"},jpe={class:"count"},Upe={key:0,class:"sort-options"},qpe=["onClick"],Wpe={key:0,class:"checkmark"},Gpe={key:0,class:"loading-state"},Hpe=ws({__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(r,{expose:a,emit:g}){const B=g,J=r,C=p.ref(!1),x=p.ref(null),e=p.ref(!1),v=p.ref(!1),u=p.ref(!1),t=p.ref(!1),w=p.ref(!1),y=p.ref(""),b=p.ref(""),h=p.ref(""),n=p.ref(""),i=p.ref(""),d=p.ref(""),s=p.ref(""),c=p.ref(""),f=p.ref(""),m=p.ref(null),T=p.ref(null),E=p.ref(null),S=p.ref(null),P=p.ref(0),N=p.ref([]),A=p.ref(!1),O=p.ref(null);p.watch([()=>J.team,()=>J.token],()=>{J.team&&J.token&&k()},{immediate:!1});const M=[{label:"A - Z",value:"name-asc"},{label:"Más recientes",value:"date-desc"}],k=async()=>{try{A.value=!0,O.value=null;const X=await to.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/teams/${J.team}`,{headers:{Authorization:`${J.token}`,"Content-Type":"application/json"}});X.data&&Array.isArray(X.data)?N.value=X.data:X.data&&X.data.templates?N.value=X.data.templates:X.data&&X.data.data?N.value=X.data.data:N.value=[]}catch(X){console.error("Error al obtener templates:",X),console.error("Error response:",X.response),O.value=X.message||"Error al cargar los templates",N.value=[]}finally{A.value=!1}},I=p.computed(()=>{if(!N.value.length)return[];let X=[...N.value];if(J.searchQuery.trim()){const re=J.searchQuery.toLowerCase().trim();X=X.filter(ee=>ee.name.toLowerCase().includes(re))}switch(x.value){case"name-asc":return X.sort((re,ee)=>re.name.localeCompare(ee.name));case"date-desc":return X.sort((re,ee)=>new Date(ee.created_at)-new Date(re.created_at));default:return X}}),_=p.computed(()=>{if(!P.value)return"grid-1-column";const X=340,re=20,K=P.value-40,te=Math.floor((K+re)/(X+re)),ae=Math.max(1,te);return ae>=4?"grid-4-columns":ae>=3?"grid-3-columns":ae>=2?"grid-2-columns":"grid-1-column"}),R=()=>{C.value=!C.value},z=X=>{x.value=X,C.value=!1},V=X=>{const re=M.find(ee=>ee.value===X);return re?re.label:null},U=X=>{C.value&&T.value&&!T.value.contains(X.target)&&(C.value=!1)},q=()=>{E.value&&(P.value=E.value.offsetWidth)};function W(X){B("edit-template",X)}let Z=null;p.onMounted(async()=>{document.addEventListener("mousedown",U),await p.nextTick(),q(),window.ResizeObserver?(Z=new ResizeObserver(()=>{q()}),E.value&&Z.observe(E.value)):window.addEventListener("resize",q),k()});function ne(X){console.log("onOpenModalNewTemplate template section, called with data:",X),B("open-modal-new-template",X)}return p.onBeforeUnmount(()=>{document.removeEventListener("mousedown",U),Z?Z.disconnect():window.removeEventListener("resize",q)}),a({obtenerTemplates:k}),(X,re)=>(p.openBlock(),p.createElementBlock("div",{class:"templates-section",ref_key:"templatesSectionRef",ref:E},[p.createElementVNode("div",Fpe,[p.createElementVNode("span",null,[re[11]||(re[11]=p.createTextVNode("Templates ",-1)),p.createElementVNode("span",jpe,"("+p.toDisplayString(I.value.length)+")",1)]),p.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:T},[p.createElementVNode("button",{class:"sort-button",onClick:R},[p.createTextVNode(p.toDisplayString(V(x.value)||"Ordenar")+" ",1),p.createElementVNode("span",{class:p.normalizeClass(["dropdown-arrow",{rotated:C.value}])},null,2)]),C.value?(p.openBlock(),p.createElementBlock("div",Upe,[(p.openBlock(),p.createElementBlock(p.Fragment,null,p.renderList(M,ee=>p.createElementVNode("div",{key:ee.value,class:p.normalizeClass(["sort-option",{selected:x.value===ee.value}]),onClick:K=>z(ee.value)},[p.createElementVNode("span",null,p.toDisplayString(ee.label),1),x.value===ee.value?(p.openBlock(),p.createElementBlock("span",Wpe,[...re[12]||(re[12]=[p.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):p.createCommentVNode("",!0)],10,qpe)),64))])):p.createCommentVNode("",!0)],512)]),A.value?(p.openBlock(),p.createElementBlock("div",Gpe,[...re[13]||(re[13]=[p.createElementVNode("div",{class:"loading-spinner"},null,-1),p.createElementVNode("p",null,"Cargando templates...",-1)])])):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["templates-list",_.value]),ref_key:"templatesListRef",ref:S},[p.createElementVNode("div",{class:"template-card create",onClick:re[0]||(re[0]=ee=>e.value=!0)},[...re[14]||(re[14]=[p.createElementVNode("div",{class:"inner-card"},[p.createElementVNode("div",{class:"plus"},[p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-add@3x.png",alt:"Agregar"})]),p.createElementVNode("div",{class:"create-text"},"Crear Template")],-1)])]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(I.value,ee=>(p.openBlock(),p.createBlock(bhe,{key:ee.id,template:ee,"user-id":r.userId,onGenerarReporte:K=>{s.value=ee.id,f.value=ee.template_type,m.value=ee,v.value=!0},onRenombrar:K=>{c.value=ee.id,y.value=K,b.value=ee.template_type,u.value=!0},onDuplicar:K=>{d.value=ee.id,h.value=K,t.value=!0},onEliminar:K=>{n.value=K.name,i.value=K.id,w.value=!0},onEditTemplate:W},null,8,["template","user-id","onGenerarReporte","onRenombrar","onDuplicar","onEliminar"]))),128))],2)),e.value?(p.openBlock(),p.createBlock(bT,{key:2,token:r.token,team:r.team,onClose:re[1]||(re[1]=ee=>e.value=!1),onOpenModalNewTemplate:ne},null,8,["token","team"])):p.createCommentVNode("",!0),v.value?(p.openBlock(),p.createBlock(gpe,{key:3,"user-id":r.userId,token:r.token,team:r.team,"template-id":s.value,"template-type":f.value,template:m.value,onClose:re[2]||(re[2]=ee=>v.value=!1),onSwitchToReports:re[3]||(re[3]=ee=>X.$emit("switch-to-reports"))},null,8,["user-id","token","team","template-id","template-type","template"])):p.createCommentVNode("",!0),u.value?(p.openBlock(),p.createBlock(Ape,{key:4,initialName:y.value,token:r.token,"template-id":c.value,"template-type":b.value,"user-id":r.userId,onRefresh:re[4]||(re[4]=ee=>k()),onClose:re[5]||(re[5]=ee=>u.value=!1),onRename:re[6]||(re[6]=ee=>{u.value=!1})},null,8,["initialName","token","template-id","template-type","user-id"])):p.createCommentVNode("",!0),t.value?(p.openBlock(),p.createBlock(Rpe,{key:5,initialName:h.value,token:r.token,"template-id":d.value,onClose:re[7]||(re[7]=ee=>t.value=!1),onTemplateDuplicated:re[8]||(re[8]=ee=>{t.value=!1,k()})},null,8,["initialName","token","template-id"])):p.createCommentVNode("",!0),w.value?(p.openBlock(),p.createBlock(Vpe,{key:6,"template-id":i.value,"user-id":r.userId,token:r.token,onClose:re[9]||(re[9]=ee=>w.value=!1),onTemplateDeleted:re[10]||(re[10]=ee=>{w.value=!1,k()})},null,8,["template-id","user-id","token"])):p.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-ee44a736"]]),Xpe={class:"tooltip-report-options"},Ype=ws({__name:"TooltipReportOptions",emits:["ver-reporte","renombrar","editar","duplicar","descargar","eliminar"],setup(r,{emit:a}){return(g,B)=>(p.openBlock(),p.createElementBlock("div",Xpe,[p.createElementVNode("ul",null,[p.createElementVNode("li",{class:"option",onClick:B[0]||(B[0]=J=>g.$emit("renombrar"))},[...B[3]||(B[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar reporte",class:"icon"},null,-1),p.createTextVNode(" Renombrar reporte ",-1)])]),p.createElementVNode("li",{class:"option",onClick:B[1]||(B[1]=J=>g.$emit("descargar"))},[...B[4]||(B[4]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-download.svg",alt:"Descargar reporte",class:"icon"},null,-1),p.createTextVNode(" Descargar reporte ",-1)])]),p.createElementVNode("li",{class:"option",onClick:B[2]||(B[2]=J=>g.$emit("eliminar"))},[...B[5]||(B[5]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar reporte",class:"icon"},null,-1),p.createTextVNode(" Eliminar reporte ",-1)])])])]))}},[["__scopeId","data-v-246ad2d7"]]);function jd(r){if(!r)return"";const a=new Date(r);if(isNaN(a.getTime()))return"";const g=a.getDate(),B=a.toLocaleDateString("es-ES",{month:"short"}),J=a.getFullYear();return`${g} ${B}, ${J}`}const Jpe={class:"prematch-bg"},Kpe={class:"background-shields"},Zpe={class:"shield-left"},Qpe=["src"],$pe={class:"shield-right"},efe=["src"],tfe={class:"subtitle"},rfe={class:"jornada"},nfe={class:"fecha"},ife={class:"teams-row"},afe={class:"team team-local"},ofe={class:"escudo-svg"},sfe=["src"],lfe={class:"team-name"},cfe={class:"team team-visitor"},ufe={class:"escudo-svg"},dfe=["src"],hfe={class:"team-name"},pfe=ws({__name:"AnalisisPrematchType1",props:{report:{type:Object,default:()=>({})}},setup(r){function a(B){return B?B.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 g=r;return(B,J)=>(p.openBlock(),p.createElementBlock("div",Jpe,[p.createElementVNode("div",Kpe,[p.createElementVNode("div",Zpe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+g.report.game.home_team+".png",alt:"Escudo local"},null,8,Qpe)]),p.createElementVNode("div",$pe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+g.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,efe)])]),J[0]||(J[0]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",tfe,[p.createElementVNode("span",rfe,p.toDisplayString(a(g.report.game.matchday_name)),1),p.createElementVNode("span",nfe," - "+p.toDisplayString(p.unref(jd)(g.report.game.date_time_utc)),1)]),p.createElementVNode("div",ife,[p.createElementVNode("div",afe,[p.createElementVNode("span",ofe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.home_team+".png"},null,8,sfe)]),p.createElementVNode("span",lfe,p.toDisplayString(g.report.game.home_team_acronym),1)]),p.createElementVNode("div",cfe,[p.createElementVNode("span",ufe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.visiting_team+".png"},null,8,dfe)]),p.createElementVNode("span",hfe,p.toDisplayString(g.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-bb7e7ba7"]]),ffe={class:"prematch-bg"},mfe={class:"background-shields"},gfe={class:"shield-left"},yfe=["src"],vfe={class:"shield-right"},bfe=["src"],xfe={class:"subtitle"},_fe={class:"jornada"},wfe={class:"fecha"},Tfe={class:"teams-grid"},kfe={class:"row row-top"},Sfe={class:"team team-local"},Efe={class:"escudo-svg"},Afe=["src"],Cfe={class:"team-name"},Mfe={class:"score"},Pfe={class:"score-text"},Nfe={class:"team team-visitor"},Ofe={class:"team-name"},Ife={class:"escudo-svg"},Rfe=["src"],Lfe={class:"row row-bottom"},zfe={class:"team-stats"},Dfe={class:"stat red"},Bfe={class:"stat-number"},Vfe={class:"stat yellow"},Ffe={class:"stat-number"},jfe={class:"team-stats"},Ufe={class:"stat-number"},qfe={class:"stat-number"},Wfe=ws({__name:"AnalisisPostMatchType1",props:{report:{type:Object,default:()=>({})}},setup(r){function a(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 g=r,B=p.computed(()=>{var w,y,b;const u=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.minutes)==null?void 0:b.home_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const t=u.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(t.length>5){const h=t.slice(0,5).join(", "),n=t.slice(5).join(", ");return`${h}
4086
+ `+C):B.stack=C}catch{}}throw B}}_request(a,g){typeof a=="string"?(g=g||{},g.url=a):g=a||{},g=Qh(this.defaults,g);const{transitional:B,paramsSerializer:J,headers:C}=g;B!==void 0&&gy.assertOptions(B,{silentJSONParsing:wd.transitional(wd.boolean),forcedJSONParsing:wd.transitional(wd.boolean),clarifyTimeoutError:wd.transitional(wd.boolean)},!1),J!=null&&(Hn.isFunction(J)?g.paramsSerializer={serialize:J}:gy.assertOptions(J,{encode:wd.function,serialize:wd.function},!0)),g.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?g.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:g.allowAbsoluteUrls=!0),gy.assertOptions(g,{baseUrl:wd.spelling("baseURL"),withXsrfToken:wd.spelling("withXSRFToken")},!0),g.method=(g.method||this.defaults.method||"get").toLowerCase();let x=C&&Hn.merge(C.common,C[g.method]);C&&Hn.forEach(["delete","get","head","post","put","patch","common"],h=>{delete C[h]}),g.headers=mu.concat(x,C);const e=[];let v=!0;this.interceptors.request.forEach(function(n){typeof n.runWhen=="function"&&n.runWhen(g)===!1||(v=v&&n.synchronous,e.unshift(n.fulfilled,n.rejected))});const u=[];this.interceptors.response.forEach(function(n){u.push(n.fulfilled,n.rejected)});let t,w=0,y;if(!v){const h=[mT.bind(this),void 0];for(h.unshift(...e),h.push(...u),y=h.length,t=Promise.resolve(g);w<y;)t=t.then(h[w++],h[w++]);return t}y=e.length;let b=g;for(w=0;w<y;){const h=e[w++],n=e[w++];try{b=h(b)}catch(i){n.call(this,i);break}}try{t=mT.call(this,b)}catch(h){return Promise.reject(h)}for(w=0,y=u.length;w<y;)t=t.then(u[w++],u[w++]);return t}getUri(a){a=Qh(this.defaults,a);const g=oT(a.baseURL,a.url,a.allowAbsoluteUrls);return Z6(g,a.params,a.paramsSerializer)}};Hn.forEach(["delete","get","head","options"],function(a){$h.prototype[a]=function(g,B){return this.request(Qh(B||{},{method:a,url:g,data:(B||{}).data}))}}),Hn.forEach(["post","put","patch"],function(a){function g(B){return function(C,x,e){return this.request(Qh(e||{},{method:a,headers:B?{"Content-Type":"multipart/form-data"}:{},url:C,data:x}))}}$h.prototype[a]=g(),$h.prototype[a+"Form"]=g(!0)});let Qde=class WT{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(C){g=C});const B=this;this.promise.then(J=>{if(!B._listeners)return;let C=B._listeners.length;for(;C-- >0;)B._listeners[C](J);B._listeners=null}),this.promise.then=J=>{let C;const x=new Promise(e=>{B.subscribe(e),C=e}).then(J);return x.cancel=function(){B.unsubscribe(C)},x},a(function(C,x,e){B.reason||(B.reason=new Wp(C,x,e),g(B.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const g=this._listeners.indexOf(a);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const a=new AbortController,g=B=>{a.abort(B)};return this.subscribe(g),a.signal.unsubscribe=()=>this.unsubscribe(g),a.signal}static source(){let a;return{token:new WT(function(J){a=J}),cancel:a}}};function $de(r){return function(g){return r.apply(null,g)}}function ehe(r){return Hn.isObject(r)&&r.isAxiosError===!0}const nb={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(nb).forEach(([r,a])=>{nb[a]=r});function vT(r){const a=new $h(r),g=z6($h.prototype.request,a);return Hn.extend(g,$h.prototype,a,{allOwnKeys:!0}),Hn.extend(g,a,null,{allOwnKeys:!0}),g.create=function(J){return vT(Qh(r,J))},g}const to=vT(cm);to.Axios=$h,to.CanceledError=Wp,to.CancelToken=Qde,to.isCancel=rT,to.VERSION=gT,to.toFormData=uy,to.AxiosError=va,to.Cancel=to.CanceledError,to.all=function(a){return Promise.all(a)},to.spread=$de,to.isAxiosError=ehe,to.mergeConfig=Qh,to.AxiosHeaders=mu,to.formToJSON=r=>eT(Hn.isHTMLForm(r)?new FormData(r):r),to.getAdapter=fT.getAdapter,to.HttpStatusCode=nb,to.default=to;const{Axios:Nve,AxiosError:Ove,CanceledError:Ive,isCancel:Rve,CancelToken:Lve,VERSION:zve,all:Dve,Cancel:Bve,isAxiosError:Vve,spread:Fve,toFormData:jve,AxiosHeaders:Uve,HttpStatusCode:qve,formToJSON:Wve,getAdapter:Gve,mergeConfig:Hve}=to,ws=(r,a)=>{const g=r.__vccOpts||r;for(const[B,J]of a)g[B]=J;return g},the={class:"tooltip-template-options"},rhe=ws({__name:"TooltipTemplateOptions",props:{canEdit:{type:Boolean,default:!0}},emits:["generar-reporte","renombrar","editar","duplicar","eliminar"],setup(r,{emit:a}){return(g,B)=>(p.openBlock(),p.createElementBlock("div",the,[p.createElementVNode("ul",null,[p.createElementVNode("li",{class:"option",onClick:B[0]||(B[0]=J=>g.$emit("generar-reporte"))},[...B[5]||(B[5]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report.svg",alt:"Generar reporte",class:"icon"},null,-1),p.createTextVNode(" Generar reporte ",-1)])]),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:0,class:"option",onClick:B[1]||(B[1]=J=>g.$emit("renombrar"))},[...B[6]||(B[6]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1),p.createTextVNode(" Renombrar template ",-1)])])):p.createCommentVNode("",!0),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:1,class:"option",onClick:B[2]||(B[2]=J=>g.$emit("editar"))},[...B[7]||(B[7]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-edit.svg",alt:"Editar template",class:"icon"},null,-1),p.createTextVNode(" Editar template ",-1)])])):p.createCommentVNode("",!0),p.createElementVNode("li",{class:"option",onClick:B[3]||(B[3]=J=>g.$emit("duplicar"))},[...B[8]||(B[8]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate.svg",alt:"Duplicar template",class:"icon"},null,-1),p.createTextVNode(" Duplicar template ",-1)])]),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:2,class:"option",onClick:B[4]||(B[4]=J=>g.$emit("eliminar"))},[...B[9]||(B[9]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1),p.createTextVNode(" Eliminar template ",-1)])])):p.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-137412ab"]]),nhe={class:"template-card postpartido",style:{position:"relative"}},ihe={key:0,class:"template-img-placeholder",style:{position:"relative"}},ahe={key:0,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-01.jpg",alt:"Template Prematch Type 1",class:"template-img"},ohe={key:1,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-01.jpg",alt:"Template Postmatch Type 1",class:"template-img"},she={key:2,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-02.jpg",alt:"Template Prematch Type 2",class:"template-img"},lhe={key:3,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-02.jpg",alt:"Template Postmatch Type 2",class:"template-img"},che={key:4,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-03.jpg",alt:"Template Prematch Type 3",class:"template-img"},uhe={key:5,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-03.jpg",alt:"Template Postmatch Type 3",class:"template-img"},dhe={key:6,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-04.jpg",alt:"Template Prematch Type 4",class:"template-img"},hhe={key:7,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-04.jpg",alt:"Template Postmatch Type 4",class:"template-img"},phe={key:8,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumb1.png",alt:"Template Default",class:"template-img"},fhe={class:"inner-card-postpartido"},mhe={class:"postpartido-footer"},ghe={class:"postpartido-version"},yhe={class:"postpartido-status"},vhe={class:"tipo-value"},bhe=ws({__name:"TemplateItem",props:{template:{type:Object,required:!0},userId:{type:Number,required:!0}},emits:["generar-reporte","renombrar","duplicar","eliminar","edit-template"],setup(r,{emit:a}){const g=r,B=a,J=p.ref(!1),C=p.computed(()=>g.userId===g.template.user_id);function x(){console.log("generar-reporte"),J.value=!1,B("generar-reporte")}function e(){console.log("renombrar"),J.value=!1;const y=g.template.name||"";B("renombrar",y)}function v(){console.log("editar"),J.value=!1,B("edit-template",g.template)}function u(){console.log("duplicar"),J.value=!1;const y=g.template.name||"";B("duplicar",y)}function t(){console.log("eliminar"),J.value=!1,B("eliminar",g.template)}function w(y){console.log("toggle-autogen",y)}return(y,b)=>(p.openBlock(),p.createElementBlock("div",nhe,[p.createElementVNode("div",{class:"three-dots",onClick:b[0]||(b[0]=p.withModifiers(h=>J.value=!J.value,["stop"]))},[...b[5]||(b[5]=[p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1)])]),r.template.pages&&r.template.pages[0]?(p.openBlock(),p.createElementBlock("div",ihe,[r.template.template_type===1&&r.template.pages[0].type==1?(p.openBlock(),p.createElementBlock("img",ahe)):r.template.template_type===2&&r.template.pages[0].type==1?(p.openBlock(),p.createElementBlock("img",ohe)):r.template.template_type===1&&r.template.pages[0].type==2?(p.openBlock(),p.createElementBlock("img",she)):r.template.template_type===2&&r.template.pages[0].type==2?(p.openBlock(),p.createElementBlock("img",lhe)):r.template.template_type===1&&r.template.pages[0].type==3?(p.openBlock(),p.createElementBlock("img",che)):r.template.template_type===2&&r.template.pages[0].type==3?(p.openBlock(),p.createElementBlock("img",uhe)):r.template.template_type===1&&r.template.pages[0].type==4?(p.openBlock(),p.createElementBlock("img",dhe)):r.template.template_type===2&&r.template.pages[0].type==4?(p.openBlock(),p.createElementBlock("img",hhe)):(p.openBlock(),p.createElementBlock("img",phe))])):p.createCommentVNode("",!0),p.createElementVNode("div",fhe,[p.createElementVNode("div",mhe,[p.createElementVNode("div",ghe,p.toDisplayString(r.template.name),1),p.createElementVNode("div",yhe,[b[6]||(b[6]=p.createElementVNode("span",{class:"tipo-label"},"Tipo:",-1)),p.createElementVNode("span",vhe," "+p.toDisplayString(r.template.template_type==1?"Prepartido":"Postpartido"),1)]),p.createElementVNode("button",{class:"postpartido-btn",onClick:b[1]||(b[1]=h=>B("generar-reporte"))},"Generar reporte")])]),J.value?(p.openBlock(),p.createBlock(rhe,{key:1,"can-edit":C.value,onClick:b[2]||(b[2]=p.withModifiers(h=>J.value=!1,["self"])),onMouseleave:b[3]||(b[3]=h=>J.value=!1),onGenerarReporte:x,onRenombrar:e,onEditar:v,onDuplicar:u,onEliminar:t,onToggleAutogen:w},null,8,["can-edit"])):p.createCommentVNode("",!0),J.value?(p.openBlock(),p.createElementBlock("div",{key:2,class:"tooltip-overlay",onClick:b[4]||(b[4]=h=>J.value=!1)})):p.createCommentVNode("",!0)]))}},[["__scopeId","data-v-06712795"]]),xhe={class:"modal-overlay"},_he={class:"modal-content"},whe={class:"modal-body"},The={class:"radio-group"},khe=["disabled"],She={key:0,class:"error-message"},Ehe={class:"modal-footer"},Ahe=["disabled"],Che=["disabled"],Mhe=["disabled"],Phe={key:0,class:"loading-spinner"},Nhe={key:1},bT=ws({__name:"ModalCreateTemplate",props:{token:{type:String,required:!0},team:{type:Number,required:!0}},emits:["close","template-created","open-modal-new-template"],setup(r,{emit:a}){const g=r,B=a,J=p.ref(1),C=p.ref("pre"),x=p.ref(""),e=p.ref(!1),v=p.ref(""),u=async()=>{var t;if(!(x.value.trim().length<3)){e.value=!0,v.value="";try{const w={name:x.value.trim(),team_id:g.team,template_type:C.value==="pre"?1:2};console.log("toke mostrado es: ",g.token);const b=await to.create({headers:{Authorization:`${g.token}`}}).post("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates",w);console.log("response.data",b.data),B("template-created",b.data),B("open-modal-new-template",(t=b.data)==null?void 0:t.data),B("close")}catch(w){console.error("Error al guardar template:",w),w.response&&w.response.status===409&&(v.value="Ya existe un template con el mismo nombre")}finally{e.value=!1}}};return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(t,w)=>(p.openBlock(),p.createElementBlock("div",xhe,[p.createElementVNode("div",_he,[p.createElementVNode("button",{class:"close-btn",onClick:w[0]||(w[0]=y=>t.$emit("close"))},[...w[6]||(w[6]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),w[11]||(w[11]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-editar-withe.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Crear Template")],-1)),w[12]||(w[12]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",whe,[J.value===1?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[w[9]||(w[9]=p.createElementVNode("div",{class:"modal-label"},"Define el tipo de análisis para tu template:",-1)),p.createElementVNode("div",The,[p.createElementVNode("label",{class:p.normalizeClass(["radio-label",{selected:C.value==="pre"}])},[p.withDirectives(p.createElementVNode("input",{type:"radio",value:"pre","onUpdate:modelValue":w[1]||(w[1]=y=>C.value=y)},null,512),[[p.vModelRadio,C.value]]),w[7]||(w[7]=p.createTextVNode(" Prepartido ",-1))],2),p.createElementVNode("label",{class:p.normalizeClass(["radio-label",{selected:C.value==="post"}])},[p.withDirectives(p.createElementVNode("input",{type:"radio",value:"post","onUpdate:modelValue":w[2]||(w[2]=y=>C.value=y)},null,512),[[p.vModelRadio,C.value]]),w[8]||(w[8]=p.createTextVNode(" Postpartido ",-1))],2)])],64)):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[w[10]||(w[10]=p.createElementVNode("div",{class:"modal-label"},"Agrega un nombre a tu template:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":w[3]||(w[3]=y=>x.value=y),placeholder:"Untitled",maxlength:"40",autocomplete:"off",disabled:e.value},null,8,khe),[[p.vModelText,x.value]]),v.value?(p.openBlock(),p.createElementBlock("div",She,p.toDisplayString(v.value),1)):p.createCommentVNode("",!0)],64))]),w[13]||(w[13]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Ehe,[p.createElementVNode("button",{class:"cancel-btn",onClick:w[4]||(w[4]=y=>t.$emit("close")),disabled:e.value},"Cancelar",8,Ahe),J.value===1?(p.openBlock(),p.createElementBlock("button",{key:0,class:"next-btn",disabled:!C.value,onClick:w[5]||(w[5]=y=>J.value=2)}," Siguiente ",8,Che)):(p.openBlock(),p.createElementBlock("button",{key:1,class:"next-btn",disabled:x.value.trim().length<3||e.value,onClick:u},[e.value?(p.openBlock(),p.createElementBlock("div",Phe)):(p.openBlock(),p.createElementBlock("span",Nhe,"Guardar"))],8,Mhe))])])]))}},[["__scopeId","data-v-7e85c356"]]),Ohe={class:"modal-overlay"},Ihe={class:"modal-content"},Rhe={class:"modal-body"},Lhe={key:0,class:"error-message-container"},zhe={key:1,style:{position:"relative"}},Dhe={key:0,class:"loading-autoseteo-overlay"},Bhe={class:"modal-group"},Vhe={key:0,class:"placeholder"},Fhe={key:0,class:"placeholder"},jhe={key:1},Uhe={key:0,class:"custom-select-dropdown"},qhe=["onMousedown"],Whe={class:"modal-row"},Ghe={class:"modal-group"},Hhe={key:0,class:"placeholder"},Xhe={key:0,class:"placeholder"},Yhe={key:1},Jhe={key:0,class:"custom-select-dropdown"},Khe=["onMousedown"],Zhe={class:"modal-group"},Qhe={key:0,class:"placeholder"},$he={key:0,class:"placeholder"},epe={key:1},tpe={key:0,class:"custom-select-dropdown"},rpe=["onMousedown"],npe={class:"modal-group"},ipe={key:0,class:"placeholder"},ape={key:0,class:"placeholder"},ope=["src"],spe=["src"],lpe={key:0,class:"custom-select-dropdown"},cpe=["onMousedown"],upe=["src"],dpe=["src"],hpe={key:0,class:"header-separator"},ppe={key:1,class:"modal-footer"},fpe=["disabled"],mpe={key:0,class:"loading-spinner select-spinner"},gpe=ws({__name:"ModalGenerarReporte",props:{userId:{type:String,required:!0},token:{type:String,required:!0},team:{type:Number,required:!0},templateId:{type:String,required:!0},templateType:{type:String,required:!1},template:{type:Object,required:!1}},emits:["close","generar","switch-to-reports"],setup(r,{emit:a}){const g=r,B=a,J=p.ref([]),C=p.ref([]),x=p.ref([]),e=p.ref([]),v=p.ref(""),u=p.ref(""),t=p.ref(""),w=p.ref(null),y=to.create({headers:{Authorization:g.token}}),b=p.ref(!1),h=p.ref(!1),n=p.ref(!1),i=p.ref(!1),d=p.ref(!1),s=p.ref(!1),c=p.ref(!1),f=p.ref(!1),m=p.ref([]),T=p.ref([]),E=p.ref(!1),S=p.ref(!1),P=p.ref(!1);function N(ae){s.value&&(s.value=!1,d.value=!1),c.value=!1,v.value=ae,E.value=!1,_()}function A(ae){s.value&&(s.value=!1,d.value=!1),c.value=!1,u.value=ae,S.value=!1,R()}function O(ae){s.value&&(s.value=!1,d.value=!1),c.value=!1,t.value=ae,P.value=!1,V()}const M=p.ref(null);async function k(){try{h.value=!0;const ae=await to.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments");if(ae.data&&Array.isArray(ae.data)){if(m.value=ae.data,J.value=ae.data.map(oe=>oe.tournament).sort((oe,he)=>oe.order&&he.order?oe.order-he.order:oe.order&&!he.order?-1:!oe.order&&he.order?1:0),v.value="",C.value=[],u.value="",x.value=[],t.value="",e.value=[],w.value=null,M.value)setTimeout(()=>{ee(M.value)},100);else if(J.value.length>0){const oe=J.value[0];v.value=oe,I(oe)}}}catch(ae){console.error("Error al cargar torneos:",ae),J.value=[{name:"Concacaf Copa Oro"},{name:"Liga MX"},{name:"MLS"}],C.value=[],x.value=[],v.value="",u.value="",t.value="",w.value=null}finally{h.value=!1}}function I(ae){const oe=m.value.find(he=>he.tournament&&he.tournament.name===ae.name);oe&&Array.isArray(oe.seasons)?(C.value=oe.seasons,u.value="",x.value=[],t.value="",e.value=[],w.value=null):(C.value=[],u.value="",x.value=[],t.value="",e.value=[],w.value=null)}function _(){u.value="",t.value="",w.value=null,v.value?I(v.value):(C.value=[],x.value=[],e.value=[])}function R(){if(i.value=!0,t.value="",w.value=null,x.value=[],e.value=[],u.value&&u.value.id){const ae=[u.value.id];if(u.value.related_seasons&&Array.isArray(u.value.related_seasons)){const oe=u.value.related_seasons.map(he=>he.id).filter(Boolean);ae.push(...oe)}z(ae)}else i.value=!1}async function z(ae){n.value=!0;try{const oe=Array.isArray(ae)?ae.join("&seasons="):ae,he=await y.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons=${oe}`);if(he.data.data&&Array.isArray(he.data.data)){const fe=he.data.data.reduce((ye,_e)=>_e.games&&Array.isArray(_e.games)?ye.concat(_e.games):ye,[]);T.value=fe.map(ye=>({label:ye.label||`${ye.home_team_acronym||"Local"} vs ${ye.visiting_team_acronym||"Visitante"}`,localLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+ye.home_team+".png"||"",visitanteLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+ye.visiting_team+".png"||"",...ye}));let se=T.value;g.templateType==="2"||g.templateType===2?se=se.filter(ye=>ye.game_status===1):(g.templateType==="1"||g.templateType===1)&&(se=se.filter(ye=>ye.game_status===4));const ue=se.map(ye=>ye.matchday_id).filter(Boolean),de=[...new Set(ue)];x.value=de.map(ye=>{const _e=T.value.find(xe=>xe.matchday_id&&xe.matchday_id===ye);return _e?{id:ye,name:_e.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")}:null}).filter(Boolean).sort((ye,_e)=>{const xe=ye.name.startsWith("Jornada"),Se=_e.name.startsWith("Jornada");return xe&&Se?ye.id-_e.id:xe&&!Se?-1:!xe&&Se?1:0}),t.value="",e.value=[],w.value=null,i.value=!1,M.value&&s.value&&setTimeout(()=>{K(M.value)},200)}else T.value=[],x.value=[],t.value="",e.value=[],w.value=null}catch(oe){console.error("Error al cargar partidos:",oe),T.value=[],x.value=[],t.value="",e.value=[],w.value=null,i.value=!1}finally{n.value=!1}}function V(){w.value=null,e.value=[],t.value&&t.value.id&&U(t.value)}function U(ae){if(console.log("LLEga aqui mero ******************************"),!ae||!ae.id){e.value=[];return}let oe=T.value.filter(he=>he.matchday_id===ae.id);console.log("////////////////////LLEga aqui mero partidosFiltrados ******************************",oe),console.log("El template Type Es: ",g.templateType),g.templateType==="2"||g.templateType===2?(console.log("Si es postmatch prematch: el template"),console.log("partidosFiltrados; ",oe),oe=oe.filter(he=>he.game_status===1),console.log("******************* partidos cvon game estatus 1: ",oe)):(g.templateType==="1"||g.templateType===1)&&(console.log("Si es prematch: el template"),console.log("partidosFiltrados; ",oe),oe=oe.filter(he=>he.game_status===4),console.log("******************* partidos cvon game estatus 4: ",oe)),e.value=oe}async function q(){try{h.value=!0;let ae="";u.value&&u.value.name&&(ae=u.value.name);const oe={template_id:g.templateId,user_id:g.template&&g.template.user_id?parseInt(g.template.user_id):parseInt(g.userId),tournament_id:v.value.id||1,tournament_name:v.value.name,season_id:w.value.season_id,season_name:ae,game_id:w.value.id||w.value.game_id},he=await to.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/reports`,oe,{headers:{Authorization:g.token,"Content-Type":"application/json"}});B("generar",{liga:v.value,torneo:u.value,jornada:t.value,partido:w.value,reportData:he.data}),B("switch-to-reports"),B("close")}catch(ae){console.error("Error al generar el reporte:",ae),ae.response&&ae.response.status===409?f.value=!0:alert("Error al generar el reporte. Por favor, intenta de nuevo.")}finally{h.value=!1}}function W(){P.value=!P.value}function Z(ae){s.value&&(s.value=!1,d.value=!1),c.value=!1,w.value=ae,b.value=!1}function ne(){document.body.style.overflow="hidden"}function X(){document.body.style.overflow=""}p.onMounted(()=>{k(),ne(),re(),M.value&&(d.value=!0,s.value=!0)}),p.watch(v,(ae,oe)=>{if(ae&&M.value&&s.value&&!oe&&!c.value){const he=C.value.find(fe=>fe.id===M.value.season_id);he&&(c.value=!0,u.value=he,c.value=!1)}}),p.watch(u,(ae,oe)=>{ae&&M.value&&s.value&&!oe&&!c.value?setTimeout(()=>{const he=x.value.find(fe=>fe.id===M.value.matchday_id);he&&(c.value=!0,t.value=he,U(he),c.value=!1)},500):ae&&oe&&s.value&&(s.value=!1,d.value=!1)}),p.watch(t,(ae,oe)=>{ae&&M.value&&s.value&&!oe&&!c.value?setTimeout(()=>{const he=e.value.find(se=>se.game_id===M.value.game_id||se.id===M.value.game_id);if(U(ae),he){w.value=he,d.value=!1,s.value=!1;return}const fe=e.value.find(se=>se.home_team===M.value.home_team&&se.visiting_team===M.value.visiting_team);if(fe){w.value=fe,d.value=!1,s.value=!1;return}if(T.value.length>0){const se=T.value.find(ue=>ue.game_id===M.value.game_id||ue.id===M.value.game_id);if(se){w.value=se,d.value=!1,s.value=!1;return}}d.value=!1,s.value=!1},1e3):ae&&oe&&s.value&&(s.value=!1,d.value=!1)}),p.onUnmounted(()=>{X()});async function re(){try{const ae=await y.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/teams/${g.team}/last-games`);g.templateType==="1"||g.templateType===1?(M.value=ae.data.data.prematch,ae.data.data.prematch&&(d.value=!0,s.value=!0,ae.data.data.prematch.season_id&&await z([ae.data.data.prematch.season_id]))):(g.templateType==="2"||g.templateType===2)&&(M.value=ae.data.data.postmatch,ae.data.data.postmatch&&(d.value=!0,s.value=!0,ae.data.data.postmatch.season_id&&await z([ae.data.data.postmatch.season_id])))}catch(ae){console.error("Error al cargar últimos juegos:",ae)}}function ee(ae){if(!(!ae||!ae.game_id)&&ae.tournament_id&&J.value.length>0){const oe=J.value.find(he=>he.id===ae.tournament_id);oe&&(v.value=oe,I(oe))}}function K(ae){if(!(!ae||!ae.game_id)&&ae.tournament_id&&J.value.length>0){const oe=J.value.find(he=>he.id===ae.tournament_id);if(oe&&(v.value=oe,ae.season_id&&C.value.length>0)){const he=C.value.find(fe=>fe.id===ae.season_id);if(he&&(u.value=he,ae.matchday_id&&x.value.length>0)){const fe=x.value.find(se=>se.id===ae.matchday_id);if(fe&&(t.value=fe,ae.game_id&&e.value.length>0)){const se=e.value.find(ue=>ue.game_id===ae.game_id||ue.id===ae.game_id);if(se)w.value=se;else{const ue=e.value.find(de=>de.home_team===ae.home_team&&de.visiting_team===ae.visiting_team);ue&&(w.value=ue)}}}}}}function te(){f.value=!1,v.value="",u.value="",t.value="",w.value=null,C.value=[],x.value=[],e.value=[],E.value=!1,S.value=!1,P.value=!1,b.value=!1,X(),B("close")}return(ae,oe)=>(p.openBlock(),p.createElementBlock("div",Ohe,[p.createElementVNode("div",Ihe,[p.createElementVNode("button",{class:"close-btn",onClick:te},[...oe[7]||(oe[7]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),oe[22]||(oe[22]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report-white.svg",class:"icon-title",alt:"icono reporte blanco"}),p.createElementVNode("span",{class:"modal-title"},"Generar reporte")],-1)),oe[23]||(oe[23]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Rhe,[f.value?(p.openBlock(),p.createElementBlock("div",Lhe,[oe[8]||(oe[8]=p.createElementVNode("p",{class:"error-text"},[p.createTextVNode(" Este reporte ya fue generado previamente"),p.createElementVNode("br"),p.createTextVNode(" con este template para el partido seleccionado. ")],-1)),p.createElementVNode("button",{class:"accept-btn",onClick:te},"Aceptar")])):(p.openBlock(),p.createElementBlock("div",zhe,[d.value?(p.openBlock(),p.createElementBlock("div",Dhe,[...oe[9]||(oe[9]=[p.createElementVNode("div",{class:"loading-autoseteo-content"},[p.createElementVNode("div",{class:"loading-spinner"})],-1)])])):p.createCommentVNode("",!0),p.createElementVNode("div",Bhe,[oe[12]||(oe[12]=p.createElementVNode("label",null,"1. Elige el torneo",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown liga-select",tabindex:"0",onClick:oe[0]||(oe[0]=he=>E.value=!E.value),onBlur:oe[1]||(oe[1]=he=>E.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:h.value||J.value.length===0}])},[h.value?(p.openBlock(),p.createElementBlock("span",Vhe,[...oe[10]||(oe[10]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando torneos...",-1)])])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[v.value?(p.openBlock(),p.createElementBlock("span",jhe,p.toDisplayString(v.value.name),1)):(p.openBlock(),p.createElementBlock("span",Fhe,"Selecciona el torneo"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:E.value}])},[...oe[11]||(oe[11]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),E.value&&J.value.length>0?(p.openBlock(),p.createElementBlock("div",Uhe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(J.value,he=>(p.openBlock(),p.createElementBlock("div",{key:he.name,class:"custom-select-option",onMousedown:p.withModifiers(fe=>N(he),["prevent"])},p.toDisplayString(he.name),41,qhe))),128))])):p.createCommentVNode("",!0)],32)]),p.createElementVNode("div",Whe,[p.createElementVNode("div",Ghe,[oe[15]||(oe[15]=p.createElementVNode("label",null,"2. Elige la temporada",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown torneo-select",tabindex:"0",onClick:oe[2]||(oe[2]=he=>S.value=!S.value),onBlur:oe[3]||(oe[3]=he=>S.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!v.value||C.value.length===0||h.value}])},[h.value?(p.openBlock(),p.createElementBlock("span",Hhe,[...oe[13]||(oe[13]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando temporada...",-1)])])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[u.value?(p.openBlock(),p.createElementBlock("span",Yhe,p.toDisplayString(u.value.name),1)):(p.openBlock(),p.createElementBlock("span",Xhe,"Elige la temporada"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:S.value}])},[...oe[14]||(oe[14]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),S.value&&C.value.length>0&&v.value?(p.openBlock(),p.createElementBlock("div",Jhe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(C.value,he=>(p.openBlock(),p.createElementBlock("div",{key:he.id,class:"custom-select-option",onMousedown:p.withModifiers(fe=>A(he),["prevent"])},p.toDisplayString(he.name),41,Khe))),128))])):p.createCommentVNode("",!0)],32)]),p.createElementVNode("div",Zhe,[oe[18]||(oe[18]=p.createElementVNode("label",null,"3. Elige la jornada",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown jornada-select",tabindex:"0",onClick:W,onBlur:oe[4]||(oe[4]=he=>P.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!u.value||x.value.length===0||i.value}])},[i.value?(p.openBlock(),p.createElementBlock("span",Qhe,[...oe[16]||(oe[16]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando jornadas...",-1)])])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[t.value?(p.openBlock(),p.createElementBlock("span",epe,p.toDisplayString(t.value.name),1)):(p.openBlock(),p.createElementBlock("span",$he,"Elige la jornada"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:P.value}])},[...oe[17]||(oe[17]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),P.value&&x.value.length>0?(p.openBlock(),p.createElementBlock("div",tpe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(x.value,he=>(p.openBlock(),p.createElementBlock("div",{key:he.id,class:"custom-select-option",onMousedown:p.withModifiers(fe=>O(he),["prevent"])},p.toDisplayString(he.name),41,rpe))),128))])):p.createCommentVNode("",!0)],32)])]),p.createElementVNode("div",npe,[oe[21]||(oe[21]=p.createElementVNode("label",null,"4. Elige el partido",-1)),p.createElementVNode("div",{class:"select-wrapper partido-select",tabindex:"0",onClick:oe[5]||(oe[5]=he=>b.value=!b.value),onBlur:oe[6]||(oe[6]=he=>b.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!t.value||n.value}])},[n.value?(p.openBlock(),p.createElementBlock("span",ipe,[...oe[19]||(oe[19]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando partidos...",-1)])])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[w.value?(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[w.value.localLogo?(p.openBlock(),p.createElementBlock("img",{key:0,src:w.value.localLogo,class:"logo-equipo",alt:"local"},null,8,ope)):p.createCommentVNode("",!0),p.createElementVNode("span",null,p.toDisplayString(w.value.label),1),w.value.visitanteLogo?(p.openBlock(),p.createElementBlock("img",{key:1,src:w.value.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,spe)):p.createCommentVNode("",!0)],64)):(p.openBlock(),p.createElementBlock("span",ape,"Selecciona el partido"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:b.value}])},[...oe[20]||(oe[20]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),b.value&&!n.value&&t.value?(p.openBlock(),p.createElementBlock("div",lpe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(e.value,he=>(p.openBlock(),p.createElementBlock("div",{key:he.label,class:"custom-select-option",onMousedown:p.withModifiers(fe=>Z(he),["prevent"])},[p.createElementVNode("img",{src:he.localLogo,class:"logo-equipo",alt:"local"},null,8,upe),p.createElementVNode("span",null,p.toDisplayString(he.label),1),p.createElementVNode("img",{src:he.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,dpe)],40,cpe))),128))])):p.createCommentVNode("",!0)],32)])]))]),f.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",hpe)),f.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",ppe,[p.createElementVNode("button",{class:"cancel-btn",onClick:te},"Cancelar"),p.createElementVNode("button",{class:"next-btn",disabled:!v.value||!u.value||!t.value||!w.value||h.value,onClick:q},[h.value?(p.openBlock(),p.createElementBlock("span",mpe)):p.createCommentVNode("",!0),p.createTextVNode(" "+p.toDisplayString(h.value?"Generando...":"Generar"),1)],8,fpe)]))])]))}},[["__scopeId","data-v-a851350e"]]),ype={class:"modal-overlay"},vpe={class:"modal-content"},bpe={class:"modal-body"},xpe=["placeholder","disabled"],_pe={key:0,class:"error-message"},wpe={class:"modal-footer"},Tpe=["disabled"],kpe=["disabled"],Spe={key:0},Epe={key:1},Ape=ws({__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(r,{emit:a}){const g=r,B=a,J=p.ref(g.initialName),C=p.ref(!1),x=p.ref("");p.watch(()=>g.initialName,v=>{J.value=v,x.value=""}),p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});async function e(){var v;if(console.log("acceptRename"),!(J.value.trim().length<3)){console.log("acceptRename 22"),C.value=!0,x.value="";try{await to.put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/templates/${g.templateId}/general`,{name:J.value.trim()},{headers:{Authorization:`${g.token}`,"Content-Type":"application/json"}}),B("rename",J.value.trim()),B("refresh"),B("close")}catch(u){console.error("Error al renombrar el template:",u),((v=u.response)==null?void 0:v.status)===409?x.value="Ya existe un template con el mismo nombre":x.value="Error al renombrar el template. Inténtalo de nuevo."}finally{C.value=!1}}}return(v,u)=>(p.openBlock(),p.createElementBlock("div",ype,[p.createElementVNode("div",vpe,[p.createElementVNode("button",{class:"close-btn",onClick:u[0]||(u[0]=t=>v.$emit("close"))},[...u[3]||(u[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),u[5]||(u[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Renombrar Template")],-1)),u[6]||(u[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",bpe,[u[4]||(u[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":u[1]||(u[1]=t=>J.value=t),placeholder:r.initialName,maxlength:"40",autocomplete:"off",disabled:C.value},null,8,xpe),[[p.vModelText,J.value]]),x.value?(p.openBlock(),p.createElementBlock("div",_pe,p.toDisplayString(x.value),1)):p.createCommentVNode("",!0)]),u[7]||(u[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",wpe,[p.createElementVNode("button",{class:"cancel-btn",onClick:u[2]||(u[2]=t=>v.$emit("close")),disabled:C.value},"Cancelar",8,Tpe),p.createElementVNode("button",{class:"next-btn",disabled:J.value.trim().length<3||C.value,onClick:e},[C.value?(p.openBlock(),p.createElementBlock("span",Spe,"Guardando...")):(p.openBlock(),p.createElementBlock("span",Epe,"Guardar"))],8,kpe)])])]))}},[["__scopeId","data-v-95975b9e"]]),Cpe={class:"modal-overlay"},Mpe={class:"modal-content"},Ppe={class:"modal-body"},Npe=["placeholder"],Ope={class:"modal-footer"},Ipe=["disabled"],Rpe=ws({__name:"ModalduplicateTemplate",props:{initialName:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","duplicate","template-duplicated"],setup(r,{emit:a}){const g=r,B=a,J=p.ref(g.initialName+" copy"),C=p.ref(!1);p.watch(()=>g.initialName,e=>{J.value=e+" copy"}),p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});async function x(){if(J.value.trim().length>=3&&!C.value){C.value=!0;try{const e=await to.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/${g.templateId}/duplicate`,{name:J.value.trim()},{headers:{Authorization:`${g.token}`,"Content-Type":"application/json"}});B("template-duplicated",{originalTemplateId:g.templateId,newTemplateName:J.value.trim(),responseData:e.data}),B("close")}catch(e){console.error("Error al duplicar template:",e),alert("Error al duplicar el template. Por favor, intenta de nuevo.")}finally{C.value=!1}}}return(e,v)=>(p.openBlock(),p.createElementBlock("div",Cpe,[p.createElementVNode("div",Mpe,[p.createElementVNode("button",{class:"close-btn",onClick:v[0]||(v[0]=u=>e.$emit("close"))},[...v[3]||(v[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),v[5]||(v[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Duplicar template")],-1)),v[6]||(v[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Ppe,[v[4]||(v[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":v[1]||(v[1]=u=>J.value=u),placeholder:r.initialName,maxlength:"40",autocomplete:"off"},null,8,Npe),[[p.vModelText,J.value]])]),v[7]||(v[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Ope,[p.createElementVNode("button",{class:"cancel-btn",onClick:v[2]||(v[2]=u=>e.$emit("close"))},"Cancelar"),p.createElementVNode("button",{class:"next-btn",disabled:J.value.trim().length<3||C.value,onClick:x},p.toDisplayString(C.value?"Duplicando...":"Aceptar"),9,Ipe)])])]))}},[["__scopeId","data-v-98cd9dcd"]]),Lpe={class:"modal-overlay"},zpe={class:"modal-content"},Dpe={class:"modal-footer"},Bpe=["disabled"],Vpe=ws({__name:"ModalDeleteTemplate",props:{templateId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","templateDeleted"],setup(r,{emit:a}){const g=r,B=a,J=p.ref(!1);p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});const C=async()=>{try{J.value=!0;const e=await to.create({headers:{Authorization:`${g.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/templates/${g.templateId}`);(e.status===200||e.status===204)&&(B("templateDeleted",g.templateId),B("close"))}catch(x){console.error("Error al eliminar template:",x),alert("Error al eliminar el template. Por favor, inténtalo de nuevo.")}finally{J.value=!1}};return(x,e)=>(p.openBlock(),p.createElementBlock("div",Lpe,[p.createElementVNode("div",zpe,[p.createElementVNode("button",{class:"close-btn",onClick:e[0]||(e[0]=v=>x.$emit("close"))},[...e[2]||(e[2]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),e[3]||(e[3]=p.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)),p.createElementVNode("div",Dpe,[p.createElementVNode("button",{class:"cancel-btn",onClick:e[1]||(e[1]=v=>x.$emit("close"))},"Cancelar"),p.createElementVNode("button",{class:"delete-btn",onClick:C,disabled:J.value},p.toDisplayString(J.value?"Eliminando...":"Eliminar"),9,Bpe)])])]))}},[["__scopeId","data-v-65422842"]]),Fpe={class:"templates-header"},jpe={class:"count"},Upe={key:0,class:"sort-options"},qpe=["onClick"],Wpe={key:0,class:"checkmark"},Gpe={key:0,class:"loading-state"},Hpe=ws({__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(r,{expose:a,emit:g}){const B=g,J=r,C=p.ref(!1),x=p.ref(null),e=p.ref(!1),v=p.ref(!1),u=p.ref(!1),t=p.ref(!1),w=p.ref(!1),y=p.ref(""),b=p.ref(""),h=p.ref(""),n=p.ref(""),i=p.ref(""),d=p.ref(""),s=p.ref(""),c=p.ref(""),f=p.ref(""),m=p.ref(null),T=p.ref(null),E=p.ref(null),S=p.ref(null),P=p.ref(0),N=p.ref([]),A=p.ref(!1),O=p.ref(null);p.watch([()=>J.team,()=>J.token],()=>{J.team&&J.token&&k()},{immediate:!1});const M=[{label:"A - Z",value:"name-asc"},{label:"Más recientes",value:"date-desc"}],k=async()=>{try{A.value=!0,O.value=null;const X=await to.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/teams/${J.team}`,{headers:{Authorization:`${J.token}`,"Content-Type":"application/json"}});X.data&&Array.isArray(X.data)?N.value=X.data:X.data&&X.data.templates?N.value=X.data.templates:X.data&&X.data.data?N.value=X.data.data:N.value=[]}catch(X){console.error("Error al obtener templates:",X),console.error("Error response:",X.response),O.value=X.message||"Error al cargar los templates",N.value=[]}finally{A.value=!1}},I=p.computed(()=>{if(!N.value.length)return[];let X=[...N.value];if(J.searchQuery.trim()){const re=J.searchQuery.toLowerCase().trim();X=X.filter(ee=>ee.name.toLowerCase().includes(re))}switch(x.value){case"name-asc":return X.sort((re,ee)=>re.name.localeCompare(ee.name));case"date-desc":return X.sort((re,ee)=>new Date(ee.created_at)-new Date(re.created_at));default:return X}}),_=p.computed(()=>{if(!P.value)return"grid-1-column";const X=340,re=20,K=P.value-40,te=Math.floor((K+re)/(X+re)),ae=Math.max(1,te);return ae>=4?"grid-4-columns":ae>=3?"grid-3-columns":ae>=2?"grid-2-columns":"grid-1-column"}),R=()=>{C.value=!C.value},z=X=>{x.value=X,C.value=!1},V=X=>{const re=M.find(ee=>ee.value===X);return re?re.label:null},U=X=>{C.value&&T.value&&!T.value.contains(X.target)&&(C.value=!1)},q=()=>{E.value&&(P.value=E.value.offsetWidth)};function W(X){B("edit-template",X)}let Z=null;p.onMounted(async()=>{document.addEventListener("mousedown",U),await p.nextTick(),q(),window.ResizeObserver?(Z=new ResizeObserver(()=>{q()}),E.value&&Z.observe(E.value)):window.addEventListener("resize",q),k()});function ne(X){console.log("onOpenModalNewTemplate template section, called with data:",X),B("open-modal-new-template",X)}return p.onBeforeUnmount(()=>{document.removeEventListener("mousedown",U),Z?Z.disconnect():window.removeEventListener("resize",q)}),a({obtenerTemplates:k}),(X,re)=>(p.openBlock(),p.createElementBlock("div",{class:"templates-section",ref_key:"templatesSectionRef",ref:E},[p.createElementVNode("div",Fpe,[p.createElementVNode("span",null,[re[11]||(re[11]=p.createTextVNode("Templates ",-1)),p.createElementVNode("span",jpe,"("+p.toDisplayString(I.value.length)+")",1)]),p.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:T},[p.createElementVNode("button",{class:"sort-button",onClick:R},[p.createTextVNode(p.toDisplayString(V(x.value)||"Ordenar")+" ",1),p.createElementVNode("span",{class:p.normalizeClass(["dropdown-arrow",{rotated:C.value}])},null,2)]),C.value?(p.openBlock(),p.createElementBlock("div",Upe,[(p.openBlock(),p.createElementBlock(p.Fragment,null,p.renderList(M,ee=>p.createElementVNode("div",{key:ee.value,class:p.normalizeClass(["sort-option",{selected:x.value===ee.value}]),onClick:K=>z(ee.value)},[p.createElementVNode("span",null,p.toDisplayString(ee.label),1),x.value===ee.value?(p.openBlock(),p.createElementBlock("span",Wpe,[...re[12]||(re[12]=[p.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):p.createCommentVNode("",!0)],10,qpe)),64))])):p.createCommentVNode("",!0)],512)]),A.value?(p.openBlock(),p.createElementBlock("div",Gpe,[...re[13]||(re[13]=[p.createElementVNode("div",{class:"loading-spinner"},null,-1),p.createElementVNode("p",null,"Cargando templates...",-1)])])):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["templates-list",_.value]),ref_key:"templatesListRef",ref:S},[p.createElementVNode("div",{class:"template-card create",onClick:re[0]||(re[0]=ee=>e.value=!0)},[...re[14]||(re[14]=[p.createElementVNode("div",{class:"inner-card"},[p.createElementVNode("div",{class:"plus"},[p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-add@3x.png",alt:"Agregar"})]),p.createElementVNode("div",{class:"create-text"},"Crear Template")],-1)])]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(I.value,ee=>(p.openBlock(),p.createBlock(bhe,{key:ee.id,template:ee,"user-id":r.userId,onGenerarReporte:K=>{s.value=ee.id,f.value=ee.template_type,m.value=ee,v.value=!0},onRenombrar:K=>{c.value=ee.id,y.value=K,b.value=ee.template_type,u.value=!0},onDuplicar:K=>{d.value=ee.id,h.value=K,t.value=!0},onEliminar:K=>{n.value=K.name,i.value=K.id,w.value=!0},onEditTemplate:W},null,8,["template","user-id","onGenerarReporte","onRenombrar","onDuplicar","onEliminar"]))),128))],2)),e.value?(p.openBlock(),p.createBlock(bT,{key:2,token:r.token,team:r.team,onClose:re[1]||(re[1]=ee=>e.value=!1),onOpenModalNewTemplate:ne},null,8,["token","team"])):p.createCommentVNode("",!0),v.value?(p.openBlock(),p.createBlock(gpe,{key:3,"user-id":r.userId,token:r.token,team:r.team,"template-id":s.value,"template-type":f.value,template:m.value,onClose:re[2]||(re[2]=ee=>v.value=!1),onSwitchToReports:re[3]||(re[3]=ee=>X.$emit("switch-to-reports"))},null,8,["user-id","token","team","template-id","template-type","template"])):p.createCommentVNode("",!0),u.value?(p.openBlock(),p.createBlock(Ape,{key:4,initialName:y.value,token:r.token,"template-id":c.value,"template-type":b.value,"user-id":r.userId,onRefresh:re[4]||(re[4]=ee=>k()),onClose:re[5]||(re[5]=ee=>u.value=!1),onRename:re[6]||(re[6]=ee=>{u.value=!1})},null,8,["initialName","token","template-id","template-type","user-id"])):p.createCommentVNode("",!0),t.value?(p.openBlock(),p.createBlock(Rpe,{key:5,initialName:h.value,token:r.token,"template-id":d.value,onClose:re[7]||(re[7]=ee=>t.value=!1),onTemplateDuplicated:re[8]||(re[8]=ee=>{t.value=!1,k()})},null,8,["initialName","token","template-id"])):p.createCommentVNode("",!0),w.value?(p.openBlock(),p.createBlock(Vpe,{key:6,"template-id":i.value,"user-id":r.userId,token:r.token,onClose:re[9]||(re[9]=ee=>w.value=!1),onTemplateDeleted:re[10]||(re[10]=ee=>{w.value=!1,k()})},null,8,["template-id","user-id","token"])):p.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-ee44a736"]]),Xpe={class:"tooltip-report-options"},Ype=ws({__name:"TooltipReportOptions",emits:["ver-reporte","renombrar","editar","duplicar","descargar","eliminar"],setup(r,{emit:a}){return(g,B)=>(p.openBlock(),p.createElementBlock("div",Xpe,[p.createElementVNode("ul",null,[p.createElementVNode("li",{class:"option",onClick:B[0]||(B[0]=J=>g.$emit("renombrar"))},[...B[3]||(B[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar reporte",class:"icon"},null,-1),p.createTextVNode(" Renombrar reporte ",-1)])]),p.createElementVNode("li",{class:"option",onClick:B[1]||(B[1]=J=>g.$emit("descargar"))},[...B[4]||(B[4]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-download.svg",alt:"Descargar reporte",class:"icon"},null,-1),p.createTextVNode(" Descargar reporte ",-1)])]),p.createElementVNode("li",{class:"option",onClick:B[2]||(B[2]=J=>g.$emit("eliminar"))},[...B[5]||(B[5]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar reporte",class:"icon"},null,-1),p.createTextVNode(" Eliminar reporte ",-1)])])])]))}},[["__scopeId","data-v-d17eb1eb"]]);function jd(r){if(!r)return"";const a=new Date(r);if(isNaN(a.getTime()))return"";const g=a.getDate(),B=a.toLocaleDateString("es-ES",{month:"short"}),J=a.getFullYear();return`${g} ${B}, ${J}`}const Jpe={class:"prematch-bg"},Kpe={class:"background-shields"},Zpe={class:"shield-left"},Qpe=["src"],$pe={class:"shield-right"},efe=["src"],tfe={class:"subtitle"},rfe={class:"jornada"},nfe={class:"fecha"},ife={class:"teams-row"},afe={class:"team team-local"},ofe={class:"escudo-svg"},sfe=["src"],lfe={class:"team-name"},cfe={class:"team team-visitor"},ufe={class:"escudo-svg"},dfe=["src"],hfe={class:"team-name"},pfe=ws({__name:"AnalisisPrematchType1",props:{report:{type:Object,default:()=>({})}},setup(r){function a(B){return B?B.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 g=r;return(B,J)=>(p.openBlock(),p.createElementBlock("div",Jpe,[p.createElementVNode("div",Kpe,[p.createElementVNode("div",Zpe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+g.report.game.home_team+".png",alt:"Escudo local"},null,8,Qpe)]),p.createElementVNode("div",$pe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+g.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,efe)])]),J[0]||(J[0]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",tfe,[p.createElementVNode("span",rfe,p.toDisplayString(a(g.report.game.matchday_name)),1),p.createElementVNode("span",nfe," - "+p.toDisplayString(p.unref(jd)(g.report.game.date_time_utc)),1)]),p.createElementVNode("div",ife,[p.createElementVNode("div",afe,[p.createElementVNode("span",ofe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.home_team+".png"},null,8,sfe)]),p.createElementVNode("span",lfe,p.toDisplayString(g.report.game.home_team_acronym),1)]),p.createElementVNode("div",cfe,[p.createElementVNode("span",ufe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.visiting_team+".png"},null,8,dfe)]),p.createElementVNode("span",hfe,p.toDisplayString(g.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-e8e3d782"]]),ffe={class:"prematch-bg"},mfe={class:"background-shields"},gfe={class:"shield-left"},yfe=["src"],vfe={class:"shield-right"},bfe=["src"],xfe={class:"subtitle"},_fe={class:"jornada"},wfe={class:"fecha"},Tfe={class:"teams-grid"},kfe={class:"row row-top"},Sfe={class:"team team-local"},Efe={class:"escudo-svg"},Afe=["src"],Cfe={class:"team-name"},Mfe={class:"score"},Pfe={class:"score-text"},Nfe={class:"team team-visitor"},Ofe={class:"team-name"},Ife={class:"escudo-svg"},Rfe=["src"],Lfe={class:"row row-bottom"},zfe={class:"team-stats"},Dfe={class:"stat red"},Bfe={class:"stat-number"},Vfe={class:"stat yellow"},Ffe={class:"stat-number"},jfe={class:"team-stats"},Ufe={class:"stat-number"},qfe={class:"stat-number"},Wfe=ws({__name:"AnalisisPostMatchType1",props:{report:{type:Object,default:()=>({})}},setup(r){function a(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 g=r,B=p.computed(()=>{var w,y,b;const u=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.minutes)==null?void 0:b.home_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const t=u.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(t.length>5){const h=t.slice(0,5).join(", "),n=t.slice(5).join(", ");return`${h}
4087
4087
  ${n}`}return t.join(", ")}),J=p.computed(()=>{var w,y,b;const u=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.minutes)==null?void 0:b.visiting_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const t=u.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(t.length>5){const h=t.slice(0,5).join(", "),n=t.slice(5).join(", ");return`${h}
4088
- ${n}`}return t.join(", ")}),C=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.home_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),x=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.home_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),e=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.away_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),v=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.away_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null});return(u,t)=>(p.openBlock(),p.createElementBlock("div",ffe,[p.createElementVNode("div",mfe,[p.createElementVNode("div",gfe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,yfe)]),p.createElementVNode("div",vfe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,bfe)])]),t[7]||(t[7]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",xfe,[p.createElementVNode("span",_fe,p.toDisplayString(a(r.report.game.matchday_name)),1),p.createElementVNode("span",wfe," - "+p.toDisplayString(p.unref(jd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",Tfe,[p.createElementVNode("div",kfe,[p.createElementVNode("div",Sfe,[p.createElementVNode("span",Efe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,Afe)]),p.createElementVNode("span",Cfe,p.toDisplayString(r.report.game.home_team_acronym),1)]),p.createElementVNode("div",Mfe,[p.createElementVNode("span",Pfe,p.toDisplayString(r.report.game.score[0])+":"+p.toDisplayString(r.report.game.score[1]),1)]),p.createElementVNode("div",Nfe,[p.createElementVNode("span",Ofe,p.toDisplayString(r.report.game.visiting_team_acronym),1),p.createElementVNode("span",Ife,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,Rfe)])])]),p.createElementVNode("div",Lfe,[p.createElementVNode("div",zfe,[t[2]||(t[2]=p.createStaticVNode('<span class="stat ball" data-v-78d552f2><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-78d552f2><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-78d552f2></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-78d552f2></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-78d552f2></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-78d552f2></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-78d552f2></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-78d552f2></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-78d552f2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path></svg></span>',1)),B.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":B.value&&B.value.includes(`
4088
+ ${n}`}return t.join(", ")}),C=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.home_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),x=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.home_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),e=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.away_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),v=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.away_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null});return(u,t)=>(p.openBlock(),p.createElementBlock("div",ffe,[p.createElementVNode("div",mfe,[p.createElementVNode("div",gfe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,yfe)]),p.createElementVNode("div",vfe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,bfe)])]),t[7]||(t[7]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",xfe,[p.createElementVNode("span",_fe,p.toDisplayString(a(r.report.game.matchday_name)),1),p.createElementVNode("span",wfe," - "+p.toDisplayString(p.unref(jd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",Tfe,[p.createElementVNode("div",kfe,[p.createElementVNode("div",Sfe,[p.createElementVNode("span",Efe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,Afe)]),p.createElementVNode("span",Cfe,p.toDisplayString(r.report.game.home_team_acronym),1)]),p.createElementVNode("div",Mfe,[p.createElementVNode("span",Pfe,p.toDisplayString(r.report.game.score[0])+":"+p.toDisplayString(r.report.game.score[1]),1)]),p.createElementVNode("div",Nfe,[p.createElementVNode("span",Ofe,p.toDisplayString(r.report.game.visiting_team_acronym),1),p.createElementVNode("span",Ife,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,Rfe)])])]),p.createElementVNode("div",Lfe,[p.createElementVNode("div",zfe,[t[2]||(t[2]=p.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)),B.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":B.value&&B.value.includes(`
4089
4089
  `)}])},p.toDisplayString(B.value),3)):p.createCommentVNode("",!0),p.createElementVNode("div",{class:p.normalizeClass(["separator",{"two-lines":B.value&&B.value.includes(`
4090
4090
  `)}])},null,2),p.createElementVNode("span",Dfe,[t[0]||(t[0]=p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})],-1)),p.createElementVNode("span",Bfe,p.toDisplayString(C.value||0),1)]),p.createElementVNode("span",Vfe,[t[1]||(t[1]=p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})],-1)),p.createElementVNode("span",Ffe,p.toDisplayString(x.value||0),1)])]),t[6]||(t[6]=p.createElementVNode("div",{class:"empty"},null,-1)),p.createElementVNode("div",jfe,[p.createElementVNode("span",Ufe,p.toDisplayString(e.value||0),1),t[3]||(t[3]=p.createElementVNode("span",{class:"stat yellow"},[p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})])],-1)),p.createElementVNode("span",qfe,p.toDisplayString(v.value||0),1),t[4]||(t[4]=p.createElementVNode("span",{class:"stat red"},[p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})])],-1)),p.createElementVNode("div",{class:p.normalizeClass(["separator",{"two-lines":J.value&&J.value.includes(`
4091
4091
  `)}])},null,2),J.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":J.value&&J.value.includes(`
4092
- `)}])},p.toDisplayString(J.value),3)):p.createCommentVNode("",!0),t[5]||(t[5]=p.createStaticVNode('<span class="stat ball" data-v-78d552f2><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-78d552f2><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-78d552f2></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-78d552f2></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-78d552f2></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-78d552f2></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-78d552f2></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-78d552f2></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-78d552f2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path></svg></span>',1))])])])]))}},[["__scopeId","data-v-78d552f2"]]),Gfe={class:"prematch-bg"},Hfe={class:"background-shields"},Xfe={class:"shield-left"},Yfe=["src"],Jfe={class:"shield-right"},Kfe=["src"],Zfe={class:"subtitle"},Qfe={class:"jornada"},$fe={class:"fecha"},eme={class:"teams-row"},tme={class:"team team-local"},rme={class:"escudo-svg"},nme=["src"],ime={class:"team-name"},ame={class:"team team-visitor"},ome={class:"escudo-svg"},sme=["src"],lme={class:"team-name"},cme=ws({__name:"AnalisisPrematchType2",props:{report:{type:Object,default:()=>({})}},setup(r){function a(B){return B?B.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 g=r;return(B,J)=>(p.openBlock(),p.createElementBlock("div",Gfe,[p.createElementVNode("div",Hfe,[p.createElementVNode("div",Xfe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+g.report.game.home_team+".png",alt:"Escudo local"},null,8,Yfe)]),p.createElementVNode("div",Jfe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+g.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Kfe)])]),J[0]||(J[0]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",Zfe,[p.createElementVNode("span",Qfe,p.toDisplayString(a(g.report.game.matchday_name)),1),p.createElementVNode("span",$fe," - "+p.toDisplayString(p.unref(jd)(g.report.game.date_time_utc)),1)]),p.createElementVNode("div",eme,[p.createElementVNode("div",tme,[p.createElementVNode("span",rme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.home_team+".png"},null,8,nme)]),p.createElementVNode("span",ime,p.toDisplayString(g.report.game.home_team_acronym),1)]),p.createElementVNode("div",ame,[p.createElementVNode("span",ome,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.visiting_team+".png"},null,8,sme)]),p.createElementVNode("span",lme,p.toDisplayString(g.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-ef17e1af"]]),ume={class:"prematch-bg"},dme={class:"background-shields"},hme={class:"shield-left"},pme=["src"],fme={class:"shield-right"},mme=["src"],gme={class:"subtitle"},yme={class:"jornada"},vme={class:"fecha"},bme={class:"teams-grid"},xme={class:"row row-top"},_me={class:"team team-local"},wme={class:"escudo-svg"},Tme=["src"],kme={class:"team-name"},Sme={class:"score"},Eme={class:"score-text"},Ame={class:"team team-visitor"},Cme={class:"team-name"},Mme={class:"escudo-svg"},Pme=["src"],Nme={class:"row row-bottom"},Ome={class:"team-stats"},Ime={class:"stat red"},Rme={class:"stat-number"},Lme={class:"stat yellow"},zme={class:"stat-number"},Dme={class:"team-stats"},Bme={class:"stat-number"},Vme={class:"stat-number"},Fme=ws({__name:"AnalisisPostMatchType2",props:{report:{type:Object,default:()=>({})}},setup(r){function a(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 g=r,B=p.computed(()=>{var w,y,b;const u=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.minutes)==null?void 0:b.home_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const t=u.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(t.length>5){const h=t.slice(0,5).join(", "),n=t.slice(5).join(", ");return`${h}
4092
+ `)}])},p.toDisplayString(J.value),3)):p.createCommentVNode("",!0),t[5]||(t[5]=p.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"]]),Gfe={class:"prematch-bg"},Hfe={class:"background-shields"},Xfe={class:"shield-left"},Yfe=["src"],Jfe={class:"shield-right"},Kfe=["src"],Zfe={class:"subtitle"},Qfe={class:"jornada"},$fe={class:"fecha"},eme={class:"teams-row"},tme={class:"team team-local"},rme={class:"escudo-svg"},nme=["src"],ime={class:"team-name"},ame={class:"team team-visitor"},ome={class:"escudo-svg"},sme=["src"],lme={class:"team-name"},cme=ws({__name:"AnalisisPrematchType2",props:{report:{type:Object,default:()=>({})}},setup(r){function a(B){return B?B.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 g=r;return(B,J)=>(p.openBlock(),p.createElementBlock("div",Gfe,[p.createElementVNode("div",Hfe,[p.createElementVNode("div",Xfe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+g.report.game.home_team+".png",alt:"Escudo local"},null,8,Yfe)]),p.createElementVNode("div",Jfe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+g.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Kfe)])]),J[0]||(J[0]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",Zfe,[p.createElementVNode("span",Qfe,p.toDisplayString(a(g.report.game.matchday_name)),1),p.createElementVNode("span",$fe," - "+p.toDisplayString(p.unref(jd)(g.report.game.date_time_utc)),1)]),p.createElementVNode("div",eme,[p.createElementVNode("div",tme,[p.createElementVNode("span",rme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.home_team+".png"},null,8,nme)]),p.createElementVNode("span",ime,p.toDisplayString(g.report.game.home_team_acronym),1)]),p.createElementVNode("div",ame,[p.createElementVNode("span",ome,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.visiting_team+".png"},null,8,sme)]),p.createElementVNode("span",lme,p.toDisplayString(g.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-82bd95fd"]]),ume={class:"prematch-bg"},dme={class:"background-shields"},hme={class:"shield-left"},pme=["src"],fme={class:"shield-right"},mme=["src"],gme={class:"subtitle"},yme={class:"jornada"},vme={class:"fecha"},bme={class:"teams-grid"},xme={class:"row row-top"},_me={class:"team team-local"},wme={class:"escudo-svg"},Tme=["src"],kme={class:"team-name"},Sme={class:"score"},Eme={class:"score-text"},Ame={class:"team team-visitor"},Cme={class:"team-name"},Mme={class:"escudo-svg"},Pme=["src"],Nme={class:"row row-bottom"},Ome={class:"team-stats"},Ime={class:"stat red"},Rme={class:"stat-number"},Lme={class:"stat yellow"},zme={class:"stat-number"},Dme={class:"team-stats"},Bme={class:"stat-number"},Vme={class:"stat-number"},Fme=ws({__name:"AnalisisPostMatchType2",props:{report:{type:Object,default:()=>({})}},setup(r){function a(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 g=r,B=p.computed(()=>{var w,y,b;const u=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.minutes)==null?void 0:b.home_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const t=u.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(t.length>5){const h=t.slice(0,5).join(", "),n=t.slice(5).join(", ");return`${h}
4093
4093
  ${n}`}return t.join(", ")}),J=p.computed(()=>{var w,y,b;const u=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.minutes)==null?void 0:b.visiting_goals_minutes;if(!Array.isArray(u)||u.length===0)return null;const t=u.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(t.length>5){const h=t.slice(0,5).join(", "),n=t.slice(5).join(", ");return`${h}
4094
- ${n}`}return t.join(", ")}),C=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.home_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),x=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.home_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),e=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.away_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),v=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.away_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null});return(u,t)=>(p.openBlock(),p.createElementBlock("div",ume,[p.createElementVNode("div",dme,[p.createElementVNode("div",hme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,pme)]),p.createElementVNode("div",fme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,mme)])]),t[7]||(t[7]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",gme,[p.createElementVNode("span",yme,"Jornada "+p.toDisplayString(a(r.report.game.matchday_name)),1),p.createElementVNode("span",vme," - "+p.toDisplayString(p.unref(jd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",bme,[p.createElementVNode("div",xme,[p.createElementVNode("div",_me,[p.createElementVNode("span",wme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,Tme)]),p.createElementVNode("span",kme,p.toDisplayString(r.report.game.home_team_acronym),1)]),p.createElementVNode("div",Sme,[p.createElementVNode("span",Eme,p.toDisplayString(r.report.game.score[0])+":"+p.toDisplayString(r.report.game.score[1]),1)]),p.createElementVNode("div",Ame,[p.createElementVNode("span",Cme,p.toDisplayString(r.report.game.visiting_team_acronym),1),p.createElementVNode("span",Mme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,Pme)])])]),p.createElementVNode("div",Nme,[p.createElementVNode("div",Ome,[t[2]||(t[2]=p.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)),B.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":B.value&&B.value.includes(`
4094
+ ${n}`}return t.join(", ")}),C=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.home_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),x=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.home_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),e=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.away_yellow_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null}),v=p.computed(()=>{var t,w,y;const u=(y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.minutes)==null?void 0:y.away_red_cards_minutes;return Array.isArray(u)&&u.length>0?u.length:null});return(u,t)=>(p.openBlock(),p.createElementBlock("div",ume,[p.createElementVNode("div",dme,[p.createElementVNode("div",hme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,pme)]),p.createElementVNode("div",fme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,mme)])]),t[7]||(t[7]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",gme,[p.createElementVNode("span",yme,"Jornada "+p.toDisplayString(a(r.report.game.matchday_name)),1),p.createElementVNode("span",vme," - "+p.toDisplayString(p.unref(jd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",bme,[p.createElementVNode("div",xme,[p.createElementVNode("div",_me,[p.createElementVNode("span",wme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,Tme)]),p.createElementVNode("span",kme,p.toDisplayString(r.report.game.home_team_acronym),1)]),p.createElementVNode("div",Sme,[p.createElementVNode("span",Eme,p.toDisplayString(r.report.game.score[0])+":"+p.toDisplayString(r.report.game.score[1]),1)]),p.createElementVNode("div",Ame,[p.createElementVNode("span",Cme,p.toDisplayString(r.report.game.visiting_team_acronym),1),p.createElementVNode("span",Mme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,Pme)])])]),p.createElementVNode("div",Nme,[p.createElementVNode("div",Ome,[t[2]||(t[2]=p.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)),B.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":B.value&&B.value.includes(`
4095
4095
  `)}])},p.toDisplayString(B.value),3)):p.createCommentVNode("",!0),p.createElementVNode("div",{class:p.normalizeClass(["separator",{"two-lines":B.value&&B.value.includes(`
4096
4096
  `)}])},null,2),p.createElementVNode("span",Ime,[t[0]||(t[0]=p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})],-1)),p.createElementVNode("span",Rme,p.toDisplayString(C.value||0),1)]),p.createElementVNode("span",Lme,[t[1]||(t[1]=p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})],-1)),p.createElementVNode("span",zme,p.toDisplayString(x.value||0),1)])]),t[6]||(t[6]=p.createElementVNode("div",{class:"empty"},null,-1)),p.createElementVNode("div",Dme,[p.createElementVNode("span",Bme,p.toDisplayString(e.value||0),1),t[3]||(t[3]=p.createElementVNode("span",{class:"stat yellow"},[p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})])],-1)),p.createElementVNode("span",Vme,p.toDisplayString(v.value||0),1),t[4]||(t[4]=p.createElementVNode("span",{class:"stat red"},[p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})])],-1)),p.createElementVNode("div",{class:p.normalizeClass(["separator",{"two-lines":J.value&&J.value.includes(`
4097
4097
  `)}])},null,2),J.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":J.value&&J.value.includes(`
4098
- `)}])},p.toDisplayString(J.value),3)):p.createCommentVNode("",!0),t[5]||(t[5]=p.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"]]),jme={class:"prematch-bg"},Ume={class:"subtitle"},qme={class:"jornada"},Wme={class:"fecha"},Gme={class:"teams-row"},Hme={class:"team team-local"},Xme={class:"escudo-svg"},Yme=["src"],Jme={class:"team team-visitor"},Kme={class:"escudo-svg"},Zme=["src"],Qme=ws({__name:"AnalisisPrematchType3",props:{report:{type:Object,default:()=>({})}},setup(r){function a(B){return B?B.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 g=r;return(B,J)=>(p.openBlock(),p.createElementBlock("div",jme,[J[1]||(J[1]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",Ume,[p.createElementVNode("span",qme,p.toDisplayString(a(g.report.game.matchday_name)),1),p.createElementVNode("span",Wme," - "+p.toDisplayString(p.unref(jd)(g.report.game.date_time_utc)),1)]),p.createElementVNode("div",Gme,[p.createElementVNode("div",Hme,[p.createElementVNode("span",Xme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.home_team+".png"},null,8,Yme)])]),J[0]||(J[0]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",Jme,[p.createElementVNode("span",Kme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.visiting_team+".png"},null,8,Zme)])])])]))}},[["__scopeId","data-v-23601285"]]),$me={class:"prematch-bg"},e0e={class:"subtitle"},t0e={class:"jornada"},r0e={class:"fecha"},n0e={class:"teams-row"},i0e={class:"team team-local"},a0e={class:"team-header"},o0e={class:"escudo-svg"},s0e=["src"],l0e={class:"score"},c0e={class:"players-list"},u0e={class:"player-name"},d0e={key:0,class:"more-events-indicator"},h0e={class:"team team-visitor"},p0e={class:"team-header"},f0e={class:"score"},m0e={class:"escudo-svg"},g0e=["src"],y0e={class:"players-list"},v0e={class:"player-name"},b0e={key:0},x0e={key:0,class:"more-events-indicator"},_0e=ws({__name:"AnalisisPostMatchType3",props:{report:{type:Object,default:()=>({})}},setup(r){var v,u;function a(t){return t?t.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 g=r;console.log("Props report: ",g.report),console.log("Game minutes: ",(u=(v=g.report)==null?void 0:v.game)==null?void 0:u.report_minutes);const B=p.computed(()=>{var t,w,y;return(((y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.report_minutes)==null?void 0:y.home_goals_minutes)||[]).slice(0,5)}),J=p.computed(()=>{var t,w,y;return(((y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.report_minutes)==null?void 0:y.visiting_goals_minutes)||[]).slice(0,5)});function C(t){const w=Array.from(t.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),y=t.match(/^(.*?)\s*\d+'/),b=y?" "+y[1].trim():"";return{minutos:w,nombre:b}}const x=p.computed(()=>{var w,y,b,h;return(((h=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.report_minutes)==null?void 0:b.home_goals_minutes)==null?void 0:h.length)||0)>5}),e=p.computed(()=>{var w,y,b,h;return(((h=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.report_minutes)==null?void 0:b.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(t,w)=>(p.openBlock(),p.createElementBlock("div",$me,[w[5]||(w[5]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",e0e,[p.createElementVNode("span",t0e,"Jornada "+p.toDisplayString(a(r.report.game.matchday_name)),1),p.createElementVNode("span",r0e," - "+p.toDisplayString(p.unref(jd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",n0e,[p.createElementVNode("div",i0e,[p.createElementVNode("div",a0e,[p.createElementVNode("span",o0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,s0e)]),p.createElementVNode("div",l0e,p.toDisplayString(r.report.game.score[0]),1)]),p.createElementVNode("div",c0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(B.value,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`home-event-${b}`,class:"player-item"},[p.createElementVNode("span",u0e,p.toDisplayString(y)+" ",1),w[0]||(w[0]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.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"}),p.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)),x.value?(p.openBlock(),p.createElementBlock("div",d0e,[...w[1]||(w[1]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)])])):p.createCommentVNode("",!0)])]),w[4]||(w[4]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",h0e,[p.createElementVNode("div",p0e,[p.createElementVNode("div",f0e,p.toDisplayString(r.report.game.score[1]),1),p.createElementVNode("span",m0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,g0e)])]),p.createElementVNode("div",y0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(J.value,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`visiting-event-${b}`,class:"player-item"},[w[2]||(w[2]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.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"}),p.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)),p.createElementVNode("span",v0e,[p.createTextVNode(p.toDisplayString(C(y).minutos)+" ",1),C(y).nombre?(p.openBlock(),p.createElementBlock("span",b0e,p.toDisplayString(C(y).nombre),1)):p.createCommentVNode("",!0)])]))),128)),e.value?(p.openBlock(),p.createElementBlock("div",x0e,[...w[3]||(w[3]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)])])):p.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-78a5f6b6"]]),w0e={class:"prematch-bg"},T0e={class:"subtitle"},k0e={class:"jornada"},S0e={class:"fecha"},E0e={class:"teams-row"},A0e={class:"team team-local"},C0e={class:"escudo-svg"},M0e=["src"],P0e={class:"team team-visitor"},N0e={class:"escudo-svg"},O0e=["src"],I0e=ws({__name:"AnalisisPrematchType4",props:{report:{type:Object,default:()=>({})}},setup(r){function a(B){return B?B.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 g=r;return(B,J)=>(p.openBlock(),p.createElementBlock("div",w0e,[J[1]||(J[1]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",T0e,[p.createElementVNode("span",k0e,p.toDisplayString(a(g.report.game.matchday_name)),1),p.createElementVNode("span",S0e," - "+p.toDisplayString(p.unref(jd)(g.report.game.date_time_utc)),1)]),p.createElementVNode("div",E0e,[p.createElementVNode("div",A0e,[p.createElementVNode("span",C0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.home_team+".png"},null,8,M0e)])]),J[0]||(J[0]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",P0e,[p.createElementVNode("span",N0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.visiting_team+".png"},null,8,O0e)])])])]))}},[["__scopeId","data-v-347d4c02"]]),R0e={class:"prematch-bg"},L0e={class:"subtitle"},z0e={class:"jornada"},D0e={class:"fecha"},B0e={class:"teams-row"},V0e={class:"team team-local"},F0e={class:"team-header"},j0e={class:"escudo-svg"},U0e=["src"],q0e={class:"score"},W0e={class:"players-list"},G0e={class:"player-name"},H0e={key:0,class:"more-events-indicator"},X0e={class:"team team-visitor"},Y0e={class:"team-header"},J0e={class:"score"},K0e={class:"escudo-svg"},Z0e=["src"],Q0e={class:"players-list"},$0e={class:"player-name"},ege={key:0},tge={key:0,class:"more-events-indicator"},rge=ws({__name:"AnalisisPostMatchType4",props:{report:{type:Object,default:()=>({})}},setup(r){var v,u;function a(t){return t?t.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 g=r;console.log("Props report: ",g.report),console.log("Game minutes: ",(u=(v=g.report)==null?void 0:v.game)==null?void 0:u.report_minutes);const B=p.computed(()=>{var t,w,y;return(((y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.report_minutes)==null?void 0:y.home_goals_minutes)||[]).slice(0,5)}),J=p.computed(()=>{var t,w,y;return(((y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.report_minutes)==null?void 0:y.visiting_goals_minutes)||[]).slice(0,5)});function C(t){const w=Array.from(t.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),y=t.match(/^(.*?)\s*\d+'/),b=y?y[1].trim():"";return{minutos:w,nombre:b}}const x=p.computed(()=>{var w,y,b,h;return(((h=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.report_minutes)==null?void 0:b.home_goals_minutes)==null?void 0:h.length)||0)>5}),e=p.computed(()=>{var w,y,b,h;return(((h=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.report_minutes)==null?void 0:b.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(t,w)=>(p.openBlock(),p.createElementBlock("div",R0e,[w[5]||(w[5]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",L0e,[p.createElementVNode("span",z0e,"Jornada "+p.toDisplayString(a(r.report.game.matchday_name)),1),p.createElementVNode("span",D0e," - "+p.toDisplayString(p.unref(jd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",B0e,[p.createElementVNode("div",V0e,[p.createElementVNode("div",F0e,[p.createElementVNode("span",j0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,U0e)]),p.createElementVNode("div",q0e,p.toDisplayString(r.report.game.score[0]),1)]),p.createElementVNode("div",W0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(B.value,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`home-event-${b}`,class:"player-item"},[p.createElementVNode("span",G0e,p.toDisplayString(y)+" ",1),w[0]||(w[0]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.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"}),p.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)),x.value?(p.openBlock(),p.createElementBlock("div",H0e,[...w[1]||(w[1]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)])])):p.createCommentVNode("",!0)])]),w[4]||(w[4]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",X0e,[p.createElementVNode("div",Y0e,[p.createElementVNode("div",J0e,p.toDisplayString(r.report.game.score[1]),1),p.createElementVNode("span",K0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,Z0e)])]),p.createElementVNode("div",Q0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(J.value,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`visiting-event-${b}`,class:"player-item"},[w[2]||(w[2]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.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"}),p.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)),p.createElementVNode("span",$0e,[p.createTextVNode(p.toDisplayString(C(y).minutos)+" ",1),C(y).nombre?(p.openBlock(),p.createElementBlock("span",ege," "+p.toDisplayString(C(y).nombre),1)):p.createCommentVNode("",!0)])]))),128)),e.value?(p.openBlock(),p.createElementBlock("div",tge,[...w[3]||(w[3]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)])])):p.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-4bfbb192"]]),nge={class:"report-card",style:{position:"relative"}},ige={class:"report-img-placeholder",style:{position:"relative"}},age={class:"inner-card-report"},oge={class:"report-footer"},sge={class:"report-title"},lge={class:"report-template"},cge={class:"template-name"},uge={class:"report-league"},dge={class:"report-tournament"},hge=ws({__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(r,{emit:a}){const g=a,B=r,J=p.ref(!1);function C(){J.value=!1,g("open-report",B.report)}function x(){console.log("renombrar"),J.value=!1,g("renombrar",B.report.report_name||"Reporte",B.report.id)}function e(){console.log("editar"),J.value=!1,g("edit-template",B.report)}function v(){console.log("duplicar"),J.value=!1}function u(){console.log("eliminar"),J.value=!1,g("eliminar",B.report)}function t(){console.log("descargar"),g("download-report",B.report),J.value=!1}function w(b){return b?b.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 y(){g("open-report",B.report)}return(b,h)=>(p.openBlock(),p.createElementBlock("div",nge,[p.createElementVNode("div",{class:"three-dots",onClick:h[0]||(h[0]=p.withModifiers(n=>J.value=!J.value,["stop"]))},[...h[4]||(h[4]=[p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1)])]),p.createElementVNode("div",ige,[r.report.template_type===1&&r.report.pages[0].type==1?(p.openBlock(),p.createBlock(pfe,{key:0,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==1?(p.openBlock(),p.createBlock(Wfe,{key:1,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),r.report.template_type===1&&r.report.pages[0].type==2?(p.openBlock(),p.createBlock(cme,{key:2,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==2?(p.openBlock(),p.createBlock(Fme,{key:3,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),r.report.template_type===1&&r.report.pages[0].type==3?(p.openBlock(),p.createBlock(Qme,{key:4,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==3?(p.openBlock(),p.createBlock(_0e,{key:5,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):r.report.template_type===1&&r.report.pages[0].type==4?(p.openBlock(),p.createBlock(I0e,{key:6,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==4?(p.openBlock(),p.createBlock(rge,{key:7,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),p.createElementVNode("div",{class:"report-img-overlay"},[p.createElementVNode("button",{class:"report-img-button",onClick:y},"Ver reporte")])]),p.createElementVNode("div",age,[p.createElementVNode("div",oge,[p.createElementVNode("div",sge,p.toDisplayString(r.report.report_name),1),p.createElementVNode("div",lge,[h[5]||(h[5]=p.createTextVNode(" Template: ",-1)),p.createElementVNode("span",cge,p.toDisplayString(r.report.name),1)]),p.createElementVNode("div",uge,p.toDisplayString(r.report.season_name)+" - "+p.toDisplayString(w(r.report.game.matchday_name))+"  |  "+p.toDisplayString(p.unref(jd)(r.report.game.date_time_utc)),1),p.createElementVNode("div",dge,p.toDisplayString(r.report.tournament_name),1)])]),J.value?(p.openBlock(),p.createBlock(Ype,{key:0,onClick:h[1]||(h[1]=p.withModifiers(n=>J.value=!1,["self"])),onMouseleave:h[2]||(h[2]=n=>J.value=!1),onVerReporte:C,onRenombrar:x,onEditar:e,onDuplicar:v,onEliminar:u,onDescargar:t})):p.createCommentVNode("",!0),J.value?(p.openBlock(),p.createElementBlock("div",{key:1,class:"tooltip-overlay",onClick:h[3]||(h[3]=n=>J.value=!1)})):p.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a75289c7"]]),pge={class:"modal-overlay"},fge={class:"modal-content"},mge={class:"modal-body"},gge=["placeholder","disabled"],yge={key:0,class:"error-message"},vge={class:"modal-footer"},bge=["disabled"],xge=["disabled"],_ge={key:0},wge={key:1},Tge=ws({__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(r,{emit:a}){const g=r,B=a,J=p.ref(g.initialName),C=p.ref(!1),x=p.ref("");p.watch(()=>g.initialName,v=>{J.value=v,x.value=""});async function e(){var v;if(console.log("acceptRename"),!(J.value.trim().length<3)){console.log("acceptRename 22"),C.value=!0,x.value="";try{await to.create({headers:{Authorization:`${g.token}`}}).put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/reports/${g.reportId}/rename`,{name:J.value.trim()}),B("rename",J.value.trim()),B("refresh"),B("close")}catch(u){console.error("Error al renombrar el reporte:",u),((v=u.response)==null?void 0:v.status)===409?x.value="Ya existe un reporte con el mismo nombre":x.value="Error al renombrar el reporte. Inténtalo de nuevo."}finally{C.value=!1}}}return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(v,u)=>(p.openBlock(),p.createElementBlock("div",pge,[p.createElementVNode("div",fge,[p.createElementVNode("button",{class:"close-btn",onClick:u[0]||(u[0]=t=>v.$emit("close"))},[...u[3]||(u[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),u[5]||(u[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Renombrar Reporte")],-1)),u[6]||(u[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",mge,[u[4]||(u[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":u[1]||(u[1]=t=>J.value=t),placeholder:r.initialName,maxlength:"40",autocomplete:"off",disabled:C.value},null,8,gge),[[p.vModelText,J.value]]),x.value?(p.openBlock(),p.createElementBlock("div",yge,p.toDisplayString(x.value),1)):p.createCommentVNode("",!0)]),u[7]||(u[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",vge,[p.createElementVNode("button",{class:"cancel-btn",onClick:u[2]||(u[2]=t=>v.$emit("close")),disabled:C.value},"Cancelar",8,bge),p.createElementVNode("button",{class:"next-btn",disabled:J.value.trim().length<3||C.value,onClick:e},[C.value?(p.openBlock(),p.createElementBlock("span",_ge,"Guardando...")):(p.openBlock(),p.createElementBlock("span",wge,"Guardar"))],8,xge)])])]))}},[["__scopeId","data-v-3a66dd5f"]]),kge={class:"modal-overlay"},Sge={class:"modal-content"},Ege={class:"modal-footer"},Age=["disabled"],Cge=["disabled"],Mge=ws({__name:"ModalDeleteReport",props:{reportId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","reportDeleted"],setup(r,{emit:a}){const g=r,B=a,J=p.ref(!1),C=async()=>{try{J.value=!0;const e=await to.create({headers:{Authorization:`${g.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/reports/${g.reportId}`);console.log("Reporte eliminado exitosamente:",e.data),B("reportDeleted",g.reportId),B("close")}catch(x){console.error("Error al eliminar el reporte:",x),alert("Error al eliminar el reporte. Por favor, intenta de nuevo.")}finally{J.value=!1}};return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(x,e)=>(p.openBlock(),p.createElementBlock("div",kge,[p.createElementVNode("div",Sge,[p.createElementVNode("button",{class:"close-btn",onClick:e[0]||(e[0]=v=>x.$emit("close"))},[...e[2]||(e[2]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),e[3]||(e[3]=p.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)),p.createElementVNode("div",Ege,[p.createElementVNode("button",{class:"cancel-btn",onClick:e[1]||(e[1]=v=>x.$emit("close")),disabled:J.value},"Cancelar",8,Age),p.createElementVNode("button",{class:"delete-btn",onClick:C,disabled:J.value},p.toDisplayString(J.value?"Eliminando...":"Eliminar"),9,Cge)])])]))}},[["__scopeId","data-v-8c239161"]]),Pge={class:"reports-header"},Nge={class:"count"},Oge={key:0,class:"sort-options"},Ige=["onClick"],Rge={key:0,class:"checkmark"},Lge={key:0,class:"loading-state"},zge={key:1,class:"error-state"},Dge={key:3,class:"empty-reports"},Bge={key:4,class:"empty-reports"},Vge=ws({__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(r,{emit:a}){const g=r,B=a,J=p.ref([]),C=p.ref(!1),x=p.ref(null),e=p.computed(()=>{let V=J.value;if(g.searchQuery.trim()){const U=g.searchQuery.toLowerCase().trim();V=J.value.filter(q=>{var re,ee,K,te,ae,oe,he;return!!((((re=q.report_name)==null?void 0:re.toLowerCase())||"").includes(U)||(((ee=q.name)==null?void 0:ee.toLowerCase())||"").includes(U)||q.created_at&&new Date(q.created_at).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(U)||(K=q.game)!=null&&K.date_time_utc&&new Date(q.game.date_time_utc).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(U)||(((ae=(te=q.game)==null?void 0:te.season_name)==null?void 0:ae.toLowerCase())||"").includes(U)||(((oe=q.tournament_name)==null?void 0:oe.toLowerCase())||"").includes(U)||(he=q.game)!=null&&he.matchday&&q.game.matchday.toString().includes(U))})}return u.value&&(V=[...V].sort((U,q)=>{var W,Z;if(u.value==="A - Z"){const ne=(U.report_name||"").toLowerCase(),X=(q.report_name||"").toLowerCase();return ne.localeCompare(X,"es",{sensitivity:"base"})}else if(u.value==="Más recientes"){const ne=new Date(U.created_at||0);return new Date(q.created_at||0)-ne}else if(u.value==="Torneo"){const ne=(U.tournament_name||"").toLowerCase(),X=(q.tournament_name||"").toLowerCase();if(ne!==X)return ne.localeCompare(X,"es",{sensitivity:"base"});const re=U.season_id||0;return(q.season_id||0)-re}else if(u.value==="Jornada"){const ne=((W=U.game)==null?void 0:W.matchday_id)||0,X=((Z=q.game)==null?void 0:Z.matchday_id)||0;return ne-X}return 0})),V}),v=p.ref(!1),u=p.ref("Más recientes"),t=p.ref(!1),w=p.ref(""),y=p.ref(""),b=p.ref(""),h=p.ref(!1),n=p.ref(""),i=p.ref(""),d=p.ref(null),s=p.ref(null),c=p.ref(null),f=p.ref(0),m=[{label:"A - Z",value:"A - Z"},{label:"Más recientes",value:"Más recientes"},{label:"Torneo",value:"Torneo"},{label:"Jornada",value:"Jornada"}],T=async()=>{C.value=!0,x.value=null;try{const V=await to.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/reports`,{headers:{Authorization:`${g.token}`,"Content-Type":"application/json"}});V.data&&Array.isArray(V.data)?J.value=V.data:V.data&&V.data.reports?J.value=V.data.reports:V.data&&V.data.data?J.value=V.data.data:J.value=[]}catch(V){console.error("Error cargando reportes:",V),console.error("Error response:",V.response),x.value=V.message||"Error al cargar los reportes",J.value=[]}finally{C.value=!1}},E=p.computed(()=>{if(!f.value)return"grid-1-column";const V=340,U=20,W=f.value-40,Z=Math.floor((W+U)/(V+U)),ne=Math.max(1,Z);return ne>=4?"grid-4-columns":ne>=3?"grid-3-columns":ne>=2?"grid-2-columns":"grid-1-column"}),S=()=>{v.value=!v.value},P=V=>{console.log("Ordenando por:",V),u.value=V,v.value=!1};function N(V){console.log("reports section onOpenReport",V),B("open-report",V)}const A=(V,U)=>{w.value=V,y.value=U;const q=J.value.find(W=>W.id===U);b.value=q?q.template_type:"",t.value=!0},O=V=>{console.log("Renombrar reporte de",w.value,"a",V),t.value=!1;const U=J.value.findIndex(q=>q.id===y.value);U!==-1&&(J.value[U].report_name=V)},M=V=>{n.value=V.report_name||"Reporte",i.value=V.id,h.value=!0},k=V=>{h.value=!1,J.value=J.value.filter(U=>U.id!==V)};function I(V){console.log("Descargando reporte:",V),B("download-report",V)}const _=V=>{v.value&&d.value&&!d.value.contains(V.target)&&(v.value=!1)},R=()=>{s.value&&(f.value=s.value.offsetWidth)};let z=null;return p.onMounted(async()=>{document.addEventListener("mousedown",_),await T(),await p.nextTick(),R(),window.ResizeObserver?(z=new ResizeObserver(()=>{R()}),s.value&&z.observe(s.value)):window.addEventListener("resize",R)}),p.onBeforeUnmount(()=>{document.removeEventListener("mousedown",_),z?z.disconnect():window.removeEventListener("resize",R)}),(V,U)=>(p.openBlock(),p.createElementBlock("div",{class:"reports-section",ref_key:"reportsSectionRef",ref:s},[p.createElementVNode("div",Pge,[p.createElementVNode("span",null,[U[2]||(U[2]=p.createTextVNode("Reportes ",-1)),p.createElementVNode("span",Nge,"("+p.toDisplayString(e.value.length)+")",1)]),p.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:d},[p.createElementVNode("button",{class:"sort-button",onClick:S},[p.createTextVNode(p.toDisplayString(u.value||"Ordenar")+" ",1),p.createElementVNode("span",{class:p.normalizeClass(["dropdown-arrow",{rotated:v.value}])},null,2)]),v.value?(p.openBlock(),p.createElementBlock("div",Oge,[(p.openBlock(),p.createElementBlock(p.Fragment,null,p.renderList(m,q=>p.createElementVNode("div",{key:q.value,class:p.normalizeClass(["sort-option",{selected:u.value===q.value}]),onClick:W=>u.value!==q.value&&P(q.value)},[p.createElementVNode("span",null,p.toDisplayString(q.label),1),u.value===q.value?(p.openBlock(),p.createElementBlock("span",Rge,[...U[3]||(U[3]=[p.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):p.createCommentVNode("",!0)],10,Ige)),64))])):p.createCommentVNode("",!0)],512)]),C.value?(p.openBlock(),p.createElementBlock("div",Lge,[...U[4]||(U[4]=[p.createElementVNode("div",{class:"loading-spinner"},null,-1),p.createElementVNode("p",null,"Cargando reportes...",-1)])])):x.value?(p.openBlock(),p.createElementBlock("div",zge,[p.createElementVNode("p",null,"Error al cargar reportes: "+p.toDisplayString(x.value),1),p.createElementVNode("button",{onClick:T,class:"retry-button"},"Reintentar")])):(p.openBlock(),p.createElementBlock("div",{key:2,class:p.normalizeClass(["reports-grid",E.value]),ref_key:"reportsGridRef",ref:c},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(e.value,q=>(p.openBlock(),p.createBlock(hge,{key:q.id,report:q,onOpenReport:N,onRenombrar:A,onEliminar:M,onDownloadReport:I},null,8,["report"]))),128))],2)),!C.value&&!x.value&&J.value.length===0?(p.openBlock(),p.createElementBlock("div",Dge," No tienes reportes aún. ")):p.createCommentVNode("",!0),!C.value&&!x.value&&J.value.length>0&&e.value.length===0?(p.openBlock(),p.createElementBlock("div",Bge," No se encontraron reportes que coincidan con tu búsqueda. ")):p.createCommentVNode("",!0),t.value?(p.openBlock(),p.createBlock(Tge,{key:5,initialName:w.value,templateType:b.value,token:r.token,userId:r.userId,reportId:y.value,onClose:U[0]||(U[0]=q=>t.value=!1),onRename:O,onRefresh:T},null,8,["initialName","templateType","token","userId","reportId"])):p.createCommentVNode("",!0),h.value?(p.openBlock(),p.createBlock(Mge,{key:6,"report-id":i.value,"user-id":r.userId,token:r.token,onClose:U[1]||(U[1]=q=>h.value=!1),onReportDeleted:k},null,8,["report-id","user-id","token"])):p.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-70130c65"]]),Fge={class:"modal-overlay"},jge={class:"modal-content"},Uge=ws({__name:"ModalSoloEscritorio",setup(r){return(a,g)=>(p.openBlock(),p.createElementBlock("div",Fge,[p.createElementVNode("div",jge,[g[1]||(g[1]=p.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)),p.createElementVNode("button",{class:"modal-btn",onClick:g[0]||(g[0]=B=>a.$emit("toHome"))},"OK")])]))}},[["__scopeId","data-v-76d7f6ed"]]),qge={class:"top-bar"},Wge={class:"tabs-container"},Gge={class:"tabs"},Hge={key:0,class:"actions"},Xge={class:"search-container"},Yge={key:1,class:"actions"},Jge={class:"search-container"},Kge=ws({__name:"gsc-reports",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0}},emits:["toHome","download-report"],setup(r,{emit:a}){const g=r,{userId:B,team:J,token:C}=g,x=p.ref("templates"),e=p.ref(!1),v=p.ref(null),u=p.ref(!1),t=p.ref(""),w=p.ref(""),y=p.ref(null),b=p.ref(null),h=p.ref(0),n=a;function i(){if(v.value){const P=v.value.offsetWidth;e.value=P<1028}}p.watch(e,P=>{P?document.body.style.overflow="hidden":document.body.style.overflow=""}),p.onBeforeUnmount(()=>{document.body.style.overflow=""}),p.onMounted(()=>{i(),window.addEventListener("resize",i)}),p.onBeforeUnmount(()=>{window.removeEventListener("resize",i)});function d(P){console.log("onOpenModalNewTemplate, gsc-reports:",P),s(P)}function s(P){console.log("onEditTemplate, template:",P),console.log("Edicion es: "),console.log({template:P,isTemplateMode:!0}),y.value.show({template:P,isTemplateMode:!0})}const c=()=>{t.value=""},f=()=>{w.value=""};function m(P){console.log("gsc-report onOpenReport, report:",P),y.value&&y.value.show({template:P,isTemplateMode:!1})}function T(P){n("download-report",P)}function E(){n("toHome")}function S(){b.value&&b.value.obtenerTemplates(),h.value+=1}return(P,N)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(p.unref(Nue),{ref_key:"reportTemplateMaker",ref:y,token:p.unref(C),"user-team-id":p.unref(J),onClose:S},null,8,["token","user-team-id"]),p.createElementVNode("div",{ref_key:"containerRef",ref:v,class:"reports-container"},[e.value?(p.openBlock(),p.createBlock(Uge,{key:0,onToHome:E})):p.createCommentVNode("",!0),N[12]||(N[12]=p.createElementVNode("h1",{class:"title"},"Mis reportes",-1)),p.createElementVNode("div",qge,[p.createElementVNode("div",Wge,[p.createElementVNode("div",Gge,[p.createElementVNode("div",{class:p.normalizeClass(["tab tab-templates",{active:x.value==="templates"}]),onClick:N[0]||(N[0]=A=>x.value="templates")}," Templates ",2),p.createElementVNode("div",{class:p.normalizeClass(["tab tab-reports",{active:x.value==="reports"}]),onClick:N[1]||(N[1]=A=>x.value="reports")}," Tus reportes ",2)])]),x.value==="templates"?(p.openBlock(),p.createElementBlock("div",Hge,[p.createElementVNode("div",Xge,[N[8]||(N[8]=p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":N[2]||(N[2]=A=>t.value=A),class:"search",type:"text",placeholder:"Buscar template"},null,512),[[p.vModelText,t.value]]),t.value?(p.openBlock(),p.createElementBlock("button",{key:0,onClick:c,class:"clear-search-btn",type:"button"},[...N[7]||(N[7]=[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):p.createCommentVNode("",!0)]),p.createElementVNode("button",{class:"create-template-btn",onClick:N[3]||(N[3]=A=>u.value=!0)},[...N[9]||(N[9]=[p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-agregar@3x.png",alt:"Agregar",class:"create-icon"},null,-1),p.createTextVNode(" Crear template ",-1)])])])):p.createCommentVNode("",!0),x.value==="reports"?(p.openBlock(),p.createElementBlock("div",Yge,[p.createElementVNode("div",Jge,[N[11]||(N[11]=p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":N[4]||(N[4]=A=>w.value=A),class:"search search-reports",type:"text",placeholder:"Buscar reporte"},null,512),[[p.vModelText,w.value]]),w.value?(p.openBlock(),p.createElementBlock("button",{key:0,onClick:f,class:"clear-search-btn",type:"button"},[...N[10]||(N[10]=[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):p.createCommentVNode("",!0)])])):p.createCommentVNode("",!0)]),x.value==="templates"?(p.openBlock(),p.createBlock(Hpe,{ref_key:"templatesSectionRef",ref:b,userId:p.unref(B),token:p.unref(C),team:p.unref(J),searchQuery:t.value,key:h.value,onSwitchToReports:N[5]||(N[5]=A=>x.value="reports"),onOpenModalNewTemplate:d,onEditTemplate:s},null,8,["userId","token","team","searchQuery"])):(p.openBlock(),p.createBlock(Vge,{key:2,userId:p.unref(B),token:p.unref(C),team:p.unref(J),searchQuery:w.value,onOpenReport:m,onDownloadReport:T},null,8,["userId","token","team","searchQuery"])),u.value?(p.openBlock(),p.createBlock(bT,{key:3,token:p.unref(C),team:p.unref(J),onOpenModalNewTemplate:d,onClose:N[6]||(N[6]=A=>u.value=!1)},null,8,["token","team"])):p.createCommentVNode("",!0)],512)],64))}},[["__scopeId","data-v-717aa34b"]]),Zge={class:"subcategory-group"},Qge={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(r){return(a,g)=>(p.openBlock(),p.createElementBlock("div",Zge,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.subcategoryGroup,B=>(p.openBlock(),p.createBlock(p.unref(K1),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":J=>B.isSelected=J,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},$ge=nu(Qge,[["__scopeId","data-v-ae6f3d72"]]),eye={class:"filter-subcategories"},tye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(r){return(a,g)=>(p.openBlock(),p.createElementBlock("div",eye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.subcategoryGroups,B=>(p.openBlock(),p.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[p.createVNode($ge,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),yy=r=>(p.pushScopeId("data-v-80d9c265"),r=r(),p.popScopeId(),r),rye={class:"details__header"},nye=yy(()=>p.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),iye={class:"details__header__checkbox"},aye={class:"details__body"},oye={class:"details__body__playing-as"},sye=["onClick"],lye={class:"details__header"},cye=yy(()=>p.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),uye={class:"details__header__checkbox"},dye={class:"details__body"},hye=yy(()=>p.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),pye={class:"details__body__game-section"},fye=["onClick"],mye={class:"details__body"},gye=yy(()=>p.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),yye={class:"details__body__game-section"},vye=["onClick"],bye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__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(r){const a=r;p.useCssVars(t=>({"49cba245":r.buttonsBackgroundColor,"52f02da6":r.buttonsTextColor,"7d3f686a":r.buttonsBorderWidth,"7c286a07":r.buttonsBorderColor,"24a6f4aa":r.buttonsBackgroundColorActive,cd8d7768:r.buttonsTextColorActive,"35fa5c10":r.buttonsBorderWidthActive,"0cde1826":r.buttonsBorderColorActive}));const g=p.computed(()=>a.playingAs.every(t=>t.isSelected)),B=p.computed(()=>a.gameSections.every(t=>t.isSelected)),J=p.computed(()=>a.gameSections.reduce((t,w)=>(w.value<=3?t.firstHalf.push(w):t.secondHalf.push(w),t),{firstHalf:[],secondHalf:[]})),C=p.computed(()=>({"--border-radius-first-button":`${a.buttonsBorderRadius} 0 0 ${a.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${a.buttonsBorderRadius} ${a.buttonsBorderRadius} 0`}));function x(t){t?a.playingAs.forEach(w=>{w.isSelected=!0}):a.playingAs.forEach((w,y)=>{w.isSelected=y===0})}function e(t){a.playingAs.filter(w=>w.isSelected).length===1&&t.isSelected||(t.isSelected=!t.isSelected)}function v(t){a.gameSections.filter(w=>w.isSelected).length===1&&t.isSelected||(t.isSelected=!t.isSelected)}function u(t){t?a.gameSections.forEach(w=>{w.isSelected=!0}):a.gameSections.forEach((w,y)=>{w.isSelected=y===0})}return(t,w)=>(p.openBlock(),p.createElementBlock("div",{class:"details",style:p.normalizeStyle(C.value)},[p.createElementVNode("div",rye,[nye,p.createElementVNode("div",iye,[p.createVNode(p.unref(K1),{label:"Todos","model-value":g.value,"onUpdate:modelValue":x},null,8,["model-value"])])]),p.createElementVNode("div",aye,[p.createElementVNode("div",oye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.playingAs,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${b}`,class:p.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:h=>e(y)},p.toDisplayString(y.name),11,sye))),128))])]),p.createElementVNode("div",lye,[cye,p.createElementVNode("div",uye,[p.createVNode(p.unref(K1),{label:"Todos","model-value":B.value,"onUpdate:modelValue":u},null,8,["model-value"])])]),p.createElementVNode("div",dye,[hye,p.createElementVNode("div",pye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(J.value.firstHalf,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${b}`,class:p.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:h=>v(y)},p.toDisplayString(y.text),11,fye))),128))])]),p.createElementVNode("div",mye,[gye,p.createElementVNode("div",yye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(J.value.secondHalf,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${b}`,class:p.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:h=>v(y)},p.toDisplayString(y.text),11,vye))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),xye={class:"filter-field"},_ye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__name:"FilterField",setup(r){const a=p.ref(Array.from({length:16},(B,J)=>J+1));function g(){}return(B,J)=>(p.openBlock(),p.createElementBlock("div",xye,[p.createVNode(p.unref(FI),{width:"100%","background-color":"#2E3B46",value:a.value,"onUpdate:modelValue":g},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Ah.GSCReports=Kge,Object.defineProperty(Ah,Symbol.toStringTag,{value:"Module"})}));
4098
+ `)}])},p.toDisplayString(J.value),3)):p.createCommentVNode("",!0),t[5]||(t[5]=p.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"]]),jme={class:"prematch-bg"},Ume={class:"subtitle"},qme={class:"jornada"},Wme={class:"fecha"},Gme={class:"teams-row"},Hme={class:"team team-local"},Xme={class:"escudo-svg"},Yme=["src"],Jme={class:"team team-visitor"},Kme={class:"escudo-svg"},Zme=["src"],Qme=ws({__name:"AnalisisPrematchType3",props:{report:{type:Object,default:()=>({})}},setup(r){function a(B){return B?B.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 g=r;return(B,J)=>(p.openBlock(),p.createElementBlock("div",jme,[J[1]||(J[1]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",Ume,[p.createElementVNode("span",qme,p.toDisplayString(a(g.report.game.matchday_name)),1),p.createElementVNode("span",Wme," - "+p.toDisplayString(p.unref(jd)(g.report.game.date_time_utc)),1)]),p.createElementVNode("div",Gme,[p.createElementVNode("div",Hme,[p.createElementVNode("span",Xme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.home_team+".png"},null,8,Yme)])]),J[0]||(J[0]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",Jme,[p.createElementVNode("span",Kme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.visiting_team+".png"},null,8,Zme)])])])]))}},[["__scopeId","data-v-b31afbdf"]]),$me={class:"prematch-bg"},e0e={class:"subtitle"},t0e={class:"jornada"},r0e={class:"fecha"},n0e={class:"teams-row"},i0e={class:"team team-local"},a0e={class:"team-header"},o0e={class:"escudo-svg"},s0e=["src"],l0e={class:"score"},c0e={class:"players-list"},u0e={class:"player-name"},d0e={key:0,class:"more-events-indicator"},h0e={class:"team team-visitor"},p0e={class:"team-header"},f0e={class:"score"},m0e={class:"escudo-svg"},g0e=["src"],y0e={class:"players-list"},v0e={class:"player-name"},b0e={key:0},x0e={key:0,class:"more-events-indicator"},_0e=ws({__name:"AnalisisPostMatchType3",props:{report:{type:Object,default:()=>({})}},setup(r){var v,u;function a(t){return t?t.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 g=r;console.log("Props report: ",g.report),console.log("Game minutes: ",(u=(v=g.report)==null?void 0:v.game)==null?void 0:u.report_minutes);const B=p.computed(()=>{var t,w,y;return(((y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.report_minutes)==null?void 0:y.home_goals_minutes)||[]).slice(0,5)}),J=p.computed(()=>{var t,w,y;return(((y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.report_minutes)==null?void 0:y.visiting_goals_minutes)||[]).slice(0,5)});function C(t){const w=Array.from(t.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),y=t.match(/^(.*?)\s*\d+'/),b=y?" "+y[1].trim():"";return{minutos:w,nombre:b}}const x=p.computed(()=>{var w,y,b,h;return(((h=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.report_minutes)==null?void 0:b.home_goals_minutes)==null?void 0:h.length)||0)>5}),e=p.computed(()=>{var w,y,b,h;return(((h=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.report_minutes)==null?void 0:b.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(t,w)=>(p.openBlock(),p.createElementBlock("div",$me,[w[5]||(w[5]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",e0e,[p.createElementVNode("span",t0e,"Jornada "+p.toDisplayString(a(r.report.game.matchday_name)),1),p.createElementVNode("span",r0e," - "+p.toDisplayString(p.unref(jd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",n0e,[p.createElementVNode("div",i0e,[p.createElementVNode("div",a0e,[p.createElementVNode("span",o0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,s0e)]),p.createElementVNode("div",l0e,p.toDisplayString(r.report.game.score[0]),1)]),p.createElementVNode("div",c0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(B.value,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`home-event-${b}`,class:"player-item"},[p.createElementVNode("span",u0e,p.toDisplayString(y)+" ",1),w[0]||(w[0]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.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"}),p.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)),x.value?(p.openBlock(),p.createElementBlock("div",d0e,[...w[1]||(w[1]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)])])):p.createCommentVNode("",!0)])]),w[4]||(w[4]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",h0e,[p.createElementVNode("div",p0e,[p.createElementVNode("div",f0e,p.toDisplayString(r.report.game.score[1]),1),p.createElementVNode("span",m0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,g0e)])]),p.createElementVNode("div",y0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(J.value,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`visiting-event-${b}`,class:"player-item"},[w[2]||(w[2]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.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"}),p.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)),p.createElementVNode("span",v0e,[p.createTextVNode(p.toDisplayString(C(y).minutos)+" ",1),C(y).nombre?(p.openBlock(),p.createElementBlock("span",b0e,p.toDisplayString(C(y).nombre),1)):p.createCommentVNode("",!0)])]))),128)),e.value?(p.openBlock(),p.createElementBlock("div",x0e,[...w[3]||(w[3]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)])])):p.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-8ea6b233"]]),w0e={class:"prematch-bg"},T0e={class:"subtitle"},k0e={class:"jornada"},S0e={class:"fecha"},E0e={class:"teams-row"},A0e={class:"team team-local"},C0e={class:"escudo-svg"},M0e=["src"],P0e={class:"team team-visitor"},N0e={class:"escudo-svg"},O0e=["src"],I0e=ws({__name:"AnalisisPrematchType4",props:{report:{type:Object,default:()=>({})}},setup(r){function a(B){return B?B.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 g=r;return(B,J)=>(p.openBlock(),p.createElementBlock("div",w0e,[J[1]||(J[1]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",T0e,[p.createElementVNode("span",k0e,p.toDisplayString(a(g.report.game.matchday_name)),1),p.createElementVNode("span",S0e," - "+p.toDisplayString(p.unref(jd)(g.report.game.date_time_utc)),1)]),p.createElementVNode("div",E0e,[p.createElementVNode("div",A0e,[p.createElementVNode("span",C0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.home_team+".png"},null,8,M0e)])]),J[0]||(J[0]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",P0e,[p.createElementVNode("span",N0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+g.report.game.visiting_team+".png"},null,8,O0e)])])])]))}},[["__scopeId","data-v-ef3bf0e5"]]),R0e={class:"prematch-bg"},L0e={class:"subtitle"},z0e={class:"jornada"},D0e={class:"fecha"},B0e={class:"teams-row"},V0e={class:"team team-local"},F0e={class:"team-header"},j0e={class:"escudo-svg"},U0e=["src"],q0e={class:"score"},W0e={class:"players-list"},G0e={class:"player-name"},H0e={key:0,class:"more-events-indicator"},X0e={class:"team team-visitor"},Y0e={class:"team-header"},J0e={class:"score"},K0e={class:"escudo-svg"},Z0e=["src"],Q0e={class:"players-list"},$0e={class:"player-name"},ege={key:0},tge={key:0,class:"more-events-indicator"},rge=ws({__name:"AnalisisPostMatchType4",props:{report:{type:Object,default:()=>({})}},setup(r){var v,u;function a(t){return t?t.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 g=r;console.log("Props report: ",g.report),console.log("Game minutes: ",(u=(v=g.report)==null?void 0:v.game)==null?void 0:u.report_minutes);const B=p.computed(()=>{var t,w,y;return(((y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.report_minutes)==null?void 0:y.home_goals_minutes)||[]).slice(0,5)}),J=p.computed(()=>{var t,w,y;return(((y=(w=(t=g.report)==null?void 0:t.game)==null?void 0:w.report_minutes)==null?void 0:y.visiting_goals_minutes)||[]).slice(0,5)});function C(t){const w=Array.from(t.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),y=t.match(/^(.*?)\s*\d+'/),b=y?y[1].trim():"";return{minutos:w,nombre:b}}const x=p.computed(()=>{var w,y,b,h;return(((h=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.report_minutes)==null?void 0:b.home_goals_minutes)==null?void 0:h.length)||0)>5}),e=p.computed(()=>{var w,y,b,h;return(((h=(b=(y=(w=g.report)==null?void 0:w.game)==null?void 0:y.report_minutes)==null?void 0:b.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(t,w)=>(p.openBlock(),p.createElementBlock("div",R0e,[w[5]||(w[5]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",L0e,[p.createElementVNode("span",z0e,"Jornada "+p.toDisplayString(a(r.report.game.matchday_name)),1),p.createElementVNode("span",D0e," - "+p.toDisplayString(p.unref(jd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",B0e,[p.createElementVNode("div",V0e,[p.createElementVNode("div",F0e,[p.createElementVNode("span",j0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,U0e)]),p.createElementVNode("div",q0e,p.toDisplayString(r.report.game.score[0]),1)]),p.createElementVNode("div",W0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(B.value,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`home-event-${b}`,class:"player-item"},[p.createElementVNode("span",G0e,p.toDisplayString(y)+" ",1),w[0]||(w[0]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.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"}),p.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)),x.value?(p.openBlock(),p.createElementBlock("div",H0e,[...w[1]||(w[1]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)])])):p.createCommentVNode("",!0)])]),w[4]||(w[4]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",X0e,[p.createElementVNode("div",Y0e,[p.createElementVNode("div",J0e,p.toDisplayString(r.report.game.score[1]),1),p.createElementVNode("span",K0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,Z0e)])]),p.createElementVNode("div",Q0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(J.value,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`visiting-event-${b}`,class:"player-item"},[w[2]||(w[2]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.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"}),p.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)),p.createElementVNode("span",$0e,[p.createTextVNode(p.toDisplayString(C(y).minutos)+" ",1),C(y).nombre?(p.openBlock(),p.createElementBlock("span",ege," "+p.toDisplayString(C(y).nombre),1)):p.createCommentVNode("",!0)])]))),128)),e.value?(p.openBlock(),p.createElementBlock("div",tge,[...w[3]||(w[3]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)])])):p.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-dea95209"]]),nge={class:"report-card",style:{position:"relative"}},ige={class:"report-img-placeholder",style:{position:"relative"}},age={class:"inner-card-report"},oge={class:"report-footer"},sge={class:"report-title"},lge={class:"report-template"},cge={class:"template-name"},uge={class:"report-league"},dge={class:"report-tournament"},hge=ws({__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(r,{emit:a}){const g=a,B=r,J=p.ref(!1);function C(){J.value=!1,g("open-report",B.report)}function x(){console.log("renombrar"),J.value=!1,g("renombrar",B.report.report_name||"Reporte",B.report.id)}function e(){console.log("editar"),J.value=!1,g("edit-template",B.report)}function v(){console.log("duplicar"),J.value=!1}function u(){console.log("eliminar"),J.value=!1,g("eliminar",B.report)}function t(){console.log("descargar"),g("download-report",B.report),J.value=!1}function w(b){return b?b.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 y(){g("open-report",B.report)}return(b,h)=>(p.openBlock(),p.createElementBlock("div",nge,[p.createElementVNode("div",{class:"three-dots",onClick:h[0]||(h[0]=p.withModifiers(n=>J.value=!J.value,["stop"]))},[...h[4]||(h[4]=[p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1)])]),p.createElementVNode("div",ige,[r.report.template_type===1&&r.report.pages[0].type==1?(p.openBlock(),p.createBlock(pfe,{key:0,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==1?(p.openBlock(),p.createBlock(Wfe,{key:1,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),r.report.template_type===1&&r.report.pages[0].type==2?(p.openBlock(),p.createBlock(cme,{key:2,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==2?(p.openBlock(),p.createBlock(Fme,{key:3,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),r.report.template_type===1&&r.report.pages[0].type==3?(p.openBlock(),p.createBlock(Qme,{key:4,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==3?(p.openBlock(),p.createBlock(_0e,{key:5,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):r.report.template_type===1&&r.report.pages[0].type==4?(p.openBlock(),p.createBlock(I0e,{key:6,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==4?(p.openBlock(),p.createBlock(rge,{key:7,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),p.createElementVNode("div",{class:"report-img-overlay"},[p.createElementVNode("button",{class:"report-img-button",onClick:y},"Ver reporte")])]),p.createElementVNode("div",age,[p.createElementVNode("div",oge,[p.createElementVNode("div",sge,p.toDisplayString(r.report.report_name),1),p.createElementVNode("div",lge,[h[5]||(h[5]=p.createTextVNode(" Template: ",-1)),p.createElementVNode("span",cge,p.toDisplayString(r.report.name),1)]),p.createElementVNode("div",uge,p.toDisplayString(r.report.season_name)+" - "+p.toDisplayString(w(r.report.game.matchday_name))+"  |  "+p.toDisplayString(p.unref(jd)(r.report.game.date_time_utc)),1),p.createElementVNode("div",dge,p.toDisplayString(r.report.tournament_name),1)])]),J.value?(p.openBlock(),p.createBlock(Ype,{key:0,onClick:h[1]||(h[1]=p.withModifiers(n=>J.value=!1,["self"])),onMouseleave:h[2]||(h[2]=n=>J.value=!1),onVerReporte:C,onRenombrar:x,onEditar:e,onDuplicar:v,onEliminar:u,onDescargar:t})):p.createCommentVNode("",!0),J.value?(p.openBlock(),p.createElementBlock("div",{key:1,class:"tooltip-overlay",onClick:h[3]||(h[3]=n=>J.value=!1)})):p.createCommentVNode("",!0)]))}},[["__scopeId","data-v-fb57d46a"]]),pge={class:"modal-overlay"},fge={class:"modal-content"},mge={class:"modal-body"},gge=["placeholder","disabled"],yge={key:0,class:"error-message"},vge={class:"modal-footer"},bge=["disabled"],xge=["disabled"],_ge={key:0},wge={key:1},Tge=ws({__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(r,{emit:a}){const g=r,B=a,J=p.ref(g.initialName),C=p.ref(!1),x=p.ref("");p.watch(()=>g.initialName,v=>{J.value=v,x.value=""});async function e(){var v;if(console.log("acceptRename"),!(J.value.trim().length<3)){console.log("acceptRename 22"),C.value=!0,x.value="";try{await to.create({headers:{Authorization:`${g.token}`}}).put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/reports/${g.reportId}/rename`,{name:J.value.trim()}),B("rename",J.value.trim()),B("refresh"),B("close")}catch(u){console.error("Error al renombrar el reporte:",u),((v=u.response)==null?void 0:v.status)===409?x.value="Ya existe un reporte con el mismo nombre":x.value="Error al renombrar el reporte. Inténtalo de nuevo."}finally{C.value=!1}}}return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(v,u)=>(p.openBlock(),p.createElementBlock("div",pge,[p.createElementVNode("div",fge,[p.createElementVNode("button",{class:"close-btn",onClick:u[0]||(u[0]=t=>v.$emit("close"))},[...u[3]||(u[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),u[5]||(u[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Renombrar Reporte")],-1)),u[6]||(u[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",mge,[u[4]||(u[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":u[1]||(u[1]=t=>J.value=t),placeholder:r.initialName,maxlength:"40",autocomplete:"off",disabled:C.value},null,8,gge),[[p.vModelText,J.value]]),x.value?(p.openBlock(),p.createElementBlock("div",yge,p.toDisplayString(x.value),1)):p.createCommentVNode("",!0)]),u[7]||(u[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",vge,[p.createElementVNode("button",{class:"cancel-btn",onClick:u[2]||(u[2]=t=>v.$emit("close")),disabled:C.value},"Cancelar",8,bge),p.createElementVNode("button",{class:"next-btn",disabled:J.value.trim().length<3||C.value,onClick:e},[C.value?(p.openBlock(),p.createElementBlock("span",_ge,"Guardando...")):(p.openBlock(),p.createElementBlock("span",wge,"Guardar"))],8,xge)])])]))}},[["__scopeId","data-v-21795291"]]),kge={class:"modal-overlay"},Sge={class:"modal-content"},Ege={class:"modal-footer"},Age=["disabled"],Cge=["disabled"],Mge=ws({__name:"ModalDeleteReport",props:{reportId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","reportDeleted"],setup(r,{emit:a}){const g=r,B=a,J=p.ref(!1),C=async()=>{try{J.value=!0;const e=await to.create({headers:{Authorization:`${g.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/reports/${g.reportId}`);console.log("Reporte eliminado exitosamente:",e.data),B("reportDeleted",g.reportId),B("close")}catch(x){console.error("Error al eliminar el reporte:",x),alert("Error al eliminar el reporte. Por favor, intenta de nuevo.")}finally{J.value=!1}};return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(x,e)=>(p.openBlock(),p.createElementBlock("div",kge,[p.createElementVNode("div",Sge,[p.createElementVNode("button",{class:"close-btn",onClick:e[0]||(e[0]=v=>x.$emit("close"))},[...e[2]||(e[2]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])]),e[3]||(e[3]=p.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)),p.createElementVNode("div",Ege,[p.createElementVNode("button",{class:"cancel-btn",onClick:e[1]||(e[1]=v=>x.$emit("close")),disabled:J.value},"Cancelar",8,Age),p.createElementVNode("button",{class:"delete-btn",onClick:C,disabled:J.value},p.toDisplayString(J.value?"Eliminando...":"Eliminar"),9,Cge)])])]))}},[["__scopeId","data-v-faeee5ba"]]),Pge={class:"reports-header"},Nge={class:"count"},Oge={key:0,class:"sort-options"},Ige=["onClick"],Rge={key:0,class:"checkmark"},Lge={key:0,class:"loading-state"},zge={key:1,class:"error-state"},Dge={key:3,class:"empty-reports"},Bge={key:4,class:"empty-reports"},Vge=ws({__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(r,{emit:a}){const g=r,B=a,J=p.ref([]),C=p.ref(!1),x=p.ref(null),e=p.computed(()=>{let V=J.value;if(g.searchQuery.trim()){const U=g.searchQuery.toLowerCase().trim();V=J.value.filter(q=>{var re,ee,K,te,ae,oe,he;return!!((((re=q.report_name)==null?void 0:re.toLowerCase())||"").includes(U)||(((ee=q.name)==null?void 0:ee.toLowerCase())||"").includes(U)||q.created_at&&new Date(q.created_at).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(U)||(K=q.game)!=null&&K.date_time_utc&&new Date(q.game.date_time_utc).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(U)||(((ae=(te=q.game)==null?void 0:te.season_name)==null?void 0:ae.toLowerCase())||"").includes(U)||(((oe=q.tournament_name)==null?void 0:oe.toLowerCase())||"").includes(U)||(he=q.game)!=null&&he.matchday&&q.game.matchday.toString().includes(U))})}return u.value&&(V=[...V].sort((U,q)=>{var W,Z;if(u.value==="A - Z"){const ne=(U.report_name||"").toLowerCase(),X=(q.report_name||"").toLowerCase();return ne.localeCompare(X,"es",{sensitivity:"base"})}else if(u.value==="Más recientes"){const ne=new Date(U.created_at||0);return new Date(q.created_at||0)-ne}else if(u.value==="Torneo"){const ne=(U.tournament_name||"").toLowerCase(),X=(q.tournament_name||"").toLowerCase();if(ne!==X)return ne.localeCompare(X,"es",{sensitivity:"base"});const re=U.season_id||0;return(q.season_id||0)-re}else if(u.value==="Jornada"){const ne=((W=U.game)==null?void 0:W.matchday_id)||0,X=((Z=q.game)==null?void 0:Z.matchday_id)||0;return ne-X}return 0})),V}),v=p.ref(!1),u=p.ref("Más recientes"),t=p.ref(!1),w=p.ref(""),y=p.ref(""),b=p.ref(""),h=p.ref(!1),n=p.ref(""),i=p.ref(""),d=p.ref(null),s=p.ref(null),c=p.ref(null),f=p.ref(0),m=[{label:"A - Z",value:"A - Z"},{label:"Más recientes",value:"Más recientes"},{label:"Torneo",value:"Torneo"},{label:"Jornada",value:"Jornada"}],T=async()=>{C.value=!0,x.value=null;try{const V=await to.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${g.userId}/reports`,{headers:{Authorization:`${g.token}`,"Content-Type":"application/json"}});V.data&&Array.isArray(V.data)?J.value=V.data:V.data&&V.data.reports?J.value=V.data.reports:V.data&&V.data.data?J.value=V.data.data:J.value=[]}catch(V){console.error("Error cargando reportes:",V),console.error("Error response:",V.response),x.value=V.message||"Error al cargar los reportes",J.value=[]}finally{C.value=!1}},E=p.computed(()=>{if(!f.value)return"grid-1-column";const V=340,U=20,W=f.value-40,Z=Math.floor((W+U)/(V+U)),ne=Math.max(1,Z);return ne>=4?"grid-4-columns":ne>=3?"grid-3-columns":ne>=2?"grid-2-columns":"grid-1-column"}),S=()=>{v.value=!v.value},P=V=>{console.log("Ordenando por:",V),u.value=V,v.value=!1};function N(V){console.log("reports section onOpenReport",V),B("open-report",V)}const A=(V,U)=>{w.value=V,y.value=U;const q=J.value.find(W=>W.id===U);b.value=q?q.template_type:"",t.value=!0},O=V=>{console.log("Renombrar reporte de",w.value,"a",V),t.value=!1;const U=J.value.findIndex(q=>q.id===y.value);U!==-1&&(J.value[U].report_name=V)},M=V=>{n.value=V.report_name||"Reporte",i.value=V.id,h.value=!0},k=V=>{h.value=!1,J.value=J.value.filter(U=>U.id!==V)};function I(V){console.log("Descargando reporte:",V),B("download-report",V)}const _=V=>{v.value&&d.value&&!d.value.contains(V.target)&&(v.value=!1)},R=()=>{s.value&&(f.value=s.value.offsetWidth)};let z=null;return p.onMounted(async()=>{document.addEventListener("mousedown",_),await T(),await p.nextTick(),R(),window.ResizeObserver?(z=new ResizeObserver(()=>{R()}),s.value&&z.observe(s.value)):window.addEventListener("resize",R)}),p.onBeforeUnmount(()=>{document.removeEventListener("mousedown",_),z?z.disconnect():window.removeEventListener("resize",R)}),(V,U)=>(p.openBlock(),p.createElementBlock("div",{class:"reports-section",ref_key:"reportsSectionRef",ref:s},[p.createElementVNode("div",Pge,[p.createElementVNode("span",null,[U[2]||(U[2]=p.createTextVNode("Reportes ",-1)),p.createElementVNode("span",Nge,"("+p.toDisplayString(e.value.length)+")",1)]),p.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:d},[p.createElementVNode("button",{class:"sort-button",onClick:S},[p.createTextVNode(p.toDisplayString(u.value||"Ordenar")+" ",1),p.createElementVNode("span",{class:p.normalizeClass(["dropdown-arrow",{rotated:v.value}])},null,2)]),v.value?(p.openBlock(),p.createElementBlock("div",Oge,[(p.openBlock(),p.createElementBlock(p.Fragment,null,p.renderList(m,q=>p.createElementVNode("div",{key:q.value,class:p.normalizeClass(["sort-option",{selected:u.value===q.value}]),onClick:W=>u.value!==q.value&&P(q.value)},[p.createElementVNode("span",null,p.toDisplayString(q.label),1),u.value===q.value?(p.openBlock(),p.createElementBlock("span",Rge,[...U[3]||(U[3]=[p.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):p.createCommentVNode("",!0)],10,Ige)),64))])):p.createCommentVNode("",!0)],512)]),C.value?(p.openBlock(),p.createElementBlock("div",Lge,[...U[4]||(U[4]=[p.createElementVNode("div",{class:"loading-spinner"},null,-1),p.createElementVNode("p",null,"Cargando reportes...",-1)])])):x.value?(p.openBlock(),p.createElementBlock("div",zge,[p.createElementVNode("p",null,"Error al cargar reportes: "+p.toDisplayString(x.value),1),p.createElementVNode("button",{onClick:T,class:"retry-button"},"Reintentar")])):(p.openBlock(),p.createElementBlock("div",{key:2,class:p.normalizeClass(["reports-grid",E.value]),ref_key:"reportsGridRef",ref:c},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(e.value,q=>(p.openBlock(),p.createBlock(hge,{key:q.id,report:q,onOpenReport:N,onRenombrar:A,onEliminar:M,onDownloadReport:I},null,8,["report"]))),128))],2)),!C.value&&!x.value&&J.value.length===0?(p.openBlock(),p.createElementBlock("div",Dge," No tienes reportes aún. ")):p.createCommentVNode("",!0),!C.value&&!x.value&&J.value.length>0&&e.value.length===0?(p.openBlock(),p.createElementBlock("div",Bge," No se encontraron reportes que coincidan con tu búsqueda. ")):p.createCommentVNode("",!0),t.value?(p.openBlock(),p.createBlock(Tge,{key:5,initialName:w.value,templateType:b.value,token:r.token,userId:r.userId,reportId:y.value,onClose:U[0]||(U[0]=q=>t.value=!1),onRename:O,onRefresh:T},null,8,["initialName","templateType","token","userId","reportId"])):p.createCommentVNode("",!0),h.value?(p.openBlock(),p.createBlock(Mge,{key:6,"report-id":i.value,"user-id":r.userId,token:r.token,onClose:U[1]||(U[1]=q=>h.value=!1),onReportDeleted:k},null,8,["report-id","user-id","token"])):p.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-70130c65"]]),Fge={class:"modal-overlay"},jge={class:"modal-content"},Uge=ws({__name:"ModalSoloEscritorio",setup(r){return(a,g)=>(p.openBlock(),p.createElementBlock("div",Fge,[p.createElementVNode("div",jge,[g[1]||(g[1]=p.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)),p.createElementVNode("button",{class:"modal-btn",onClick:g[0]||(g[0]=B=>a.$emit("toHome"))},"OK")])]))}},[["__scopeId","data-v-30303ebd"]]),qge={class:"top-bar"},Wge={class:"tabs-container"},Gge={class:"tabs"},Hge={key:0,class:"actions"},Xge={class:"search-container"},Yge={key:1,class:"actions"},Jge={class:"search-container"},Kge=ws({__name:"gsc-reports",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0}},emits:["toHome","download-report"],setup(r,{emit:a}){const g=r,{userId:B,team:J,token:C}=g,x=p.ref("templates"),e=p.ref(!1),v=p.ref(null),u=p.ref(!1),t=p.ref(""),w=p.ref(""),y=p.ref(null),b=p.ref(null),h=p.ref(0),n=a;function i(){if(v.value){const P=v.value.offsetWidth;e.value=P<1028}}p.watch(e,P=>{P?document.body.style.overflow="hidden":document.body.style.overflow=""}),p.onBeforeUnmount(()=>{document.body.style.overflow=""}),p.onMounted(()=>{i(),window.addEventListener("resize",i)}),p.onBeforeUnmount(()=>{window.removeEventListener("resize",i)});function d(P){console.log("onOpenModalNewTemplate, gsc-reports:",P),s(P)}function s(P){console.log("onEditTemplate, template:",P),console.log("Edicion es: "),console.log({template:P,isTemplateMode:!0}),y.value.show({template:P,isTemplateMode:!0})}const c=()=>{t.value=""},f=()=>{w.value=""};function m(P){console.log("gsc-report onOpenReport, report:",P),y.value&&y.value.show({template:P,isTemplateMode:!1})}function T(P){n("download-report",P)}function E(){n("toHome")}function S(){b.value&&b.value.obtenerTemplates(),h.value+=1}return(P,N)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(p.unref(Nue),{ref_key:"reportTemplateMaker",ref:y,token:p.unref(C),"user-team-id":p.unref(J),onClose:S},null,8,["token","user-team-id"]),p.createElementVNode("div",{ref_key:"containerRef",ref:v,class:"reports-container"},[e.value?(p.openBlock(),p.createBlock(Uge,{key:0,onToHome:E})):p.createCommentVNode("",!0),N[12]||(N[12]=p.createElementVNode("h1",{class:"title"},"Mis reportes",-1)),p.createElementVNode("div",qge,[p.createElementVNode("div",Wge,[p.createElementVNode("div",Gge,[p.createElementVNode("div",{class:p.normalizeClass(["tab tab-templates",{active:x.value==="templates"}]),onClick:N[0]||(N[0]=A=>x.value="templates")}," Templates ",2),p.createElementVNode("div",{class:p.normalizeClass(["tab tab-reports",{active:x.value==="reports"}]),onClick:N[1]||(N[1]=A=>x.value="reports")}," Tus reportes ",2)])]),x.value==="templates"?(p.openBlock(),p.createElementBlock("div",Hge,[p.createElementVNode("div",Xge,[N[8]||(N[8]=p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":N[2]||(N[2]=A=>t.value=A),class:"search",type:"text",placeholder:"Buscar template"},null,512),[[p.vModelText,t.value]]),t.value?(p.openBlock(),p.createElementBlock("button",{key:0,onClick:c,class:"clear-search-btn",type:"button"},[...N[7]||(N[7]=[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):p.createCommentVNode("",!0)]),p.createElementVNode("button",{class:"create-template-btn",onClick:N[3]||(N[3]=A=>u.value=!0)},[...N[9]||(N[9]=[p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-agregar@3x.png",alt:"Agregar",class:"create-icon"},null,-1),p.createTextVNode(" Crear template ",-1)])])])):p.createCommentVNode("",!0),x.value==="reports"?(p.openBlock(),p.createElementBlock("div",Yge,[p.createElementVNode("div",Jge,[N[11]||(N[11]=p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":N[4]||(N[4]=A=>w.value=A),class:"search search-reports",type:"text",placeholder:"Buscar reporte"},null,512),[[p.vModelText,w.value]]),w.value?(p.openBlock(),p.createElementBlock("button",{key:0,onClick:f,class:"clear-search-btn",type:"button"},[...N[10]||(N[10]=[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):p.createCommentVNode("",!0)])])):p.createCommentVNode("",!0)]),x.value==="templates"?(p.openBlock(),p.createBlock(Hpe,{ref_key:"templatesSectionRef",ref:b,userId:p.unref(B),token:p.unref(C),team:p.unref(J),searchQuery:t.value,key:h.value,onSwitchToReports:N[5]||(N[5]=A=>x.value="reports"),onOpenModalNewTemplate:d,onEditTemplate:s},null,8,["userId","token","team","searchQuery"])):(p.openBlock(),p.createBlock(Vge,{key:2,userId:p.unref(B),token:p.unref(C),team:p.unref(J),searchQuery:w.value,onOpenReport:m,onDownloadReport:T},null,8,["userId","token","team","searchQuery"])),u.value?(p.openBlock(),p.createBlock(bT,{key:3,token:p.unref(C),team:p.unref(J),onOpenModalNewTemplate:d,onClose:N[6]||(N[6]=A=>u.value=!1)},null,8,["token","team"])):p.createCommentVNode("",!0)],512)],64))}},[["__scopeId","data-v-717aa34b"]]),Zge={class:"subcategory-group"},Qge={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(r){return(a,g)=>(p.openBlock(),p.createElementBlock("div",Zge,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.subcategoryGroup,B=>(p.openBlock(),p.createBlock(p.unref(K1),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":J=>B.isSelected=J,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},$ge=nu(Qge,[["__scopeId","data-v-ae6f3d72"]]),eye={class:"filter-subcategories"},tye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(r){return(a,g)=>(p.openBlock(),p.createElementBlock("div",eye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.subcategoryGroups,B=>(p.openBlock(),p.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[p.createVNode($ge,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),yy=r=>(p.pushScopeId("data-v-80d9c265"),r=r(),p.popScopeId(),r),rye={class:"details__header"},nye=yy(()=>p.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),iye={class:"details__header__checkbox"},aye={class:"details__body"},oye={class:"details__body__playing-as"},sye=["onClick"],lye={class:"details__header"},cye=yy(()=>p.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),uye={class:"details__header__checkbox"},dye={class:"details__body"},hye=yy(()=>p.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),pye={class:"details__body__game-section"},fye=["onClick"],mye={class:"details__body"},gye=yy(()=>p.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),yye={class:"details__body__game-section"},vye=["onClick"],bye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__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(r){const a=r;p.useCssVars(t=>({"49cba245":r.buttonsBackgroundColor,"52f02da6":r.buttonsTextColor,"7d3f686a":r.buttonsBorderWidth,"7c286a07":r.buttonsBorderColor,"24a6f4aa":r.buttonsBackgroundColorActive,cd8d7768:r.buttonsTextColorActive,"35fa5c10":r.buttonsBorderWidthActive,"0cde1826":r.buttonsBorderColorActive}));const g=p.computed(()=>a.playingAs.every(t=>t.isSelected)),B=p.computed(()=>a.gameSections.every(t=>t.isSelected)),J=p.computed(()=>a.gameSections.reduce((t,w)=>(w.value<=3?t.firstHalf.push(w):t.secondHalf.push(w),t),{firstHalf:[],secondHalf:[]})),C=p.computed(()=>({"--border-radius-first-button":`${a.buttonsBorderRadius} 0 0 ${a.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${a.buttonsBorderRadius} ${a.buttonsBorderRadius} 0`}));function x(t){t?a.playingAs.forEach(w=>{w.isSelected=!0}):a.playingAs.forEach((w,y)=>{w.isSelected=y===0})}function e(t){a.playingAs.filter(w=>w.isSelected).length===1&&t.isSelected||(t.isSelected=!t.isSelected)}function v(t){a.gameSections.filter(w=>w.isSelected).length===1&&t.isSelected||(t.isSelected=!t.isSelected)}function u(t){t?a.gameSections.forEach(w=>{w.isSelected=!0}):a.gameSections.forEach((w,y)=>{w.isSelected=y===0})}return(t,w)=>(p.openBlock(),p.createElementBlock("div",{class:"details",style:p.normalizeStyle(C.value)},[p.createElementVNode("div",rye,[nye,p.createElementVNode("div",iye,[p.createVNode(p.unref(K1),{label:"Todos","model-value":g.value,"onUpdate:modelValue":x},null,8,["model-value"])])]),p.createElementVNode("div",aye,[p.createElementVNode("div",oye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.playingAs,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${b}`,class:p.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:h=>e(y)},p.toDisplayString(y.name),11,sye))),128))])]),p.createElementVNode("div",lye,[cye,p.createElementVNode("div",uye,[p.createVNode(p.unref(K1),{label:"Todos","model-value":B.value,"onUpdate:modelValue":u},null,8,["model-value"])])]),p.createElementVNode("div",dye,[hye,p.createElementVNode("div",pye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(J.value.firstHalf,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${b}`,class:p.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:h=>v(y)},p.toDisplayString(y.text),11,fye))),128))])]),p.createElementVNode("div",mye,[gye,p.createElementVNode("div",yye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(J.value.secondHalf,(y,b)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${b}`,class:p.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:h=>v(y)},p.toDisplayString(y.text),11,vye))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),xye={class:"filter-field"},_ye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__name:"FilterField",setup(r){const a=p.ref(Array.from({length:16},(B,J)=>J+1));function g(){}return(B,J)=>(p.openBlock(),p.createElementBlock("div",xye,[p.createVNode(p.unref(FI),{width:"100%","background-color":"#2E3B46",value:a.value,"onUpdate:modelValue":g},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Ah.GSCReports=Kge,Object.defineProperty(Ah,Symbol.toStringTag,{value:"Module"})}));