{"version":3,"file":"js/react/mls-featured-match-app.js?_t=ac88d48783df69b74a2c","mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAA;AACA;AACA;AACA;AACA;AAGA;AAEA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AAGA;AACA;AACA;AAEA;AAGA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAQA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAyDA;AACA;AAEA;AAGA;AAgBA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AAQA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAaA;AAGA;AAEA;;;;;;;;;;;;;;;;;;AC1RA;AACA;AACA;AAEA;AACA;AAEA;AAoBA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAiBA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAcA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AAGA;AAEA;AAIA;AAIA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AAcA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AAYA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AAUA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AAQA;AAGA;AAEA;;;;;;;;;;;;;;;;;AClJA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AAEA;AAMA;AAEA;;;;;;;;;;;;;;;;ACnBA;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAAA;AACA;AACA;AACA;AAGA;AAiCA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAOA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAOA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAOA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAYA;AAEA;;;;;;;;;;;;;;;;AChHA;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAAA;AACA;AACA;AACA;AACA;AAGA;AAIA;AAAA;AACA;AACA;AACA;AAGA;AAAA;AACA;AACA;AACA;AAGA;AA+BA;AAGA;AAEA;;;;;;;;;;;;;;;;AChFA;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAIA;AAEA;AAaA;AAEA;;;;;;;;;;;;;;;;ACnCA;;;;;;;;;;;;;;;;ACAA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAGA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAGA;AAGA;AAEA;;;;;;;;;;;;;;;;AC3BA;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://@mlssoccer/netcore/./scripts/react/mls-featured-match/app.js","webpack://@mlssoccer/netcore/./scripts/react/mls-featured-match/components/FeaturedMatchBlock/FeaturedMatchBlock.js","webpack://@mlssoccer/netcore/./scripts/react/mls-featured-match/loader.js","webpack://@mlssoccer/netcore/./scripts/react/mls-featured-match/main.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-list/components/MatchInfo/MatchInfo.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-list/components/MatchInfo/index.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-list/components/MatchPromo/MatchPromo.js","webpack://@mlssoccer/netcore/./scripts/react/mls-match-list/components/MatchPromo/index.js","webpack://@mlssoccer/netcore/./scripts/react/mls-scoreboard/components/VerticalMatch/VerticalMatch.js","webpack://@mlssoccer/netcore/./scripts/react/mls-scoreboard/components/VerticalMatch/index.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/Sponsor/Sponsor.js","webpack://@mlssoccer/netcore/./scripts/react/shared/components/Sponsor/index.js","webpack://@mlssoccer/netcore/./scripts/react/shared/svg/BroadcastIcon/BroadcastIcon.js","webpack://@mlssoccer/netcore/./scripts/react/shared/svg/BroadcastIcon/index.js","webpack://@mlssoccer/netcore/./.yarn/cache/date-fns-npm-2.29.2-da48c27e93-0ac440a105.zip/node_modules/date-fns/esm/isYesterday/index.js"],"sourcesContent":["export { default } from './main';\n","import React from 'react';\nimport { useQuery } from \"react-query\";\nimport { format } from 'date-fns';\nimport { formatScores, statusTypes, useMatchData } from \"../../../mls-match-list/utils\";\nimport MatchInfo from \"../../../mls-match-list/components/MatchInfo\";\nimport Sponsor from \"../../../shared/components/Sponsor\";\nimport Club from \"../../../mls-match-list/components/Club\";\nimport ToggleButton from \"../../../shared/components/ToggleButton\";\nimport TicketIcon from \"../../../shared/svg/TicketIcon\";\nimport PlayCircleIcon from \"../../../shared/svg/PlayCircleIcon\";\nimport MatchPromo from \"../../../mls-match-list/components/MatchPromo\";\nimport MatchScoreBox from \"../../../mls-match-list/components/MatchScoreBox\";\nimport BroadcastIcon from \"../../../shared/svg/BroadcastIcon\";\nimport { useReactAppState } from \"../../../shared/containers/utils\";\nimport { modalActionTypes, modalTypes } from \"../../../shared/hooks/useModalOptions\";\nimport MatchModal from \"../../../mls-match-list/components/MatchModal/MatchModal\";\nimport { trackMatchInteraction } from '../../../../libraries/_modules/tracking/helpers';\nimport {\n apiURL,\n forgeMatchContentVideosAPI,\n forgeMatchVideosAPI,\n} from \"../../../shared/api/variables\";\nimport { composeVideoList } from \"../../../mls-match-feed/utils\";\nimport { highlightTypes, composeGeoLocatedProviders, matchHighlightsTagSlug } from \"../../../shared/utils\";\nimport { fetchClient } from \"../../../shared/api/fetching\";\n\nfunction FeaturedMatchBlock() {\n const { urlList, directoryList, t, updateModalOptions, videoTags, location } = useReactAppState();\n const { baseUrl } = urlList || {};\n const { matchHubDir } = directoryList || {};\n\n const { mediaProviders, matchDateTime, status, minuteDisplay, promoInfo, homeClubData, awayClubData, advertiser, isRecentGoal, count, slug, season, competition, venue, listType, queryConfig, matchOptaId, winnerStatus, resultType, period, isTimeTbd } = useMatchData();\n const {\n isHomeWinner,\n isAwayWinner\n } = winnerStatus || {};\n\n const { slug: competitionSlug } = competition || {};\n const { optaId: seasonOptaId } = season || {};\n\n const matchPageUrl = `${baseUrl}/${matchHubDir}/${competitionSlug}/${seasonOptaId}/matches/${slug}`;\n const { localTime } = matchDateTime || {};\n const date = localTime ? format(localTime, \"E, LLL d\") : null;\n const timePeriod = localTime ? format(localTime, \"a\") : null;\n const time = localTime ? format(localTime, `p`).slice(0, -3) : null;\n\n const trackButton = (label) => {\n trackMatchInteraction({\n clickType: 'button',\n ctaLabel: label,\n match: slug,\n matchState: status?.abbreviation,\n competition: competition?.shortName,\n });\n };\n\n const trackCard = () => {\n trackMatchInteraction({\n clickType: 'featured match',\n ctaLabel: undefined,\n match: slug,\n matchState: status?.abbreviation,\n competition: competition?.shortName,\n });\n };\n\n const trackingData = {\n id: slug,\n name: undefined,\n creative: 'featured match',\n position: undefined\n };\n\n const handleClick = (e, label) => {\n e.preventDefault();\n trackButton(label);\n updateModalOptions({ type: modalActionTypes.modalClassName, payload: \"mls-o-modal mls-o-modal--match\" });\n updateModalOptions({ type: modalActionTypes.modalType, payload: modalTypes.animated });\n updateModalOptions({ type: modalActionTypes.label, payload: 'match modal' });\n updateModalOptions({ type: modalActionTypes.component, payload: MatchModal });\n updateModalOptions({ type: modalActionTypes.modalData, payload: { queryConfig, matchOptaId, homeClubData, awayClubData, matchDateTime, venue, status, listType, mediaProviders, promoInfo, winnerStatus, slug, isTimeTbd } });\n updateModalOptions({ type: modalActionTypes.show });\n };\n\n const {\n firstPartyTickets,\n thirdPartyTickets,\n sponsorImage,\n promotionalSponsor\n } = promoInfo;\n const { assetUrl } = sponsorImage || {};\n const { country } = location || {};\n const { streaming, national, radio } = composeGeoLocatedProviders(mediaProviders, country);\n\n const { homeLinear, awayLinear, homeStreaming, awayStreaming, clubLinear, clubStreaming, clubRadio } = mediaProviders || {};\n\n const mergedProviders = [\n ...national,\n ...streaming,\n ...radio,\n ...(homeLinear != null ? homeLinear : []),\n ...(awayLinear != null ? awayLinear : []),\n ...(homeStreaming != null ? homeStreaming : []),\n ...(awayStreaming != null ? awayStreaming : []),\n ...(clubLinear != null ? clubLinear : []),\n ...(clubStreaming != null ? clubStreaming : []),\n ...(clubRadio != null ? clubRadio : []),\n ];\n\n const { homeScore, awayScore, shootoutResult } = formatScores({\n homeClubData,\n awayClubData,\n period,\n resultType\n });\n\n const showTicketButton = firstPartyTickets?.url || thirdPartyTickets?.url;\n\n const forgeMatchVideosEndpoint = forgeMatchVideosAPI({ matchOptaId });\n const forgeMatchContentVideosEndpoint = forgeMatchContentVideosAPI({ matchSlug: slug });\n\n const { data: forgeMatchVideos } = useQuery({\n queryKey: [`forge-match-videos`, { matchOptaId }],\n queryFn: () => fetchClient({ apiURL: apiURL.forgeDAPI, endpoint: forgeMatchVideosEndpoint }),\n ...queryConfig,\n enabled: status?.abbreviation === statusTypes.post,\n select: videos => videos?.items\n });\n\n const { data: forgeMatchContentVideos } = useQuery({\n queryKey: [`forge-match-content-videos`, { slug }],\n queryFn: () => fetchClient({ apiURL: apiURL.forgeDAPI, endpoint: forgeMatchContentVideosEndpoint }),\n ...queryConfig,\n enabled: status?.abbreviation === statusTypes.post,\n select: videos => videos?.items\n });\n\n const videoList = React.useMemo(() => {\n const matchVideos = forgeMatchVideos?.length >= 0 && forgeMatchContentVideos?.length >= 0 ? [...forgeMatchVideos, ...forgeMatchContentVideos] : [];\n return composeVideoList(matchVideos, videoTags);\n }, [forgeMatchVideos, forgeMatchContentVideos]);\n\n const gameHighlights = videoList.find(video => video?.fields?.highlightType === highlightTypes.gameHighlights || video?.tags.find(tag => tag?.slug === matchHighlightsTagSlug));\n const fullGame = videoList.find(video => video?.fields?.highlightType === highlightTypes.fullGame);\n const condensedGame = videoList.find(video => video?.fields?.highlightType === highlightTypes.condensedGame);\n\n return (\n <>\n
{advertiser}
: null}\n{minuteDisplay}
\n >\n )\n : status?.abbreviation === statusTypes.post\n ? t(\"match_final\")\n : status?.abbreviation === statusTypes.abandoned ? t(\"match_abandoned\") :\n{leagueMatchTitle ? leagueMatchTitle : competition?.name}
\n{name}
\n