1"use strict";(self.webpackChunknacional_backoffice_frontend=self.webpackChunknacional_backoffice_frontend||[]).push([[3234],{3234(e,o,i){i.r(o),i.d(o,{default:()=>me});var t=i(9379),a=i(5043),l=i(3927),s=i(8205),d=i(5492),n=i(5444),r=i(6399),c=i(3942),u=i(6603),p=i(5512),h=i(5801),m=i(6282),f=i(2513),g=i(7419),x=i(1645),v=i(494),P=i(7914),A=i(4400),y=i(7393),C=i(1957),E=i(8354),I=i(3463),j=i(6144),b=i(9905),S=i(8369),w=i(3310),D=i(2058),q=i(8463),T=i(3390),F=i(3727),N=i(1210),k=i(1814),W=i(6011),z=i(8818),G=i(7407),O=i(1966),B=i(5337),M=i(446),R=i.n(M),_=i(3216),L=i(5475),H=i(3986),U=i(1686),Y=i(6149),J=i(579);const V=["endpoint","valueField","labelField","searchParam","extraParams","value","onChange","onLabelResolved","placeholder","style","allowClear","minChars"],K=e=>{let{endpoint:o,valueField:i,labelField:l,searchParam:s,extraParams:d={},value:n,onChange:r,onLabelResolved:c,placeholder:u,style:h,allowClear:m=!0,minChars:f=2}=e,g=(0,H.A)(e,V);const[x,v]=(0,a.useState)([]),[P,A]=(0,a.useState)(!1),y=(0,a.useRef)(null),C=(0,a.useRef)(d);C.current=d;const E=e=>"function"===typeof l?l(e):e[l];(0,a.useEffect)(()=>{n&&Y.Ay.get("".concat(o,"/").concat(n)).then(e=>{const o=e.data,a=E(o);v([(0,t.A)({value:o[i],label:a},o)]),null===c||void 0===c||c(a)}).catch(()=>{})},[]);return(0,J.jsx)(p.A,(0,t.A)({showSearch:!0,filterOption:!1,onSearch:e=>{clearTimeout(y.current),!e||e.length<f?n||v([]):y.current=setTimeout(async()=>{A(!0);try{const a=(await Y.Ay.get(o,{params:(0,t.A)({[s]:e,limit:20},C.current)})).data.data||[];v(a.map(e=>(0,t.A)({value:e[i],label:E(e)},e)))}catch(a){}finally{A(!1)}},300)},options:x,value:n||void 0,onChange:(e,o)=>{var i;null===c||void 0===c||c(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:null),null===r||void 0===r||r(e,o)},loading:P,allowClear:m,placeholder:u,style:h,notFoundContent:P?(0,J.jsx)(U.A,{size:"small"}):(0,J.jsxs)("span",{style:{color:"#aaa",fontSize:13},children:["Escrib\xed ",f,"+ letras para buscar"]})},g))};var X=i(5187);const{Text:Q}=l.A,Z=e=>{let{x:o,y:i,photoUrl:t,fallback:l,onHide:s}=e;const[d,n]=(0,a.useState)(t),[r,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{n(t),c(!1)},[t]);return r?null:(0,J.jsx)("div",{style:{position:"fixed",left:o,top:i,zIndex:9999,pointerEvents:"none",background:"#fff",borderRadius:8,boxShadow:"0 4px 20px rgba(0,0,0,0.22)",padding:6,width:360},children:(0,J.jsx)("img",{src:d,alt:"",onError:()=>{l&&d!==l?n(l):(c(!0),s())},style:{width:348,height:244,objectFit:"contain",display:"block",borderRadius:4,background:"#f5f5f5"}})})},$=e=>{var o;let{filters:i,setFilters:l,cantidadTipo:A,setCantidadTipo:y,cantidadN:C,setCantidadN:E,busquedaTexto:I="",setBusquedaTexto:j,canEdit:G=!1}=e;const[O,B]=(0,a.useState)(!1),[M,_]=(0,a.useState)("mes"),[L,H]=(0,a.useState)(null),[U,V]=(0,a.useState)(()=>i.PartidoAnio?"anio":i.PartidoFechaDesde||i.PartidoFechaHasta?"rango_fechas":i.PartidoDia||i.PartidoMes?"dia_mes":"rango_anios"),[X,Q]=(0,a.useState)(!1),[Z,$]=(0,a.useState)(()=>{const e=window.innerWidth<768;return{fecha:e,equipo:e,estadio:e,campeonato:e,resultado:e,partido:e}}),ee=!s.Ay.useBreakpoint().md,oe=(new Date).getFullYear(),ie=!!(i.PartidoDia||i.PartidoMes||i.PartidoFechaDesde||i.PartidoFechaHasta||i.PartidoAnio||i.PartidoAnioDesde&&1899!==i.PartidoAnioDesde||i.PartidoAnioHasta&&i.PartidoAnioHasta!==oe),te=!!(i.EquipoId||i.EquipoPaisId||i.EquipoCiudadId),ae=!!(i.EstadioId||i.EstadioPaisId||i.EstadioCiudadId),le=!!(i.NombreCampeonatoId||i.CampeonatoInternacional||i.CampeonatoLocal||i.CampeonatoUruguayo||i.CampeonatoAmistoso||i.MotivoId||i.PartidoCondicion||i.PartidoTipo&&"O,A"!==i.PartidoTipo),se=!!(i.PartidoResultado||void 0!==i.PartidoGolesFavor||void 0!==i.PartidoGolesContra||void 0!==i.PartidoDiferenciaGoles||i.PartidoEspecial||!ee&&(i.filtroWO||i.filtroAnulado||i.filtroCambioResultado)||"todos"!==A),de=!!(i.filtroDefinidoPenales||i.filtroWO||i.filtroAnulado||i.filtroCambioResultado),ne=!!i.atilioIdFiltro,re=e=>{let{sectionKey:o,title:i,isActive:a,activeLabel:l,onClear:s,children:n,contentStyle:r}=e;return(0,J.jsxs)("div",{style:{marginBottom:8,borderRadius:8,border:"1px solid ".concat(a?"#91caff":"#f0f0f0"),overflow:"hidden"},children:[(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:ee?"8px 12px":"10px 14px",minHeight:42,background:a?"#e6f4ff":"#fafafa",cursor:"pointer",userSelect:"none"},onClick:()=>{return e=o,$(o=>(0,t.A)((0,t.A)({},o),{},{[e]:!o[e]}));var e},children:[Z[o]?(0,J.jsx)(b.A,{style:{fontSize:11,color:"#8c8c8c"}}):(0,J.jsx)(S.A,{style:{fontSize:11,color:"#8c8c8c"}}),(0,J.jsx)("span",{style:{fontWeight:600,fontSize:ee?15:13,color:"#262626"},children:i}),a&&l&&!ee&&(0,J.jsx)("span",{style:{fontSize:11,color:"#1677ff",marginLeft:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:220},children:l}),(0,J.jsx)("div",{style:{flex:1}}),a&&(0,J.jsx)(d.Ay,{size:"small",type:"text",icon:(0,J.jsx)(w.A,{}),style:{color:"#1677ff",fontSize:12,flexShrink:0},onClick:e=>{e.stopPropagation(),s()},children:"Limpiar"})]}),!Z[o]&&(0,J.jsx)("div",{style:(0,t.A)((0,t.A)({padding:ee?"8px 12px":"12px 14px"},ee?{}:{overflowX:"auto"}),r),children:n})]})},[ce,ue]=(0,a.useState)([]),[pe,he]=(0,a.useState)([]),[me,fe]=(0,a.useState)([]),[ge,xe]=(0,a.useState)(null),[ve,Pe]=(0,a.useState)(null),[Ae,ye]=(0,a.useState)([]),[Ce,Ee]=(0,a.useState)([]),[Ie,je]=(0,a.useState)([]),[be,Se]=(0,a.useState)([]),[we,De]=(0,a.useState)(null),[qe,Te]=(0,a.useState)(null),Fe=new Date,Ne=Fe.getFullYear(),ke=Fe.getDate(),We=Fe.getMonth()+1;(0,a.useEffect)(()=>{(async()=>{try{var e,o,i;const[t,a,l]=await Promise.all([Y.services.paises.getAll({limit:300}
1),Y.services.nombresCampeonato.getAll({limit:200}),Y.services.motivosPartido.getAll({limit:200})]);ue(Array.isArray(null===t||void 0===t||null===(e=t.data)||void 0===e?void 0:e.data)?t.data.data:[]),he(Array.isArray(null===a||void 0===a||null===(o=a.data)||void 0===o?void 0:o.data)?a.data.data:[]),fe(Array.isArray(null===l||void 0===l||null===(i=l.data)||void 0===i?void 0:i.data)?l.data.data:[])}catch(t){console.error("Error al cargar datos:",t),ue([])}})()},[]),(0,a.useEffect)(()=>{(async()=>{if(!i.EquipoPaisId||""===i.EquipoPaisId||"extranjeros"===i.EquipoPaisId)return ye([]),je([]),void De(null);try{var e;const t=parseInt(i.EquipoPaisId),a=await Y.services.ciudades.getAll({PaisId:t,limit:500}),l=(null===a||void 0===a||null===(e=a.data)||void 0===e?void 0:e.data)||[];if(ye(Array.isArray(l)?l:[]),1===t){var o;const e=await Y.services.departamentos.getAll({limit:200}),i=(null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o.data)||[];je(Array.isArray(i)?i:[])}else je([]);De(null)}catch(t){console.error("Error al cargar ciudades:",t),ye([]),je([]),De(null)}})()},[i.EquipoPaisId]),(0,a.useEffect)(()=>{(async()=>{if(!i.EstadioPaisId||""===i.EstadioPaisId||"extranjeros"===i.EstadioPaisId)return Ee([]),Se([]),void Te(null);try{var e;const t=parseInt(i.EstadioPaisId),a=await Y.services.ciudades.getAll({PaisId:t,limit:500}),l=(null===a||void 0===a||null===(e=a.data)||void 0===e?void 0:e.data)||[];if(Ee(Array.isArray(l)?l:[]),1===t){var o;const e=await Y.services.departamentos.getAll({limit:200}),i=(null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o.data)||[];Se(Array.isArray(i)?i:[])}else Se([]);Te(null)}catch(t){console.error("Error al cargar ciudades:",t),Ee([]),Se([]),Te(null)}})()},[i.EstadioPaisId]);const ze=()=>{De(null),Te(null),l({PartidoAnioDesde:1899,PartidoAnioHasta:Ne,PartidoTipo:"O,A"}),y("todos"),E(10),V("rango_anios"),j&&j("")},Ge=[];for(let t=1899;t<=Ne;t++)Ge.push({value:t,label:t});const Oe=[];for(let t=Ne;t>=1899;t--)Oe.push({value:t,label:t});const Be=[{value:null,label:"Todos"},{value:1,label:"Enero"},{value:2,label:"Febrero"},{value:3,label:"Marzo"},{value:4,label:"Abril"},{value:5,label:"Mayo"},{value:6,label:"Junio"},{value:7,label:"Julio"},{value:8,label:"Agosto"},{value:9,label:"Septiembre"},{value:10,label:"Octubre"},{value:11,label:"Noviembre"},{value:12,label:"Diciembre"}],Me=[{value:null,label:"Todos"}];for(let t=1;t<=31;t++)Me.push({value:t,label:t});const Re=(0,J.jsx)("div",{style:{maxWidth:320,maxHeight:300,overflow:"auto"},children:"mes"===M?(0,J.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:8,padding:8},children:Be.filter(e=>null!==e.value).map(e=>(0,J.jsx)(d.Ay,{onClick:()=>(e=>{H(e),_("dia")})(e.value),block:!0,style:{height:38},children:e.label},e.value))}):(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{padding:"8px 8px 4px",fontWeight:500,borderBottom:"1px solid #f0f0f0"},children:null===(o=Be.find(e=>e.value===L))||void 0===o?void 0:o.label}),(0,J.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:4,padding:8},children:Array.from({length:(_e=L,{1:31,2:29,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}[_e]||31)},(e,o)=>o+1).map(e=>(0,J.jsx)(d.Ay,{onClick:()=>(e=>{l((0,t.A)((0,t.A)({},i),{},{PartidoDia:e,PartidoMes:L})),B(!1),_("mes"),H(null)})(e),style:{width:38,height:38,padding:0},children:e},e))})]})});var _e;const Le=(()=>{const e=ce.find(e=>1===e.PaisId),o=ce.filter(e=>1!==e.PaisId).sort((e,o)=>e.PaisNombre.localeCompare(o.PaisNombre));return[{value:"",label:"Todos"},{value:"extranjeros",label:"Extranjeros"},...e?[{value:e.PaisId,label:e.PaisNombre}]:[],...o.map(e=>({value:e.PaisId,label:e.PaisNombre}))]})(),He=()=>{const e=[{value:"",label:"Todas"}];if(1===parseInt(i.EquipoPaisId)&&Ie.length>0){[...Ie].sort((e,o)=>e.DepartamentoNombre.localeCompare(o.DepartamentoNombre)).forEach(o=>{const i=Ae.filter(e=>e.DepartamentoId===o.DepartamentoId).sort((e,o)=>e.CiudadNombre.localeCompare(o.CiudadNombre));i.length>0&&e.push({label:o.DepartamentoNombre,options:[{value:"dept_".concat(o.DepartamentoId),label:"Todas de ".concat(o.DepartamentoNombre),isDepto:!0},...i.map(e=>({value:e.CiudadId,label:e.CiudadNombre}))]})})}else{const o=[...Ae].sort((e,o)=>e.CiudadNombre.localeCompare(o.CiudadNombre));e.push(...o.map(e=>({value:e.CiudadId,label:e.CiudadNombre})))}return e},Ue=()=>{const e=[{value:"",label:"Todas"}];if(1===parseInt(i.EstadioPaisId)&&be.length>0){[...be].sort((e,o)=>e.DepartamentoNombre.localeCompare(o.DepartamentoNombre)).forEac
1h(o=>{const i=Ce.filter(e=>e.DepartamentoId===o.DepartamentoId).sort((e,o)=>e.CiudadNombre.localeCompare(o.CiudadNombre));i.length>0&&e.push({label:o.DepartamentoNombre,options:[{value:"dept_".concat(o.DepartamentoId),label:"Todas de ".concat(o.DepartamentoNombre),isDepto:!0},...i.map(e=>({value:e.CiudadId,label:e.CiudadNombre}))]})})}else{const o=[...Ce].sort((e,o)=>e.CiudadNombre.localeCompare(o.CiudadNombre));e.push(...o.map(e=>({value:e.CiudadId,label:e.CiudadNombre})))}return e},Ye=1===i.CampeonatoInternacional?"internacionales":1===i.CampeonatoLocal?"locales":1===i.CampeonatoUruguayo?"uruguayo":1===i.CampeonatoAmistoso?"amistosos":i.NombreCampeonatoId?i.NombreCampeonatoId:"",Je=[{value:"",label:"Todos"},{value:"internacionales",label:"Internacionales"},{value:"locales",label:"Locales"},{value:"uruguayo",label:"Campeonato Uruguayo"},{value:"amistosos",label:"Amistosos"},...[...pe].filter(e=>0===e.CampeonatoAmistoso).sort((e,o)=>(e.NombreCampeonato||"").localeCompare(o.NombreCampeonato||"")).map(e=>({value:e.NombreCampeonatoId,label:e.NombreCampeonato}))],Ve=e=>{const o=(0,t.A)({},i);delete o.NombreCampeonatoId,delete o.CampeonatoInternacional,delete o.CampeonatoLocal,delete o.CampeonatoUruguayo,delete o.CampeonatoAmistoso,"internacionales"===e?o.CampeonatoInternacional=1:"locales"===e?o.CampeonatoLocal=1:"uruguayo"===e?o.CampeonatoUruguayo=1:"amistosos"===e?o.CampeonatoAmistoso=1:e&&""!==e&&(o.NombreCampeonatoId=e),l(o)},Ke=[{value:"O",label:"Oficial"},{value:"A",label:"Amistoso"},{value:"E",label:"Entrenamiento"}],Xe=[{value:"",label:"Todos"},...[...me].sort((e,o)=>(e.MotivoOrden||0)-(o.MotivoOrden||0)).map(e=>({value:e.MotivoId,label:e.MotivoDescripcion}))],Qe=[{value:"",label:"Todas"},{value:"L",label:"Local"},{value:"V",label:"Visitante"},{value:"N",label:"Neutral"},{value:"X",label:"N/A"}],Ze=[{value:"",label:"Todos"},{value:"ganado",label:"Ganado"},{value:"empatado",label:"Empatado"},{value:"perdido",label:"Perdido"}],$e=[{value:"",label:"Todos"},...Array.from({length:16},(e,o)=>({value:o,label:String(o)}))],eo=[{value:"",label:"Todas"},...Array.from({length:14},(e,o)=>7-o).map(e=>({value:e,label:e>=7?"+7 o m\xe1s":e<=-6?"-6 o menos":e>0?"+".concat(e):String(e)}))],oo=(()=>{const e=[],o={PartidoAnioDesde:1899,PartidoAnioHasta:Ne};
1return Object.keys(i).forEach(t=>{if(void 0!==i[t]&&null!==i[t]&&""!==i[t]&&i[t]!==o[t]){let o="",a=i[t];if("PartidoAnio"===t)o="A\xf1o ".concat(a);else if("PartidoAnioDesde"===t)o=i.PartidoAnioDesde===i.PartidoAnioHasta?"A\xf1o ".concat(a):"Desde ".concat(a);else if("PartidoAnioHasta"===t){if(i.PartidoAnioDesde===i.PartidoAnioHasta)return;o="Hasta ".concat(a)}else if("PartidoFechaDesde"===t){const e=e=>e.split("-").reverse().join("/");o=i.PartidoFechaHasta?"".concat(e(a)," \u2013 ").concat(e(i.PartidoFechaHasta)):"Desde ".concat(e(a))}else if("PartidoFechaHasta"===t){if(i.PartidoFechaDesde)return;o="Hasta ".concat(a.split("-").reverse().join("/"))}else if("PartidoDia"===t)o="D\xeda ".concat(a);else if("PartidoMes"===t){const e=Be.find(e=>e.value===a);o=e?e.label:a}else if("EquipoId"===t){const e=ge||"Equipo ".concat(a);o=i.EquipoIdExcluir?"Exc. ".concat(e):e}else if("EquipoPaisId"===t){const e=i.EquipoIdExcluir?"Exc. ":"";if("extranjeros"===a)o="".concat(e,"Equipos extranjeros");else{const i=ce.find(e=>e.PaisId===parseInt(a));o=i?"".concat(e,"Equipo ").concat(i.PaisNombre):"".concat(e,"Pa\xeds ").concat(a)}}else if("EquipoCiudadId"===t)o="".concat(i.EquipoIdExcluir?"Exc. ":"","Ciudad equipo");else if("EstadioId"===t){const e=ve||"Estadio ".concat(a);o=i.EstadioIdExcluir?"Exc. ".concat(e):e}else if("EstadioPaisId"===t){const e=i.EstadioIdExcluir?"Exc. ":"";if("extranjeros"===a)o="".concat(e,"Estadios extranjeros");else{const i=ce.find(e=>e.PaisId===parseInt(a));o=i?"".concat(e,"Estadio ").concat(i.PaisNombre):"".concat(e,"Pa\xeds estadio ").concat(a)}}else if("EstadioCiudadId"===t)o="".concat(i.EstadioIdExcluir?"Exc. ":"","Ciudad estadio");else if("CampeonatoInternacional"===t)o="Internacionales";else if("CampeonatoLocal"===t)o="Locales";else if("CampeonatoUruguayo"===t)o="Campeonato Uruguayo";else if("CampeonatoAmistoso"===t)o="Amistosos";else if("PartidoTipo"===t){if("O,A"===a)return;const e={O:"Oficial",A:"Amistoso",E:"Entrenamiento"};o=a.split(",").map(o=>e[o]||o).join(", ")}else if("NombreCampeonatoId"===t){const e=pe.find(e=>e.NombreCampeonatoId===a);o=e?e.NombreCampeonato:"Campeonato ".concat(a)}else if("MotivoId"===t){const e=me.find(e=>e.MotivoId===a);o=e?e.MotivoDescripcion:"Motivo ".concat(a)}else if("PartidoCondicion"===t){o={L:"Local",V:"Visitante",N:"Neutral",X:"N/A"}[a]||a}else if("PartidoResultado"===t){o={ganado:"Ganado",empatado:"Empatado",perdido:"Perdido"}[a]||a}else if("PartidoGolesFavor"===t)o="GF: ".concat(a);else if("PartidoGolesContra"===t)o="GC: ".concat(a);else if("PartidoDiferenciaGoles"===t){const e=Number(a);o=e>=7?"Dif: +7 o m\xe1s":e<=-6?"Dif: -6 o menos":"Dif: ".concat(e>0?"+":"").concat(e)}else if("PartidoEspecial"===t){o={penales:"Por Penales"}[a]||a}else if("filtroWO"===t)o="WO";else if("filtroAnulado"===t)o="Anulados";else if("filtroCambioResultado"===t)o="Cambio resultado";else if("atilioIdFiltro"===t){o={excluir_sin:"Sin AtilioId excluidos",solo_sin:"Solo sin AtilioId"}[a]||a}o&&e.push(o)}}),"ultimos"===A?1===C?e.push("\xdaltimo partido"):e.push("\xdaltimos ".concat(C)):"primeros"===A&&(1===C?e.push("Primer partido"):e.push("Primeros ".concat(C))),e})(),io=(()=>{const e=[];if(i.EquipoId){const o=ge||"equipo ".concat(i.EquipoId);e.push(i.EquipoIdExcluir?"excepto ".concat(o):"vs ".concat(o))}else if(i.EquipoPaisId)if("extranjeros"===i.EquipoPaisId)e.push(i.EquipoIdExcluir?"excepto extranjeros":"vs extranjeros");else{const o=ce.find(e=>e.PaisId===parseInt(i.EquipoPaisId));e.push("".concat(i.EquipoIdExcluir?"exc. ":"vs ","equipos de ").concat((null===o||void 0===o?void 0:o.PaisNombre)||i.EquipoPaisId))}if(i.EstadioId){const o=ve||"estadio ".concat(i.EstadioId);e.push(i.EstadioIdExcluir?"excepto en ".concat(o):"en ".concat(o))}else if(i.EstadioPaisId)if("extranjeros"===i.EstadioPaisId)e.push(i.EstadioIdExcluir?"excepto en el exterior":"en el exterior");else{const o=ce.find(e=>e.PaisId===parseInt(i.EstadioPaisId));e.push("".concat(i.EstadioIdExcluir?"excepto en":"en"," ").concat((null===o||void 0===o?void 0:o.PaisNombre)||i.EstadioPaisId))}if(i.CampeonatoInternacional)e.push("internacionales");else if(i.CampeonatoLocal)e.push("locales");else if(i.CampeonatoUruguayo)e.push("Campeonato Uruguayo");else if(i.CampeonatoAmistoso)e.push("amistosos");else if(i.NombreCampeonatoId){const o=pe.find(e=>e.NombreCampeonatoId===i.NombreCampeonatoId);o&&e.push("en ".concat(o.NombreCampeonato))}if(i.MotivoId){const o=me.find(e=>e.MotivoId===i.MotivoId);o&&e.push(o.MotivoDescripcion)}if(i.PartidoAnio)e.push("de ".concat(i.PartidoAnio));else if(i.PartidoFechaDesde||i.PartidoFechaHasta){const o=e=>e?e.split("-").reverse().join("/"):"?";i.PartidoFechaDesde&&i.PartidoFechaHasta?e.push("entre ".concat(o(i.PartidoFechaDesde)," y ").concat(o(i.PartidoFechaHasta))):i.PartidoFechaDesde?e.push("desde ".concat(o(i.PartidoFechaDesde))):e.push("hasta ".concat(o(i.PartidoFechaHasta)))}else{const o=[];if(i.PartidoAnioDesde&&1899!==i.PartidoAnioDesde&&o.push("desde ".concat(i.PartidoAnioDesde)),i.PartidoAnioHasta&&i.PartidoAnioHasta!==oe&&o.push("hasta ".concat(i.PartidoAnioHasta)),o.length&&e.push(o.join(" ")),i.PartidoMes){const o=Be.find(e=>e.value===i.PartidoMes),t=o?o.label.toLowerCase():String(i.PartidoMes);e.push(i.PartidoDia?"el ".concat(String(i.PartidoDia).padStart(2,"0")," de ").concat(t):"en ".concat(t))}else i.PartidoDia&&e.push("el d\xeda ".concat(i.PartidoDia))}if(i.PartidoCondicion){const o={L:"de local",V:"de visitante",N:"en cancha neutral"};o[i.PartidoCondicion]&&e.push(o[i.PartidoCondicion])}if(i.PartidoTipo&&"O,A"!==i.PartidoTipo){const o={O:"oficiales",A:"amistosos",E:"entrenamientos"};e.push(i.PartidoTipo.split(",").map(e=>o[e]||e).join(" o "))}if(i.PartidoResultado){const o={ganado:"ganados",empatado:"empatados",perdido:"perdidos"};e.push(o[i.PartidoResultado]||i.PartidoResultado)}if(void 0!==i.PartidoGolesFavor&&e.push("".concat(i.PartidoGolesFavor," GF")),void 0!==i.PartidoGolesContra&&e.push("".concat(i.PartidoGolesContra," GC")),void 0!==i.PartidoDiferenciaGoles){const o=Number(i.PartidoDiferenciaGoles);e.push("dif. ".concat(o>=7?"+7 o m\xe1s":o<=-6?"-6 o menos":"".concat(o>0?"+":"").concat(o)))}if(i.PartidoEspecial){const o={penales:"por penales"};e.push(o[i.PartidoEspecial]||i.PartidoEspecial)}return i.filtroWO&&e.push("WO"),i.filtroAnulado&&e.push("anulados"),i.filtroCambioResultado&&e.push("cambio de resultado"),"ultimos"===A?e.push(1===C?"\xb7 \xfaltimo":"\xb7 \xfaltimos ".concat(C)):"primeros"===A&&e.push(1===C?"\xb7 primero":"\xb7 primeros ".concat(C)),0===e.length?"Todos los partidos, oficiales o am
1istosos.":"Partidos "+e.join(", ")})(),to=oo.length>0||!!I.trim();return(0,J.jsxs)(J.Fragment,{children:[ee?(0,J.jsxs)("div",{style:{marginBottom:12},children:[(0,J.jsx)(n.A,{placeholder:"Equipo, estadio, a\xf1o, campeonato...",prefix:(0,J.jsx)(D.A,{style:{color:"#8c8c8c"}}),value:I,onChange:e=>null===j||void 0===j?void 0:j(e.target.value),allowClear:!0,size:"large",style:{width:"100%",fontSize:16,marginBottom:8,height:42}}),(0,J.jsxs)("div",{style:{display:"flex",justifyContent:"center",gap:8,marginBottom:to?6:0},children:[(0,J.jsxs)(d.Ay,{icon:(0,J.jsx)(q.A,{}),size:"large",onClick:()=>Q(!0),children:["Filtros",oo.length>0&&(0,J.jsx)(r.A,{color:"blue",style:{marginLeft:4},children:oo.length})]}),to&&(0,J.jsx)(d.Ay,{size:"large",icon:(0,J.jsx)(w.A,{}),onClick:ze,children:"Limpiar"})]}),to&&(0,J.jsx)("div",{style:{fontSize:13,color:"#595959",fontStyle:"italic",textAlign:"center"},children:io})]}):(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:16,flexWrap:"wrap"},children:[(0,J.jsx)(n.A,{placeholder:"Equipo, estadio, a\xf1o, campeonato...",prefix:(0,J.jsx)(D.A,{style:{color:"#8c8c8c"}}),value:I,onChange:e=>null===j||void 0===j?void 0:j(e.target.value),allowClear:!0,style:{width:260,flexShrink:0,height:42}}),(0,J.jsxs)(d.Ay,{icon:(0,J.jsx)(q.A,{}),onClick:()=>Q(!0),children:["Filtros",oo.length>0&&(0,J.jsx)(r.A,{color:"blue",style:{marginLeft:4},children:oo.length})]}),(0,J.jsx)("div",{style:{flex:1,minWidth:0,overflow:"hidden"},children:(0,J.jsx)("span",{style:{fontSize:13,color:"#595959",fontStyle:"italic",whiteSpace:"nowrap"},children:io})}),to&&(0,J.jsx)(d.Ay,{icon:(0,J.jsx)(w.A,{}),onClick:ze,style:{flexShrink:0},children:"Limpiar"})]}),(0,J.jsxs)(c.A,{title:(0,J.jsxs)("span",{children:[(0,J.jsx)(q.A,{style:{marginRight:8}}),"Filtros"]}),open:X,onCancel:()=>Q(!1),closeIcon:ee?ie||te||ae||le||se||de||ne?(0,J.jsx)(T.A,{style:{fontSize:18,color:"#1890ff"}}):(0,J.jsx)(F.A,{style:{fontSize:18}}):void 0,footer:ee?[(0,J.jsx)(d.Ay,{type:"primary",style:{height:42,width:"100%",fontWeight:700,color:"#fff"},onClick:()=>Q(!1),children:"Aplicar"},"apply")]:[(0,J.jsx)(d.Ay,{icon:(0,J.jsx)(q.A,{}),onClick:ze,children:"Limpiar"},"clear"),(0,J.jsx)(d.Ay,{type:"primary",onClick:()=>Q(!1),children:"Aplicar"},"apply")],width:ee?"100%":720,className:ee?"mobile-filters-modal":"",style:ee?{top:0,margin:0,maxWidth:"100%",paddingBottom:0}:{top:20},styles:{body:(0,t.A)({padding:ee?0:"12px"},ee?{}:{maxHeight:"75vh",overflowY:"auto"}),content:ee?{borderRadius:0,padding:"12px",minHeight:"100dvh"}:{}},children:[(0,J.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginBottom:12,padding:ee?"16px 12px 0":0},children:[(0,J.jsx)(d.Ay,{type:"primary",icon:ee?null:(0,J.jsx)(N.A,{}),onClick:()=>{const e=(0,t.A)({},i);delete e.PartidoAnioDesde,delete e.PartidoAnioHasta,delete e.PartidoFechaDesde,delete e.PartidoFechaHasta,e.PartidoDia=ke,e.PartidoMes=We,V("dia_mes"),l(e),Q(!1)},style:ee?{width:"calc(50% - 4px)",fontWeight:700,color:"#fff"}:{},children:"Un d\xeda como hoy"}),(0,J.jsx)(d.Ay,{type:"primary",icon:ee?null:(0,J.jsx)(k.A,{}),onClick:async()=>{Q(!1);try{var e;const o=await Y.services.equipos.getAll({EquipoNombre:"Pe\xf1arol",limit:5}),a=((null===o||void 0===o||null===(e=o.data)||void 0===e?void 0:e.data)||[]).find(e=>{var o;return null===(o=e.EquipoNombre)||void 0===o?void 0:o.toLowerCase().includes("pe\xf1arol")});if(a){const e=(0,t.A)({},i);delete e.EquipoPaisId,delete e.EquipoCiudadId,delete e.EquipoIdExcluir,De(null),xe(a.EquipoNombre),e.EquipoId=a.EquipoId,l(e)}}catch(o){}},style:ee?{width:"calc(50% - 4px)",fontWeight:700,color:"#fff"}:{},children:"Cl\xe1sicos"}),(0,J.jsx)(d.Ay,{type:"primary",icon:ee?null:(0,J.jsx)(W.A,{}),onClick:async()=>{Q(!1);try{var e;const o=await Y.services.estadios.getAll({EstadioNombre:"Parque Central",limit:5}),a=((null===o||void 0===o||null===(e=o.data)||void 0===e?void 0:e.data)||[]).find(e=>"Parque Central"===e.EstadioNombre&&1!==e.EstadioSoloCiudad);if(a){const e=(0,t.A)({},i);delete e.EstadioPaisId,delete e.EstadioCiudadId,delete e.EstadioIdExcluir,Te(null),Pe(a.EstadioNombre),e.EstadioId=a.EstadioId,l(e)}}catch(o){}},style:ee?{width:"calc(50% - 4px)",fontWeight:700,color:"#fff"}:{},children:"En el GPC"})]}),(0,J.jsx)(re,{sectionKey:"fecha",title:"Fecha",isActive:ie,activeLabel:(()=>
1{if(i.PartidoFechaDesde||i.PartidoFechaHasta){const e=e=>e?e.split("-").reverse().join("/"):"?";return i.PartidoFechaDesde&&i.PartidoFechaHasta?"".concat(e(i.PartidoFechaDesde)," \u2013 ").concat(e(i.PartidoFechaHasta)):i.PartidoFechaDesde?"Desde ".concat(e(i.PartidoFechaDesde)):"Hasta ".concat(e(i.PartidoFechaHasta))}if(i.PartidoAnio)return"A\xf1o ".concat(i.PartidoAnio);if(i.PartidoAnioDesde&&i.PartidoAnioDesde===i.PartidoAnioHasta&&1899!==i.PartidoAnioDesde)return"A\xf1o ".concat(i.PartidoAnioDesde);const e=[];if(i.PartidoAnioDesde&&1899!==i.PartidoAnioDesde&&e.push("Desde ".concat(i.PartidoAnioDesde)),i.PartidoAnioHasta&&i.PartidoAnioHasta!==oe&&e.push("Hasta ".concat(i.PartidoAnioHasta)),i.PartidoDia&&e.push("D\xeda ".concat(i.PartidoDia)),i.PartidoMes){const o=[,"Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"];e.push(o[i.PartidoMes]||"")}return e.join(" \xb7 ")||null})(),onClear:()=>{const e=(0,t.A)({},i);delete e.PartidoDia,delete e.PartidoMes,delete e.PartidoFechaDesde,delete e.PartidoFechaHasta,delete e.PartidoAnio,e.PartidoAnioDesde=1899,e.PartidoAnioHasta=oe,V("rango_anios"),l(e)},children:(0,J.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,J.jsx)(u.Ay.Group,{value:U,onChange:e=>{const o=e.target.value,a=(0,t.A)({},i);delete a.PartidoDia,delete a.PartidoMes,delete a.PartidoFechaDesde,delete a.PartidoFechaHasta,delete a.PartidoAnio,delete a.PartidoAnioDesde,delete a.PartidoAnioHasta,"anio"===o||("rango_anios"===o?(a.PartidoAnioDesde=1899,a.PartidoAnioHasta=Ne):"rango_fechas"===o&&(a.PartidoFechaDesde="1899-05-14",a.PartidoFechaHasta=R()().format("YYYY-MM-DD"))),V(o),l(a)},style:{display:"flex",flexDirection:"column"},children:[{value:"anio",label:"A\xf1o"},{value:"rango_anios",label:"Rango de a\xf1os"},{value:"rango_fechas",label:"Rango de fechas"},{value:"dia_mes",label:"D\xeda/mes espec\xedfico"}].map(e=>(0,J.jsx)(u.Ay,{value:e.value,style:{minHeight:ee?42:40,display:"flex",alignItems:"center"},children:e.label},e.value))}),"anio"===U&&(0,J.jsxs)("div",{style:{marginTop:9,marginBottom:10},children:[(0,J.jsx)("div",{style:{marginBottom:3,fontWeight:500,fontSize:12},children:"A\xf1o"}),(0,J.jsx)(p.A,{placeholder:"A\xf1o",value:i.PartidoAnio||void 0,onChange:e=>{const o=(0,t.A)({},i);e?o.PartidoAnio=e:delete o.PartidoAnio,l(o)},style:{width:"50%"},options:Ge,showSearch:!0,allowClear:!0})]}),"rango_anios"===U&&(0,J.jsxs)("div",{style:{display:"flex",gap:8,marginTop:9,marginBottom:10},children:[(0,J.jsxs)("div",{style:{width:"50%"},children:[(0,J.jsx)("div",{style:{marginBottom:3,fontWeight:500,fontSize:12},children:"A\xf1o Desde"}),(0,J.jsx)(p.A,{placeholder:"A\xf1o desde",value:i.PartidoAnioDesde||void 0,onChange:e=>l((0,t.A)((0,t.A)({},i),{},{PartidoAnioDesde:e})),style:{width:"100%"},options:Ge,showSearch:!0,allowClear:!0})]}),(0,J.jsxs)("div",{style:{width:"50%"},children:[(0,J.jsx)("div",{style:{marginBottom:3,fontWeight:500,fontSize:12},children:"A\xf1o Hasta"}),(0,J.jsx)(p.A,{placeholder:"A\xf1o hasta",value:i.PartidoAnioHasta||void 0,onChange:e=>l((0,t.A)((0,t.A)({},i),{},{PartidoAnioHasta:e})),style:{width:"100%"},options:Oe,showSearch:!0,allowClear:!0})]})]}),"rango_fechas"===U&&(0,J.jsxs)("div",{style:{display:"flex",gap:8,marginTop:9},children:[(0,J.jsxs)("div",{style:{width:"50%"},children:[(0,J.jsx)("div",{style:{marginBottom:3,fontWeight:500,fontSize:12},children:"Fecha Desde"}),(0,J.jsx)(h.A,{placeholder:"dd/mm/aaaa",value:i.PartidoFechaDesde?R()(i.PartidoFechaDesde):null,onChange:e=>{const o=(0,t.A)({},i);e?o.PartidoFechaDesde=e.format("YYYY-MM-DD"):delete o.PartidoFechaDesde,l(o)},format:"DD/MM/YYYY",style:{width:"100%"}})]}),(0,J.jsxs)("div",{style:{width:"50%"},children:[(0,J.jsx)("div",{style:{marginBottom:3,fontWeight:500,fontSize:12},children:"Fecha Hasta"}),(0,J.jsx)(h.A,{placeholder:"dd/mm/aaaa",value:i.PartidoFechaHasta?R()(i.PartidoFechaHasta):null,onChange:e=>{const o=(0,t.A)({},i);e?o.PartidoFechaHasta=e.format("YYYY-MM-DD"):delete o.PartidoFechaHasta,l(o)},format:"DD/MM/YYYY",style:{width:"100%"}})]})]}),"dia_mes"===U&&(0,J.jsxs)("div",{style:{display:"flex",alignItems:"flex-end",gap:8,marginTop:9},children:[(0,J.jsxs)("div",{style:{marginBottom:9},children:[(0,J.jsx)("div",{style:{marginBottom:3,fontWeight:500,fontSize:12},children:"D\xeda"}),(0,J.jsx)(p.A,{placeholder:"D\xeda",value:i.PartidoDia||null,onChange:e=>l((0,t.A)((0,t.A)({},i),{},{PartidoDia:e})),style:{minWidth:100},options:Me})]}),(0,J.jsxs)("div",{style:{marginBottom:9},children:[(0,J.jsx)("div",{style:{marginBottom:3,fontWeight:500,fontSize:12},children:"Mes"}),(0,J.jsx)(p.A,{placeholder:"Mes",value:i.PartidoMes||null,onChange:e=>l((0,t.A)((0,t.A)({},i),{},{PartidoMes:e})),style:{width:120},options:Be})]}),(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{marginBottom:3,fontWeight:500,fontSize:12},children:"\xa0"}),(0,J.jsx)(m.A,{content:Re,title:"mes"===M?"Seleccionar Mes":"Seleccionar D\xeda",trigger:"click",open:O,onOpenChange:e=>{B(e),e||(_("mes"),H(null))},children:(0,J.jsx)(d.Ay,{icon:(0,J.jsx)(N.A,{}),style:{minWidth:45}})})]})]})]})}),(0,J.jsx)(re,{sectionKey:"equipo",title:"Equipo",isActive:te,activeLabel:(()=>{const e=i.EquipoIdExcluir?"Exc. ":"";if(i.EquipoId)return ge?"".concat(e).concat(ge):null;if(i.EquipoPaisId){if("extranjeros"===i.EquipoPaisId)return"".concat(e,"Extranjeros");const o=ce.find(e=>e.PaisId===parseInt(i.EquipoPaisId));return o?"".concat(e).concat(o.PaisNombre):null}return null})(),onClear:()=>{const e=(0,t.A)({},i);delete e.EquipoId,delete e.EquipoPaisId,delete e.EquipoCiudadId,delete e.EquipoIdExcluir,De(null),l(e)},children:(0,J.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:ee?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("div",{children:(0,J.jsx)(K,{endpoint:"/equipos",valueField:"EquipoId",labelField:"EquipoNombre",searchParam:"EquipoNombre",value:i.EquipoId||void 0,onChange:e=>{const o=(0,t.A)({},i);delete o.EquipoPaisId,delete o.EquipoCiudadId,De(null),e?o.EquipoId=e:(delete o.EquipoId,o.EquipoPaisId||o.EquipoCiudadId||delete o.EquipoIdExcluir),l(o)},onLabelResolved:xe,style:{width:"100%"},placeholder:"Buscar equipo...",optionRender:e=>{var o;return(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[null!==(o=e.data)&&void 0!==o&&o.EquipoEscudoUrl?(0,J.jsx)("img",{src:e.data.EquipoEscudoUrl,alt:e.label,style:{width:20,height:20,objectFit:"contain"}}):(0,J.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"#e8e8e8",stroke:"#bbb",strokeWidth:"1.5",style:{flexShrink:0},children:(0,J.jsx)("path",{d:"M12 2L3 6v5c0 5.55 3.84 10.74 9 12 5.
116-1.26 9-6.45 9-12V6l-9-4z"})}),(0,J.jsx)("span",{children:e.label})]})}})}),(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Pa\xeds"}),(0,J.jsx)(p.A,{placeholder:"Pa\xeds",value:i.EquipoPaisId||void 0,onChange:e=>{const o=(0,t.A)({},i);delete o.EquipoId,delete o.EquipoCiudadId,De(null),e&&""!==e?o.EquipoPaisId=e:(delete o.EquipoPaisId,o.EquipoId||o.EquipoCiudadId||delete o.EquipoIdExcluir),l(o)},style:{width:"100%"},options:Le,showSearch:!0,allowClear:!0,filterOption:(e,o)=>{var i;return(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").toLowerCase().includes(e.toLowerCase())},optionRender:e=>{const o="number"===typeof e.value?ce.find(o=>o.PaisId===e.value):null;return(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[null!==o&&void 0!==o&&o.PaisBanderaUrl?(0,J.jsx)("img",{src:o.PaisBanderaUrl,alt:o.PaisNombre,style:{width:20,height:15,objectFit:"contain",flexShrink:0}}):(0,J.jsx)("div",{style:{width:20,height:15,flexShrink:0}}),(0,J.jsx)("span",{children:e.label})]})}})]}),(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Ciudad"}),(0,J.jsx)(p.A,{placeholder:"Ciudad",value:we||i.EquipoCiudadId||void 0,onChange:e=>{const o=(0,t.A)({},i);if(e&&String(e).startsWith("dept_")){const i=parseInt(e.split("_")[1]),t=Ae.filter(e=>e.DepartamentoId===i).map(e=>e.CiudadId);o.EquipoCiudadId=t.join(","),De(e)}else e&&""!==e?(o.EquipoCiudadId=e,De(null)):(delete o.EquipoCiudadId,De(null),o.EquipoId||o.EquipoPaisId||delete o.EquipoIdExcluir);l(o)},style:{width:"100%"},options:He(),showSearch:!0,allowClear:!0,disabled:!i.EquipoPaisId||""===i.EquipoPaisId||"extranjeros"===i.EquipoPaisId,filterOption:(e,o)=>{var i;return!!o.options||(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").toLowerCase().includes(e.toLowerCase())}})]}),(0,J.jsxs)("div",{onClick:()=>{const e=(0,t.A)({},i);e.EquipoIdExcluir?delete e.EquipoIdExcluir:e.EquipoIdExcluir=!0,l(e)},style:{display:"flex",alignItems:"center",gap:8,height:42,padding:"0 11px",marginTop:12,borderRadius:6,cursor:"pointer",background:i.EquipoIdExcluir?"#e6f4ff":"#fff",userSelect:"none"},children:[(0,J.jsx)(f.A,{checked:!!i.EquipoIdExcluir,onChange:()=>{},onClick:e=>e.stopPropagation()}),(0,J.jsx)("span",{style:{fontSize:14,color:i.EquipoIdExcluir?"#1677ff":"#262626"},children:"Excluir selecci\xf3n"})]})]}):(0,J.jsxs)(g.A,{gutter:[8,8],align:"bottom",style:{flexWrap:"wrap"},children:[(0,J.jsxs)(x.A,{children:[(0,J.jsxs)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:[(0,J.jsx)(z.A,{style:{marginRight:4}}),"Equipo"]}),(0,J.jsx)(K,{endpoint:"/equipos",valueField:"EquipoId",labelField:"EquipoNombre",searchParam:"EquipoNombre",value:i.EquipoId||void 0,onChange:e=>{const o=(0,t.A)({},i);delete o.EquipoPaisId,delete o.EquipoCiudadId,De(null),e?o.EquipoId=e:(delete o.EquipoId,o.EquipoPaisId||o.EquipoCiudadId||delete o.EquipoIdExcluir),l(o)},onLabelResolved:xe,style:{width:220},placeholder:"Buscar equipo...",optionRender:e=>{var o;return(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[null!==(o=e.data)&&void 0!==o&&o.EquipoEscudoUrl?(0,J.jsx)("img",{src:e.data.EquipoEscudoUrl,alt:e.label,style:{width:20,height:20,objectFit:"contain"}}):(0,J.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"#e8e8e8",stroke:"#bbb",strokeWidth:"1.5",style:{flexShrink:0},children:(0,J.jsx)("path",{d:"M12 2L3 6v5c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V6l-9-4z"})}),(0,J.jsx)("span",{children:e.label})]})}})]}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Pa\xeds equipo"}),(0,J.jsx)(p.A,{placeholder:"Pa\xeds",value:i.EquipoPaisId||void 0,onChange:e=>{const o=(0,t.A)({},i);delete o.EquipoId,delete o.EquipoCiudadId,De(null),e&&""!==e?o.EquipoPaisId=e:(delete o.EquipoPaisId,o.EquipoId||o.EquipoCiudadId||delete o.EquipoIdExcluir),l(o)},style:{width:160},options:Le,showSearch:!0,allowClear:!0,filterOption:(e,o)=>{var i;return(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").toLowerCase().includes(e.toLowerCase())},optionRender:e=>{const o="number"===typeof e.value?ce.find(o=>o.PaisId===e.value):null;return(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[null!==o&&void 0!==o&&o.PaisBanderaUrl?(0,J.jsx)("img",{src:o.PaisBanderaUrl,alt:o.PaisNombre,style:{width:20,height:15,objectFit:"contain",flexShrink:0}}):(0,J.jsx)("div",{style:{width:20,height:15,flexShrink:0}}),(0,J.jsx)("span",{children:e.label})]})}})]}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Ciudad equipo"}),(0,J.jsx)(p.A,{placeholder:"Ciudad",value:we||i.EquipoCiudadId||void 0,onChange:e=>{const o=(0,t.A)({},i);if(e&&String(e).startsWith("dept_")){const i=parseInt(e.split("_")[1]),t=Ae.filter(e=>e.DepartamentoId===i).map(e=>e.CiudadId);o.EquipoCiudadId=t.join(","),De(e)}else e&&""!==e?(o.EquipoCiudadId=e,De(null)):(delete o.EquipoCiudadId,De(null),o.EquipoId||o.EquipoPaisId||delete o.EquipoIdExcluir);l(o)},style:{width:175},options:He(),showSearch:!0,allowClear:!0,disabled:!i.EquipoPaisId||""===i.EquipoPaisId||"extranjeros"===i.EquipoPaisId,filterOption:(e,o)=>{var i;return!!o.options||(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").toLowerCase().includes(e.toLowerCase())}})]}),(0,J.jsx)(x.A,{style:{display:"flex",alignItems:"flex-end",paddingBottom:6},children:(0,J.jsx)(v.A,{title:"Excluir lo seleccionado (aplica a Nombre, Pa\xeds y Ciudad)",children:(0,J.jsx)(f.A,{checked:!!i.EquipoIdExcluir,disabled:!i.EquipoId&&!i.EquipoPaisId&&!i.EquipoCiudadId,onChange:e=>{const o=(0,t.A)({},i);e.target.checked?o.EquipoIdExcluir=!0:delete o.EquipoIdExcluir,l(o)},children:"Exc."})})})]})})}),(0,J.jsx)(re,{sectionKey:"estadio",title:"Estadio",isActive:ae,activeLabel:(()=>{const e=i.EstadioIdExcluir?"Exc. ":"";if(i.EstadioId)return ve?"".concat(e).concat(ve):null;if(i.EstadioPaisId){if("extranjeros"===i.EstadioPaisId)return"".concat(e,"Extranjeros");const o=ce.find(e=>e.PaisId===parseInt(i.EstadioPaisId));return o?"".concat(e).concat(o.PaisNombre):null}return null})(),onClear:()=>{const e=(0,t.A)({},i);delete e.EstadioId,delete e.EstadioPaisId,delete e.EstadioCiudadId,delete e.EstadioIdExcluir,Te(null),l(e)},children:(0,J.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:ee?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("div",{children:(0,J.jsx)(K,{endpoint:"/estadios",valueField:"EstadioId",labelField:"EstadioNombre",searchParam:"EstadioNombre",value:i.EstadioId||void 0,onChange:e=>{const o=(0,t.A)({},i);delete o.EstadioPaisId,delete o.EstadioCiudadId,Te(null),e?o.EstadioId=e:(delete o.EstadioId,o.EstadioPaisId||o.EstadioCiudadId||delete o.EstadioIdExcluir),l(o)},onLabelResolved:Pe,style:{width:"100%"},placeholder:"Buscar estadio..."})}),(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Pa\xeds"}),(0,J.jsx)(p.A,{placeholder:"Pa\xeds",value:i.EstadioPaisId||void 0,onChange:e=>{const o=(0,t.A)({},i);delete o.EstadioId,delete o.EstadioCiudadId,Te(null),e&&""!==e?o.EstadioPaisId=e:(delete o.EstadioPaisId,o.EstadioId||o.EstadioCiudadId||delete o.EstadioIdExcluir),l(o)},style:{width:"100%"},options:Le,showSearch:!0,allowClear:!0,filterOption:(e,o)=>{var i;return(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").toLowerCase().includes(e.toLowerCase())},optionRender:e=>{const o="number"===typeof e.value?ce.find(o=>o.PaisId===e.value):null;return(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[null!==o&&void 0!==o&&o.PaisBanderaUrl?(0,J.jsx)("img",{src:o.PaisBanderaUrl,alt:o.PaisNombre,style:{width:20,height:15,objectFit:"contain",flexShrink:0}}):(0,J.jsx)("div",{style:{width:20,height:15,flexShrink:0}}),(0,J.jsx)("span",{children:e.label})]})}})]}),(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Ciudad"}),(0,J.jsx)(p.A,{placeholder:"Ciudad",value:qe||i.EstadioCiudadId||void 0,onChange:e=>{const o=(0,t.A)({},i);if(e&&String(e).startsWith("dept_")){const i=parseInt(e.split("_")[1]),t=Ce.filter(e=>e.DepartamentoId===i).map(e=>e.CiudadId);o.EstadioCiudadId=t.join(","),Te(e)}else e&&""!==e?(o.EstadioCiudadId=e,Te(null)):(delete o.EstadioCiudadId,Te(null),o.EstadioId||o.EstadioPaisId||delete o.EstadioIdExcluir);l(o)},style:{width:"100%"},options:Ue(),showSearch:!0,allowClear:!0,disabled:!i.EstadioPaisId||""===i.EstadioPaisId||"extranjeros"===i.EstadioPaisId,filterOption:(e,o)=>{var i;return!!o.options||(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").toLowerCase().includes(e.toLowerCase())}})]}),(0,J.jsxs)("div",{onClick:()=>{const e=(0,t.A)({},i);e.EstadioIdExcluir?delete e.EstadioIdExcluir:e.EstadioIdExcluir=!0,l(e)},style:{display:"flex",alignItems:"center",gap:8,height:42,padding:"0 11px",marginTop:12,borderRadius:6,cursor:"pointer",background:i.EstadioIdExcluir?"#e6f4ff":"#fff",userSelect:"none"},children:[(0,J.jsx)(f.A,{checked:!!i.EstadioIdExcluir,onChange:()=>{},onClick:e=>e.stopPropagation()}),(0,J.jsx)("span",{style:{fontSize:14,color:i.EstadioIdExcluir?"#1677ff":"#262626"},children:"Excluir selecci\xf3n"})]})]}):(0,J.jsxs)(g.A,{gutter:[8,8],align:"bottom",style:{flexWrap:"wrap"},children:[(0,J.jsxs)(x.A,{children:[(0,J.jsxs)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:[(0,J.jsx)(W.A,{style:{marginRight:4}}),"Estadio"]}),(0,J.jsx)(K,{endpoint:"/estadios",valueField:"EstadioId",labelField:"EstadioNombre",searchParam:"EstadioNombre",value:i.EstadioId||void 0,onChange:e=>{const o=(0,t.A)({},i);delete o.EstadioPaisId,delete o.EstadioCiudadId,Te(null),e?o.EstadioId=e:(delete o.EstadioId,o.EstadioPaisId||o.EstadioCiudadId||delete o.EstadioIdExcluir),l(o)},onLabelResolved:Pe,style:{width:220},placeholder:"Buscar estadio..."})]}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Pa\xeds estadio"}),(0,J.jsx)(p.A,{placeholder:"Pa\xeds",value:i.EstadioPaisId||void 0,onChange:e=>{const o=(0,t.A)({},i);delete o.EstadioId,delete o.EstadioCiudadId,Te(null),e&&""!==e?o.EstadioPaisId=e:(delete o.EstadioPaisId,o.EstadioId||o.EstadioCiudadId||delete o.EstadioIdExcluir),l(o)},style:{width:160},options:Le,showSearch:!0,allowClear:!0,filterOption:(e,o)=>{var i;return(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").toLowerCase().includes(e.toLowerCase())},optionRender:e=>{const o="number"===typeof e.value?ce.find(o=>o.PaisId===e.value):null;return(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[null!==o&&void 0!==o&&o.PaisBanderaUrl?(0,J.jsx)("img",{src:o.PaisBanderaUrl,alt:o.PaisNombre,style:{width:20,height:15,objectFit:"contain",flexShrink:0}}):(0,J.jsx)("div",{style:{width:20,height:15,flexShrink:0}}),(0,J.jsx)("span",{children:e.label})]})}})]}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Ciudad estadio"}),(0,J.jsx)(p.A,{placeholder:"Ciudad",value:qe||i.EstadioCiudadId||void 0,onChange:e=>{const o=(0,t.A)({},i);if(e&&String(e).startsWith("dept_")){const i=parseInt(e.split("_")[1]),t=Ce.filter(e=>e.DepartamentoId===i).map(e=>e.CiudadId);o.EstadioCiudadId=t.join(","),Te(e)}else e&&""!==e?(o.EstadioCiudadId=e,Te(null)):(delete o.EstadioCiudadId,Te(null),o.EstadioId||o.EstadioPaisId||delete o.EstadioIdExcluir);l(o)},style:{width:175},options:Ue(),showSearch:!0,allowClear:!0,disabled:!i.EstadioPaisId||""===i.EstadioPaisId||"extranjeros"===i.EstadioPaisId,filterOption:(e,o)=>{var i;return!!o.options||(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").toLowerCase().includes(e.toLowerCase())}})]}),(0,J.jsx)(x.A,{style:{display:"flex",alignItems:"flex-end",paddingBottom:6},children:(0,J.jsx)(v.A,{title:"Excluir lo seleccionado (aplica a Nombre, Pa\xeds y Ciudad)",children:(0,J.jsx)(f.A,{checked:!!i.EstadioIdExcluir,disabled:!i.EstadioId&&!i.EstadioPaisId&&!i.EstadioCiudadId,onChange:e=>{const o=(0,t.A)({},i);e.target.checked?o.EstadioIdExcluir=!0:delete o.EstadioIdExcluir,l(o)},children:"Exc."})})})]})})}),(0,J.jsx)(re,{sectionKey:"campeonato",title:"Campeonato",isActive:le,activeLabel:(()=>{const e=[];
1if(i.CampeonatoInternacional)e.push("Internacionales");else if(i.CampeonatoLocal)e.push("Locales");else if(i.CampeonatoUruguayo)e.push("Camp. Uruguayo");else if(i.CampeonatoAmistoso)e.push("Amistosos");else if(i.NombreCampeonatoId){const o=pe.find(e=>e.NombreCampeonatoId===i.NombreCampeonatoId);o&&e.push(o.NombreCampeonato)}if(i.MotivoId){const o=me.find(e=>e.MotivoId===i.MotivoId);o&&e.push(o.MotivoDescripcion)}if(i.PartidoCondicion){const o={L:"Local",V:"Visitante",N:"Neutral",X:"N/A"};e.push(o[i.PartidoCondicion])}if(i.PartidoTipo&&"O,A"!==i.PartidoTipo){const o={O:"Oficial",A:"Amistoso",E:"Entren."};e.push(i.PartidoTipo.split(",").map(e=>o[e]||e).join("+"))}return e.join(" \xb7 ")||null})(),onClear:()=>{const e=(0,t.A)({},i);delete e.NombreCampeonatoId,delete e.CampeonatoInternacional,delete e.CampeonatoLocal,delete e.CampeonatoUruguayo,delete e.CampeonatoAmistoso,delete e.MotivoId,delete e.PartidoCondicion,e.PartidoTipo="O,A",l(e)},children:(0,J.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:ee?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("div",{children:(0,J.jsx)(p.A,{placeholder:"Todos",value:Ye||void 0,onChange:Ve,style:{width:"100%"},options:Je,showSearch:!0,allowClear:!0,filterOption:(e,o)=>{var i;const t=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();return t(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").includes(t(e))}})}),(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Motivo"}),(0,J.jsx)(p.A,{placeholder:"Todos",value:i.MotivoId||void 0,onChange:e=>{const o=(0,t.A)({},i);e&&""!==e?o.MotivoId=e:delete o.MotivoId,l(o)},style:{width:"100%"},options:Xe,showSearch:!0,allowClear:!0,filterOption:(e,o)=>{var i;const t=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();return t(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").includes(t(e))}})]}),(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Condici\xf3n"}),(0,J.jsx)(p.A,{placeholder:"Todas",value:i.PartidoCondicion||void 0,onChange:e=>{const o=(0,t.A)({},i);e&&""!==e?o.PartidoCondicion=e:delete o.PartidoCondicion,l(o)},style:{width:"100%"},options:Qe,allowClear:!0})]}),(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Tipo"}),Ke.map(e=>{const o=(i.PartidoTipo?i.PartidoTipo.split(","):[]).includes(e.value);return(0,J.jsxs)("div",{onClick:()=>{const a=i.PartidoTipo?i.PartidoTipo.split(","):[],s=o?a.filter(o=>o!==e.value):[...a,e.value],d=(0,t.A)({},i);s.length>0?d.PartidoTipo=s.join(","):delete d.PartidoTipo,l(d)},style:{display:"flex",alignItems:"center",gap:8,height:42,padding:"0 11px",marginBottom:6,borderRadius:6,cursor:"pointer",background:o?"#e6f4ff":"#fff",userSelect:"none"},children:[(0,J.jsx)(f.A,{checked:o,onChange:()=>{},onClick:e=>e.stopPropagation()}),(0,J.jsx)("span",{style:{fontSize:14,color:o?"#1677ff":"#262626"},children:e.label})]},e.value)})]})]}):(0,J.jsxs)(g.A,{gutter:[8,8],align:"bottom",style:{flexWrap:"wrap"},children:[(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Campeonato"}),(0,J.jsx)(p.A,{placeholder:"Todos",value:Ye||void 0,onChange:Ve,style:{width:280},options:Je,showSearch:!0,allowClear:!0,filterOption:(e,o)=>{var i;const t=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();return t(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").includes(t(e))}})]}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Motivo"}),(0,J.jsx)(p.A,{placeholder:"Todos",value:i.MotivoId||void 0,onChange:e=>{const o=(0,t.A)({},i);e&&""!==e?o.MotivoId=e:delete o.MotivoId,l(o)},style:{width:220},options:Xe,showSearch:!0,allowClear:!0,filterOption:(e,o)=>{var i;const t=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();return t(null!==(i=null===o||void 0===o?void 0:o.label)&&void 0!==i?i:"").includes(t(e))}})]}),(0,J.jsx)(x.A,{children:(0,J.jsx)("div",{style:{width:1,height:32,background:"#d9d9d9",margin:"0 8px"}})}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Condici\xf3n"}),(0,J.jsx)(p.A,{placeholder:"Todas",value:i.PartidoCondicion||void 0,onChange:e=>{const o=(0,t.A)({},i);e&&""!==e?o.PartidoCondicion=e:delete o.PartidoCondicion,l(o)},style:{width:140},options:Qe,allowClear:!0})]}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Tipo"}),(0,J.jsx)(f.A.Group,{options:Ke,value:i.PartidoTipo?i.PartidoTipo.split(","):[],onChange:e=>{const o=(0,t.A)({},i);e.length>0?o.PartidoTipo=e.join(","):delete o.PartidoTipo,l(o)}})]})]})})}),(0,J.jsx)(re,{sectionKey:"resultado",title:"Resultado",isActive:se,activeLabel:(()=>{const e=[];
1if(i.PartidoResultado){const o={ganado:"Ganado",empatado:"Empatado",perdido:"Perdido"};e.push(o[i.PartidoResultado])}if(void 0!==i.PartidoGolesFavor&&e.push("GF:".concat(i.PartidoGolesFavor)),void 0!==i.PartidoGolesContra&&e.push("GC:".concat(i.PartidoGolesContra)),void 0!==i.PartidoDiferenciaGoles){const o=Number(i.PartidoDiferenciaGoles);e.push("Dif:".concat(o>=7?"+7":o<=-6?"-6":o>0?"+"+o:o))}if(i.PartidoEspecial){const o={penales:"Penales"};e.push(o[i.PartidoEspecial])}return i.filtroWO&&e.push("WO"),i.filtroAnulado&&e.push("Anulados"),i.filtroCambioResultado&&e.push("Cambio resultado"),"ultimos"===A?e.push(1===C?"\xdaltimo":"\xdalt. ".concat(C)):"primeros"===A&&e.push(1===C?"Primero":"Prim. ".concat(C)),e.join(" \xb7 ")||null})(),onClear:()=>{const e=(0,t.A)({},i);delete e.PartidoResultado,delete e.PartidoGolesFavor,delete e.PartidoGolesContra,delete e.PartidoDiferenciaGoles,delete e.PartidoEspecial,ee||(delete e.filtroWO,delete e.filtroAnulado,delete e.filtroCambioResultado),y("todos"),E(10),l(e)},children:(0,J.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:ee?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("div",{children:(0,J.jsx)(p.A,{placeholder:"Todos",value:i.PartidoResultado||void 0,onChange:e=>{const o=(0,t.A)({},i);e&&""!==e?o.PartidoResultado=e:delete o.PartidoResultado,l(o)},style:{width:"100%"},options:Ze,allowClear:!0})}),(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Goles a Favor"}),(0,J.jsx)(p.A,{placeholder:"Todos",value:void 0!==i.PartidoGolesFavor?i.PartidoGolesFavor:void 0,onChange:e=>{const o=(0,t.A)({},i);""!==e&&void 0!==e&&null!==e?o.PartidoGolesFavor=e:delete o.PartidoGolesFavor,l(o)},style:{width:"100%"},options:$e,allowClear:!0})]}),(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Goles en Contra"}),(0,J.jsx)(p.A,{placeholder:"Todos",value:void 0!==i.PartidoGolesContra?i.PartidoGolesContra:void 0,onChange:e=>{const o=(0,t.A)({},i);""!==e&&void 0!==e&&null!==e?o.PartidoGolesContra=e:delete o.PartidoGolesContra,l(o)},style:{width:"100%"},options:$e,allowClear:!0})]}),(0,J.jsxs)("div",{style:{marginBottom:12},children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Diferencia de Goles"}),(0,J.jsx)(p.A,{placeholder:"Todas",value:void 0!==i.PartidoDiferenciaGoles?i.PartidoDiferenciaGoles:void 0,onChange:e=>{const o=(0,t.A)({},i);""!==e&&void 0!==e&&null!==e?o.PartidoDiferenciaGoles=e:delete o.PartidoDiferenciaGoles,l(o)},style:{width:"100%"},options:eo,allowClear:!0})]})]}):(0,J.jsxs)(g.A,{gutter:[8,8],align:"bottom",style:{flexWrap:"wrap"},children:[(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Resultado"}),(0,J.jsx)(p.A,{placeholder:"Todos",value:i.PartidoResultado||void 0,onChange:e=>{const o=(0,t.A)({},i);e&&""!==e?o.PartidoResultado=e:delete o.PartidoResultado,l(o)},style:{width:130},options:Ze,allowClear:!0})]}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Goles a Favor"}),(0,J.jsx)(p.A,{placeholder:"Todos",value:void 0!==i.PartidoGolesFavor?i.PartidoGolesFavor:void 0,onChange:e=>{const o=(0,t.A)({},i);""!==e&&void 0!==e&&null!==e?o.PartidoGolesFavor=e:delete o.PartidoGolesFavor,l(o)},style:{width:110},options:$e,allowClear:!0})]}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Goles en Contra"}),(0,J.jsx)(p.A,{placeholder:"Todos",value:void 0!==i.PartidoGolesContra?i.PartidoGolesContra:void 0,onChange:e=>{const o=(0,t.A)({},i);""!==e&&void 0!==e&&null!==e?o.PartidoGolesContra=e:delete o.PartidoGolesContra,l(o)},style:{width:130},options:$e,allowClear:!0})]}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Diferencia de Goles"}),(0,J.jsx)(p.A,{placeholder:"Todas",value:void 0!==i.PartidoDiferenciaGoles?i.PartidoDiferenciaGoles:void 0,onChange:e=>{const o=(0,t.A)({},i);""!==e&&void 0!==e&&null!==e?o.PartidoDiferenciaGoles=e:delete o.PartidoDiferenciaGoles,l(o)},style:{width:140},options:eo,allowClear:!0})]}),(0,J.jsx)(x.A,{children:(0,J.jsx)("div",{style:{width:1,height:32,background:"#d9d9d9",margin:"0 8px"}})}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Especial"}),(0,J.jsx)(p.A,{placeholder:"Todos",value:i.PartidoEspecial||void 0,onChange:e=>{const o=(0,t.A)({},i);e&&""!==e?o.PartidoEspecial=e:delete o.PartidoEspecial,l(o)},style:{width:180},options:[{value:"",label:"Todos"},{value:"penales",label:"Definidos por Penales"}],allowClear:!0})]}),(0,J.jsxs)(x.A,{style:{display:"flex",flexDirection:"column",gap:4,justifyContent:"flex-end",paddingBottom:2},children:[(0,J.jsx)(f.A,{checked:!!i.filtroWO,onChange:e=>{const o=(0,t.A)({},i);e.target.checked?o.filtroWO=!0:delete o.filtroWO,l(o)},children:"WO"}),(0,J.jsx)(f.A,{checked:!!i.filtroAnulado,onChange:e=>{const o=(0,t.A)({},i);e.target.checked?o.filtroAnulado=!0:delete o.filtroAnulado,l(o)},children:"Anulados"}),(0,J.jsx)(f.A,{checked:!!i.filtroCambioResultado,onChange:e=>{const o=(0,t.A)({},i);e.target.checked?o.filtroCambioResultado=!0:delete o.filtroCambioResultado,l(o)},children:"Cambi\xf3 resultado"})]}),(0,J.jsx)(x.A,{children:(0,J.jsx)("div",{style:{width:1,height:32,background:"#d9d9d9",margin:"0 8px"}})}),(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"Cantidad"}),(0,J.jsx)(p.A,{value:"todos"===A?"todos":"ultimos"===A?1===C?"ultimos_1":10===C?"ultimos_10":"ultimos_custom"
1:"primeros"===A?1===C?"primeros_1":10===C?"primeros_10":"primeros_custom":"todos",onChange:e=>{"todos"===e?y("todos"):"ultimos_1"===e?(y("ultimos"),E(1)):"ultimos_10"===e?(y("ultimos"),E(10)):"ultimos_custom"===e?(y("ultimos"),E(50)):"primeros_1"===e?(y("primeros"),E(1)):"primeros_10"===e?(y("primeros"),E(10)):"primeros_custom"===e&&(y("primeros"),E(50))},style:{width:160},options:[{value:"todos",label:"Todos"},{value:"ultimos_1",label:"\xdaltimo partido"},{value:"ultimos_10",label:"\xdaltimos 10"},{value:"ultimos_custom",label:"\xdaltimos (custom)"},{value:"primeros_1",label:"Primer partido"},{value:"primeros_10",label:"Primeros 10"},{value:"primeros_custom",label:"Primeros (custom)"}]})]}),"todos"!==A&&1!==C&&10!==C&&(0,J.jsxs)(x.A,{children:[(0,J.jsx)("div",{style:{marginTop:9,marginBottom:3,fontWeight:500,fontSize:12},children:"N\xb0"}),(0,J.jsx)(P.A,{min:1,max:1e3,value:C,onChange:e=>E(e||50),style:{width:80}})]})]})})}),ee&&(0,J.jsx)(re,{sectionKey:"partido",title:"Partido",isActive:de,activeLabel:null,onClear:()=>{const e=(0,t.A)({},i);delete e.filtroDefinidoPenales,delete e.filtroWO,delete e.filtroAnulado,delete e.filtroCambioResultado,l(e)},children:(0,J.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[{key:"filtroDefinidoPenales",label:"Definidos por penales"},{key:"filtroWO",label:"WO"},{key:"filtroAnulado",label:"Anulados"},{key:"filtroCambioResultado",label:"Cambio resultado"}].map(e=>{const o=!!i[e.key];return(0,J.jsxs)("div",{onClick:()=>{const a=(0,t.A)({},i);o?delete a[e.key]:a[e.key]=!0,l(a)},style:{display:"flex",alignItems:"center",gap:8,height:42,padding:"0 11px",marginBottom:6,borderRadius:6,cursor:"pointer",background:o?"#e6f4ff":"#fff",userSelect:"none"},children:[(0,J.jsx)(f.A,{checked:o,onChange:()=>{},onClick:e=>e.stopPropagation()}),(0,J.jsx)("span",{style:{fontSize:14,color:o?"#1677ff":"#262626"},children:e.label})]},e.key)})})}),G&&!ee&&(0,J.jsx)(re,{sectionKey:"admin",title:"Administraci\xf3n",isActive:ne,activeLabel:ne?"excluir_sin"===i.atilioIdFiltro?"Sin AtilioId excluidos":"Solo sin AtilioId":null,onClear:()=>{const e=(0,t.A)({},i);delete e.atilioIdFiltro,l(e)},children:(0,J.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[(0,J.jsx)(f.A,{checked:"excluir_sin"===i.atilioIdFiltro,onChange:e=>{const o=(0,t.A)({},i);e.target.checked?o.atilioIdFiltro="excluir_sin":delete o.atilioIdFiltro,l(o)},children:"No agregar partidos sin AtilioId"}),(0,J.jsx)(f.A,{checked:"solo_sin"===i.atilioIdFiltro,onChange:e=>{const o=(0,t.A)({},i);e.target.checked?o.atilioIdFiltro="solo_sin":delete o.atilioIdFiltro,l(o)},children:"Solo incluir partidos sin AtilioId"})]})})]})]})},ee="partidos_list_filters",oe="partidos_list_page",ie="partidos_list_pageSize",te="partidos_list_total",ae="partidos_list_cantidadTipo",le="partidos_list_cantidadN",se="partidos_list_data",de="partidos_list_resumen",ne={PartidoAnioDesde:"ad",PartidoAnioHasta:"ah",PartidoAnio:"an",PartidoMes:"me",PartidoDia:"di",PartidoFechaDesde:"fd",PartidoFechaHasta:"fh",EquipoId:"eq",EquipoPaisId:"ep",EquipoCiudadId:"ec",EstadioId:"ei",EstadioPaisId:"sp",EstadioCiudadId:"sc",NombreCampeonatoId:"nc",CampeonatoInternacional:"ci",CampeonatoLocal:"cl",CampeonatoUruguayo:"cu",CampeonatoAmistoso:"ca",MotivoId:"mo",PartidoCondicion:"co",PartidoTipo:"pt",PartidoResultado:"re",PartidoGolesFavor:"gf",PartidoGolesContra:"gc",PartidoDiferenciaGoles:"dg",PartidoEspecial:"pe",filtroWO:"wo",filtroAnulado:"fa",filtroCambioResultado:"fr",filtroDefinidoPenales:"fp",atilioIdFiltro:"ai"},re=Object.fromEntries(Object.entries(ne).map(e=>{let[o,i]=e;return[i,o]})),ce=new Set(["PartidoAnioDesde","PartidoAnioHasta","PartidoAnio","PartidoMes","PartidoDia","EquipoId","EquipoCiudadId","EstadioId","EstadioCiudadId","NombreCampeonatoId","MotivoId","PartidoGolesFavor","PartidoGolesContra","PartidoDiferenciaGoles","atilioIdFiltro"]),ue=new Set(["CampeonatoInternacional","CampeonatoLocal","CampeonatoUruguayo","CampeonatoAmistoso"]),pe=new Set(["filtroWO","filtroAnulado","filtroCambioResultado","filtroDefinidoPenales"]),{useBreakpoint:he}=s.Ay,me=()=>{const e=(new Date).getFullYear(),o=(0,_.Zp)(),[i,l]=(0,L.ok)(),s=(0,_.wQ)(),n=!he().md,{canEdit:u}=(0,X.A)(),p="POP"!==s&&[...i.keys()].some(e=>re[e]||"ct"===e||"bt"===e),[h,m]=(0,a.useState)(()=>
1{if(p)return[];try{const e=sessionStorage.getItem(se);return e?JSON.parse(e):[]}catch(e){return[]}}),[f,g]=(0,a.useState)(!1);let x=!1;if(!p)try{x=!!sessionStorage.getItem(se)}catch(Ne){}const P=(0,a.useRef)(x),[b,S]=(0,a.useState)(()=>{const e=i.get("pg"),o=i.get("ps");if(e||o)return{current:e?parseInt(e):1,pageSize:o?parseInt(o):50,total:0};try{const e=sessionStorage.getItem(oe),o=sessionStorage.getItem(ie),i=sessionStorage.getItem(te);return{current:e?parseInt(e):1,pageSize:o?parseInt(o):50,total:i?parseInt(i):0}}catch(t){return{current:1,pageSize:50,total:0}}}),[w,D]=(0,a.useState)(()=>{if(p)return((e,o)=>{const i={PartidoAnioDesde:1899,PartidoAnioHasta:o,PartidoTipo:"O,A"};for(const[t,a]of e.entries()){const e=re[t];if(e)if(ce.has(e)){const o=parseInt(a);isNaN(o)||(i[e]=o)}else if(ue.has(e))i[e]=1;else if(pe.has(e))i[e]=!0;else if("EquipoPaisId"===e||"EstadioPaisId"===e){const o=parseInt(a);i[e]=isNaN(o)?a:o}else i[e]=a}return i})(i,e);try{const o=sessionStorage.getItem(ee);return o?JSON.parse(o):{PartidoAnioDesde:1899,PartidoAnioHasta:e,PartidoTipo:"O,A"}}catch(o){return{PartidoAnioDesde:1899,PartidoAnioHasta:e,PartidoTipo:"O,A"}}}),[q,T]=(0,a.useState)(()=>{if(p)return{pj:0,pg:0,pe:0,pp:0,gf:0,gc:0,gpen:0,ppen:0};try{const e=sessionStorage.getItem(de);return e?JSON.parse(e):{pj:0,pg:0,pe:0,pp:0,gf:0,gc:0,gpen:0,ppen:0}}catch(e){return{pj:0,pg:0,pe:0,pp:0,gf:0,gc:0,gpen:0,ppen:0}}}),[F,N]=(0,a.useState)(()=>{const e=i.get("bt");if(null!==e)return e;try{return sessionStorage.getItem("partidos_list_busquedaTexto")||""}catch(o){return""}}),[k,W]=(0,a.useState)(F),[z,M]=(0,a.useState)(()=>{const e=i.get("ct");if(e)return e;try{return sessionStorage.getItem(ae)||"todos"}catch(o){return"todos"}}),[R,H]=(0,a.useState)(()=>{const e=i.get("cn");if(e)return parseInt(e);try{const e=sessionStorage.getItem(le);return e?parseInt(e):10}catch(o){return 10}}),[U,V]=(0,a.useState)({visible:!1,x:0,y:0,photoUrl:null,fallback:null}),K=(0,a.useRef)({}),Q=(0,a.useRef)(null),me=(0,a.useRef)(null),fe=(0,a.useRef)(null),ge=(0,a.useRef)({x:0,y:0}),xe=(e,o)=>{clearTimeout(Q.current),clearTimeout(me.current),ge.current={x:o.clientX,y:o.clientY},Q.current=setTimeout(()=>(async e=>{const o=e.PartidoId;fe.current=o;let i=K.current[o];if(void 0===i){try{i=(await Y.Ay.get("/partidos/".concat(o,"/fotos"))).data}catch(l){i=null}K.current[o]=i}if(fe.current!==o)return;if(!i||!i.fotoPrincipal&&!i.fotoSecundaria)return;let t=ge.current.x+14;t+360>window.innerWidth-8&&(t=ge.current.x-360-14);let a=ge.current.y-Math.round(128);a=Math.max(8,Math.min(a,window.innerHeight-256-8)),V({visible:!0,x:t,y:a,photoUrl:i.fotoPrincipal||i.fotoSecundaria,fallback:i.fotoPrincipal?i.fotoSecundaria:null})})(e),280)},ve=()=>{clearTimeout(Q.current),me.current=setTimeout(()=>{fe.current=null,V(e=>(0,t.A)((0,t.A)({},e),{},{visible:!1}))},120)};(0,a.useEffect)(()=>{try{sessionStorage.setItem(ee,JSON.stringify(w))}catch(e){}},[w]),(0,a.useEffect)(()=>{try{sessionStorage.setItem("partidos_list_busquedaTexto",F)}catch(o){}const e=setTimeout(()=>W(F),600);return()=>clearTimeout(e)},[F]),(0,a.useEffect)(()=>{try{sessionStorage.setItem(ae,z)}catch(e){}},[z]),(0,a.useEffect)(()=>{try{sessionStorage.setItem(le,String(R))}catch(e){}},[R]),(0,a.useEffect)(()=>{try{sessionStorage.setItem(oe,String(b.current)),sessionStorage.setItem(ie,String(b.pageSize)),b.total&&sessionStorage.setItem(te,String(b.total))}catch(e){}},[b.current,b.pageSize,b.total]),(0,a.useEffect)(()=>{const o=((e,o)=>{const i={};for(const[t,a]of Object.entries(e)){if(void 0===a||null===a||""===a)continue;if("PartidoAnioDesde"===t&&1899===a)continue;if("PartidoAnioHasta"===t&&a===o)continue;if("PartidoTipo"===t&&"O,A"===a)continue;const e=ne[t];e&&(i[e]=String(a))}return i})(w,e);"todos"!==z&&(o.ct=z,o.cn=String(R)),b.current>1&&(o.pg=String(b.current)),50!==b.pageSize&&(o.ps=String(b.pageSize)),F.trim()&&(o.bt=F.trim()),l(o,{replace:!0})},[w,z,R,b.current,b.pageSize,F]),(0,a.useEffect)(()=>{if("POP"===s&&P.current)return P.current=!1,void("todos"===z&&Pe());Ae()},[b.current,b.pageSize,w,z,R,k]),(0,a.useEffect)(()=>{"POP"===s&&sessionStorage.getItem(de)||ye()},[w,z,R,k]);const Pe=async()=>{try{var e;const i=(0,t.A)((0,t.A)({page:b.current,limit:b.pageSize},w),k.trim()?{busquedaTexto:k.trim()}:{}),a=(null===(e=(await Y.services.partidos.getAll(i)).data.pagination)||void 0===e?void 0:e.total)||0;S(e=>(0,t.A)((0,t.A)({},e),{},{total:a}
1));try{sessionStorage.setItem(te,String(a))}catch(o){}}catch(i){}},Ae=async()=>{P.current||g(!0);try{const o="todos"!==z,i=(0,t.A)((0,t.A)({page:o?1:b.current,limit:o?R:b.pageSize},w),k.trim()?{busquedaTexto:k.trim()}:{});"primeros"===z&&(i.PartidoOrden="asc");const a=await Y.services.partidos.getAll(i);let l=a.data.data||[];"primeros"===z&&(l=[...l].sort((e,o)=>o.PartidoAnio-e.PartidoAnio||o.PartidoMes-e.PartidoMes||o.PartidoDia-e.PartidoDia)),m(l);try{sessionStorage.setItem(se,JSON.stringify(l))}catch(e){}o||S(e=>{var o;return(0,t.A)((0,t.A)({},e),{},{total:(null===(o=a.data.pagination)||void 0===o?void 0:o.total)||0})})}catch(o){A.Ay.error("Error al cargar partidos")}finally{P.current=!1,g(!1)}},ye=async()=>{try{const o=(0,t.A)((0,t.A)({},w),k.trim()?{busquedaTexto:k.trim()}:{});"todos"!==z&&(o.cantidadTipo=z,o.cantidadN=R);const i=await Y._E.getResumen(o);T(i.data);try{sessionStorage.setItem(de,JSON.stringify(i.data))}catch(e){}}catch(o){}},Ce=e=>{S(o=>(0,t.A)((0,t.A)({},o),{},{current:e.current,pageSize:e.pageSize}))},Ee=(e,o,i)=>{if(!e||!o||!i)return"-";const t=String(e).padStart(2,"0"),a=String(o).padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(i)},Ie=(e,o)=>e>o?"#3f8600":e<o?"#cf1322":void 0,je=e=>{var o,i;if("G"===e.PartidoResultadoWO)return(0,J.jsx)(v.A,{title:"Ganado por WO (walk over)",children:(0,J.jsx)("span",{style:{color:"#3f8600",fontWeight:"bold"},children:"G-WO"})});if("P"===e.PartidoResultadoWO)return(0,J.jsx)(v.A,{title:"Perdido por WO (walk over)",children:(0,J.jsx)("span",{style:{color:"#cf1322",fontWeight:"bold"},children:"P-WO"})});const t=null!==(o=e.PartidoGolesNacional)&&void 0!==o?o:0,a=null!==(i=e.PartidoGolesRival)&&void 0!==i?i:0,l=1===e.PartidoCambioResultado,s=l?"G"===e.PartidoCambioResTipo?"#3f8600":"#cf1322":null,d=l?s:Ie(t,a),n=l?"G"===e.PartidoCambioResTipo?"El partido se le di\xf3 por ganado a Nacional":"El partido se le di\xf3 por ganado a ".concat(e.EquipoNombre||"rival"):null,c=l?(0,J.jsx)(r.A,{color:"G"===e.PartidoCambioResTipo?"success":"error",style:{margin:"0 0 0 4px"},children:e.PartidoCambioResTipo}):null;if(1===e.PartidoDefinicionPenales){var u,p;const o=null!==(u=e.PartidoDefinicionPenalesNacion)&&void 0!==u?u:0,i=null!==(p=e.PartidoDefinicionPenalesRival)&&void 0!==p?p:0,s=Ie(o,i),r=(0,J.jsxs)("span",{style:{fontWeight:"bold"},children:[(0,J.jsxs)("span",{style:{color:d},children:[t,"-",a]})," ",(0,J.jsxs)("span",{style:{color:s},children:["(",o,"-",i,")"]}),c]});return l?(0,J.jsx)(v.A,{title:n,children:r}):r}const h=(0,J.jsxs)("span",{style:{color:d,fontWeight:"bold"},children:[t,"-",a,c]});return l?(0,J.jsx)(v.A,{title:n,children:h}):h},be=e=>{var o;return(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.EquipoEscudoUrl&&(0,J.jsx)(y.A,{src:e.EquipoEscudoUrl,width:24,height:24,preview:!1,style:{objectFit:"contain"}}),(0,J.jsx)("span",{style:{whiteSpace:"nowrap",fontWeight:"bold"},children:(null===(o=e.EquipoNombre)||void 0===o?void 0:o.toUpperCase())||"-"})]})},Se=[{title:"Fecha",key:"fecha",render:(e,o)=>(0,J.jsx)("span",{style:{whiteSpace:"nowrap",cursor:"default"},onMouseEnter:e=>xe(o,e),onMouseLeave:ve,children:Ee(o.PartidoDia,o.PartidoMes,o.PartidoAnio)}),width:110},{title:"Estadio",key:"estadio",render:(e,o)=>(0,J.jsxs)("span",{children:[o.EstadioNombre||"-",o.EstadioPaisBanderaUrl&&1!==o.EstadioPaisLocal&&(0,J.jsxs)(J.Fragment,{children:[" ",(0,J.jsx)("img",{src:o.EstadioPaisBanderaUrl,alt:o.EstadioPaisNombre,style:{width:16,height:12,marginLeft:4}})]})]}),width:220},{title:"Equipo",key:"equipo",render:(e,o)=>be(o)},{title:"Resultado",key:"resultado",render:(e,o)=>je(o),width:120,align:"center"},{title:"Campeonato",key:"campeonato",render:(e,o)=>{const i=o.CampeonatoAnio,t=o.NombreCampeonato?i&&o.PartidoAnio!==i?"".concat(o.NombreCampeonato," ").concat(i):o.NombreCampeonato:null;return(0,J.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,J.jsx)("span",{children:t||"-"}),1===o.PartidoAnulado&&(0,J.jsx)(r.A,{color:"red",style:{margin:0},children:"Anulado"})]})}},{title:"Motivo",dataIndex:"MotivoDescripcion",key:"motivo",render:e=>e||"-",width:170},{title:"",dataIndex:"PartidoCondicion",key:"condicion",render:e=>{const o={L:"Local",V:"Visitante",N:"Neutral"}[e];return o?(0,J.jsx)(v.A,{title:o,children:(0,J.jsx)("span",{children:e})}):null},width:40},{title:"Oficial",key:"oficial",render:(e,o)=>0===o.CampeonatoAmistoso?"\u2713":"",width:80,align:"center"},...u?[{title:"Acciones",key:"acciones",width:120,render:(e,i)=>(0,J.jsxs)(C.A,{children:[(0,J.jsx)(d.Ay,{size:"small",icon:(0,J.jsx)(G.A,{}),onClick:e=>{e.stopPropagation(),o("/partidos/".concat(i.PartidoId,"/edit"))}}),(0,J.jsx)(d.Ay,{size:"small",danger:!0,icon:(0,J.jsx)(O.A,{}),onClick:e=>{e.stopPropagation(),(e=>{c.A.confirm({title:"\xbfEliminar partido?",content:"\xbfEst\xe1 seguro de eliminar el partido del ".concat(Ee(e.PartidoDia,e.PartidoMes,e.PartidoAnio),"?"),okText:"Eliminar",okType:"danger",cancelText:"Cancelar",onOk:async()=>{try{await Y.services.partidos.delete(e.PartidoId),A.Ay.success("Partido eliminado"),Ae()}catch(o){A.Ay.error("Error al eliminar partido")}}})})(i)}})]})}]:[]],we=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:14;return e.map((e,t)=>{let{label:l,value:s,color:d,tooltip:n}=e;return(0,J.jsxs)(a.Fragment,{children:[t>0&&(0,J.jsx)("div",{style:{width:1,height:28,background:"#e0e0e0",margin:"0 8px"}}),(0,J.jsx)(v.A,{title:n,children:(0,J.jsxs)("div",{style:{textAlign:"center",cursor:"default"},children:[(0,J.jsx)("div",{style:{fontSize:o,color:"#888",lineHeight:1.2},children:l}),(0,J.jsx)("div",{style:{fontWeight:700,fontSize:i,color:d||"inherit",lineHeight:1.4},children:s})]})})]},l)})},De=q.gpen+q.ppen>0,qe=[{label:"PJ",value:q.pj,tooltip:"Partidos Jugados"},{label:"PG",value:q.pg,color:"#3f8600",tooltip:"Partidos Ganados"},{label:"PE",value:q.pe,tooltip:"Partidos Empatados"},{label:"PP",value:q.pp,color:"#cf1322",tooltip:"Partidos Perdidos"},{label:"GF",value:q.gf,tooltip:"Goles a Favor"},{label:"GC",value:q.gc,tooltip:"Goles en Contra"}],Te=[{label:"GPen",value:q.gpen,color:"#3f8600",tooltip:"Partidos Ganados por Penales"},{label:"PPen",value:q.ppen,color:"#cf1322",tooltip:"Partidos Perdidos por Penales"}],Fe=n?(0,J.jsx)("div",{style:{background:"#f5f5f5",borderRadius:8,padding:"8px 16px",display:"flex",justifyContent:"center"},children:(0,J.jsx)("div",{style:{display:"flex",alignItems:"center"},children:we(qe,13,17)})}):(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:0,background:"#f5f5f5",borderRadius:8,padding:"6px 16px",fontSize:13},children:[we(qe),De&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("div",{style:{width:1,height:28,background:"#aaa",margin:"0 8px"}}),we(Te)]})]});return(0,J.jsxs)("div",{children:[n?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("h2",{style:{margin:0,textAlign:"center"},children:"Partidos"}),(0,J.jsx)(E.A,{style:{margin:"8px 0"}}),(0,J.jsx)("div",{style:{marginBottom:8},children:Fe})]}):(0,J.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16,flexWrap:"wrap",gap:8},children:[(0,J.jsx)("h2",{style:{margin:0},children:"Partidos"}),(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[Fe,u&&(0,J.jsx)(d.Ay,{type:"primary",icon:(0,J.jsx)(B.A,{}),onClick:()=>o("/partidos/new"),style:{backgroundColor:"#003087"},children:"Nuevo Partido"})]})]}),(0,J.jsx)($,{filters:w,setFilters:e=>{D(e),S(e=>(0,t.A)((0,t.A)({},e),{},{current:1}))},cantidadTipo:z,setCantidadTipo:M,cantidadN:R,setCantidadN:H,busquedaTexto:F,setBusquedaTexto:e=>{N(e),S(e=>(0,t.A)((0,t.A)({},e),{},{current:1}))},canEdit:u}),n?(0,J.jsxs)(J.Fragment,{children:[h.map(e=>{const i=e.NombreCampeonato?e.CampeonatoAnio&&e.PartidoAnio!==e.CampeonatoAnio?"".concat(e.NombreCampeonato," ").concat(e.CampeonatoAnio):e.NombreCampeonato:null;return(0,J.jsxs)("div",{onClick:()=>o("/partidos/".concat(e.PartidoId)),style:{marginBottom:8,padding:12,borderRadius:10,background:"#fff",border:"1px solid #e8e8e8",boxShadow:"0 1px 3px rgba(0,0,0,0.06)",cursor:"pointer"},onMouseEnter:e=>e.currentTarget.style.boxShadow="0 2px 8px rgba(0,0,0,0.12)",onMouseLeave:e=>e.currentTarget.style.boxShadow="0 1px 3px rgba(0,0,0,0.06)",children:[(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:[(0,J.jsx)("span",{style:{fontSize:14,color:"#444"},children:Ee(e.PartidoDia,e.PartidoMes,e.PartidoAnio)}),e.EstadioNombre&&(0,J.jsx)("span",{style:{fontSize:14,color:"#444",maxWidth:"55%",textAlign:"right",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.EstadioNombre})]}),(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginBottom:6},children:[(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flex:1,minWidth:0},children:[e.EquipoEscudoUrl&&(0,J.jsx)("img",{src:e.EquipoEscudoUrl,alt:"",style:{width:24,height:24,objectFit:"contain",flexShrink:0}}),(0,J.jsx)("span",{style:{fontWeight:700,fontSize:16,color:"#222",textTransform:"uppercase",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.EquipoNombre||"-"})]}),(0,J.jsx)("div",{style:{flexShrink:0,fontSize:18,fontWeight:800},children:je(e)})]}
1),(0,J.jsxs)("div",{style:{fontSize:14,color:"#444",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6},children:[(0,J.jsxs)("div",{style:{flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[[i,e.MotivoDescripcion].filter(Boolean).join(" - "),1===e.PartidoAnulado&&(0,J.jsx)(r.A,{color:"red",style:{margin:"0 0 0 6px",fontSize:11},children:"Anulado"})]}),"E"===e.PartidoTipo?(0,J.jsx)(r.A,{color:"purple",style:{margin:0,fontSize:11,flexShrink:0},children:"Entrenamiento"}):"A"===e.PartidoTipo?(0,J.jsx)(r.A,{color:"orange",style:{margin:0,fontSize:11,flexShrink:0},children:"Amistoso"}):(0,J.jsx)(r.A,{color:"blue",style:{margin:0,fontSize:11,flexShrink:0},children:"Oficial"})]})]},e.PartidoId)}),"todos"===z&&(0,J.jsx)(I.A,{current:b.current,pageSize:b.pageSize,total:b.total,onChange:(e,o)=>Ce({current:e,pageSize:o}),style:{textAlign:"center",marginTop:8},size:"small",showLessItems:!0})]}):(0,J.jsx)(j.A,{dataSource:h,columns:Se,rowKey:"PartidoId",loading:f,pagination:"todos"===z&&{current:b.current,pageSize:b.pageSize,total:b.total},onChange:Ce,virtual:"todos"!==z,scroll:(0,t.A)({x:1200},"todos"!==z?{y:600}:{}),rowClassName:"clickable-row",onRow:e=>({onClick:()=>o("/partidos/".concat(e.PartidoId)),style:{cursor:"pointer"}})}),U.visible&&U.photoUrl&&(0,J.jsx)(Z,{x:U.x,y:U.y,photoUrl:U.photoUrl,fallback:U.fallback,onHide:()=>V(e=>(0,t.A)((0,t.A)({},e),{},{visible:!1}))})]})}}}]); 2//# sourceMappingURL=3234.598e3727.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.