{"version":3,"file":"js/react/mls-match-hub-v2-app.js?_t=6b2717476bb14f9bfc69","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAEA;AAAA;AAEA;AAEA;AACA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAEA;AACA;AACA;AAAA;AAIA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AAAA;AACA;AAGA;AACA;AACA;AAAA;AAGA;AAAA;AACA;AACA;AAGA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AAGA;AACA;AAAA;AAGA;AACA;AAEA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AAAA;AAGA;AAAA;AACA;AACA;AACA;AAGA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAGA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AAOA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AAAA;AAGA;AAEA;AACA;AAAA;AAGA;AAEA;AAEA;AACA;AACA;AAAA;AAGA;AACA;;;;;;;;;;;;;;;;ACnLA;AAEA;AACA;AACA;AAAA;AAGA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAIA;AACA;AAAA;AAGA;AAQA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AAGA;AAAA;AACA;AAGA;AACA;AAAA;AAGA;AAAA;AACA;AAGA;AAAA;AAEA;;;;;;;;;;;;;;;;AC9DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AAUA;AAMA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;A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;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AAEA;AAGA;AAGA;AAEA;;;;;;;;;;;;;;;;;;;AC7HA;AAEA;AAAA;AACA;AAAA;AAAA;AAAA;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;;;;;;;;;;;;;;;;AC3BA;AAEA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AAIA","sources":["webpack://@mlssoccer/netcore/./scripts/react/mls-match-feed/utils.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-header/utils.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/app.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHub/MatchHub.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHub/StyledMatchHub.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHubAdditionalInformation/MatchHubAdditionalInformation.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHubAdditionalInformation/StyledMatchHubAdditionalInformation.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHubButtons/HotelBookButton.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHubButtons/MatchHubButtons.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHubButtons/StyledMatchHubButtons.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHubButtons/StyledTicketButton.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHubButtons/TicketButton.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHubTile/MatchHubTile.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHubTile/StyledMatchHubTile.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/components/MatchHubWrapper/MatchHubWrapper.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-hub-v2/main.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/MatchCommentary/MatchCommentary.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/MatchCommentary/StyledCommentary.js","webpack://@mlssoccer/netcore/./scripts/react/shared/svg/TicketIconV2/TicketIconV2.js"],"sourcesContent":["import { periodTypes } from \"../mls-match-list/utils\";\nimport { matchEventTypes } from \"../mls-match-summary/utils\";\nimport { highlightTypes } from \"../shared/utils\";\n\nexport const feedTypes = {\n goal: 'goal',\n};\n\nexport function getFeedType(type) {\n switch (type) {\n case feedTypes.goal:\n default: {\n return null;\n }\n }\n}\n\nexport function mergeFeedWithVideosAndPlayers({ feed, homeClub, awayClub, match, videoList, d3Players }) {\n if (!feed || feed.length === 0) {\n return null;\n }\n\n\n let homeScore = match?.homeScore;\n let awayScore = match?.awayScore;\n\n const composedFeed = [];\n\n for (let i = 0; i < feed.length; i++) {\n const current = feed[i];\n const club = current?.first_club;\n const first_player = current?.first_player;\n const first_player_match = current?.first_player_match;\n const isHome = club?.opta_id == homeClub?.optaId;\n const isAway = club?.opta_id == awayClub?.optaId;\n const isLastTimingCommentary = current?.type === matchEventTypes.startOfPeriod && current?.period === periodTypes.FirstHalf;\n\n const matchedVideo = videoList != null && videoList.length > 0 ? videoList.find(video => {\n const { fields } = video || {};\n const { optaEventId } = fields || {};\n\n return optaEventId === current?.opta_id;\n }) : null;\n\n const matchedPlayer = Array.isArray(d3Players) ? d3Players?.find(d3Player => d3Player?.optaId.toString() == first_player?.opta_id) || null : null;\n const { thumbnail, headshotNationalTeam, headshotClub } = matchedPlayer || {};\n let adjustedHomeScore = homeScore;\n let adjustedAwayScore = awayScore;\n\n if (club) {\n if (current.type === matchEventTypes.goal || current.type === matchEventTypes.penaltyGoal && current.period !== periodTypes.ShootOut) {\n if (isHome) {\n adjustedHomeScore = adjustedHomeScore - 1;\n }\n else if (isAway) {\n adjustedAwayScore = adjustedAwayScore - 1;\n }\n }\n\n if (current.type === matchEventTypes.ownGoal) {\n if (club.opta_id == homeClub?.optaId) {\n adjustedAwayScore = adjustedAwayScore - 1;\n }\n else if (club.opta_id == awayClub?.optaId) {\n adjustedHomeScore = adjustedHomeScore - 1;\n }\n }\n }\n\n composedFeed.push({\n ...current,\n first_player: first_player != null\n ? (\n {\n ...first_player,\n first_name: matchedPlayer?.firstName ? matchedPlayer.firstName : first_player?.first_name,\n known_name: matchedPlayer?.knownName ? matchedPlayer.knownName : first_player?.known_name,\n last_name: matchedPlayer?.lastName ? matchedPlayer?.lastName : first_player?.last_name,\n jersey: matchedPlayer?.jerseyNumber ? matchedPlayer.jerseyNumber : first_player_match?.jersey,\n slug: matchedPlayer?.playerSlug ? matchedPlayer?.playerSlug : \"\",\n }\n ) : null,\n headshotNationalTeam: headshotNationalTeam != null ? headshotNationalTeam : null,\n headshotClub: headshotClub != null ? headshotClub : null,\n image: thumbnail != null ? thumbnail : null,\n video: matchedVideo != null ? matchedVideo : null,\n homeScore,\n awayScore,\n isLastTimingCommentary,\n scoreChange: adjustedHomeScore !== homeScore\n ? \"home\"\n : adjustedAwayScore !== awayScore\n ? \"away\"\n : null\n });\n\n homeScore = adjustedHomeScore;\n awayScore = adjustedAwayScore;\n }\n\n return composedFeed;\n}\n\nexport function mergePages(pages) {\n return pages && pages.length > 0 ? pages.reduce((accum, current) => {\n return [...accum, ...current];\n }, []) : [];\n}\n\nexport function composeVideoList(forgeVideos, validators) {\n if (forgeVideos == null) {\n return [];\n }\n\n const {\n fullGameTags,\n condensedGameTags,\n gameHighlightsTags\n } = validators || {};\n\n return forgeVideos.map(v => {\n const { tags } = v || {};\n\n if (tags == null) {\n return v;\n }\n\n const tagList = [];\n for (let i = 0; i < tags.length; i++) {\n const currentTag = tags[i];\n const neutralSlug = currentTag?.neutralSlug;\n\n if (neutralSlug != null) {\n tagList.push(neutralSlug);\n }\n }\n\n const isFullGame = tagValidator(tagList, fullGameTags);\n const isCondensedGame = tagValidator(tagList, condensedGameTags);\n const isGameHighlights = tagValidator(tagList, gameHighlightsTags);\n\n return {\n ...v,\n fields: {\n ...v.fields,\n highlightType: isFullGame\n ? highlightTypes.fullGame\n : isCondensedGame\n ? highlightTypes.condensedGame\n : isGameHighlights\n ? highlightTypes.gameHighlights\n : null\n }\n };\n });\n}\n\nexport function removeDuplicates(items = [], key = \"\") {\n\n if (!Array.isArray(items) || !key) {\n return []\n }\n\n const itemIds = {};\n\n items.forEach(item => {\n itemIds[item[key]] = item;\n })\n\n return Object.values(itemIds);\n\n}\n\nfunction tagValidator(arr, target) {\n if (arr == null || target == null) {\n return false;\n }\n\n return target.every(v => arr.some(x => x.includes(v)));\n}\n","import { periodTypes } from \"../mls-match-list/utils\";\n\nexport function formatPlayerSummaryData({ summary, home, away, players, includeShootout = false }) {\n if (!summary || summary.length === 0 || !home || !away) {\n return null;\n }\n\n const { homePlayers, awayPlayers } = players || {};\n\n return summary.reduce((total, current) => {\n const period = current?.period;\n const club = current?.first_club;\n const player = current?.first_player;\n const type = current?.type;\n\n const minute = current?.minute_display;\n const isHome = type === \"own goal\"\n ? club?.opta_id !== home?.optaId\n : club?.opta_id === home?.optaId;\n\n if (!includeShootout && period === periodTypes.ShootOut && type === \"penalty goal\") {\n return total;\n }\n\n const matchedPlayer = isHome\n ? homePlayers != null && homePlayers.length > 0\n ? homePlayers.find(hp => hp.optaId === player?.opta_id)\n : null\n : awayPlayers != null && awayPlayers.length > 0\n ? awayPlayers.find(ap => ap.optaId === player?.opta_id)\n : null;\n\n const { last_name, known_name, first_name } = player || {};\n const { knownName, lastName, firstName } = matchedPlayer || {};\n\n const commentary = {\n first_name: firstName != null ? firstName : first_name,\n last_name: lastName != null ? lastName : last_name,\n known_name: knownName != null ? knownName : known_name,\n type,\n minute\n };\n\n if (isHome) {\n if (total.home && total.home.length > 0) {\n total.home = [...total.home, commentary];\n }\n else {\n total.home = [commentary];\n }\n }\n else {\n if (total.away && total.away.length > 0) {\n total.away = [...total.away, commentary];\n }\n else {\n total.away = [commentary];\n }\n }\n\n return total;\n }, {});\n}\n","export { default } from './main';","import React from \"react\";\nimport BlockheaderV2 from \"../../../shared/components/BlockheaderV2/BlockheaderV2\";\nimport {\n StyledBackgroundWrapper,\n StyledExplainerBarWrapper,\n StyledMatchHub,\n StyledMatchHubHeader,\n StyledMatchHubRoundInfo,\n StyledMatchHubStatusStampWrapper,\n StyledMatchHubVenueBroadcasterWrapper,\n StyledMatchHubWrapper,\n StyledSponsorWrapper,\n} from \"./StyledMatchHub\";\nimport {\n formatScores,\n slugifyMatch,\n statusTypes,\n useMatchData,\n} from \"../../../mls-match-list/utils\";\nimport { useReactAppState } from \"../../../shared/containers/utils\";\nimport { getDateTranslation } from \"../../../mls-vertical-scoreboard/utils\";\nimport { formatImageUrl } from \"../../../shared/utils\";\nimport Picture from \"../../../shared/components/Picture\";\nimport MatchHubButtons from \"../MatchHubButtons/MatchHubButtons\";\nimport MatchHubTile from \"../MatchHubTile/MatchHubTile\";\nimport { formatMatchMinutes } from \"../../../mls-match-summary/utils\";\nimport SponsorV2 from \"../../../shared/components/SponsorV2/SponsorV2\";\nimport { MatchHubAdditionalInformation } from \"../MatchHubAdditionalInformation/MatchHubAdditionalInformation\";\nimport VenueBroadcasterBar from \"../../../shared/components/VenueBroadcasterBar/VenueBroadcasterBar\";\nimport ExplainerBar from \"../../../shared/components/ExplainerBar/ExplainerBar\";\nimport StatusStamp from \"../../../shared/components/StatusStamp/StatusStamp\";\n\nfunction MatchHub({\n venue,\n blockheaderTitle = \"\",\n blockheaderSubtitle = \"\",\n hideBlockheader = false,\n queryClassName,\n showClubRanks = false,\n showCompetitionStage = false,\n showRoundDetail = false,\n showGroupInformation = false,\n}) {\n const {\n status,\n matchDateTime,\n competition,\n promoInfo,\n minuteDisplay,\n mediaProviders,\n homeClubData,\n awayClubData,\n period,\n leagueMatchTitle,\n resultType,\n competitionPhase,\n roundName,\n roundGroup,\n venue: matchVenue,\n } = useMatchData();\n\n const { t, urlList } = useReactAppState();\n const { venueBgUrl } = urlList || {};\n\n const { backgroundImageUrl, venueOptaId } = venue || {};\n\n const { localTime } = matchDateTime || {};\n\n const subtitle = getDateTranslation(localTime, t);\n\n const { highQuality } = backgroundImageUrl\n ? formatImageUrl(backgroundImageUrl, {\n format: \"f_auto\",\n extension: \"f_jpg\",\n })\n : {};\n\n const { shootoutResult } = formatScores({\n homeClubData,\n awayClubData,\n period,\n resultType,\n });\n\n const backgroundImageSrc =\n highQuality || `${venueBgUrl}${`${venueOptaId || \"default\"}.jpg`}`;\n\n const { sponsorImage, promotionalSponsor } = promoInfo;\n const { assetUrl } = sponsorImage || {};\n\n const [minutes, extraMinutes] = formatMatchMinutes(minuteDisplay);\n const roundInfo = [\n showCompetitionStage ? t(slugifyMatch(competitionPhase)) : null,\n showRoundDetail ? t(slugifyMatch(roundName)) : null,\n showGroupInformation ? t(slugifyMatch(roundGroup)) : null,\n ];\n const composedInfo = roundInfo.filter((x) => x).join(\" • \");\n\n return (\n \n \n \n \n \n \n {!hideBlockheader && (\n \n )}\n \n {composedInfo ? : null}\n \n \n {assetUrl && (\n \n )}\n \n \n \n {(status?.abbreviation === statusTypes.live ||\n status?.abbreviation === statusTypes.post) && (\n \n )}\n \n \n \n \n {shootoutResult && }\n \n \n {(status?.abbreviation === statusTypes.pre ||\n status?.abbreviation == statusTypes.live) && (\n \n )}\n \n \n \n \n );\n}\n\n// eslint-disable-next-line no-func-assign\nMatchHub = React.memo(MatchHub);\n\nexport default MatchHub;\n","import styled from \"styled-components\";\n\nexport const StyledMatchHubWrapper = styled.div`\n box-sizing: border-box;\n width: 100%;\n position: relative;\n\n .mls-c-scorebug {\n .mls-c-scorebug__status {\n font-size: ${(props) =>\n props.theme.mixins.pxToRem(props.theme.figma.base.scale_2)};\n }\n }\n`;\nexport const StyledMatchHub = styled.div`\n width: 100%;\n min-height: 283px;\n padding: 24px;\n padding-top: 21px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n flex-direction: column;\n\n &.xs,\n &.xxs,\n &.sm {\n min-height: 245px;\n padding: 16px;\n\n &.--live,\n &.--post {\n .--scorers {\n order: 1;\n }\n\n .mls-c-venue-broadcaster-wrapper {\n order: 2;\n }\n\n .mls-c-match-buttons {\n order: 3;\n }\n }\n }\n`;\n\nexport const StyledMatchHubVenueBroadcasterWrapper = styled.div`\n margin-top: 16px;\n margin-bottom: 25px;\n\n .mls-c-venue-broadcaster-bar:not(span) {\n color: white;\n opacity: 1;\n z-index: 1;\n }\n\n &.xs,\n &.xxs,\n &.sm {\n .mls-c-venue-broadcaster-bar-wrapper {\n flex-direction: column;\n gap: 4px;\n\n .mls-c-venue-broadcaster-bar {\n font-size: ${(props) => props.theme.mixins.pxToRem(11)};\n }\n\n .mls-c-venue-broadcaster-bar__dot {\n display: none;\n }\n }\n }\n`;\n\nexport const StyledExplainerBarWrapper = styled.div`\n margin: 12px 0;\n\n &.xs,\n &.xxs,\n &.sm {\n margin: 12px 0 0 0;\n\n &.--live,\n &.--post {\n margin: 6px 0 0 0;\n }\n }\n`;\n\nexport const StyledMatchHubStatusStampWrapper = styled.div`\n z-index: 1;\n width: auto;\n height: 20px;\n margin-top: ${(props) => (props.isPre ? \"0\" : \"18px\")};\n\n .mls-c-status-stamp__status {\n font-family: ${(props) => props.theme.figma.base.fontfamily_mlstifo_micro};\n color: ${(props) => props.theme.rgba.white_100};\n font-size: ${(props) => props.theme.mixins.pxToRem(14)};\n z-index: 1;\n }\n\n &.sm,\n &.xs,\n &.xxs {\n height: 17px;\n\n .mls-c-status-stamp__status {\n font-size: ${(props) => props.theme.mixins.pxToRem(11)};\n }\n }\n`;\n\nexport const StyledBackgroundWrapper = styled.div`\n position: absolute;\n height: 100%;\n width: 100%;\n img {\n height: 100%;\n width: 100%;\n object-fit: cover;\n }\n .mls-c-matchhub__background {\n position: absolute;\n height: 100%;\n top: 0;\n left: 0;\n width: 100%;\n }\n`;\n\nexport const StyledSponsorWrapper = styled.div`\n width: 46px;\n height: 28px;\n margin-left: auto;\n z-index: 1;\n`;\nexport const StyledMatchHubHeader = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding-left: 46px;\n box-sizing: border-box;\n z-index: 1;\n flex-direction: column;\n\n .mls-c-blockheader__subtitle,\n .mls-c-blockheader__title {\n font-size: ${(props) => props.theme.mixins.pxToRem(13)};\n font-family: ${(props) =>\n props.theme.figma.base.fontfamily_mlstifo_headline};\n text-transform: capitalize;\n margin: auto;\n text-align: center;\n font-weight: 500;\n opacity: 1;\n }\n\n &.sm,\n &.xs,\n &.xxs {\n font-size: ${(props) => props.theme.mixins.pxToRem(12)};\n }\n`;\n\nexport const StyledPositionWrapper = styled.div``;\n\nexport const StyledMatchHubRoundInfo = styled.div`\n &.mls-c-matchhub__round-info {\n display: flex;\n width: 100%;\n justify-content: center;\n\n .mls-c-blockheader__title {\n max-width: none;\n text-transform: none;\n }\n }\n`;\n","import React from \"react\";\nimport { endOfDay, format } from \"date-fns\";\nimport { useQuery } from \"react-query\";\nimport { formatPlayerSummaryData } from \"../../../mls-match-hub-header/utils\";\nimport { statusTypes, useMatchData } from \"../../../mls-match-list/utils\";\nimport { fetchClient } from \"../../../shared/api/fetching\";\nimport {\n apiURL,\n d3PlayerAPI,\n d3PreviousMatchesAPI,\n d3StandingsAPI,\n mlsMatchCommentariesAPI,\n mlsStatsStandingsAPI,\n} from \"../../../shared/api/variables\";\nimport MatchCommentary from \"../../../shared/components/MatchCommentary/MatchCommentary\";\nimport { useReactAppState } from \"../../../shared/containers/utils\";\nimport {\n StyledMatchHubAdditionalInformation,\n StyledMatchHubAdditionalInformationSeparator,\n StyledMatchHubAwayInformation,\n StyledMatchHubHomeInformation,\n} from \"./StyledMatchHubAdditionalInformation\";\n\nexport const MatchHubAdditionalInformation = ({ queryClassName = \"\" }) => {\n const {\n homeClubData,\n awayClubData,\n status,\n matchOptaId,\n queryConfig,\n isTimeTbd,\n matchKickOffTime,\n matchDateTime,\n season,\n competition,\n } = useMatchData();\n\n const { optaId: competitionOptaId } = competition || {};\n const { optaId: seasonOptaId } = season || {};\n const { apiList, t } = useReactAppState();\n const d3PlayersEndpoint = d3PlayerAPI({ matchOptaId });\n const summaryEndpoint = mlsMatchCommentariesAPI({\n matchOptaId,\n includeOwnGoals: true,\n includeSecondYellowCards: true,\n includeYellowCards: false,\n includePenaltyGoals: true,\n includeRedCards: true,\n includeSubstitutions: false,\n includeGoals: true,\n });\n const { d3SportsAPI } = apiList || {};\n const { localTime } = matchKickOffTime || {};\n\n const { data: summary } = useQuery({\n queryKey: [\n `mls-commentaries`,\n {\n matchOptaId,\n includeOwnGoals: true,\n includeSecondYellowCards: true,\n includeYellowCards: false,\n includePenaltyGoals: true,\n includeRedCards: true,\n includeSubstitutions: false,\n includeGoals: true,\n },\n ],\n queryFn: () =>\n fetchClient({ endpoint: summaryEndpoint, apiURL: apiURL.statsAPI }),\n ...queryConfig,\n });\n\n const { data: d3Players } = useQuery({\n queryKey: [`d3-players-match-matchhub`, { matchOptaId }],\n queryFn: () =>\n fetchClient({ endpoint: d3PlayersEndpoint, apiURL: d3SportsAPI }),\n ...queryConfig,\n enabled: !!matchOptaId,\n });\n\n const { home, away } =\n formatPlayerSummaryData({\n home: homeClubData,\n away: awayClubData,\n summary,\n players: d3Players,\n }) || {};\n\n const homeOptaId = homeClubData?.optaId || null;\n const awayOptaId = awayClubData?.optaId || null;\n const standingsEndpoint = mlsStatsStandingsAPI({\n seasonOptaId,\n competitionOptaId,\n clubOptaIds: [homeOptaId, awayOptaId],\n });\n\n const { data: standingsData } = useQuery({\n queryKey: [`mls-standings-matches`, { matchOptaId }],\n queryFn: () =>\n fetchClient({\n endpoint: standingsEndpoint,\n apiURL: apiURL.statsAPI,\n }),\n select: (data) =>\n data?.length\n ? data?.map((d) => {\n return {\n clubOptaId: d?.club?.opta_id,\n standings: `${d?.statistics?.total_wins || 0}-${\n d?.statistics?.total_losses || 0\n }-${d?.statistics?.total_draws || 0}`,\n };\n }) || null\n : null,\n enabled:\n homeOptaId && awayOptaId && status?.abbreviation === statusTypes.pre,\n });\n\n const homeStandings = standingsData?.find(\n (standing) => standing?.clubOptaId == homeOptaId\n )?.standings;\n const awayStandings = standingsData?.find(\n (standing) => standing?.clubOptaId == awayOptaId\n )?.standings;\n\n return (\n \n \n {status?.abbreviation === statusTypes.pre ? (\n homeStandings\n ) : (\n \n )}\n \n \n {status?.abbreviation === statusTypes.pre && !isTimeTbd && localTime && (\n <>\n {t(\"match_ko\")}: {format(localTime, `p`)?.toLowerCase()}\n \n )}\n \n \n {status?.abbreviation === statusTypes.pre ? (\n awayStandings\n ) : (\n \n )}\n \n \n );\n};\n","import styled from \"styled-components\";\n\nexport const StyledMatchHubAdditionalInformation = styled.div`\n position: relative;\n display: flex;\n width: 100%;\n justify-content: center;\n margin-top: -12px;\n\n &.--scorers {\n &.xs,\n &.xxs,\n &.sm {\n margin-top: 8px;\n\n .mls-c-match-commentary--home,\n .mls-c-match-commentary--away {\n font-size: ${(props) => props.theme.mixins.pxToRem(11)};\n opacity: 0.8;\n }\n\n .mls-c-matchub__resume--separator {\n width: 30px;\n }\n }\n\n &.xs,\n &.xxs {\n .mls-c-match-commentary--home,\n .mls-c-match-commentary--away {\n font-size: ${(props) => props.theme.mixins.pxToRem(8)};\n white-space: pre;\n }\n }\n }\n\n &.--formations {\n &.xs,\n &.xxs {\n .mls-c-matchhub__resume {\n display: none;\n }\n }\n }\n`;\n\nexport const StyledMatchHubHomeInformation = styled.div`\n font-family: ${(props) => props.theme.figma.base.fontfamily_mlstifo_headline};\n color: ${(props) => props.theme.figma.base.color_white_80};\n font-size: ${(props) => props.theme.mixins.pxToRem(14)};\n width: 320px;\n display: flex;\n justify-content: flex-end;\n text-align: right;\n min-height: 20px;\n\n .mls-c-match-commentary--home {\n font-family: ${(props) =>\n props.theme.figma.base.fontfamily_mlstifo_headline};\n color: ${(props) => props.theme.figma.base.color_white_80};\n letter-spacing: 0.8px;\n font-size: ${(props) => props.theme.mixins.pxToRem(12)};\n display: flex;\n justify-content: flex-end;\n text-align: right;\n }\n\n &.sm {\n width: 150px;\n }\n`;\n\nexport const StyledMatchHubAwayInformation = styled.div`\n width: 320px;\n font-family: ${(props) => props.theme.figma.base.fontfamily_mlstifo_headline};\n color: ${(props) => props.theme.figma.base.color_white_80};\n font-size: ${(props) => props.theme.mixins.pxToRem(14)};\n display: flex;\n justify-content: flex-start;\n text-align: left;\n\n .mls-c-match-commentary--away {\n font-family: ${(props) =>\n props.theme.figma.base.fontfamily_mlstifo_headline};\n color: ${(props) => props.theme.figma.base.color_white_80};\n letter-spacing: 0.8px;\n font-size: ${(props) => props.theme.mixins.pxToRem(12)};\n display: flex;\n justify-content: flex-start;\n text-align: left;\n }\n\n &.sm {\n width: 150px;\n }\n`;\n\nexport const StyledMatchHubAdditionalInformationSeparator = styled.div`\n width: 270px;\n text-align: center;\n font-family: ${(props) => props.theme.figma.base.fontfamily_mlstifo_headline};\n color: ${(props) => props.theme.figma.base.color_white_80};\n font-size: ${(props) => props.theme.mixins.pxToRem(11)};\n font-weight: 500;\n flex-shrink: 0;\n\n &.sm {\n width: 210px;\n }\n\n &.xs,\n &.xxs {\n }\n`;\n","import React, { useCallback, useEffect } from \"react\";\n\nimport { useMatchData } from \"../../../mls-match-list/utils\";\nimport { Link } from \"../../../shared/components/Link/Link\";\nimport MatchButton from \"../../../shared/components/MatchButton/MatchButton\";\nimport { backgroundTypes } from \"../../../shared/styled/Theme\";\nimport { trackMatchHubClick } from \"../../../../libraries/_modules/tracking/helpers\";\nimport { useReactAppState } from \"../../../shared/containers/utils\";\nimport { getHotelBookingIconUrl } from \"../../../shared/utils\";\n\nfunction HotelBookButton() {\n const { promoInfo, slug } = useMatchData();\n const { t } = useReactAppState();\n const { url, altText, displayText, openInNewTab } = promoInfo?.hotelBooking || {};\n\n const hotelBookingIconUrl = getHotelBookingIconUrl({ variant: \"light\" });\n\n const trackButton = useCallback(({ matchSlug, event = \"cta_clicked\" }) => {\n trackMatchHubClick({\n event,\n match: matchSlug,\n cta_button_location: \"match header\",\n ctaAction: \"book_hotel\",\n });\n }, []);\n\n useEffect(() => {\n trackButton({ matchSlug: slug, event: \"cta_viewed\" });\n }, [trackButton, slug]);\n\n return (\n \n trackButton({ matchSlug: slug, event: \"cta_clicked\" })}\n >\n {t(\"book_hotel\")}\n \n \n \n );\n}\n\nexport default HotelBookButton;","import React from \"react\";\nimport { useQuery } from \"react-query\";\nimport {\n trackMatchHubClick,\n trackMatchInteraction,\n} from \"../../../../libraries/_modules/tracking/helpers\";\nimport MatchButtonStreamer from \"../../../mls-featured-match-v2/components/MatchButtonStreamer/MatchButtonStreamer\";\nimport { StyledMatchButtonStreamer } from \"../../../mls-featured-match-v2/components/MatchButtonStreamer/StyledMatchButtonStreamer\";\nimport { composeVideoList } from \"../../../mls-match-feed/utils\";\nimport { statusTypes, useMatchData } from \"../../../mls-match-list/utils\";\nimport { fetchClient } from \"../../../shared/api/fetching\";\nimport {\n apiURL,\n forgeMatchContentVideosAPI,\n forgeMatchVideosAPI,\n} from \"../../../shared/api/variables\";\nimport { Link } from \"../../../shared/components/Link/Link\";\nimport MatchButton from \"../../../shared/components/MatchButton/MatchButton\";\nimport VideoModal from \"../../../shared/components/VideoModal\";\nimport { WatchOnAppleIcon } from \"../../../shared/components/WatchOnAppleIcon/WatchOnAppleIcon\";\nimport { useReactAppState } from \"../../../shared/containers/utils\";\nimport {\n modalActionTypes,\n modalTypes,\n} from \"../../../shared/hooks/useModalOptions\";\nimport { backgroundTypes } from \"../../../shared/styled/Theme\";\nimport { highlightTypes, matchHighlightsTagSlug } from \"../../../shared/utils\";\nimport { StyledMatchHubButtons } from \"./StyledMatchHubButtons\";\nimport TicketButton from \"./TicketButton\";\nimport HotelBookButton from \"./HotelBookButton\";\n\nconst MatchHubButtons = ({ queryClassName = \"\" }) => {\n const { t, updateModalOptions, videoTags } = useReactAppState();\n const {\n appleStreamURL,\n competition,\n slug,\n status,\n matchOptaId,\n queryConfig,\n promoInfo,\n } = useMatchData();\n\n const forgeMatchVideosEndpoint = forgeMatchVideosAPI({ matchOptaId });\n const forgeMatchContentVideosEndpoint = forgeMatchContentVideosAPI({\n matchSlug: slug,\n });\n\n const { data: forgeMatchVideos } = useQuery({\n queryKey: [`forge-match-videos`, { matchOptaId }],\n queryFn: () =>\n fetchClient({\n apiURL: apiURL.forgeDAPI,\n endpoint: forgeMatchVideosEndpoint,\n }),\n ...queryConfig,\n select: (videos) => videos?.items,\n });\n\n const { data: forgeMatchContentVideos } = useQuery({\n queryKey: [`forge-match-content-videos`, { slug }],\n queryFn: () =>\n fetchClient({\n apiURL: apiURL.forgeDAPI,\n endpoint: forgeMatchContentVideosEndpoint,\n }),\n ...queryConfig,\n select: (videos) => videos?.items,\n });\n\n // const ctaLabel =\n // status?.abbreviation === statusTypes.post\n // ? t(\"replay_on\")\n // : t(\"match_watch_on\");\n\n const trackButton = () => {\n const watchOnAppleTvLabel = `${t(\"match_watch_on\")} ${t(\n \"appletv\"\n )}`.toLowerCase();\n\n trackMatchInteraction({\n clickType: \"button\",\n clickItem: watchOnAppleTvLabel,\n match: slug,\n matchState: status?.abbreviation,\n competition: competition?.shortName,\n });\n\n trackMatchHubClick({\n clickType: \"match\",\n clickItem: watchOnAppleTvLabel,\n match: slug,\n matchState: status?.abbreviation,\n competition: competition?.shortName,\n });\n };\n\n const videoList = React.useMemo(() => {\n const matchVideos =\n forgeMatchVideos?.length >= 0 && forgeMatchContentVideos?.length >= 0\n ? [...forgeMatchVideos, ...forgeMatchContentVideos]\n : [];\n return composeVideoList(matchVideos, videoTags);\n }, [forgeMatchVideos, forgeMatchContentVideos]);\n\n const toggleDialog = (currentVideo) => {\n const foundVideoIndex = videoList.findIndex((video) => {\n return currentVideo._entityId === video._entityId;\n });\n\n const videos = [\n currentVideo,\n ...videoList.slice(0, foundVideoIndex),\n ...videoList.slice(foundVideoIndex + 1),\n ];\n\n updateModalOptions({\n type: modalActionTypes.modalClassName,\n payload: \"mls-o-modal mls-o-modal--dark mls-o-modal--video-playlist\",\n });\n updateModalOptions({\n type: modalActionTypes.modalType,\n payload: modalTypes.default,\n });\n updateModalOptions({\n type: modalActionTypes.label,\n payload: t(\"match_highlights\"),\n });\n updateModalOptions({\n type: modalActionTypes.component,\n payload: VideoModal,\n });\n updateModalOptions({\n type: modalActionTypes.modalData,\n payload: { videoList: videos, video: currentVideo },\n });\n };\n\n const gameHighlights = videoList.find(\n (video) =>\n video?.fields?.highlightType === highlightTypes.gameHighlights ||\n video?.tags.find((tag) => tag?.slug === matchHighlightsTagSlug)\n );\n const fullGame = videoList.find(\n (video) => video?.fields?.highlightType === highlightTypes.fullGame\n );\n const condensedGame = videoList.find(\n (video) => video?.fields?.highlightType === highlightTypes.condensedGame\n );\n\n const hasHighlights =\n status?.abbreviation === statusTypes.post &&\n (gameHighlights || fullGame || condensedGame);\n\n const hasBuyTickets =\n status?.abbreviation === statusTypes.pre &&\n (promoInfo?.firstPartyTickets?.url || promoInfo?.thirdPartyTickets?.url);\n\n const hasHotelBooking =\n status?.abbreviation === statusTypes.pre &&\n promoInfo?.hotelBooking?.url;\n\n if (\n status?.abbreviation === statusTypes.cancelled ||\n status?.abbreviation === statusTypes.abandoned ||\n status?.abbreviation === statusTypes.postponed\n ) {\n return null;\n }\n\n return (\n \n {hasHighlights && (\n \n toggleDialog(gameHighlights || fullGame || condensedGame)\n }\n backgroundColor={backgroundTypes.black}\n >\n {t(\"highlights\")}\n \n )}\n
\n {hasBuyTickets && }\n {hasHotelBooking && }\n
\n {appleStreamURL && (\n \n trackButton()}\n >\n \n \n \n )}\n \n );\n};\nexport default MatchHubButtons;\n","import styled from \"styled-components\";\n\nexport const StyledMatchHubButtons = styled.div`\n display: flex;\n justify-content: center;\n gap: 12px;\n z-index: 1;\n margin-top: auto;\n\n .mls-c-matchbutton {\n min-width: 230px;\n }\n\n .mls-c-matchbutton__apple {\n &--full {\n width: 300px;\n }\n }\n\n .mls-c-match-buttons__external-buttons {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n }\n\n &.xs,\n &.xxs,\n &.sm {\n width: 100%;\n display: block;\n\n .mls-c-match-buttons__external-buttons {\n margin-bottom: .5rem;\n margin-top: .5rem;\n }\n\n .mls-c-matchbutton {\n min-width: auto;\n padding: 0;\n }\n\n a {\n width: 100%;\n }\n\n .mls-c-matchbutton__apple {\n &--full {\n width: 100%;\n }\n }\n }\n`;\n","import styled from \"styled-components\";\n\nconst StyledTicketButton = styled.div`\n width: 100%;\n`;\n\nconst StyledTicketButtonWrapper = styled.div`\n width: 100%;\n`;\n\nexport { StyledTicketButton, StyledTicketButtonWrapper };\n","import React, { useState } from \"react\";\n\nimport ReactDOM from \"react-dom\";\nimport { trackMatchInteraction } from \"../../../../libraries/_modules/tracking/helpers\";\nimport { statusTypes, useMatchData } from \"../../../mls-match-list/utils\";\nimport { Link } from \"../../../shared/components/Link/Link\";\nimport MatchButton from \"../../../shared/components/MatchButton/MatchButton\";\nimport TicketModal from \"../../../shared/components/TicketModal/main\";\nimport { useReactAppState } from \"../../../shared/containers/utils\";\nimport { backgroundTypes } from \"../../../shared/styled/Theme\";\nimport { StyledTicketButton } from \"./StyledTicketButton\";\nimport { getTicketMasterIconUrl, getTicketMasterUrl } from \"../../../shared/utils\";\nimport { TicketIconV2 } from \"../../../shared/svg/TicketIconV2/TicketIconV2\";\n\nconst TicketButton = ({\n backgroundColor = backgroundTypes.black,\n size = \"100%\",\n}) => {\n const { t } = useReactAppState();\n const [isOpen, setIsOpen] = useState(false);\n const { competition, promoInfo, slug, status } = useMatchData();\n const { firstPartyTickets, thirdPartyTickets } = promoInfo || {};\n const ticketMasterIconUrl = getTicketMasterIconUrl({ variant: \"light\" });\n const hasTicketMasterUrl = getTicketMasterUrl([firstPartyTickets?.url, thirdPartyTickets?.url]);\n\n\n const altText =\n promoInfo?.firstPartyTickets?.accessibleText ||\n promoInfo?.thirdPartyTickets?.accessibleText;\n\n const url =\n promoInfo?.firstPartyTickets?.url || promoInfo?.thirdPartyTickets?.url;\n\n const getCtaFromStatus = () =>\n promoInfo?.firstPartyTickets?.displayText ||\n promoInfo?.thirdPartyTickets?.displayText ||\n t(\"buy_tickets\");\n\n const trackButton = () => {\n trackMatchInteraction({\n clickType: \"button\",\n ctaLabel: getCtaFromStatus(),\n match: slug,\n matchState: status?.abbreviation,\n competition: competition?.shortName,\n });\n };\n\n const shouldOpenTicketModal =\n status?.abbreviation === statusTypes.pre &&\n promoInfo?.firstPartyTickets?.url &&\n promoInfo?.thirdPartyTickets?.url;\n\n const SideIcon = hasTicketMasterUrl ? \"TicketMaster\"\n : \n\n if (shouldOpenTicketModal) {\n return (\n \n setIsOpen(true)}\n sideIcon={SideIcon}\n >\n {t(\"buy_tickets\")}\n \n {ReactDOM.createPortal(\n setIsOpen(false)} />,\n document.getElementById(\"react-root\")\n )}\n \n );\n }\n\n return (\n \n \n trackButton()}\n sideIcon={SideIcon}\n >\n {getCtaFromStatus()}\n \n \n \n );\n};\nexport default TicketButton;\n","import React from \"react\";\nimport {\n StyledMatchHubTileWrapper,\n StyledMatchHubTile,\n StyledMatchHubColumn,\n} from \"./StyledMatchHubTile\";\nimport ClubV2 from \"../../../shared/components/ClubV2\";\nimport Scorebug from \"../../../shared/components/Scorebug/Scorebug\";\nimport { formatScores, useMatchData } from \"../../../mls-match-list/utils\";\nimport { useReactAppState } from \"../../../shared/containers/utils\";\nimport { isMobile } from \"../../../shared/styled/Theme\";\n\nfunction MatchHubTile({ queryClassName, showClubRanks }) {\n const {\n homeClubData,\n awayClubData,\n status,\n period,\n resultType,\n matchKickOffTime,\n homeClubRank,\n awayClubRank,\n } = useMatchData();\n\n const { t } = useReactAppState();\n\n const { localTime } = matchKickOffTime || {};\n\n const { homeScore, awayScore } = formatScores({\n homeClubData,\n awayClubData,\n period,\n resultType,\n });\n\n return (\n \n \n \n \n \n\n \n \n \n\n \n \n \n \n \n );\n}\n\n// eslint-disable-next-line no-const-assign,no-func-assign\nMatchHubTile = React.memo(MatchHubTile);\n\nexport default MatchHubTile;\n","import styled from \"styled-components\";\n\nexport const StyledMatchHubTile = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 100%;\n position: relative;\n font-family: ${(props) => props.theme.figma.base.fontfamily_mlstifo_standard};\n gap: 18px;\n\n .mls-c-club__shortname,\n .mls-c-club__abbreviation {\n color: ${(props) => props.theme.rgba.white_100};\n }\n\n .mls-c-club.--home .mls-c-club__shortname {\n margin-right: 14px;\n }\n\n .mls-c-club.--away .mls-c-club__shortname {\n margin-left: 14px;\n }\n\n .mls-c-club__shortname {\n font-family: ${(props) =>\n props.theme.figma.base.fontfamily_mlstifo_headline};\n font-size: ${(props) => props.theme.mixins.pxToRem(28)};\n font-weight: 700;\n line-height: 30px;\n }\n\n .mls-c-club__abbreviation {\n font-family: ${(props) =>\n props.theme.figma.base.fontfamily_mlstifo_headline};\n font-size: ${(props) => props.theme.mixins.pxToRem(18)};\n font-weight: 700;\n line-height: 20px;\n }\n\n .mls-c-club.--home .mls-c-club__abbreviation {\n margin-right: 8px;\n }\n\n .mls-c-club.--away .mls-c-club__abbreviation {\n margin-left: 8px;\n }\n\n .mls-c-scorebug,\n .mls-c-scorebug__post,\n .mls-c-scorebug__live {\n width: 103px;\n height: 50px;\n\n .mls-c-scorebug__score,\n .mls-c-scorebug__goal {\n font-size: ${(props) => props.theme.mixins.pxToRem(30)};\n }\n\n .mls-c-scorebug__separator {\n height: 34px;\n border-right: 2px solid rgba(255, 255, 255, 0.25);\n }\n }\n\n picture,\n .mls-c-club__picture {\n width: 60px;\n height: 60px;\n display: flex;\n flex-shrink: 0;\n }\n\n .mls-c-club__name {\n align-items: center;\n }\n\n &.xs,\n &.xxs,\n &.sm {\n picture,\n .mls-c-club__picture {\n width: 50px;\n height: 50px;\n }\n\n .mls-c-scorebug,\n .mls-c-scorebug__post,\n .mls-c-scorebug__live {\n width: 72px;\n height: 36px;\n }\n\n .mls-c-scorebug__score,\n .mls-c-scorebug__goal {\n font-size: ${(props) => props.theme.mixins.pxToRem(20)};\n }\n }\n\n &.xs,\n &.xxs {\n .mls-c-club__abbreviation {\n display: none;\n }\n }\n`;\n\nexport const StyledMatchHubTileWrapper = styled.div`\n display: flex;\n align-items: center;\n width: 100%;\n`;\n\nexport const StyledMatchHubColumn = styled.div`\n &.--club {\n width: 100%;\n flex: 1;\n }\n\n &.--pre,\n &.--ppd,\n &.--canc,\n &.--dly,\n &.--aban {\n .mls-c-scorebug--horizontal {\n align-items: center;\n\n span {\n font-size: 22px;\n }\n }\n }\n\n &.xs,\n &.xxs,\n &.sm {\n &.--pre {\n .mls-c-scorebug--horizontal {\n align-items: center;\n\n span {\n font-size: 18px;\n }\n }\n }\n }\n`;\n","import classNames from \"classnames\";\nimport React, { useState } from \"react\";\nimport { ContainerQuery } from \"react-container-query\";\nimport { useQuery } from \"react-query\";\nimport MatchDataLayer from \"../../../mls-match-list/components/MatchDataLayer\";\nimport { periodTypes } from \"../../../mls-match-list/utils\";\nimport { fetchClient } from \"../../../shared/api/fetching\";\nimport {\n d3SingleMatchAPI,\n mlsSingleMatchStatsAPI,\n} from \"../../../shared/api/variables\";\nimport { useReactAppState } from \"../../../shared/containers/utils\";\nimport { mergeMlsMatchAPIResults } from \"../../../shared/match/utils\";\nimport { query } from \"../../../shared/styled/Theme\";\nimport MatchHub from \"../MatchHub/MatchHub\";\nimport { StyledMatchHubWrapper } from \"../MatchHub/StyledMatchHub\";\n\nfunction MatchHubWrapper({ options }) {\n const { apiList } = useReactAppState();\n const { statsAPI, d3SportsAPI } = apiList || {};\n const matchOptaId = options?.matchOptaId;\n const [refetchInterval, setRefetchInterval] = useState(60000);\n\n const mlsMatchEndpoint = mlsSingleMatchStatsAPI({\n matchOptaId,\n });\n\n const { data: statsAPIMatch } = useQuery({\n queryKey: [`mls-match`, { matchOptaId }],\n queryFn: () =>\n fetchClient({ endpoint: mlsMatchEndpoint, apiURL: statsAPI }),\n select: (data) => (data && data.length > 0 ? data[0] : null),\n enabled: !!matchOptaId,\n refetchInterval,\n });\n\n const matchEndpoint = d3SingleMatchAPI({ matchOptaId });\n\n const { data: sportAPIMatch } = useQuery({\n queryKey: [`d3-match`, { matchOptaId }],\n queryFn: () =>\n fetchClient({ endpoint: matchEndpoint, apiURL: d3SportsAPI }),\n enabled: !!matchOptaId,\n });\n\n const mergedMatch =\n statsAPIMatch && sportAPIMatch\n ? mergeMlsMatchAPIResults({ sportAPIMatch, statsAPIMatch })\n : null;\n\n if (!mergedMatch || !matchOptaId) {\n return null;\n }\n\n if (\n !!refetchInterval &&\n (statsAPIMatch?.period === periodTypes.FullTime ||\n statsAPIMatch?.period === periodTypes.Cancelled ||\n statsAPIMatch?.period === periodTypes.Abandoned ||\n statsAPIMatch?.period === periodTypes.Postponed)\n ) {\n setRefetchInterval(null);\n }\n\n return (\n \n {(params) => (\n \n \n \n \n \n )}\n \n );\n}\n\n// eslint-disable-next-line no-func-assign\nMatchHubWrapper = React.memo(MatchHubWrapper);\n\nexport default MatchHubWrapper;\n","import React from \"react\";\nimport { ThemeProvider } from \"styled-components\";\nimport { Theme, themeTypes } from \"../shared/styled/Theme\";\nimport MatchHubWrapper from \"./components/MatchHubWrapper/MatchHubWrapper\";\n\nfunction MatchHubhMain({ options }) {\n return (\n \n \n \n );\n}\n\n// eslint-disable-next-line no-func-assign\nMatchHubhMain = React.memo(MatchHubhMain);\n\nexport default MatchHubhMain;\n","import React, { Fragment } from \"react\";\nimport { trackMatchHubClick } from \"../../../../libraries/_modules/tracking/helpers\";\nimport PenaltyCardIcon from \"../../svg/PenaltyCardIcon\";\n\nimport { matchEventTypes } from \"../../../mls-match-summary/utils\";\nimport {\n StyledCommentary,\n StyledCommentaryLastName,\n StyledMatchCommentary,\n StyledCommentaryMinute,\n} from \"./StyledCommentary\";\nimport { useMatchData } from \"../../../mls-match-list/utils\";\nimport { svgSizes } from \"../../utils\";\n\nfunction MatchCommentary({ summary, isHome }) {\n const { slug, status, competition } = useMatchData();\n\n const handleClick = (playerName) => () => {\n trackMatchHubClick({\n clickType: \"player\",\n match: slug,\n matchState: status?.abbreviation,\n competition: competition?.shortName,\n playerName,\n });\n };\n\n if (!summary?.length) {\n return null;\n }\n\n if (!summary || summary.length === 0) {\n return null;\n }\n\n const getDisplayName = (known_name, last_name, first_name) => {\n if (known_name) return known_name;\n if (last_name && first_name) return `${first_name.charAt(0)}. ${last_name}`;\n return last_name || first_name || \"\";\n };\n\n const summaryToShow = summary.reduce((final, item) => {\n const { last_name, known_name, first_name, minute, type } = item || {};\n const displayName = getDisplayName(known_name, last_name, first_name);\n const displayMinute = { minute, type };\n const existingScorer = final.find(\n (item) => item.displayName === displayName\n );\n if (!existingScorer) {\n return [...final, { displayName, minutes: [displayMinute], ...item }];\n } else {\n existingScorer.minutes.push({ minute, type });\n return final;\n }\n }, []);\n\n const Scorer = ({ displayName, minutes }) => {\n const composeMinutes = (minute, type) => {\n if (!minute) return null;\n\n switch (type) {\n case matchEventTypes.redCard:\n case matchEventTypes.secondYellowCard:\n return (\n <>\n {\" \"}\n {minute}\n \n );\n case matchEventTypes.ownGoal:\n return `${minute} OG`;\n case matchEventTypes.penaltyGoal:\n return `${minute} PK`;\n default:\n return minute;\n }\n };\n return (\n <>\n \n {displayName}\n \n \n {minutes?.length ? \"(\" : \"\"}\n {minutes?.map(({ minute, type }, index) => (\n \n {composeMinutes(minute, type)}\n {minutes.length - 1 === index ? \"\" : \", \"}\n \n ))}\n {minutes?.length ? \")\" : \"\"}\n \n \n );\n };\n\n return (\n \n {summaryToShow.map((commentary, index) => {\n const { displayName, minutes } = commentary || {};\n\n return (\n handleClick(displayName)}\n className=\"mls-c-match-commentary__scorer\"\n >\n \n {summaryToShow.length - 1 === index ? \"\" : \",\"}\n \n );\n })}\n \n );\n}\n\n// eslint-disable-next-line no-func-assign\nMatchCommentary = React.memo(MatchCommentary);\n\nexport default MatchCommentary;\n","import styled from \"styled-components\";\n\nexport const StyledMatchCommentary = styled.div`\n font-size: ${(props) => props.theme.mixins.pxToRem(12)};\n font-weight: 500;\n display: flex;\n flex-wrap: wrap;\n`;\n\nexport const StyledCommentary = styled.span`\n display: flex;\n flex-wrap: nowrap;\n margin-left: 2px;\n white-space: nowrap;\n`;\n\nexport const StyledCommentaryMinute = styled.span`\n margin-left: 3px;\n .mls-o-svg {\n display: inline;\n position: static;\n svg {\n max-width: 12.5px;\n }\n }\n`;\n\nexport const StyledCommentaryLastName = styled.span``;\n","import React from \"react\";\n\nexport const TicketIconV2 = ({ width, height, extraClasses = \"\", viewBox = \"0 0 17 17\" }) => {\n return (\n \n \n \n \n \n \n \n );\n};\n"],"names":[],"sourceRoot":""}