!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]="057a4f09-5f49-4027-ad11-54e0465cef29",e._sentryDebugIdIdentifier="sentry-dbid-057a4f09-5f49-4027-ad11-54e0465cef29")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5077],{1217:(e,t,n)=>{function a(e){return["up","down"].includes(e)}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ltr";switch(e){case"left":return"ltr"===t?"rotate(180deg)":void 0;case"right":return"ltr"===t?void 0:"rotate(180deg)";case"down":return"rotate(90deg)";case"up":return"rotate(-90deg)";default:return}}function o(e,t){if(t&&t.height&&t.width)return a(e)?t.width:t.height}function i(e,t){if(t&&t.height&&t.width)return a(e)?t.height:t.width}function l(e){return a(e)?{left:"-30%",top:"18.8%"}:{left:0,top:0}}n.d(t,{AK:()=>l,DY:()=>i,EC:()=>r,G$:()=>o,O8:()=>s,fk:()=>a});let s=e=>e.length>5},4696:(e,t,n)=>{n.d(t,{M:()=>a});var a=function(e){return e.All="all",e.Total="total",e.PerGame="perGame",e}({})},10383:(e,t,n)=>{n.d(t,{R:()=>i,h:()=>s});var a=n(4696),r=n(98516);let o=(e,t)=>{let n=e[t.key],a="";if(t.totalKey){let o=e[t.totalKey];a=o?" (".concat((0,r.M)(100*n/o),"%)"):" (0%)"}else if(t.percentageKey){let n=e[t.percentageKey];a=" (".concat(n?(0,r.M)(n):0,"%)")}else if(t.reverseKey){let o=e[t.reverseKey];a=" (".concat((0,r.M)(100*n/(n+o)),"%)")}return a},i=(e,t,n)=>{var i,l,s;let c="number"==typeof t.decimals?t.decimals:1,d=e[t.key];if(void 0!==d||"winRatio"===t.key){if(n===a.M.Total&&t.displayType&&t.displayType.length>0)return(null==(s=t.displayType)?void 0:s.includes(a.M.Total))?d:void 0;if(n!==a.M.PerGame||(null==(i=t.displayType)?void 0:i.includes(a.M.PerGame))){if(t.perGame||(null==(l=t.displayType)?void 0:l.includes(a.M.PerGame))){if(void 0===e.appearances)return;let n=o(e,t);return"".concat((0,r.M)(d/e.appearances,c)).concat(n)}if(t.percentageKey){let n=e[t.percentageKey]?(0,r.M)(e[t.percentageKey],c):0,a="number"==typeof t.decimals?(0,r.M)(d,c):d;return t.showValue?"".concat(a," (").concat(n,"%)"):"".concat(n,"%")}if(t.totalKey){let n=e[t.totalKey],a=t.showPercentage?o(e,t):"";return n?"".concat(d,"/").concat(n," ").concat(a):"".concat(d," ").concat(a)}if("firstServePercentage"===t.key){if(isNaN(e.firstServeTotal)||isNaN(e.firstServePointsTotal))return;if(0===e.firstServeTotal)return"0%";let t=e.firstServePointsTotal/e.firstServeTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("winRatio"===t.key){if(isNaN(e.wins)||isNaN(e.matches))return;let t=Math.round(e.wins/e.matches*100);return"".concat(e.wins,"/").concat(e.matches," (").concat(Math.round(10*t)/10,"%)")}if("tournamentsWonRatio"===t.key){if(isNaN(e.tournamentsWon)||isNaN(e.tournamentsPlayed))return;return"".concat(e.tournamentsWon,"/").concat(e.tournamentsPlayed," (").concat(Math.round(10*d)/10,"%)")}if("firstServePointsWonPercentage"===t.key){if(isNaN(e.firstServePointsScored)||isNaN(e.firstServePointsTotal))return;if(0===e.firstServePointsTotal)return"0%";let t=e.firstServePointsScored/e.firstServePointsTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("secondServePercentage"===t.key){if(isNaN(e.secondServeTotal)||isNaN(e.secondServePointsTotal))return;if(0===e.secondServeTotal)return"0%";let t=e.secondServePointsTotal/e.secondServeTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("secondServePointsWonPercentage"===t.key){if(isNaN(e.secondServePointsScored)||isNaN(e.secondServePointsTotal))return;if(0===e.secondServePointsTotal)return"0%";let t=e.secondServePointsScored/e.secondServeTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("avgAces"===t.key){if(isNaN(e.aces)||isNaN(e.matches))return;if(0===e.matches)return"0%";let t=e.aces/e.matches;return"".concat(Math.round(10*t)/10)}if("avgDoubleFaults"===t.key){if(isNaN(e.doubleFaults)||isNaN(e.matches))return;if(0===e.matches)return"0%";let t=e.doubleFaults/e.matches;return"".concat(Math.round(10*t)/10)}if("breakPointsSavedPercentage"===t.key){if(isNaN(e.opponentBreakPointsTotal)||isNaN(e.opponentBreakPointsScored))return;let t=e.opponentBreakPointsTotal-e.opponentBreakPointsScored,n=Math.round(10*e.breakPointsSavedPercentage)/10;return"".concat(t,"/").concat(e.opponentBreakPointsTotal," (").concat(n,"%)")}if("breakPointsSavedConvertedPercentage"===t.key){if(isNaN(e.breakPointsTotal)||isNaN(e.breakPointsScored))return;let t=Math.round(10*e.breakPointsSavedConvertedPercentage)/10;return"".concat(e.breakPointsScored,"/").concat(e.breakPointsTotal," (").concat(t,"%)")}if("tiebreakWinPercentage"===t.key){if(isNaN(e.tiebreaksWon)||isNaN(e.tiebreakLosses)||isNaN(e.tiebreakWinPercentage))return;let t=e.tiebreaksWon+e.tiebreakLosses;return t>0?"".concat(e.tiebreaksWon,"/").concat(t," (").concat(Math.round(10*e.tiebreakWinPercentage)/10,"%)"):"".concat(e.tiebreaksWon,"/").concat(t)}if("number"==typeof t.decimals)return["savePercentage","powerPlaySavePercentage","shortHandedSavePercentage","evenSavePercentage"].includes(t.key)?1===d?"1.00":".".concat((0,r.M)(d,c).slice(2)):"".concat((0,r.M)(d,c)).concat(t.sufix||"");return"".concat(d," ").concat(t.sufix||"")}}};function l(e){let t=Math.round(e),n=Math.floor(t/60),a=Math.floor(t%60).toString().padStart(2,"0");return"".concat(n,":").concat(a)}let s=e=>{let t={...e};return e.secondsPlayed&&(t.minutesPlayed=e.secondsPlayed/60),e.timeOnIce&&(t.timeOnIce=l(e.timeOnIce/e.appearances)),e.powerPlayTimeOnIce&&(t.powerPlayTimeOnIce=l(e.powerPlayTimeOnIce/e.appearances)),e.evenTimeOnIce&&(t.evenTimeOnIce=l(e.evenTimeOnIce/e.appearances)),e.shortHandedTimeOnIce&&(t.shortHandedTimeOnIce=l(e.shortHandedTimeOnIce/e.appearances)),t}},11810:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(6029),r=n(41735);let o=({courtColor:e,showDarkPaint:t})=>{let{colors:n}=(0,r.useTheme)();return(0,a.jsxs)("g",Object.assign({fill:null!=e?e:n.graphicsTerrain.basketball},{children:[(0,a.jsx)("path",{fillRule:"evenodd",d:"M17 1H84V94V95H85H94C94 111 108 124 124 124C140 124 154 111 154 95H163H164V94V80V1H231V71.5C225.2 85.1 217.1 97.5 206.7 108.3C184.6 131.3 155.2 144 124 144C92.8 144 63.4 131.3 41.3 108.3C30.9 97.5 22.8 85 17 71.5V1Z"}),(0,a.jsx)("path",{fillRule:"evenodd",d:"M247 231C247 231.6 246.6 232 246 232H2C1.4 232 1 231.6 1 231V2C1 1.4 1.4 1 2 1H16V69V71.6C16.3 72.4 16.7 73.1 17 73.9C35.8 115.9 76.6 145 124 145C171.4 145 212.2 115.9 231 73.9C231.3 73.1 231.7 72.4 232 71.6V69V1H246C246.6 1 247 1.4 247 2V231Z"}),(0,a.jsx)("path",{fillRule:"evenodd",d:"M95.0004 95C95.0004 110.439 108.561 123 124 123C139.439 123 153 110.439 153 95H95.0134H95.0004ZM120.5 25.9997C120.5 27.9297 122.07 29.4997 124 29.4997C125.93 29.4997 127.5 27.9297 127.5 25.9997C127.5 24.0697 125.93 22.4997 124 22.4997C122.07 22.4997 120.5 24.0697 120.5 25.9997ZM146.477 75.069C144.373 72.55 141.873 70.443 139.046 68.804L139.548 67.939C142.5 69.651 145.096 71.857 147.245 74.427L146.477 75.069ZM128.896 65.465C128.896 65.465 126.775 65.031 123.987 65.031C121.198 65.031 119.077 65.465 119.077 65.465L118.901 64.48C120.657 64.18 122.163 64.031 123.987 64.031C125.81 64.031 127.316 64.18 129.072 64.48L128.896 65.465ZM101.516 75.073L100.75 74.43C102.926 71.833 105.539 69.64 108.452 67.949L108.955 68.814C106.12 70.46 103.617 72.565 101.516 75.073ZM103 20H104V27C104 38 112.972 47 124 47C135.029 47 144 38.028 144 27V20H145V27C145 38.597 135.598 48 124 48C112.4 48 103 38.6 103 27V20ZM110 19H123H125H138V20H125V21.62C127.002 22.076 128.5 23.859 128.5 26C128.5 28.485 126.486 30.5 124 30.5C121.515 30.5 119.5 28.485 119.5 26C119.5 23.859 120.998 22.076 123 21.62V20H110V19ZM85 1V94H94.034C94.183 90.124 94.963 87.285 95.732 85.155L96.672 85.495C95.275 89.224 95.041 92.924 95.041 94H152.959C152.959 92.924 152.726 89.224 151.329 85.495L152.269 85.155C153.038 87.285 153.818 90.124 153.967 94H163V1H85Z"}),(0,a.jsx)("path",{fill:t?n.onSurface.nLv4:"inherit",fillRule:"evenodd",d:"M95.0004 95C95.0004 110.439 108.561 123 124 123C139.439 123 153 110.439 153 95H95.0134H95.0004ZM120.5 25.9997C120.5 27.9297 122.07 29.4997 124 29.4997C125.93 29.4997 127.5 27.9297 127.5 25.9997C127.5 24.0697 125.93 22.4997 124 22.4997C122.07 22.4997 120.5 24.0697 120.5 25.9997ZM146.477 75.069C144.373 72.55 141.873 70.443 139.046 68.804L139.548 67.939C142.5 69.651 145.096 71.857 147.245 74.427L146.477 75.069ZM128.896 65.465C128.896 65.465 126.775 65.031 123.987 65.031C121.198 65.031 119.077 65.465 119.077 65.465L118.901 64.48C120.657 64.18 122.163 64.031 123.987 64.031C125.81 64.031 127.316 64.18 129.072 64.48L128.896 65.465ZM101.516 75.073L100.75 74.43C102.926 71.833 105.539 69.64 108.452 67.949L108.955 68.814C106.12 70.46 103.617 72.565 101.516 75.073ZM103 20H104V27C104 38 112.972 47 124 47C135.029 47 144 38.028 144 27V20H145V27C145 38.597 135.598 48 124 48C112.4 48 103 38.6 103 27V20ZM110 19H123H125H138V20H125V21.62C127.002 22.076 128.5 23.859 128.5 26C128.5 28.485 126.486 30.5 124 30.5C121.515 30.5 119.5 28.485 119.5 26C119.5 23.859 120.998 22.076 123 21.62V20H110V19ZM85 1V94H94.034C94.183 90.124 94.963 87.285 95.732 85.155L96.672 85.495C95.275 89.224 95.041 92.924 95.041 94H152.959C152.959 92.924 152.726 89.224 151.329 85.495L152.269 85.155C153.038 87.285 153.818 90.124 153.967 94H163V1H85Z"})]}))}},12232:(e,t,n)=>{var a;n.d(t,{L:()=>a}),function(e){e.Made="made",e.Missed="missed",e.Total="total"}(a||(a={}))},13369:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(6029),r=n(41735);let o=({fill:e})=>{let{colors:t}=(0,r.useTheme)();return(0,a.jsxs)("g",Object.assign({fill:null!=e?e:t.graphicsTerrain.dark,fillRule:"evenodd",clipRule:"evenodd"},{children:[(0,a.jsx)("path",{d:"M109 68.8L108.5 67.9C105.6 69.6 103 71.8 100.8 74.4L101.6 75C103.6 72.6 106.1 70.5 109 68.8Z"}),(0,a.jsx)("path",{d:"M124 48C135.6 48 145 38.6 145 27V20H144V27C144 38 135 47 124 47C113 47 104 38 104 27V20H103V27C103 38.6 112.4 48 124 48Z"}),(0,a.jsx)("path",{d:"M139.5 67.9L139 68.8C141.8 70.4 144.3 72.5 146.4 75.1L147.2 74.5C145.1 71.9 142.5 69.7 139.5 67.9Z"}),(0,a.jsx)("path",{d:"M246 0H2C0.9 0 0 0.9 0 2V231C0 232.1 0.9 233 2 233H246C247.1 233 248 232.1 248 231V2C248 0.9 247.1 0 246 0ZM85 1H163V94H154C153.9 90.1 153.1 87.3 152.3 85.2L151.4 85.5C152.8 89.2 153 92.9 153 94H95C95 92.9 95.2 89.2 96.6 85.5L95.7 85.2C94.9 87.3 94.2 90.2 94 94H85V1ZM153 95C153 110.4 139.4 123 124 123C108.6 123 95 110.4 95 95H153ZM17 1H84V94V95H85H94C94 111 108 124 124 124C140 124 154 111 154 95H163H164V94V80V1H231V71.5C225.2 85.1 217.1 97.5 206.7 108.3C184.6 131.3 155.2 144 124 144C92.8 144 63.4 131.3 41.3 108.3C30.9 97.5 22.8 85 17 71.5V1ZM247 231C247 231.6 246.6 232 246 232H2C1.4 232 1 231.6 1 231V2C1 1.4 1.4 1 2 1H16V69V71.6C16.3 72.4 16.7 73.1 17 73.9C35.8 115.9 76.6 145 124 145C171.4 145 212.2 115.9 231 73.9C231.3 73.1 231.7 72.4 232 71.6V69V1H246C246.6 1 247 1.4 247 2V231Z"}),(0,a.jsx)("path",{d:"M118.9 64.5L119.1 65.5C119.1 65.5 121.2 65.1 124 65.1C126.8 65.1 128.9 65.5 128.9 65.5L129.1 64.5C127.3 64.2 125.8 64.1 124 64.1C122.2 64 120.7 64.2 118.9 64.5Z"}),(0,a.jsx)("path",{d:"M123 21.6C121 22.1 119.5 23.8 119.5 26C119.5 28.5 121.5 30.5 124 30.5C126.5 30.5 128.5 28.5 128.5 26C128.5 23.9 127 22.1 125 21.6V20H138V19H125H123H110V20H123V21.6ZM124 22.5C125.9 22.5 127.5 24.1 127.5 26C127.5 27.9 125.9 29.5 124 29.5C122.1 29.5 120.5 27.9 120.5 26C120.5 24.1 122.1 22.5 124 22.5Z"}),(0,a.jsx)("path",{d:"M123 232H153C153 216.286 139.714 203 124 203C108.286 203 95 216.286 95 232H123ZM123 233H153.984C153.995 232.668 154 232.335 154 232C154 215.431 140.569 202 124 202C107.431 202 94 215.431 94 232C94 232.335 94.0055 232.668 94.0164 233H123Z"})]}))}},14444:(e,t,n)=>{n.d(t,{b4:()=>m,V3:()=>l,HM:()=>x,k9:()=>c,HI:()=>s});var a=n(6029),r=n(55729),o=n(83260);let i=(0,r.createContext)(void 0),l=e=>{let{children:t,persistKey:n}=e,[r,l]=(0,o.A)(n,[]);return(0,a.jsx)(i.Provider,{value:{recentlySelected:r,setRecentlySelected:l},children:t})},s=()=>{let e=(0,r.useContext)(i);if(void 0===e)throw Error("useRecentSearch must be used within a RecentSearchesProvider");return{recentlySelected:e.recentlySelected,addToRecentlySelected:t=>{let n=e.recentlySelected.filter(e=>e.id!==t.id).slice(0,4),a=[t,...n];e.setRecentlySelected(a)},removeFromRecentlySelected:t=>{let n=e.recentlySelected.filter(e=>e.id!==t.id);e.setRecentlySelected(n)}}};function c(e,t,n,a){return e.length?e.length===(null==n?void 0:n.length)&&e.length===(null==t?void 0:t.length)&&e.length===(null==a?void 0:a.length)?{ids:e.map(e=>null!=e?e:"_").join(","),ut_ids:null==n?void 0:n.map(e=>null!=e?e:"_").join(","),s_ids:null==t?void 0:t.map(e=>null!=e?e:"_").join(","),s_types:null==a?void 0:a.map(e=>null!=e?e:"_").join(",")}:{ids:e.map(e=>null!=e?e:"_").join(",")}:{}}var d=n(94446),u=n(99064),h=n(54409),f=n(24159);let m=e=>{let{player:t,onPlayerClick:n,onRemoveClick:r}=e;return(0,a.jsxs)(u.so,{onClick:()=>n(t),h:"56px",align:"center",cursor:"pointer",children:[(0,a.jsx)(d.t,{id:t.id,name:t.name,size:40,grayscale:t.deceased}),(0,a.jsxs)(u.so,{direction:"column",justify:"center",h:"100%",gap:"xs",grow:1,pl:"sm",children:[(0,a.jsx)(u.EY,{font:"body.medium",color:"onSurface.nLv1",ellipsis:!0,maxW:["250px","130px"],children:(0,a.jsx)(f.c,{entity:t})}),(0,a.jsxs)(u.so,{align:"center",gap:"sm",children:[(0,a.jsx)(d.p,{id:t.team.id,size:16}),(0,a.jsx)(u.EY,{font:"assistive.default",color:"onSurface.nLv3",lineHeight:1,ellipsis:!0,maxW:["300px","120px"],children:(0,a.jsx)(f.c,{entity:t.team})})]})]}),void 0!==r&&(0,a.jsx)(u.$n,{onClick:e=>{e.stopPropagation(),e.preventDefault(),null==r||r(t)},variant:"unshielded",size:"xs",p:"xs",style:{borderRadius:"50%"},children:(0,a.jsx)(h.zQC,{icon:"close",width:16,height:16,fill:"neutral.default"})})]})};var p=n(49519),v=n(21377),C=n(98449),g=n(94604);let x=e=>{var t,n,r,o,i,l,s,c,d;let{team:f,onTeamClick:m,onRemoveClick:x}=e,y=(null==(t=f.sport)?void 0:t.slug)===v.QCR.Tennis;return(0,a.jsxs)(u.so,{gap:"sm",onClick:()=>m(f),align:"center",cursor:"pointer",py:"sm",children:[(0,a.jsx)(p.p,{id:f.id,name:f.name,size:40}),(0,a.jsxs)(u.so,{direction:"column",gap:"xs",grow:1,children:[(0,a.jsx)(u.EY,{font:"body.medium",color:"onSurface.nLv1",children:(0,a.jsx)(g.Rm,{team:f,showFemaleSuffix:f.gender===v.YT8.Female&&!y})}),!f.national&&(null==(n=f.country)?void 0:n.slug)&&(null==(r=f.country)?void 0:r.name)&&!y&&(0,a.jsxs)(u.so,{align:"center",gap:"sm",children:[(0,a.jsx)(p.w,{size:16,alpha2:null==(o=f.country)?void 0:o.alpha2,name:null==(i=f.country)?void 0:i.name}),(0,a.jsx)(u.EY,{font:"assistive.default",color:"onSurface.nLv3",lineHeight:1,children:(0,a.jsx)(C.m,{slug:f.country.slug,name:f.country.name})})]}),y&&f.country&&f.country.name&&(0,a.jsxs)(u.so,{align:"center",gap:"xs",children:[(0,a.jsx)(p.w,{size:16,alpha2:null==(l=f.country)?void 0:l.alpha2,name:null==(s=f.country)?void 0:s.name}),(0,a.jsx)(u.EY,{font:"assistive.default",color:"onSurface.nLv3",lineHeight:1,children:(0,a.jsx)(C.m,{name:f.country.name,slug:null!=(d=null==(c=f.country)?void 0:c.slug)?d:f.country.name})})]})]}),void 0!==x&&(0,a.jsx)(u.$n,{onClick:e=>{e.stopPropagation(),e.preventDefault(),null==x||x(f)},variant:"unshielded",size:"xs",p:"xs",style:{borderRadius:"50%"},children:(0,a.jsx)(h.zQC,{icon:"close",width:16,height:16,fill:"neutral.default"})})]})}},33698:(e,t,n)=>{n.d(t,{L:()=>a.L});var a=n(12232)},36326:(e,t,n)=>{n.d(t,{FV:()=>r,L3:()=>a,R3:()=>c,TH:()=>o,b6:()=>l,ie:()=>i,pu:()=>s});let a=void 0,r=-1,o="all";var i=function(e){return e[e.AllClubCompetitions=0]="AllClubCompetitions",e[e.DomesticLeagues=1]="DomesticLeagues",e[e.DomesticCups=2]="DomesticCups",e[e.InternationalCompetitions=3]="InternationalCompetitions",e[e.NationalTeamCompetitions=4]="NationalTeamCompetitions",e}({});let l=[{id:0,name:"football_all_club_competitions"},{id:1,name:"football_domestic_leagues"},{id:2,name:"football_domestic_cups"},{id:3,name:"football_international_competitions"},{id:4,name:"football_national_competitions"}],s=[{id:"overall",name:"total"},{id:"home",name:"home"},{id:"away",name:"away"}],c={id:-1,name:"all_teams"}},46170:(e,t,n)=>{n.d(t,{GP:()=>C,_S:()=>m,Bt:()=>p,XL:()=>v});var a=n(6029),r=n(21501),o=n(99064),i=n(55729),l=n(41735);let s=149/238,c=238/149,d=()=>{let{colors:e}=(0,l.useTheme)();return(0,a.jsx)("svg",{viewBox:"0 0 238 149",children:(0,a.jsxs)("g",{fill:e.surface.s1,fillRule:"evenodd",children:[(0,a.jsx)("ellipse",{fillRule:"nonzero",cx:"28.175",cy:"74.5",rx:"1.75",ry:"1.753"}),(0,a.jsx)("ellipse",{fillRule:"nonzero",cx:"209.825",cy:"74.5",rx:"1.75",ry:"1.753"}),(0,a.jsx)("path",{d:"M0 0v149h238V0H0zm119.656 76.121a1.72 1.72 0 0 0 1.094-1.621 1.72 1.72 0 0 0-1.094-1.621V57.628c8.969.35 16.188 7.757 16.188 16.872 0 9.071-7.219 16.521-16.188 16.872v-15.25zM1.312 1.315h3.632a4.577 4.577 0 0 1-3.631 3.637V1.315zm0 54.56h12.032v37.25H1.313v-37.25zm0 38.565h13.344V54.56H1.312V32.65h40.032v83.659H1.312V94.44zm0 53.245v-3.637a4.577 4.577 0 0 1 3.632 3.637H1.313zM118.344 72.88a1.72 1.72 0 0 0-1.094 1.621 1.72 1.72 0 0 0 1.094 1.621v15.251c-8.969-.35-16.188-7.757-16.188-16.872 0-9.071 7.219-16.521 16.188-16.872v15.25zm0-16.566c-9.713.35-17.5 8.37-17.5 18.187 0 9.816 7.787 17.836 17.5 18.187v54.998H6.256c-.394-2.541-2.406-4.601-4.944-4.952v-25.067h41.344V86.157c4.244-2.542 6.825-6.968 6.825-11.657 0-4.69-2.581-9.115-6.825-11.657v-31.51H1.313V6.268c2.537-.35 4.593-2.41 4.943-4.952h112.088v54.998zM42.656 84.58V64.421c3.456 2.366 5.513 6.091 5.513 10.079 0 3.988-2.1 7.713-5.513 10.08zm194.031 63.106h-3.63a4.577 4.577 0 0 1 3.63-3.637v3.637zm0-54.56h-12.03v-37.25h12.03v37.25zm0-38.565h-13.343v39.88h13.344v21.911h-40.032V32.65h40.031V54.56zm0-23.226h-41.343v31.509c-4.244 2.542-6.825 6.968-6.825 11.657 0 4.69 2.581 9.115 6.825 11.657v31.51h41.344v25.066c-2.538.395-4.594 2.41-4.944 4.952H119.656V92.687c9.713-.35 17.5-8.37 17.5-18.187 0-9.816-7.787-17.836-17.5-18.187V1.315h112.088c.393 2.541 2.406 4.601 4.944 4.952v25.067zM195.344 64.42v20.158c-3.457-2.366-5.513-6.091-5.513-10.079 0-3.988 2.056-7.713 5.513-10.08zm41.344-59.469a4.577 4.577 0 0 1-3.632-3.637h3.631v3.637z"})]})})},u=(0,l.default)(o.az).withConfig({componentId:"sc-80087852-0"})(["position:absolute;> svg{position:absolute;top:0;left:0;}> *{width:100%;height:100%;}canvas{width:100%;height:100%;padding:0.5px;}"]);var h=n(1217),f=n(5961);let m=e=>{var t,n;let{dataPoints:m,numberOfMatches:p,containerId:v,direction:C="right"}=e,g=(0,l.useTheme)(),x=(0,i.useRef)(null),y=(0,r.uc)(x,{},100)||0,M={containerId:v,numberOfMatches:p,width:y,height:y*s},j=m&&(0,h.O8)(m)&&!!M.width;return(0,i.useEffect)(()=>{j&&(0,f.IJ)(m,M,g)},[v,m,M.width,g]),(0,a.jsx)("div",{style:{width:"100%"},children:(0,a.jsx)(o.az,{ref:x,w:"100%",position:"relative",pb:(0,h.fk)(C)?"".concat(100*c,"%"):"".concat(100*s,"%"),children:(0,a.jsxs)(u,{style:{transform:(0,h.EC)(C,g.settings.textDirection)},h:(0,h.G$)(C,null==(t=x.current)?void 0:t.getBoundingClientRect()),w:(0,h.DY)(C,null==(n=x.current)?void 0:n.getBoundingClientRect()),...(0,h.AK)(C),children:[j&&(0,a.jsx)("div",{id:v}),(0,a.jsx)(d,{})]})})})},p=e=>{let{direction:t="right",fill:n,style:r}=e,{colors:o,settings:i}=(0,l.useTheme)();return(0,a.jsx)("svg",{width:"66",height:"20",viewBox:"0 0 66 20",xmlns:"http://www.w3.org/2000/svg",style:{transform:(0,h.EC)(t,i.textDirection),...r},children:(0,a.jsx)("g",{fill:n||o.surface.s1,fillRule:"evenodd",children:(0,a.jsx)("path",{d:"m66 9.845-14.4 9.6V.245zM0 7.445h51.6v4.8H0z"})})})},v=e=>{let{direction:t="up"}=e,{colors:n}=(0,l.useTheme)();return(0,a.jsx)("svg",{width:"16",height:"56",viewBox:"0 0 16 56",xmlns:"http://www.w3.org/2000/svg",style:{transform:"down"===t?"rotate(180deg)":void 0},children:(0,a.jsx)("g",{fill:n.surface.s1,fillRule:"evenodd",children:(0,a.jsx)("path",{d:"m8 0 8 12H0zM6 12h4v44H6z"})})})},C=e=>{let{direction:t="right",arrowAfterHeatmap:n=!1,...r}=e;return(0,h.fk)(t)?(0,a.jsxs)(o.so,{bg:"graphicsTerrain.football",align:"center",py:"md",br:"sm",w:"100%",pl:n?"md":void 0,pr:n?void 0:"md",direction:n?"row-reverse":"row",children:[(0,a.jsx)(o.so,{w:"20%",justify:"center",children:(0,a.jsx)(v,{direction:t})}),(0,a.jsx)(o.az,{w:"80%",children:(0,a.jsx)(m,{...r,direction:t})})]}):(0,a.jsx)(o.so,{bg:"graphicsTerrain.football",justify:"center",pt:"md",pb:"xl",px:"sm",br:"lg",w:"100%",children:(0,a.jsxs)(o.so,{direction:"column",align:"center",gap:"md",maxW:280,w:"100%",children:[(0,a.jsx)(p,{direction:t}),(0,a.jsx)(m,{...r,direction:t})]})})}},53684:(e,t,n)=>{n.d(t,{G:()=>a.A,e:()=>r.e});var a=n(12605),r=n(33480)},59721:(e,t,n)=>{n.d(t,{e:()=>a.e});var a=n(33480)},69627:(e,t,n)=>{n.d(t,{O:()=>y,b:()=>a});var a={};n.r(a),n.d(a,{getHeatmapState:()=>M});var r=n(64082),o=n(6029),i=n(21501),l=n(99064),s=n(55729),c=n(41735);let d={0:"#f8d496",.05:"#fee644",.25:"#ff9000",.4:"#fc6800",.6:"#f00800",.75:"#cc0600",.85:"#b00400",.99:"#940000",1:"#780000"};var u=n(97043),h=n(73276),f=n(12232);let m=(e,{containerId:t,width:n,height:a,numberOfMatches:r,shotType:o=f.L.Total,precisionLevel:i=u.K,isTransparentBackground:l},s)=>{let c=document.getElementById(t);if(!c)throw Error("No DOM container element for HeatMap provided");let m=function(e){let t=20;return e>82?Math.round((1-Math.pow(e/110,.1))*8+12):Math.round((1-Math.pow(e/82,.1))*8+12)}(r||1),p=function(e,t,n,a){let r=(0,h.Cl)(501,441);return e.forEach(({x:e,y:n,made:a,missed:o})=>{switch(t){case f.L.Total:r[e- -250][n- -40]+=a+o;break;case f.L.Made:r[e- -250][n- -40]+=a;break;case f.L.Missed:default:r[e- -250][n- -40]+=o}}),r}(e,o,0,0);r&&r>5&&function(e,t,n,a){let r,o,i,l,s,c;for(l=0;l<=100;l++){for(r=0,o=0,i=0,s=2;s<=10;s++)++i,r+=a[l][80-s],o+=a[l][80+s];for(c=0;c<=2;c++)a[l][e+c]=(r+o)/(2*i),a[l][e-c]=(r+o)/(2*i)}}(80,2,0,p);let v=(0,h.m3)(1e3,d,l,s.setAlpha,.2),C=(0,h.RK)(m,m/3,i),g=(0,h.t6)(p,C,{width:500,height:440,influenceRadius:m,precisionLevel:i}),x=(0,h.Gj)(g,v,{height:440,width:500,gradientScaleFactor:1e3/9,gradientRange:1e3}),y=document.createElement("canvas");y.height=a,y.width=n,y.style.borderRadius="inherit";let M=y.getContext("2d");if(!M)throw Error("Heatmap canvas context not found");M.drawImage(x,0,0,n,a),c.innerHTML="",c.appendChild(y)};var p=n(18130);let v=({canvasId:e,shotCoordinates:t,numberOfMatches:n,width:a=p.f7,height:r=p.IV,shotType:i,isTransparentBackground:d})=>{let u=(0,c.useTheme)();return(0,s.useEffect)(()=>{a&&function(e,t,n){try{m(e,t,n)}catch(e){console.error("In render basketball heatmap",e)}}(t,{containerId:e,width:a,height:r,shotType:i,numberOfMatches:n,precisionLevel:10,isTransparentBackground:d},u)},[a,r,t,n,d,i]),(0,o.jsx)(l.az,{id:e,w:a,h:r,position:"absolute",borderRadius:"xs"})};var C=n(67823),g=n(13369),x=n(11810);let y=e=>{var{showLines:t=!0,showBackground:n=!0,showOverlay:a=!0,linesColor:c,backgroundColor:d,shotCoordinates:u,numberOfMatches:h,shotType:f,canvasId:m}=e,y=(0,r.T)(e,["showLines","showBackground","showOverlay","linesColor","backgroundColor","shotCoordinates","numberOfMatches","shotType","canvasId"]);let[M,j]=(0,s.useState)(!1),b=(0,s.useRef)(null),w=(0,i.uc)(b,{},100,[M]);(0,s.useEffect)(()=>{j(!0)},[]);let H=Number(w),V=H?H/p._P:void 0;return(0,o.jsxs)(l.so,Object.assign({position:"relative",justify:"center",align:"center",w:"100%",h:"100%"},y,{children:[(0,o.jsxs)(C.A,Object.assign({ref:b,style:{zIndex:1}},{children:[n&&!a&&(0,o.jsx)(x.A,{courtColor:d}),t&&(0,o.jsx)(g.A,{fill:c})]})),a&&(0,o.jsx)(v,{canvasId:m,width:H,height:V,shotCoordinates:u,numberOfMatches:h,shotType:f,isTransparentBackground:!n})]}))},M=(e,t)=>b(j(e,t)),j=(e,t)=>{switch(e){case f.L.Made:return t.filter(e=>e.made);case f.L.Missed:return t.filter(e=>e.missed);case f.L.Total:return t;default:throw Error("Invalid state")}},b=e=>e.map(e=>e.y>=390?Object.assign(Object.assign({},e),{y:390}):e)},73276:(e,t,n)=>{n.d(t,{Cl:()=>r,Gj:()=>c,RK:()=>i,m3:()=>o,t6:()=>s});var a=n(97043);let r=(e,t)=>{let n=[];for(let a=0;a{let o=document.createElement("canvas");o.width=1,o.height=e;let i=o.getContext("2d");if(!i)throw Error("No color gradient context for heatmap found");let l=i.createLinearGradient(0,0,1,e);return Object.keys(t).forEach(e=>{let o=t[Number(e)],i=Number(e);n&&i{let r=[],o=1/n;for(let n=0;n<=e;n+=o)r.push(Math.exp(-n*n/(2*t*t)));return r},l=(e,t,n,a)=>Math.sqrt(Math.pow(n-e,2)+Math.pow(a-t,2)),s=(e,t,{width:n,height:o,influenceRadius:i,precisionLevel:s=a.K})=>{let c=r(n,o);for(let a=0;a{let i=document.createElement("canvas");i.height=n,i.width=a;let l=i.getContext("2d");if(!l)throw Error("No heatmap canvas context found");let s=l.getImageData(0,0,a,n),c=s.data;for(let i=0;i{n.d(t,{U:()=>d,k:()=>u});var a=n(6029),r=n(33698),o=n(21377),i=n(99064),l=n(55729),s=n(90248),c=n(62859);let d=()=>{let[e,t]=(0,l.useState)(r.L.Total);return{selectedType:e,setSelectedType:t,getNextType:e=>{switch(e){case r.L.Total:return r.L.Missed;case r.L.Missed:return r.L.Made;case r.L.Made:default:return r.L.Total}}}},u=e=>{let{selectedType:t,setSelectedType:n}=e,d=(0,l.useContext)(c.Ws);return(0,a.jsx)(i.so,{pt:"lg",pb:"sm",justify:"center",children:(0,a.jsxs)(i.tU,{value:t,variant:"secondary",onChange:e=>n(e),children:[(0,a.jsx)(i.tU.Tab,{tabKey:r.L.Made,children:(0,a.jsx)(s.A,{id:d===o.QCR.Basketball?"player.shootmap.made":"goals"})}),(0,a.jsx)(i.tU.Tab,{tabKey:r.L.Total,children:(0,a.jsx)(s.A,{id:"player.shootmap.total"})}),(0,a.jsx)(i.tU.Tab,{tabKey:r.L.Missed,children:(0,a.jsx)(s.A,{id:"player.shootmap.missed"})})]})})}},97043:(e,t,n)=>{n.d(t,{K:()=>a});let a=10}}]);