1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8409],{30383:function(e,s,t){Promise.resolve().then(t.bind(t,46123)),Promise.resolve().then(t.bind(t,11449)),Promise.resolve().then(t.bind(t,83748)),Promise.resolve().then(t.bind(t,14312)),Promise.resolve().then(t.bind(t,27539)),Promise.resolve().then(t.bind(t,62007)),Promise.resolve().then(t.bind(t,5269)),Promise.resolve().then(t.bind(t,50203)),Promise.resolve().then(t.bind(t,74519)),Promise.resolve().then(t.bind(t,88544)),Promise.resolve().then(t.bind(t,86730)),Promise.resolve().then(t.bind(t,57073)),Promise.resolve().then(t.bind(t,81567)),Promise.resolve().then(t.bind(t,90697)),Promise.resolve().then(t.bind(t,29157)),Promise.resolve().then(t.bind(t,47696)),Promise.resolve().then(t.bind(t,28687)),Promise.resolve().then(t.bind(t,26922)),Promise.resolve().then(t.bind(t,77472)),Promise.resolve().then(t.bind(t,40859)),Promise.resolve().then(t.bind(t,25772)),Promise.resolve().then(t.bind(t,73414)),Promise.resolve().then(t.bind(t,85250)),Promise.resolve().then(t.bind(t,61859)),Promise.resolve().then(t.bind(t,31269)),Promise.resolve().then(t.bind(t,57220)),Promise.resolve().then(t.bind(t,82771)),Promise.resolve().then(t.bind(t,10741)),Promise.resolve().then(t.bind(t,74764)),Promise.resolve().then(t.bind(t,79501)),Promise.resolve().then(t.bind(t,6188)),Promise.resolve().then(t.bind(t,89973)),Promise.resolve().then(t.bind(t,27403)),Promise.resolve().then(t.bind(t,570)),Promise.resolve().then(t.bind(t,88522)),Promise.resolve().then(t.bind(t,7548)),Promise.resolve().then(t.bind(t,73389)),Promise.resolve().then(t.bind(t,83949)),Promise.resolve().then(t.bind(t,13672)),Promise.resolve().then(t.bind(t,93098)),Promise.resolve().then(t.bind(t,73547)),Promise.resolve().then(t.bind(t,80348)),Promise.resolve().then(t.bind(t,78473)),Promise.resolve().then(t.bind(t,49325)),Promise.resolve().then(t.bind(t,59198)),Promise.resolve().then(t.bind(t,6110)),Promise.resolve().then(t.bind(t,94551)),Promise.resolve().then(t.bind(t,7958)),Promise.resolve().then(t.bind(t,55164)),Promise.resolve().then(t.bind(t,73458)),Promise.resolve().then(t.bind(t,27350)),Promise.resolve().then(t.bind(t,29578)),Promise.resolve().then(t.bind(t,60122)),Promise.resolve().then(t.bind(t,40227)),Promise.resolve().then(t.bind(t,35860)),Promise.resolve().then(t.bind(t,82816)),Promise.resolve().then(t.bind(t,46062)),Promise.resolve().then(t.bind(t,50687)),Promise.resolve().then(t.bind(t,86559)),Promise.resolve().then(t.bind(t,90240)),Promise.resolve().then(t.bind(t,41952)),Promise.resolve().then(t.bind(t,2118)),Promise.resolve().then(t.bind(t,99085)),Promise.resolve().then(t.bind(t,35589)),Promise.resolve().then(t.t.bind(t,38173,23)),Promise.resolve().then(t.t.bind(t,231,23))},46123:function(e,s,t){"use strict";t.d(s,{default:function(){return u}});var n=t(57437),r=t(2265),o=t(19141),i=t(1229),l=t(87138),a=t(16463),d=t(11449);function m(e,s){var t;let n="local"===s?e.localTeam:e.visitorTeam,r="local"===s?e.manualLocalName:e.manualVisitorName;return(null==n?void 0:null===(t=n.name)||void 0===t?void 0:t.trim())||(null==r?void 0:r.trim())||("local"===s?"Local a definir":"Visitante a definir")}function u(e){let{user:s,tournaments:t,venues:u}=e,c=(0,a.usePathname)(),[h,x]=(0,r.useState)({tournament:"",date:"",venue:"",status:"56",round:"",team:"",number:""}),[p,b]=(0,r.useState)([]),[v,f]=(0,r.useState)(!0),g=e=>{let{name:s,value:t}=e.target;x(e=>({...e,[s]:t}))},P=(0,r.useCallback)(async()=>{b((await (0,o.hV)(s.id||"",h.tournament,h.date,h.venue,h.status?parseInt(h.status,10):void 0,h.round?parseInt(h.round,10):void 0,h.team,h.number)).map(e=>({...e,date:e.date?new Date(e.date):null,startTime:e.startTime?new Date(e.startTime):null})))},[s.id,h]);return(0,r.useEffect)(()=>{v&&(P(),f(!1))},[v,P]),(0,n.jsxs)("div",{className:"mx-auto flex w-full max-w-7xl flex-col gap-4 px-3 sm:px-4",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-purple-100 bg-white p-4 shadow-sm",children:[(0,n.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wide text-purple-500",children:"Partidos asignados a"}),(0,n.jsx)("p",{className:"mt-1 min-w-0 truncate text-sm font-semibold text-purple-800 sm:text-base",title:s.email||"",children:s.email})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-slate-200 bg-white p-3 shadow-sm sm:p-4",children:[(0,n.jsx)("div",{className:"mb-3 flex flex-col gap-1 sm:flex-row sm:items-end sm:justify-between",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-base font-bold text-slate-900",children:"Filtros"}),(0,n.jsx)("p",{className:"text-xs text-slate-500",children:"Busc\xe1 por torneo, cancha, equipo, n\xfamero, fecha o estado."})]})}),(0,n.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-7",children:[(0,n.jsxs)("select",{name:"tournament",value:h.tournament,onChange:e=>x({...h,tournament:e.target.value}),className:"min-w-0 rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm text-slate-800 outline-none transition focus:border-purple-500 focus:ring-2 focus:ring-purple-100",children:[(0,n.jsx)("option",{value:"",children:"Seleccione Torneo"}),t.map(e=>{var s;return(0,n.jsxs)("option",{value:e.id,children:[e.name," ",e.category.name," ",(null===(s=e.division)||void 0===s?void 0:s.name)||""]},e.id)})]}),(0,n.jsxs)("select",{name:"venue",value:h.venue,onChange:g,className:"min-w-0 rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm text-slate-800 outline-none transition focus:border-purple-500 focus:ring-2 focus:ring-purple-100",children:[(0,n.jsx)("option",{value:"",children:"Seleccione Cancha"}),u.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]}),(0,n.jsx)("input",{type:"text",name:"team",value:h.team,placeholder:"Nombre equipo",onChange:g,className:"min-w-0 rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm text-slate-800 outline-none transition focus:border-purple-500 focus:ring-2 focus:ring-purple-100"}),(0,n.jsx)("input",{type:"text",name:"number",value:h.number,placeholder:"Partido N\xfamero",onChange:g,className:"min-w-0 rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm text-slate-800 outline-none transition focus:border-purple-500 focus:ring-2 focus:ring-purple-100"}),(0,n.jsx)("input",{type:"date",name:"date",value:h.date,onChange:g,className:"min-w-0 rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm text-slate-800 outline-none transition focus:border-purple-500 focus:ring-2 focus:ring-purple-100"}),(0,n.jsxs)("select",{name:"status",value:h.status,onChange:g,className:"min-w-0 rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm text-slate-800 outline-none transition focus:border-purple-500 focus:ring-2 focus:ring-purple-100",children:[(0,n.jsx)("option",{value:"56",children:"Programado"}
1),(0,n.jsx)("option",{value:"57",children:"Finalizado"}),(0,n.jsx)("option",{value:"58",children:"Jugando..."}),(0,n.jsx)("option",{value:"59",children:"Suspendido"}),(0,n.jsx)("option",{value:"60",children:"Postergado"})]}),(0,n.jsx)("button",{onClick:P,className:"inline-flex min-w-[120px] items-center justify-center justify-self-center rounded-xl bg-purple-600 px-4 py-2 text-sm font-semibold text-white shadow-sm transition hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-200 sm:col-span-2 lg:col-span-1",children:"Buscar"})]})]}),p.length>0?(0,n.jsx)("ul",{className:"space-y-3 sm:space-y-4",children:p.map(e=>{var t,r,o,a,u,h,x,p,b,v,f,g;let P=m(e,"local"),j=m(e,"visitor"),w=null!==(f=null===(t=e.localTeam)||void 0===t?void 0:t.id)&&void 0!==f?f:null,N=null!==(g=null===(r=e.visitorTeam)||void 0===r?void 0:r.id)&&void 0!==g?g:null;return(0,n.jsxs)("li",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white p-3 shadow-sm transition hover:shadow-md sm:p-4 ".concat(56===e.statusId?"":57===e.statusId?"bg-slate-100":58===e.statusId?"bg-green-50 border-green-200":59===e.statusId?"bg-yellow-50 border-yellow-200":60===e.statusId?"bg-purple-50 border-purple-200":""),children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1 text-center sm:flex-row sm:items-center sm:justify-center sm:gap-3",children:[(0,n.jsxs)("span",{className:"break-words text-base font-extrabold leading-tight text-purple-800 sm:text-lg",children:[(null===(a=e.tournament)||void 0===a?void 0:null===(o=a.category)||void 0===o?void 0:o.name)||""," ",(null===(h=e.tournament)||void 0===h?void 0:null===(u=h.division)||void 0===u?void 0:u.name)||""]}),(0,n.jsx)("span",{className:"text-xs font-bold uppercase tracking-wide text-purple-600 sm:text-sm",children:(0,i.J5)(e.round||0)})]}),(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)("span",{className:"text-xs font-medium text-purple-600 sm:text-sm",children:e.date?"".concat(e.date.toLocaleDateString("es-ES",{day:"2-digit",month:"2-digit",year:"numeric"})).concat(e.startTime?" ".concat(e.startTime.toLocaleTimeString("es-ES",{hour:"2-digit",minute:"2-digit",hour12:!1})):""):"Fecha no definida"})}),(0,n.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center gap-2 rounded-xl border border-purple-200 bg-purple-50 px-2 py-2 text-center text-sm font-bold text-purple-800 sm:text-base",children:[(0,n.jsx)("span",{className:"min-w-0 truncate",title:P,children:P}),(0,n.jsx)("strong",{className:"shrink-0 text-xs uppercase text-purple-500",children:"vs"}),(0,n.jsx)("span",{className:"min-w-0 truncate",title:j,children:j})]}),(0,n.jsx)("div",{className:"flex justify-center p-1",children:(0,n.jsxs)("span",{className:"flex flex-row items-center justify-center gap-3 font-semibold",children:[w?(0,n.jsx)(d.default,{teamId:w,fallbackId:"default2",alt:P,width:40,height:40,className:"h-10 w-10 shrink-0 object-contain"}):(0,n.jsx)("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-slate-100 text-[10px] font-bold text-slate-400",children:"TBD"}),(0,n.jsx)("span",{children:"vs"}),N?(0,n.jsx)(d.default,{teamId:N,fallbackId:"default2",alt:j,width:40,height:40,className:"h-10 w-10 shrink-0 object-contain"}):(0,n.jsx)("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-slate-100 text-[10px] font-bold text-slate-400",children:"TBD"})]})}),(0,n.jsxs)("div",{className:"rounded-xl bg-slate-50 px-3 py-2 text-sm text-slate-600",children:[(0,n.jsx)("span",{className:"font-semibold text-slate-800",children:"Cancha:"})," ",(null===(x=e.Venue)||void 0===x?void 0:x.name)?e.Venue.name:"No especificado"]}),(0,n.jsxs)("div",{className:"mt-2 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,n.jsx)("span",{className:"inline-flex w-fit rounded-full bg-slate-100 px-3 py-1 text-xs font-bold text-slate-700",children:56===e.statusId?"Programado":57===e.statusId?"Finalizado":58===e.statusId?"En progreso":59===e.statusId?"Suspendido":60===e.statusId?"Postergado":"Estado desconocido"}),((null===(p=e.tournament.id)||void 0===p?void 0:p.toLowerCase().startsWith("lmf"))?null===(b=e.scorers)||void 0===b?void 0:b.some(e=>e.userId===s.id&&"referee1"===e.roleId):null===(v=e.scorers)||void 0===v?void 0:v.some(e=>
1e.userId===s.id))&&(0,n.jsx)(l.default,{href:"/cast/adminv/".concat(e.id,"?from=").concat(encodeURIComponent(c)),className:"inline-flex min-w-[120px] items-center justify-center self-start rounded-xl bg-blue-600 px-4 py-2 text-sm font-bold text-white shadow-sm transition duration-300 hover:bg-blue-700 sm:self-auto",children:"Planillar"})]})]},e.id)})}):(0,n.jsxs)("div",{className:"rounded-2xl border border-dashed border-purple-200 bg-white px-4 py-10 text-center shadow-sm",children:[(0,n.jsx)("p",{className:"text-sm font-semibold text-purple-700",children:"No hay partidos asignados."}),(0,n.jsx)("p",{className:"mt-1 text-xs text-slate-500",children:"Prob\xe1 cambiar los filtros o buscar otro estado."})]})]})}}},function(e){e.O(0,[9545,189,8173,231,6348,3357,121,6531,3422,9141,6572,2971,7023,1744],function(){return e(e.s=30383)}),_N_E=e.O()}]);
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.