"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3644],{65449:function(e,t,l){var n=l(85893),r=l(59929),o=l(35337),a=l(80974),i=l(88911),s=l(67294),d=l(11330),u=l(17153);let c=(e,t)=>{for(let l of e){let e=l.playerId||l.id;if(e&&t[e])return t[e][0].playByPlayLabel}};t.Z=function(e){let{colorScheme:t=d._V.LIGHT,playerId:l,shotDetails:h,hideTopBorderForTablet:m,round:x,ids:v}=e,[p,g,y]=(0,a.t)([o.Z.mobileOnly,o.Z.tabletOnly,o.Z.laptop]),f=(0,s.useCallback)(e=>(!g||!m)&&(!y||!!e),[g,m,y]);if(!h.strokes.length||!h.players.length)return null;let j=l?h.strokes.map(e=>({[l]:e[l]})).filter(e=>e[l]):h.strokes;return(0,n.jsx)(n.Fragment,{children:j.length?j.map((e,l)=>{let o=c(h.players,e),a=Object.keys(e).length>0;return o&&a?(0,n.jsxs)(r.Z,{colorScheme:t,size:"compact",showBorderTop:f(l),hideLastChildBottomBorder:p,children:[y||g?(0,n.jsx)(i.x,{as:"span",textStyle:"headline_xs_sans",children:o}):null,h.players.map((l,r,o)=>{let a=l.playerId||l.id;return a&&e[a]?e[a].map((e,i)=>{var s,d;return(0,n.jsx)(u.Z,{shot:e,player:l,hole:null===(s=h.holes)||void 0===s?void 0:s[a],isFirstRow:!r,isLastStroke:r===j.length-1,video:null==h?void 0:null===(d=h.videos)||void 0===d?void 0:d.find(t=>(null==t?void 0:t.id)===e.videoId),colorScheme:t,containerStyles:{paddingBottom:p&&r===o.length-1?"1rem":"unset"},round:x,ids:v},"".concat(a,"-").concat(i))}):null})]},"h-".concat(l+1)):null}):null})}},46946:function(e,t,l){l.d(t,{i:function(){return x}});var n=l(85893),r=l(57776),o=l(47165),a=l(67046),i=l(37626),s=l(68165),d=l(23100),u=l(37634),c=l(25675),h=l.n(c),m=l(67294);function x(e){let{match:t,isTourcast:l}=e;return(0,m.useMemo)(()=>{let[e,r]=t.teams;return{leftTeamStatusBadge:e.status!=i.tz.Unknown&&e.status!=i.tz.Tied?(0,n.jsx)(v,{label:e.status,backgroundColor:e.teamColor,tagTextColor:e.textColor,iconProps:t.matchStatusFlag?{icon:t.matchStatusFlag,alt:e.teamId}:void 0,isTourcast:l}):null,rightTeamStatusBadge:r.status!=i.tz.Unknown&&r.status!=i.tz.Tied?(0,n.jsx)(v,{label:r.status,backgroundColor:r.teamColor,tagTextColor:r.textColor,iconProps:t.matchStatusFlag?{icon:t.matchStatusFlag,alt:r.teamId}:void 0,rightSide:!0,isTourcast:l}):null}},[l,t.matchStatusFlag,t.teams])}function v(e){let{label:t,backgroundColor:l,iconProps:i,rightSide:c,isTourcast:m,tagTextColor:x,...v}=e;if((0,r.wh)())return null;let{textTransform:p,...g}=o.ZP.label_s;return(0,n.jsxs)(s.Vp,{minWidth:"5.3rem",rounded:"full",background:l,color:null!=x?x:a.Z.white,...v,children:[!i||m||c?null:(0,n.jsx)(d.Cd,{background:a.Z.white,size:"1.8rem",children:(0,n.jsx)(u.q,{src:i.icon,width:16,height:16})}),(0,n.jsx)(s.Sn,{px:"0.8rem",py:"0.6rem",...g,textTransform:"uppercase",children:t}),i&&!m&&c?(0,n.jsx)(d.Cd,{background:a.Z.white,size:"1.8rem",children:(0,n.jsx)(h(),{src:i.icon,alt:i.alt,width:16,height:16})}):null]})}t.Z=v},99612:function(e,t,l){l.d(t,{sQ:function(){return C}});var n=l(85893),r=l(67294),o=l(204),a=l(89154),i=l(88911),s=l(25675),d=l.n(s),u=l(39895),c=l(22226),h=l(53677),m=l(35337),x=l(67046),v=l(80974),p=l(37626),g=l(30079),y=l(43104),f=l(77259),j=l(46946),b=l(30252),S=l(11299),I=l(36359),k=l(4236),w=l(74165);function C(e){let{player:t,rightSide:l,teamColor:s,showShortName:x,teamFlag:g,showSponsor:j=!0,playerNameMaxWidthOverride:b}=e,k=(0,y.qM)(),C=(0,u.G_)(t.playerId),Z=(0,u.BK)(),[T,P]=(0,v.t)(["(max-width: 350px)",m.Z.mobileOnly]),_=(0,w.w9)(p.VA.Titleist),M=(0,I.tU)(t.playerId,_),{isEmbeddedWebView:B}=(0,c.lO)(),O=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),Z(t.playerId,!C,{pageArea:"".concat(S.$z.get(S.EN.PAGE_NAME),"_all_teams_table")})},[C,t.playerId,Z]),N=l?"row-reverse":"row";return(0,n.jsxs)(o.k,{gap:T?2:5,direction:N,width:"100%",children:[(0,n.jsxs)(o.k,{direction:N,gap:4,children:[B?null:(0,n.jsx)(a.h,{size:"sm",justifyContent:"flex-start","aria-label":k.get("favorite"),onClick:O,children:(0,n.jsx)(h.B,{display:"block",margin:"auto",isFavorite:C,color:C?s:void 0})}),g?(0,n.jsx)(d(),{src:g,alt:"team flag",width:12,height:12}):null,(0,n.jsx)(i.x,{textStyle:"headline_xxs_sans",whiteSpace:"nowrap",textOverflow:"ellipsis",maxW:b||(T?"7.5rem":["10rem","14rem","fit-content"]),display:"block",overflow:"hidden",children:P||x?t.shortName:t.displayName})]}),j&&M?(0,n.jsx)(f.Z,{sponsor:M}):null]})}t.ZP=function(e){let{team:t,flagIcon:l,rightSide:a,match:i,isTourcast:s,alignItems:d="center",showStatusTag:u=!0,playerNameMaxWidthOverride:c}=e,[h,y]=(0,v.t)([m.Z.laptop,m.Z.mobileOnly]),{tournament:f}=(0,k.OL)(),S=(0,r.useMemo)(()=>{if(!t.players.length)return;let[e,n]=t.players,r=e=>({name:e.displayName,imageSrc:(null==f?void 0:f.headshotBaseUrl)?(0,g.x1)(f.headshotBaseUrl,e.playerId,64):(0,g.kc)(e.playerId,64),borderColor:e.color||t.teamColor});return{team:[r(e),n?r(n):void 0],flagIcon:l,rightSide:a,flagIconStyles:{borderColor:x.Z.transparent,backgroundColor:t.textColor?t.textColor===x.Z.white?x.Z.white:x.Z.black_80:x.Z.white}}},[l,a,t.players,t.teamColor,t.textColor,null==f?void 0:f.headshotBaseUrl]);return S?(0,n.jsxs)(o.k,{gap:12,alignItems:d,direction:y?"column":a?"row-reverse":"row",justifyContent:"flex-start",w:"100%",children:[(0,n.jsx)(b.Z,{...S}),(0,n.jsx)(o.k,{direction:"column",gap:8,alignSelf:y?a?"flex-end":"flex-start":void 0,children:t.players.map(e=>(0,n.jsx)(C,{player:e,teamColor:t.teamColor,rightSide:a,playerNameMaxWidthOverride:c},e.playerId))}),t.status!=p.tz.Unknown&&t.status!=p.tz.Tied&&h&&u?(0,n.jsx)(j.Z,{label:t.status,tagTextColor:t.textColor,backgroundColor:t.teamColor,iconProps:i.matchStatusFlag?{icon:i.matchStatusFlag,alt:t.teamId}:void 0,ml:a?void 0:"auto",mr:a?"auto":void 0,rightSide:a,isTourcast:s}):null]}):null}},30252:function(e,t,l){var n=l(85893),r=l(67046),o=l(204),a=l(23100),i=l(37634),s=l(81153),d=l(54641);let u=e=>{let{player:t,flagIcon:l,flagIconStyles:d,backgroundColor:u=r.Z.white}=e,c="5.2rem";return(0,n.jsx)(o.k,{width:c,height:c,position:"relative",alignItems:"center",justifyContent:"center",children:(0,n.jsx)(a.Cd,{size:"5.6rem",background:t.borderColor,children:(0,n.jsx)(a.Cd,{size:c,background:r.Z.white,children:(0,n.jsx)(i.q,{boxSize:"4.6rem",name:t.name,src:t.imageSrc,bg:"none",sx:{position:"relative"},ignoreFallback:!0,background:u,children:l&&(0,n.jsx)(s.M,{style:{top:"3.2rem",left:"3.6rem",transform:"none",borderRadius:"10rem",borderWidth:"0.2rem",borderColor:r.Z.white,background:r.Z.white,zIndex:1,...d},boxSize:"2rem",children:l})})})})})};t.Z=function(e){let{team:t,flagIcon:l,rightSide:r,flagIconStyles:o,backgroundColor:a}=e,[i,s]=t;return(0,n.jsxs)(d.U,{spacing:-3,alignSelf:r?"flex-end":"flex-start",children:[(0,n.jsx)(u,{player:i,flagIcon:l,flagIconStyles:o,backgroundColor:a}),s?(0,n.jsx)(u,{player:s,flagIconStyles:o}):null]})}},31064:function(e,t,l){l.r(t),l.d(t,{default:function(){return C}});var n=l(85893),r=l(23100),o=l(88911),a=l(776),i=l(64927),s=l(46946),d=l(99612),u=l(43135),c=l(61331),h=l(35337),m=l(67046),x=l(80974),v=l(33225),p=l(7754),g=l(204),y=l(29700);let f=e=>{let{match:t,round:l}=e,[r]=(0,x.t)([h.Z.laptop]);return(0,n.jsx)(p.M,{h:"100%",children:(0,n.jsxs)(g.k,{direction:"column",alignItems:"center",gap:4,children:[(0,n.jsx)(o.x,{color:t.matchStatusColor,textStyle:["headline_xs_sans","headline_m_sans"],whiteSpace:"nowrap",children:t.displayScore.toUpperCase()}),(0,n.jsxs)(g.k,{gap:4,direction:r?"row":"column",children:[(0,n.jsx)(o.x,{textStyle:["label_s","label_m"],color:m.Z.dark_grey,whiteSpace:"nowrap",children:parseInt(t.matchStatus)?"Thru ".concat(t.matchStatus):t.matchStatus}),(0,n.jsx)(u.Z,{groupNumber:parseInt(t.matchId),roundNumber:l,analyticsPageArea:y.g.LEADERBOARD_ALL_PLAYERS_TABLE})]})]})})},j=e=>{let{match:t}=e,l=(0,c.gi)();return(0,n.jsx)(p.M,{h:"100%",children:(0,n.jsx)(o.x,{textStyle:["headline_xs_sans","headline_m_sans"],color:m.Z.dark_grey,w:"fit-content",whiteSpace:"nowrap",children:(0,v.xz)(t.teeTime,l,"h:mm A")})})};var b=function(e){let{match:t,round:l,isTourcast:r}=e;return r?t.displayScore?(0,n.jsx)(f,{match:t,round:l}):t.teeTime>0?(0,n.jsx)(j,{match:t}):null:t.teeTime<0?(0,n.jsx)(f,{match:t,round:l}):(0,n.jsx)(j,{match:t})},S=l(25914),I=l(25675),k=l.n(I);function w(e){let{match:t,isTourcast:l}=e,{leftTeamStatusBadge:o,rightTeamStatusBadge:a}=(0,s.i)({match:t,isTourcast:l});return(0,n.jsxs)(S.Z,{templateColumns:"repeat(2fr)",alignItems:"center",children:[(0,n.jsx)(r.xu,{justifySelf:"flex-start",children:o}),(0,n.jsx)(r.xu,{justifySelf:"flex-end",children:a})]})}var C=function(e){let{match:t,round:l,onClick:s,divider:u,dividerProps:c,showStatusTag:v,isModal:p,ariaDescription:g,isTourcast:y}=e,[f,j,I]=(0,x.t)([h.Z.mobileOnly,h.Z.tabletOnly,h.Z.laptop]),C=t.teams;return(0,n.jsxs)(r.xu,{tabIndex:-1,...g&&{"aria-describedby":"match-".concat(t.matchId),"aria-label":t.matchTitle},children:[g&&(0,n.jsx)(o.x,{hidden:!0,"aria-hidden":!0,id:"match-".concat(t.matchId),children:g}),y&&(f||j)&&(0,n.jsx)(r.xu,{paddingTop:12,children:(0,n.jsx)(w,{match:t,isTourcast:y})}),(0,n.jsxs)(S.Z,{templateColumns:"4fr 2fr 4fr",templateAreas:'"leftTeam status rightTeam"',columnGap:0,py:12,px:I?1:void 0,cursor:y?"default":"pointer",onClick:y?void 0:s,_hover:I&&!y?{backgroundColor:m.Z.off_white}:void 0,children:[(0,n.jsx)(a.P,{area:"leftTeam",children:(0,n.jsx)(d.ZP,{match:t,team:t.teams[0],alignItems:p&&f?"start":"center",flagIcon:(0,n.jsx)(k(),{src:C[0].teamFlag,alt:"".concat(C[0].teamId,"-flag"),width:16,height:16}),isTourcast:y})}),(0,n.jsx)(a.P,{area:"status",h:"5.2rem",children:(0,n.jsx)(b,{match:t,round:l,isTourcast:y})}),(0,n.jsx)(a.P,{area:"rightTeam",children:(0,n.jsx)(d.ZP,{match:t,team:t.teams[1],alignItems:p&&f?"end":"center",rightSide:!0,flagIcon:(0,n.jsx)(k(),{src:C[1].teamFlag,alt:"".concat(C[1].teamId,"-flag"),width:16,height:16}),isTourcast:y})})]}),v&&(0,n.jsx)(w,{match:t,isTourcast:y}),u?(0,n.jsx)(i.i,{marginY:f?"2rem":"3.2rem",...c}):null]})}},43644:function(e,t,l){l.d(t,{It:function(){return eI},_l:function(){return ek},Rc:function(){return eb}});var n=l(85893),r=l(67294),o=l(23100),a=l(37405),i=l(67773),s=l(22226),d=l(74059),u=l(7049),c=l(43104),h=l(29009),m=l(67046),x=l(35337),v=l(24843),p=l(80974),g=l(92421),y=l(81736),f=l(88911),j=l(31102),b=l(4236),S=l(45474),I=l(91669),k=l(204),w=l(99572),C=l(3519),Z=l(32271);let T=(e,t)=>{var l;let n=null==t?void 0:null===(l=t.players)||void 0===l?void 0:l.find(t=>t.playerId===e);return null==n?void 0:n.displayColor};var P=function(e){let{options:t,isBettingAllowed:l,scorecard:r}=e,o=(0,c.qM)();return(0,n.jsx)(k.k,{justifyContent:"space-between",zIndex:0,width:"100%",flexDirection:"column",children:null==t?void 0:t.map((e,a)=>(function(e){let{t,option:l,lastOption:r,isBettingAllowed:o,firstOption:a,team:i}=e,s=!!(o&&l.entity);return(0,n.jsxs)(k.k,{width:"100%",justifyContent:"space-between",borderBottom:r?"unset":"0.1rem solid",borderColor:m.Z.black_20,paddingTop:a?"unset":"1.6rem",paddingBottom:r?"unset":"1.6rem",children:[(0,n.jsx)(k.k,{justifyContent:"flex-start",alignItems:"center",width:"100%",children:l.isTie?(0,n.jsx)(k.k,{gap:"1.4rem",children:(0,n.jsx)(f.x,{textStyle:"headline_xs_sans",margin:"auto 0 auto 0",children:t.get("tie")})}):(0,n.jsx)(k.k,{flexDir:"column",gap:4,children:l.entity.players.map(e=>(0,n.jsxs)(k.k,{flexDirection:"row",gap:"3",alignItems:"center",children:[T(e.playerId,i)&&(0,n.jsx)(Z.Z,{color:T(e.playerId,i)}),(0,n.jsx)(f.x,{textStyle:"headline_xs_sans",children:e.displayName})]},e.playerId))})}),(0,n.jsx)(w.Z,{iconVariant:(0,C.Ir)(l.odds.oddsSwing),cursor:s?"pointer":"default",disableButton:!s,children:l.odds.odds})]})})({t:o,option:e,firstOption:0===a,lastOption:a===(null==t?void 0:t.length)-1,isBettingAllowed:l,team:null==r?void 0:r.teams.find(t=>t.teamId===e.entity.entityId)}))})},_=l(49266),M=l(28498),B=l(8668),O=function(e){let{odds:t,match:l,round:o}=e,i=(0,a.Fx)(),s=t.markets,[d,c]=(0,r.useState)(0),h=(0,u.Bu)({round:o,matchId:l.matchId}),m=(0,r.useMemo)(()=>s.map(e=>e.subMarkets.map((t,l)=>{var r;let o=null==t?void 0:null===(r=t.options)||void 0===r?void 0:r.map(e=>e).filter(e=>e);return(0,n.jsx)(_.Z,{headingLevel:"h3",title:null==e?void 0:e.header,children:null==o?void 0:o.map((e,l)=>{if(e)return(0,n.jsx)(P,{options:e.options,scorecard:h,isBettingAllowed:i},"".concat(null==t?void 0:t.header,"-").concat(null==e?void 0:e.__typename,"-").concat(l))})},null==e?void 0:e.header)})),[s,i,h]),x=(0,r.useMemo)(()=>{let e=[];return null==s||s.forEach(t=>{var l;return null==t?void 0:null===(l=t.subMarkets)||void 0===l?void 0:l.forEach(l=>{e.push((0,n.jsx)(B.Z,{children:t.header+" - "+l.header},"".concat(l.header,"-pill")))})}),e},[s]);return m.length>0?(0,n.jsx)(I.g,{spacing:24,children:(0,n.jsx)(M.Z,{tabsProps:{gap:24,width:"100%"},defaultIndex:d,onChange:c,selectedIndex:d,tabList:x,children:m})}):null},N=l(552),z=l(31064),L=l(14213),E=l(57340),H=l(82688),F=l(87161),A=function(e){var t,l,i,s,d;let{match:u,isWithinModal:h,round:v}=e,y=(0,c.qM)(),{tournament:I}=(0,b.ai)(),k=(0,a.Kg)(),w=(0,a.jI)(),C=(0,j.Wr)({entityId:u.matchId}),[Z]=(0,p.t)([x.Z.laptop]),T=(0,F.ny)(),P=(0,a.Cj)(),_=(0,r.useMemo)(()=>(0,N.R)(I,T,P),[P,I,T]);return C&&w?_==H.B.TournamentComplete?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.bK,{size:[32,null,null,40]}),(0,n.jsx)(S.Z,{title:(null===(t=C.message)||void 0===t?void 0:t.header)||y.get("tournamentCompleteOddsTitle"),body:(null===(l=C.message)||void 0===l?void 0:l.body)||y.get("tournamentCompleteOddsBody")})]}):_==H.B.Unavailable||C.markets.length<=0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.bK,{size:[32,null,null,40]}),(0,n.jsx)(S.Z,{title:(null===(i=C.message)||void 0===i?void 0:i.header)||y.get("unavailableOddsTitle"),body:(null===(s=C.message)||void 0===s?void 0:s.body)||y.get("unavailableTeamStrokePlayOddsBody")})]}):(0,n.jsxs)(L.Z,{headerSlot:null,children:[Z?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.bK,{mt:["0.4rem","0.8rem"]}),(0,n.jsx)(z.default,{match:u,round:v,divider:!0,dividerProps:{marginY:["2rem","3.2rem"]},showStatusTag:!0,isModal:!0})]}),(0,n.jsxs)(o.xu,{paddingTop:Z?"0.8rem":void 0,marginBottom:h?"5rem":"unset",children:[(0,n.jsx)(O,{odds:C,match:u,round:v}),(0,n.jsx)(o.bK,{size:[16,24]}),(0,n.jsx)(f.x,{textStyle:"headline_xxs_sans",color:m.Z.dark_grey,fontSize:"1.5rem",children:null!==(d=null==k?void 0:k.oddsDisclaimer)&&void 0!==d?d:y.get("oddsDisclaimer")}),(0,n.jsx)(o.bK,{size:[16,40]})]}),Z?(0,n.jsx)(o.xu,{position:"absolute",left:"-3.2rem",right:"-3.2rem",bottom:"-3.2rem",children:(0,n.jsx)(E.Z,{isWithinModal:h})}):(0,n.jsx)(E.Z,{isWithinModal:h})]}):(0,n.jsx)(g.Z,{})},D=l(16810),R=l(44034),K=function(e){let{match:t,round:l,highlights:r}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.bK,{size:["2rem","3.2rem"]}),(0,n.jsx)(z.default,{match:t,round:l,divider:!0,dividerProps:{marginBottom:0},isModal:!0,showStatusTag:!0}),(0,n.jsx)(y.Z,{highlights:r})]})},V=l(31935),U=l(95197),G=l(43088),W=l(5152),q=l.n(W),Y=l(30077),Q=l(37626);let $=q()(()=>Promise.all([l.e(1547),l.e(3321)]).then(l.bind(l,73321)),{loadableGenerated:{webpack:()=>[73321]}}),X=q()(()=>Promise.resolve().then(l.bind(l,31064)),{loadableGenerated:{webpack:()=>[31064]}}),J=q()(()=>l.e(9817).then(l.bind(l,19817)),{loadableGenerated:{webpack:()=>[19817]}}),ee=q()(()=>Promise.all([l.e(1547),l.e(5419)]).then(l.bind(l,45419)),{loadableGenerated:{webpack:()=>[45419]}}),et=q()(()=>l.e(8947).then(l.bind(l,47195)),{loadableGenerated:{webpack:()=>[47195]}});var el=function(e){let{match:t,round:l,scorecard:a}=e,{tournament:i}=(0,b.OL)(),[s,d]=(0,p.t)([x.Z.mobileOnly,x.Z.tabletOnly]),u=null==a?void 0:a.currentHole,c=null==a?void 0:a.matchHoleScores,[h,m]=(0,r.useState)(!0),[v,y]=(0,r.useState)(()=>(null==c?void 0:c.length)?c[u?u-1:1]:void 0),f=(0,r.useCallback)(e=>{m((null==e?void 0:e.courseHoleNumber)==="".concat(null==a?void 0:a.currentHole)),y(e)},[null==a?void 0:a.currentHole]),j=(0,V.zR)("playerScorecard"),S=(0,r.useMemo)(()=>{var e;let l=null==j?void 0:null===(e=j.adTagRows)||void 0===e?void 0:e[0];if(!l)return;let r="pb-slot-".concat(l.pos,"-").concat(t.matchId);return(0,n.jsx)(V.ZP,{adSlotBaseDivId:"pb-slot-sc-bnr",adTagRowConfig:l,customTargetValues:{s4:"player-scorecard"}},r)},[j,t.matchId]);if((0,r.useEffect)(()=>{h&&(null==a?void 0:a.currentHole)&&y(c[a.currentHole-1])},[c,null==a?void 0:a.currentHole,h]),!a)return(0,n.jsx)(g.Z,{});let{teams:I}=a,w=3===I.length;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.bK,{size:["2rem","3.2rem"]}),2===I.length?(0,n.jsx)(X,{match:t,round:l,divider:!0,showStatusTag:!0,isModal:!0}):3===I.length?(0,n.jsx)(et,{match:t,round:l,divider:!0,isModal:!0,hideMatchInfo:!0}):null,S,(0,n.jsx)(o.bK,{size:["2rem","3.2rem"]}),(0,n.jsxs)(k.k,{justifyContent:"space-between",paddingBottom:"1.2rem",children:[(0,n.jsx)(G.Z,{title:a.scorecardTitle}),(0,n.jsx)(U.Z,{})]}),s?(0,n.jsx)($,{scorecard:a,matchStatus:t.matchStatus,round:l,match:t}):2===I.length?(0,n.jsx)(J,{scorecard:a,matchStatus:t.matchStatus,handleSelectedHole:f,selectedHole:v}):3===I.length?(0,n.jsx)(ee,{scorecard:a,matchStatus:t.matchStatus,handleSelectedHole:f,selectedHole:v}):null,w?(0,n.jsx)(o.bK,{size:["2rem","8rem"]}):null,v&&d&&(null==i?void 0:i.scoredLevel)===Q.cA.Tourcast?(0,n.jsx)(Y.l,{selectedHole:v,scorecard:a,round:l,setSelectedHole:f,match:t}):null,(0,n.jsx)(o.bK,{size:["2rem","8rem"]})]})},en=l(2126),er=l(28741),eo=function(e){let{round:t,match:l,onClose:d,onTabChange:h,defaultTab:m,isOpen:x=!1}=e,v=(0,s.lO)(),p=(0,s.VI)(v),g=(0,c.qM)(),y=(0,a.Cj)(),f=(0,u.Bu)({round:t,matchId:l.matchId}),{queryIds:j}=eb(l),b=(0,i.f4)(j),S=(0,r.useMemo)(()=>b||[],[b]),I=(0,r.useMemo)(()=>{let e=new Map;f&&e.set("scorecard",(0,n.jsx)(el,{match:l,round:t,scorecard:f})),S.length>0&&e.set("highlights",(0,n.jsx)(K,{match:l,round:t,highlights:S})),y&&e.set("odds",(0,n.jsx)(A,{match:l,round:t,isWithinModal:!0}));let r=0,o=0;e.forEach((e,t)=>{t==(null==m?void 0:m.toLowerCase())&&(r=o),o++});let a=[];return p.scorecardPaths.forEach(t=>{let l=e.get(t);l&&a.push({name:g.get(t),content:l})}),{defaultIndex:m?r:0,items:a,listProps:{position:"relative"},negateMargin:!0,tabStylesProps:{borderBottomWidth:"0.4rem",height:"3.95rem"}}},[g,p.scorecardPaths,m,l,t,S,y,f]),w=(0,n.jsx)(k.k,{flexDirection:"column",alignItems:"center",justifyContent:"center",marginBottom:[25,20],paddingTop:"0.4rem",children:(0,n.jsx)(G.Z,{headerTextProps:{fontSize:"2.4rem"},title:"".concat(g.get("match",{number:l.matchId}))})});return(0,n.jsx)(D.h,{zIndex:R.rS.zIndices.modal-100,children:(0,n.jsx)(o.xu,{children:(0,n.jsx)(er.Z,{isOpen:x,onClose:d,headerSlot:w,hasStickyHeader:!0,modalHeaderProps:{position:"absolute",top:"0",paddingBottom:"0.5rem"},modalBodySlot:(0,n.jsx)(en.Z,{items:I.items,defaultIndex:I.defaultIndex,negateMargin:!0,isTabListSticky:!0,innerFlexStylesProps:{width:"120%"},onTabChange:h})})})})},ea=l(35471),ei=l(73688);let es=q()(()=>l.e(8986).then(l.bind(l,58986)),{loadableGenerated:{webpack:()=>[58986]}}),ed=q()(()=>l.e(744).then(l.bind(l,30744)),{loadableGenerated:{webpack:()=>[30744]}});function eu(e){var t,l,i;let{openModal:s,matchStatus:d,matchId:h,round:m,onLeaderboardEvent:v}=e,y=(0,c.qM)(),[f]=(0,p.t)([x.Z.mobileOnly]),j=(0,u.Bu)({round:m,matchId:h}),{tournament:S}=(0,b.OL)(),I=(0,V.zR)("scorecard"),w=(0,a.Yy)(),C=(0,r.useMemo)(()=>{var e,t;return null===(t=I.generateAdSlotDetails(I.adTagRows,"pb-slot-sc-bnr"))||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.adSlot},[I]),Z=(0,a.Ev)(w,null==j?void 0:j.tourcastUrlWeb,{tournament:null==S?void 0:S.id,hole:null==j?void 0:j.currentHole,matchId:h,round:m});if(!j)return(0,n.jsx)(g.Z,{});let{teams:T}=j;return(0,n.jsxs)(k.k,{flexDirection:"column",paddingTop:["1rem","0rem"],position:"relative",children:[(0,n.jsx)(G.Z,{title:y.get("matchSummary")}),3===T.length?(0,n.jsx)(ed,{scorecard:j,matchStatus:d}):2===T.length?(0,n.jsx)(es,{scorecard:j,matchStatus:d}):null,(null===(t=j.messages)||void 0===t?void 0:t.length)?(0,n.jsx)(ea.Z,{title:null===(l=j.messages)||void 0===l?void 0:l[0].title,body:null===(i=j.messages)||void 0===i?void 0:i[0].body,margin:"2.4rem 0 0"}):null,(0,n.jsx)(ei.a,{isMobile:f,openModal:s,tourcastUrl:Z,onLeaderboardEvent:v}),(0,n.jsx)(o.bK,{size:[null,"2.4rem"]}),C,(0,n.jsx)(o.bK,{size:["2.4rem",null]})]})}let ec=q()(()=>Promise.all([l.e(1547),l.e(5419)]).then(l.bind(l,45419)),{loadableGenerated:{webpack:()=>[45419]}}),eh=q()(()=>l.e(9817).then(l.bind(l,19817)),{loadableGenerated:{webpack:()=>[19817]}});var em=function(e){let{scorecard:t,matchStatus:l,round:a,match:i}=e,s=(0,V.zR)("scorecard"),{tournament:d}=(0,b.OL)(),{teams:u}=t,[c,h]=(0,r.useState)(()=>t.matchHoleScores[t.currentHole-1]),[m,x]=(0,r.useState)(!0),v=2==u.length,p=3==u.length,g=(0,r.useCallback)(e=>{x(e.courseHoleNumber==="".concat(t.currentHole)),h(e)},[h,t.currentHole]),y=(0,r.useMemo)(()=>{var e,t;return null===(t=s.generateAdSlotDetails(s.adTagRows,"pb-slot-sc-bnr"))||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.adSlot},[s]);return(0,r.useEffect)(()=>{m&&t.currentHole&&h(t.matchHoleScores[t.currentHole-1])},[t,m]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.bK,{size:"2.4rem"}),y,(0,n.jsxs)(k.k,{justifyContent:"space-between",paddingTop:"2.4rem",paddingBottom:"1.2rem",children:[(0,n.jsx)(G.Z,{title:null==t?void 0:t.scorecardTitle}),(0,n.jsx)(U.Z,{})]}),p?(0,n.jsx)(ec,{scorecard:t,matchStatus:l,selectedHole:c,handleSelectedHole:g}):v?(0,n.jsx)(eh,{scorecard:t,matchStatus:l,selectedHole:c,handleSelectedHole:g}):null,v&&(null==d?void 0:d.scoredLevel)===Q.cA.Tourcast?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.bK,{size:"2.4rem"}),(0,n.jsx)(Y.l,{scorecard:t,round:a,selectedHole:c,match:i})]}):null]})},ex=l(80557),ev=l(39503),ep=function(e){let{isOpen:t,children:l,styleProps:a}=e,[i,s]=(0,r.useState)("0"),d=(0,r.useRef)(null),u=(0,r.useCallback)(()=>{var e;s("".concat(null===(e=d.current)||void 0===e?void 0:e.scrollHeight,"px")),setTimeout(()=>{s("auto")},ex.Z.duration["duration-base"]+10)},[]);return(0,r.useEffect)(()=>{t&&u()},[u,t]),(0,n.jsx)(o.xu,{ref:d,pos:"sticky",left:0,w:"100%",height:i,...ev.x,transitionProperty:"height",overflow:"hidden",whiteSpace:"normal",...a,children:l})},eg=l(11299),ey=l(97902),ef=l(62401),ej=l(21866);function eb(e){let t=e.teams.every(e=>1===e.players.length),l=e.teams.map(e=>e.teamId),n=e.teams.flatMap(e=>e.players.map(e=>e.playerId));return{queryIds:t?n:[...l,...n],playerIds:n}}function eS(e){let{defaultTab:t,match:l,round:o,scorecard:d,onClose:u,onLeaderboardEvent:x}=e,v=(0,s.lO)(),p=(0,s.VI)(v),g=(0,c.qM)(),f=(0,a.Cj)(),{queryIds:j,playerIds:b}=eb(l),S=(0,i.f4)(j),[I,k]=(0,r.useState)(!1),w=(0,r.useMemo)(()=>S||[],[S]),C=(0,r.useCallback)(()=>{null==x||x({eventType:eg.M1.MODAL}),k(!0)},[x]),Z=(0,r.useCallback)(()=>{k(!1)},[]),T=(0,r.useCallback)((e,t)=>{null==x||x({eventType:eg.M1.TAB,playerId:b,value:(0,ey.eA)(t)})},[x,b]),P=(0,r.useMemo)(()=>{let e=new Map;e.set("scorecard",(0,n.jsx)(em,{scorecard:d,matchStatus:l.matchStatus,round:o,match:l})),f&&e.set("odds",(0,n.jsx)(A,{match:l,round:o})),w.length>0&&e.set("highlights",(0,n.jsx)(y.Z,{highlights:w}));let r=0,a=0;e.forEach(function(e,l){l==(null==t?void 0:t.toLowerCase())&&(r=a),a++});let i=[];return p.scorecardPaths.forEach(t=>{let l=e.get(t);l&&i.push({name:g.get(t),content:l})}),{defaultIndex:t?r:0,items:i,listProps:{position:"relative"},negateMargin:!0,tabStylesProps:{borderBottomWidth:"0.4rem",height:"4.1rem"}}},[d,l,f,w,p.scorecardPaths,t,o,g]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.Z,{buttonSlot:null,tabs:P,title:null,borderRadius:"8px",paddingY:[24,null,32],paddingX:[20,24,32],background:m.Z.black_5,closeButtonProps:{size:"micro","aria-label":g.get("close"),onClick:e=>{null==u||u(e)}},mobileContent:(0,n.jsx)(eu,{openModal:C,matchStatus:l.matchStatus,matchId:l.matchId,round:o,onLeaderboardEvent:x}),onTabChange:T}),(0,n.jsx)(eo,{match:l,round:o,isOpen:I,onClose:Z,onTabChange:T})]})}function eI(e){let{match:t,round:l,defaultTab:r,onClose:a,isOpen:i=!1}=e,[s]=(0,p.t)([x.Z.mobileOnly]),d=(0,u.Bu)({round:l,matchId:t.matchId}),c=(0,ef.w)();return i?(0,n.jsx)(o.xu,{position:"relative",marginBottom:[0,"1.2rem"],mx:s?-v.Z.gutters_small:void 0,children:(0,n.jsx)(ep,{isOpen:i,children:d?(0,n.jsx)(eS,{scorecard:d,match:t,onClose:a,round:l,defaultTab:r,onLeaderboardEvent:c}):(0,n.jsx)(g.Z,{})})}):null}function ek(e){let{round:t,matchId:l,onClose:r,defaultTab:o}=e,a=(0,d.US)(t),i=(0,u.Bu)({round:t,matchId:l}),s=null==a?void 0:a.matches.find(e=>e.matchId==l),c=(0,ej.j)();return i&&s?(0,n.jsx)(eS,{match:s,scorecard:i,round:t,defaultTab:o,onClose:r,onLeaderboardEvent:c}):(0,n.jsx)(g.Z,{})}},30077:function(e,t,l){l.d(t,{l:function(){return X}});var n=l(85893),r=l(67294),o=l(80974),a=l(35337),i=l(80557),s=l(26981),d=l(23100),u=l(12514),c=l(5320),h=l(7791),m=l(62562),x=l(61550),v=l(31169),p=l(63512),g=l(62759),y=l(49007),f=l(67046),j=l(43104),b=l(37626),S=l(11299),I=l(62401),k=l(62723),w=l(204),C=l(5403),Z=l(11330),T=l(4755),P=l(32410),_=l(65449),M=l(87983),B=l(25911),O=l(3143),N=l(69786);function z(e){let{holeNumber:t,players:l,playerIds:n,scorecard:r,allShotDetails:o}=e,a=function(e){let{allShotDetails:t,holeNumber:l,scorecard:n}=e,r=n.scorecardTitle.toLowerCase().includes("singles"),o=n.scorecardTitle.toLowerCase().includes("four-ball"),a=[];return null==t||t.reduce((e,t)=>{let n=t.holes.find(e=>e.holeNumber===l);return null==n||n.strokes.forEach(l=>{var n,a;let i=r||o?t.playerId:null===(n=l.player)||void 0===n?void 0:n.playerIdString;i&&(e[l.strokeNumber-1]={...e[l.strokeNumber-1],[i]:(null===(a=e[l.strokeNumber-1])||void 0===a?void 0:a[i])?[...e[l.strokeNumber-1][i],l]:[l]})}),e},a),a}({allShotDetails:o,holeNumber:t,scorecard:r});return{holes:function(e){let{allShotDetails:t,playerIds:l,holeNumber:n,scorecard:r}=e,o=r.scorecardTitle.toLowerCase().includes("singles"),a=r.scorecardTitle.toLowerCase().includes("four-ball");if(!t)return;let i={};return l.forEach(e=>{let l=null==t?void 0:t.find(t=>t.playerId===e),r=null==l?void 0:l.holes.find(e=>e.holeNumber===n);if(o||a)i[e]=r;else{let e=null==r?void 0:r.strokes.reduce((e,t)=>{var l;let n=null===(l=t.player)||void 0===l?void 0:l.playerIdString;return n&&!e.includes(n)&&e.push(n),e},[]);null==e||e.forEach(e=>i[e]=r)}}),i}({allShotDetails:o,playerIds:n,holeNumber:t,scorecard:r}),players:l,strokes:a,videos:null==o?void 0:o.reduce((e,t)=>(t.shotVideos&&(e=[...e,...t.shotVideos]),e),[])}}let L=e=>{let{allShotDetails:t,scorecard:l,selectedHole:n}=e;return(0,r.useMemo)(()=>{let e=[],r=[];l.teams.forEach(t=>{var l;null===(l=t.players)||void 0===l||l.forEach(t=>e.push(t.playerId)),r.push(t.teamId)});let o=l.scorecardTitle.toLowerCase().includes("foursomes");return(o?r:e).map(e=>{let l=null==t?void 0:t.find(t=>t.playerId===e),r=null==l?void 0:l.holes.find(e=>e.holeNumber===parseInt(n.holeNumber));return o?{teamId:e,hole:r}:{playerId:e,hole:r,lineColor:null==l?void 0:l.lineColor}})},[t,l,n])};function E(e){return(0,r.useMemo)(()=>{let t=[],l=[],n=[];return e.teams.forEach(e=>{var r;null===(r=e.players)||void 0===r||r.forEach(e=>{t.push(e),l.push(e.playerId)}),n.push(e.teamId)}),{players:t,playerIds:l,teamIds:n}},[e.teams])}function H(e){return e.scorecardTitle.toLowerCase().includes("foursomes")}var F=l(37405),A=l(4236),D=l(45658);function R(e){let{selectedHole:t,hole:l,scorecard:i,allShotDetails:s,round:d,match:c}=e,h=(0,j.qM)(),[m,x,R]=(0,o.t)([a.Z.mobileOnly,a.Z.tabletOnly,a.Z.laptop]),[K,V]=(0,r.useState)(!1),{isTourcastView:U,overrideDefault:G}=(0,p.b2)(),W=s[0].defaultHolePickle===b.zz.Tourcast_2D&&!!l.enhancedPickle,q=G?U:W,Y=K||q?Z._V.DARK:Z._V.LIGHT,Q=(0,B.YJ)({isMobile:m,isEnhancedView:q}),$=(0,I.w)(),{players:X,playerIds:J,teamIds:ee}=E(i),et=H(i),el=et?ee:J,en=(0,v.Mx)(el,d,parseInt(t.holeNumber),!0),er=function(e){let{scorecard:t}=e;return t.id.slice(0,8).endsWith("500")}({scorecard:i}),{isOpen:eo,onOpen:ea,onClose:ei}=(0,k.q)(),{tournament:es}=(0,A.OL)(),ed=(0,F.Yy)(),eu=z({holeNumber:parseInt(t.holeNumber),players:X,playerIds:el,scorecard:i,allShotDetails:s}),ec=L({round:d,ids:el,scorecard:i,allShotDetails:s,selectedHole:t}),{displayHoleNumber:eh,par:em,yardage:ex,holePickleGreenLeftToRight:ev,holePickleLeftToRight:ep,holePickleBottomToTop:eg,holePickleGreenBottomToTop:ey,enhancedPickle:ef}=l,ej=(0,T.wM)({holeNumber:eh,par:em,yardage:ex}),eb=(0,T.W7)({showGreen:K,holePickleGreenLeftToRight:ev,holePickleLeftToRight:ep,holePickleBottomToTop:eg,holePickleGreenBottomToTop:ey,enhancedPickle:ef,showEnhancedPickle:q}),{currentStroke:eS,currentPlayer:eI}=(0,N.O$)({shotDetails:eu}),ek=(0,r.useMemo)(()=>Q?et?(0,n.jsx)(O.Z,{width:Q.width,height:Q.height,holeType:K?"green":"overview",currentHole:l,teamsHoleShotInfo:ec,isPresCup:er,isEnhancedView:q,showTee:!0,showFlag:!0}):(0,n.jsx)(P.Z,{width:Q.width,height:Q.height,holeType:K?"green":"overview",currentHole:l,playersHoleShotInfo:ec,showTee:!0,showFlag:!0,penaltyFillColor:B.Pt.penaltyColor,penaltyTextColor:f.Z.white,penaltyBorderColor:B.Pt.penaltyColor,isPresCup:er,isEnhancedView:q}):null,[Q,et,K,l,ec,er,q]),ew=(0,r.useCallback)(()=>{ea(),null==$||$({eventType:S.M1.PLAY_BY_PLAY})},[$,ea]),eC=(0,r.useCallback)(e=>{let t=e==h.get("green");t!==K&&(null==$||$({eventType:S.M1.HOLE_GREEN,value:t})),V(t)},[K,h,$]),eZ=(0,r.useCallback)(()=>(0,n.jsx)(g.Z,{labels:[h.get("hole"),h.get("green")],defaultSelectedValue:K?h.get("green"):h.get("hole"),onChangeValue:eC,colorScheme:K||q?Z._V.LIGHT:Z._V.DARK}),[h,K,eC,q]),eT=(0,F.Ev)(ed,i.tourcastUrlWeb||i.tourcastUrl,{tournament:null==es?void 0:es.id,hole:l.holeNumber,matchId:null==c?void 0:c.matchId,round:d});return(0,n.jsx)(y.Z,{colorScheme:Y,imageOverlay:ek,imageProps:eb,isPickle:!K&&!q,backgroundColor:f.Z.white,overlayProps:{hasOverlayGradient:q,heroStatsProps:{stats:ej},topRightSlot:(0,n.jsxs)(w.k,{flexDir:"column",gap:"1.6rem",alignItems:"flex-end",children:[R||x?(0,n.jsx)(w.k,{flexDir:"column",gap:"1.6rem",alignItems:"flex-end",children:(0,n.jsx)(C.Z,{colorScheme:Y,onClick:ew})}):en?(0,n.jsx)(M.t,{video:en,playerIds:el,round:d}):null,l.enhancedPickle&&(0,n.jsx)(D.t,{colorScheme:Y,showGreen:K,isTeeTimeDrawer:!1,isTourcastOn:q})]}),bottomCenterSlot:R||x?(0,n.jsx)(T.lT,{colorScheme:Y,playerName:(null==eI?void 0:eI.playerName)||"",playerColor:(null==eI?void 0:eI.playByPlay)||"",message:(null==eS?void 0:eS.playByPlay)||""}):eZ(),bottomRightSlot:eT&&!m?(0,n.jsx)(u.Ah,{href:eT,customTourcastPillProps:{pillProps:{backgroundColor:f.Z.white,color:f.Z.black,textStyle:"headline_xs_sans",minW:"16rem"}},isShotDetails:!0}):null,bottomLeftSlot:R||x?eZ():null,bottomRightSecondarySlot:en&&!m?(0,n.jsx)(w.k,{justifyContent:"center",children:(0,n.jsx)(M.t,{video:en,playerIds:el,round:d})}):null,drawerProps:{title:h.get("playByPlay"),children:(0,n.jsx)(_.Z,{shotDetails:eu,colorScheme:Y,hideTopBorderForTablet:!0,round:d,ids:el}),isOpen:eo,onClose:ei,width:x?"45%":"40%"}}})}var K=l(859),V=l(43088),U=l(55095),G=l(30079),W=l(88911),q=l(25675),Y=l.n(q);function Q(e){let{team:t,headshotBaseUrl:l}=e,o=(0,r.useCallback)(e=>l?(0,G.x1)(l,e,56):(0,G.kc)(e,56),[l]);return(0,n.jsx)(w.k,{alignItems:"center",flexDir:"column",children:t.map((e,t,l)=>(0,n.jsxs)(w.k,{alignItems:"center",justifyContent:"center",flexDir:"column",children:[(0,n.jsx)(U.Z,{name:e.displayName||"unknown",imageSrc:o(e.playerId),flagIcon:(0,n.jsx)(Y(),{src:e.countryFlag,alt:"".concat(e.playerId,"-flag"),width:16,height:16}),size:"5.2rem",borderColor:null==e?void 0:e.displayColor,borderSize:"5.6rem"},e.playerId),(0,n.jsx)(W.x,{textStyle:"headline_xxs_sans",mt:"1rem",children:e.shortName}),t!==l.length-1&&(0,n.jsx)(d.bK,{size:"2.8rem"})]},"".concat(e.playerId,"-avatar")))})}function $(e){let{playersByTeam:t,headshotBaseUrl:l}=e,r=(0,j.qM)(),o=t[0],a=t[1];return o.length&&a.length?(0,n.jsx)(w.k,{justifyContent:"center",paddingBottom:"1.5rem",paddingX:"1.5rem",gap:"5rem",children:(0,n.jsxs)(w.k,{gap:26,children:[(0,n.jsx)(Q,{team:o,headshotBaseUrl:l}),(0,n.jsx)(w.k,{height:"85%",justifyContent:"center",alignItems:"center",ml:"0.5rem",children:(0,n.jsx)(W.x,{textStyle:"headline_xxs_sans",color:f.Z.dark_grey,children:r.get("versus")})}),(0,n.jsx)(Q,{team:a,headshotBaseUrl:l})]})}):null}function X(e){var t;let{scorecard:l,round:v,selectedHole:p,tableSwiperInstance:y,isToggleVisible:f,setSelectedHole:b,match:S}=e,I=(0,j.qM)(),[k,w]=(0,r.useState)(),[C,Z]=(0,r.useState)(!0),[T,P]=(0,r.useState)(!1),[M]=(0,o.t)([a.Z.mobileOnly]),{players:B,playerIds:O,teamIds:N}=E(l),L=H(l)?N:O,D=(0,c.Ix)(L,v,!0),U=null==D?void 0:null===(t=D[0])||void 0===t?void 0:t.holes.find(e=>e.holeNumber===parseInt((null==p?void 0:p.holeNumber)||"")),{tournament:G}=(0,A.OL)(),W=(0,F.Yy)(),q=l.teams.map(e=>e.players||[]),Y=z({holeNumber:parseInt(p.holeNumber),players:B,playerIds:L,scorecard:l,allShotDetails:D}),Q=(0,F.Ev)(W,l.tourcastUrlWeb||l.tourcastUrl,{tournament:null==G?void 0:G.id,hole:parseInt(null==p?void 0:p.holeNumber),matchId:null==S?void 0:S.matchId,round:v}),X=(0,r.useMemo)(()=>{var e;return null!==(e=null==D?void 0:D[0].holes.findIndex(e=>e.holeNumber.toString()===(null==p?void 0:p.holeNumber)))&&void 0!==e?e:-1},[null==p?void 0:p.holeNumber,D]),J=(0,r.useCallback)(()=>{let e=k&&(null==D?void 0:D.length)?D[0].holes.at(k.activeIndex):void 0;e&&b&&!C&&b(l.matchHoleScores.find(t=>parseInt(t.holeNumber)==e.holeNumber))},[D,l,b,k,C]),ee=(0,r.useCallback)(e=>{P(e==I.get("playByPlay"))},[I]);return((0,r.useEffect)(()=>{y&&y.slideTo((0,K.sE)(!1,parseInt(p.holeNumber)),i.Z.duration["duration-long"])},[y,p]),(0,r.useEffect)(()=>{k&&D&&X>=0&&k.slideTo(X,i.Z.duration["duration-long"])},[k,l,D,X]),(0,r.useEffect)(()=>{T?Z(!0):!T&&C&&Z(!1)},[T,C]),(null==D?void 0:D.length)&&M)?(0,n.jsxs)(n.Fragment,{children:[f&&(0,n.jsx)(g.Z,{labels:[I.get("shotTrails"),I.get("playByPlay")],defaultSelectedValue:I.get("shotTrails"),onChangeValue:ee,size:"fluid"}),T?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.bK,{size:"2rem"}),(0,n.jsx)(V.Z,{title:I.get("playByPlay")}),(0,n.jsx)(d.bK,{size:"1.2rem"}),(0,n.jsx)(_.Z,{shotDetails:Y,round:v,ids:L})," "]}):(0,n.jsx)(h.ZP,{margin:[40],marginTop:"2rem",children:(0,n.jsx)(m.Z,{setSwiperInstance:w,onChange:J,slideWidth:["calc(100% - ".concat(s.Z[40],"*2)"),"calc(100% - ".concat(s.Z[64],"*2)")],initialSlide:parseInt(null==p?void 0:p.holeNumber)-1,children:D[0].holes.map((e,t)=>{var r;return(0,n.jsx)(x.Z,{heroSlot:(0,n.jsx)(R,{selectedHole:p,hole:e,scorecard:l,allShotDetails:D,round:v,match:S}),ctaSlot:M&&Q&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.Ah,{href:Q,height:"4.3rem"}),(0,n.jsx)(d.bK,{size:5}),(0,n.jsx)($,{playersByTeam:q,headshotBaseUrl:null!==(r=null==G?void 0:G.headshotBaseUrl)&&void 0!==r?r:void 0})]}),titleSlot:null,itemListSlot:null,isMetaVisible:!0},"".concat(t," - ").concat(e))})||[]})})]}):U&&D?(0,n.jsx)(R,{selectedHole:p,hole:U,scorecard:l,allShotDetails:D,round:v,match:S}):null}},3143:function(e,t,l){var n=l(85893),r=l(67294),o=l(25911),a=l(35337),i=l(67046),s=l(37626),d=l(80974);t.Z=function(e){let{currentHole:t,height:l,holeType:u,showFlag:c,showTee:h,teamsHoleShotInfo:m,width:x,isPresCup:v,isEnhancedView:p}=e,[g]=(0,d.t)([a.Z.mobileOnly]),y=g?"bottomToTopCoords":"leftToRightCoords",f="green"==u?"green":p?"enhanced":"overview",{xCoordinateKey:j,yCoordinateKey:b}=(0,o.cr)(p),S=(0,r.useMemo)(()=>m.map(e=>{var t;return null==e?void 0:null===(t=e.hole)||void 0===t?void 0:t.strokes.map((t,r)=>{var a;if(!t)return null;let{pointACoords:d,pointBCoords:c,isPenalty:h}=(0,o.oQ)(t,u,y,x,l,p);return(0,n.jsx)("path",{d:"M".concat(d.x," ").concat(d.y," L").concat(c.x," ").concat(c.y),stroke:h?o.Pt.penaltyColor:(null===(a=t.player)||void 0===a?void 0:a.color)||i.Z.black,strokeDasharray:t.strokeType==s.Im.Drop||t.strokeType==s.Im.Provisional?(0,o.f3)(o.Pt.dottedLineSize[u],g):void 0,strokeWidth:(0,o.f3)(o.Pt.lineWidth[u],g)},"stroke-line-".concat(e.teamId,"-").concat(r))})}),[l,u,p,g,y,m,x]),I=(0,r.useMemo)(()=>m.map((e,t)=>{var r;return null==e?void 0:null===(r=e.hole)||void 0===r?void 0:r.strokes.map((r,a)=>{var s;if(!r||!r.groupShowMarker)return null;let{pointACoords:d,pointBCoords:c,isPenalty:h}=(0,o.oQ)(r,u,y,x,l,p),v=1/(m.length+1)*(t+1),j=(0,o.aF)(v,d,c);return(0,n.jsx)(o.Ow,{x:j.x,y:j.y,strokeColor:h?o.Pt.penaltyColor:(null===(s=r.player)||void 0===s?void 0:s.color)||i.Z.black,yardage:r.markerText,isMobile:g,viewType:f},"yard-marker-".concat(e.teamId,"-").concat(a))})}),[l,u,p,g,y,m,f,x]),k=(0,r.useMemo)(()=>m.map(e=>{var t;return null==e?void 0:null===(t=e.hole)||void 0===t?void 0:t.strokes.map((t,a)=>{var d,c,h,m;if(!t)return null;let{pointBCoords:j,isPenalty:b}=(0,o.oQ)(t,u,y,x,l,p);return(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("circle",{cx:j.x,cy:j.y,r:(0,o.f3)(o.Pt.circleRadius[f],g),stroke:t.finalStroke?o.Pt.finalStrokeColor:b?(null===(d=t.player)||void 0===d?void 0:d.color)||i.Z.black:void 0,strokeWidth:t.finalStroke||b?(0,o.f3)(o.Pt.finalStrokeCircleBorderSize[f],g):void 0,fill:b?v?i.Z.dark_grey:o.Pt.penaltyColor:(null===(c=t.player)||void 0===c?void 0:c.color)||i.Z.black}),(0,n.jsx)("text",{textAnchor:"middle",x:j.x,y:j.y,dy:".35em",fontWeight:"600",fontSize:(0,o.f3)(o.Pt.numberFontSize[f],g),fill:((null===(h=t.player)||void 0===h?void 0:h.color)!==i.Z.yellow||b)&&((null===(m=t.player)||void 0===m?void 0:m.color)!==i.Z.gold||b)?"white":"black",children:t.strokeType==s.Im.Provisional?"P":t.strokeNumber})]},"stroke-circle-".concat(e.teamId,"-").concat(a))})}),[m,u,y,x,l,p,f,g,v]),w=(0,r.useMemo)(()=>{let e="green"==u?t.teeGreen[y]:t.teeOverview[y];return(0,n.jsx)(o.up,{radius:(0,o.f3)(o.Pt.tee[f],g),x:e[j]*x,y:e[b]*l})},[u,t.teeGreen,t.teeOverview,y,f,g,j,x,b,l]),C=(0,r.useMemo)(()=>{if(!t.pinGreen||!t.pinOverview)return(0,n.jsx)(n.Fragment,{});let e="green"==u?t.pinGreen[y]:t.pinOverview[y];return(0,n.jsx)(o.lO,{x:e[j]*x,y:e[b]*l,width:(0,o.f3)(o.Pt.pin[f].width,g),height:(0,o.f3)(o.Pt.pin[f].height,g)},"pin")},[t.pinGreen,t.pinOverview,u,y,j,x,b,l,f,g]);return m?(0,n.jsxs)("svg",{className:"group-shot-trails",style:{position:"absolute"},viewBox:"0 0 ".concat(x," ").concat(l),children:[c&&C,S,h&&w,I,k]}):null}},552:function(e,t,l){l.d(t,{Z:function(){return R},R:function(){return D}});var n=l(85893),r=l(67294),o=l(23100),a=l(88911),i=l(359),s=l(57340),d=l(45474),u=l(92421),c=l(37405),h=l(58906),m=l(4236),x=l(8668),v=l(28498),p=l(14213),g=l(35337),y=l(67046),f=l(3519),j=l(43104),b=l(91669),S=l(204),I=l(99572);function k(e){var t,l,r,i,s,d,u;let{row:c,isBettingAllowed:h}=e,m=!!h;return(0,n.jsxs)(S.k,{justifyContent:"space-between",zIndex:"0",children:[(0,n.jsxs)(S.k,{flexDirection:"column",gap:"2.0rem",children:[(0,n.jsx)(a.x,{textStyle:"headline_xs_sans",width:"100%",margin:"auto 0 auto 0",children:null==c?void 0:null===(r=c.entity)||void 0===r?void 0:null===(l=r.players)||void 0===l?void 0:null===(t=l[0])||void 0===t?void 0:t.displayName}),(0,n.jsx)(a.x,{textStyle:"headline_xs_sans",width:"100%",margin:"auto 0 auto 0",children:null==c?void 0:null===(d=c.entity)||void 0===d?void 0:null===(s=d.players)||void 0===s?void 0:null===(i=s[1])||void 0===i?void 0:i.displayName})]}),(0,n.jsx)(o.xu,{margin:"auto 0 auto 0",children:(0,n.jsx)(I.Z,{iconVariant:(0,f.Ir)(null==c?void 0:c.odds.oddsSwing),cursor:m?"pointer":"default",disableButton:!m,children:null===(u=c.odds)||void 0===u?void 0:u.odds})})]})}var w=l(49266),C=l(87161);let Z=f.Rb.FINISHES;var T=function(e){let{teamId:t}=e,l=(0,C.ny)(),o=Array.from((0,f.wd)(l,t,Z)),a=(0,c.Fx)(),i=(0,r.useMemo)(()=>o.map(e=>{var l;let r=null==e?void 0:null===(l=e.options)||void 0===l?void 0:l.map(e=>{var l;if((null==e?void 0:null===(l=e.entity)||void 0===l?void 0:l.entityId)===t)return e}).filter(e=>e);return(0,n.jsx)(w.Z,{headingLevel:"h3",title:null==e?void 0:e.header,children:null==r?void 0:r.map((e,t)=>e?(0,n.jsx)(k,{row:e,isBettingAllowed:a},"".concat(e,"-").concat(t)):null)},null==e?void 0:e.header)}),[o,t,a]);return o.length>0?(0,n.jsx)(b.g,{spacing:"24",children:i}):null};let P=f.Rb.GROUPS;var _=function(e){let{teamId:t}=e,l=(0,C.ny)(),o=Array.from((0,f.wd)(l,t,P)),a=(0,c.Fx)(),i=(0,r.useMemo)(()=>o.map(e=>{let t=null==e?void 0:e.options;return(0,n.jsx)(w.Z,{headingLevel:"h3",title:null==e?void 0:e.header,children:null==t?void 0:t.map((e,t)=>e?(0,n.jsx)(k,{row:e,isBettingAllowed:a},"".concat(e,"-").concat(t)):null)},null==e?void 0:e.header)}),[o,a]);return o.length>0?(0,n.jsx)(b.g,{spacing:"24",children:i}):null},M=l(80974);function B(e){var t;let{row:l,isBettingAllowed:r}=e,[i,s]=(0,M.t)([g.Z.mobileOnly,g.Z.tabletOnly]),d=(0,j.qM)();return(0,n.jsx)(S.k,{justifyContent:"space-between",zIndex:"0",width:"100%",flexDirection:i||s?"column":"row",children:null==l?void 0:null===(t=l.options)||void 0===t?void 0:t.map((e,t)=>{var u;return function(e,t){var l,u,c,h,m,x,v,p,g,j;let b=!!r,k=e.isTie?d.get("tie"):"".concat(null==e?void 0:null===(c=e.entity)||void 0===c?void 0:null===(u=c.players)||void 0===u?void 0:null===(l=u[0])||void 0===l?void 0:l.displayName),w=e.isTie?"":"".concat(null==e?void 0:null===(x=e.entity)||void 0===x?void 0:null===(m=x.players)||void 0===m?void 0:null===(h=m[1])||void 0===h?void 0:h.displayName);return i||s?(0,n.jsxs)(S.k,{width:"100%",justifyContent:"space-between",borderBottom:t?"":"1px solid",borderColor:y.Z.black_20,padding:e.isTie?"1.6rem 0 0.0rem 0":"1.8rem 0 1.8rem 0",children:[(0,n.jsxs)(S.k,{flexDirection:"column",gap:"1.8rem",justifyContent:"center",children:[(0,n.jsx)(a.x,{textStyle:"headline_xs_sans",children:k}),w&&(0,n.jsx)(a.x,{textStyle:"headline_xs_sans",children:w})]}),(0,n.jsx)(o.xu,{margin:"auto 0 auto 0",children:(0,n.jsx)(I.Z,{iconVariant:(0,f.Ir)(null==e?void 0:e.odds.oddsSwing),cursor:b?"pointer":"default",disableButton:!b,children:null==e?void 0:null===(g=e.odds)||void 0===g?void 0:g.odds})})]},"matchups-row-".concat(null==e?void 0:null===(j=e.entity)||void 0===j?void 0:j.entityId)):(0,n.jsxs)(S.k,{width:"100%",justifyContent:"space-between",children:[(0,n.jsxs)(S.k,{flexDirection:"column",margin:"1.0rem 0 1.0rem 0",gap:"1.4rem",children:[(0,n.jsx)(a.x,{textStyle:"headline_xs_sans",margin:"auto 0 auto 0",children:k}),w&&(0,n.jsx)(a.x,{textStyle:"headline_xs_sans",margin:"auto 0 auto 0",children:w})]}),(0,n.jsx)(o.xu,{paddingRight:t?"1.2rem":"2.4rem",borderRight:t?"0":"0.1rem solid",margin:t?"auto 0 auto 0":"auto 2.4rem auto 0",borderColor:y.Z.black_20,children:(0,n.jsx)(I.Z,{iconVariant:(0,f.Ir)(null==e?void 0:e.odds.oddsSwing),cursor:b?"pointer":"default",disableButton:!b,children:null==e?void 0:null===(v=e.odds)||void 0===v?void 0:v.odds})})]},"matchups-row-".concat(null==e?void 0:null===(p=e.entity)||void 0===p?void 0:p.entityId))}(e,t===(null==l?void 0:null===(u=l.options)||void 0===u?void 0:u.length)-1)})})}let O=f.Rb.MATCHUPS;var N=function(e){let{teamId:t}=e,l=(0,C.ny)(),o=Array.from((0,f.wd)(l,t,O)),a=(0,c.Fx)(),i=(0,r.useMemo)(()=>o.map(e=>{var l;let r=null==e?void 0:null===(l=e.options)||void 0===l?void 0:l.map(e=>{var l;if(null==e?void 0:null===(l=e.options)||void 0===l?void 0:l.some(e=>{var l;return(null===(l=e.entity)||void 0===l?void 0:l.entityId)===t}))return e}).filter(e=>e);return(0,n.jsx)(w.Z,{headingLevel:"h3",title:null==e?void 0:e.header,children:null==r?void 0:r.map((t,l)=>(0,n.jsx)(B,{row:t,isBettingAllowed:a},"".concat(null==e?void 0:e.header,"-").concat(null==t?void 0:t.__typename,"-").concat(l)))},null==e?void 0:e.header)}),[o,t,a]);return o.length>0?(0,n.jsx)(b.g,{spacing:"24",children:i}):null},z=function(e){let{market:t,teamId:l}=e,o=(0,C.ny)(),a=Array.from((0,f.wd)(o,l,t)),i=(0,c.Fx)(),s=(0,r.useMemo)(()=>{let e=(0,f.D0)(o,l,t),n=[];return null==e||e.forEach(e=>{n.push(e)}),n},[l,t,o]),d=(0,r.useMemo)(()=>s.map((e,t)=>(0,n.jsx)(k,{row:e,isBettingAllowed:i},"".concat(e.entity.entityId,"-").concat(t))),[s,i]);return a.length>0?(0,n.jsx)(b.g,{spacing:"24",children:a.map(e=>(0,n.jsx)(w.Z,{headingLevel:"h3",title:null==e?void 0:e.header,children:d},null==e?void 0:e.header))}):null};function L(e){var t,l,r;let{row:i,isBettingAllowed:s}=e,d=(0,j.qM)(),u=!!s;return(null==i?void 0:i.yesOdds)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(S.k,{justifyContent:"space-between",zIndex:"0",margin:"0.2rem 0 1.5rem 0",children:[(0,n.jsx)(a.x,{textStyle:"headline_xs_sans",width:"100%",margin:"auto 0 auto 0",children:d.get("yes")}),(0,n.jsx)(o.xu,{children:(0,n.jsx)(I.Z,{iconVariant:(0,f.Ir)(i.yesOdds.oddsSwing),cursor:u?"pointer":"default",disableButton:!u,children:null===(l=i.yesOdds)||void 0===l?void 0:l.odds})})]}),(0,n.jsx)(o.xu,{borderBottom:"0.1rem solid",borderColor:y.Z.black_20}),(0,n.jsxs)(S.k,{justifyContent:"space-between",zIndex:"0",margin:"1.5rem 0 0.2rem 0",children:[(0,n.jsx)(a.x,{textStyle:"headline_xs_sans",width:"100%",margin:"auto 0 auto 0",children:d.get("no")}),(0,n.jsx)(o.xu,{children:(0,n.jsx)(I.Z,{iconVariant:(0,f.Ir)(i.noOdds),cursor:u?"pointer":"default",disableButton:!u,children:null===(r=i.noOdds)||void 0===r?void 0:r.odds})})]})]}):(0,n.jsxs)(S.k,{justifyContent:"space-between",zIndex:"0",children:[(0,n.jsx)(a.x,{textStyle:"headline_xs_sans",width:"100%",margin:"auto 0 auto 0",children:d.get("yes")}),(0,n.jsx)(o.xu,{children:(0,n.jsx)(I.Z,{iconVariant:(0,f.Ir)(null==i?void 0:i.odds.oddsSwing),cursor:u?"pointer":"default",disableButton:!u,children:null===(t=i.odds)||void 0===t?void 0:t.odds})})]})}let E=f.Ho.PLAYER_PROPS;var H=function(e){let{teamId:t}=e,l=(0,C.ny)(),o=Array.from((0,f.wd)(l,t,E)),a=(0,c.Fx)(),i=(0,r.useMemo)(()=>o.map(e=>{var l;let r=[];return null==e||null===(l=e.options)||void 0===l||l.forEach(e=>{var l;(null==e?void 0:null===(l=e.entity)||void 0===l?void 0:l.entityId)==t&&r.push(e)}),(0,n.jsx)(w.Z,{headingLevel:"h3",title:null==e?void 0:e.header,children:r.map((e,t)=>{var l;return(0,n.jsx)(L,{row:e,isBettingAllowed:a},"".concat(null==e?void 0:null===(l=e.entity)||void 0===l?void 0:l.entityId,"-").concat(t))})},null==e?void 0:e.header)}),[o,t,a]);return o.length>0?(0,n.jsx)(b.g,{spacing:"16",alignItems:"left",children:i}):null},F=l(37626),A=l(82688);let D=(e,t,l)=>e.tournamentStatus==F.C5.Completed?A.B.TournamentComplete:t&&!(t.markets.length<=0)&&l?A.B.Available:A.B.Unavailable;var R=function(e){var t,l,b,S,I;let{teamId:k,oddsMarket:w,isWithinModal:Z,adTag:P}=e,[B]=(0,M.t)([g.Z.laptop]),{tournament:O}=(0,m.ai)(),L=(0,h.iT)(),E=(0,C.ny)(),F=(0,c.Kg)(),R=(0,c.Cj)(),K=(0,c.jI)(),V=(0,r.useMemo)(()=>D(O,E,R),[R,O,E]),U=(0,j.qM)(),G=(0,r.useMemo)(()=>(0,f.tC)(E,k),[E,k]),W=(0,r.useMemo)(()=>{let e=new Map;return G.forEach(t=>{let l=function(e){let{market:t}=e;switch(t.toLowerCase()){case f.Ho.ODDS_TO_WIN:return(0,n.jsx)(z,{...e});case f.Ho.MATCHUPS:return(0,n.jsx)(N,{...e});case f.Ho.FINISHES:return(0,n.jsx)(T,{...e});case f.Ho.GROUPS:return(0,n.jsx)(_,{...e});case f.Ho.PLAYER_PROPS:return(0,n.jsx)(H,{...e});default:return null}}({key:t,market:t,teamId:k});null!=l&&e.set(t,l)}),e},[G,k]),q=(0,r.useMemo)(()=>G.filter(e=>W.has(e)),[W,G]),Y=w?Math.max(0,q.findIndex(e=>e.toLocaleLowerCase()==(null==w?void 0:w.toLocaleLowerCase()))):0,[Q,$]=(0,r.useState)(Y),X=(0,r.useMemo)(()=>q.map(e=>(0,n.jsx)(x.Z,{children:e},"".concat(e,"-scorecard-odds-pill"))),[q]),J=(0,r.useMemo)(()=>q.map(e=>W.get(e)),[q,W]);return L&&E&&K?V==A.B.TournamentComplete?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.bK,{size:[32,null,null,40]}),(0,n.jsx)(d.Z,{title:(null===(t=E.message)||void 0===t?void 0:t.header)||U.get("tournamentCompleteOddsTitle"),body:(null===(l=E.message)||void 0===l?void 0:l.body)||U.get("tournamentCompleteOddsBody")})]}):q.length&&V!=A.B.Unavailable?(0,n.jsxs)(n.Fragment,{children:[P&&(0,n.jsx)(i.r,{adTag:P,customTargetValuesOverride:{s3:"odds"}}),(0,n.jsxs)(p.Z,{headerSlot:void 0,children:[(0,n.jsxs)(o.xu,{marginBottom:Z?"5rem":"unset",children:[(0,n.jsx)(v.Z,{tabsProps:{gap:24,sx:{".css-9v28kl:first-of-type":{paddingTop:0}}},defaultIndex:Q,onChange:$,selectedIndex:Q,tabList:X,children:J}),(0,n.jsx)(o.bK,{size:["16","24"]}),(0,n.jsx)(a.x,{textStyle:"headline_xxs_sans",color:y.Z.dark_grey,fontSize:"1.5rem",children:null!==(I=null==F?void 0:F.oddsDisclaimer)&&void 0!==I?I:U.get("oddsDisclaimer")}),(0,n.jsx)(o.bK,{size:["64","64","24"]})]}),B?(0,n.jsx)(o.xu,{position:"absolute",left:"-3.5rem",right:"-3.5rem",bottom:"-3.2rem",children:(0,n.jsx)(s.Z,{})}):(0,n.jsx)(s.Z,{isWithinModal:!0}),Z?void 0:(0,n.jsx)(o.bK,{size:["16","24"]})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.bK,{size:[32,null,null,40]}),(0,n.jsx)(d.Z,{title:(null===(b=E.message)||void 0===b?void 0:b.header)||U.get("unavailableOddsTitle"),body:(null===(S=E.message)||void 0===S?void 0:S.body)||U.get("unavailableTeamStrokePlayOddsBody")})]}):(0,n.jsx)(u.Z,{})}},69786:function(e,t,l){l.d(t,{$J:function(){return a},O$:function(){return s},YX:function(){return o},Zr:function(){return i}});var n=l(37626),r=l(5320);function o(e){let{holeNumber:t,roundFormat:l,players:o,playerIds:a,round:i,newPlayerColorSet:s}=e,d=l===n.aN.BestBall,u=(0,r.Ix)(a,i,!0),c=function(e){let{shotDetails:t,isBestBall:l,holeNumber:n}=e,r=[];return null==t||t.reduce((e,t)=>{let r=t.holes.find(e=>e.holeNumber===n);return null==r||r.strokes.forEach(n=>{var r,o;let a=l?t.playerId:null===(r=n.player)||void 0===r?void 0:r.playerIdString;e[n.strokeNumber-1]={...e[n.strokeNumber-1],[a]:(null===(o=e[n.strokeNumber-1])||void 0===o?void 0:o[a])?[...e[n.strokeNumber-1][a],n]:[n]}}),e},r),r}({shotDetails:u,isBestBall:d,holeNumber:t});return function(e){let{newPlayerColorSet:t,players:l}=e;t&&l&&l.forEach(e=>{t[e.id]&&(e.lineColor=t[e.id])})}({newPlayerColorSet:s,players:o}),{holes:function(e){let{shotDetails:t,holeNumber:l,isBestBall:n,playerIds:r}=e;if(!t)return;let o={};return r.forEach(e=>{if(n){let n=t.find(t=>t.playerId===e),r=null==n?void 0:n.holes.find(e=>e.holeNumber===l);o[e]=r}else{let n=t.find(t=>t.playerId===e),r=null==n?void 0:n.holes.find(e=>e.holeNumber===l),a=null==r?void 0:r.strokes.reduce((e,t)=>{var l,n;let r=null===(n=t.player)||void 0===n?void 0:null===(l=n.playerIdString)||void 0===l?void 0:l.toString();return r&&!e.includes(r)&&e.push(r),e},[]);null==a||a.forEach(e=>o[e]=r)}}),o}({shotDetails:u,isBestBall:d,playerIds:a,holeNumber:t}),players:o,strokes:c,videos:null==u?void 0:u.flatMap(e=>e.shotVideos)}}function a(e){let{holeNumber:t,playerIds:l,round:n}=e,[o]=l,a=(0,r.K8)(o,n);return null==a?void 0:a.holes.find(e=>e.holeNumber===t)}function i(e){let{holeNumber:t,roundFormat:l,playerIds:o,round:a}=e,i=(0,r.Ix)(o,a,!0);return o.map(e=>{if(l===n.aN.BestBall){let l=null==i?void 0:i.find(t=>t.playerId===e);return{playerId:e,hole:null==l?void 0:l.holes.find(e=>e.holeNumber===t),lineColor:null==l?void 0:l.lineColor}}{let l=null==i?void 0:i.find(t=>t.playerId===e);return{teamId:e,hole:null==l?void 0:l.holes.find(e=>e.holeNumber===t)}}})}function s(e){let{shotDetails:t}=e,l={currentStroke:{playByPlay:""},currentPlayer:{playerName:"",playerColor:"",playByPlay:""}};if(t.strokes.length>1){var n,r,o;let e=t.strokes[t.strokes.length-1],a=Object.keys(e),i=a[a.length-1],s=t.players.find(e=>e.playerId===i||e.id===i);l.currentStroke=e[i][e[i].length-1],l.currentPlayer={playerName:null!==(n=null==s?void 0:s.displayName)&&void 0!==n?n:"",playerColor:null!==(r=null==s?void 0:s.lineColor)&&void 0!==r?r:"",playByPlay:null!==(o=null==s?void 0:s.displayColor)&&void 0!==o?o:""}}return l}}}]);