!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d1ede116-1282-4d38-9769-1d7b36e0361c",e._sentryDebugIdIdentifier="sentry-dbid-d1ede116-1282-4d38-9769-1d7b36e0361c")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[76980],{10481:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/referee",function(){return r(78110)}])},38878:(e,t,r)=>{"use strict";r.d(t,{K:()=>i});var s=r(64082),l=r(6029),a=r(46787),n=r(94565);function i(e){var{id:t,name:r,size:i=56,placeholder:d="/static/images/placeholders/player.svg",style:c,className:o,grayscale:x}=e,u=(0,s.T)(e,["id","name","size","placeholder","style","className","grayscale"]);let h=u.w||u.width||i,p=u.h||u.height||i;return(0,l.jsx)(n._V,Object.assign({fallback:(0,l.jsx)(n._V,{style:Object.assign({borderRadius:"50%"},c),w:h,h:p,src:d,alt:r}),src:t?a.rDt.image(t):"",alt:r,w:h,h:p,br:"50%",style:c,className:o,isGrayscale:x},u))}},53554:(e,t,r)=>{"use strict";r.d(t,{T:()=>a,n:()=>l});var s=r(46787);function l(e){return e.fullName?e.fullName.split(",").reverse().map(e=>e.trim()).join(" "):e.name}function a(e,t){return e.slug===s.QCR.Football?t.players.length>10:t.players.length>4}},78110:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>eh});var s=r(6029),l=r(95669),a=r.n(l),n=r(90248),i=r(88658),d=r(17135),c=r(90438),o=r(52763),x=r(25246),u=r(78767),h=r(36882),p=r(31830),j=r(64006),f=r(88715),m=r(4917),y=r(19947),g=r(99306),b=r(80055),v=r(46787),w=r(20945),_=r(47151),A=r(53192),C=r(38878),S=r(10174),T=r(76356),E=r(28377),k=r(60475),z=r(94156);function D(e){var t;let{referee:r}=e;return(0,s.jsx)(E.F,{image:(0,s.jsx)(C.K,{id:r.id,name:r.name,w:"100%",h:"100%",border:"onSurface.nLv4"}),name:(0,s.jsx)(z.c,{entity:r}),titleLabel:(0,s.jsx)(n.A,{id:"referee"}),subtitleItems:(null==(t=r.country)?void 0:t.alpha2)&&(0,s.jsxs)(T.so,{align:"center",gap:{base:"xs",md:"sm"},children:[(0,s.jsx)(A.w,{alpha2:r.country.alpha2,name:r.country.name,w:32,h:32}),(0,s.jsx)(S.EY,{textStyle:"display.medium",children:(0,s.jsx)(k.md,{slug:r.country.alpha2||"",name:r.country.name||""})})]})})}var P=r(22375),R=r(947),K=r(90510),N=r(46222),O=r(98133);let I=e=>{let{label:t,value:r,children:l}=e;return r||l?(0,s.jsxs)(T.az,{w:"1/2",py:"md",px:"lg",children:[(0,s.jsx)(S.EY,{display:"block",textStyle:"assistive.micro",color:"neutrals.nLv3",textAlign:"center",textTransform:"uppercase",mb:"2xs",children:t}),(0,s.jsx)(S.EY,{display:"block",textStyle:"display.medium",textAlign:"center",children:r||l})]}):null};function L(e){var t;let{refereeDetails:r}=e,{referee:l}=r,a=(0,R.A)(),i=l.dateOfBirthTimestamp?(0,s.jsx)(K.XU,{value:new Date(1e3*l.dateOfBirthTimestamp),...P.or.dateWithShortMonth,timeZone:"UTC"}):null;return(0,s.jsx)(N.Zp,{children:(0,s.jsxs)(T.so,{justify:"center",children:[(null==(t=l.country)?void 0:t.alpha2)&&(0,s.jsx)(I,{label:(0,s.jsx)(n.A,{id:"nationality"}),children:(0,s.jsxs)(T.so,{align:"center",justify:"center",gap:"xs",children:[(0,s.jsx)(S._V,{src:(0,v.RHm)(l.country.alpha2),width:"lg",height:"lg",br:"50%",loading:"lazy",alt:l.country.alpha2}),(0,s.jsx)("span",{children:(0,O.KH)(l.country.alpha2)})]})}),i&&l.dateOfBirthTimestamp&&(0,s.jsx)(I,{label:i,value:"".concat((0,P.KW)(l.dateOfBirthTimestamp)," ").concat(a.formatMessage({id:"years_short"},{n:(0,P.KW)(l.dateOfBirthTimestamp)}))})]})})}var B=r(59721),Y=r(55729),W=r(52466),G=r(82536),M=r(82346);let H={yellowCardsPerGame:"yellow_cards_per_game",redCards:"red_cards",penalty:"football_penalties"};function U(e){let{statistics:t,setActiveKey:r,activeKey:l,isAscending:a,setIsAscending:i}=e;return(0,s.jsxs)(T.so,{h:"4xl",pl:"lg",pr:"2xs",align:"center",justify:"space-between",children:[(0,s.jsx)(S.EY,{textStyle:"assistive.default",children:(0,s.jsx)(n.A,{id:"competitions"})}),(0,s.jsx)(T.so,{children:t.map((e,d)=>{let c=l===e;return(0,s.jsxs)(T.so,{direction:"column",align:"center",onClick:()=>{c?i(e=>!e):(r(e),i(!0))},cursor:"pointer",children:[(0,s.jsxs)(T.so,{position:"relative",h:"lg",align:"center",style:{userSelect:"none"},children:[(0,s.jsx)(S.EY,{w:"[35px]",textAlign:"center",textStyle:"display.small",color:c?"primary.default":"neutrals.nLv4",display:"block",children:(0,s.jsx)(n.A,{id:H[e]?"".concat(H[e],"_short"):"".concat(e,"_short")})}),d!==t.length-1&&(0,s.jsx)(T.cG,{orientation:"vertical"})]}),c&&(0,s.jsx)(W.Bfd,{fill:"primary.default",width:16,height:16,style:a?void 0:{transform:"rotate(180deg)"}})]},e)})})]})}let q=["appearances","yellowCardsPerGame","redCards","penalty"],F=()=>{let[e,t]=(0,Y.useState)(!1);return(0,s.jsxs)(T.az,{position:"relative",children:[(0,s.jsx)(W.G_L,{fill:"onSurface.nLv1",cursor:"pointer",onClickCapture:e=>{e.stopPropagation(),t(e=>!e)}}),(0,s.jsx)(G.A,{isOpen:e,setIsOpen:t,children:(0,s.jsx)(T.az,{px:"lg",pt:"lg",children:(0,s.jsxs)(T.so,{direction:"column",align:"center",children:[(0,s.jsx)(S.EY,{textStyle:"display.medium",mb:"lg",display:"block",children:(0,s.jsx)(n.A,{id:"legend"})}),q.map(e=>(0,s.jsxs)(T.az,{py:"xs",children:[(0,s.jsx)(S.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",textTransform:"uppercase",children:(0,s.jsx)(n.A,{id:H[e]?"".concat(H[e],"_short"):"".concat(e,"_short")})}),(0,s.jsxs)(S.EY,{textStyle:"assistive.default",children:[" - "," ",(0,s.jsx)(n.A,{id:H[e]?"".concat(H[e]):e})]})]},e))]})})})]})};function V(e){let{refereeStatistics:t}=e,[r,l]=(0,Y.useState)(q[0]),[a,n]=(0,Y.useState)(!0),i=t.statistics.map(e=>({...e,yellowCardsPerGame:Math.round(e.yellowCards/e.appearances*10)/10,redCards:e.redCards+e.yellowRedCards})).sort((e,t)=>a?e[r]>=t[r]?-1:1:e[r](0,s.jsxs)(T.so,{h:"5xl",align:"center",justify:"space-between",pr:"2xs",children:[(0,s.jsx)(j.tQ,{tournament:e.uniqueTournament,style:{maxWidth:"calc(100% - 180px)"},children:(0,s.jsxs)(T.so,{px:"lg",align:"center",gap:"lg",children:[(0,s.jsx)(B.e,{id:e.uniqueTournament.id,size:40}),(0,s.jsx)(S.Ym,{textStyle:"body.medium",truncate:!0,children:(0,s.jsx)(M.O,{uniqueTournament:e.uniqueTournament})})]})}),(0,s.jsx)(T.so,{children:q.map(t=>{let l=t===r,a="yellowCardsPerGame"===t?Math.round(e.yellowCards/e.appearances*10)/10:e[t];return(0,s.jsx)(S.EY,{color:l?"primary.default":"neutrals.nLv1",w:"[36px]",textAlign:"center",display:"block",children:a},t)})})]},e.uniqueTournament.id))})]})}function Z(e){let{refereeDetails:t,refereeStatistics:r,id:l}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(D,{referee:t.referee}),(0,s.jsxs)(w.xA,{py:"md",children:[(0,s.jsxs)(w.fv,{flexGrow:1,children:[(0,s.jsx)(_.A,{entity:v.wNW.Referee,id:l}),(0,s.jsx)(o.Aq,{route:c.xW.Referee})]}),(0,s.jsxs)(w.fv,{flexGrow:2,children:[(0,s.jsx)(L,{refereeDetails:t}),r&&(0,s.jsx)(V,{refereeStatistics:r})]})]})]})}var X=r(2920),Q=r(56132),J=r(14831),$=r(79082);function ee(e){let{refereeDetails:t,refereeStatistics:r}=e;return(0,s.jsx)(S.tU.Panel,{tabKey:Q.x.Details,children:(0,s.jsxs)(N.BU,{children:[(0,s.jsx)(L,{refereeDetails:t}),r&&(0,s.jsx)(V,{refereeStatistics:r})]})})}var et=r(71024);let er=r.n(et)()(()=>r.e(11946).then(r.bind(r,11946)),{loadableGenerated:{webpack:()=>[11946]}});function es(e){let{id:t}=e;return(0,s.jsx)(S.tU.Panel,{tabKey:Q.x.Matches,children:(0,s.jsx)(er,{entity:v.wNW.Referee,id:t})})}var el=r(62042);function ea(e){let{referee:t}=e;return(0,s.jsx)(T.az,{bg:{mdDown:"surface.s1"},children:(0,s.jsxs)(E.z,{className:(0,el.AH)({mdDown:{px:"lg",py:"lg",gap:"lg"},md:{px:"xl",py:"xl",gap:"xl"}}),children:[(0,s.jsx)(T.az,{h:{base:"4xl",md:"12xl"},w:{base:"4xl",md:"12xl"},border:"1px solid {colors.neutrals.nLv4}",br:"50%",children:(0,s.jsx)(C.K,{id:t.id,name:t.name,w:"100%",h:"100%"})}),(0,s.jsxs)(T.az,{children:[(0,s.jsx)(S.H2,{textStyle:{base:"display.large",md:"display.extraLarge"},color:{base:"neutrals.nLv1",md:"onColor.primary"},children:(0,s.jsx)(z.c,{entity:t})}),(0,s.jsx)(T.az,{display:{base:"none",md:"block"},mt:"xs",children:(0,s.jsx)(S.EY,{textStyle:"display.medium",color:"onColor.secondary",children:(0,s.jsx)(n.A,{id:"referee"})})})]})]})})}function en(e){let{refereeDetails:t,refereeStatistics:r,id:l}=e,[a,n]=(0,$.Ay)({routeKey:c.xW.Referee,params:{slug:t.referee.slug,id:t.referee.id}}),i=[{tabKey:Q.x.Details,item:"details"},{tabKey:Q.x.Matches,item:"matches",values:{sport:(0,J.ap)(t.referee.sport.slug)}}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ea,{referee:t.referee}),(0,s.jsxs)(X.A,{id:l,location:X.C.RefereePage,initialTabKey:(null==a?void 0:a.tab)||Q.x.Details,customControls:[(null==a?void 0:a.tab)||Q.x.Details,e=>n("tab",e)],tabs:i,children:[(0,s.jsx)(ee,{refereeDetails:t,refereeStatistics:r}),(0,s.jsx)(es,{id:l})]})]})}function ei(e){let t=(0,p.A)(),{id:r,slug:l,refereeDetails:v,meta:w}=e,_=v.referee.sport.slug,A=(0,b.z)(v.referee),C=(0,s.jsxs)(i.B,{children:[(0,s.jsx)(i.B.Item,{children:(0,s.jsx)(j.di,{translatedParams:{sport:_},children:(0,s.jsx)(g.o,{sportSlug:_})})}),(0,s.jsx)(i.B.Item,{children:(0,s.jsx)(n.A,{id:"referee"})}),(0,s.jsx)(i.B.Title,{children:w&&w.title||(0,s.jsx)(n.A,{id:"headerTitle.referee",values:{referee:A}})})]});return(0,s.jsxs)(m.x,{value:{meta:w},children:[(0,s.jsxs)(a(),{children:[(0,s.jsx)("link",{rel:"canonical",href:"https://www.sofascore.com".concat(f.z.getTranslatedCanonicalRoute(t,"referee",{id:r,slug:l}).route)}),(0,s.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,s.jsx)(y.Od,{referee:v.referee}),(0,s.jsx)(m.A,{metaKey:"referee",values:{referee:v.referee.name}}),(0,s.jsxs)(d.MC,{value:{isShort:!0,location:h.y.MatchesSection},children:[(0,s.jsx)(u.$B,{children:(0,s.jsxs)(x.YW,{children:[C,(0,s.jsx)(en,{...e})]})}),(0,s.jsx)(u.h6,{children:(0,s.jsxs)(o.JR,{route:c.xW.Referee,children:[C,(0,s.jsx)(Z,{...e})]})})]})]})}var ed=r(61306),ec=r(18153);let eo=ed.A.getInitialPageProps(e=>async t=>{let{req:r,res:s,query:l,...a}=t,n=r?r._originalUrl:a.asPath,i=f.z.getCurrentLocale(n),d="",o="";r&&(d=r.params.id,o=r.params.slug),l&&l.id&&l.slug&&(d=l.id,o=l.slug);let[x,u,h]=await Promise.allSettled([v.vg3.fetchRefereeDetails(+d),v.sdF.getEntityMeta(v.wNW.Referee,d,i),v.vg3.fetchRefereeStatistics(+d)]);try{if("rejected"===x.status)throw Error();let t=x.value,r=t.referee,l=r.sport.slug,a="fulfilled"===u.status?u.value.entityMeta:void 0,n="fulfilled"===h.status?h.value:void 0;if(-1===c.Hk.indexOf(l))throw Error("Unsupported sport");return s&&(r.slug!==o||r.id!==Number(d))&&(s.writeHead(301,{Location:f.z.getTranslatedRoute(i,"referee",{id:r.id,slug:r.slug}).route}),s.end()),e.dispatch((0,ec.Vy)(l)),{id:r.id,refereeDetails:t,refereeStatistics:n,slug:o,meta:a}}catch(e){return s&&(s.statusCode=404),{error:{code:404}}}});var ex=r(45906);let eu=e=>{let{error:t,...r}=e;return t?(0,s.jsx)(ex.default,{statusCode:t.code}):(0,s.jsx)(ei,{...r})};eu.getInitialProps=eo;let eh=eu}},e=>{e.O(0,[14092,43786,12155,17135,36678,20288,93785,3074,40996,8521,19947,90636,46593,38792],()=>e(e.s=10481)),_N_E=e.O()}]);