!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="85f7148f-1d91-4c1b-8150-1323633332f7",t._sentryDebugIdIdentifier="sentry-dbid-85f7148f-1d91-4c1b-8150-1323633332f7")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[57202],{6644:(t,e,a)=>{a.d(e,{A:()=>d});var r=a(6029),n=a(36729),l=a(56591);a(14632);var i=a(55729),s=a(41735),o=a(21559),c=a(98366);let u=[100,100,100,100,100],p=(t,e)=>{switch(t){case c.eM.AVG:return{fill:e.colors.surface.s2,stroke:e.colors.sofaSingles.value};case c.eM.BASE:return{fill:e.colors.secondary.highlight,stroke:e.colors.secondary.default};case c.eM.COMPARE:return{fill:e.colors.primary.highlight,stroke:e.colors.primary.default};case c.eM.COMPARE_SELF:return{fill:e.colors.surface.s2,stroke:e.colors.neutral.default};default:return{fill:"transparent",stroke:"transparent"}}};function d(t){let{data:e,onGraphClick:a}=t,d=(0,i.useContext)(s.ThemeContext),[x,f]=(0,i.useState)(),g=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(x){let t=x.selectAll("polygon").data(e,(t,e)=>e.toString());t.enter().append("polygon").merge(t).transition("Pentagon transition").ease(n.wq).duration(400).attr("points",t=>{let e=t?(0,c.mc)(t).map(t=>t.value):u;return(0,c.cS)((0,c.tO)(e))}).attr("opacity",t=>+(null!==t)).attr("fill",t=>d.getColorFromVar(p(null==t?void 0:t.__type,d).fill)).attr("stroke",t=>d.getColorFromVar(p(null==t?void 0:t.__type,d).stroke))}else{let t=g.current;f((0,l.A)(t).append("g").on("click",a))}},[x,e]),(0,r.jsx)(o.A,{ref:g})}},21559:(t,e,a)=>{a.d(e,{A:()=>i});var r=a(6029),n=a(55729),l=a(41735);let i=(0,n.forwardRef)((t,e)=>{let{children:a,...i}=t,{colors:s}=(0,n.useContext)(l.ThemeContext);return(0,r.jsxs)("svg",{height:i.height||"100%",width:i.width||"100%",viewBox:"0 0 200 200",strokeWidth:"2",...i,ref:e,children:[(0,r.jsx)("polygon",{fill:i.fill||s.surface.s2,points:"100,0 195.10565162951534,69.09830056250526 158.77852522924732, 180.90169943749473 41.2214747707527,180.90169943749476 4.894348370484636,69.09830056250527"}),a]})})},23631:(t,e,a)=>{a.d(e,{A:()=>d});var r=a(6029),n=a(28349),l=a(76356),i=a(93338),s=a(99064),o=a(41735),c=a(98366);let u=(0,o.default)(s.az).withConfig({componentId:"sc-c4ed9fbb-0"})([".attacking,.saves{top:0;left:48px;transform:translate(10px,-100%);padding-bottom:",";}.creativity,.aerial{top:34%;left:0;transform:translate(-100%,-50%);}.runsOut,.technical,.anticipation,.runs-out{top:34.5%;right:0;transform:translate(100%,-50%);}.defending,.ballDistribution,.ball.distribution{bottom:-8px;right:80%;transform:translate(10px,0);}.tactical{bottom:-8px;left:80%;transform:translate(-10px,0);}.runsOut,.technical,.anticipation,.runs-out,.tactical{flex-direction:"," !important;> *{margin-left:0;&:first-child{margin-right:0;}}}.defending,.ballDistribution,.ball.distribution{@media screen and (max-width:335px){transform:translate(10px,3px);}}.tactical{@media screen and (max-width:335px){transform:translate(-10px,3px);}}"],t=>t.theme.spacing.xs,t=>t.isRTL?"row":"row-reverse"),p=t=>{let{value:e,isAnotherPlayerCompare:a,main:s,isComparing:o}=t;return(0,r.jsx)(l.az,{w:"[20px]",h:"[20px]",br:"xs",style:{background:a?i.S.var("colors.surface.s2"):o?s?i.S.var("colors.secondary.default"):i.S.var("colors.neutral.default"):i.S.var((0,c.W6)(e))},children:(0,r.jsx)(n.EY,{lineHeight:"20px",textStyle:"table.small",color:a?s?"secondary.default":"primary.default":"surface.s1",display:"block",textAlign:"center",children:e})})},d=function(t){let{data:e,isAnotherPlayerCompare:a,children:i}=t,[s,d]=e,{settings:x}=(0,o.useTheme)(),f="rtl"===x.textDirection;return s?(0,r.jsx)(l.az,{maxW:"[360px]",w:"fit",style:{paddingTop:28},mx:"auto",mb:"sm",children:(0,r.jsxs)(u,{position:"relative",style:{margin:"0 ".concat(86,"px")},isRTL:f,children:[i,s.map((t,e)=>(0,r.jsxs)(l.so,{direction:{_ltr:"row",_rtl:"row-reverse"},position:"absolute",className:t.name,gap:"xs",children:[(0,r.jsx)(n.EY,{lineHeight:"".concat(20,"px"),textStyle:"assistive.default",color:"neutrals.nLv3",textTransform:"uppercase",children:c.HU[t.name]}),(0,r.jsxs)(l.so,{gap:"xs",children:[(0,r.jsx)(p,{isAnotherPlayerCompare:a,value:t.value,isComparing:!!(d&&d[e]),main:!0}),d&&d[e]&&(0,r.jsx)(p,{isAnotherPlayerCompare:a,value:d[e].value,isComparing:!0})]})]},t.name))]})}):null}},57202:(t,e,a)=>{a.r(e),a.d(e,{default:()=>m});var r=a(6029),n=a(99397),l=a(21377),i=a(28349),s=a(76356),o=a(55729),c=a(90248),u=a(46222),p=a(52466),d=a(64006),x=a(97233),f=a(91824),g=a(94156),y=a(25145);let h=t=>{let{player:e,rating:a}=t;return(0,r.jsx)(s.az,{w:"1/2",p:"lg",children:(0,r.jsx)(d.uc,{player:e,sportSlug:l.QCR.Football,children:(0,r.jsxs)(s.so,{direction:"column",justify:"center",align:"center",children:[(0,r.jsxs)(s.az,{position:"relative",pb:"[20px]",children:[(0,r.jsx)(n.t,{id:e.id,name:e.name,size:48}),(0,r.jsx)(s.az,{position:"absolute",left:"[50%]",top:"3xl",transform:{_ltr:"translateX(-50%)",_rtl:"translateX(50%)"},children:(0,r.jsx)(n.G,{rating:a})})]}),(0,r.jsxs)(s.so,{justify:"center",align:"center",children:[(0,r.jsx)(i.EY,{textStyle:"assistive.default",color:"primary.default",letterSpacing:"-0.1px",textAlign:"center",children:(0,r.jsx)(g.c,{entity:e,short:!0})}),(0,r.jsx)(p.CCT,{fill:"primary.default",ml:"xxs"})]})]})})})};function m(t){let{leftPlayer:e,rightPlayer:a}=t,{pentagons:n,isPentagonDataLoading:l}=(0,f.s)(null==e?void 0:e.player.id),{pentagons:p,isPentagonDataLoading:d}=(0,f.s)(null==a?void 0:a.player.id),{attributes:m,pentagonLayers:b}=(0,o.useMemo)(()=>(0,x.Bg)(n,p,0,!1),[n,p]);return e&&a?n&&p?(0,r.jsxs)(u.Zp,{children:[(0,r.jsx)(u.Zp.Header,{titleId:"featured_players"}),(0,r.jsxs)(s.az,{pb:"sm",children:[(0,r.jsx)(i.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv3",letterSpacing:"-0.1px",textAlign:"center",py:"sm",children:(0,r.jsx)(c.A,{id:"best_last_performance"})}),(0,r.jsxs)(s.so,{position:"relative",children:[(0,r.jsx)(h,{player:e.player,rating:e.statistics.rating}),(0,r.jsx)(s.az,{position:"absolute",w:"2xl",h:"xl",backgroundColor:"surface.s2",p:"xs",br:"xs",left:"[50%]",top:"[28px]",translate:"auto",translateX:"-1/2",children:(0,r.jsx)(i.EY,{display:"block",textStyle:"display.small",letterSpacing:"-0.2px",textAlign:"center",children:"Vs"})}),(0,r.jsx)(h,{player:a.player,rating:a.statistics.rating})]}),(0,r.jsx)(s.az,{pb:"sm",children:(0,r.jsx)(x.KG,{attributes:m,pentagonLayers:b,isAnotherPlayerCompare:!0})}),(0,r.jsxs)(s.so,{align:"center",py:"xs",px:"lg",children:[(0,r.jsx)(s.az,{w:"[20px]",h:"xs",backgroundColor:"secondary.default",ml:"2xs",mr:"[10px]"}),(0,r.jsx)(i.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",letterSpacing:"-0.1px",children:(0,r.jsx)(g.c,{entity:e.player,short:!0})})]}),(0,r.jsxs)(s.so,{align:"center",py:"xs",px:"lg",children:[(0,r.jsx)(s.az,{w:"[20px]",h:"xs",backgroundColor:"primary.default",ml:"2xs",mr:"[10px]"}),(0,r.jsx)(i.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",letterSpacing:"-0.1px",children:(0,r.jsx)(g.c,{entity:a.player,short:!0})})]})]})]}):l||d?(0,r.jsx)(y.A,{}):null:null}},91824:(t,e,a)=>{a.d(e,{s:()=>o});var r=a(21377),n=a(55729),l=a(45860),i=a(18970),s=a(98366);function o(t){let e=(0,n.useContext)(i.Ws)===r.QCR.Football,{data:a,isLoading:o,error:c}=(0,l.Ay)(e&&t?r.qvj.pentagon(t):null);return{pentagons:!c&&a?(0,s.TC)(a):null,isPentagonDataLoading:o,isError:c}}},97233:(t,e,a)=>{a.d(e,{HU:()=>c.HU,KG:()=>o,Sz:()=>c.Sz,Bg:()=>c.Bg});var r=a(6029),n=a(78383),l=a.n(n),i=a(23631),s=a(6644);function o(t){let{attributes:e,pentagonLayers:a,isAnotherPlayerCompare:n,onGraphClick:o=l()}=t;return(0,r.jsx)(i.A,{data:e,isAnotherPlayerCompare:n,children:(0,r.jsx)(s.A,{data:a,onGraphClick:o})})}var c=a(98366)},98366:(t,e,a)=>{a.d(e,{Bg:()=>f,HU:()=>l,Q1:()=>n,Sz:()=>x,TC:()=>d,W6:()=>p,cS:()=>u,eM:()=>i,mc:()=>o,tO:()=>c});let r=[["attacking","saves"],["runsOut","technical","anticipation","runs-out"],["tactical"],["defending","ballDistribution","ball-distribution"],["creativity","aerial"]],n={attacking:"attacking",creativity:"player_ability_creativity",defending:"defending",tactical:"player_ability_tactical",technical:"player_ability_technical",aerial:"player_ability_aerial_reach",anticipation:"player_ability_anticipation",ballDistribution:"player_ability_ball_distribution",saves:"player_ability_saves"},l={saves:"SAV",anticipation:"ANT",tactical:"TAC",ballDistribution:"BAL",aerial:"AER",attacking:"ATT",technical:"TEC",defending:"DEF",creativity:"CRE"},i={AVG:Symbol("AVG"),BASE:Symbol("BASE"),COMPARE:Symbol("COMPARE"),COMPARE_SELF:Symbol("COMPARE_SELF")};function s(t){return Math.PI/180*t}function o(t){let e=[];return r.forEach((a,r)=>{a.forEach(a=>{a in t&&(e[r]={value:t[a],name:a})})}),e}function c(t){return t.map((t,e)=>(function(t,e){let a=-(100*Math.cos(s(72*e)));return[100*Math.sin(s(72*e)),a].map(e=>e*t/100+100)})(Number(t),e))}function u(t){return t.reduce((t,e)=>"".concat(t).concat(e[0],",").concat(e[1]," "),"").trim()}function p(t){return t>=90?"colors.rating.s90":t>=80?"colors.rating.s80":t>=70?"colors.rating.s70":t>=65?"colors.rating.s65":t>=60?"colors.rating.s60":t>=10?"colors.rating.s10":"colors.rating.s00"}function d(t){return t?{playerPentagons:t.playerAttributeOverviews,averagePentagons:t.averageAttributeOverviews}:null}function x(t,e){return t.find(t=>t.yearShift===e)||null}function f(t,e,a,r){let n=[],l=[],{playerPentagons:s,averagePentagons:c}={...t};if(null==s?void 0:s.length){let t=x(s,e?a:0);if(t&&(t.__type=i.BASE),n.push(t?o(t):null),l.push(t),r)l.push(null);else{let t=null,r=null;e?e&&(t=x(e.playerPentagons,a))&&(t.__type=i.COMPARE,r=o(t)):a?(t=x(s,a))&&(t.__type=i.COMPARE_SELF,r=o(t)):(null==c?void 0:c.length)&&((t=c[0]).__type=i.AVG),n.push(r),l.push(t)}l.reverse()}return{attributes:n,pentagonLayers:l}}}}]);