!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]="ab4f2cc4-885c-4826-a45a-13befb548ff5",e._sentryDebugIdIdentifier="sentry-dbid-ab4f2cc4-885c-4826-a45a-13befb548ff5")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[76980],{1864:e=>{e.exports=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}},10481:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/referee",function(){return r(43119)}])},12047:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>l});var n=r(28349),s=r(21501),a=r(55729);function l(){let{isInMobileTabs:e=!0,isSportMenuVisible:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[r,l]=(0,a.useState)(0),i=(0,s.YU)(),{isMobile:o}=(0,n.$c)(),c=50*!!e,d=48+c+48*!!t;return(0,a.useEffect)(()=>{if(!o)return void l(0);l(i===s.Dh.Up?d:c)},[i,o]),r}},14165:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},16419:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},27869:(e,t,r)=>{e.exports=r(14165)({"&":"&","<":"<",">":">",""":'"',"'":"'"})},33883:(e,t,r)=>{var n=r(90843);e.exports=function(e,t,r){for(var s=-1,a=e.criteria,l=t.criteria,i=a.length,o=r.length;++s=o)return c;return c*("desc"==r[s]?-1:1)}}return e.index-t.index}},37390:(e,t,r)=>{var n=r(88601),s=r(24127),a=r(68988),l=r(93733),i=r(1864),o=r(3540),c=r(33883),d=r(5549),u=r(91544);e.exports=function(e,t,r){t=t.length?n(t,function(e){return u(e)?function(t){return s(t,1===e.length?e[0]:e)}:e}):[d];var f=-1;return t=n(t,o(a)),i(l(e,function(e,r,s){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,r)})}},38878:(e,t,r)=>{"use strict";r.d(t,{K:()=>i});var n=r(64082),s=r(6029),a=r(21377),l=r(99064);function i(e){var{id:t,name:r,size:i=56,placeholder:o="/static/images/placeholders/player.svg",style:c,className:d,grayscale:u}=e,f=(0,n.T)(e,["id","name","size","placeholder","style","className","grayscale"]);let x=f.w||f.width||i,m=f.h||f.height||i;return(0,s.jsx)(l._V,Object.assign({fallback:(0,s.jsx)(l._V,{style:Object.assign({borderRadius:"50%"},c),w:x,h:m,src:o,alt:r}),src:t?a.rDt.image(t):"",alt:r,w:x,h:m,br:"50%",style:c,className:d,isGrayscale:u},f))}},43119:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ex});var n=r(6029),s=r(95669),a=r.n(s),l=r(90248),i=r(33752),o=r(60988),c=r(19451),d=r(39676),u=r(29129),f=r(42678),x=r(8973),m=r(26331),p=r(13266),h=r(73088),j=r(52951),y=r(6675),g=r(27289),v=r(84942),b=r(21377),w=r(70010),T=r(73463),_=r(53192),P=r(38878),S=r(28349),A=r(76356),C=r(14419),N=r(98449),D=r(24159);function L(e){var t;let{referee:r}=e;return(0,n.jsx)(C.Fs,{image:(0,n.jsx)(P.K,{id:r.id,name:r.name,w:"100%",h:"100%",border:"onSurface.nLv4"}),name:(0,n.jsx)(D.c,{entity:r}),titleLabel:(0,n.jsx)(l.A,{id:"referee"}),subtitleItems:(null==(t=r.country)?void 0:t.alpha2)&&(0,n.jsxs)(A.so,{align:"center",gap:{base:"xs",md:"sm"},children:[(0,n.jsx)(_.w,{alpha2:r.country.alpha2,name:r.country.name,w:32,h:32}),(0,n.jsx)(S.EY,{textStyle:"display.medium",children:(0,n.jsx)(N.m,{slug:r.country.alpha2||"",name:r.country.name||""})})]})})}var E=r(4967),O=r(947),R=r(90510),k=r(48683),z=r(55938);let F=e=>{let{label:t,value:r,children:s}=e;return r||s?(0,n.jsxs)(A.az,{w:"1/2",py:"md",px:"lg",children:[(0,n.jsx)(S.EY,{display:"block",textStyle:"assistive.micro",color:"neutrals.nLv3",textAlign:"center",textTransform:"uppercase",mb:"2xs",children:t}),(0,n.jsx)(S.EY,{display:"block",textStyle:"display.medium",textAlign:"center",children:r||s})]}):null};function I(e){var t;let{refereeDetails:r}=e,{referee:s}=r,a=(0,O.A)(),i=s.dateOfBirthTimestamp?(0,n.jsx)(R.XU,{value:new Date(1e3*s.dateOfBirthTimestamp),...E.or.dateWithShortMonth,timeZone:"UTC"}):null;return(0,n.jsx)(k.Zp,{children:(0,n.jsxs)(A.so,{justify:"center",children:[(null==(t=s.country)?void 0:t.alpha2)&&(0,n.jsx)(F,{label:(0,n.jsx)(l.A,{id:"nationality"}),children:(0,n.jsxs)(A.so,{align:"center",justify:"center",gap:"xs",children:[(0,n.jsx)(S._V,{src:(0,b.RHm)(s.country.alpha2),width:"lg",height:"lg",br:"50%",loading:"lazy",alt:s.country.alpha2}),(0,n.jsx)("span",{children:(0,z.KH)(s.country.alpha2)})]})}),i&&s.dateOfBirthTimestamp&&(0,n.jsx)(F,{label:i,value:"".concat((0,E.KW)(s.dateOfBirthTimestamp)," ").concat(a.formatMessage({id:"years_short"},{n:(0,E.KW)(s.dateOfBirthTimestamp)}))})]})})}var K=r(59721),M=r(55729),Y=r(54409),B=r(54053),G=r(52695),W=r(99064);let U={yellowCardsPerGame:"yellow_cards_per_game",redCards:"red_cards",penalty:"football_penalties"};function q(e){let{statistics:t,setActiveKey:r,activeKey:s,isAscending:a,setIsAscending:i}=e;return(0,n.jsxs)(A.so,{h:"4xl",pl:"lg",pr:"2xs",align:"center",justify:"space-between",children:[(0,n.jsx)(S.EY,{textStyle:"assistive.default",children:(0,n.jsx)(l.A,{id:"competitions"})}),(0,n.jsx)(A.so,{children:t.map((e,o)=>{let c=s===e;return(0,n.jsxs)(A.so,{direction:"column",align:"center",onClick:()=>{c?i(e=>!e):(r(e),i(!0))},cursor:"pointer",children:[(0,n.jsxs)(A.so,{position:"relative",h:"lg",align:"center",style:{userSelect:"none"},children:[(0,n.jsx)(S.EY,{w:"[35px]",textAlign:"center",textStyle:"display.small",color:c?"primary.default":"neutrals.nLv4",display:"block",children:(0,n.jsx)(l.A,{id:U[e]?"".concat(U[e],"_short"):"".concat(e,"_short")})}),o!==t.length-1&&(0,n.jsx)(W.cG,{vertical:!0})]}),c&&(0,n.jsx)(Y.Bfd,{fill:"primary.default",width:16,height:16,style:a?void 0:{transform:"rotate(180deg)"}})]},e)})})]})}let H=["appearances","yellowCardsPerGame","redCards","penalty"],J=()=>{let[e,t]=(0,M.useState)(!1);return(0,n.jsxs)(A.az,{position:"relative",children:[(0,n.jsx)(Y.G_L,{fill:"onSurface.nLv1",cursor:"pointer",onClickCapture:e=>{e.stopPropagation(),t(e=>!e)}}),(0,n.jsx)(B.A,{isOpen:e,setIsOpen:t,children:(0,n.jsx)(A.az,{px:"lg",pt:"lg",children:(0,n.jsxs)(A.so,{direction:"column",align:"center",children:[(0,n.jsx)(S.EY,{textStyle:"display.medium",mb:"lg",display:"block",children:(0,n.jsx)(l.A,{id:"legend"})}),H.map(e=>(0,n.jsxs)(A.az,{py:"xs",children:[(0,n.jsx)(S.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",textTransform:"uppercase",children:(0,n.jsx)(l.A,{id:U[e]?"".concat(U[e],"_short"):"".concat(e,"_short")})}),(0,n.jsxs)(S.EY,{textStyle:"assistive.default",children:[" - "," ",(0,n.jsx)(l.A,{id:U[e]?"".concat(U[e]):e})]})]},e))]})})})]})};function Q(e){let{refereeStatistics:t}=e,[r,s]=(0,M.useState)(H[0]),[a,l]=(0,M.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,n.jsxs)(A.so,{h:"5xl",align:"center",justify:"space-between",pr:"2xs",children:[(0,n.jsx)(p.tQ,{tournament:e.uniqueTournament,style:{maxWidth:"calc(100% - 180px)"},children:(0,n.jsxs)(A.so,{px:"lg",align:"center",gap:"lg",children:[(0,n.jsx)(K.e,{id:e.uniqueTournament.id,size:40}),(0,n.jsx)(S.Ym,{textStyle:"body.medium",truncate:!0,children:(0,n.jsx)(G.O,{uniqueTournament:e.uniqueTournament})})]})}),(0,n.jsx)(A.so,{children:H.map(t=>{let s=t===r,a="yellowCardsPerGame"===t?Math.round(e.yellowCards/e.appearances*10)/10:e[t];return(0,n.jsx)(S.EY,{color:s?"primary.default":"neutrals.nLv1",w:"[36px]",textAlign:"center",display:"block",children:a},t)})})]},e.uniqueTournament.id))})]})}function V(e){let{refereeDetails:t,refereeStatistics:r,id:s}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(L,{referee:t.referee}),(0,n.jsxs)(w.xA,{py:"md",children:[(0,n.jsxs)(w.fv,{flexGrow:1,children:[(0,n.jsx)(T.A,{entity:b.wNW.Referee,id:s}),(0,n.jsx)(d.Aq,{route:c.xW.Referee})]}),(0,n.jsxs)(w.fv,{flexGrow:2,children:[(0,n.jsx)(I,{refereeDetails:t}),r&&(0,n.jsx)(Q,{refereeStatistics:r})]})]})]})}var X=r(38296),Z=r(58047),$=r(62827),ee=r(30479);function et(e){let{refereeDetails:t,refereeStatistics:r}=e;return(0,n.jsx)(W.tU.Panel,{tabKey:Z.x.Details,children:(0,n.jsxs)(k.BU,{children:[(0,n.jsx)(I,{refereeDetails:t}),r&&(0,n.jsx)(Q,{refereeStatistics:r})]})})}var er=r(71024);let en=r.n(er)()(()=>r.e(45151).then(r.bind(r,45151)),{loadableGenerated:{webpack:()=>[45151]}});function es(e){let{id:t}=e;return(0,n.jsx)(W.tU.Panel,{tabKey:Z.x.Matches,children:(0,n.jsx)(en,{entity:b.wNW.Referee,id:t})})}function ea(e){var t,r;let{referee:s}=e,a=null==(r=s.country)||null==(t=r.alpha2)?void 0:t.toLowerCase(),i=a?(0,b.RHm)(a):void 0;return(0,n.jsx)(A.az,{bg:{mdDown:"surface.s1"},children:(0,n.jsxs)(C.z4,{bgImageSrc:i,flexProps:{px:["lg","xl"],py:["lg","xl"],gap:["lg","xl"],align:"center"},children:[(0,n.jsx)(A.az,{h:{base:"4xl",md:"12xl"},w:{base:"4xl",md:"12xl"},border:"1px solid {colors.neutrals.nLv4}",br:"50%",children:(0,n.jsx)(P.K,{id:s.id,name:s.name,w:"100%",h:"100%"})}),(0,n.jsxs)(A.az,{children:[(0,n.jsx)(S.H2,{textStyle:{base:"display.large",md:"display.extraLarge"},color:{base:"neutrals.nLv1",md:"onColor.primary"},children:(0,n.jsx)(D.c,{entity:s})}),(0,n.jsx)(A.az,{display:{base:"none",md:"block"},mt:"xs",children:(0,n.jsx)(S.EY,{textStyle:"display.medium",color:"onColor.secondary",children:(0,n.jsx)(l.A,{id:"referee"})})})]})]})})}function el(e){let{refereeDetails:t,refereeStatistics:r,id:s}=e,[a,l]=(0,ee.Ay)({routeKey:c.xW.Referee,params:{slug:t.referee.slug,id:t.referee.id}}),i=[{tabKey:Z.x.Details,item:"details"},{tabKey:Z.x.Matches,item:"matches",values:{sport:(0,$.ap)(t.referee.sport.slug)}}];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ea,{referee:t.referee}),(0,n.jsxs)(X.A,{id:s,location:X.C.RefereePage,initialTabKey:(null==a?void 0:a.tab)||Z.x.Details,customControls:[(null==a?void 0:a.tab)||Z.x.Details,e=>l("tab",e)],tabs:i,children:[(0,n.jsx)(et,{refereeDetails:t,refereeStatistics:r}),(0,n.jsx)(es,{id:s})]})]})}function ei(e){let t=(0,m.A)(),{id:r,slug:s,refereeDetails:b,meta:w}=e,T=b.referee.sport.slug,_=(0,v.z)(b.referee),P=(0,n.jsxs)(i.B,{children:[(0,n.jsx)(i.B.Item,{children:(0,n.jsx)(p.di,{translatedParams:{sport:T},children:(0,n.jsx)(g.o,{sportSlug:T})})}),(0,n.jsx)(i.B.Item,{children:(0,n.jsx)(l.A,{id:"referee"})}),(0,n.jsx)(i.B.Title,{children:w&&w.title||(0,n.jsx)(l.A,{id:"headerTitle.referee",values:{referee:_}})})]});return(0,n.jsxs)(j.an,{value:{meta:w},children:[(0,n.jsxs)(a(),{children:[(0,n.jsx)("link",{rel:"canonical",href:"https://www.sofascore.com".concat(h.z.getTranslatedCanonicalRoute(t,"referee",{id:r,slug:s}).route)}),(0,n.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,n.jsx)(y.Od,{referee:b.referee}),(0,n.jsx)(j.Ay,{metaKey:"referee",values:{referee:b.referee.name}}),(0,n.jsxs)(o.MC.Provider,{value:{isShort:!0,location:x.y.MatchesSection},children:[(0,n.jsx)(f.$B,{children:(0,n.jsxs)(u.YW,{children:[P,(0,n.jsx)(el,{...e})]})}),(0,n.jsx)(f.h6,{children:(0,n.jsxs)(d.JR,{route:c.xW.Referee,children:[P,(0,n.jsx)(V,{...e})]})})]})]})}var eo=r(71937),ec=r(25862);let ed=eo.A.getInitialPageProps(e=>async t=>{let{req:r,res:n,query:s,...a}=t,l=r?r._originalUrl:a.asPath,i=h.z.getCurrentLocale(l),o="",d="";r&&(o=r.params.id,d=r.params.slug),s&&s.id&&s.slug&&(o=s.id,d=s.slug);let[u,f,x]=await Promise.allSettled([b.vg3.fetchRefereeDetails(+o),b.sdF.getEntityMeta(b.wNW.Referee,o,i),b.vg3.fetchRefereeStatistics(+o)]);try{if("rejected"===u.status)throw Error();let t=u.value,r=t.referee,s=r.sport.slug,a="fulfilled"===f.status?f.value.entityMeta:void 0,l="fulfilled"===x.status?x.value:void 0;if(-1===c.Hk.indexOf(s))throw Error("Unsupported sport");return n&&(r.slug!==d||r.id!==Number(o))&&(n.writeHead(301,{Location:h.z.getTranslatedRoute(i,"referee",{id:r.id,slug:r.slug}).route}),n.end()),e.dispatch((0,ec.Vy)(s)),{id:r.id,refereeDetails:t,refereeStatistics:l,slug:d,meta:a}}catch(e){return n&&(n.statusCode=404),{error:{code:404}}}});var eu=r(65097);let ef=e=>{let{error:t,...r}=e;return t?(0,n.jsx)(eu.default,{statusCode:t.code}):(0,n.jsx)(ei,{...r})};ef.getInitialProps=ed;let ex=ef},53718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.helmetJsonLdProp=t.jsonLdScriptProps=t.JsonLd=void 0;let n=r(55729);function s(e,t={}){return{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e,o,t.space)}}}t.JsonLd=function(e){return n.createElement("script",Object.assign({},s(e.item,e)))},t.jsonLdScriptProps=s,t.helmetJsonLdProp=function(e,t={}){return{type:"application/ld+json",innerHTML:JSON.stringify(e,o,t.space)}};let a=Object.freeze({"&":"&","<":"<",">":">",'"':""","'":"'"}),l=RegExp(`[${Object.keys(a).join("")}]`,"g"),i=e=>a[e],o=(e,t)=>{switch(typeof t){case"object":if(null===t)return;return t;case"number":case"boolean":case"bigint":return t;case"string":return t.replace(l,i);default:return}}},55575:(e,t,r)=>{var n=r(60567),s=r(27869),a=/&(?:amp|lt|gt|quot|#39);/g,l=RegExp(a.source);e.exports=function(e){return(e=n(e))&&l.test(e)?e.replace(a,s):e}},58771:(e,t,r)=>{"use strict";t.QQ=void 0;var n=r(53718);Object.defineProperty(t,"QQ",{enumerable:!0,get:function(){return n.jsonLdScriptProps}})},59721:(e,t,r)=>{"use strict";r.d(t,{e:()=>n.e});var n=r(33480)},70917:(e,t,r)=>{var n=r(74283),s=r(87567);e.exports=function(e){return null==e?[]:n(e,s(e))}},74283:(e,t,r)=>{var n=r(88601);e.exports=function(e,t){return n(t,function(t){return e[t]})}},90510:(e,t,r)=>{"use strict";r.d(t,{XU:()=>u,Gr:()=>x,ib:()=>f});var n,s,a=r(13829),l=r(55729),i=r(947);!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(n||(n={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(s||(s={}));var o=function(e){var t=(0,i.A)(),r=e.value,n=e.children,s=(0,a.Tt)(e,["value","children"]);return n(t.formatNumberToParts(r,s))};function c(e){var t=function(t){var r=(0,i.A)(),n=t.value,s=t.children,l=(0,a.Tt)(t,["value","children"]),o="string"==typeof n?new Date(n||0):n;return s("formatDate"===e?r.formatDateToParts(o,l):r.formatTimeToParts(o,l))};return t.displayName=s[e],t}function d(e){var t=function(t){var r=(0,i.A)(),n=t.value,s=t.children,o=(0,a.Tt)(t,["value","children"]),c=r[e](n,o);if("function"==typeof s)return s(c);var d=r.textComponent||l.Fragment;return l.createElement(d,null,c)};return t.displayName=n[e],t}o.displayName="FormattedNumberParts",o.displayName="FormattedNumberParts";var u=d("formatDate"),f=d("formatTime"),x=d("formatNumber");d("formatList"),d("formatDisplayName"),c("formatDate"),c("formatTime")},90843:(e,t,r)=>{var n=r(50515);e.exports=function(e,t){if(e!==t){var r=void 0!==e,s=null===e,a=e==e,l=n(e),i=void 0!==t,o=null===t,c=t==t,d=n(t);if(!o&&!d&&!l&&e>t||l&&i&&c&&!o&&!d||s&&i&&c||!r&&c||!a)return 1;if(!s&&!l&&!d&&e{"use strict";r.d(t,{T:()=>a,n:()=>s});var n=r(21377);function s(e){return e.fullName?e.fullName.split(",").reverse().map(e=>e.trim()).join(" "):e.name}function a(e,t){return e.slug===n.QCR.Football?t.players.length>10:t.players.length>4}},93733:(e,t,r)=>{var n=r(50956),s=r(16799);e.exports=function(e,t){var r=-1,a=s(e)?Array(e.length):[];return n(e,function(e,n,s){a[++r]=t(e,n,s)}),a}},99452:(e,t,r)=>{var n=r(37390),s=r(91544);e.exports=function(e,t,r,a){return null==e?[]:(s(t)||(t=null==t?[]:[t]),s(r=a?void 0:r)||(r=null==r?[]:[r]),n(e,t,r))}}},e=>{var t=t=>e(e.s=t);e.O(0,[14092,10395,84977,50346,60988,857,19907,39462,31254,77536,57632,6675,90636,46593,38792],()=>t(10481)),_N_E=e.O()}]);