(globalThis["webpackChunkverso"] = globalThis["webpackChunkverso"] || []).push([[1782],{ /***/ 41782: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); const react_1 = __importDefault(__webpack_require__(96540)); const client_1 = __webpack_require__(5338); const yield_main_1 = __webpack_require__(56187); const perf_tooling_1 = __webpack_require__(56822); const PageFactory_1 = __webpack_require__(24755); const event_registry_1 = __webpack_require__(89245); async function bootClient(pageComponent) { (0, event_registry_1.registerKendraEvents)(); // mount and render the app const appElement = react_1.default.createElement(PageFactory_1.PageFactory.create(pageComponent), window.__PRELOADED_STATE__); const mountNode = document.getElementById('app-root'); await (0, yield_main_1.yieldToMain)(); (0, perf_tooling_1.perfMark)('react-hydrate-start'); (0, client_1.hydrateRoot)(mountNode, appElement); } exports["default"] = bootClient; //# sourceMappingURL=bootstrap-client-app.entry.js.map /***/ }), /***/ 21244: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const { useState, useEffect } = __webpack_require__(96540); const { connect: connectToStore } = __webpack_require__(67851); const { loadData } = __webpack_require__(55918); const GroupedNavigation = __webpack_require__(26223); const loaders = __webpack_require__(62930); const { LoaderWrapper } = __webpack_require__(86286); const UtilityLede = __webpack_require__(50829); const { TrackComponentChannel } = __webpack_require__(78788); const mapStateToProps = (state, { storeKey }) => { return { data: state.groupedNavigation?.[storeKey] || null }; }; const mapDispatchToProps = (dispatch) => ({ setData: (storeKey, data) => { dispatch({ type: 'MERGE_KEY', key: `groupedNavigation`, value: { [storeKey]: data } }); } }); /** * GroupedNavigationContainer component * * @param {object} props - React props * @param {object} props.data - Data to pass to child component * @param {string} props.dataUrl - endpoint url * @param {string} props.loaderType - what type of loader to show while data is fetched * @param {string} props.storeKey - identifier of the data in store and in response from endpoint * @param {string} props.filterLabel - Optional Label for filter * @param {string} props.analyticsEventForFilter - Optional Google Analytics event string to capture filter search * @param {boolean} props.hasAtoZIndex - flag to show an A to Z index on child GroupedNavigation component, false by default * @param {boolean} props.hasFilter - flag to show a filter on child GroupedNavigation component, false by default * @param {func} props.setData - save fetched data in store * @returns {ReactElement} */ const GroupedNavigationContainer = ({ dataUrl, storeKey, data, setData, loaderType = 'Circle', ...rest }) => { React.useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'GroupedNavigationContainer' }); }, []); const [loading, setLoading] = useState(false); const [error, setError] = useState(false); const Loader = loaders[loaderType]; async function handleDataFetching() { if (data || !dataUrl) return; setLoading(true); try { const response = await loadData({ url: `${dataUrl}` }); const groupedNavigationData = response ? response[storeKey] : []; setData(storeKey, groupedNavigationData); } catch (err) { setError(true); } finally { setLoading(false); } } useEffect(() => { handleDataFetching(); // Linter is disabled because if we put data as dependency, it will create loop of // setData cause update of data prop - > rerender -> data fetch calls setData // eslint-disable-next-line react-hooks/exhaustive-deps }, [dataUrl]); return (React.createElement(React.Fragment, null, error && (React.createElement(UtilityLede.ContentCenterNoBackground, { ariaLive: "polite", className: "brand-background__lede", dangerousHed: "Oops", dangerousDek: "something went wrong" })), loading && (React.createElement(LoaderWrapper, null, React.createElement(Loader, null))), data && React.createElement(GroupedNavigation, { groupedLinks: data, ...rest }))); }; GroupedNavigationContainer.propTypes = { analyticsEventForFilter: PropTypes.string, data: PropTypes.array, dataUrl: PropTypes.string.isRequired, filterLabel: PropTypes.string, hasAtoZIndex: PropTypes.bool, hasFilter: PropTypes.bool, loaderType: PropTypes.string, setData: PropTypes.func.isRequired, storeKey: PropTypes.string.isRequired }; module.exports = connectToStore(mapStateToProps, mapDispatchToProps)(GroupedNavigationContainer); //# sourceMappingURL=GroupedNavigationContainer.js.map /***/ }), /***/ 16035: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = __webpack_require__(21244); //# sourceMappingURL=index.js.map /***/ }), /***/ 56141: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const SummaryCollageEight = __webpack_require__(84446); const SummaryCollageTweleve = __webpack_require__(99383); const { TrackComponentChannel } = __webpack_require__(78788); /** * BestStories component * * @param {object} props - React props * @param {string} [props.dangerousDek] - The container dek * @param {string} [props.dangerousHed] - The container title * @param {Array} props.items - The container items, each of which consists of subitems * @param {bool} [props.dangerousCategoryTitle] - section title * @param {bool} [props.shouldEnableCardLevelBookmark] - Optional flag to enable bookmarks on bundle page * @param {bool} [props.shouldEnableCommentsCount] - Optional flag to enable comments count on bundle page * @param {boolean} [props.shouldEnableBundleComponentAnalytics] - feature flag to append data-section-title attribute for analytics * @param {boolean} [props.shouldEnableBookmarkDrawers] - flag to enable bookmark drawer functionality * * @returns {ReactElement} <> */ const BestStories = ({ dangerousDek = '', dangerousHed = "Todays's Pick", items = [], dangerousCategoryTitle = 'Most Recent', shouldEnableBundleComponentAnalytics = false, shouldEnableBookmarkDrawers = false, shouldEnableCardLevelBookmark = false, shouldEnableCommentsCount = false }) => { React.useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'BestStories' }); }, []); // First 3 items for Today's pick const sumCollageFourItems = items.slice(0, 3); // last 5 items for Most Recent const sumListItems = items.slice(3, 8); if (items.length === 12) { return (React.createElement(SummaryCollageTweleve, { dangerousHed: dangerousHed, dangerousDek: dangerousDek, items: items, rightColumnFeature: { header: '', itemIndex: 0, hideOnMobile: false, overrideFeaturedLinks: false }, shouldTrackSnowplowEvent: true, shouldUseDekAsHed: true, hasUnderlineHed: false, hideRubricItemSummary: true, isCenterAlignedWithTopDividerOnly: true, shouldHideBylines: false, summaryItemVariation: "TextBelowLeft", summaryListHed: dangerousCategoryTitle, summaryListSummaryItemVariation: "SideBySideThirdsImageRight", summaryItemRubricVariation: "DiscoveryItem", summarySectionTitleVariation: "TextLeftLineAboveWithHedBackground", sectionTitleVariation: "TextLeftLineAboveWithHedBackground", isBestStories: true })); } return (React.createElement(SummaryCollageEight, { dangerousHed: dangerousHed, dangerousDek: dangerousDek, dangerousCategoryTitle: dangerousCategoryTitle, items: items, shouldEnableBundleComponentAnalytics: shouldEnableBundleComponentAnalytics, sumCollageFourItems: sumCollageFourItems, sumListItems: sumListItems, shouldEnableBookmarkDrawers: shouldEnableBookmarkDrawers, shouldEnableCardLevelBookmark: shouldEnableCardLevelBookmark, shouldEnableCommentsCount: shouldEnableCommentsCount })); }; BestStories.propTypes = { dangerousCategoryTitle: PropTypes.string, dangerousDek: PropTypes.string, dangerousHed: PropTypes.string, items: PropTypes.array, shouldEnableBookmarkDrawers: PropTypes.bool, shouldEnableBundleComponentAnalytics: PropTypes.bool, shouldEnableCardLevelBookmark: PropTypes.bool, shouldEnableCommentsCount: PropTypes.bool }; BestStories.displayName = 'BestStories'; module.exports = BestStories; //# sourceMappingURL=BestStories.js.map /***/ }), /***/ 31498: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { asConfiguredComponent } = __webpack_require__(12892); const BestStories = __webpack_require__(56141); module.exports = asConfiguredComponent(BestStories, 'BestStories'); //# sourceMappingURL=index.js.map /***/ }), /***/ 26066: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const classnames = __webpack_require__(32485); const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const { default: JsonmlToReact } = __webpack_require__(1165); const { TrackComponentChannel } = __webpack_require__(78788); const { processLinks, processCeros, processTiktok, processSidebarHeadings } = __webpack_require__(74804); const BlockquoteEmbed = __webpack_require__(57885); const BlueskyEmbed = __webpack_require__(49033); const RedditEmbed = __webpack_require__(97883); const mapInlineEmbeds = __webpack_require__(51009); const { BodyWrapper } = __webpack_require__(29912); // Create instance with custom converters const jsonmlToReact = new JsonmlToReact({ a: processLinks, blockquote: ({ props }) => ({ type: BlockquoteEmbed, props }), bluesky: ({ props }) => ({ type: BlueskyEmbed, props }), reddit: ({ meta, ...props }) => { return { type: RedditEmbed, props: { ...props, ...JSON.parse(decodeURIComponent(meta)) } }; }, ceros: processCeros, h2: processSidebarHeadings, tiktok: processTiktok, 'inline-embed': mapInlineEmbeds }); /** * Body component renders body formated as JsonML as react components * * @param {object} props - React props * @param {Array} props.body - Required body formatted as JsonML document. * @param {string} [props.className] - Optional top-level class to add * @param {string} [props.children] - Optional instance with custom converters * @param {boolean} [props.shouldDisableMaxWidth] - Optional makes sure content spans across the screen for screen widths > 1600px (FeatureLargeCallout) * @param {boolean} [props.shouldEnableDataJourneyHook] - optional to add `data-journey-hook` attr based on this flag * @param {boolean} [props.shouldEnableFullArticleInverted] - Optional flag to enable full inverted article * * @returns {ReactElement}
*/ const Body = ({ body = ['div'], className, children, shouldDisableMaxWidth = false, shouldEnableDataJourneyHook = true, shouldEnableFullArticleInverted }) => { React.useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'Body' }); }, []); const bodyProps = { className: classnames('body', className), shouldDisableMaxWidth, shouldEnableFullArticleInverted }; if (shouldEnableDataJourneyHook) { bodyProps['data-journey-hook'] = 'client-content'; } return (React.createElement(BodyWrapper, { ...bodyProps, "data-testid": "BodyWrapper" }, children || jsonmlToReact.convert(body))); }; Body.propTypes = { body: PropTypes.array, children: PropTypes.node, className: PropTypes.string, shouldDisableMaxWidth: PropTypes.bool, shouldEnableDataJourneyHook: PropTypes.bool, shouldEnableFullArticleInverted: PropTypes.bool }; module.exports = Body; //# sourceMappingURL=Body.js.map /***/ }), /***/ 22652: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = __webpack_require__(26066); //# sourceMappingURL=index.js.map /***/ }), /***/ 29912: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled } = __webpack_require__(92168); const { calculateSpacing, getColorToken, getTypographyStyles, getLinkStyles, styledProperty, getColorStyles, firstLetterDropCap } = __webpack_require__(26865); const { BREAKPOINTS } = __webpack_require__(96472); const { AssetEmbedWrapper } = __webpack_require__(41108); const { ContentPromoEmbedHedWrapper } = __webpack_require__(63665); const { universalGridCore } = __webpack_require__(89085); const { CaptionCredit, CaptionText } = __webpack_require__(38860); const { ButtonCalloutWrapper } = __webpack_require__(65881); const BodyWrapper = styled.div.withConfig({ displayName: 'BodyWrapper' }) ` ${getTypographyStyles('typography.definitions.consumptionEditorial.body-core')} padding: 0; max-width: ${BREAKPOINTS.xxl}; color: ${getColorToken('colors.consumption.body.standard.body')}; ${styledProperty('shouldDisableMaxWidth', true, `@media (min-width: ${BREAKPOINTS.fullBleed}) { max-width: none; }`)} hr { clear: both; margin: ${calculateSpacing(5, 'px')} auto; } h1, h2, h3, h4, h5, h6 { margin: ${calculateSpacing(2, 'px')} 0; color: ${getColorToken('colors.consumption.body.standard.subhed')}; } h2, h3, h4, h5 { margin-top: ${calculateSpacing(5, 'px')}; } h1, ${ContentPromoEmbedHedWrapper}, h2 { ${getTypographyStyles('typography.definitions.consumptionEditorial.subhed-break-primary')} } h1, h2, h3, h4, h5, h6, p { ${({ shouldEnableFullArticleInverted, theme }) => shouldEnableFullArticleInverted && `color: ${getColorToken(theme, 'colors.consumption.body.inverted.subhed')}`} } h3 { ${getTypographyStyles('typography.definitions.consumptionEditorial.subhed-break-secondary')} } h4, h5, h6 { ${getTypographyStyles('typography.definitions.consumptionEditorial.body-core')} font-weight: bold; } hr { border: 0; background: ${getColorToken('colors.consumption.body.standard.divider')}; height: 2px; } .body__container > p, .container--body-inner > p, .container--full-inner > p { margin: ${calculateSpacing(2, 'px')} 0; } a:not(.button) { ${({ theme }) => getLinkStyles(theme, 'colors.consumption.body.standard.link', 'colors.consumption.body.standard.link-hover')} transition: color 200ms ease; } p { a, strong, em { line-height: inherit; } } ol, ul { margin: ${calculateSpacing(2, 'px')} 0 ${calculateSpacing(2, 'px')} ${calculateSpacing(4)}; padding: 0; li { margin-left: ${calculateSpacing(2)}; } } && { ${AssetEmbedWrapper} { display: block; margin: 0 auto ${calculateSpacing(3, 'px')} auto; padding: 0; width: 100%; img { width: 100%; height: auto; } &.callout--group-item-1 { margin: 0 auto ${calculateSpacing(5, 'px')} auto; } ${({ shouldEnableFullArticleInverted, theme }) => shouldEnableFullArticleInverted && ` ${CaptionText}, ${CaptionCredit} { color: ${getColorStyles(theme, 'color', 'colors.consumption.lead.inverted.description')}; }`} } } .heading-h1, .heading-h2, .heading-h3, .heading-h4, .heading-h5, .heading-h6 { margin: ${calculateSpacing(2, 'px')} 0; color: ${getColorToken('colors.consumption.body.standard.subhed')}; } .heading-h2, .heading-h3, .heading-h4, .heading-h5 { margin-top: ${calculateSpacing(5, 'px')}; } .heading-h1, .heading-h2 { ${getTypographyStyles('typography.definitions.consumptionEditorial.subhed-break-primary')} } .heading-h3 { ${getTypographyStyles('typography.definitions.consumptionEditorial.subhed-break-secondary')} } .heading-h1, .heading-h2, .heading-h3, .heading-h4, .heading-h5, .heading-h6 { ${({ shouldEnableFullArticleInverted, theme }) => shouldEnableFullArticleInverted && `color: ${getColorToken(theme, 'colors.consumption.body.inverted.subhed')}`} } .heading-h4 { ${getTypographyStyles('typography.definitions.consumptionEditorial.subhed-aux-primary')} } .heading-h5, .heading-h6 { ${getTypographyStyles('typography.definitions.consumptionEditorial.subhed-aux-secondary')} } &.body__container { p.has-dropcap { &::first-letter { ${firstLetterDropCap}; } &.has-dropcap__lead-standard-heading { &::first-letter { padding: 0.1em 0.05em 0 0; color: ${getColorToken('colors.consumption.lead.standard.heading')}; } } } } .container--full, .container--body { ${universalGridCore()} } .container + .container { margin-top: ${calculateSpacing(-2)}; } .container--full-inner { grid-column: 1 / -1; } .container--body-inner { grid-column: 1 / -1; @media (min-width: ${BREAKPOINTS.md}) { grid-column: 3 / span 8; } } .container:first-of-type { .body__container > *:first-child, .container--body-inner > *:first-child, .container--full-inner > *:first-child { margin-top: 0; *:first-child { margin-top: 0; } } } .lead-in-text-callout { ${getTypographyStyles('typography.definitions.discovery.hed-bulletin-primary')} display: inline-block; margin-top: 50px; text-transform: uppercase; letter-spacing: 1.5px; } .lead-in-text-callout:first-of-type { margin-top: 0; } ${({ shouldEnableFullArticleInverted, theme }) => shouldEnableFullArticleInverted && ` ${ButtonCalloutWrapper} { a { background: white; } span { color: black; } a { &:hover { border-color: ${getColorToken(theme, 'colors.consumption.body.inverted.link')}; border-width: 2px; border-style: solid; background-color: ${getColorToken(theme, 'colors.consumption.body.inverted.link')}; } &:active { border-color: ${getColorToken(theme, 'colors.consumption.body.inverted.link')}; border-width: 2px; border-style: solid; background-color: ${getColorToken(theme, 'colors.consumption.body.inverted.link')}; } } span { &:hover { color: ${getColorToken(theme, 'colors.interactive.base.white')}; } &:active { color: ${getColorToken(theme, 'colors.interactive.base.white')}; } } } `} `; module.exports = { BodyWrapper }; //# sourceMappingURL=styles.js.map /***/ }), /***/ 62077: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled } = __webpack_require__(92168); const { BREAKPOINTS } = __webpack_require__(96472); const { applyGridSpacing, cssVariablesGrid } = __webpack_require__(1123); const { minScreen, calculateSpacing, getColorToken, getTypographyStyles, firstLetterDropCap } = __webpack_require__(26865); const { maxThresholds } = __webpack_require__(99906); const Body = __webpack_require__(22652); const Clamp = __webpack_require__(48286); const { AssetEmbedWrapper, AssetEmbedAssetContainer } = __webpack_require__(41108); const Wrapper = styled.div.withConfig({ displayName: 'Wrapper' }) ` ${cssVariablesGrid()} display: grid; grid-template-columns: repeat(4, 1fr); column-gap: var(--grid-gap); margin: 0 auto; width: 100%; max-width: ${BREAKPOINTS.xxl}; row-gap: var(--grid-gap); ${applyGridSpacing('padding')} ${minScreen(BREAKPOINTS.md)} { grid-template-columns: repeat(12, 1fr); } `; const BundleBodyClamp = styled(Clamp).withConfig({ displayName: 'BundleBodyClamp' }) ` grid-column: 1/-1; ${minScreen(BREAKPOINTS.md)} { grid-column: 3/11; } `; const BundleBodyContainer = styled(Body).withConfig({ displayName: 'BundleBodyContainer' }) ` grid-column: 1/-1; ${minScreen(BREAKPOINTS.md)} { grid-column: 3/11; } ${({ shouldOverrideTypeToken }) => shouldOverrideTypeToken ? getTypographyStyles(`typography.definitions.consumptionEditorial.body-core`) : getTypographyStyles('typography.definitions.consumptionEditorial.subhed-aux-secondary')} @media (max-width: ${maxThresholds.md}px) { ${({ shouldOverrideTypeToken }) => shouldOverrideTypeToken ? getTypographyStyles(`typography.definitions.consumptionEditorial.body-core`) : getTypographyStyles('typography.definitions.consumptionEditorial.body-core')}; } p:first-child { padding-top: ${calculateSpacing(4)}; @media (min-width: ${BREAKPOINTS.lg}) { padding-top: ${calculateSpacing(9)}; } } p.callout--group-item { padding-top: 0; } p.has-dropcap { margin-top: ${calculateSpacing(4, 'px')}; &::first-letter { ${firstLetterDropCap}; } &.has-dropcap__lead-standard-heading { &::first-letter { padding: 0.1em 0.05em 0 0; color: ${getColorToken('colors.consumption.lead.standard.heading')}; @media (min-width: ${BREAKPOINTS.lg}) { font-size: 95px; /* Defined by design */ } } } } ${({ shouldOverrideSpacing }) => shouldOverrideSpacing && ` h2, h3, h4, h5 { margin: ${calculateSpacing(5, 'px')} 0; } `} ${AssetEmbedWrapper} { display: grid; grid-gap: 1.25rem; grid-template-columns: repeat(4, 1fr); @media (min-width: ${BREAKPOINTS.md}) { grid-template-columns: repeat(8, 1fr); } ${AssetEmbedAssetContainer} { grid-column: 2 / span 2; @media (min-width: ${BREAKPOINTS.md}) { grid-column: 3 / span 4; } } } `; module.exports = { Wrapper, BundleBodyClamp, BundleBodyContainer }; //# sourceMappingURL=styles.js.map /***/ }), /***/ 66413: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const isEmpty = __webpack_require__(62193); const isEqual = __webpack_require__(2404); const { useState, useRef, useEffect, useMemo, useCallback } = __webpack_require__(96540); const ArrowIcon = __webpack_require__(69571); const useLazyLoadComponent = __webpack_require__(70920); const { TrackComponentChannel } = __webpack_require__(78788); const { ProductCardWithTracking: UPCProductEmbed } = __webpack_require__(57631); const { carouselContentClassName, carouselItemClassName, getAssetWidth, getAssetHeightSmBasedOnContent, getCurrentIndexes, isBackwardArrowActive, isForwardArrowActive, onScrollComplete, onResizeComplete, scrollBackward, scrollForward } = __webpack_require__(30668); const { MixedMediaCarouselWrapper, MixedMediaCarouselContent, MixedMediaCarouselItem, MixedMediaCarouselImageWrapper, MixedMediaCarouselImage, MixedMediaCarouselTextWrapper, MixedMediaCarouselTextDek, MixedMediaCarouselTextCaption, MixedMediaCarousel, MixedMediaCarouselFooter, MixedMediaCarouselButton, MixedMediaCarouselButtonWrapper } = __webpack_require__(31243); const MinimalVideo = __webpack_require__(56153); const { inlineEmbedPosition } = __webpack_require__(62327); const CNE_VIDEO = 'cneembed'; // Default asset width for product slides and slides without images const DEFAULT_ASSET_WIDTH = { sm: '250px', lg: '500px' }; /** * CarouselMixedAspectRatio component * * @param {object} props - React props * @param {string} [props.slides] - Array of gallery items * @param {string} [props.textAlign] - optional prop that represents alignment of gallery item text * * @returns {ReactElement}
*/ const CarouselMixedAspectRatio = ({ slides = [], textAlign = 'center' }) => { useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'CarouselMixedAspectRatio' }); }, []); const [lazyLoadElementRef, shouldLoadComponent] = useLazyLoadComponent(); const hasDataLayer = true && window.dataLayer; // Sample of currentIndexes: // currentIndexes: { // firstFullyVisibleItemIndex: 0 // lastPartiallyVisibleItemIndex: 2 // } const [currentIndexes, setCurrentIndexes] = useState({}); const currentIndexesRef = useRef(currentIndexes); const firstFullyVisibleItemIndexKey = 'firstFullyVisibleItemIndex'; const lastPartiallyVisibleItemIndexKey = 'lastPartiallyVisibleItemIndex'; const carouselRef = useRef(null); const updateCurrentIndexes = () => { // Update indexes array let prevFirstFullyVisibleItemIndex = 0; let prevLastPartialVisibleItemIndex = 0; if (!isEmpty(currentIndexesRef?.current)) { prevFirstFullyVisibleItemIndex = currentIndexesRef.current[firstFullyVisibleItemIndexKey]; prevLastPartialVisibleItemIndex = currentIndexesRef.current[lastPartiallyVisibleItemIndexKey]; } const newIndexes = getCurrentIndexes(carouselRef, prevFirstFullyVisibleItemIndex, prevLastPartialVisibleItemIndex); // Update state only if indexes are different if (!isEqual(newIndexes, currentIndexes)) { currentIndexesRef.current = newIndexes; setCurrentIndexes(newIndexes); } }; const initialiseButtons = () => { // Initialisation of indexes array in order to compute // activeForwardButton and activeBackwardButton if (isEmpty(currentIndexes)) { updateCurrentIndexes(); } }; const operationStopCallback = useCallback(() => { // Update indexes only if it is a mounted component if (carouselRef.current) { updateCurrentIndexes(); } // eslint-disable-next-line react-hooks/exhaustive-deps }, []); // Only the first video in the carousel should autoplay // Only first and 4th video in the carousel should call the ADVs // Force 9x16 aspect ratio to properly serve portrait videos // We can rewrite this rule when we will have the cnevideo aspect-ratio or width/height from the content APIs const prepareScriptSrcCarousel = (scriptUrl, videoCounter) => { let newScripturl = scriptUrl; const connector = scriptUrl.includes('?') ? '&' : '?'; if (videoCounter === 0) newScripturl += `${connector}autoplay=1&muted=1&continuousPlay=0&hideHoverTitle=true&loopVideo=1&hasAnimatedThumb=1&aspectRatio=9x16`; else if (videoCounter === 3) newScripturl += `${connector}autoplay=0&muted=0&continuousPlay=0&hideHoverTitle=true&loopVideo=1&hasAnimatedThumb=1&aspectRatio=9x16`; else newScripturl += `${connector}adsDisabled=1&autoplay=0&muted=0&continuousPlay=0&hideHoverTitle=true&loopVideo=1&hasAnimatedThumb=1&aspectRatio=9x16`; return newScripturl; }; useEffect(() => { let carouselWrapperEl = carouselRef.current; if (carouselWrapperEl) { initialiseButtons(); carouselWrapperEl.addEventListener('scroll', onScrollComplete(operationStopCallback), true); window.addEventListener('resize', onResizeComplete(operationStopCallback)); } return () => { if (carouselWrapperEl) { carouselWrapperEl.removeEventListener('scroll', onScrollComplete); window.removeEventListener('resize', onResizeComplete); carouselWrapperEl = null; carouselRef.current = null; currentIndexesRef.current = {}; } }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []); const activeForwardButton = useMemo(() => currentIndexes && isForwardArrowActive(carouselRef), [currentIndexes]); const activeBackwardButton = useMemo(() => currentIndexes && isBackwardArrowActive(carouselRef), [currentIndexes]); const handleForwardClick = () => { if (activeForwardButton) { let lastPartiallyVisibleItemIndex = Math.min(currentIndexes[lastPartiallyVisibleItemIndexKey], slides.length - 1); // Below is an edge case handled when the carousel item width and carousel container width both are equal if (currentIndexes[lastPartiallyVisibleItemIndexKey] === 0) { lastPartiallyVisibleItemIndex += 1; // lastPartiallyVisibleItemIndex = 0 but incrementing it by 1 will set next item index as 1 } scrollForward(carouselRef, lastPartiallyVisibleItemIndex); } hasDataLayer && window.dataLayer.push({ event: 'carousel-right-arrow-click' }); }; const handleBackwardClick = () => { if (activeBackwardButton) { const firstFullyVisibleItemIndex = Math.max(currentIndexes[firstFullyVisibleItemIndexKey], 0); scrollBackward(carouselRef, firstFullyVisibleItemIndex); } hasDataLayer && window.dataLayer.push({ event: 'carousel-left-arrow-click' }); }; const recomputeIndexes = (assetWidth) => { if (!assetWidth?.lg || !assetWidth?.sm) { updateCurrentIndexes(); } }; const isSlideValid = (slide) => { // if the slide is a CNE_VIDEO, there is no image, but the scriptUrl prop has some value // so we need to check it and return true since it's a valid content type if (!slide) return false; const imageToCheck = Array.isArray(slide?.image) ? slide.image[0] : slide?.image; return (imageToCheck && imageToCheck.sources) || slide.scriptUrl; }; const isProductSlide = (slide) => { return slide && ['product', 'commerce-product'].includes(slide.contentType); }; // Early bail if no slides if (slides.length === 0) { return null; } const assetHeightSmBasedOnContent = getAssetHeightSmBasedOnContent(slides); const updatedSlides = slides.map((slide) => { if (slide?.children) { const updatedSlide = { ...slide.children?.props?.children?.props, href: slide?.children?.props?.href, target: slide?.children?.props?.target }; return updatedSlide; } return slide; }); let videoCounter = 0; return (React.createElement(React.Fragment, null, React.createElement(MixedMediaCarousel, null, React.createElement(MixedMediaCarouselWrapper, { ref: carouselRef }, React.createElement(MixedMediaCarouselContent, { className: carouselContentClassName, ref: lazyLoadElementRef }, shouldLoadComponent && updatedSlides.filter(isSlideValid).map((slide, index) => { const { dangerousCaption, dangerousCredit, dangerousDek, dangerousHed, scriptUrl, contentType, image: rawImage, href, target } = slide; const image = Array.isArray(rawImage) ? rawImage[0] : rawImage; const updatedSlide = { ...slide, image }; const isCNEVideo = contentType === CNE_VIDEO; const isProduct = isProductSlide(slide); const product_asset_width = { sm: '150px', lg: '300px' }; let assetWidth = DEFAULT_ASSET_WIDTH; if (isProduct && image) { assetWidth = product_asset_width; } else if (image && !isProduct) { assetWidth = getAssetWidth(image, assetHeightSmBasedOnContent); } // updateIndex to enable arrow buttons if (index === slides.length - 1) updateCurrentIndexes(); // Render UnifiedProductCard for product slides if (isProduct) { return (React.createElement(MixedMediaCarouselItem, { key: `asset-${index}`, assetWidth: assetWidth, isCNEVideo: false, className: carouselItemClassName }, React.createElement(UPCProductEmbed, { slide: updatedSlide, index: index, dangerousHed: dangerousHed, ...updatedSlide, type: "card", isLazy: true, componentConfigOverride: { type: 'card' }, data_item: { ...updatedSlide, id: slide.productId || slide.id, brand: { name: slide.productBrand || slide.brand }, offers: slide.multipleOffers || slide.offers, index, component: 'unified_product_card_slideshow' }, brand: slide.productBrand || slide.brand, name: slide.name || dangerousHed, offers: slide.multipleOffers || slide.offers, hasImageCreditText: false, shouldDisableCreditText: slide.shouldDisableCreditText }))); } return (React.createElement(MixedMediaCarouselItem, { key: `asset-${index}`, "data-carousel-item": "", assetWidth: assetWidth, isCNEVideo: isCNEVideo, assetHeightSmBasedOnContent: assetHeightSmBasedOnContent, className: carouselItemClassName }, React.createElement(MixedMediaCarouselImageWrapper, { isCNEVideo: isCNEVideo, assetHeightSmBasedOnContent: assetHeightSmBasedOnContent }, isCNEVideo && scriptUrl ? (React.createElement(MinimalVideo, { scriptUrl: prepareScriptSrcCarousel(scriptUrl, videoCounter++), hidePosterTitle: true, shouldGoFullScreenOnPlay: false, videoEmbedPosition: inlineEmbedPosition })) : (React.createElement(React.Fragment, null, href ? (React.createElement("a", { href: href, target: target }, React.createElement(MixedMediaCarouselImage, { ...image, isLazy: true, assetWidth: assetWidth, assetHeightSmBasedOnContent: assetHeightSmBasedOnContent, // Recompute indexes if asset width for images or clips is null // due to not being able to compute width for images // due to missing information (sources/aspectRatio) // for the correct scrollBehaviour and updating arrows onAssetLoaded: () => { recomputeIndexes(assetWidth); }, onAssetContainerLoaded: () => { recomputeIndexes(assetWidth); } }))) : (React.createElement(MixedMediaCarouselImage, { ...image, isLazy: true, assetWidth: assetWidth, assetHeightSmBasedOnContent: assetHeightSmBasedOnContent, onAssetLoaded: () => { recomputeIndexes(assetWidth); }, onAssetContainerLoaded: () => { recomputeIndexes(assetWidth); } }))))), React.createElement(MixedMediaCarouselTextWrapper, { isCNEVideo: isCNEVideo, textAlign: textAlign }, dangerousHed && (React.createElement(MixedMediaCarouselTextDek, { dangerouslySetInnerHTML: { __html: dangerousHed } })), dangerousDek && (React.createElement(MixedMediaCarouselTextDek, { dangerouslySetInnerHTML: { __html: dangerousDek } })), dangerousCredit && (React.createElement(MixedMediaCarouselTextCaption, { dangerouslySetInnerHTML: { __html: dangerousCredit } })), dangerousCaption && (React.createElement(MixedMediaCarouselTextDek, { dangerouslySetInnerHTML: { __html: dangerousCaption } }))))); }))), React.createElement(MixedMediaCarouselFooter, null, React.createElement(MixedMediaCarouselButtonWrapper, null, React.createElement(MixedMediaCarouselButton, { onClick: handleBackwardClick, direction: "back", disabled: !activeBackwardButton }, React.createElement(ArrowIcon, null)), React.createElement(MixedMediaCarouselButton, { onClick: handleForwardClick, direction: "forward", disabled: !activeForwardButton }, React.createElement(ArrowIcon, null))))))); }; CarouselMixedAspectRatio.propTypes = { slides: PropTypes.arrayOf(PropTypes.object), textAlign: PropTypes.string }; CarouselMixedAspectRatio.displayName = 'CarouselMixedAspectRatio'; module.exports = CarouselMixedAspectRatio; //# sourceMappingURL=CarouselMixedAspectRatio.js.map /***/ }), /***/ 57631: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const { useInView } = __webpack_require__(26855); const { trackCommerceInteractionEvent } = __webpack_require__(14307); const UnifiedProductCard = __webpack_require__(51125); const { normalizePrice } = __webpack_require__(65947); const trackedProductCards = new Set(); const trackingImpressionEvent = ({ slide, index }) => { const productId = `${slide.productId || slide.id}-${index}`; // Check if already tracked if (trackedProductCards.has(productId)) { return; } trackedProductCards.add(productId); const primaryOffer = slide.multipleOffers?.[0] || slide.offers?.[0] || {}; const price = normalizePrice(primaryOffer.price); const reducedPrice = normalizePrice(primaryOffer.reducedPrice); const hasDiscount = reducedPrice && price && price > reducedPrice; const discountAmount = hasDiscount ? price - reducedPrice : null; const discountPercentage = hasDiscount ? Math.round(((price - reducedPrice) / price) * 100) : null; const productData = { product_brand: slide.productBrand || slide.brand || '', product_id: slide.productId || slide.id || '', product_name: slide.name || slide.dangerousHed || '', index, product_price: price, is_product_discount: hasDiscount || false, product_discount_amount: discountAmount, product_discount_perc: discountPercentage, currency_code: primaryOffer.currency || 'USD', product_component: 'unified_product_card_slideshow', product_rating: slide.rating || null, product_ref: 'Copilot', product_type: slide.contentType, product_system: 'commerce' }; const eventData = { type: 'impression', subject: 'unified_product_card_slideshow' }; trackCommerceInteractionEvent(eventData, productData); }; const ProductCardWithTracking = ({ slide, index, ...props }) => { const [ref, isInView] = useInView({ threshold: 1, trackVisibility: true, delay: 100, triggerOnce: true }); if (isInView) { trackingImpressionEvent({ slide, index }); } return (React.createElement("div", { ref: ref }, React.createElement(UnifiedProductCard, { ...props }))); }; ProductCardWithTracking.propTypes = { index: PropTypes.number.isRequired, slide: PropTypes.object.isRequired }; module.exports = { ProductCardWithTracking }; //# sourceMappingURL=event-tracking.js.map /***/ }), /***/ 38337: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = __webpack_require__(66413); //# sourceMappingURL=index.js.map /***/ }), /***/ 31243: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled, css } = __webpack_require__(92168); const ResponsiveAsset = __webpack_require__(73275); const { calculateSpacing, getColorToken, getTypographyStyles } = __webpack_require__(26865); const { BREAKPOINTS } = __webpack_require__(96472); const { assetHeightForLgViewport, carouselItemMarginUnit, itemMargins } = __webpack_require__(30668); const MixedMediaCarousel = styled.div.withConfig({ displayName: 'MixedMediaCarousel' }) ` position: relative; width: 100%; `; const MixedMediaCarouselWrapper = styled.div.withConfig({ displayName: 'MixedMediaCarouselWrapper' }) ` width: 100%; overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none; scroll-behavior: smooth; &::-webkit-scrollbar { display: none; } `; const MixedMediaCarouselContent = styled.div.withConfig({ displayName: 'MixedMediaCarouselContent' }) ` display: flex; min-height: 250px; `; // Setting the max-width so that the asset fits within the MixedMediaCarouselWrapper container const maxAssetWidth = `calc(100% - ${itemMargins}px)`; const MixedMediaCarouselItem = styled.div.withConfig({ displayName: 'MixedMediaCarouselItem' }) ` display: flex; flex-direction: column; flex-shrink: 0; margin: 0 ${calculateSpacing(carouselItemMarginUnit)}; max-width: ${maxAssetWidth}; ${({ assetWidth }) => assetWidth && assetWidth.sm && `width: ${assetWidth.sm}`}; @media (min-width: ${BREAKPOINTS.md}) { ${({ assetWidth }) => assetWidth && assetWidth.lg && `width: ${assetWidth.lg}`}; } ${({ isCNEVideo, assetHeightSmBasedOnContent }) => isCNEVideo && assetHeightSmBasedOnContent && ` &&& { /* div[data-testid="RowWrapper"] & { put rules here to target only the slideshow in 'fullbleed' mode } */ /* force 9x16 video size */ width: calc(${assetHeightSmBasedOnContent}px * 9 / 16); @media (min-width: ${BREAKPOINTS.md}) { width: calc(${assetHeightForLgViewport}px * 9 / 16); } } } `}; &:first-of-type { margin-left: 0; } &:last-of-type { margin-right: 0; } figure { margin: auto 0; } video { width: auto; max-width: 100%; ${({ assetHeightSmBasedOnContent }) => assetHeightSmBasedOnContent && `max-height: ${assetHeightSmBasedOnContent}px`}; } @media (min-width: ${BREAKPOINTS.md}) { video { height: ${assetHeightForLgViewport}px; max-height: inherit; } } `; const MixedMediaCarouselImageWrapper = styled.div.withConfig({ displayName: 'MixedMediaCarouselImageWrapper' }) ` display: flex; align-items: center; justify-content: center; background-color: ${getColorToken('colors.consumption.body.standard.bg-photo')}; ${({ assetHeightSmBasedOnContent }) => assetHeightSmBasedOnContent && `height: ${assetHeightSmBasedOnContent}px`}; @media (min-width: ${BREAKPOINTS.md}) { height: ${assetHeightForLgViewport}px; } `; const MixedMediaCarouselImage = styled(ResponsiveAsset).withConfig({ displayName: 'MixedMediaCarouselImage' }) ` ${({ assetHeightSmBasedOnContent }) => assetHeightSmBasedOnContent && `max-height: ${assetHeightSmBasedOnContent}px`}; ${({ assetWidth }) => assetWidth && assetWidth.sm && `width: 100%`}; @media (min-width: ${BREAKPOINTS.md}) { max-height: ${assetHeightForLgViewport}px; ${({ assetWidth }) => assetWidth && assetWidth.lg && `width: 100%`}; } img { width: 100%; ${({ assetHeightSmBasedOnContent }) => assetHeightSmBasedOnContent && `max-height: ${assetHeightSmBasedOnContent}px`}; @media (min-width: ${BREAKPOINTS.md}) { max-height: ${assetHeightForLgViewport}px; } } &::after { width: 100%; height: 100%; } .responsive-clip { width: auto; vertical-align: middle; } `; const MixedMediaCarouselTextWrapper = styled.div.withConfig({ displayName: 'MixedMediaCarouselTextWrapper' }) ` align-items: center; margin-top: ${calculateSpacing(2)}; padding: 0 ${calculateSpacing(1)}; min-width: 100%; text-align: ${({ textAlign }) => textAlign}; font-size: 13px; p { display: inline; text-align: center; } `; const MixedMediaCarouselTextDek = styled.span.withConfig({ displayName: 'MixedMediaCarouselTextDek' }) ` ${({ theme }) => getTypographyStyles(theme, 'typography.definitions.consumptionEditorial.description-core')} display: inline-block; margin: 0 ${calculateSpacing(1)} 0 0; vertical-align: top; color: ${getColorToken('colors.discovery.body.light.description')}; font-size: 16px; p { display: inline; } `; const MixedMediaCarouselTextCaption = styled.span.withConfig({ displayName: 'MixedMediaCarouselTextCaption' }) ` ${({ theme }) => getTypographyStyles(theme, 'typography.definitions.globalEditorial.context-secondary')} display: block; margin: 0 0 0.3rem 0; vertical-align: top; color: ${getColorToken('colors.consumption.body.standard.body-deemphasized')}; p { display: inline; } `; const MixedMediaCarouselFooter = styled.div.withConfig({ displayName: 'MixedMediaCarouselFooter' }) ` display: flex; align-items: flex-start; justify-content: flex-end; padding-top: 0.75rem; `; const MixedMediaCarouselButton = styled.button.withConfig({ displayName: 'MixedMediaCarouselButton' }) ` margin-left: ${calculateSpacing(1)}; background: transparent; padding-right: ${calculateSpacing(1)}; padding-left: ${calculateSpacing(1)}; width: ${calculateSpacing(4)}; height: ${calculateSpacing(4)}; &:disabled svg { fill: ${({ theme }) => getColorToken(theme, 'colors.interactive.base.light')}; } ${({ direction }) => direction === 'back' && css ` svg { transform: rotate(180deg); transform-origin: center; } `}; ${({ direction }) => direction === 'forward' && css ` svg { transform-origin: center; } `}; `; const MixedMediaCarouselButtonWrapper = styled.div.withConfig({ displayName: 'MixedMediaCarouselButtonWrapper' }) ` display: flex; width: ${calculateSpacing(11)}; `; module.exports = { MixedMediaCarousel, MixedMediaCarouselWrapper, MixedMediaCarouselContent, MixedMediaCarouselImageWrapper, MixedMediaCarouselItem, MixedMediaCarouselImage, MixedMediaCarouselTextWrapper, MixedMediaCarouselTextDek, MixedMediaCarouselTextCaption, MixedMediaCarouselFooter, MixedMediaCarouselButton, MixedMediaCarouselButtonWrapper }; //# sourceMappingURL=styles.js.map /***/ }), /***/ 30668: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const debounce = __webpack_require__(38221); const { gridSpacing } = __webpack_require__(26865); const { mapSourcesToSegmentedSources } = __webpack_require__(52009); const { isScrollAtEnd, isScrollAtStart } = __webpack_require__(30271); let timeout; const carouselContentClassName = 'MixedMediaCarouselContent'; const carouselItemClassName = 'MixedMediaCarouselItem'; const carouselItemMarginUnit = 1; // snap spacing to an 8px grid; const itemMargins = 2 * carouselItemMarginUnit * gridSpacing; const assetHeightForSmViewport = 250; const assetHeightForSmViewportWithVideos = 400; // const assetHeightForSmViewportMixedWithVideos = 305; const assetHeightForLgViewport = 500; const getCarouselEl = (ref) => ref?.current; const getCarouselItemEls = (ref) => ref?.current?.querySelectorAll(`.${carouselContentClassName} div.${carouselItemClassName}`); const getCarouselUtils = (ref) => { return { carouselEl: getCarouselEl(ref), carouselItemEls: getCarouselItemEls(ref) || [] }; }; const calculateWidth = (aspectRatioString, assetHeight) => { if (aspectRatioString?.includes(':')) { const aspectRatioNumber = aspectRatioString.split(':').map(Number); const assetWidth = (assetHeight * aspectRatioNumber[0]) / aspectRatioNumber[1]; if (isFinite(assetWidth)) { return `${assetWidth}px`; } } return null; }; const getAspectRatio = (img) => { const aspectRatioForViewports = {}; if (img) { const { segmentedSources, sources = {} } = img; const segmentedSourcesObject = segmentedSources ?? mapSourcesToSegmentedSources(sources); const { height: smHeight, width: smWidth, aspectRatio: smAspectRatio } = segmentedSourcesObject.sm[0] || {}; const { height: lmHeight, width: lmWidth, aspectRatio: lmAspectRatio } = segmentedSourcesObject.lg[0] || {}; aspectRatioForViewports.sm = smAspectRatio && smAspectRatio !== 'master' ? smAspectRatio : `${smWidth}:${smHeight}`; aspectRatioForViewports.lg = lmAspectRatio && lmAspectRatio !== 'master' ? lmAspectRatio : `${lmWidth}:${lmHeight}`; } return aspectRatioForViewports; }; const getAssetWidth = (img, assetHeightSmBasedOnContent) => { // Early return if no img if (!img) { return { sm: null, lg: null }; } const aspectRatioForViewports = getAspectRatio(img); return { sm: calculateWidth(aspectRatioForViewports?.sm, assetHeightSmBasedOnContent), lg: calculateWidth(aspectRatioForViewports?.lg, assetHeightForLgViewport) }; }; const onScrollComplete = (callback) => { return () => { clearTimeout(timeout); timeout = setTimeout(() => callback(), 50); }; }; const onResizeComplete = (callback) => debounce(callback, 300); const isBackwardArrowActive = (ref) => { const el = getCarouselEl(ref); return el && !isScrollAtStart(el); }; const isForwardArrowActive = (ref) => { const el = getCarouselEl(ref); // Below is an edge case handled when the carousel item width and carousel container width both are equal if (el && el.scrollLeft === 0 && el.scrollWidth === el.offsetWidth) return true; return el && !isScrollAtEnd(el); }; const isLeftPartOfItemInViewport = (item, carouselEl) => { return item && item.offsetLeft >= carouselEl.scrollLeft; }; const isRightPartOfItemInViewport = (item, carouselEl) => { if (item) { let itemRightMargin = itemMargins / 2; if (!item.nextElementSibling) { // Last child, no margin right itemRightMargin = 0; } return (item.offsetLeft + item.offsetWidth - itemRightMargin <= carouselEl.scrollLeft + carouselEl.offsetWidth); } return false; }; const isItemHorizontallyFullyVisibleInViewport = (item, carouselEl) => { return (isLeftPartOfItemInViewport(item, carouselEl) && isRightPartOfItemInViewport(item, carouselEl)); }; const getFirstFullyVisibleItemIndex = (ref, fromIndex = 0) => { const { carouselEl, carouselItemEls } = getCarouselUtils(ref); // Check if carousel has reached the start if (isScrollAtStart(carouselEl)) { return 0; } for (let index = fromIndex; index < carouselItemEls.length; index++) { const item = carouselItemEls[index]; if (isItemHorizontallyFullyVisibleInViewport(item, carouselEl)) { return index; } } // Scenario where a match is not found, search through the remaining items // Backward click / left scroll scenarios for (let index = 0; index < fromIndex; index++) { const item = carouselItemEls[index]; if (isItemHorizontallyFullyVisibleInViewport(item, carouselEl)) { return index; } } // Scenario where no image is fully visible in the viewport, // Set the fromIndex as the firstFullyVisibleIndex return -1; }; const getLastPartiallyVisibleItemIndex = (ref, startIndex = 0) => { let lastPartiallyVisibleItemIndex = startIndex; const { carouselEl, carouselItemEls } = getCarouselUtils(ref); // Check if carousel has reached the end if (isScrollAtEnd(carouselEl)) { return carouselItemEls.length - 1; } for (let index = startIndex; index < carouselItemEls.length; index++) { const item = carouselItemEls[index]; if (isLeftPartOfItemInViewport(item, carouselEl) && !isRightPartOfItemInViewport(item, carouselEl)) { lastPartiallyVisibleItemIndex = index; break; } // End of carousel reached, // hence resetting lastPartiallyVisibleItemIndex to the last item index if (index === carouselItemEls.length - 1) { lastPartiallyVisibleItemIndex = carouselItemEls.length - 1; } } return lastPartiallyVisibleItemIndex; }; const getCurrentIndexes = (ref, prevFirstFullyVisibleItemIndex, prevLastPartialVisibleItemIndex) => { const { carouselEl, carouselItemEls } = getCarouselUtils(ref); if (carouselItemEls.length > 0) { const startIndexForFindingFullyVisibleItemIndex = isScrollAtEnd(carouselEl) ? prevFirstFullyVisibleItemIndex : prevLastPartialVisibleItemIndex; let firstFullyVisibleItemIndex = getFirstFullyVisibleItemIndex(ref, startIndexForFindingFullyVisibleItemIndex); const startIndexForFindingLastPartiallyVisibleItemIndex = firstFullyVisibleItemIndex === -1 ? 0 : firstFullyVisibleItemIndex; const lastPartiallyVisibleItemIndex = getLastPartiallyVisibleItemIndex(ref, startIndexForFindingLastPartiallyVisibleItemIndex); // Reassign firstFullyVisibleItemIndex if no item is fully visible in viewport if (firstFullyVisibleItemIndex === -1) { firstFullyVisibleItemIndex = lastPartiallyVisibleItemIndex; } return { firstFullyVisibleItemIndex, lastPartiallyVisibleItemIndex }; } return { firstFullyVisibleItemIndex: prevFirstFullyVisibleItemIndex, lastPartiallyVisibleItemIndex: prevLastPartialVisibleItemIndex }; }; const scrollToPosition = (el, offsetLeft) => el.scrollTo({ left: offsetLeft, behavior: 'smooth' }); const scrollBackward = (ref, firstFullyVisibleItemIndex = 0) => { const { carouselEl, carouselItemEls } = getCarouselUtils(ref); const firstFullyVisibleItem = carouselItemEls[firstFullyVisibleItemIndex]; const scrollLeftPosition = firstFullyVisibleItem.offsetLeft - carouselEl.offsetWidth - itemMargins; scrollToPosition(carouselEl, scrollLeftPosition); }; const scrollForward = (ref, lastPartiallyVisibleItemIndex = 0) => { const { carouselEl, carouselItemEls } = getCarouselUtils(ref); const lastPartiallyVisibleItem = carouselItemEls[lastPartiallyVisibleItemIndex]; const scrollLeftPosition = lastPartiallyVisibleItem?.offsetLeft; scrollToPosition(carouselEl, scrollLeftPosition); }; const getAssetHeightSmBasedOnContent = (items) => { const CNE_VIDEO = 'cneembed'; // we have videos in the slider if (items.some((slide) => Object.prototype.hasOwnProperty.call(slide, 'contentType') && slide.contentType === CNE_VIDEO)) { return assetHeightForSmViewportWithVideos; } // mixed content: images/clips/gifs and videos return assetHeightForSmViewport; // we don't have any video in the slider // if (items.every((slide) => slide.contentType !== CNE_VIDEO)) { // return assetHeightForSmViewport; // } }; module.exports = { assetHeightForLgViewport, // assetHeightForSmViewport, // assetHeightForSmViewportOnlyVideos, // assetHeightForSmViewportMixedWithVideos, carouselContentClassName, carouselItemClassName, carouselItemMarginUnit, itemMargins, getAssetWidth, getFirstFullyVisibleItemIndex, getLastPartiallyVisibleItemIndex, getCurrentIndexes, getAssetHeightSmBasedOnContent, isBackwardArrowActive, isForwardArrowActive, onScrollComplete, onResizeComplete, scrollBackward, scrollForward }; //# sourceMappingURL=utils.js.map /***/ }), /***/ 91683: /***/ ((module) => { const getUrlWithUpdatedFilters = ({ filters, location }) => { const selectedSubFilterHierarchies = filters.map((filter) => filter.hierarchyString); let filterQuery = ''; const searchStr = new URLSearchParams(location.search); const searchParam = searchStr.get('q'); if (selectedSubFilterHierarchies.length) { filterQuery = `?filter=${selectedSubFilterHierarchies.join(',')}`; if (location.search === filterQuery) { return location; } } if (searchParam) { filterQuery += filterQuery ? '&' : '?'; filterQuery += `q=${searchParam}${selectedSubFilterHierarchies.length === 0 ? '&filter=channels/artificial-intelligence' : ''}`; } const currentLocationWithoutSearch = `${location.origin}${location.pathname}`; return `${currentLocationWithoutSearch}${filterQuery}`; }; module.exports = getUrlWithUpdatedFilters; //# sourceMappingURL=get-url-with-updated-filters.js.map /***/ }), /***/ 87098: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const getUrlWithUpdatedFilters = __webpack_require__(91683); const useOutsideClick = __webpack_require__(26022); module.exports = { getUrlWithUpdatedFilters, useOutsideClick }; //# sourceMappingURL=index.js.map /***/ }), /***/ 26022: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { useEffect } = __webpack_require__(96540); const useOutsideClick = (ref, callback) => { useEffect(() => { const handleClickOutside = (event) => { if (ref.current && !ref.current.contains(event.target)) { callback(false); } }; document.addEventListener('mousedown', handleClickOutside); return () => { document.removeEventListener('mousedown', handleClickOutside); }; }, [ref, callback]); }; module.exports = useOutsideClick; //# sourceMappingURL=use-outside-click.js.map /***/ }), /***/ 84529: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const React = __webpack_require__(96540); const { useState, useRef, useEffect } = __webpack_require__(96540); const PropTypes = __webpack_require__(5556); const { useIntl } = __webpack_require__(46984); const throttle = __webpack_require__(7350); const translations = (__webpack_require__(31814)/* ["default"] */ .A); const { connector } = __webpack_require__(57744); const { interactionResponse, yieldToMain } = __webpack_require__(56187); const { TrackComponentChannel } = __webpack_require__(78788); const { googleAnalytics } = __webpack_require__(90090); const GroupedNavigationContainer = __webpack_require__(16035); const SecondaryMenu = __webpack_require__(82814); const CloseIcon = __webpack_require__(76399); const MenuIcon = __webpack_require__(26488); const { INITIAL_STATE, computeScroll } = __webpack_require__(70698); const { ChannelNavigationWrapper, ChannelNavigationContainer, ChannelNavigationContent, ChannelNavigationLogoWrapper, ChannelNavigationLogo, ChannelNavigationScrollViewLogo, ChannelNavigationLinksWrapper, ChannelNavigationLinksList, ChannelNavigationLinkItem, ChannelNavigationLink, ChannelNavigationChannelDrawer, ChannelNavigationGroupedNavigation, ChannelNavigationGlobalDrawer, ChannelNavigationAccount, ChannelNavigationToggle, ChannelNavigationSecondaryMenu, ChannelNavigationConsumerMarketingWrapper } = __webpack_require__(63500); const { NavCTA, NavRollover } = __webpack_require__(12501); /** * ChannelNavigation component * * @param {object} props - React props * @param {object} props.isFixed - Navigation is fixed to the top of the screen * @param {object} props.channelNavigationLinks - Links for the channel navigation * @param {object} props.channelNavigationLinks.text - Link text * @param {object} props.channelNavigationLinks.apiEndpoint - url to data related to this filter * @param {object} props.channelNavigationLinks.key - data identifier for search in redux store and in api response object * @param {object} props.channelNavigationLinks.analyticsEvent: - google analytics event name to be triggered * @param {object} props.overrideChannelNavigationLinks - When given they are used instead of the normally configured channelNavigationLinks * @param {object} props.secondaryMenuProps - Links for the drop down menu * @param {object} props.showExternalProfileLink - Optional object containing custom profile label and link used when `isAccountsEnabled` is set to false * @param {object} props.logo - Page logo * @param {object} props.scrollViewLogo - Page logo visible on scroll * @param {string} props.loaderType - type of the loader, to use as placeholder in UI during data fetching * @param {string} props.channelNavigationLogoBaseUrl - Optional * @param {boolean} props.isAccountsEnabled - Optional flag to indicate whether to show user account info or not * @param {object} props.user - user object * @param {object} props.accountProps - user account info object * @param {Function} props.onNavigationLinkClick - Callback fn on navigation click * @param {boolean} props.activeLinkIndex - When supplied only this link index will be styled as active * @param {boolean} props.hideDrawerScroll - optional to hide scroll on drawer menu * @param {boolean} props.hideLinksOnMobile - hides secondary menu on small viewports * * @returns {ReactElement}
*/ const ChannelNavigation = ({ isFixed, logo, scrollViewLogo, channelNavigationLinks, channelNavigationLogoBaseUrl, overrideChannelNavigationLinks, // allows manual setting of links, overriding tenant configured ones secondaryMenuProps, showExternalProfileLink, // allows displaying custom external profile link when `isAccountsEnabled` is set to false loaderType, onNavigationLinkClick, activeLinkIndex, user, hideDrawerScroll, accountProps = { accountLinks: [] }, hideLinksOnMobile = false, isAccountsEnabled = false }) => { useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'ChannelNavigation' }); }, []); const [drawerState, setDrawerState] = useState(false); const [secondaryNavState, setSecondaryNavState] = React.useState(false); const [activeFilter, setActiveFilter] = useState(null); const [navState, setNavState] = useState(INITIAL_STATE); const navigationRef = useRef(null); const { formatMessage } = useIntl(); const links = overrideChannelNavigationLinks || channelNavigationLinks; useEffect(() => { const onKeyup = (e) => { if (e.key === 'Escape' && secondaryNavState) { googleAnalytics.emitGoogleTrackingEvent(`hamburger-menu-${!secondaryNavState ? 'expanded' : 'collapsed'}`); setSecondaryNavState(false); } }; if (secondaryNavState) { window.addEventListener('keyup', onKeyup); } return () => window.removeEventListener('keyup', onKeyup); }, [secondaryNavState]); const handleScroll = () => { setNavState((prevState) => { const computedScroll = computeScroll(prevState); const scrollHeight = (document?.body?.scrollHeight ?? 0) - (document?.body?.clientHeight ?? 0); return { ...computedScroll, scrollHeight }; }); }; useEffect(() => { const throttledScroll = throttle(handleScroll, 100); window.addEventListener('scroll', throttledScroll, { passive: true }); return () => window.removeEventListener('scroll', throttledScroll); }, [isFixed]); const { direction: scrollDirection, pageYOffset, scrollHeight } = navState; const buttonIcon = secondaryNavState ? CloseIcon : MenuIcon; const hasFixedStyles = isFixed || pageYOffset > 0; const isScrollingDown = isFixed || (scrollDirection !== 'up' && pageYOffset > 0) || scrollHeight === pageYOffset; if (!links || !links.length) { return null; } return (React.createElement(ChannelNavigationWrapper, { isFixed: hasFixedStyles }, React.createElement(ChannelNavigationContainer, { ref: navigationRef, "data-testid": "channel-navigation", hideLinksOnMobile: hideLinksOnMobile }, React.createElement(ChannelNavigationContent, { isFixed: hasFixedStyles, isScrollingDown: isScrollingDown }, logo && scrollViewLogo && (React.createElement(ChannelNavigationLogoWrapper, { isFixed: hasFixedStyles, isScrollingDown: isScrollingDown }, React.createElement("a", { href: channelNavigationLogoBaseUrl }, React.createElement(ChannelNavigationLogo, { isScrollingDown: isScrollingDown, ...logo }), isScrollingDown && (React.createElement(ChannelNavigationScrollViewLogo, { isScrollingDown: isScrollingDown, ...scrollViewLogo })))))), React.createElement(ChannelNavigationLinksWrapper, { isScrollingDown: isScrollingDown, hideLinksOnMobile: hideLinksOnMobile }, React.createElement(ChannelNavigationLinksList, { "data-journey-hook": "channel-navigation" }, links.map((link, index) => { const isActive = typeof activeLinkIndex !== 'undefined' ? index === activeLinkIndex : true; return (React.createElement(ChannelNavigationLinkItem, { key: link.key || link.type }, React.createElement(ChannelNavigationLink, { tabIndex: 0, isActive: isActive, label: link.text, href: link.href, as: "a", isInline: true, onClick: async (e) => { if (link.apiEndpoint) { e.preventDefault(); await yieldToMain(); setDrawerState(true); setActiveFilter({ ...link }); } onNavigationLinkClick && onNavigationLinkClick(link); await interactionResponse(); googleAnalytics.emitGoogleTrackingEvent(link.analyticsEvent); } }, link.text))); }))), React.createElement(ChannelNavigationConsumerMarketingWrapper, { isFixed: isFixed, isScrollingDown: isScrollingDown }, React.createElement(NavCTA, null), React.createElement(NavRollover, null)), showExternalProfileLink && (React.createElement(ChannelNavigationAccount, { isFixed: isFixed, isScrollingDown: isScrollingDown, isAccountWithAvatar: false, signInLabel: showExternalProfileLink?.signInLabel, signInLink: showExternalProfileLink?.signInLink, user: { isAuthenticated: false } })), !showExternalProfileLink && isAccountsEnabled && user && (React.createElement(ChannelNavigationAccount, { isFixed: isFixed, isScrollingDown: isScrollingDown, isAccountWithAvatar: accountProps.accountIconInverted && true, accountLinks: accountProps.accountLinks, savedStoriesLabel: accountProps?.savedStoriesLabel, accountLabel: accountProps?.accountLabel, accountAvatar: accountProps.accountIconInverted, signInLabel: accountProps?.signInLabel, signInLink: accountProps?.signInLink, user: user, className: "standard-navigation__section--utility-links-login", tooltip: accountProps.tooltip })), React.createElement(ChannelNavigationToggle, { tabIndex: 0, isIconButton: true, isScrollingDown: isScrollingDown, ButtonIcon: buttonIcon, label: "Open Navigation Menu", onClickHandler: () => { googleAnalytics.emitGoogleTrackingEvent(`hamburger-menu-${!secondaryNavState ? 'expanded' : 'collapsed'}`); setSecondaryNavState(!secondaryNavState); }, role: "button", "aria-expanded": secondaryNavState })), activeFilter && (React.createElement(ChannelNavigationChannelDrawer, { isOpen: drawerState, onClose: () => { setDrawerState(false); }, hideDrawerScroll: hideDrawerScroll, contentLabel: formatMessage(translations.channelDrawerContentLabel), showCloseButton: true, className: "channel-navigation-drawer" }, React.createElement(ChannelNavigationGroupedNavigation, null, React.createElement(GroupedNavigationContainer, { storeKey: activeFilter.key, dataUrl: activeFilter.apiEndpoint, hasAtoZIndex: activeFilter.hasAtoZIndex, loaderType: loaderType, hasFilter: activeFilter.hasFilter, filterLabel: activeFilter.filterLabel })))), React.createElement(ChannelNavigationGlobalDrawer, { isOpen: secondaryNavState, onClose: () => setNavState(!secondaryNavState), contentLabel: "Navigation Menu" }, React.createElement(ChannelNavigationSecondaryMenu, { isFixed: hasFixedStyles }, !isAccountsEnabled && showExternalProfileLink ? (React.createElement(SecondaryMenu, { ...secondaryMenuProps, user: { isAuthenticated: false }, isAccountsEnabled: true, contentAlign: "center" })) : (React.createElement(SecondaryMenu, { accountProps: accountProps, ...secondaryMenuProps, user: user, isAccountsEnabled: isAccountsEnabled, contentAlign: "center" })))))); }; const filterLinkShape = PropTypes.shape({ text: PropTypes.string, key: PropTypes.string, apiEndpoint: PropTypes.string }); ChannelNavigation.propTypes = { accountProps: PropTypes.object, activeLinkIndex: PropTypes.number, channelNavigationLinks: PropTypes.arrayOf(filterLinkShape), channelNavigationLogoBaseUrl: PropTypes.string, hideDrawerScroll: PropTypes.bool, hideLinksOnMobile: PropTypes.bool, isAccountsEnabled: PropTypes.bool, isFixed: PropTypes.bool, loaderType: PropTypes.string, logo: PropTypes.object, onNavigationLinkClick: PropTypes.func, overrideChannelNavigationLinks: PropTypes.arrayOf(filterLinkShape), scrollViewLogo: PropTypes.object, secondaryMenuProps: PropTypes.object, showExternalProfileLink: PropTypes.object, user: PropTypes.shape({ isAuthenticated: PropTypes.bool.isRequired }) }; ChannelNavigation.displayName = 'ChannelNavigation'; module.exports = connector(ChannelNavigation, { keysToPluck: ['user', 'isAccountsEnabled', 'accountProps'] }); //# sourceMappingURL=ChannelNavigation.js.map /***/ }), /***/ 71656: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { asConfiguredComponent } = __webpack_require__(12892); const ChannelNavigation = __webpack_require__(84529); module.exports = asConfiguredComponent(ChannelNavigation, 'ChannelNavigation'); //# sourceMappingURL=index.js.map /***/ }), /***/ 63500: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const styled = (__webpack_require__(92168)["default"]); const { calculateSpacing, getColorToken, getColorStyles, getTypographyStyles, getZIndex, maxScreen } = __webpack_require__(26865); const { hideVisually } = __webpack_require__(52813); const { BREAKPOINTS, ZINDEX_MAP } = __webpack_require__(96472); const { maxThresholds } = __webpack_require__(99906); const Button = __webpack_require__(73730); const { ButtonIconWrapper } = __webpack_require__(18974); const Drawer = __webpack_require__(98653); const ResponsiveImage = __webpack_require__(43608); const Grid = __webpack_require__(86659); const AccountDropdown = __webpack_require__(50152); const { SecondaryMenuAccount } = __webpack_require__(90098); const { StandardNavigationDropdown, StandardNavigationAccountLabel, AccountDropdownToggleIcon, NavigationAccountSignIn, StandardNavigationSuccessLoginAlert, NavigationAccountIconWrapper, JourneyUnitDivider } = __webpack_require__(88570); const { ShowRollover, HideRollover } = __webpack_require__(32788); const { GridItem } = __webpack_require__(40653); const { SignOutButtonWrapper } = __webpack_require__(81591); const { AlertMessage } = __webpack_require__(3318); const ChannelNavigationWrapper = styled.nav.withConfig({ displayName: 'ChannelNavigationWrapper' }) ` position: relative; z-index: ${ZINDEX_MAP.persistentTopLayer}; max-height: ${calculateSpacing(24)}; ${({ isFixed }) => isFixed && ` position: fixed; top: 0; right: 0; left: 0; `}; `; ChannelNavigationWrapper.displayName = 'ChannelNavigationWrapper'; const ChannelNavigationContainer = styled.div.withConfig({ displayName: 'ChannelNavigationContainer' }) ` position: relative; ${({ hideLinksOnMobile }) => `padding-bottom: ${calculateSpacing(hideLinksOnMobile ? 0 : 7)};`} @media (min-width: ${BREAKPOINTS.md}) { border-bottom: 1px solid rgba(51, 51, 51, 1); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); background: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.background')}; padding-bottom: 0; } `; const ChannelNavigationContent = styled.div.withConfig({ displayName: 'ChannelNavigationContent' }) ` display: flex; position: relative; flex-wrap: wrap; z-index: 1; margin: 0 auto; border-bottom: 1px solid ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.divider')}; background: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.background')}; @media (min-width: ${BREAKPOINTS.lg}) { flex-wrap: ${({ isScrollingDown }) => isScrollingDown ? `nowrap` : `wrap`}; } `; const ChannelNavigationLogoWrapper = styled.div.withConfig({ displayName: 'ChannelNavigationLogoWrapper' }) ` display: flex; justify-content: center; margin: 0 auto; padding: ${calculateSpacing(1)}; @media (min-width: ${BREAKPOINTS.lg}) { ${({ isScrollingDown }) => isScrollingDown ? ` left: ${calculateSpacing(3)}; position: absolute; padding: ${calculateSpacing(1)}; width: unset; ` : ` width:100vw; padding: ${calculateSpacing(1)} 0; `} } `; const ChannelNavigationLogo = styled(ResponsiveImage).withConfig({ displayName: 'ChannelNavigationLogo' }) ` width: 96px; @media (min-width: ${BREAKPOINTS.lg}) { display: flex; padding: ${calculateSpacing(1)} 0; width: 168px; height: 88px; ${({ isScrollingDown }) => isScrollingDown && ` ${hideVisually()} `}; } `; const ChannelNavigationScrollViewLogo = styled(ResponsiveImage).withConfig({ displayName: 'ChannelNavigationScrollViewLogo' }) ` @media (max-width: ${BREAKPOINTS.lg}) { ${hideVisually()} } padding: ${calculateSpacing(0.5)} 0; width: 83px; height: unset; `; const ChannelNavigationLinksWrapper = styled(Grid.NoMargins).withConfig({ displayName: 'ChannelNavigationLinksWrapper' }) ` > ${GridItem} { grid-column: 1; margin: 0 auto; text-align: center; @media (min-width: ${BREAKPOINTS.md}) { grid-column: 2 / span 10; } } position: absolute; top: auto; transition: transform 0.5s ease-in-out; background: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.background')}; width: 100%; overflow-x: auto; overflow-y: hidden; ${({ isScrollingDown }) => isScrollingDown ? `transform: translateY(-100%);` : 'transform: translateY(0%);'} @media (min-width: ${BREAKPOINTS.lg}) { display: grid; position: initial; align-items: center; justify-content: center; transform: none; margin: 0 calculateSpacing(14.5); height: 64px; } @media (max-width: ${maxThresholds.lg}px) { ${({ hideLinksOnMobile }) => !hideLinksOnMobile ? `padding: ${calculateSpacing(2)} 0 ${calculateSpacing(2)} ${calculateSpacing(3)}; &::after { background: linear-gradient( to right, rgba(0, 0, 0, 0.01) 31.25%, ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.background')} 100% ); content: ''; height: ${calculateSpacing(4)}; width: 48px; bottom: ${calculateSpacing(2)}; right: 0; position: sticky; pointer-events: none;` : `${hideVisually()};`} } `; const ChannelNavigationLinksList = styled.ul.withConfig({ displayName: 'ChannelNavigationLinksList' }) ` display: flex; margin: 0 auto; list-style: none; text-align: center; padding-inline-start: 0; @media (max-width: ${BREAKPOINTS.md}) { ${({ hideLinksOnMobile }) => hideLinksOnMobile ? `${hideVisually()};` : ''} } `; const ChannelNavigationLinkItem = styled.li.withConfig({ displayName: 'ChannelNavigationLinkItem' }) ` padding-right: ${calculateSpacing(2)}; &:last-child { padding-right: 0; } @media (min-width: ${BREAKPOINTS.md}) { margin-right: 0; padding-right: ${calculateSpacing(3)}; } `; const ChannelNavigationLink = styled.a.withConfig({ displayName: 'ChannelNavigationLink' }) ` ${({ theme }) => getTypographyStyles(theme, 'typography.definitions.foundation.link-primary')} border: none; min-width: auto; text-decoration: none; white-space: nowrap; color: rgb( ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.link', { rgbOnly: true })}, ${({ isActive }) => (isActive ? '1' : '0.6')} ); &:hover { color: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.link-hover')}; } `; const ChannelNavigationChannelDrawer = styled(Drawer.Right).withConfig({ displayName: 'ChannelNavigationChannelDrawer' }) ` &&& { ${({ hideDrawerScroll }) => hideDrawerScroll && ` height: 100%; `} } @media (min-width: ${BREAKPOINTS.md}) { width: 400px; max-width: 400px; && { height: 100%; } } `; const ChannelNavigationGroupedNavigation = styled.div.withConfig({ displayName: 'ChannelNavigationGroupedNavigation' }) ` padding: 0 ${calculateSpacing(4)} ${calculateSpacing(2)}; height: 100%; `; const ChannelNavigationGlobalDrawer = styled(Drawer).withConfig({ displayName: 'ChannelNavigationGlobalDrawer' }) ` height: auto; `; const ChannelNavigationConsumerMarketingWrapper = styled.div.withConfig({ displayName: 'ChannelNavigationConsumerMarketingWrapper' }) ` position: absolute; top: ${({ isScrollingDown }) => isScrollingDown ? calculateSpacing(1.5) : calculateSpacing(14.46)}; right: ${calculateSpacing(24)}; // Journey nav-cta unit is not displayed on mobile because it overlaps with the logo. // It is also hidden on desktop where screen-size is between 1024px and 1279px, // and it can render on top of other navigation links. @media (max-width: calc(${BREAKPOINTS.md} - 1px)), (min-width: ${BREAKPOINTS.lg}) and (max-width: calc(${BREAKPOINTS.xl} - 1px)) { display: ${({ isFixed }) => (isFixed ? `flex` : `none`)}; } // On tablet, the unit is shown if the navigation component is fixed. // If not, it is only displayed when ChannelNavigationLogoWrapper is in an expanded state. @media (min-width: ${BREAKPOINTS.md}) and (max-width: ${BREAKPOINTS.lg}) { display: ${({ isFixed, isScrollingDown }) => !isFixed && isScrollingDown ? `none` : `flex`}; top: ${calculateSpacing(0.8)}; right: ${calculateSpacing(12)}; z-index: 1; } .nav-cta__component { &:hover, &:focus, &:focus-within { ~ .nav-rollover__component > div { ${ShowRollover} } } } .nav-rollover__component > div { ${HideRollover} display: none; right: 0; @media (min-width: ${BREAKPOINTS.xl}) { display: flex; } } .nav-rollover__component > div { &:hover, &:focus, &:focus-within { ${ShowRollover} } } `; const ChannelNavigationAccount = styled(AccountDropdown).withConfig({ displayName: 'ChannelNavigationAccount' }) ` position: absolute; right: ${calculateSpacing(3)}; border: none; background: transparent; padding: ${calculateSpacing(1)} ${calculateSpacing(1.5)}; @media (min-width: ${BREAKPOINTS.md}) { left: inherit; padding: 0; min-width: auto; } &&&.standard-navigation-account { position: absolute; top: ${({ isScrollingDown }) => isScrollingDown ? calculateSpacing(1.4) : calculateSpacing(14.4)}; margin-right: ${({ isAccountWithAvatar }) => isAccountWithAvatar ? calculateSpacing(4) : calculateSpacing(3)}; margin-left: ${calculateSpacing(1.5)}; width: ${calculateSpacing(12)}; height: ${calculateSpacing(6)}; white-space: nowrap; } ${AlertMessage} { white-space: normal; } @media (max-width: ${BREAKPOINTS.lg}) { // The below line is to surface SignIn in mobile devices with avatar enabled // and hide the SignIn in mobile devices if avatar is not enabled ${({ isAccountWithAvatar }) => !isAccountWithAvatar && `display: none;`} &&&.standard-navigation-account { top: ${calculateSpacing(0.4)}; z-index: 1; margin-right: ${calculateSpacing(2)}; } } ${StandardNavigationAccountLabel} { justify-content: flex-end; color: ${({ theme }) => getColorToken(theme, 'colors.interactive.base.white')}; &:hover, &:link, &:visited, &:active { color: ${({ theme }) => getColorToken(theme, 'colors.interactive.base.white')}; svg { path { fill: ${({ theme }) => getColorToken(theme, 'colors.interactive.base.white')}; } } } ${NavigationAccountIconWrapper}:hover { ${({ theme }) => getColorStyles(theme, 'background', 'colors.interactive.base.dark')}; border-color: transparent; } // Journey divider follows the same rules as the Journey nav-cta unit. // Refer ChannelNavigationConsumerMarketingWrapper styles for explanation. @media (max-width: calc(${BREAKPOINTS.md} - 1px)), (min-width: ${BREAKPOINTS.lg}) and (max-width: calc(${BREAKPOINTS.xl} - 1px)) { ${JourneyUnitDivider} { display: ${({ isFixed }) => (isFixed ? `flex` : `none`)}; } } @media (min-width: ${BREAKPOINTS.md}) and (max-width: ${BREAKPOINTS.lg}) { ${JourneyUnitDivider} { display: ${({ isFixed, isScrollingDown }) => !isFixed && isScrollingDown ? `none` : `flex`}; } } } .standard-navigation-account--icon, ${AccountDropdownToggleIcon} { svg { path { fill: ${({ theme }) => getColorToken(theme, 'colors.interactive.base.white')}; } } } ${StandardNavigationDropdown} { top: ${calculateSpacing(6)}; right: ${calculateSpacing(0.8)}; background-color: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.background')}; color: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.link')}; &::before, &::after { content: none; } @media (min-width: ${BREAKPOINTS.md}) { right: ${calculateSpacing(0.4)}; } } ${StandardNavigationDropdown} .account-links__navigation { background-color: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.background')}; .navigation__list-item { &:hover { background-color: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.background')}; } .navigation__link { ${({ theme }) => getTypographyStyles(theme, 'typography.definitions.foundation.link-secondary')}; color: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.link')}; } } } ${NavigationAccountSignIn} { ${({ theme }) => getColorStyles(theme, 'color', 'colors.consumption.body.inverted.body')}; @media (max-width: ${BREAKPOINTS.lg}) { display: none; } } ${StandardNavigationDropdown} ${SignOutButtonWrapper}.account-links__sign-out { ${({ theme }) => getTypographyStyles(theme, 'typography.definitions.foundation.link-secondary')}; color: ${getColorToken('colors.consumption.lead.inverted.link')}; &:hover { background-color: ${getColorToken('colors.consumption.lead.standard.divider')}; color: ${getColorToken('colors.consumption.lead.standard.link')}; } } ${StandardNavigationSuccessLoginAlert} { top: ${calculateSpacing(6.75)}; background-color: ${getColorToken('colors.interactive.base.black')}; ${({ theme }) => getColorStyles(theme, 'border-color', 'colors.discovery.body.black.border')}; ${maxScreen(BREAKPOINTS.md)} { left: -${calculateSpacing(29)}; } .alert-arrow { &::before { border-color: transparent transparent ${getColorToken('colors.discovery.body.black.border')}; } &::after { border-color: transparent transparent ${getColorToken('colors.interactive.base.black')}; } } .alert-message { padding: ${calculateSpacing(3)} ${calculateSpacing(2)}; max-width: fit-content; white-space: normal; ${({ theme }) => getColorStyles(theme, 'color', 'colors.consumption.lead.inverted.context-signature')}; } .close-alert-button { svg { ${({ theme }) => getColorStyles(theme, 'fill', 'colors.interactive.base.white')}; } } } `; const ChannelNavigationToggle = styled(Button.Utility).withConfig({ displayName: 'ChannelNavigationToggle' }) ` position: absolute; top: 14px; right: ${calculateSpacing(2)}; z-index: ${getZIndex('dropdown')}; border: none; background: transparent; padding: ${calculateSpacing(1)} ${calculateSpacing(1.5)}; width: ${calculateSpacing(4)}; height: ${calculateSpacing(4)}; @media (min-width: ${BREAKPOINTS.lg}) { top: ${({ isScrollingDown }) => isScrollingDown ? calculateSpacing(2.5) : '124px'}; left: inherit; padding: 0; min-width: auto; } & > div { position: absolute; } .icon-menu { width: initial; height: initial; } .icon-close { width: initial; height: initial; } path { fill: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.link')}; } &:focus { outline: 2px auto -webkit-focus-ring-color; border: unset; background: transparent; } &:hover { border-width: unset; border-style: none; border-color: transparent; background: transparent; path { fill: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.link-hover')}; } } ${ButtonIconWrapper} { padding-bottom: ${calculateSpacing(0.4)}; } `; const ChannelNavigationSecondaryMenu = styled.div.withConfig({ displayName: 'ChannelNavigationSecondaryMenu' }) ` padding-top: ${({ isFixed }) => (isFixed ? 0 : '62px')}; height: 100%; ${SecondaryMenuAccount} { display: block; } @media (min-width: ${BREAKPOINTS.md}) { padding-top: ${({ isFixed }) => (isFixed ? 0 : '160px')}; } @media (min-width: ${BREAKPOINTS.lg}) { height: 100vh; ${SecondaryMenuAccount} { display: none; } } `; module.exports = { ChannelNavigationWrapper, ChannelNavigationContainer, ChannelNavigationContent, ChannelNavigationLogoWrapper, ChannelNavigationLogo, ChannelNavigationScrollViewLogo, ChannelNavigationLinksList, ChannelNavigationLinksWrapper, ChannelNavigationLinkItem, ChannelNavigationLink, ChannelNavigationChannelDrawer, ChannelNavigationGlobalDrawer, ChannelNavigationGroupedNavigation, ChannelNavigationAccount, ChannelNavigationToggle, ChannelNavigationSecondaryMenu, ChannelNavigationConsumerMarketingWrapper }; //# sourceMappingURL=styles.js.map /***/ }), /***/ 31814: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); const react_intl_1 = __webpack_require__(46984); exports.A = (0, react_intl_1.defineMessages)({ toggleLabel: { id: 'ChannelNavigation.ToggleLabel', defaultMessage: 'Open Navigation Menu', description: 'ChannelNavigation component toggle label' }, channelDrawerContentLabel: { id: 'ChannelNavigation.ChannelDrawerContentLabel', defaultMessage: 'Runway filters navigation', description: 'ChannelNavigation component channel drawer content label' }, globalDrawerContentLabel: { id: 'ChannelNavigation.GlobalDrawerContentLabel', defaultMessage: 'Navigation Menu', description: 'ChannelNavigation component global drawer content label' } }); //# sourceMappingURL=translations.js.map /***/ }), /***/ 97727: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const classnames = __webpack_require__(32485); const React = __webpack_require__(96540); const PropTypes = __webpack_require__(5556); const { injectIntl } = __webpack_require__(46984); const { connect: connectToStore } = __webpack_require__(67851); const CNEVideoEmbed = __webpack_require__(64930); const SectionTitle = __webpack_require__(35864); const { TEASER_VARIATIONS } = __webpack_require__(21221); const { TrackComponentChannel } = __webpack_require__(78788); const { Dek, Hed, Wrapper, Container: DefaultItemsContainer, ContainerWithMargins, Content } = __webpack_require__(79130); const getItemsContainer = ({ hasGridWithMargins }) => { let ItemsContainer = DefaultItemsContainer; if (hasGridWithMargins) { ItemsContainer = ContainerWithMargins; } return ItemsContainer; }; /** * Helper function to return if the variation is set on copilot * * @param {string} functionalTags - functional tag coming from copilot * @returns {bool} if */ const hasTeaser = (functionalTags) => { const functionalTagsArray = functionalTags?.toString().split('|') || []; const availableTeaserVariations = Object.keys(TEASER_VARIATIONS); return !!functionalTagsArray.find((tag) => { return availableTeaserVariations.includes(tag); }); }; /** * CNEVideo component * * @param {object} props - React props * @param {string} props.dangerousDek - Bundle dek * @param {string} props.dangerousHed - Bundle hed * @param {bool} props.hasBottomMargin - Whether the wrapper has bottom margin * @param {bool} props.hasGridWithMargins - Whether the video embed container is a grid with no margins * @param {bool} props.hasTopMargin -Whether the wrapper has top margin * @param {bool} props.isBundle - indicates that the video is an item that is part of a bundle page * @param {bool} props.isSpecialTheme - Prop for special theme * @param {Array} props.items - Videos data * @param {Array} props.functionalTags - Bundle functionalTags * @param {bool} props.shouldHaveTeaser - Whether the video should show a teaser before playing * @param {bool} props.shouldUseBundleData - Whether to use bundle or item data as hed and dek * @param {bool} props.shouldHideCNEVideoDek - should hide dek * @param {bool} props.videoEmbedPosition - indicates the position/type of the video player on the page * @param {string} props.sectionTitleVariation - Optional variation of SectionTitle to use * * @returns {ReactElement} - The bundle body element */ const CNEVideo = ({ dangerousDek, dangerousHed, functionalTags, hasBottomMargin, hasGridWithMargins = false, hasTopMargin, isSpecialTheme = false, isBundle = false, items = [], shouldHaveTeaser = false, shouldUseBundleData = false, shouldHideCNEVideoDek = false, videoEmbedPosition = '', sectionTitleVariation }) => { React.useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'CNEVideo' }); }, []); const SectionTitleComponent = SectionTitle[sectionTitleVariation] || SectionTitle; // if there's a teaser, we must remove the hed and dek from this component, // since the title will be showed on the teaser space. const shouldShowTitle = !hasTeaser(functionalTags); return items?.map((item, index) => { const { scriptUrl, hed, dek, animationClip, categories, isLive, title } = item || {}; const useBundleData = shouldUseBundleData && dangerousDek; const ItemsContainer = getItemsContainer({ hasGridWithMargins }); return (React.createElement(ItemsContainer, { key: index, className: classnames({ 'verso-bundle-cne-embed--grid-with-margins': hasGridWithMargins }), hasTeaser: hasTeaser(functionalTags) }, React.createElement(Wrapper, { hasBottomMargin: hasBottomMargin, hasTopMargin: hasTopMargin, isSpecialTheme: isSpecialTheme }, dangerousHed && (React.createElement(SectionTitleComponent, { dangerousHed: dangerousHed, dangerousDek: dangerousDek, hasDividerAbove: true, hasDividerBelow: true, textAlign: "center", "data-testid": "section-title" })), scriptUrl && (React.createElement(CNEVideoEmbed, { animationClip: animationClip, categories: categories, isLive: isLive, scriptUrl: scriptUrl, shouldHaveTeaser: shouldHaveTeaser, title: title, isBundle: isBundle, videoEmbedPosition: videoEmbedPosition })), !shouldHideCNEVideoDek && shouldShowTitle && (hed || dek || useBundleData) && (React.createElement(Content, null, useBundleData ? (React.createElement(Dek, { dangerouslySetInnerHTML: { __html: dangerousDek } })) : (React.createElement(React.Fragment, null, hed && React.createElement(Hed, { className: "hed" }, hed), dek && React.createElement(Dek, { className: "dek" }, dek)))))))); }); }; CNEVideo.propTypes = { dangerousDek: PropTypes.string, dangerousHed: PropTypes.string, functionalTags: PropTypes.string, hasBottomMoargin: PropTypes.bool, hasGridWithMargins: PropTypes.bool, hasTopMoargin: PropTypes.bool, isSpecialTheme: PropTypes.bool, items: PropTypes.array, sectionTitleVariation: PropTypes.string, shouldHaveTeaser: PropTypes.bool, shouldHideCNEVideoDek: PropTypes.bool, shouldUseBundleData: PropTypes.bool }; CNEVideo.displayName = 'CNEVideo'; module.exports = connectToStore((store) => { const { functionalTags } = store.coreDataLayer?.content || {}; return { functionalTags }; })(injectIntl(CNEVideo)); //# sourceMappingURL=CNEVideo.js.map /***/ }), /***/ 86630: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = __webpack_require__(97727); //# sourceMappingURL=index.js.map /***/ }), /***/ 79130: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled, css } = __webpack_require__(92168); const { BREAKPOINTS } = __webpack_require__(96472); const { applyGridSpacing, cssVariablesGrid } = __webpack_require__(1123); const { calculateSpacing, getTypographyStyles, getColorStyles } = __webpack_require__(26865); const { SectionTitleRoot, SectionTitleHed } = __webpack_require__(33500); const Container = styled.div.withConfig({ displayName: 'Container' }) ` figure { max-width: 75%; } `; const ContainerWithMargins = styled.div.withConfig({ displayName: 'ContainerWithMargins' }) ` ${cssVariablesGrid()} ${applyGridSpacing('padding')} figure { max-width: 100%; } @media (min-width: ${BREAKPOINTS.xxl}) { margin: 0 auto; max-width: ${calculateSpacing(200)}; ${({ hasTeaser }) => hasTeaser && `max-width: inherit;`} } `; const Dek = styled.div.withConfig({ displayName: 'Dek' }) ` ${({ theme }) => getTypographyStyles(theme, 'typography.definitions.consumptionEditorial.body-core')}; align-items: center; margin: auto 25%; text-align: center; a { ${({ theme }) => getColorStyles(theme, 'color', 'colors.interactive.base.black')}; } @media (max-width: ${BREAKPOINTS.md}) { margin: auto 0; } `; const Hed = styled.div.withConfig({ displayName: 'Hed' }) ` ${({ theme }) => getTypographyStyles(theme, 'typography.definitions.consumptionEditorial.hed-standard')}; align-items: center; margin: auto 25% ${calculateSpacing(4)}; text-align: center; @media (max-width: ${BREAKPOINTS.md}) { margin: auto 0 ${calculateSpacing(4)}; } `; const wrapperMarginTop = css ` margin-top: 3.5rem; `; const wrapperMarginBottom = css ` margin-bottom: 3.5rem; `; const Wrapper = styled.div.withConfig({ displayName: 'Wrapper' }) ` ${({ hasTopMargin }) => hasTopMargin && wrapperMarginTop} ${({ hasBottomMargin }) => hasBottomMargin && wrapperMarginBottom} figure { margin-bottom: ${calculateSpacing(6)}; @media (max-width: ${BREAKPOINTS.md}) { margin-bottom: ${calculateSpacing(3)}; } } ${SectionTitleRoot} { ${({ isSpecialTheme, theme }) => isSpecialTheme && ` ${getColorStyles(theme, 'background-color', 'colors.consumption.lead.special.background')}; `} ${SectionTitleHed} { ${({ isSpecialTheme, theme }) => isSpecialTheme && `${getColorStyles(theme, 'color', 'colors.background.white')};`} } } `; const Content = styled.div.withConfig({ displayName: 'Content' }) ` display: flex; flex-direction: column; align-items: center; @media (max-width: ${BREAKPOINTS.md}) { .hed { margin: auto 5% 20px; } .dek { margin: auto 5%; } } `; Dek.displayName = 'Dek'; Hed.displayName = 'Hed'; module.exports = { Dek, Hed, Wrapper, Content, Container, ContainerWithMargins }; //# sourceMappingURL=styles.js.map /***/ }), /***/ 29384: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Card = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(77160); const CardContext_1 = __webpack_require__(32541); const Media_1 = __webpack_require__(86171); const Description_1 = __webpack_require__(13949); const Info_1 = __webpack_require__(78129); const Title_1 = __webpack_require__(86205); function Card({ collageCard, cardConfig, gridArea }) { const CardComponent = getCardComponent(cardConfig.type); return (react_1.default.createElement(CardContext_1.CardContext.Provider, { value: { collageCard, cardConfig } }, react_1.default.createElement(CardComponent, { collageCard: collageCard, cardConfig: cardConfig, gridArea: gridArea }))); } exports.Card = Card; function getCardComponent(cardType) { if (cardType?.startsWith('overlay')) { return OverlayCard; } return DefaultCard; } function DefaultCard({ collageCard, cardConfig, gridArea }) { return (react_1.default.createElement(styles_1.DefaultCardWrapper, { href: collageCard.url, gridArea: gridArea, cardLayout: cardConfig.layout, gridTemplateColumns: cardConfig.gridTemplateColumns }, react_1.default.createElement(Media_1.Media, { cardConfig: cardConfig }), react_1.default.createElement(Title_1.Title, { cardConfig: cardConfig }), react_1.default.createElement(Description_1.Description, { cardConfig: cardConfig }), react_1.default.createElement(Info_1.Info, { cardConfig: cardConfig }))); } function OverlayCard({ collageCard, cardConfig, gridArea }) { const overlayDirection = cardConfig.type?.split('-')[2]; return (react_1.default.createElement(styles_1.OverlayCardWrapper, { href: collageCard.url, gridArea: gridArea, assetConfigs: cardConfig.assetConfigs }, react_1.default.createElement(Media_1.Media, { cardConfig: cardConfig }), react_1.default.createElement(styles_1.OverlayCardContent, { cardLayout: cardConfig.layout, gridTemplateColumns: cardConfig.gridTemplateColumns, overlayDirection: overlayDirection }, react_1.default.createElement(Title_1.Title, { cardConfig: cardConfig }), react_1.default.createElement(Description_1.Description, { cardConfig: cardConfig }), react_1.default.createElement(Info_1.Info, { cardConfig: cardConfig })))); } //# sourceMappingURL=Card.js.map /***/ }), /***/ 32541: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CardContext = void 0; const react_1 = __webpack_require__(96540); exports.CardContext = (0, react_1.createContext)(null); //# sourceMappingURL=CardContext.js.map /***/ }), /***/ 86642: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Dek = void 0; const react_1 = __importStar(__webpack_require__(96540)); const styles_1 = __webpack_require__(4654); const CardContext_1 = __webpack_require__(32541); const utils_1 = __webpack_require__(49887); function Dek({ alignment, hideDek }) { const { collageCard } = (0, react_1.useContext)(CardContext_1.CardContext); const dekData = collageCard.dangerousDek; if (!utils_1.StringUtils.isStringValid(dekData) || hideDek) { return null; } return (react_1.default.createElement(styles_1.DekWrapper, { alignment: alignment, dangerouslySetInnerHTML: { __html: dekData } })); } exports.Dek = Dek; //# sourceMappingURL=Dek.js.map /***/ }), /***/ 74418: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Dek = void 0; var Dek_1 = __webpack_require__(86642); Object.defineProperty(exports, "Dek", ({ enumerable: true, get: function () { return Dek_1.Dek; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 4654: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DekWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const utils_1 = __webpack_require__(26865); exports.DekWrapper = styled_components_v6_1.default.p.withConfig({ displayName: 'DekWrapper' }) ` text-align: ${({ alignment }) => alignment}; margin: 0; padding: 0; ${(0, utils_1.getTypographyStyles)(`typography.definitions.discovery.description-core`)} color: ${(0, utils_1.getColorToken)('colors.discovery.body.white.description')}; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 44631: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Description = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(98719); const Dek_1 = __webpack_require__(74418); const DescriptionAsset_1 = __webpack_require__(60632); function Description({ cardConfig }) { const descriptionConfig = cardConfig.blocks.description; if (descriptionConfig == null) { return null; } const { alignment, hideAsset, hideDek } = descriptionConfig; return (react_1.default.createElement(styles_1.DescriptionWrapper, { cardLayout: cardConfig.layout }, react_1.default.createElement(DescriptionAsset_1.DescriptionAsset, { hideAsset: hideAsset, alignment: alignment }), react_1.default.createElement(Dek_1.Dek, { alignment: alignment, hideDek: hideDek }))); } exports.Description = Description; //# sourceMappingURL=Description.js.map /***/ }), /***/ 92052: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DescriptionAsset = void 0; const react_1 = __importStar(__webpack_require__(96540)); const styles_1 = __webpack_require__(10972); const CardContext_1 = __webpack_require__(32541); const responsive_asset_1 = __importDefault(__webpack_require__(73275)); const map_sources_to_segmented_sources_1 = __webpack_require__(52009); function DescriptionAsset({ hideAsset, alignment }) { const { collageCard } = (0, react_1.useContext)(CardContext_1.CardContext); const assetData = collageCard.image; if (assetData == null || hideAsset) { return null; } const segmentedSources = (0, map_sources_to_segmented_sources_1.mapSourcesToSegmentedSources)(assetData.sources); const responsiveAssetProps = { ...assetData, segmentedSources }; return (react_1.default.createElement(styles_1.DescriptionAssetWrapper, { alignment: alignment }, react_1.default.createElement(responsive_asset_1.default, { ...responsiveAssetProps }))); } exports.DescriptionAsset = DescriptionAsset; //# sourceMappingURL=DescriptionAsset.js.map /***/ }), /***/ 60632: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DescriptionAsset = void 0; var DescriptionAsset_1 = __webpack_require__(92052); Object.defineProperty(exports, "DescriptionAsset", ({ enumerable: true, get: function () { return DescriptionAsset_1.DescriptionAsset; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 10972: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DescriptionAssetWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const types_1 = __webpack_require__(11291); exports.DescriptionAssetWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'DescriptionAssetWrapper' }) ` float: ${({ alignment }) => getFloatValue(alignment)}; width: max(100px, 50%); `; /** The position of the asset should be in reverse of the text alignment. */ function getFloatValue(alignment) { switch (alignment) { case types_1.BlockAlignment.LEFT: return types_1.BlockAlignment.RIGHT; case types_1.BlockAlignment.RIGHT: return types_1.BlockAlignment.LEFT; default: return types_1.BlockAlignment.LEFT; } } //# sourceMappingURL=styles.js.map /***/ }), /***/ 13949: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Description = void 0; var Description_1 = __webpack_require__(44631); Object.defineProperty(exports, "Description", ({ enumerable: true, get: function () { return Description_1.Description; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 98719: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DescriptionWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const utils_1 = __webpack_require__(49887); exports.DescriptionWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'DescriptionWrapper' }) ` width: 100%; grid-area: description; container-type: inline-size; ${(props) => utils_1.MediaQueryUtils.generateCSSMediaQueries('grid-template-areas', props.cardLayout)}; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 20050: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Byline = void 0; const react_1 = __importStar(__webpack_require__(96540)); const styles_1 = __webpack_require__(91899); const CardContext_1 = __webpack_require__(32541); const bylines_1 = __importDefault(__webpack_require__(52540)); function Byline({ hideByline, alignment }) { const { collageCard } = (0, react_1.useContext)(CardContext_1.CardContext); const bylineData = collageCard.contributors; if (bylineData == null || hideByline) { return null; } return (react_1.default.createElement(styles_1.BylineWrapper, null, react_1.default.createElement(bylines_1.default, { contributors: bylineData, contentAlign: alignment, shouldLink: false }))); } exports.Byline = Byline; //# sourceMappingURL=Byline.js.map /***/ }), /***/ 82993: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Byline = void 0; var Byline_1 = __webpack_require__(20050); Object.defineProperty(exports, "Byline", ({ enumerable: true, get: function () { return Byline_1.Byline; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 91899: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BylineWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const utils_1 = __webpack_require__(26865); exports.BylineWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'BylineWrapper' }) ` grid-area: byline; text-align: match-parent; color: ${(0, utils_1.getColorToken)('colors.discovery.body.white.accreditation')}; /* THIS IS A HACK TO REMOVE SPACING OF BYLINE - WE SHOULD CREATE A NEW COMPONENT */ margin: -${(0, utils_1.calculateSpacing)(1)} 0 0; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 7480: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HighlightLabel = void 0; const react_1 = __importStar(__webpack_require__(96540)); const styles_1 = __webpack_require__(7864); const CardContext_1 = __webpack_require__(32541); function HighlightLabel({ hideHighlightLabel }) { const { collageCard } = (0, react_1.useContext)(CardContext_1.CardContext); const { ratingValue } = collageCard; if (ratingValue == null || hideHighlightLabel) { return null; } /** SAMPLE DATA USED */ return (react_1.default.createElement(styles_1.HighLightLabelWrapper, null, ratingValue.isBestNewMusic ?? 'Best New Music')); } exports.HighlightLabel = HighlightLabel; //# sourceMappingURL=HighlightLabel.js.map /***/ }), /***/ 63292: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HighlightLabel = void 0; var HighlightLabel_1 = __webpack_require__(7480); Object.defineProperty(exports, "HighlightLabel", ({ enumerable: true, get: function () { return HighlightLabel_1.HighlightLabel; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 7864: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HighLightLabelWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const utils_1 = __webpack_require__(26865); exports.HighLightLabelWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'HighLightLabelWrapper' }) ` grid-area: highlight-label; text-align: match-parent; ${(0, utils_1.getTypographyStyles)('typography.definitions.globalEditorial.context-primary')} color: ${(0, utils_1.getColorToken)('colors.discovery.body.white.accent')}; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 52373: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Info = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(15848); const Byline_1 = __webpack_require__(82993); const HighlightLabel_1 = __webpack_require__(63292); const ItemsCount_1 = __webpack_require__(94805); const PublishedDate_1 = __webpack_require__(48372); function Info({ cardConfig }) { const infoConfig = cardConfig.blocks.info; if (infoConfig == null) { return null; } const { alignment, hideByline, hideHighlightLabel, hideItemsCount, hidePublishedDate } = infoConfig; return (react_1.default.createElement(styles_1.InfoWrapper, { cardLayout: cardConfig.layout }, react_1.default.createElement(styles_1.InfoContent, { alignment: alignment }, react_1.default.createElement(Byline_1.Byline, { hideByline: hideByline, alignment: infoConfig.alignment }), react_1.default.createElement(HighlightLabel_1.HighlightLabel, { hideHighlightLabel: hideHighlightLabel }), react_1.default.createElement(ItemsCount_1.ItemsCount, { hideItemsCount: hideItemsCount }), react_1.default.createElement(PublishedDate_1.PublishedDate, { hidePublishedDate: hidePublishedDate })))); } exports.Info = Info; //# sourceMappingURL=Info.js.map /***/ }), /***/ 39698: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ItemsCount = void 0; const react_1 = __importStar(__webpack_require__(96540)); const styles_1 = __webpack_require__(8695); const CardContext_1 = __webpack_require__(32541); const { useIntl } = __webpack_require__(46984); const translations = (__webpack_require__(96793)/* ["default"] */ .A); function ItemsCount({ hideItemsCount }) { const { collageCard } = (0, react_1.useContext)(CardContext_1.CardContext); const { itemsCount } = collageCard; const intl = useIntl(); if (!Number.isFinite(itemsCount?.count) || hideItemsCount) { return null; } return (react_1.default.createElement(styles_1.ItemsCountWrapper, null, intl.formatMessage(translations.photo, { count: itemsCount?.count }))); } exports.ItemsCount = ItemsCount; //# sourceMappingURL=ItemsCount.js.map /***/ }), /***/ 94805: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ItemsCount = void 0; var ItemsCount_1 = __webpack_require__(39698); Object.defineProperty(exports, "ItemsCount", ({ enumerable: true, get: function () { return ItemsCount_1.ItemsCount; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 8695: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ItemsCountWrapper = void 0; const styled_components_1 = __importDefault(__webpack_require__(92168)); const utils_1 = __webpack_require__(26865); exports.ItemsCountWrapper = styled_components_1.default.div.withConfig({ displayName: 'ItemsCountWrapper' }) ` grid-area: items-count; text-align: match-parent; ${(0, utils_1.getTypographyStyles)('typography.definitions.globalEditorial.numerical-small')} color: ${(0, utils_1.getColorToken)('colors.discovery.body.white.description')}; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 34221: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PublishedDate = void 0; const react_1 = __importStar(__webpack_require__(96540)); const styles_1 = __webpack_require__(17328); const CardContext_1 = __webpack_require__(32541); const utils_1 = __webpack_require__(49887); function PublishedDate({ hidePublishedDate }) { const { collageCard } = (0, react_1.useContext)(CardContext_1.CardContext); const { date } = collageCard; if (!utils_1.StringUtils.isStringValid(date) || hidePublishedDate) { return null; } return react_1.default.createElement(styles_1.PublishedDateWrapper, null, date); } exports.PublishedDate = PublishedDate; //# sourceMappingURL=PublishedDate.js.map /***/ }), /***/ 48372: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PublishedDate = void 0; var PublishedDate_1 = __webpack_require__(34221); Object.defineProperty(exports, "PublishedDate", ({ enumerable: true, get: function () { return PublishedDate_1.PublishedDate; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 17328: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PublishedDateWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const utils_1 = __webpack_require__(26865); exports.PublishedDateWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'PublishedDateWrapper' }) ` grid-area: published-date; text-align: match-parent; ${(0, utils_1.getTypographyStyles)('typography.definitions.globalEditorial.context-tertiary')} color: ${(0, utils_1.getColorToken)('colors.discovery.body.white.context-tertiary')}; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 78129: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Info = void 0; var Info_1 = __webpack_require__(52373); Object.defineProperty(exports, "Info", ({ enumerable: true, get: function () { return Info_1.Info; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 15848: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.InfoContent = exports.InfoWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const utils_1 = __webpack_require__(49887); exports.InfoWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'InfoWrapper' }) ` width: 100%; grid-area: info; container-type: inline-size; ${(props) => utils_1.MediaQueryUtils.generateCSSMediaQueries('grid-template-areas', props.cardLayout)}; `; exports.InfoContent = styled_components_v6_1.default.div.withConfig({ displayName: 'InfoContent' }) ` display: flex; flex-direction: column; text-align: ${({ alignment }) => alignment}; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 56572: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.IconBadge = void 0; const react_1 = __importStar(__webpack_require__(96540)); const styles_1 = __webpack_require__(75608); const CardContext_1 = __webpack_require__(32541); const helpers_1 = __webpack_require__(8377); function IconBadge({ config }) { const { collageCard } = (0, react_1.useContext)(CardContext_1.CardContext); const { contentType } = collageCard; const Icon = (0, helpers_1.getIconBadge)(contentType); if (config == null || Icon == null) { return null; } return (react_1.default.createElement(styles_1.IconBadgeWrapper, { position: config.position }, react_1.default.createElement(Icon, null))); } exports.IconBadge = IconBadge; //# sourceMappingURL=IconBadge.js.map /***/ }), /***/ 8377: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getIconBadge = void 0; const helpers_1 = __webpack_require__(80089); function getIconBadge(contentType) { if (contentType == null) { return null; } const iconName = ICON_BADGE_MAP[contentType]; if (iconName == null) { return null; } const IconComponent = (0, helpers_1.getIconComponent)(iconName, 'thin'); if (IconComponent == null) { return null; } return IconComponent; } exports.getIconBadge = getIconBadge; const ICON_BADGE_MAP = { gallery: 'Gallery', video: 'Play', cnevideo: 'Play' }; //# sourceMappingURL=helpers.js.map /***/ }), /***/ 40732: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.IconBadge = void 0; var IconBadge_1 = __webpack_require__(56572); Object.defineProperty(exports, "IconBadge", ({ enumerable: true, get: function () { return IconBadge_1.IconBadge; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 75608: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.IconBadgeWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const helpers_1 = __webpack_require__(45898); const utils_1 = __webpack_require__(26865); const breakpoints_1 = __webpack_require__(99906); exports.IconBadgeWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'IconBadgeWrapper' }) ` grid-area: ${({ position }) => position}; justify-self: ${({ position }) => (0, helpers_1.getJustifySelfValue)(position)}; align-self: ${({ position }) => (0, helpers_1.getAlignSelfValue)(position)}; display: flex; justify-content: center; align-items: center; width: 24px; height: 24px; @container (min-width: ${breakpoints_1.minThresholds.lg / 2}px) { width: 28px; height: 28px; } /** TODO: BI TOKEN SHOULD BE USED */ background-color: rgb(0, 0, 0, 0.5); backdrop-filter: blur(8px); border-radius: 50%; margin: ${({ theme }) => (0, utils_1.getThemeValue)(theme, 'spacing.spacing-8')}; & svg { path { fill: white; } width: 16px; height: 16px; } `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 15248: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Media = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(68613); const MediaAsset_1 = __webpack_require__(10540); const MediaOverlay_1 = __webpack_require__(42931); function Media({ cardConfig }) { const mediaConfig = cardConfig.blocks.media; const { hideAsset, iconBadge, textBadge } = mediaConfig || {}; if (hideAsset) { return null; } if (cardConfig.type && cardConfig.type.startsWith('overlay')) { return (react_1.default.createElement(styles_1.OverlayMediaWrapper, { assetConfigs: cardConfig.assetConfigs }, react_1.default.createElement(styles_1.OverlayMediaContent, null, react_1.default.createElement(MediaAsset_1.MediaAsset, { hideAsset: hideAsset })))); } return (react_1.default.createElement(styles_1.MediaWrapper, { cardLayout: cardConfig.layout }, react_1.default.createElement(MediaAsset_1.MediaAsset, { hideAsset: hideAsset }), react_1.default.createElement(MediaOverlay_1.MediaOverlay, { iconBadge: iconBadge, textBadge: textBadge }))); } exports.Media = Media; //# sourceMappingURL=Media.js.map /***/ }), /***/ 48514: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MediaAsset = void 0; const react_1 = __importStar(__webpack_require__(96540)); const styles_1 = __webpack_require__(680); const CardContext_1 = __webpack_require__(32541); const responsive_asset_1 = __importDefault(__webpack_require__(73275)); const map_sources_to_segmented_sources_1 = __webpack_require__(52009); function MediaAsset({ hideAsset }) { const { collageCard, cardConfig } = (0, react_1.useContext)(CardContext_1.CardContext); const assetData = collageCard.image; if (assetData == null || hideAsset) { return null; } const segmentedSources = (0, map_sources_to_segmented_sources_1.mapSourcesToSegmentedSources)(assetData.sources); const responsiveAssetProps = { ...assetData, segmentedSources }; return (react_1.default.createElement(styles_1.MediaAssetWrapper, { assetConfigs: cardConfig.assetConfigs }, react_1.default.createElement(responsive_asset_1.default, { ...responsiveAssetProps }))); } exports.MediaAsset = MediaAsset; //# sourceMappingURL=MediaAsset.js.map /***/ }), /***/ 2844: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MediaAssetStyleGenerator = void 0; const AbstractStyleGenerator_1 = __webpack_require__(17054); class MediaAssetStyleGenerator extends AbstractStyleGenerator_1.AbstractStyleGenerator { constructor(assetConfigs) { super(); this.assetConfigs = assetConfigs; } getStyleForBreakpoint(breakpoint) { return [ [ 'aspect-ratio', getAspectRatio(this.assetConfigs[breakpoint]?.aspectRatio) ] ]; } } exports.MediaAssetStyleGenerator = MediaAssetStyleGenerator; function getAspectRatio(aspectRatio) { if (aspectRatio == null) { return ''; } const [widthRatio, heightRatio] = aspectRatio.split(':'); return `${widthRatio} / ${heightRatio}`; } //# sourceMappingURL=MediaAssetStyleGenerator.js.map /***/ }), /***/ 10540: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MediaAsset = void 0; var MediaAsset_1 = __webpack_require__(48514); Object.defineProperty(exports, "MediaAsset", ({ enumerable: true, get: function () { return MediaAsset_1.MediaAsset; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 680: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MediaAssetWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const MediaAssetStyleGenerator_1 = __webpack_require__(2844); exports.MediaAssetWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'MediaAssetWrapper' }) ` max-width: 100%; img { width: 100%; } ${({ assetConfigs }) => new MediaAssetStyleGenerator_1.MediaAssetStyleGenerator(assetConfigs).generateStyleForBreakpoints()} `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 42931: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MediaOverlay = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(68613); const IconBadge_1 = __webpack_require__(40732); const TextBadge_1 = __webpack_require__(47018); function MediaOverlay({ iconBadge, textBadge }) { return (react_1.default.createElement(styles_1.MediaOverlayWrapper, null, react_1.default.createElement(IconBadge_1.IconBadge, { config: iconBadge }), react_1.default.createElement(TextBadge_1.TextBadge, { config: textBadge }))); } exports.MediaOverlay = MediaOverlay; //# sourceMappingURL=MediaOverlay.js.map /***/ }), /***/ 64972: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TextBadge = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(90214); function TextBadge({ config }) { if (config == null) { return null; } return (react_1.default.createElement(styles_1.TextBadgeWrapper, { position: config.position }, "TEXT BADGE")); } exports.TextBadge = TextBadge; //# sourceMappingURL=TextBadge.js.map /***/ }), /***/ 47018: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TextBadge = void 0; var TextBadge_1 = __webpack_require__(64972); Object.defineProperty(exports, "TextBadge", ({ enumerable: true, get: function () { return TextBadge_1.TextBadge; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 90214: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TextBadgeWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const helpers_1 = __webpack_require__(45898); exports.TextBadgeWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'TextBadgeWrapper' }) ` grid-area: ${({ position }) => position}; justify-self: ${({ position }) => (0, helpers_1.getJustifySelfValue)(position)}; align-self: ${({ position }) => (0, helpers_1.getAlignSelfValue)(position)}; display: flex; max-width: max-content; background-color: rgba(0, 0, 0, 0.9); color: white; padding: 10px; border-radius: 2px; justify-content: right; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 45898: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getAlignSelfValue = exports.getJustifySelfValue = void 0; var JustifySelf; (function (JustifySelf) { JustifySelf["LEFT"] = "left"; JustifySelf["RIGHT"] = "right"; })(JustifySelf || (JustifySelf = {})); var AlignSelf; (function (AlignSelf) { AlignSelf["END"] = "end"; AlignSelf["START"] = "start"; })(AlignSelf || (AlignSelf = {})); const TOP = 'top'; function getJustifySelfValue(position) { if (position.includes(JustifySelf.LEFT)) { return JustifySelf.LEFT; } return JustifySelf.RIGHT; } exports.getJustifySelfValue = getJustifySelfValue; function getAlignSelfValue(position) { if (position.includes(TOP)) { return AlignSelf.START; } return AlignSelf.END; } exports.getAlignSelfValue = getAlignSelfValue; //# sourceMappingURL=helpers.js.map /***/ }), /***/ 86171: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Media = void 0; var Media_1 = __webpack_require__(15248); Object.defineProperty(exports, "Media", ({ enumerable: true, get: function () { return Media_1.Media; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 68613: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MediaOverlayWrapper = exports.OverlayMediaContent = exports.OverlayMediaWrapper = exports.MediaWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const utils_1 = __webpack_require__(49887); const types_1 = __webpack_require__(11291); const MediaAssetStyleGenerator_1 = __webpack_require__(2844); exports.MediaWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'MediaWrapper' }) ` grid-area: media; ${(props) => utils_1.MediaQueryUtils.generateCSSMediaQueries('grid-template-areas', props.cardLayout)}; position: relative; `; exports.OverlayMediaWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'OverlayMediaWrapper' }) ` width: 100%; height: 100%; ${({ assetConfigs }) => new MediaAssetStyleGenerator_1.MediaAssetStyleGenerator(assetConfigs).generateStyleForBreakpoints()} `; exports.OverlayMediaContent = styled_components_v6_1.default.div.withConfig({ displayName: 'OverlayMediaContent' }) ` width: 100%; height: 100%; position: absolute; left: 0; top: 0; `; exports.MediaOverlayWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'MediaOverlayWrapper' }) ` position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: grid; grid-template-areas: '${types_1.MediaBlockContentPosition.TOP_LEFT} ${types_1.MediaBlockContentPosition.TOP_RIGHT}' '${types_1.MediaBlockContentPosition.BOTTOM_LEFT} ${types_1.MediaBlockContentPosition.BOTTOM_RIGHT}'; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 71940: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Headline = void 0; const react_1 = __importStar(__webpack_require__(96540)); const styles_1 = __webpack_require__(78642); const CardContext_1 = __webpack_require__(32541); const utils_1 = __webpack_require__(49887); function Headline({ hideHeadline }) { const { collageCard, cardConfig } = (0, react_1.useContext)(CardContext_1.CardContext); const hedData = collageCard.dangerousHed; if (!utils_1.StringUtils.isStringValid(hedData) || hideHeadline) { return null; } return (react_1.default.createElement(styles_1.HeadlineWrapper, { hedToken: cardConfig.typographyConfig?.hedToken, dangerouslySetInnerHTML: { __html: hedData } })); } exports.Headline = Headline; //# sourceMappingURL=Headline.js.map /***/ }), /***/ 36766: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Headline = void 0; var Headline_1 = __webpack_require__(71940); Object.defineProperty(exports, "Headline", ({ enumerable: true, get: function () { return Headline_1.Headline; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 78642: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HeadlineWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const TypographyUtils_1 = __webpack_require__(49716); const utils_1 = __webpack_require__(26865); exports.HeadlineWrapper = styled_components_v6_1.default.h3.withConfig({ displayName: 'HeadlineWrapper' }) ` grid-area: headline; text-align: match-parent; padding: 0; margin: 0; ${({ theme, hedToken }) => TypographyUtils_1.TypographyUtils.getFluidTypographStyles(theme, `typography.definitions.fluid.${hedToken ?? 'headline-md'}`)} color: ${(0, utils_1.getColorToken)('colors.discovery.body.white.heading')}; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 82146: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Rubric = void 0; const react_1 = __importStar(__webpack_require__(96540)); const styles_1 = __webpack_require__(15701); const CardContext_1 = __webpack_require__(32541); const utils_1 = __webpack_require__(49887); function Rubric({ hideRubric }) { const { collageCard } = (0, react_1.useContext)(CardContext_1.CardContext); const rubricData = collageCard.rubric?.name; if (!utils_1.StringUtils.isStringValid(rubricData) || hideRubric) { return null; } return react_1.default.createElement(styles_1.RubricWrapper, null, rubricData); } exports.Rubric = Rubric; //# sourceMappingURL=Rubric.js.map /***/ }), /***/ 33163: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Rubric = void 0; var Rubric_1 = __webpack_require__(82146); Object.defineProperty(exports, "Rubric", ({ enumerable: true, get: function () { return Rubric_1.Rubric; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 15701: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RubricWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const utils_1 = __webpack_require__(26865); exports.RubricWrapper = styled_components_v6_1.default.span.withConfig({ displayName: 'RubricWrapper' }) ` grid-area: rubric; text-align: match-parent; width: 100%; ${(0, utils_1.getTypographyStyles)('typography.definitions.globalEditorial.context-primary')} color: ${(0, utils_1.getColorToken)('colors.discovery.body.white.context-signature')}; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 35670: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Subhead = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(61910); const styles_2 = __webpack_require__(68116); function Subhead({ hideSubhead }) { /** TODO: refactor this ticket to display proper so called subhead-data for pitchfork * that means: * - use right term and data (genre or artist... tbd) * - create own template instead of reusing SummaryItemDek * */ const subheadData = null; if (subheadData == null || hideSubhead) { return null; } return (react_1.default.createElement(styles_1.SubheadWrapper, null, react_1.default.createElement(styles_2.SummaryItemDek, null, subheadData))); } exports.Subhead = Subhead; //# sourceMappingURL=Subhead.js.map /***/ }), /***/ 14202: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Subhead = void 0; var Subhead_1 = __webpack_require__(35670); Object.defineProperty(exports, "Subhead", ({ enumerable: true, get: function () { return Subhead_1.Subhead; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 61910: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SubheadWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); exports.SubheadWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'SubheadWrapper' }) ` grid-area: subhead; text-align: match-parent; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 20807: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Title = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(94655); const Headline_1 = __webpack_require__(36766); const Rubric_1 = __webpack_require__(33163); const Subhead_1 = __webpack_require__(14202); function Title({ cardConfig }) { const titleConfig = cardConfig.blocks.title; if (titleConfig == null) { return null; } const { alignment, hideRubric, hideHeadline, hideSubhead } = titleConfig; return (react_1.default.createElement(styles_1.TitleWrapper, { cardLayout: cardConfig.layout }, react_1.default.createElement(styles_1.TitleContent, { alignment: alignment }, react_1.default.createElement(Rubric_1.Rubric, { hideRubric: hideRubric }), react_1.default.createElement(Headline_1.Headline, { hideHeadline: hideHeadline }), react_1.default.createElement(Subhead_1.Subhead, { hideSubhead: hideSubhead })))); } exports.Title = Title; //# sourceMappingURL=Title.js.map /***/ }), /***/ 86205: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Title = void 0; var Title_1 = __webpack_require__(20807); Object.defineProperty(exports, "Title", ({ enumerable: true, get: function () { return Title_1.Title; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 94655: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TitleContent = exports.TitleWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const utils_1 = __webpack_require__(49887); exports.TitleWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'TitleWrapper' }) ` width: 100%; grid-area: title; container-type: inline-size; ${(props) => utils_1.MediaQueryUtils.generateCSSMediaQueries('grid-template-areas', props.cardLayout)}; `; exports.TitleContent = styled_components_v6_1.default.div.withConfig({ displayName: 'TitleContent' }) ` display: flex; flex-direction: column; text-align: ${({ alignment }) => alignment}; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 19601: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CARD_PREFIX = void 0; exports.CARD_PREFIX = 'card'; //# sourceMappingURL=constants.js.map /***/ }), /***/ 36524: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Card = void 0; var Card_1 = __webpack_require__(29384); Object.defineProperty(exports, "Card", ({ enumerable: true, get: function () { return Card_1.Card; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 77160: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OverlayCardContent = exports.OverlayCardWrapper = exports.DefaultCardWrapper = void 0; const styled_components_v6_1 = __importStar(__webpack_require__(50435)); const utils_1 = __webpack_require__(49887); const constants_1 = __webpack_require__(19601); const utils_2 = __webpack_require__(26865); const MediaAssetStyleGenerator_1 = __webpack_require__(2844); const breakpoints_1 = __webpack_require__(99906); // temporary until we get valid tokens const styles_1 = __webpack_require__(78642); const styles_2 = __webpack_require__(15701); const styles_3 = __webpack_require__(91899); const styles_4 = __webpack_require__(8695); const styles_5 = __webpack_require__(17328); const styles_6 = __webpack_require__(74423); const styles_7 = __webpack_require__(4654); exports.DefaultCardWrapper = styled_components_v6_1.default.a.withConfig({ displayName: 'DefaultCardWrapper' }) ` grid-area: ${(props) => `${constants_1.CARD_PREFIX}${props.gridArea}`}; container-type: inline-size; width: 100%; display: grid; overflow: hidden; color: ${(0, utils_2.getColorToken)('colors.discovery.body.white.heading')}; text-decoration: none; &:hover, &:focus, &:active { text-decoration: none; } ${({ cardLayout }) => cardLayout && utils_1.MediaQueryUtils.generateCSSMediaQueries('grid-template-areas', cardLayout)}; ${({ gridTemplateColumns }) => gridTemplateColumns && utils_1.MediaQueryUtils.generateCSSMediaQueries('grid-template-columns', gridTemplateColumns)}; gap: 16px; @media (min-width: ${breakpoints_1.minThresholds.md}px) { gap: 24px; } @media (min-width: ${breakpoints_1.minThresholds.xxl}px) { gap: 32px; } `; exports.OverlayCardWrapper = styled_components_v6_1.default.a.withConfig({ displayName: 'OverlayCardWrapper' }) ` width: 100%; height: 100%; position: relative; overflow: hidden; grid-area: ${(props) => `${constants_1.CARD_PREFIX}${props.gridArea}`}; ${({ assetConfigs }) => new MediaAssetStyleGenerator_1.MediaAssetStyleGenerator(assetConfigs).generateStyleForBreakpoints()} container-type: inline-size; /** TODO: use BI TOKEN */ color: black; text-decoration: none; &:hover, &:focus, &:active { text-decoration: none; } `; exports.OverlayCardContent = styled_components_v6_1.default.div.withConfig({ displayName: 'OverlayCardContent' }) ` width: 100%; position: absolute; left: 0; display: grid; ${({ overlayDirection }) => getStyles(overlayDirection)}; ${({ cardLayout }) => cardLayout && utils_1.MediaQueryUtils.generateCSSMediaQueries('grid-template-areas', cardLayout)}; ${({ gridTemplateColumns }) => gridTemplateColumns && utils_1.MediaQueryUtils.generateCSSMediaQueries('grid-template-columns', gridTemplateColumns)}; gap: 16px; @media (min-width: ${breakpoints_1.minThresholds.md}px) { gap: 24px; } @media (min-width: ${breakpoints_1.minThresholds.xxl}px) { gap: 32px; } z-index: 1; ${styles_1.HeadlineWrapper}, ${styles_2.RubricWrapper}, ${styles_3.BylineWrapper}, ${styles_4.ItemsCountWrapper}, ${styles_5.PublishedDateWrapper}, ${styles_6.BylinePreamble}, ${styles_6.BylineName}, ${styles_7.DekWrapper} { color: white; } background: linear-gradient( to ${({ overlayDirection }) => overlayDirection}, rgba(0, 0, 0, 0.8) 90%, rgba(0, 0, 0, 0) 100% ); `; function getStyles(overlayDirection) { switch (overlayDirection) { case 'top': return (0, styled_components_v6_1.css) ` align-content: end; padding: 20px 4px 0 4px; bottom: 0; `; case 'bottom': return (0, styled_components_v6_1.css) ` align-content: start; padding: 0 4px 20px 4px; top: 0; `; default: return ''; } } //# sourceMappingURL=styles.js.map /***/ }), /***/ 99130: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Collage = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(11265); const List_1 = __webpack_require__(22702); const Divider_1 = __webpack_require__(22007); const helpers_1 = __webpack_require__(19222); function Collage({ collageLists, collageConfig }) { const dividers = (0, helpers_1.getDividers)(collageConfig.layout); return (react_1.default.createElement(styles_1.CollageWrapper, { layout: collageConfig.layout, gridTemplateColumns: collageConfig.gridTemplateColumns }, dividers.map((divider) => (react_1.default.createElement(Divider_1.Divider, { areaName: divider, layout: collageConfig.layout }))), collageLists.map((list, index) => (react_1.default.createElement(List_1.List, { key: index, gridArea: index + 1, title: list.title, collageCards: list.cards, listConfig: collageConfig.lists[index] }))))); } exports.Collage = Collage; //# sourceMappingURL=Collage.js.map /***/ }), /***/ 99199: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Collage = void 0; var Collage_1 = __webpack_require__(99130); Object.defineProperty(exports, "Collage", ({ enumerable: true, get: function () { return Collage_1.Collage; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 11265: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CollageWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const AbstractStyleGenerator_1 = __webpack_require__(17054); const breakpoints_1 = __webpack_require__(99906); exports.CollageWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'CollageWrapper' }) ` container-type: inline-size; display: grid; ${(props) => new AbstractStyleGenerator_1.CSSPropertyStyleGenerator('grid-template-columns', '', props.gridTemplateColumns).generateStyleForBreakpoints()}; ${(props) => new AbstractStyleGenerator_1.CSSPropertyStyleGenerator('grid-template-areas', '', props.layout).generateStyleForBreakpoints()}; gap: 16px; @media (min-width: ${breakpoints_1.minThresholds.md}px) { gap: 24px; } @media (min-width: ${breakpoints_1.minThresholds.xxl}px) { gap: 32px; } `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 40972: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CollageEnvironment = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styled_components_v6_1 = __webpack_require__(50435); const memoize_1 = __importDefault(__webpack_require__(50104)); const styles_1 = __webpack_require__(89320); const Collage_1 = __webpack_require__(99199); const CollageHeading_1 = __webpack_require__(90055); const ErrorBoundry_1 = __webpack_require__(45193); function CollageEnvironment(collageEnvironmentProps) { try { const { title, lists, collageConfig } = collageEnvironmentProps; /** StyleSheetManager v6 should be wrapped the whole Verso - temporary to resolve console warnings. */ return (react_1.default.createElement(styled_components_v6_1.StyleSheetManager, { shouldForwardProp: shouldForwardProp }, react_1.default.createElement(ErrorBoundry_1.ErrorBoundary, null, react_1.default.createElement(styled_components_v6_1.ThemeProvider, { theme: { collageTheme: 'standard' } }, react_1.default.createElement(styles_1.CollageEnvironmentWrapper, null, react_1.default.createElement(CollageHeading_1.CollageHeading, { dangerousHed: title }), react_1.default.createElement(Collage_1.Collage, { collageLists: lists, collageConfig: collageConfig })))))); } catch (error) { console.error('[CollageEnvironment] Caught error:', error); return react_1.default.createElement(react_1.default.Fragment, null); } } exports.CollageEnvironment = CollageEnvironment; /** * TEMPORARY SOLUTION - This solution must be implemented Globally. * */ function shouldForwardProp(propName, target) { if (typeof target === 'string') { // For HTML elements, forward the prop if it is a valid HTML attribute return isPropValid(propName); } // For other elements, forward all props return true; } /** Should include all the React and HTML props that we use */ const reactPropsRegex = /^(children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|href)$/i; const isPropValid = (0, memoize_1.default)((prop) => reactPropsRegex.test(prop) || (prop.charCodeAt(0) === 111 /* o */ && prop.charCodeAt(1) === 110 /* n */ && prop.charCodeAt(2) < 91) /* Z+1 */); //# sourceMappingURL=CollageEnvironment.js.map /***/ }), /***/ 71878: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CollageEnvironmentStyleGenerator = void 0; const AbstractStyleGenerator_1 = __webpack_require__(17054); const types_1 = __webpack_require__(11291); class CollageEnvironmentStyleGenerator extends AbstractStyleGenerator_1.AbstractStyleGenerator { getStyleForBreakpoint(breakpoint) { switch (breakpoint) { case types_1.Breakpoints.SM: case types_1.Breakpoints.MD: return [ ['max-width', 'none'], ['padding', `0 24px`] ]; case types_1.Breakpoints.LG: case types_1.Breakpoints.XL: return [ ['max-width', 'none'], ['padding', '0 48px'] ]; case types_1.Breakpoints.XXL: return [ ['max-width', 'none'], ['padding', '0 64px'] ]; case types_1.Breakpoints.XXXL: return [ ['max-width', '1600px'], ['padding', '0 64px'] ]; default: return [ ['max-width', 'none'], ['padding', `0 24px`] ]; } } } exports.CollageEnvironmentStyleGenerator = CollageEnvironmentStyleGenerator; //# sourceMappingURL=CollageEnvironmentStyleGenerator.js.map /***/ }), /***/ 8787: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CollageHeading = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(30704); const utils_1 = __webpack_require__(49887); const BaseSectionTitle = __webpack_require__(35864); function CollageHeading({ dangerousHed }) { if (!utils_1.StringUtils.isStringValid(dangerousHed)) { return null; } return (react_1.default.createElement(styles_1.CollageHeadingWrapper, null, react_1.default.createElement(BaseSectionTitle.TextLeftWithLineBelowTitle, { dangerousHed: dangerousHed }))); } exports.CollageHeading = CollageHeading; //# sourceMappingURL=CollageHeading.js.map /***/ }), /***/ 90055: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CollageHeading = void 0; var CollageHeading_1 = __webpack_require__(8787); Object.defineProperty(exports, "CollageHeading", ({ enumerable: true, get: function () { return CollageHeading_1.CollageHeading; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 30704: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CollageHeadingWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); exports.CollageHeadingWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'CollageHeadingWrapper' }) ` margin-bottom: 2rem; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 52844: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CollageEnvironment = void 0; var CollageEnvironment_1 = __webpack_require__(40972); Object.defineProperty(exports, "CollageEnvironment", ({ enumerable: true, get: function () { return CollageEnvironment_1.CollageEnvironment; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 89320: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CollageEnvironmentWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const CollageEnvironmentStyleGenerator_1 = __webpack_require__(71878); exports.CollageEnvironmentWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'CollageEnvironmentWrapper' }) ` width: 100%; margin: 0 auto; ${new CollageEnvironmentStyleGenerator_1.CollageEnvironmentStyleGenerator().generateStyleForBreakpoints()} display: flex; flex-direction: column; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 53294: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Divider = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(19417); function Divider({ areaName, layout }) { return react_1.default.createElement(styles_1.DividerWrapper, { areaName: areaName, layout: layout }); } exports.Divider = Divider; //# sourceMappingURL=Divider.js.map /***/ }), /***/ 42490: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.VERTICAL_DIVIDER = exports.DIVIDER_PREFIX = void 0; exports.DIVIDER_PREFIX = 'divider'; exports.VERTICAL_DIVIDER = 'v'; //# sourceMappingURL=constants.js.map /***/ }), /***/ 19222: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getDividers = void 0; const helpers_1 = __webpack_require__(93038); const constants_1 = __webpack_require__(42490); function getDividers(layout) { const areas = (0, helpers_1.getAvailableAreasInGrid)(layout); return areas.filter((areas) => areas.includes(constants_1.DIVIDER_PREFIX)); } exports.getDividers = getDividers; //# sourceMappingURL=helpers.js.map /***/ }), /***/ 22007: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Divider = void 0; var Divider_1 = __webpack_require__(53294); Object.defineProperty(exports, "Divider", ({ enumerable: true, get: function () { return Divider_1.Divider; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 19417: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DividerWrapper = void 0; const styled_components_v6_1 = __importStar(__webpack_require__(50435)); const constants_1 = __webpack_require__(42490); const utils_1 = __webpack_require__(49887); exports.DividerWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'DividerWrapper' }) ` grid-area: ${({ areaName }) => areaName}; background-color: gray; ${({ areaName }) => getDividerWidthAndHeight(areaName)}; ${({ areaName, layout }) => utils_1.MediaQueryUtils.getVisibilityMediaQueries(layout, areaName)}; `; function getDividerWidthAndHeight(areaName) { if (isVertical(areaName)) { return (0, styled_components_v6_1.css) ` width: 1px; height: 100%; `; } return (0, styled_components_v6_1.css) ` width: 100%; height: 1px; `; } function isVertical(areaName) { const value = areaName.split('-')[1]; return value === constants_1.VERTICAL_DIVIDER; } //# sourceMappingURL=styles.js.map /***/ }), /***/ 13724: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.List = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(66690); const Card_1 = __webpack_require__(36524); const ListHeading_1 = __webpack_require__(6527); const constants_1 = __webpack_require__(19601); const helpers_1 = __webpack_require__(19222); const Divider_1 = __webpack_require__(22007); function List({ gridArea, title, collageCards, listConfig }) { const dividers = (0, helpers_1.getDividers)(listConfig.layout); return (react_1.default.createElement(styles_1.ListWrapper, { gridArea: gridArea, layout: listConfig.layout }, react_1.default.createElement(ListHeading_1.ListHeading, { title: title, layout: listConfig.layout }), dividers.map((divider) => (react_1.default.createElement(Divider_1.Divider, { areaName: divider, layout: listConfig.layout }))), collageCards.map((collageCard, index) => (react_1.default.createElement(Card_1.Card, { key: collageCard.id, collageCard: collageCard, gridArea: index + 1, cardConfig: listConfig.cards[constants_1.CARD_PREFIX + (index + 1)] ?? listConfig.cards.default }))))); } exports.List = List; //# sourceMappingURL=List.js.map /***/ }), /***/ 54605: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ListHeading = void 0; const react_1 = __importDefault(__webpack_require__(96540)); const styles_1 = __webpack_require__(40993); const utils_1 = __webpack_require__(49887); const helpers_1 = __webpack_require__(93038); const BaseSectionTitle = __webpack_require__(35864); function ListHeading({ title, layout }) { const hideListHeading = getHideListHeading(layout); if (hideListHeading || !utils_1.StringUtils.isStringValid(title)) { return null; } return (react_1.default.createElement(styles_1.ListHeadingWrapper, { layout: layout }, react_1.default.createElement(BaseSectionTitle.TextLeft, { dangerousHed: title }))); } exports.ListHeading = ListHeading; function getHideListHeading(layout) { return !(0, helpers_1.getAvailableAreasInGrid)(layout).includes('list-heading'); } //# sourceMappingURL=ListHeading.js.map /***/ }), /***/ 6527: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ListHeading = void 0; var ListHeading_1 = __webpack_require__(54605); Object.defineProperty(exports, "ListHeading", ({ enumerable: true, get: function () { return ListHeading_1.ListHeading; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 40993: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ListHeadingWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const utils_1 = __webpack_require__(49887); exports.ListHeadingWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'ListHeadingWrapper' }) ` grid-area: list-heading; ${({ layout }) => utils_1.MediaQueryUtils.getVisibilityMediaQueries(layout, 'list-heading')}; `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 65599: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LIST_PREFIX = void 0; exports.LIST_PREFIX = 'list'; //# sourceMappingURL=constants.js.map /***/ }), /***/ 22702: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.List = void 0; var List_1 = __webpack_require__(13724); Object.defineProperty(exports, "List", ({ enumerable: true, get: function () { return List_1.List; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 66690: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ListWrapper = void 0; const styled_components_v6_1 = __importDefault(__webpack_require__(50435)); const constants_1 = __webpack_require__(65599); const breakpoints_1 = __webpack_require__(99906); const AbstractStyleGenerator_1 = __webpack_require__(17054); exports.ListWrapper = styled_components_v6_1.default.div.withConfig({ displayName: 'ListWrapper' }) ` grid-area: ${(props) => `${constants_1.LIST_PREFIX}${props.gridArea}`}; container-type: inline-size; width: 100%; height: 100%; display: grid; align-content: start; ${(props) => new AbstractStyleGenerator_1.CSSPropertyStyleGenerator('grid-template-areas', '', props.layout).generateStyleForBreakpoints()} gap: 16px; @media (min-width: ${breakpoints_1.minThresholds.md}px) { gap: 24px; } @media (min-width: ${breakpoints_1.minThresholds.xxl}px) { gap: 32px; } `; //# sourceMappingURL=styles.js.map /***/ }), /***/ 68381: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CollageEnvironment = void 0; var CollageEnvironment_1 = __webpack_require__(52844); Object.defineProperty(exports, "CollageEnvironment", ({ enumerable: true, get: function () { return CollageEnvironment_1.CollageEnvironment; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 96793: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); const react_intl_1 = __webpack_require__(46984); exports.A = (0, react_intl_1.defineMessages)({ photo: { id: 'ItemCount.photo', defaultMessage: `{count, plural, one {# Photo} other {# Photos} }`, description: 'photo with plurals' } }); //# sourceMappingURL=translations.js.map /***/ }), /***/ 11291: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", ({ value: true })); __exportStar(__webpack_require__(41914), exports); //# sourceMappingURL=index.js.map /***/ }), /***/ 41914: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Breakpoints = exports.BlockAlignment = exports.MediaBlockContentPosition = void 0; var MediaBlockContentPosition; (function (MediaBlockContentPosition) { MediaBlockContentPosition["TOP_LEFT"] = "top-left"; MediaBlockContentPosition["TOP_RIGHT"] = "top-right"; MediaBlockContentPosition["BOTTOM_LEFT"] = "bottom-left"; MediaBlockContentPosition["BOTTOM_RIGHT"] = "bottom-right"; })(MediaBlockContentPosition = exports.MediaBlockContentPosition || (exports.MediaBlockContentPosition = {})); var BlockAlignment; (function (BlockAlignment) { BlockAlignment["LEFT"] = "left"; BlockAlignment["RIGHT"] = "right"; BlockAlignment["CENTER"] = "center"; })(BlockAlignment = exports.BlockAlignment || (exports.BlockAlignment = {})); var Breakpoints; (function (Breakpoints) { Breakpoints["SM"] = "sm"; Breakpoints["MD"] = "md"; Breakpoints["LG"] = "lg"; Breakpoints["XL"] = "xl"; Breakpoints["XXL"] = "xxl"; Breakpoints["XXXL"] = "xxxl"; })(Breakpoints = exports.Breakpoints || (exports.Breakpoints = {})); //# sourceMappingURL=types.js.map /***/ }), /***/ 98445: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MediaQueryUtils = void 0; const breakpoints_1 = __webpack_require__(99906); class MediaQueryUtils { static getVisibilityMediaQueries(gridData, areaName) { return Object.entries(gridData).map(([breakpoint, gridTemplateArea]) => ` @media (min-width: ${breakpoints_1.minThresholds[breakpoint]}px) { display: ${gridTemplateArea.includes(areaName) ? 'block' : 'none'}; } `); } static generateCSSMediaQueries(cssProperty, gridData) { return Object.entries(gridData).map(([breakpoint, value]) => ` @media (min-width: ${breakpoints_1.minThresholds[breakpoint]}px) { ${cssProperty}: ${value}; } `); } } exports.MediaQueryUtils = MediaQueryUtils; //# sourceMappingURL=MediaQueryUtils.js.map /***/ }), /***/ 23745: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StringUtils = void 0; class StringUtils { static isStringValid(str) { if (str == null) { return false; } return str.trim().length > 0; } } exports.StringUtils = StringUtils; //# sourceMappingURL=StringUtils.js.map /***/ }), /***/ 93038: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getAvailableAreasInGrid = void 0; /** Extract the available areas name from the grid layout string. */ function getAvailableAreasInGrid(layout) { return [ ...new Set(Object.keys(layout) .flatMap((key) => layout[key].split(' ')) .map((str) => str.trim().replace(/^"|"$/g, '')) .filter((str) => str.length > 0)) ]; } exports.getAvailableAreasInGrid = getAvailableAreasInGrid; //# sourceMappingURL=helpers.js.map /***/ }), /***/ 49887: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StringUtils = exports.MediaQueryUtils = void 0; var MediaQueryUtils_1 = __webpack_require__(98445); Object.defineProperty(exports, "MediaQueryUtils", ({ enumerable: true, get: function () { return MediaQueryUtils_1.MediaQueryUtils; } })); var StringUtils_1 = __webpack_require__(23745); Object.defineProperty(exports, "StringUtils", ({ enumerable: true, get: function () { return StringUtils_1.StringUtils; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 75454: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getFeaturedQueryParam = exports.getPlacementData = exports.trackCommunityCommentsImpression = void 0; const snowplow_tracking_1 = __webpack_require__(14307); const trackCommunityCommentsImpression = (count, subject, placement) => { const entityData = { type: 'impression', label: 'Comments', subject, features_list: [ { name: 'comments', total_index: count } ] }; if (placement) { entityData.placement = placement; } (0, snowplow_tracking_1.trackContentEngagementEvent)(entityData); }; exports.trackCommunityCommentsImpression = trackCommunityCommentsImpression; const getPlacementData = (isFeatured) => isFeatured ? { placement: 'pinned_comments' } : {}; exports.getPlacementData = getPlacementData; const getFeaturedQueryParam = (isFeatured) => isFeatured ? 'true' : 'false'; exports.getFeaturedQueryParam = getFeaturedQueryParam; //# sourceMappingURL=tracking.js.map /***/ }), /***/ 92867: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const react_intl_1 = __webpack_require__(46984); exports["default"] = (0, react_intl_1.defineMessages)({ utilityLabel: { id: 'ReviewListContainer.UtilityLabel', defaultMessage: 'Back to top', description: 'Utility label for review list container' }, SavedCommentMsgTitle: { id: 'Commenting.SavedCommentMsgTitle', defaultMessage: 'Comment submitted', description: 'Text for the MessageBanner title', isConfigurable: true }, SavedCommentDek: { id: 'Commenting.SavedCommentDek', defaultMessage: 'Comments are moderated in line with our', description: 'Text for the MessageBanner body', isConfigurable: true }, CommunityGuidelines: { id: 'Commenting.CommunityGuidelines', defaultMessage: 'Community Guidelines', description: 'Text for the community guidelines link', isConfigurable: true }, SavedCommentDekTrail: { id: 'Commenting.SavedCommentDekTrail', defaultMessage: 'before being added.', description: 'Text for the MessageBanner body', isConfigurable: true }, SavedCommentSubContent: { id: 'Commenting.SavedCommentSubContent', defaultMessage: 'Thank you for contributing your thoughts.', description: 'Text for the MessageBanner sub content', isConfigurable: true }, likeActionErrorMessage: { id: 'Commenting.LikeActionErrorMessage', defaultMessage: 'Unable to like this comment. Please try again.', description: 'Error message to display while like action fails' }, unlikeActionErrorMessage: { id: 'Commenting.UnlikeActionErrorMessage', defaultMessage: 'Unable to unlike this comment. Please try again.', description: 'Error message to display while unlike action fails' }, signInModalHed: { id: 'Commenting.signInModalHed', defaultMessage: 'Sign in to join the', description: 'Hed for commenting sign in modal' }, signInModalHedSpanTag: { id: 'Commenting.signInModalHedSpanTag', defaultMessage: '{brandName} community', description: 'Hed span for commenting sign in modal' }, signInModalMessage: { id: 'Commenting.signInModalMessage', defaultMessage: "Once you're signed in, add your comments and like or reply to others.", description: 'Message for commenting sign in modal' }, replyDiscardModalHed: { id: 'Commenting.replyDiscardModalHed', defaultMessage: 'Discard this reply?', description: 'Hed for discard reply modal' }, closeCommentStreamMessage: { id: 'Commenting.closeCommentStreamMessage', defaultMessage: 'Comments are closed on this story but you can still browse or upvote them.', description: 'Hed for discard reply modal' }, emptyCommentMsgHed: { id: 'Commenting.emptyCommentMsgHed', defaultMessage: 'There aren’t any comments yet.', description: 'Hed for empty comments' }, emptyCommentMsgDek: { id: 'Commenting.emptyCommentMsgDek', defaultMessage: 'Add the first to start the conversation.', description: 'Dek for empty comments' }, signInButtonLabel: { id: 'Commenting.signInButtonLabel', defaultMessage: 'Sign in or create account', description: 'Text for the sign in or create account button' }, signOutEmptyCommentMsgDek: { id: 'Commenting.signOutEmptyCommentMsgDek', defaultMessage: 'Be the first to start the conversation!
You need an account to add or like comments.', description: 'Dek for empty comments for signed out users' }, signUpMessageBannerHed: { id: 'Commenting.signUpMessageBannerHed', defaultMessage: 'Join the {brandName} community to add comments.', description: 'Text for signout heading' }, saveStory: { id: 'Commenting.saveStory', defaultMessage: 'Save story', description: 'Label for the bookmark icon in commenting section' }, pinnedReviewLabel: { id: 'ReviewList.pinnedReviewLabel', defaultMessage: 'Featured by', description: 'Featured by label' } }); //# sourceMappingURL=translations.js.map /***/ }), /***/ 85554: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.useUpdateUserReactions = exports.setUserReactionsReducer = exports.setUserReactionsReplyReducer = exports.updatedUserReactionsForID = exports.getRelativeURLWithoutParams = exports.getParamsAsObjectFromURL = exports.useScrollToCommenting = exports.getRelativeURLWithSearchAndHash = exports.getRelativeURLWithSearch = exports.getRelativeURLWithHash = exports.INTERVAL_DELAY = exports.commentingAction = exports.hasAccessToCommenting = exports.useCommentBannerContent = exports.useFetchComments = exports.formatReviewListTitle = void 0; const jwt_decode_1 = __importDefault(__webpack_require__(6765)); const react_1 = __webpack_require__(96540); const react_intl_1 = __webpack_require__(46984); const cookies_1 = __importDefault(__webpack_require__(53788)); const utils_1 = __webpack_require__(60711); const cookie_1 = __webpack_require__(56892); const scroll_to_anchor_1 = __webpack_require__(759); const translations_1 = __importDefault(__webpack_require__(92867)); const formatReviewListTitle = (count, reviewsSectionTitle, placeHolderforZero = '') => { const reviewsListTitle = reviewsSectionTitle || 'Comments'; if (!count && !placeHolderforZero) { return reviewsListTitle; } return `${reviewsListTitle}${count && count > 0 ? ` (${count})` : ` ${placeHolderforZero}`}`; }; exports.formatReviewListTitle = formatReviewListTitle; const useFetchComments = ({ commentingUrl, defaultReplyLimit: replyLimit, entityId, initialReviewLimit: reviewLimit, setCommentCount, setIsCommentLoading, commentsOrderBy, repliesOrderBy }) => { const [isLoading, setIsLoading] = (0, react_1.useState)(true); const [reviews, setReviews] = (0, react_1.useState)([]); const [featuredReviews, setFeaturedReviews] = (0, react_1.useState)([]); const [page, setPage] = (0, react_1.useState)({ hasNextPage: false, endCursor: '' }); (0, react_1.useEffect)(() => { async function fetchReviews() { try { const storyCommentsCountRequest = (0, utils_1.getStoryCommentsCount)(entityId, commentingUrl, console); const getCommentRequest = (0, utils_1.getCommentsExcludingFeatured)({ entityId, commentingUrl, commentsOrderBy, repliesOrderBy, reviewLimit, replyLimit }); const getFeaturedCommentsRequest = (0, utils_1.getFeaturedComments)({ entityId, commentingUrl, repliesOrderBy }); const [storyCommentsCount, commentsResp, featuredCommentsResp] = await Promise.all([ storyCommentsCountRequest, getCommentRequest, getFeaturedCommentsRequest ]); if (commentsResp?.reviews && commentsResp.page) { setReviews(commentsResp.reviews); setPage(commentsResp.page); } storyCommentsCount && setCommentCount(storyCommentsCount); featuredCommentsResp?.reviews && setFeaturedReviews(featuredCommentsResp.reviews); } catch (error) { console.error('Failed to fetch reviews:', error); } setIsLoading(false); setIsCommentLoading(false); } commentingUrl && fetchReviews(); }, [ commentingUrl, commentsOrderBy, repliesOrderBy, entityId, replyLimit, reviewLimit, setCommentCount, setIsCommentLoading, setIsLoading, setPage, setReviews ]); return { isLoading, reviews, page, setPage, featuredReviews }; }; exports.useFetchComments = useFetchComments; const useCommentBannerContent = ({ noCommentsMsgConf = {}, disableCommentStream, closeCommentStreamMessage, showCommentSavedMessage, communityUrl, isCommentLoading, commentCount, user, signUpMessageBannerHed, brandName, savedCommentConf = {}, noCommentsYetIcon, joinCommunityIcon, commentSubmittedIcon, commentsClosedIcon }) => { const { formatMessage } = (0, react_intl_1.useIntl)(); const isUserLoggedIn = user.isAuthenticated && user.amguuid; const isUserLoggedOut = !isUserLoggedIn; // Handle the disabled comment stream case if (disableCommentStream) { return { header: closeCommentStreamMessage || formatMessage(translations_1.default.closeCommentStreamMessage), description: '', showSignInButton: false, subContent: '', commentMessageBannerIcon: commentsClosedIcon }; } // Handle comment saved message display if (showCommentSavedMessage) { const { title = formatMessage(translations_1.default.SavedCommentMsgTitle), dek = formatMessage(translations_1.default.SavedCommentDek), dekTrail = formatMessage(translations_1.default.SavedCommentDekTrail), subContent = formatMessage(translations_1.default.SavedCommentSubContent) } = savedCommentConf; const communityLink = `${formatMessage(translations_1.default.CommunityGuidelines)}`; return { header: title, description: `${dek}
${communityLink} ${dekTrail}`, subContent, showSignInButton: false, commentMessageBannerIcon: commentSubmittedIcon }; } // Handle empty comment case if (!isCommentLoading && !commentCount) { const { hed = formatMessage(translations_1.default.emptyCommentMsgHed), dek = formatMessage(translations_1.default.emptyCommentMsgDek), signOutDek = formatMessage(translations_1.default.signOutEmptyCommentMsgDek) } = noCommentsMsgConf; return { header: hed, description: isUserLoggedOut ? signOutDek : dek, showSignInButton: isUserLoggedOut, subContent: '', commentMessageBannerIcon: noCommentsYetIcon }; } // Handle logged-out user scenario if (!isCommentLoading && isUserLoggedOut) { return { header: signUpMessageBannerHed || formatMessage(translations_1.default.signUpMessageBannerHed, { brandName }), showSignInButton: true, description: '', subContent: '', commentMessageBannerIcon: joinCommunityIcon }; } // Default return when no conditions match return { header: '', description: '', showSignInButton: false, subContent: '' }; }; exports.useCommentBannerContent = useCommentBannerContent; const getSubscriptionsFromToken = (accessCookieValue) => { const payload = (0, jwt_decode_1.default)(accessCookieValue); const fct = payload?.fct || {}; return Object.values(fct).flat(); }; const checkIsEntitled = (commentingRestrictedTo, accessCookieValue) => { if (!accessCookieValue) return false; const subscribedProducts = getSubscriptionsFromToken(accessCookieValue); if (!subscribedProducts?.length) return false; const isEntitled = subscribedProducts.some((subscribedUserProduct) => commentingRestrictedTo.includes(subscribedUserProduct)); return isEntitled; }; const hasAccessToCommenting = (commentingRestrictedTo) => { if (!commentingRestrictedTo?.length) return true; const accessCookieValue = (0, cookie_1.getCookie)(cookies_1.default.accessCookie); if (!accessCookieValue) return false; const isEntitled = checkIsEntitled(commentingRestrictedTo, accessCookieValue); return isEntitled; }; exports.hasAccessToCommenting = hasAccessToCommenting; exports.commentingAction = { LEAVE_RATING: 'leave-a-rating', LEAVE_REPLY: 'leave-a-reply', LIKE_COMMENT: 'like-a-comment', LIKE_REPLY: 'like-a-reply', REPLY_TO_REPLY: 'reply-to-reply' }; const hasCommentingActionHash = ({ hash }) => { if (!hash) return false; return Object.values(exports.commentingAction).some((action) => hash.includes(action)); }; exports.INTERVAL_DELAY = 750; const getRelativeUrl = ({ pathname, search, hash }) => `${pathname}${search}${hash}`; const addHashToUrl = ({ href, hashValue }) => { const url = new URL(href); if (hashValue) url.hash = hashValue; return url; }; const addSearchToUrl = ({ href, queryParams }) => { const url = new URL(href); const searchParams = new URLSearchParams(queryParams); for (const [key, value] of searchParams) { url.searchParams.set(key, value); } return url; }; const getRelativeURLWithHash = ({ href, hashValue }) => getRelativeUrl(addHashToUrl({ href, hashValue })); exports.getRelativeURLWithHash = getRelativeURLWithHash; const getRelativeURLWithSearch = ({ href, queryParams }) => getRelativeUrl(addSearchToUrl({ href, queryParams })); exports.getRelativeURLWithSearch = getRelativeURLWithSearch; const getRelativeURLWithSearchAndHash = ({ href, hashValue, queryParams }) => { const urlWithHash = addHashToUrl({ href, hashValue }); const urlWithSearchAndHash = addSearchToUrl({ href: urlWithHash.href, queryParams }); return getRelativeUrl(urlWithSearchAndHash); }; exports.getRelativeURLWithSearchAndHash = getRelativeURLWithSearchAndHash; const removeURLHash = ({ url }) => url.split('#')[0]; const useScrollToCommenting = (commentingClassName) => { const [pageHeight, setPageHeight] = (0, react_1.useState)({ height: 0, isStable: false }); const [intervalID, setIntervalID] = (0, react_1.useState)(null); const updatePageHeight = () => { const height = window.document.body.scrollHeight; setPageHeight((previousHeight) => ({ height, isStable: previousHeight.height === height })); }; (0, react_1.useEffect)(() => { if (!commentingClassName) return undefined; if (!hasCommentingActionHash(window.location)) return undefined; !intervalID && setIntervalID(window.setInterval(updatePageHeight, exports.INTERVAL_DELAY)); // scroll once the page has stopped changing size so the comments position is set if (pageHeight.isStable) { (0, scroll_to_anchor_1.scrollToAnchor)(`.${commentingClassName}`); window.clearInterval(intervalID); // Remove the hash from the current history entry window.history.replaceState(null, '', removeURLHash({ url: (0, exports.getRelativeURLWithSearchAndHash)(window.location) })); } return () => { window.clearInterval(intervalID); }; }, [commentingClassName, pageHeight.isStable, intervalID]); }; exports.useScrollToCommenting = useScrollToCommenting; // Be aware if there are duplicate keys only the second will be returned. // All values are returned as strings - true as 'true' for example const getParamsAsObjectFromURL = ({ searchParams }) => Object.fromEntries(new URLSearchParams(searchParams)); exports.getParamsAsObjectFromURL = getParamsAsObjectFromURL; const getRelativeURLWithoutParams = ({ href, paramsToRemove }) => { const url = new URL(href); paramsToRemove.forEach((param) => url.searchParams.delete(param)); return getRelativeUrl(url); }; exports.getRelativeURLWithoutParams = getRelativeURLWithoutParams; const updatedUserReactionsForID = ({ reactions, id }) => { const existingReaction = reactions[id] || {}; const { viewerActionPresence = false, reactionCount = 0 } = existingReaction; return { ...reactions, [id]: { reactionCount: viewerActionPresence ? reactionCount - 1 : reactionCount + 1, viewerActionPresence: !viewerActionPresence } }; }; exports.updatedUserReactionsForID = updatedUserReactionsForID; const addItemToReactions = ({ reactions, id, reactionCount, viewerActionPresence }) => { if (reactions[id]) return reactions; reactions[id] = { reactionCount, viewerActionPresence }; return reactions; }; const setUserReactionsReplyReducer = (reactions, { id, actionCounts, viewerActionPresence }) => { addItemToReactions({ reactions, id, reactionCount: actionCounts?.reaction?.total || 0, viewerActionPresence: viewerActionPresence?.reaction }); return reactions; }; exports.setUserReactionsReplyReducer = setUserReactionsReplyReducer; const setUserReactionsReducer = (reactions, { commentId, reactionCount, viewerActionPresence, replies }) => { addItemToReactions({ reactions, id: commentId, reactionCount, viewerActionPresence }); if (replies?.length > 0) { replies.forEach((reply) => { (0, exports.setUserReactionsReplyReducer)(reactions, reply); }); } return reactions; }; exports.setUserReactionsReducer = setUserReactionsReducer; const useUpdateUserReactions = (items, setUserReactions) => { (0, react_1.useEffect)(() => { if (!items.length) return; setUserReactions((prevUserReaction) => items.reduce(exports.setUserReactionsReducer, { ...prevUserReaction })); }, [items, setUserReactions]); }; exports.useUpdateUserReactions = useUpdateUserReactions; //# sourceMappingURL=utils.js.map /***/ }), /***/ 22192: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { connect: connectToStore } = __webpack_require__(67851); const InlineRecirc = __webpack_require__(27909); /** * ConnectedInlineRecirc component * * @param {object} state - Required state via Redux Provider store * * @returns {ReactElement}
*/ const ConnectedInlineRecirc = connectToStore((state) => { const { brandIdentityAssets: { favicon = '' }, inlineRecirc, renditions } = state; const inlineRecircProps = { favicon, addItemsAtFirst: inlineRecirc?.addItemsAtFirst, items: inlineRecirc?.items, renditions }; return inlineRecircProps; })(InlineRecirc); ConnectedInlineRecirc.displayName = 'InlineRecirc'; module.exports = ConnectedInlineRecirc; //# sourceMappingURL=ConnectedInlineRecirc.js.map /***/ }), /***/ 27909: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const classnames = __webpack_require__(32485); const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const shuffle = __webpack_require__(36049); const uniqueId = __webpack_require__(97200); const { useViewportObserver } = __webpack_require__(55030); const SummaryItem = __webpack_require__(74992); const InlineRecircItem = __webpack_require__(7738); const { TrackComponentChannel } = __webpack_require__(78788); const { googleAnalytics } = __webpack_require__(90090); const ViewportMonitor = __webpack_require__(3990); // Target for Sparrow tracking, don't change without notifying rec's data team const { InlineRecircContainer, InlineRecircHeading, InlineRecircHeaderLogo, InlineRecircItems, InlineRecircWrapper } = __webpack_require__(2760); /** * InlineRecirc component * * @param {object} props - React props * @param {string} [props.className] - Optional top-level class to add * @param {string} [props.favicon] - path to brand logo file. * @param {string} [props.heading] - heading text * @param {Array} props.items - Array containing objects that each have data which is used to render a SummaryItem component * @param {Array} [props.addItemsAtFirst] - Optional. Array containing objects to append first * @param {number} [props.reelId] - Optional id for GA tracking * @param {object} [props.variations] - Variation properties used in rendering the component. * @param {boolean} [props.variations.hasBrandLogo] - Optional. Enable or disable brand logo in header. * @param {string} [props.variations.layout] - Optional. Specifies that component should use side-by-side or text-overlay treatment * @param {boolean} [props.variations.showInlineRubric] - Optional. Enable or disable inlineed rubric. * @param {string} [props.variations.trackingImpressionThreshold] - Specifies minimum item number to track scroll event * @param {string} [props.variations.trackingUnitName] - Specifies unit name for GA tracking * @param {string} [props.variationName] - Component variation name used for Component Tracking * * @returns {ReactElement}
*/ const InlineRecirc = (props) => { const { applicationID, categories, className, contentTypes, excludeCategories, favicon, heading = 'More', items = [], numberOfDays, onIntersectionViewportCallback, pageSize, addItemsAtFirst = [], recommendedHeading, reelId, renditions, strategy, variations = { hasBrandLogo: false, hasBorder: false, layout: 'side-by-side', maxHedLines: 3, shouldHideHeaderText: false, showInlineRubric: false, trackingImpressionThreshold: 2, trackingUnitName: 'recirc-basic-interstitial', variationDisplayName: 'SideBySide' }, variationName } = props; React.useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'ConnectedInlineRecirc', variation: variationName }); }, [variationName]); const getSourcesForLogo = () => { const sources = { sm: { url: favicon } }; return sources; }; const trackingImpressionEvent = () => { googleAnalytics.emitUniqueGoogleTrackingEvent(`${variations.trackingUnitName}_reel-impression`, { interstitial_reel: { ...(reelId ? { reel: reelId } : {}) } }); }; const sparrowPattern = 'mobile-recirc-interstitial'; // Targets for GA tracking const targetObserverClass = reelId ? `inline-recirc-observer-target-${reelId}` : 'inline-recirc-observer-target'; const trackingRecircClass = reelId ? `inline-recirc-tracking-${reelId}` : 'inline-recirc-tracking'; useViewportObserver(`.${trackingRecircClass}`, undefined, (isInViewport) => { if (isInViewport) { trackingImpressionEvent(); } }); const onIntersectionViewport = (isInViewport, unsubscribeCallback) => { if (isInViewport && typeof onIntersectionViewportCallback === 'function') { onIntersectionViewportCallback({ applicationID, categories, contentTypes, excludeCategories, numberOfDays, pageSize, renditions, strategy, variationName: variations.variationDisplayName }); unsubscribeCallback(); } }; const getRecircItems = (data) => { if (addItemsAtFirst.length) { data.unshift(...addItemsAtFirst); } const recommendateItems = data.map((item, index) => (React.createElement(InlineRecircItem, { hasBorder: variations.hasBorder, item: item, key: uniqueId('inline-recirc-'), layout: variations.layout, maxHedLines: variations.maxHedLines, recircId: index + 1, reelId: reelId, showInlineRubric: variations.showInlineRubric, sparrowPattern: sparrowPattern, trackingImpressionThreshold: variations.trackingImpressionThreshold, trackingUnitName: variations.trackingUnitName, totalItems: items.length }))); return recommendateItems.slice(0, pageSize); }; if (items?.length === 0) { return null; } return (React.createElement(ViewportMonitor, { dataAttrKey: "inline-recirc", "data-testid": "InlineRecircViewportMonitor", className: classnames('inline-recirc-wrapper', targetObserverClass), observerOptions: { rootMargin: '500px' }, onIntersectionViewport: onIntersectionViewport }, items[0] && (React.createElement(InlineRecircWrapper, { "data-testid": "InlineRecircWrapper", className: classnames(`inline-recirc--${variations.layout}`, 'inline-recirc-sparrow-tracking', trackingRecircClass, className), recircLayout: variations.layout, "data-recirc-id": `mobile-recirc-unit-${reelId}`, "data-recirc-header": heading }, (heading || recommendedHeading) && (React.createElement(InlineRecircHeading, null, !variations.shouldHideHeaderText && (React.createElement("div", null, addItemsAtFirst.length && recommendedHeading ? recommendedHeading : heading)), variations.hasBrandLogo && favicon && (React.createElement(InlineRecircHeaderLogo, { altText: "logo", contentTypes: "photo", sources: getSourcesForLogo() })))), React.createElement(InlineRecircContainer, null, React.createElement(InlineRecircItems, null, getRecircItems(shuffle(items)))))))); }; InlineRecirc.propTypes = { addItemsAtFirst: PropTypes.arrayOf(PropTypes.shape(SummaryItem.propTypes)), applicationID: PropTypes.string, categories: PropTypes.array, className: PropTypes.string, contentTypes: PropTypes.string, excludeCategories: PropTypes.array, favicon: PropTypes.string, heading: PropTypes.string, items: PropTypes.arrayOf(PropTypes.shape(SummaryItem.propTypes)), numberOfDays: PropTypes.number, onIntersectionViewportCallback: PropTypes.func, pageSize: PropTypes.number, recommendedHeading: PropTypes.string, reelId: PropTypes.number, renditions: PropTypes.object, strategy: PropTypes.string, variationName: PropTypes.string, variations: PropTypes.shape({ hasBrandLogo: PropTypes.bool, hasBorder: PropTypes.bool, layout: PropTypes.oneOf([ 'side-by-side', 'text-only-brand-logo', 'text-only-brand-logo-personalized', 'text-overlay' ]), maxHedLines: PropTypes.number, shouldHideHeaderText: PropTypes.bool, showInlineRubric: PropTypes.bool, trackingImpressionThreshold: PropTypes.number, trackingUnitName: PropTypes.string, variationDisplayName: PropTypes.oneOf([ 'SideBySide', 'TextOnlyBrandLogo', 'TextOnlyBrandLogoPersonalized', 'TextOverlay' ]) }) }; module.exports = InlineRecirc; //# sourceMappingURL=InlineRecirc.js.map /***/ }), /***/ 7738: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const classnames = __webpack_require__(32485); const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const { useViewportObserver } = __webpack_require__(55030); const SummaryItem = __webpack_require__(74992); const { googleAnalytics } = __webpack_require__(90090); const { trackNavigationEvent, extractStrategyFromURL } = __webpack_require__(14307); const { InlineRecircRubricLineParagraph, InlineRecircItemWrapper } = __webpack_require__(2760); /** * InlineRecirc components * * @param {object} props - React props * @param {string} [props.className] - Optional top-level class to add * @param {object} props.item - Array containing objects that each have data which is used to render a SummaryItem component * @param {string} [props.layout] - Optional. Specifies that component should use side-by-side or text-overlay treatment * @param {string} [props.maxHedLines] - Optional maximum number of visual lines for the hed to occupy * @param {number} props.reelId - Optional id for GA tracking * @param {number} [props.totalItems] - Optional props that contains total count of items in a inline recirc * @param {object} [props.showInlineRubric] - Optional. Enable or disable rubric. * @param {string} [props.trackingImpressionThreshold] - Specifies minimum item number to track scroll event * @param {string} [props.trackingUnitName] - Specifies unit name for GA tracking * * @returns {ReactElement}
*/ const InlineRecircItem = (props) => { const { className, hasBorder, item, recircId, totalItems, reelId, sparrowPattern, layout = 'side-by-side', maxHedLines = 3, showInlineRubric = false, trackingImpressionThreshold = 2, trackingUnitName = 'recirc-basic-interstitial' } = props; const trackSnowplowNavigationEvent = (eventType) => { const { dangerousHed, copilotID, contentType, url } = item; const eventData = { type: eventType, label: dangerousHed, subject: 'recirc_unit', items: [ { content_id: copilotID, content_title: dangerousHed, content_type: contentType, content_url: url } ], strategy: extractStrategyFromURL(url), placement: 'inline_recirc_mid_content', index: recircId - 1, total_index: totalItems }; trackNavigationEvent(eventData); }; const getDangerousHed = (dangerousHed, rubric) => { if (!rubric || !showInlineRubric) { return dangerousHed; } const dangerousHedWithRubric = `${dangerousHed}<${InlineRecircRubricLineParagraph} class="rubric">${rubric.name}`; return dangerousHedWithRubric; }; const targetObserverClass = reelId ? `inline-recirc__item-${reelId}-${recircId}` : `inline-recirc__item-${recircId}`; const targetObserverSelector = `.${targetObserverClass}`; const targetObserverRootSelector = reelId ? `.inline-recirc-${reelId} .inline-recirc__container` : `.inline-recirc .inline-recirc__container`; const storyClickHandlerByUrl = (url, slideIndex) => () => { trackSnowplowNavigationEvent('click'); return googleAnalytics.emitUniqueGoogleTrackingEvent(`${trackingUnitName}_reel-click`, { 'gtm.elementUrl': url, interstitial_reel: { image: slideIndex, ...(reelId ? { reel: reelId } : {}) } }); }; const trackingImpressionEvent = () => { googleAnalytics.emitUniqueGoogleTrackingEvent(`${trackingUnitName}_reel-scroll`, { interstitial_reel: { image: recircId, ...(reelId ? { reel: reelId } : {}) } }); }; useViewportObserver(targetObserverSelector, { rootSelector: targetObserverRootSelector, threshold: 0.5 }, (isInViewport) => { if (recircId >= trackingImpressionThreshold && isInViewport) { trackingImpressionEvent(); } }); let SummaryItemVariation; switch (layout) { case 'text-only-brand-logo': case 'text-only-brand-logo-personalized': SummaryItemVariation = SummaryItem.TextOnlyBrandLogoPersonalized; break; case 'text-overlay': SummaryItemVariation = SummaryItem.OverlayCenter; break; default: SummaryItemVariation = SummaryItem.SideBySideThirds; } return (React.createElement(InlineRecircItemWrapper, { "data-testid": "InlineRecircItemWrapper", className: classnames([className, targetObserverClass]) }, React.createElement(SummaryItemVariation, { clickHandler: storyClickHandlerByUrl(item.url, recircId), dangerousHed: getDangerousHed(item.dangerousHed, item.rubric), hasBorder: hasBorder, hedTag: "div", image: item.image, isLazy: false, layout: layout, maxHedLines: maxHedLines, recircId: recircId, shouldHideDangerousDek: true, sparrowPattern: sparrowPattern, url: item.url, isRecircListItem: true, recircPlacement: "inline_recirc_mid_content", totalItems: totalItems, contentType: item.contentType, copilotID: item.copilotID }))); }; InlineRecircItem.propTypes = { className: PropTypes.string, hasBorder: PropTypes.bool, item: PropTypes.shape(SummaryItem.propTypes), layout: PropTypes.oneOf([ 'text-only-brand-logo', 'text-only-brand-logo-personalized', 'side-by-side', 'text-overlay' ]), maxHedLines: PropTypes.number, recircId: PropTypes.number, reelId: PropTypes.number, showInlineRubric: PropTypes.bool, sparrowPattern: PropTypes.string, totalItems: PropTypes.number, trackingImpressionThreshold: PropTypes.number, trackingUnitName: PropTypes.string }; module.exports = InlineRecircItem; //# sourceMappingURL=InlineRecircItem.js.map /***/ }), /***/ 71436: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const ConnectedInlineRecircVariations = __webpack_require__(48608); module.exports = ConnectedInlineRecircVariations; //# sourceMappingURL=index.js.map /***/ }), /***/ 2760: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled, css } = __webpack_require__(92168); const { BaseText } = __webpack_require__(76955); const { BREAKPOINTS } = __webpack_require__(96472); const { calculateSpacing, getColorToken, getTypographyStyles, minScreen } = __webpack_require__(26865); const ResponsiveImage = __webpack_require__(43608); const { OverlaySummaryItemContent, OverlaySummaryItemHed, OverlaySummaryItemResponsiveAsset } = __webpack_require__(3265); // 1. Zero gutter to prevent from summing with gutter on the edges // 2. The gutter on the edges const InlineRecircItems = styled.ul.withConfig({ displayName: 'InlineRecircItems' }) ` display: grid; grid-gap: 0; /* 1 */ grid-auto-flow: column; grid-template-columns: ${calculateSpacing(1)}; margin: 0 0 -${calculateSpacing(4)}; padding: 0 0 ${calculateSpacing(4)}; overflow-y: hidden; list-style: none; -webkit-overflow-scrolling: auto; backface-visibility: hidden; scroll-behavior: smooth; &::before, &::after { width: ${calculateSpacing(1)}; content: ''; } `; const InlineRecircSummaryItemhedCss = css ` ${getTypographyStyles('typography.definitions.discovery.hed-bulletin-primary')} margin: 0; `; const InlineRecircItemWrapper = styled.li.withConfig({ displayName: 'InlineRecircItemWrapper' }) ` display: grid; padding: 0; a:link { text-decoration: none; } .summary-item__hed, ${OverlaySummaryItemHed} { ${InlineRecircSummaryItemhedCss} } .summary-item--layout-placement-side-by-side { align-items: flex-start; .summary-item__hed { ${InlineRecircSummaryItemhedCss} } } .summary-item__hed-link { &::after { border-bottom: none; } } ${OverlaySummaryItemResponsiveAsset}::after { transition: none; } `; const InlineRecircHeading = styled(BaseText).withConfig({ displayName: 'InlineRecircHeading' }) ` padding: 0 0 ${calculateSpacing(2)}; text-align: center; `; InlineRecircHeading.defaultProps = { as: 'div', colorToken: 'colors.discovery.lead.secondary.accent', typeIdentity: 'typography.definitions.discovery.subhed-section-collection' }; const InlineRecircContainer = styled.div.withConfig({ displayName: 'InlineRecircContainer' }) ` overflow: hidden; `; const InlineRecircHeaderLogo = styled(ResponsiveImage).withConfig({ displayName: 'InlineRecircHeaderLogo' }) ``; const InlineRecircTextOnlyBrandLogo = css ` ${getTypographyStyles('typography.definitions.globalEditorial.context-primary')}; margin: ${calculateSpacing(2)} 0; background: ${getColorToken('colors.discovery.body.white.background')}; padding: 0 ${calculateSpacing(2)} ${calculateSpacing(2)} ${calculateSpacing(2)}; ol, ul { li { margin-left: ${calculateSpacing(1)}; } } ${InlineRecircItems} { display: flex; flex-direction: column; } ${InlineRecircHeading} { display: flex; align-items: center; margin: ${calculateSpacing(-2)} ${calculateSpacing(1)} 0 ${calculateSpacing(1)}; border-bottom: 1px solid ${getColorToken('colors.discovery.body.white.divider')}; padding: ${calculateSpacing(2)} 0; text-align: left; ${InlineRecircHeaderLogo} { margin-left: ${calculateSpacing(1)}; width: 15px; img { vertical-align: text-top; } } } ${InlineRecircContainer} { margin-right: ${calculateSpacing(1)}; } .summary-item { padding: ${calculateSpacing(1)} 0; .summary-item__hed-link::after { margin: 0; } .summary-item__content { padding: 0; } } `; const InlineRecircTextOnlyBrandLogoPersonalized = css ` ${getTypographyStyles('typography.definitions.globalEditorial.context-primary')}; margin: ${calculateSpacing(2)} 0; background: ${getColorToken('colors.discovery.body.white.background')}; padding: 0 ${calculateSpacing(2)} ${calculateSpacing(2)} ${calculateSpacing(2)}; ol, ul { li { margin-left: ${calculateSpacing(1)}; } } ${InlineRecircItems} { display: flex; flex-direction: column; } ${InlineRecircHeading} { display: flex; align-items: center; margin: ${calculateSpacing(-2)} ${calculateSpacing(1)} 0 ${calculateSpacing(1)}; border-bottom: 1px solid ${getColorToken('colors.discovery.body.white.divider')}; padding: ${calculateSpacing(2)} 0; text-align: left; ${InlineRecircHeaderLogo} { margin-left: ${calculateSpacing(1)}; width: 15px; img { vertical-align: bottom; } } } ${InlineRecircContainer} { margin-right: ${calculateSpacing(1)}; } .summary-item { padding: ${calculateSpacing(1)} 0; .summary-item__hed-link::after { margin: 0; } .summary-item__content { padding: 0; } } .summary-item__hed-link { &:hover { text-decoration: none; } .summary-item__hed { .summary-item__hed-wrapper { margin-right: ${calculateSpacing(1)}; &:hover { text-decoration: underline; } } } } `; const InlineRecircTextOverlay = css ` && { padding: ${calculateSpacing(4)} 0 ${calculateSpacing(5)}; ${InlineRecircItems} { grid-auto-columns: calc(210px + ${calculateSpacing(2)}); margin-left: -${calculateSpacing(2)}; } ${OverlaySummaryItemContent} { align-self: start; padding: ${calculateSpacing(25)} ${calculateSpacing(1)} ${calculateSpacing(2)}; } ol, ul { li { margin: 0 0 0 ${calculateSpacing(2)}; &:first-child { margin-left: ${calculateSpacing(3)}; } } } } `; /* 1. The gutter on the edges 2. The gutter on the left edge */ const InlineRecircSideBySideThirds = css ` padding: ${calculateSpacing(3)} 0; ${InlineRecircHeading} { padding-bottom: ${calculateSpacing(2)}; } ${InlineRecircItems} { grid-auto-columns: calc(260px + ${calculateSpacing(1)}*2); grid-template-columns: ${calculateSpacing(2)}; margin-left: -${calculateSpacing(3)}; &::before, &::after { width: ${calculateSpacing(2)}; } } .summary-item--layout-proportions-33-66 .summary-item__content { margin: 0; } ol, ul { li { margin: 0 0 0 ${calculateSpacing(2)}; &:first-child { margin-left: ${calculateSpacing(3)}; } } } `; const InlineRecircRubricLineParagraph = styled(BaseText).withConfig({ displayName: 'InlineRecircRubricLineParagraph' }) ``; InlineRecircRubricLineParagraph.defaultProps = { topSpacing: 1 }; const InlineRecircWrapper = styled.div.withConfig({ displayName: 'InlineRecircWrapper' }) ` margin-bottom: ${calculateSpacing(5)}; .article-inline-recirc-wrapper { margin: 0 ${calculateSpacing(-3)} ${calculateSpacing(5)} ${calculateSpacing(-3)}; ${InlineRecircHeading} { ${InlineRecircHeaderLogo} { img { vertical-align: baseline; } } } } background: ${getColorToken('colors.discovery.body.light.background')}; ${minScreen(BREAKPOINTS.md)} { display: none; } ${({ recircLayout }) => { if (recircLayout === 'text-only-brand-logo') return InlineRecircTextOnlyBrandLogo; if (recircLayout === 'text-only-brand-logo-personalized') return InlineRecircTextOnlyBrandLogoPersonalized; if (recircLayout === 'text-overlay') return InlineRecircTextOverlay; return InlineRecircSideBySideThirds; }} `; module.exports = { InlineRecircContainer, InlineRecircHeading, InlineRecircHeaderLogo, InlineRecircItems, InlineRecircRubricLineParagraph, InlineRecircWrapper, InlineRecircItemWrapper }; //# sourceMappingURL=styles.js.map /***/ }), /***/ 48608: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { asVariation } = __webpack_require__(81372); const { asConfiguredComponent } = __webpack_require__(12892); const ConnectedInlineRecirc = __webpack_require__(22192); ConnectedInlineRecirc.TextOnlyBrandLogo = asVariation(ConnectedInlineRecirc, 'TextOnlyBrandLogo', { hasBrandLogo: true, hasBorder: true, layout: 'text-only-brand-logo', maxHedLines: 4, shouldHideHeaderText: true, trackingImpressionThreshold: 2, trackingUnitName: 'recirc-text-only-brand-logo-interstitial', variationDisplayName: 'TextOnlyBrandLogo' }); ConnectedInlineRecirc.TextOnlyBrandLogoPersonalized = asVariation(ConnectedInlineRecirc, 'TextOnlyBrandLogoPersonalized', { hasBrandLogo: true, hasBorder: true, layout: 'text-only-brand-logo-personalized', maxHedLines: 4, trackingImpressionThreshold: 2, trackingUnitName: 'recirc-text-only-brand-logo-personalized-interstitial', variationDisplayName: 'TextOnlyBrandLogoPersonalized' }); ConnectedInlineRecirc.SideBySide = asVariation(ConnectedInlineRecirc, 'SideBySide', { layout: 'side-by-side', maxHedLines: 4, trackingImpressionThreshold: 2, trackingUnitName: 'recirc-basic-interstitial', variationDisplayName: 'SideBySide' }); ConnectedInlineRecirc.TextOverlay = asVariation(ConnectedInlineRecirc, 'TextOverlay', { layout: 'text-overlay', maxHedLines: 4, trackingImpressionThreshold: 3, trackingUnitName: 'recirc-interstitial', variationDisplayName: 'TextOverlay' }); module.exports = asConfiguredComponent(ConnectedInlineRecirc, 'InlineRecirc'); //# sourceMappingURL=variations.js.map /***/ }), /***/ 54281: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const React = __webpack_require__(96540); const PropTypes = __webpack_require__(5556); const { connector } = __webpack_require__(57744); const Navigation = __webpack_require__(54790); const PersistentTop = __webpack_require__(26392); const ResponsiveAsset = __webpack_require__(73275); const SimpleNavigation = __webpack_require__(94919); const SiteHeader = __webpack_require__(12911); const StandardNavigation = __webpack_require__(80742); const StackedNavigation = __webpack_require__(55266); const { default: OneNav } = __webpack_require__(96396); const { TrackComponentChannel } = __webpack_require__(78788); const { LinkBanner } = __webpack_require__(82873); const NAVIGATION_COMPONENTS = { SimpleNavigation, SiteHeader, StackedNavigation, StandardNavigation, OneNav }; const PersistentComponent = ({ isPersistent, children }) => isPersistent ? React.createElement(PersistentTop, null, children) : children; PersistentComponent.propTypes = { children: PropTypes.node, isPersistent: PropTypes.bool }; /** * ConnectedNavigation component. This pulls necessary values out of the store * and additionally allows you to select the navigation pattern used. * * To select a variation of that pattern, add configuration for the navigation * component selected here. See the README of this component for details. * * @param {object} props - React props * @param {string} props.brandName - The brand name of the site * @param {string} props.rootBrandName - The root brand name of the site which is common across markets * @param {object} props.featureFlags - Feature flags required by this component * @param {boolean} props.featureFlags.enableGqlForLinkBanner - Should show Navigation with LinkBanner If the LinkBanner data exist * @param {object} props.featureFlags.isLogoWide - Should this provide space for wider logos? * @param {object} props.featureFlags.shouldKeepSubscribeLinkActive - Should show subscribe link in mobile view * @param {boolean} props.featureFlags.showNavigationWithlinkBanner - Should show Navigation with LinkBanner * @param {object} props.featureValue - Value from experiment * @param {boolean} props.hasContentHeaderLogo - Determines if the content header has logo * @param {boolean} props.hasSearch - Determines if search should be hidden * @param {object} props.headerInvertedLogo - Inverted header logo image data including sources and alt text * @param {object} props.headerLogo - Header logo image data including sources and alt text * @param {object} [props.headerLogoDim] - Optional Header logo image data with sources for different viewports * @param {string} [props.headerTheme] - Optional Navigation header theme: standard, inverted, transparent * @param {object} props.invertedLogo - Inverted logo image data including sources and alt text * @param {boolean} [props.isAccountsEnabled] - Are accounts enabled for this tenant? * @param {boolean} [props.journeyRibbonHeight] - Height of journey ribbon component if rendered * @param {object} props.logo - Logo image data including sources and alt text * @param {string} props.logoBaseUrl - The URL the logo links to * @param {object} props.navigation - Navigation props * @param {object} [props.navigation.account] - Navigation account props * @param {Array} [props.navigation.appDownloadUrls] - Array of the Mobile Apps Links * @param {object} [props.navigation.hasSEOSupport] - Optional enable the SEO Suport for mega menu default value false * @param {object} [props.navigation.internationalInfo] - Navigation international info props * @param {boolean} props.navigation.isEditorPicksAvailable - Determine whether EditorPicks is configured in the tenant * @param {string} [props.navigation.pageHeadline] - Headline string to display in navbar * @param {Array} [props.navigation.primaryLinks] - Optional Primary list of `{ isExternal, text, url, isPersistent }` object links * @param {Array} [props.navigation.searchLink] - The link for the search action * @param {Array} [props.navigation.secondaryLinks] - Array of secondary links * @param {Array} [props.navigation.socialLinks] - Array of social links * @param {string} [props.navigation.socialLinksHeading] - Title for the social links * @param {Array} [props.navigation.utilityLinks] - Optional Secondary list of `{ isExternal, text, url, isPersistent }` object links * @param {string} [props.navPattern] - Name of the navigation pattern to render * @param {object} [props.seriesData] - Optional series data if article is part of a series * @param {object} [props.linkBannerData] - Optional link banner data * @param {boolean} [props.shouldEnableFullArticleInverted] - should enable full article inverted * @param {boolean} [props.shouldPrioritizeSeriesPagination] - shouldPrioritize SeriesPagination when article contains both linkbanner and seriesData * @param {object} props.user - required user object * @param {boolean} props.user.isAuthenticated - represents if the user is currently authenticated * @param {boolean} [props.hasLinkbannerCrossSlideAnimation] - Enable/Disable Header cross slide animation * @param {Function} [props.onDrawerStateChange] - Callback function when the Drawer is open/close * @param {object} props.oneNav - Configuration for the `OneNav` component * @param {Array} props.oneNavTriggerableContainers - Array of configurations for the `OneNav` component wrapped in the `TriggerableContainer` component * * @returns {ReactElement}
*/ const ConnectedNavigation = ({ brandName, featureFlags: { enableGqlForLinkBanner = false, isLogoWide, shouldKeepSubscribeLinkActive, showNavigationWithlinkBanner = false }, featureValue, hasContentHeaderLogo, hasSearch = true, headerInvertedLogo, headerLogo, headerLogoDim, headerTheme, invertedLogo, isAccountsEnabled, journeyRibbonHeight, linkBannerData, logo, logoBaseUrl, navigation: { account, appDownloadUrls, internationalInfo, pageHeadline, primaryLinks, searchLink, secondaryLinks, socialLinksHeading, socialLinks, utilityLinks, hasSEOSupport, isEditorPicksAvailable }, rootBrandName, hasLinkbannerCrossSlideAnimation, seriesData, shouldPrioritizeSeriesPagination, shouldEnableFullArticleInverted, user, onDrawerStateChange, navPattern = 'StandardNavigation', oneNav, oneNavTriggerableContainers }) => { React.useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'ConnectedNavigation' }); }, []); const isVisualLinkBanner = linkBannerData.bannerType === 'visual-link-banner'; const showLinkBanner = enableGqlForLinkBanner && !isVisualLinkBanner && linkBannerData?.links?.length > 0; const navigationProps = { accountProps: account, appDownloadUrls, className: 'site-navigation', showLinkBanner, showNavigationWithlinkBanner: showLinkBanner || showNavigationWithlinkBanner, drawerProps: { appElement: '#app-root', internationalInfo, rootBrandName, primaryLinks, secondaryLinks, searchAction: searchLink, socialIconsProps: { links: socialLinks } }, hasContentHeaderLogo, hasSearch, hasSearchBar: false, headerLogo, headerLogoDim, headerInvertedLogo, headerTheme, pageHeadline, isLogoWide, isAccountsEnabled, isEditorPicksAvailable, isPersistent: true, isVisualLinkBanner, logo: headerLogo, invertedLogo, logoBaseUrl, primaryLinks, secondaryLinks, seriesData, shouldEnableFullArticleInverted, shouldKeepSubscribeLinkActive, shouldConsiderSeriesPagination: linkBannerData && seriesData && shouldPrioritizeSeriesPagination, user, utilityLinks, hasSEOSupport }; const patternProps = { SimpleNavigation: { hasSearch: false }, SiteHeader: { brandName, hasSearch, internationalInfo, invertedLogo, isPersistent: false, logo, searchLink, socialLinks, socialLinksHeading }, StackedNavigation: { logo, invertedLogo, socialLinksHeading, hasLinkbannerCrossSlideAnimation, onDrawerStateChange, journeyRibbonHeight }, OneNav: { oneNav, oneNavTriggerableContainers, isPersistent: false, featureValue, brandName } }; Object.assign(navigationProps, patternProps[navPattern]); const NavigationComponent = NAVIGATION_COMPONENTS[navPattern]; return (React.createElement(PersistentComponent, { isPersistent: navigationProps.isPersistent }, React.createElement(NavigationComponent, { ...navigationProps }))); }; ConnectedNavigation.propTypes = { brandName: PropTypes.string, featureFlags: PropTypes.shape({ enableGqlForLinkBanner: PropTypes.bool, isLogoWide: PropTypes.bool, shouldKeepSubscribeLinkActive: PropTypes.bool, showNavigationWithlinkBanner: PropTypes.bool }), featureValue: PropTypes.object, hasContentHeaderLogo: PropTypes.bool, hasLinkbannerCrossSlideAnimation: PropTypes.bool, hasSearch: PropTypes.bool, headerInvertedLogo: PropTypes.shape(ResponsiveAsset.propTypes).isRequired, headerLogo: PropTypes.shape(ResponsiveAsset.propTypes).isRequired, headerLogoDim: PropTypes.shape(ResponsiveAsset.propTypes), headerTheme: PropTypes.oneOf(['standard', 'inverted', 'transparent']), invertedLogo: PropTypes.shape(ResponsiveAsset.propTypes).isRequired, isAccountsEnabled: PropTypes.bool, isEditorPicksAvailable: PropTypes.bool, journeyRibbonHeight: PropTypes.number, linkBannerData: PropTypes.shape({ hed: PropTypes.hed, dek: PropTypes.dek, image: PropTypes.shape(ResponsiveAsset.propTypes), links: PropTypes.arrayOf(PropTypes.shape({ url: PropTypes.string, text: PropTypes.string, isExternal: PropTypes.bool })), bannerType: PropTypes.string, tracking: PropTypes.shape(LinkBanner.propTypes.tracking) }), logo: PropTypes.shape(ResponsiveAsset.propTypes).isRequired, logoBaseUrl: PropTypes.string, navigation: PropTypes.shape({ account: PropTypes.object, appDownloadUrls: PropTypes.array, hasSEOSupport: PropTypes.bool, internationalInfo: Navigation.object, isEditorPicksAvailable: PropTypes.bool, pageHeadline: PropTypes.string, primaryLinks: Navigation.propTypes.links, searchLink: PropTypes.string, secondaryLinks: PropTypes.array, socialLinksHeading: PropTypes.string, socialLinks: PropTypes.array, utilityLinks: Navigation.propTypes.links }), navPattern: PropTypes.oneOf(Object.keys(NAVIGATION_COMPONENTS)), onDrawerStateChange: PropTypes.func, oneNav: PropTypes.any, oneNavTriggerableContainers: PropTypes.any, rootBrandName: PropTypes.string, seriesData: PropTypes.shape({ hed: PropTypes.string, dek: PropTypes.string, image: PropTypes.object, links: PropTypes.arrayOf(PropTypes.shape({ hed: PropTypes.string, dek: PropTypes.string, image: PropTypes.object, isPublished: PropTypes.bool, promoHed: PropTypes.string, url: PropTypes.string })) }), shouldEnableFullArticleInverted: PropTypes.bool, shouldPrioritizeSeriesPagination: PropTypes.bool, shouldUseGQLForLinkBanner: PropTypes.bool, user: PropTypes.shape({ isAuthenticated: PropTypes.bool.isRequired }) }; ConnectedNavigation.displayName = 'ConnectedNavigation'; module.exports = connector(ConnectedNavigation, { keysToPluck: [ 'brandName', 'rootBrandName', 'config', 'featureFlags', 'hasSearch', 'headerLogo', 'headerInvertedLogo', 'invertedLogo', 'isAccountsEnabled', 'linkBannerData', 'logo', 'logoBaseUrl', 'navigation', 'seriesData', 'user', 'oneNav', 'oneNavTriggerableContainers' ] }); //# sourceMappingURL=ConnectedNavigation.js.map /***/ }), /***/ 10980: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { asConfiguredComponent } = __webpack_require__(12892); module.exports = asConfiguredComponent(__webpack_require__(54281), 'ConnectedNavigation'); //# sourceMappingURL=index.js.map /***/ }), /***/ 75874: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const React = __webpack_require__(96540); const { googleAnalytics } = __webpack_require__(90090); const { connector } = __webpack_require__(57744); const ConnectedNewsletterSubscribeForm = __webpack_require__(577); const { getNewsletterSubscriptions } = __webpack_require__(29727); const ViewportMonitor = __webpack_require__(3990); const { trackNewsletterEvent } = __webpack_require__(14307); /** * SlimNewsletterWrapper component * * Wraps the ConnectedNewsletterSubscribeForm within the ArticlePage component, and supresses * the newsletter if utm_source is nl. Only meant for use with the slim newsletter module * inside the article page. * * @param {object} props - Props to be passed to newsletter component * @returns {ReactElement}
*/ class SlimNewsletterWrapper extends React.Component { constructor(props) { super(props); this.fetchNewsletterSubscriptions = async (options) => { try { const result = await getNewsletterSubscriptions(options); if (result.status === 200) { return (result.newsletterSubscriptions && result.newsletterSubscriptions.data); } } catch (error) { console.log(error); } return {}; }; this.state = {}; } async componentDidMount() { let isSourceNewsletter; let newsletterToShow; // the ids of all the newsletters that could potentially appear on the article const newsletterIds = (this.props.newsletters && this.props.newsletters.map((newsletter) => newsletter.newsletterId)) || []; if (document) { const params = new URLSearchParams(document.location.search); const utmSource = params.get('utm_source'); isSourceNewsletter = utmSource === 'nl'; } const { user, userPlatform } = this.props; const { userPlatformProxy, xClientID } = userPlatform || {}; if (user.isAuthenticated) { const options = { amgUUID: user.amguuid, newsletterIds, userPlatformProxy, xClientID, provider: 'sailthru' }; const newsletterSubscriptions = await this.fetchNewsletterSubscriptions(options); const subscribedNewsletterIds = newsletterSubscriptions .filter((subscription) => subscription.attributes.status === 'SUBSCRIBED') .map((subscription) => subscription.attributes.newsletterId); // now find the first id from the potential newsletters that isn't in the subscribed newsletters newsletterToShow = newsletterIds.find((newsletterId) => !subscribedNewsletterIds.includes(newsletterId)); } else { // if user is not logged in show them the first newsletter in the list newsletterToShow = newsletterIds[0]; } if (this.props.isNewsletterSlim && !isSourceNewsletter && newsletterToShow) { googleAnalytics.emitGoogleTrackingEvent('newsletter-loaded-inlineslim', { newslettterId: newsletterToShow }); } this.setState({ ...this.state, isSourceNewsletter, newsletterToShow }); } render() { let shouldDisplayNewsletter; const { isNewsletterSlim, isNewsletterAggressive, hasSlimAlternateStyle, newsletterType, patternType, showToggleForLoggedInUser, user, isArticlePage } = this.props; if ((newsletterType === 'aggressive-newsletter' && isNewsletterAggressive) || (newsletterType === 'slim-newsletter' && isNewsletterSlim)) shouldDisplayNewsletter = true; const { isSourceNewsletter, newsletterToShow } = this.state; const newsletter = this.props.newsletters && this.props.newsletters.find((newsletterInfo) => newsletterInfo.newsletterId === newsletterToShow); if (isSourceNewsletter || !shouldDisplayNewsletter || !newsletter) { return null; } const { newsletterId, dangerousHed = '', frequencyBadge = '', sourceCode = '' } = newsletter; const onIntersectionViewport = (isInViewport, unobserveIntersection) => { if (!isInViewport) { return; } unobserveIntersection(); const entityData = { type: 'impression', newsletter_id: String(newsletterId), newsletter_title: dangerousHed, cadence: frequencyBadge, subject: sourceCode }; trackNewsletterEvent(entityData); }; return (React.createElement(ViewportMonitor, { onIntersectionViewport: onIntersectionViewport, observerOptions: { rootMargin: '0px' }, className: "content-footer-newsletter-viewport" }, React.createElement(ConnectedNewsletterSubscribeForm, { ...newsletter, enableSlimUnitToggle: showToggleForLoggedInUser && user?.isAuthenticated && user?.email, hasSlimAlternateStyle: hasSlimAlternateStyle, newsletterType: newsletterType, patternType: patternType, userEmail: user?.isAuthenticated && user?.email, isArticlePage: isArticlePage }))); } } SlimNewsletterWrapper.propTypes = ConnectedNewsletterSubscribeForm.propTypes; SlimNewsletterWrapper.defaultProps = ConnectedNewsletterSubscribeForm.defaultProps; SlimNewsletterWrapper.displayName = 'SlimNewsletterWrapper'; module.exports = connector(SlimNewsletterWrapper, { keysToPluck: ['user', 'userPlatform'] }); //# sourceMappingURL=SlimNewsletterWrapper.js.map /***/ }), /***/ 72159: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SlimNewsletterWrapper = __webpack_require__(75874); const { asConfiguredComponent } = __webpack_require__(12892); module.exports = asConfiguredComponent(SlimNewsletterWrapper, 'SlimNewsletterWrapper'); //# sourceMappingURL=index.js.map /***/ }), /***/ 17685: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const Row = __webpack_require__(66657); const { Disclaimer } = __webpack_require__(74307); const { TrackComponentChannel } = __webpack_require__(78788); /** * Content Footer Additional Text component * * @param {object} props - React props * @param {string} [props.additionalText] - Additional text to render in the footer * @param {string} [props.componentWrapper] - Required content wrapper component * @param {boolean} [props.isVisible] - Option to activate the component * * @returns {ReactElement} */ const ContentFooterAdditionalText = ({ isVisible = false, additionalText, componentWrapper }) => { const ComponentWrapper = componentWrapper; React.useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'ContentFooterAdditionalText' }); }, []); return (React.createElement(React.Fragment, null, isVisible && additionalText && (React.createElement(Row, null, React.createElement(ComponentWrapper, null, React.createElement(Disclaimer, { disclaimerHtml: additionalText, className: "grid-layout__content" })))))); }; ContentFooterAdditionalText.propTypes = { additionalText: PropTypes.string, componentWrapper: PropTypes.elementType, isVisible: PropTypes.bool }; ContentFooterAdditionalText.displayName = 'ContentFooterAdditionalText'; module.exports = ContentFooterAdditionalText; //# sourceMappingURL=ContentFooterAdditionalText.js.map /***/ }), /***/ 15461: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { asConfiguredComponent } = __webpack_require__(12892); const ContentFooterAdditionalText = __webpack_require__(17685); module.exports = asConfiguredComponent(ContentFooterAdditionalText, 'ContentFooterAdditionalText'); //# sourceMappingURL=index.js.map /***/ }), /***/ 63545: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const Ad = __webpack_require__(19607); const ConnectedErrorBoundary = __webpack_require__(48496); const ConsumerMarketingUnit = __webpack_require__(71284); const CNCoupons = __webpack_require__(65153); const ContentFooterAdditionalText = __webpack_require__(15461); const Contributors = __webpack_require__(1802); const ContributorSpotlight = __webpack_require__(41096); const Grid = __webpack_require__(86659); const LinkStack = __webpack_require__(63401); const { PaymentGateway } = __webpack_require__(92807); const Row = __webpack_require__(66657); const RelatedVideo = __webpack_require__(24901); const ShowContributor = __webpack_require__(18805); const { TrackComponentChannel } = __webpack_require__(78788); const { Disclaimer } = __webpack_require__(74307); const ViewportMonitor = __webpack_require__(3990); const { trackNewsletterEvent } = __webpack_require__(14307); const { useClientStatus } = __webpack_require__(8877); const { ContentFooterWrapper, ContentFooterContributorBio, ContentFooterTagCloud, ContentFooterRelated, ContentFooterMagazineDisclaimer, ContentFooterBottom, ContentFooterNewsletterForm, ContentFooterSeriesNavigation, ContentFooterContributorSpotlightWrapper, ContentFooterNewsletterContentWrapper, ReadMoGrid, ReadMoGridColumn } = __webpack_require__(27529); const { FooterNewsletter, NewsletterExtended, NewsletterVerticalBottom } = __webpack_require__(12501); const ContentFooterVMGRecommends = () => (React.createElement(Row, null, React.createElement(ReadMoGrid, null, React.createElement(ReadMoGridColumn, null, React.createElement("div", { "data-testid": "ContentFooterReadMoElement", id: "readmo-12345" }))))); const Newsletter = ({ ContentWrapper, hasWrapper, isArticlePage, isFullBleed, newsletter, palette = 'standard' }) => { const { newsletterId, dangerousHed = '', frequencyBadge = '', sourceCode = '' } = newsletter; const onIntersectionViewport = (isInViewport, unobserveIntersection) => { if (!isInViewport) { return; } unobserveIntersection(); const entityData = { type: 'impression', newsletter_id: String(newsletterId), newsletter_title: dangerousHed, cadence: frequencyBadge, subject: sourceCode }; trackNewsletterEvent(entityData); }; const NewsletterForm = (React.createElement(ContentFooterNewsletterForm, { ...newsletter, position: "content-footer", isArticlePage: isArticlePage })); // The feature flag takes precendence over other component config like // isNewsletterFullBleed. Omitting the content wrapper makes the slice go // full bleed on the page if (!hasWrapper) return NewsletterForm; const NewsletterContentWrapper = isFullBleed ? Grid.WithMargins : ContentWrapper; return (React.createElement(ContentFooterNewsletterContentWrapper, { isNewsletterFullBleed: isFullBleed, newsletterPalette: palette }, React.createElement(ViewportMonitor, { onIntersectionViewport: onIntersectionViewport, observerOptions: { rootMargin: '0px' }, className: "content-footer-newsletter-viewport" }, React.createElement(NewsletterContentWrapper, null, NewsletterForm)))); }; Newsletter.propTypes = { ContentWrapper: PropTypes.elementType.isRequired, hasWrapper: PropTypes.bool, isArticlePage: PropTypes.bool, isFullBleed: PropTypes.bool, newsletter: PropTypes.shape(ContentFooterNewsletterForm.propTypes), palette: PropTypes.string }; /** * Content Footer component * * @param {object} props - React props * @param {object} [props.channelMap] - Optional object containing map of channel names * @param {string} [props.className] - Optional top-level class to add * @param {object} [props.consumerMarketing] - Optional ConsumerMarketing props object * @param {Element} [props.ContentWrapper] - Required content wrapper component * @param {object} [props.contributors] - Optional contributors information * @param {string} [props.ctaText] - Optional text to show in product buy buttons * @param {object} [props.hasFullBleedRecircBackground] - Optional whether the recirc background is full bleed * @param {boolean} [props.hasNewsletterWithoutWrapper] - Optional renders newsletterform without a wrapper * @param {boolean} [props.hasTopSpacingFooterRelated] - Optional spacing above content footer related * @param {boolean} [props.showWriterBio] - optional flag to show writer as contributor type for contributorBio * @param {boolean} [props.hideContentFooterAd] - Optional prop to hide content footer ad * @param {boolean} [props.hideContributorBio] - Optional prop to hide contributor bio * @param {boolean} [props.hideRecircList] - Optional prop to hide the recirc list * @param {boolean} [props.isNarrow] - Optional whether the footer is narrow * @param {boolean} [props.isNewsletterFullBleed] - Optional renders fullbleed newsletter block * @param {string} [props.newsletterPalette] - Optional renders black newsletter block * @param {object} [props.licensedPartnerLink] - Optional partner contibutor info * @param {string} [props.magazineDisclaimer] - Optional props for magazine disclaimer * @param {object} [props.newsletter] - Optional props for newsletter * @param {Array} [props.recircListElements] - result list of related content to pass to RecircList * @param {Array} [props.related] - Optional list of related content to pass to RecircList * @param {Array} [props.recircRelated] - Optional list to show bottom recirc unit data * @param {object} [props.relatedVideo] - Optional prop object to show related video * @param {boolean} [props.showContributor] - Optional boolean used show contributor component * @param {boolean} [props.shouldUseRelatedVideoOverInterlude_variation] - Optional boolean used for experiments on injecting interlude player instead of "Featured Video" * @param {boolean} [props.showHotelRecirc] - props to render brand specific hotel recirc unit * @param {boolean} [props.showNewsletter] - Optional prop that determines whether to show the newsletter module * @param {object} [props.signageConfig] - Optional prop object signage config * @param {object} [props.tagCloud] - Optional Object holding tagCloud properties * @param {Array} [props.cnCoupons] -Optional prop object savings united coupons data * @param {boolean} [props.showRecirc] - Optional boolean for additional recirc list * @param {object} [props.sponsoredProps] - Optional object holding sponsored properties. * @param {boolean} [props.hasDynamicDisclaimer] - Optional boolean for TNY's dynamic disclaimer * @param {string} [props.dividerColor] - Optional prop to get divider color for article page from copilot * @param {string} [props.currentPage] - Optional prop provides the current page if not mentioned the will take empty string * @returns {ReactElement}
*/ // eslint-disable-next-line complexity const ContentFooter = ({ channelMap, className, cnCoupons = [], consumerMarketing, ContentWrapper, contributors, contributorSpotlight, isNarrow, isNewsletterFullBleed, isAdRail, licensedPartnerLink, linkList, hasFullBleedRecircBackground, hasNewsletterWithoutWrapper, hasTopSpacingFooterRelated = false, showWriterBio, hideContentFooterAd = false, hideContributorBio, showContributorSpotlight, showContributor = true, hideRecircList, isLinkStackEnabled, magazineDisclaimer, newsletter, newsletterPalette = 'standard', pageBackgroundTheme, related, recircRelated, relatedVideo, shouldUseRelatedVideoOverInterlude_variation = false, showAdBelowNewsletter = false, showNewsletter, signageConfig, tagCloud, shouldEnableVMG = false, showHotelRecirc = false, showRecirc, shouldEnableFullArticleInverted, shouldShowSeriesNavigationInFooter, dividerColor, recircListElements, sponsoredProps, hasDynamicDisclaimer, currentPage = '' }) => { React.useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'ContentFooter' }); }, []); const isClient = useClientStatus(); return (React.createElement(ContentFooterWrapper, { isNarrow: isNarrow, className: className }, !!sponsoredProps && hasDynamicDisclaimer && (React.createElement(ContentWrapper, null, React.createElement(Disclaimer, { sponsorName: sponsoredProps.sponsorName, isSponsored: !!sponsoredProps }))), magazineDisclaimer && magazineDisclaimer.issueDate && (React.createElement(ContentWrapper, null, React.createElement(ContentFooterMagazineDisclaimer, { ...magazineDisclaimer, "data-testid": "ContentFooterMagazineDisclaimer" }))), isLinkStackEnabled && linkList && (React.createElement(Row, null, React.createElement(ContentWrapper, null, React.createElement(LinkStack, { ...linkList, dividerColor: dividerColor })))), !showContributorSpotlight && showContributor && (React.createElement(ShowContributor, { showWriterBio: showWriterBio, hideContributorBio: hideContributorBio, componentWrapper: ContentWrapper, contributors: contributors, dividerColor: dividerColor, tagCloud: tagCloud })), showContributorSpotlight && (React.createElement(ContentFooterContributorSpotlightWrapper, { isAdRail: isAdRail }, React.createElement(ContributorSpotlight, { ...contributorSpotlight }))), shouldUseRelatedVideoOverInterlude_variation && (React.createElement(RelatedVideo, { ...relatedVideo, componentWrapper: ContentWrapper })), licensedPartnerLink && !showContributorSpotlight && (React.createElement(Row, null, React.createElement(ContentWrapper, null, React.createElement(ContentFooterContributorBio, { dangerousBio: licensedPartnerLink.dangerousDek, photo: licensedPartnerLink.photo })))), React.createElement(ContentFooterAdditionalText, { componentWrapper: ContentWrapper }), tagCloud && (React.createElement(Row, null, React.createElement(ContentWrapper, null, React.createElement(ContentFooterTagCloud, { hasBorderTop: false, tags: tagCloud.tags, dividerColor: dividerColor, "data-testid": "ContentFooterTagCloud" })))), showHotelRecirc && recircListElements, showRecirc && recircListElements, React.createElement(ContentFooterBottom, { "data-testid": "ContentFooterBottom" }, newsletter && showNewsletter && (React.createElement(Newsletter, { ContentWrapper: ContentWrapper, hasWrapper: !hasNewsletterWithoutWrapper, isFullBleed: isNewsletterFullBleed, newsletter: newsletter, palette: newsletterPalette, isArticlePage: currentPage === 'article' })), isClient && (React.createElement(FooterNewsletter, { isFullBleed: isNewsletterFullBleed, contentWrapper: ContentWrapper })), React.createElement(NewsletterExtended, { contentWrapper: ContentWrapper }), React.createElement(NewsletterVerticalBottom, { contentWrapper: ContentWrapper }), React.createElement("div", { className: "content-bottom-anchor" }), showAdBelowNewsletter && (React.createElement(Row, null, React.createElement(PaymentGateway, { group: "ads" }, React.createElement(Ad, { position: "mid-content", "data-testid": "AdBelowNewsletter", shouldHoldSpace: true, shouldDisplayLabel: true })))), consumerMarketing && (React.createElement(PaymentGateway, { group: "consumer-marketing" }, React.createElement(ConsumerMarketingUnit, { ...consumerMarketing }))), shouldShowSeriesNavigationInFooter && (React.createElement(ContentFooterSeriesNavigation, { className: "article__series-navigation", pageBackgroundTheme: pageBackgroundTheme, dividerColor: dividerColor })), shouldEnableVMG && React.createElement(ContentFooterVMGRecommends, null), !hideRecircList && (React.createElement(ConnectedErrorBoundary, null, React.createElement(ContentFooterRelated, { categoriesMap: tagCloud?.tags, channelMap: channelMap, related: related, recircRelated: recircRelated, signageConfig: signageConfig, hasFullBleedRecircBackground: hasFullBleedRecircBackground, hasTopSpacingFooterRelated: hasTopSpacingFooterRelated, dividerColor: dividerColor, shouldEnableFullArticleInverted: shouldEnableFullArticleInverted }))), shouldEnableVMG && React.createElement(ContentFooterVMGRecommends, null), !!cnCoupons.length && (React.createElement(CNCoupons, { items: cnCoupons, dividerColor: dividerColor })), !hideContentFooterAd && (React.createElement(Row, null, React.createElement(PaymentGateway, { group: "ads" }, React.createElement(Ad, { position: "footer", shouldHoldSpace: true }))))))); }; ContentFooter.propTypes = { channelMap: PropTypes.object, className: PropTypes.string, cnCoupons: PropTypes.array, consumerMarketing: PropTypes.shape(ConsumerMarketingUnit.propTypes), ContentWrapper: PropTypes.elementType.isRequired, contributors: PropTypes.oneOfType([ PropTypes.shape({ author: PropTypes.shape({ items: PropTypes.arrayOf(PropTypes.shape(Contributors.propTypes.contributors)) }) }), PropTypes.shape({ writer: PropTypes.shape({ items: PropTypes.arrayOf(PropTypes.shape(Contributors.propTypes.contributors)) }) }) ]), contributorSpotlight: PropTypes.object, currentPage: PropTypes.string, dividerColor: PropTypes.string, hasDynamicDisclaimer: PropTypes.bool, hasFullBleedRecircBackground: PropTypes.bool, hasNewsletterWithoutWrapper: PropTypes.bool, hasTopSpacingFooterRelated: PropTypes.bool, hideContentFooterAd: PropTypes.bool, hideContributorBio: PropTypes.bool, hideRecircList: PropTypes.bool, isAdRail: PropTypes.bool, isLinkStackEnabled: PropTypes.bool, isNarrow: PropTypes.bool, isNewsletterFullBleed: PropTypes.bool, licensedPartnerLink: PropTypes.object, linkList: PropTypes.object, magazineDisclaimer: PropTypes.shape({ issueDate: PropTypes.string.isRequired, issueLink: PropTypes.string.isRequired, originalHed: PropTypes.string }), newsletter: PropTypes.shape(ContentFooterNewsletterForm.propTypes), newsletterPalette: PropTypes.string, pageBackgroundTheme: PropTypes.string, recircListElements: PropTypes.array, recircRelated: PropTypes.array, related: PropTypes.array, relatedVideo: PropTypes.shape({ brand: PropTypes.string, related: PropTypes.any, useRelatedVideo: PropTypes.bool, // TO DO: article pages pass in showRelatedVideo and gallery pages // pass in useRelatedVideo. Eventually, these should be consolidated // at the transformer level. showRelatedVideo: PropTypes.bool }), shouldEnableFullArticleInverted: PropTypes.bool, shouldEnableVMG: PropTypes.bool, shouldShowSeriesNavigationInFooter: PropTypes.bool, shouldUseRelatedVideoOverInterlude_variation: PropTypes.bool, showAdBelowNewsletter: PropTypes.bool, showContributor: PropTypes.bool, showContributorSpotlight: PropTypes.bool, showHotelRecirc: PropTypes.bool, showNewsletter: PropTypes.bool, showRecirc: PropTypes.bool, showWriterBio: PropTypes.bool, signageConfig: PropTypes.object, sponsoredProps: PropTypes.object, tagCloud: PropTypes.shape({ tags: PropTypes.arrayOf(PropTypes.shape({ tag: PropTypes.string.isRequired, url: PropTypes.string })) }) }; ContentFooter.displayName = 'ContentFooter'; module.exports = ContentFooter; //# sourceMappingURL=ContentFooter.js.map /***/ }), /***/ 24901: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const { useIntl } = __webpack_require__(46984); const { asConfiguredComponent } = __webpack_require__(12892); const translations = (__webpack_require__(52579)/* ["default"] */ .A); const { ContentFooterRelatedVideo, ContentFooterRelatedVideoHeader, ContentFooterRelatedPlayer, ContentFooterRelatedVideoTitle, ContentFooterRelatedVideoDek } = __webpack_require__(27529); const { inlineEmbedPosition } = __webpack_require__(62327); /** * Related video component for the content footer * * @param {object} props - React props * @param {Element} props.componentWrapper - Required content wrapper component * @param {object} [props.headerText] - Header title * @param {object} [props.related] - related object props * @param {string} [props.related.dek] - Optional related item's dek * @param {string} [props.related.scriptEmbedUrl] - Optional script embed URL * @param {string} [props.related.title] - Optional related item's title * @param {boolean} [props.showRelatedVideo] - Optional whether to hide the component * * @returns {ReactElement} the related video component */ const RelatedVideo = ({ componentWrapper: ContentWrapper, headerText, related = {}, showRelatedVideo = false }) => { const scriptUrl = related && related.scriptEmbedUrl; const { formatMessage } = useIntl(); if (!showRelatedVideo || !scriptUrl) { return null; } return (React.createElement(ContentWrapper, null, React.createElement(ContentFooterRelatedVideo, null, React.createElement(ContentFooterRelatedVideoHeader, { "data-testid": "ContentFooterRelatedVideoHeader" }, headerText || formatMessage(translations.headerText)), React.createElement(ContentFooterRelatedPlayer, { scriptUrl: scriptUrl, videoEmbedPosition: inlineEmbedPosition }), React.createElement(ContentFooterRelatedVideoTitle, null, related.title), React.createElement(ContentFooterRelatedVideoDek, null, related.dek)))); }; RelatedVideo.propTypes = { componentWrapper: PropTypes.elementType.isRequired, headerText: PropTypes.string, related: PropTypes.shape({ dek: PropTypes.string, scriptEmbedUrl: PropTypes.string, title: PropTypes.string }), showRelatedVideo: PropTypes.bool }; RelatedVideo.displayName = 'RelatedVideo'; module.exports = asConfiguredComponent(RelatedVideo, 'RelatedVideo'); //# sourceMappingURL=RelatedVideo.js.map /***/ }), /***/ 18805: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const Row = __webpack_require__(66657); const Contributors = __webpack_require__(1802); /** * The ShowContributor Component * * @param {Element} props.componentWrapper - Required content wrapper component * @param {object} [props.contributors] - Optional contributors information * @param {boolean} [props.hideContributorBio] - Optional prop to hide contributor bio * @param {boolean} [props.showWriterBio] - optional flag to show writer bio in Content footer * @param {object} [props.tagCloud] - Optional Object holding tagCloud properties * @param {string} [props.dividerColor] - Optional prop to get divider color for article page from copilot * * @returns {ReactElement} */ const ShowContributor = ({ componentWrapper: ContentWrapper, contributors, tagCloud, showWriterBio, dividerColor, hideContributorBio }) => { const contributorType = showWriterBio ? 'writer' : 'author'; const showContributorBio = !hideContributorBio && contributors?.[contributorType]?.items; if (!showContributorBio) { return null; } return (React.createElement(Row, null, React.createElement(ContentWrapper, null, React.createElement(Contributors, { ...(tagCloud && { shouldHideBottomLine: true }), contributors: contributors[contributorType].items, dividerColor: dividerColor })))); }; ShowContributor.propTypes = { componentWrapper: PropTypes.elementType.isRequired, contributors: PropTypes.oneOfType([ PropTypes.shape({ author: PropTypes.shape({ items: PropTypes.arrayOf(PropTypes.shape(Contributors.propTypes.contributors)) }) }), PropTypes.shape({ writer: PropTypes.shape({ items: PropTypes.arrayOf(PropTypes.shape(Contributors.propTypes.contributors)) }) }) ]), dividerColor: PropTypes.string, hideContributorBio: PropTypes.bool, showWriterBio: PropTypes.bool, tagCloud: PropTypes.shape({ tags: PropTypes.arrayOf(PropTypes.shape({ tag: PropTypes.string.isRequired, url: PropTypes.string })) }) }; module.exports = ShowContributor; //# sourceMappingURL=ShowContributor.js.map /***/ }), /***/ 61127: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { asConfiguredComponent } = __webpack_require__(12892); const ContentFooter = __webpack_require__(63545); module.exports = asConfiguredComponent(ContentFooter, 'ContentFooter'); //# sourceMappingURL=index.js.map /***/ }), /***/ 52579: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); const react_intl_1 = __webpack_require__(46984); exports.A = (0, react_intl_1.defineMessages)({ headerText: { id: 'RelatedVideo.HeaderText', defaultMessage: 'Featured Video', description: 'Title preceding related video embed', isConfigurable: true } }); //# sourceMappingURL=translations.js.map /***/ }), /***/ 84899: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const React = __webpack_require__(96540); const { useIntl } = __webpack_require__(46984); const PropTypes = __webpack_require__(5556); const getElDimensions = __webpack_require__(94409); const ReviewRatingData = __webpack_require__(94149); const ResponsiveAsset = __webpack_require__(73275); const Rating = __webpack_require__(21093); const SocialIcons = __webpack_require__(35676); const NativeShareButton = __webpack_require__(77554); const translations = (__webpack_require__(33193)/* ["default"] */ .A); const LiveEventSponsorBlock = __webpack_require__(10705); const SummaryPremiere = __webpack_require__(96591); const { ContentHeaderByline, ContentHeaderAccreditationSocialIcons, ContentHeaderContributorImage, ContentHeaderNativeShareButton, ContentHeaderBylineContent, ContentHeaderDekRewards, ContentHeaderAccreditation, ContentHeaderDek, ContentHeaderSignageLabel, SummaryPremiereWrapper } = __webpack_require__(80607); const getVenueAwards = ({ venueAwards }) => (React.createElement(React.Fragment, null, venueAwards && (React.createElement(ContentHeaderDekRewards, { dangerouslySetInnerHTML: { __html: venueAwards } })))); getVenueAwards.propTypes = { venueAwards: PropTypes.string }; /** * The accreditation component of the content header * * @param {ReactElement} props.bylinesBlock - the rendered byline component * @param {object} [props.contributorImage] - Optional contributor image object. * @param {string} [props.dangerousDek] - Optional Article Dek. * @param {string} props.dividerType - If `hasDesktopTitleBlockDivider` is set to true, the type of dividers to display. * @param {boolean} [props.variations.shouldRemoveBylineTopMargin] - To add/remove the ContentHeaderByline margin top * @param {boolean} props.hasContributorImageBackground - If it has a * @param {boolean} props.hasDesktopTitleBlockDivider - Show or hide title block divider on Desktop breakpoint * @param {boolean} props.hasLede - Whether or not the header has a lede * @param {boolean} [props.hasStickySocialIcons] - Optional has sticky social icons on desktop, defaults to true. * @param {boolean} [props.hideByLine] - Optional, flag to hide entire ByLine Block * @param {boolean} [props.hideDangerousDek] - Optional hide dek. default value is false * @param {boolean} [props.hideTopRating] - Optional parameter to add a class that hides top rating. * @param {boolean} [props.hideSocialIcons] - Optional hide social icons on desktop. * @param {boolean} [props.hideSocialIconsOnMobile] - Optional hide social icons on mobile. * @param {boolean} [props.isLiveStoryType] - Optional Flag to mark Live Story * @param {boolean} props.isMiddleImage - Is the asset position middle? * @param {boolean} props.isSponsoredContent - Is this sponsored content? * @param {object} [props.metadataVideo] - Optional CNE video metadata * @param {ReactElement} props.publishDateBlock - the rendered publish date component * @param {string} props.publishDatePosition - The position of the publish date * @param {object} [props.rating] - Optional rating. * @param {string} [props.signage] - Optional article signage * @param {bool} [props.shouldDisplaySignageInline] - Optional boolean to display signage, defaults to false * @param {bool} [props.shouldDisplayPremiereDate] - Optional, used to display premiere date * @param {boolean} props.shouldShowAuthorsInTitleBlock - Should this show authors in the title block? * @param {boolean} [props.showContributorImage] - Optional show the contributor image. * @param {boolean} [props.showSponsorBlock] - Optional to show sponsorContents * @param {object} [props.sponsoredContentHeaderProps] - Optional sponsored text and logo details * @param {Array} [props.socialIconsToHide] - list of social icons * @param {object} [props.socialMedia] - Optional Social Icon Links to share article. * @param {string} [props.sponsorByline] - Optional sponsored byline text * @param {string} [props.theme] - Optional theme name * * @returns {ReactElement}
*/ const Accreditation = ({ bylinesBlock, contributorImage, dangerousDek, dividerType, shouldRemoveBylineTopMargin, hasContributorImageBackground, hasDesktopTitleBlockDivider, hasLede, hasStickySocialIcons, hideSocialIconsOnMobile, hideTopRating, isBusinessContentHeader, isMiddleImage, isSponsoredContent, signage, sponsorByline, sponsoredContentHeaderProps, publishDateBlock, publishDatePosition, rating, reviewRating, shouldShowAuthorsInTitleBlock, showContributorImage, socialMedia, socialTitle, socialDescription, pageUrl, shouldDisplaySignageInline, showNativeShareButton, venueAwards, hideByLine = false, hideDangerousDek = false, hideSocialIcons = false, isLiveStoryType = false, metadataVideo = {}, shouldDisplayPremiereDate = false, showSponsorBlock = false, socialIconsToHide = [], theme = 'standard' }) => { const { rating: averageRatingCount, count: totalRatingCount } = rating || {}; const VenueAwardComponent = getVenueAwards({ venueAwards }); const shouldShowByLine = () => !shouldShowAuthorsInTitleBlock && !isSponsoredContent && !hideByLine; const visibilityInfo = { showDek: !hideDangerousDek && dangerousDek && !isMiddleImage, showVenueAwards: venueAwards, showByline: shouldShowByLine(), showNativeShareButton, socialMedia }; const { isLive, premiereGap, premiereDate } = metadataVideo; const getPremiereLevel = () => { return (shouldDisplayPremiereDate && premiereDate && !isLive && (React.createElement(SummaryPremiereWrapper, null, React.createElement(SummaryPremiere, { premiereDate: premiereDate, premiereGap: premiereGap, containerTheme: theme, hideTimeStampIcon: true })))); }; const getSignageLabel = () => { return (shouldDisplaySignageInline && signage && (React.createElement(ContentHeaderSignageLabel, null, signage))); }; const getAccreditationSocialIcons = () => socialMedia && !hideSocialIcons && (React.createElement(ContentHeaderAccreditationSocialIcons, { ...socialMedia, className: "content-header__social-share", hideSocialIconsOnMobile: hideSocialIconsOnMobile, hasStickySocialIcons: hasStickySocialIcons, socialIconsToHide: socialIconsToHide })); const { formatMessage } = useIntl(); const getLiveEventSponsorBlock = () => { return (React.createElement(LiveEventSponsorBlock, { sponsorByline: sponsorByline, sponsoredContentHeaderProps: { ...sponsoredContentHeaderProps }, theme: theme })); }; return (React.createElement(ContentHeaderAccreditation, { className: "content-header__accreditation", shouldShowAuthorsInTitleBlock: shouldShowAuthorsInTitleBlock, isBusinessContentHeader: isBusinessContentHeader, hasLede: hasLede, rowWithBottomBorder: hasDesktopTitleBlockDivider && (dividerType === 'both' || dividerType === 'bottom'), visibilityInfo: visibilityInfo, "data-testid": "ContentHeaderAccreditation" }, visibilityInfo.showDek && (React.createElement(ContentHeaderDek, { dangerouslySetInnerHTML: { __html: dangerousDek }, as: "div" })), getSignageLabel(), getPremiereLevel(), isLiveStoryType && showSponsorBlock && getLiveEventSponsorBlock(), VenueAwardComponent, reviewRating && !hideTopRating && (React.createElement(ReviewRatingData, { rating: reviewRating })), visibilityInfo.showByline && (React.createElement(ContentHeaderByline, { isLiveStoryType: isLiveStoryType, sponsorName: sponsoredContentHeaderProps?.sponsorName, showSponsorBlock: showSponsorBlock, shouldRemoveBylineTopMargin: shouldRemoveBylineTopMargin }, showContributorImage && contributorImage && (React.createElement(ContentHeaderContributorImage, { ...contributorImage, sizes: isBusinessContentHeader ? '100%' : '66px', hasContributorImageBackground: hasContributorImageBackground, isBusinessContentHeader: isBusinessContentHeader })), React.createElement(ContentHeaderBylineContent, null, bylinesBlock, publishDatePosition === 'bottom' && publishDateBlock))), showNativeShareButton ? (React.createElement(ContentHeaderNativeShareButton, null, React.createElement(NativeShareButton, { shareData: { url: pageUrl, title: socialTitle, text: socialDescription } }))) : (getAccreditationSocialIcons()), !!averageRatingCount && !!totalRatingCount && (React.createElement(Rating, { averageRatingCount: Math.round(averageRatingCount * 10) / 10, hasBorderTop: true, link: { label: formatMessage(translations.readReviews), onClick: (e) => { e.preventDefault(); const el = document.getElementById('reviews'); const { top } = getElDimensions(el); // Nav height - 56 window.scrollTo(0, top - 56); }, url: '#reviews' }, totalRatingCount: totalRatingCount })))); }; Accreditation.propTypes = { bylinesBlock: PropTypes.node, contributorImage: PropTypes.shape(ResponsiveAsset.propTypes), dangerousDek: PropTypes.string, dividerType: PropTypes.string, hasContributorImageBackground: PropTypes.bool, hasDesktopTitleBlockDivider: PropTypes.bool, hasLede: PropTypes.bool, hasStickySocialIcons: PropTypes.bool, hideByLine: PropTypes.bool, hideDangerousDek: PropTypes.bool, hideSocialIcons: PropTypes.bool, hideSocialIconsOnMobile: PropTypes.bool, hideTopRating: PropTypes.bool, isBusinessContentHeader: PropTypes.bool, isLiveStoryType: PropTypes.bool, isMiddleImage: PropTypes.bool, isSponsoredContent: PropTypes.bool, metadataVideo: PropTypes.shape({ isLive: PropTypes.bool, premiereDate: PropTypes.string, premiereGap: PropTypes.number, series: PropTypes.string, videoLength: PropTypes.number }), pageUrl: PropTypes.string, publishDateBlock: PropTypes.node, publishDatePosition: PropTypes.string, rating: PropTypes.shape(Rating.propTypes), reviewRating: PropTypes.number, shouldDisplayPremiereDate: PropTypes.bool, shouldDisplaySignageInline: PropTypes.bool, shouldRemoveBylineTopMargin: PropTypes.bool, shouldShowAuthorsInTitleBlock: PropTypes.bool, showContributorImage: PropTypes.bool, showNativeShareButton: PropTypes.bool, showSponsorBlock: PropTypes.bool, signage: PropTypes.string, socialDescription: PropTypes.string, socialIconsToHide: PropTypes.array, socialMedia: PropTypes.shape(SocialIcons.propTypes), socialTitle: PropTypes.string, sponsorByline: PropTypes.string, sponsoredContentHeaderProps: PropTypes.shape({ campaignUrl: PropTypes.string, sponsorLogo: PropTypes.shape(ResponsiveAsset.propTypes), sponsorName: PropTypes.string }), theme: PropTypes.oneOf(['standard', 'inverted', 'special']), venueAwards: PropTypes.string }; module.exports = Accreditation; //# sourceMappingURL=Accreditation.js.map /***/ }), /***/ 80607: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled, css } = __webpack_require__(92168); const { calculateSpacing, getColorToken, removeTextDecoration, getLinkStyles, getTypographyStyles, maxScreen } = __webpack_require__(26865); const { BaseText } = __webpack_require__(76955); const { roundImageBase } = __webpack_require__(52027); const { BREAKPOINTS, INTERACTIVE } = __webpack_require__(96472); const SocialIcons = __webpack_require__(35676); const { SocialIconsList } = __webpack_require__(51000); const ResponsiveAsset = __webpack_require__(73275); const { SpanWrapper } = __webpack_require__(18117); const { SummaryItemAssetPremier, AssetPremierLabel } = __webpack_require__(75761); const { BylineWrapper } = __webpack_require__(74423); const { defaultGridStyle, defaultColorPaddingStyle, rowWithCommonStyle } = __webpack_require__(60254); const cssToHideSocialIcons = (socialIconsToHide) => socialIconsToHide .map((socialShareKey) => ` .social-icons__list-item--${socialShareKey} { display: none; } `) .join('\n'); const ContentHeaderByline = styled.div.withConfig({ displayName: 'ContentHeaderByline' }) ` margin-top: ${calculateSpacing(4)}; ${({ isLiveStoryType, sponsorName, showSponsorBlock }) => isLiveStoryType && sponsorName && showSponsorBlock && `margin-top: unset;`} ${SpanWrapper} { display: inline-block; width: ${calculateSpacing(8.25)}; height: ${calculateSpacing(8.25)}; } ${({ shouldRemoveBylineTopMargin }) => shouldRemoveBylineTopMargin && css ` margin-top: 0; ${BylineWrapper} { margin-top: ${calculateSpacing(0.5)}; &:first-child { margin-top: 0; } } `} `; const ContentHeaderAccreditationSocialIcons = styled(SocialIcons.Standard).withConfig({ displayName: 'ContentHeaderAccreditationSocialIcons' }) ` margin: 0 auto; margin-top: ${calculateSpacing(3)}; width: 100%; ${SocialIconsList} { justify-content: center; } /* Hide sosial share icons on mobile */ ${({ hideSocialIconsOnMobile }) => hideSocialIconsOnMobile && ` @media (min-width: 0) and (max-width: ${BREAKPOINTS.lg}) { display: none; } `} /* Hide social share icons on desktop */ ${({ hasStickySocialIcons }) => hasStickySocialIcons && ` @media (min-width: ${BREAKPOINTS.lg}) { display: none; } `} /* Hide specific social icons mentioned in props - social-icons */ ${({ hideSocialIconsOnMobile, socialIconsToHide }) => !hideSocialIconsOnMobile && ` ${maxScreen(BREAKPOINTS.lg)} { ${cssToHideSocialIcons(socialIconsToHide)} } `} `; // 1. create a round image with a min and max width and height // 2. min and max values for scaling avatar images const ContentHeaderContributorImage = styled(ResponsiveAsset).withConfig({ displayName: 'ContentHeaderContributorImage' }) ` ${roundImageBase('100%', '60px', '66px')}; /* 1, 2 */ margin-right: auto; margin-left: auto; img { width: 100%; } ${({ hasContributorImageBackground }) => hasContributorImageBackground && ` display: inline-block; margin: 0 auto; border-radius: 50%; background-color: #f5f5f5; overflow: hidden; `} ${({ isBusinessContentHeader }) => isBusinessContentHeader && ` ${roundImageBase('100%', '173px', '173px')}; /* 1, 2 */ margin-right: auto; margin-left: auto; img { width: 100%; } @media (min-width: ${BREAKPOINTS.sm}) { ${roundImageBase('100%', '153px', '153px')}; /* 1, 2 */ } @media (min-width: ${BREAKPOINTS.md}) { ${roundImageBase('100%', '172px', '172px')}; /* 1, 2 */ } @media (min-width: ${BREAKPOINTS.lg}) { ${roundImageBase('100%', '206px', '206px')}; /* 1, 2 */ } @media (min-width: ${BREAKPOINTS.xl}) { ${roundImageBase('100%', '262px', '262px')}; /* 1, 2 */ } @media (min-width: ${BREAKPOINTS.xxl}) { ${roundImageBase('100%', '340px', '340px')}; /* 1, 2 */ } `} `; const ContentHeaderNativeShareButton = styled.div.withConfig({ displayName: 'ContentHeaderNativeShareButton' }) ` && { display: flex; grid-column: 1/-1; justify-content: center; margin-top: ${calculateSpacing(3)}; } ${defaultGridStyle} ${defaultColorPaddingStyle} `; const ContentHeaderBylineContent = styled.div.withConfig({ displayName: 'ContentHeaderBylineContent' }) ``; const ContentHeaderDekRewards = styled(BaseText).withConfig({ displayName: 'ContentHeaderDekRewards' }) ` > img { margin-right: ${calculateSpacing(0.8)}; margin-left: ${calculateSpacing(2)}; &:first-of-type { margin-left: 0; } } margin-top: ${calculateSpacing(3)}; `; ContentHeaderDekRewards.defaultProps = { as: 'div', colorToken: 'colors.consumption.lead.standard.heading', typeIdentity: 'typography.definitions.globalEditorial.context-primary' }; const ContentHeaderDek = styled.p.withConfig({ displayName: 'ContentHeaderDek' }) ` @media (min-width: ${BREAKPOINTS.lg}) { && { grid-column: 3 / span 8; } } ${({ theme }) => getLinkStyles(theme, 'colors.consumption.lead.standard.description', null)}; /* overwrite text decoration link styles see token: layouts_to_refactor.interactive.links */ ${removeTextDecoration()} margin-top: ${calculateSpacing(3)}; cursor: unset; text-align: center; .small { text-transform: lowercase; font-style: inherit; font-variant: small-caps; } a { ${({ theme }) => getLinkStyles(theme, 'colors.consumption.lead.standard.link', 'colors.consumption.lead.standard.link-hover')}; transition: color ${INTERACTIVE.timingLinkDefault} ease; } ${getTypographyStyles('typography.definitions.consumptionEditorial.description-core')}; ${({ assetPosition, mediaWidth }) => assetPosition === 'middle' && ` margin-top: ${calculateSpacing(3)}; @media (min-width: ${BREAKPOINTS.md}) { margin-top: ${calculateSpacing(5)}; } && { @media (min-width: ${BREAKPOINTS.lg}) { grid-column: 1 / 9; } } ${mediaWidth === 'grid' && ` && { @media (min-width: ${BREAKPOINTS.lg}) { grid-column: 1 / -1; } } `}; `}; `; const ContentHeaderSignageLabel = styled(BaseText).withConfig({ displayName: 'ContentHeaderSignageLabel' }) ` padding-top: ${calculateSpacing(1)}; ${getTypographyStyles('typography.definitions.discovery.description-core')}; `; const getAccreditationFirstChildStyle = (visibilityInfo) => { if (visibilityInfo.showDek) { return ` ${ContentHeaderDek} { margin-top: 0; } `; } else if (visibilityInfo.showVenueAwards) { return ` ${ContentHeaderDekRewards} { margin-top: 0; } `; } else if (visibilityInfo.showByline) { return ` ${ContentHeaderByline} { margin-top: 0; } `; } else if (visibilityInfo.showNativeShareButton) { return ` ${ContentHeaderNativeShareButton} { margin-top: 0; } `; } else if (visibilityInfo.socialMedia) { return ` ${ContentHeaderAccreditationSocialIcons} { margin-top: 0; } `; } return ''; }; const ContentHeaderAccreditation = styled.div.withConfig({ displayName: 'ContentHeaderAccreditation' }) ` ${({ rowWithBottomBorder, theme }) => rowWithBottomBorder && ` &::after { display: block; grid-column: 1/-1; border: 0; border-bottom: 1px solid ${getColorToken(theme, 'colors.consumption.body.standard.divider')}; padding-top: ${calculateSpacing(2)}; width: 100%; height: 0; content: ''; } ${rowWithCommonStyle} `} ${defaultGridStyle} && { ${defaultColorPaddingStyle} } > * { grid-column: 1/-1; } ${({ visibilityInfo }) => getAccreditationFirstChildStyle(visibilityInfo)} padding-bottom: ${calculateSpacing(6)}; ${({ isBusinessContentHeader }) => isBusinessContentHeader && ` @media (min-width: ${BREAKPOINTS.md}) { grid-column: 9 / span 12; grid-template-columns: repeat(12,1fr); width:min-content; align-items: center; } `} `; const SummaryPremiereWrapper = styled.div.withConfig({ displayName: 'SummaryPremiereWrapper' }) ` max-width: 1600px; ${SummaryItemAssetPremier} { display: flex; border: 0; } ${AssetPremierLabel} { padding: ${calculateSpacing(3)} 0 0 0; ${({ theme }) => { return `${getTypographyStyles(theme, 'typography.definitions.globalEditorial.context-tertiary')}; `; }} } `; module.exports = { ContentHeaderByline, ContentHeaderAccreditationSocialIcons, ContentHeaderContributorImage, ContentHeaderNativeShareButton, ContentHeaderBylineContent, ContentHeaderDekRewards, ContentHeaderAccreditation, ContentHeaderDek, ContentHeaderSignageLabel, SummaryPremiereWrapper }; //# sourceMappingURL=Accreditation.styles.js.map /***/ }), /***/ 95865: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const { CategoriesWrapper, CategoriesTitle, CategoriesItemList, CategoriesItem, CategoriesLink } = __webpack_require__(18157); /** * A component containing the title, rubric and items count (where relevant) * * @param {object} props - React props * @param {string} props.title - Title for categories links * @param {object[]} props.tags - Array of tags to display * * @returns {ReactElement}
*/ const Categories = ({ title, tags = [] }) => { return (React.createElement(CategoriesWrapper, null, React.createElement(CategoriesTitle, null, title), React.createElement(CategoriesItemList, null, tags.map((tag) => (React.createElement(CategoriesItem, { key: tag.name }, React.createElement(CategoriesLink, { href: tag.slug }, tag.name))))))); }; Categories.propTypes = { tags: PropTypes.array, title: PropTypes.string }; Categories.displayName = 'Categories'; module.exports = Categories; //# sourceMappingURL=Categories.js.map /***/ }), /***/ 18157: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled } = __webpack_require__(92168); const { BaseText, BaseLink } = __webpack_require__(76955); const { calculateSpacing, getColorToken, getLinkStyles } = __webpack_require__(26865); const CategoriesWrapper = styled.div.withConfig({ displayName: 'CategoriesWrapper' }) ` display: flex; flex-wrap: wrap; align-items: baseline; margin-top: ${calculateSpacing(0.5)}; `; const CategoriesTitle = styled(BaseText).withConfig({ displayName: 'CategoriesTitle' }) ` margin-right: ${calculateSpacing(1)}; `; CategoriesTitle.defaultProps = { as: 'div', colorToken: 'colors.consumption.lead.standard.accreditation', typeIdentity: 'typography.definitions.globalEditorial.accreditation-feature' }; const CategoriesItemList = styled.ul.withConfig({ displayName: 'CategoriesItemList' }) ` margin: 0; padding: 0; line-height: 1; `; const CategoriesItem = styled.li.withConfig({ displayName: 'CategoriesItem' }) ` display: inline-block; &:not(:last-child) { &::after { margin: 0 ${calculateSpacing(1)}; color: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.standard.divider')}; content: '|'; } } `; const CategoriesLink = styled(BaseLink).withConfig({ displayName: 'CategoriesLink' }) ` ${({ theme }) => getLinkStyles(theme, 'colors.consumption.lead.standard.link', null, 'global')}; `; CategoriesLink.defaultProps = { typeToken: 'typography.definitions.globalEditorial.accreditation-core' }; module.exports = { CategoriesWrapper, CategoriesTitle, CategoriesItemList, CategoriesItem, CategoriesLink }; //# sourceMappingURL=Categories.styles.js.map /***/ }), /***/ 18601: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const classnames = __webpack_require__(32485); const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const PersistentAside = __webpack_require__(40855); const { withLightbox } = __webpack_require__(83726); const ItemsCount = __webpack_require__(78372); const SocialIcons = __webpack_require__(35676); const Rubric = __webpack_require__(34187); const Bylines = __webpack_require__(52540); const GalleryEmbed = __webpack_require__(47811); const CNEVideoEmbed = __webpack_require__(59098); const Rating = __webpack_require__(21093); const ResponsiveAsset = __webpack_require__(73275); const TitleBlock = __webpack_require__(19977); const LeadAsset = __webpack_require__(92027); const Accreditation = __webpack_require__(84899); const { useNativeShare } = __webpack_require__(90072); const { getThemedBylineVariation } = __webpack_require__(27053); const { ContentHeaderSocialIcons } = __webpack_require__(50130); const { ContentHeaderWrapper, ContentHeaderOffersData, ContentHeaderLeadOverride, ContentHeaderAccreditationBottom, ContentHeaderContainer, ContentHeaderPublishDate, ContentHeaderLeadAssetWrapper, ContentHeaderBylines, ContentHeaderPersistentAside, PodcastContentHeaderDivider, ContentHeaderHedAccreditationWrapper } = __webpack_require__(88317); const { ContentHeaderDek } = __webpack_require__(80607); const { getOverrideBehaviour } = __webpack_require__(68089); const { storyVideoPosition } = __webpack_require__(62327); const { TrackComponentChannel } = __webpack_require__(78788); const FULL_WIDTH_SELECTOR = '.container--full, .full-bleed-ad, .callout--feature-large'; const hasSingleAuthor = (contributors) => contributors && Object.keys(contributors).length === 1 && contributors.author && contributors.author.items.length === 1; /** * ContentHeader component * * @param {object} props - React Props * @param {Array} [props.additionalPhotos] - Optional array for additional images wanted in the lightbox * @param {string} [props.authorsTitleBlockPosition] - Optional authors position relative to title in titleblock. * @param {Array} [props.awards] - Optional product awards * @param {Array} [props.business] - Optional product business details * @param {string} [props.bylineVariation] - Optional variation of byline. * @param {object} [props.cneVideoEmbedProps] - CNEVideoEmbed Properties * @param {object} [props.cneVideoEmbedProps.additionalEmbedParams] - Optional * @param {string} [props.cneVideoEmbedProps.dangerousCaption] - Optional video caption. * @param {bool} [props.cneVideoEmbedProps.isStickyType] - Optional. * @param {bool} [props.cneVideoEmbedProps.scriptUrl] - Optional, for video url * @param {bool} [props.cneVideoEmbedProps.shouldAutoplay] - Optional, for video auto play * @param {bool} [props.cneVideoEmbedProps.shouldHaveTeaser] - Optional * @param {bool} [props.cneVideoEmbedProps.shouldMute] - Optional * @param {object} [props.cneVideoEmbedProps.variationsVideo] - Optional * @param {object} [props.cneVideoEmbedProps.variationVideoName] - Optional * @param {string} [props.captionStyle] - Optional the caption style to be used by the content header * @param {string} [props.captionWidth] - Optional control whether to make caption container full bleed in order to handle inverted textAboveCenter content header * @param {string} [props.className] - Optional top-level class to add. * @param {object} [props.config] - Verso settigns configs. * @param {object} [props.contentHeaderCategories] - Optional object for content header categories * @param {string} [props.contentHeaderCategories.title] - Optional * @param {Array} [props.contentHeaderCategories.tags] - Optional * @param {Array} [props.contentSponsorNames] - Optional * @param {object} [props.contributorImage] - Optional contributor image object. * @param {object} [props.contributors] - Optional object containing data to create authors byline. * @param {object} [props.contributors.author] - Optional object containing data to create authors byline. * @param {object} [props.contributors.illustrator] - Optional object containing data to create illustrators byline. * @param {object} [props.contributors.photographers] - Optional object containing data to create photographers byline. * @param {string} [props.ctaText] - Optional text to show in product buy buttons * @param {string} [props.dangerousDek] - Optional Article Dek. * @param {string} [props.dangerousHed] - Optional Article Hed. * @param {string} props.dividerType - If `hasDesktopTitleBlockDivider` is set to true, the type of dividers to display. * @param {boolean} [props.showFullHeaderViewInMobile] - Feature flag for enabling ACDC space changes * @param {boolean} props.hasDesktopTitleBlockDivider - Show or hide title block divider on Desktop breakpoint * @param {boolean} [props.hasDisabledCloseOnClickForLightbox] - Flag to disable closing the modal when clicked outside the images * @param {boolean} props.hasLightbox - Whether the lightbox is enabled for the current article * @param {bool} [props.hasNarrowHeader] - Prop to align hed, dek with that of article content. * @param {boolean} props.hasSlideshow - option prop to have lightbox enable slideshow * @param {boolean} props.hasLedeLightboxButton - option prop to add render a option lightbox button in lede * @param {boolean} props.hasStaticPositionedAward - Statically positions Awards for Review content types, this is set as a setting in the tenant config * @param {boolean} props.hasContributorImageBackground - Optional * @param {bool} [props.hasNativeShareButton] - Optional * @param {boolean} [props.hasStickyBoxIndexPosition] - Feature flag to enable index position of Stickybox * @param {boolean} [props.hasStickySocialIcons] - Optional has sticky social icons on desktop, defaults to true. * @param {boolean} props.hideAdaptationByline - Optional parameter to hide adaptation by author's by line. * @param {boolean} [props.hideByLine] - Optional, flag to hide entire ByLine Block * @param {boolean} [props.hideContributors] - Optional hide contributors * @param {boolean} [props.hideDangerousDek] - Optional hide dek, default false * @param {boolean} props.hideIssueDate - Show or hide the issue date * @param {boolean} props.hideIssueDatePipeSeparator - Show or hide the date pipe separator * @param {boolean} props.hideLede - Show or hide the lede * @param {boolean} [props.hideLedeCaption] - hide lede image caption * @param {boolean} [props.hideSocialIcons] - Optional hide social icons on desktop. * @param {boolean} [props.hideSocialIconsOnMobile] - Optional hide social icons on mobile. * @param {boolean} [props.hideRubric] - Optional hide rubric in title block. * @param {boolean} [props.hideTopDisclaimerOnMobile] - Optional hide top dislclaimer on mobile. * @param {boolean} [props.hidePublishDate] - Show or hide the publishDate * @param {boolean} [props.hideTopRating] - Optional paramter to add a class that hides top rating. * @param {string} [props.interactiveOverride] - Optional interactive element to override the lede image asset * @param {boolean} [props.isBusinessContentHeader] - Optional flag for business content header variation * @param {boolean} [props.isFullBleedVideo] - By default hide Full bleed video * @param {boolean} [props.isLiveStoryType] - Optional Flag to mark Live Story * @param {boolean} [props.isImagePositionBottomInSmallScreen] - To make image at bottom position for small screens * @param {boolean} [props.isStoryLive] - Optional Flag to mark live story is live * @param {string} [props.issueDate] - Optional issue date * @param {string} [props.issueLink] - Optional link for this article's issue * @param {object} [props.itemsCount] - Optional, number of items announced. * @param {object} [props.lede] - Optional lede image asset * @param {string} [props.ledeSocialIcons] - Optional array of social icons for the top image * @param {string} [props.modifiedDate] - Optional modified date of the content * @param {object} [props.metadataVideo] - Optional CNE video metadata * @param {string} [props.offers] - Optional params from ReviewMetadata * @param {string} [props.persistentAsideAlign] - Optional defines the persistentAside align * @param {string} [props.price] - Optional pricing * @param {string} props.publishDate - Publish Date. * @param {object} [props.rating] - Optional rating. * @param {object} [props.reviewRating] - Optional params from ReviewMetadata * @param {object} [props.rubric] - Optional rubric. * @param {string} [props.rubricVariation] - The name of the variation of Rubric to use * @param {bool} [props.shouldAlignCenterWhenNoCaption] - should apply align center in mobile if caption is not present * @param {bool} [props.shouldDisplayPremiereDate] - Optional, used to display premiere date * @param {bool} [props.shouldEnableNativeShareOnDesktop] - Optional * @param {boolean} [props.shouldShortenHeadline] - Optional shorten headline. Actual only for left aligned headline. * @param {boolean} props.showBreadCrumb - Optional show the bread crumd. * @param {boolean} [props.showContentDivider] - Optional * @param {boolean} [props.showContributorImage] - Optional show the contributor image. * @param {boolean} [props.showContributorImageOnMobile] - Optional show/hide the contributor image only on mobile. * @param {boolean} [props.showFullWidthLeadImage] - Optional * @param {boolean} [props.showSponsorBlock] - Optional to show sponsorContents * @param {boolean} [props.showHeaderButton] - Optional * @param {boolean} props.showIssueCopyByDate - Optional show the text "Issue" by the issue date. * @param {string} [props.slideShowVariation] - Optional string used to set variation of slideshow * @param {object} [props.socialDescription] - Optional social description to be used with the native share button. * @param {Array} [props.socialIconsToHide] - list of social icons * @param {object} [props.socialMedia] - Optional Social Icon Links to share article. * @param {object} [props.socialTitle] - Optional social title to be used with the native share button. * @param {object} [props.stickySocialAnchorBottom] - Optional Sticky Social Icon bottom anchor selectors. * @param {object} [props.stickySocialAnchorTop] - Optional Sticky Social Icon top anchor selectors. * @param {string} [props.theme] - Optional theme name * @param {object} [props.variations] - Variation properties used in rendering the component. * @param {string} [props.variations.assetPosition] - Optional * @param {string} [props.variations.contentAlign] - Optional * @param {string} [props.variations.contentPosition] - Optional * @param {string} [props.variations.contentStyle] - Optional * @param {string} [props.variations.copyWidth] - Optional * @param {boolean} props.variations.hasDivider - Flag to show ContentHeader Divider * @param {boolean} [props.variations.hasAccreditationExtraSpacing] - To add/remove the ContentHeaderAccreditation extra margin top * @param {boolean} [props.variations.hasAccreditationSocialBottomMargin] - To add/remove ContentHeaderAccreditation margin bottom * @param {boolean} [props.variations.hasAccreditationSocialTopMargin] - Tp add/remove * @param {boolean} [props.variations.shouldRemoveBylineTopMargin] - To add/remove the ContentHeaderByline margin top ContentHeaderAccreditationSocialIcons top margin * @param {boolean} [props.variations.hasDekBottomMargin] - To add/remove ContentHeaderDek bottom margin * @param {boolean} [props.variations.hasExtraSpaceBetweenSeparator] - Optional * @param {boolean} [props.variations.hasInlinePublishDate] - Optional * @param {boolean} [props.variations.hasLedeLightbox] - Optional * @param {boolean} [props.variations.hasNoRowPadding] - Optional * @param {boolean} [props.variations.hasPublishDateBottomPadding] - to show extra bottom spacing to publish date * @param {boolean} [props.variations.hasTitleWrapperTopSpacing] - to reduce the top margin for the Content Header title * @param {boolean} [props.variations.hasXsNavSpacing] - Optional * @param {boolean} [props.variations.hideAccreditationBottomSpacing] - Flag to switch bottom padding for ContentHeaderAccreditation * @param {boolean} [props.variations.leadRailAnchor] - Optional * @param {string} [props.variations.ledeAlign] - Optional * @param {string} [props.variations.mediaWidth] - Optional * @param {string} [props.variations.publishDatePosition] - Optional * @param {boolean} [props.variations.hasReducedTitleTopMargin] - Remove title margin * @param {boolean} [props.variations.shouldRemoveContentHedWrapperTopSpacing] - Removed Wrapper top padding * @param {boolean} [props.variations.shouldReduceAccreditationPadding] - Reduce Top padding for ContentHeaderAccreditation * @param {bool} [props.variations.reducedSpacings] - Optional * @param {string} [props.venueAwards] - Optional string of awards * @param {bool} [props.hasInvertedCaption] - Optional * @param {object} [props.sponsoredContentHeaderProps] - Optional sponsored text and logo details * @param {string} [props.sponsorByline] - Optional sponsored byline text * @param {bool} [props.hasInvertedLedeBackground] - Optional * @param {bool} [props.showTextOverlayDek] - Optional * @param {object} props.externalLinks - Optional Listen podcast link * @param {string} props.podcastPagePrimaryCta - Primary Link to listen Podcast * @param {string} props.podcastPagePrimaryCtaLabel - Optional label for Primary Link to listen Podcast * @param {string} [props.signage] - Optional article signage * @param {bool} [props.shouldDisplaySignageInline] - Optional boolean to display signage, defaults to false * @param {bool} props.variations.shouldUseSmallLede - Optional use the small lede image * @param {bool} props.variations.showPodcastButton - Optional to show podcast listen now button * @param {boolean} [props.variations.hasDateExtraTopSpacing] - To add extra margin top to the content date * @param {string} [props.variationName] - Component variation name used for Component Tracking * * @returns {ReactElement}
*/ // eslint-disable-next-line complexity const ContentHeader = ({ additionalPhotos, authorsTitleBlockPosition = 'hidden', awards, business = { address: {}, phone: '', email: '', socialMedia: [], link: '' }, bylineVariation, captionStyle = 'default', captionWidth = 'standard', config = { adsConfig: { contentHeaderRubricName: undefined } }, className, contentHeaderCategories, contentSponsorNames = [], contributorImage, contributors, ctaText, dangerousDek, dangerousHed, dividerType = 'both', showFullHeaderViewInMobile = false, externalLinks = [], hasDesktopTitleBlockDivider = false, hasLedeLightboxButton, hasLightbox = false, hasSlideshow = false, hasStaticPositionedAward = false, hasStickyBoxIndexPosition, hasStickySocialIcons = true, hideAdaptationByline = false, hideByLine = false, hideContributors = false, hideDangerousDek = false, hideRubric = false, hideSocialIcons = false, hideSocialIconsOnMobile = false, hideTopDisclaimerOnMobile, hideTopRating, hidePublishDate = false, interactiveOverride, isBusinessContentHeader, isLiveStoryType = false, isImagePositionBottomInSmallScreen, isStoryLive = false, issueDate, issueLink, lede, ledeSocialIcons, modifiedDate, offers, persistentAsideAlign = 'left', price, publishDate, rating, reviewRating, rubric, rubricVariation, itemsCount, hasContributorImageBackground = false, metadataVideo = {}, showContentDivider = false, showContributorImage = true, showContributorImageOnMobile = true, showSponsorBlock = false, showHeaderButton, signage, hideIssueDate, hideIssueDatePipeSeparator = false, hideLede = false, hideLedeCaption = false, hasDisabledCloseOnClickForLightbox, hasNarrowHeader = false, podcastPagePrimaryCta, podcastPagePrimaryCtaLabel, shouldDisplayPremiereDate = false, shouldDisplaySignageInline = false, shouldShortenHeadline = false, showFullWidthLeadImage = false, showIssueCopyByDate = false, showTextOverlayDek = false, slideShowVariation, socialIconsToHide = [], socialMedia, socialTitle, socialDescription, stickySocialAnchorBottom = { selector: '.page', edge: 'bottom' }, stickySocialAnchorTop = { selector: "[data-testid='ContentHeaderContainer']", edge: 'bottom' }, theme = 'standard', sponsoredContentHeaderProps, sponsorByline, variations = { assetPosition: 'bottom', contentAlign: 'center', contentPosition: 'above', hasDivider: false, hasExtraSpaceBetweenSeparator: false, hasInlinePublishDate: false, hasLedeLightbox: false, hasNoRowPadding: false, hasXsNavSpacing: false, leadRailAnchor: false, ledeAlign: 'default', publishDatePosition: 'bottom', reducedSpacings: false, shouldUseSmallLede: false, showPodcastButton: false }, hasNativeShareButton = false, shouldEnableNativeShareOnDesktop = false, showBreadCrumb, venueAwards, hasInvertedCaption = false, hasInvertedLedeBackground = true, variationName, isFullBleedVideo = false, cneVideoEmbedProps = { additionalEmbedParams: {}, dangerousCaption: '', isStickyType: false, scriptUrl: '', shouldAutoplay: true, shouldHaveTeaser: true, shouldMute: true, variationsVideo: {}, variationVideoName: {} }, shouldAlignCenterWhenNoCaption = false }) => { const { assetPosition, copyWidth, contentAlign, contentPosition, contentStyle, hasAccreditationExtraSpacing, hasAccreditationSocialBottomMargin, hasAccreditationSocialTopMargin, shouldRemoveBylineTopMargin, hasDekBottomMargin, hasExtraSpaceBetweenSeparator = false, hasLedeLightbox, hasNoRowPadding, hasPublishDateBottomPadding, hasInlinePublishDate, hasReducedTitleTopMargin, hasTitleWrapperTopSpacing, shouldRemoveContentHedWrapperTopSpacing, hasXsNavSpacing, hideAccreditationBottomSpacing, ledeAlign, leadRailAnchor, mediaWidth, publishDatePosition = 'bottom', reducedSpacings = false, hasDivider, showPodcastButton, shouldUseSmallLede, shouldReduceAccreditationPadding, hasDateExtraTopSpacing } = variations; const { additionalEmbedParams, dangerousCaption, isStickyType, scriptUrl, shouldAutoplay, shouldHaveTeaser, shouldMute, variationsVideo, variationVideoName } = cneVideoEmbedProps; React.useEffect(() => { window.Kendra.TRACK_COMPONENT.broadcast(TrackComponentChannel.RENDER, { name: 'ContentHeader', variation: variationName }); }, [variationName]); if (rubric) { rubric.name = config.adsConfig?.contentHeaderRubricName || rubric.name; } const isMiddleImage = assetPosition === 'middle'; const inlinePublishDate = hasSingleAuthor(contributors) && hasInlinePublishDate; const isLedeOverride = getOverrideBehaviour(interactiveOverride) === 'storyimage'; const themedBylineVariation = getThemedBylineVariation({ bylineVariation, theme }); const titleBlock = (React.createElement(TitleBlock, { authorsPosition: authorsTitleBlockPosition, business: business, bylineVariation: themedBylineVariation, contentHeaderCategories: contentHeaderCategories, contentSponsorNames: contentSponsorNames, contributors: contributors, dangerousHed: dangerousHed, dividerType: dividerType, externalLinks: externalLinks, hasContentDivider: showContentDivider, hasDesktopTitleBlockDivider: hasDesktopTitleBlockDivider, hasDivider: hasDivider, hasNoRowPadding: hasNoRowPadding, hasExtraSpaceBetweenSeparator: hasExtraSpaceBetweenSeparator, hideAdaptationByline: hideAdaptationByline, hideIssueDate: hideIssueDate, hideIssueDatePipeSeparator: hideIssueDatePipeSeparator, hideRubric: hideRubric, hidePublishDate: hidePublishDate, isBusinessContentHeader: isBusinessContentHeader, isLiveStoryType: isLiveStoryType, isStoryLive: isStoryLive, issueDate: issueDate, issueLink: issueLink, itemsCount: itemsCount, metadataVideo: metadataVideo, modifiedDate: modifiedDate, podcastPagePrimaryCta: podcastPagePrimaryCta, podcastPagePrimaryCtaLabel: podcastPagePrimaryCtaLabel, price: price, publishDate: publishDate, publishDatePosition: publishDatePosition, rubric: rubric, rubricVariation: rubricVariation, showIssueCopyByDate: showIssueCopyByDate, showPodcastButton: showPodcastButton, theme: theme })); let LeadComponent = LeadAsset; if (hasLightbox && hasLedeLightbox) { LeadComponent = additionalPhotos ? withLightbox({ Component: LeadAsset, slides: additionalPhotos, hasSlideshow, slideShowVariation, hasDisabledCloseOnClickForLightbox }) : withLightbox({ Component: LeadAsset, slides: [lede] }); } const { showNativeShareButton, pageUrl } = useNativeShare(hasNativeShareButton, shouldEnableNativeShareOnDesktop); const shouldShowAuthorsInTitleBlock = authorsTitleBlockPosition !== 'hidden'; const shouldBylineContentStacked = contributors && Object.keys(contributors).length > 1; const BUTTON_POSITION = 'content-header'; const bylinesBlock = contributors && !hideContributors && (React.createElement(ContentHeaderBylines, { contributors: contributors, bylineVariation: themedBylineVariation, isCompact: false, inlinePublishDate: inlinePublishDate })); const dateTimeProps = modifiedDate && { datetime: modifiedDate }; const publishDateBlock = !hidePublishDate && (React.createElement(ContentHeaderPublishDate, { inlinePublishDate: inlinePublishDate, "data-testid": "ContentHeaderPublishDate", mediaWidth: mediaWidth, contentAlign: contentAlign, ...(showFullHeaderViewInMobile && { hasDateExtraTopSpacing, hasPublishDateBottomPadding: hasPublishDateBottomPadding && (!socialMedia || hideSocialIcons || hideSocialIconsOnMobile) }), ...dateTimeProps }, publishDate)); const AccreditationWrapper = (React.createElement(React.Fragment, null, React.createElement(Accreditation, { bylinesBlock: bylinesBlock, contributorImage: contributorImage, dangerousDek: dangerousDek, hideDangerousDek: hideDangerousDek, dividerType: dividerType, hasContributorImageBackground: hasContributorImageBackground, hasDesktopTitleBlockDivider: hasDesktopTitleBlockDivider, hasLede: !!lede, hideTopRating: hideTopRating, hasStickySocialIcons: hasStickySocialIcons, hideByLine: hideByLine, hideSocialIcons: hideSocialIcons, hideSocialIconsOnMobile: hideSocialIconsOnMobile, isBusinessContentHeader: isBusinessContentHeader, isMiddleImage: isMiddleImage, isSponsoredContent: contentSponsorNames.length > 0, isLiveStoryType: isLiveStoryType, isStoryLive: isStoryLive, metadataVideo: metadataVideo, publishDateBlock: publishDateBlock, publishDatePosition: publishDatePosition, rating: rating, reviewRating: reviewRating, shouldDisplayPremiereDate: shouldDisplayPremiereDate, shouldDisplaySignageInline: shouldDisplaySignageInline, shouldShowAuthorsInTitleBlock: shouldShowAuthorsInTitleBlock, showContributorImage: showContributorImage, showSponsorBlock: showSponsorBlock, signage: signage, socialIconsToHide: socialIconsToHide, socialMedia: socialMedia, socialTitle: socialTitle, socialDescription: socialDescription, sponsorByline: sponsorByline, sponsoredContentHeaderProps: sponsoredContentHeaderProps, pageUrl: pageUrl, showNativeShareButton: showNativeShareButton, venueAwards: venueAwards, mediaWidth: mediaWidth, contentAlign: contentAlign, contentPosition: contentPosition, theme: theme, shouldRemoveBylineTopMargin: showFullHeaderViewInMobile && shouldRemoveBylineTopMargin }), React.createElement(ContentHeaderOffersData, { ctaText: ctaText, hideTopDisclaimerOnMobile: hideTopDisclaimerOnMobile, offers: offers, showHeaderButton: showHeaderButton, buttonPosition: BUTTON_POSITION }))); const isLedeTextCenterForMobile = shouldAlignCenterWhenNoCaption && !lede?.caption; return (React.createElement(ContentHeaderWrapper, { className: classnames('content-header', { [className]: className }), isLiveStoryType: isLiveStoryType, publishDatePosition: publishDatePosition, hasXsNavSpacing: hasXsNavSpacing, contentAlign: contentAlign, assetPosition: assetPosition, shouldShowAuthorsInTitleBlock: shouldShowAuthorsInTitleBlock, captionStyle: captionStyle, copyWidth: copyWidth, mediaWidth: mediaWidth, contentStyle: contentStyle, contentPosition: contentPosition, isBusinessContentHeader: isBusinessContentHeader, isLedeOverride: isLedeOverride, shouldShortenHeadline: shouldShortenHeadline, reducedSpacings: reducedSpacings, hasInvertedCaption: hasInvertedCaption, containerTheme: theme, shouldBylineContentStacked: shouldBylineContentStacked, hasExtraSpaceBetweenSeparator: hasExtraSpaceBetweenSeparator, hasLede: !!lede, hasNarrowHeader: hasNarrowHeader, showBreadCrumb: showBreadCrumb, showTextOverlayDek: showTextOverlayDek, ...(showFullHeaderViewInMobile && { hasAccreditationExtraSpacing, hasAccreditationSocialTopMargin, hasAccreditationSocialBottomMargin, hasDekBottomMargin, hideAccreditationBottomSpacing, hasLeadAssetTopSpacing: !hasPublishDateBottomPadding && (hideDangerousDek || !dangerousDek || !isMiddleImage), hasTitleWrapperTopSpacing, shouldRemoveContentHedWrapperTopSpacing, hasReducedTitleTopMargin, shouldReduceAccreditationPadding }), isLedeTextCenterForMobile: isLedeTextCenterForMobile, showContributorImageOnMobile: showContributorImageOnMobile, isImagePositionBottomInSmallScreen: isImagePositionBottomInSmallScreen }, React.createElement(ContentHeaderContainer, { containerTheme: theme, mediaWidth: mediaWidth, showFullWidthLeadImage: showFullWidthLeadImage, contentStyle: contentStyle, contentPosition: contentPosition, isFullBleedVideo: isFullBleedVideo, "data-testid": "ContentHeaderContainer" }, !hideDangerousDek && dangerousDek && isMiddleImage && (React.createElement(ContentHeaderAccreditationBottom, null, React.createElement(ContentHeaderDek, { dangerouslySetInnerHTML: { __html: dangerousDek }, assetPosition: assetPosition, mediaWidth: mediaWidth, "data-testid": "ContentHeaderDek" }))), hasDivider && React.createElement(PodcastContentHeaderDivider, null), React.createElement(ContentHeaderHedAccreditationWrapper, { isBusinessContentHeader: isBusinessContentHeader }, dangerousHed && titleBlock, AccreditationWrapper), isLedeOverride ? (React.createElement(ContentHeaderLeadOverride, { contentPosition: contentPosition, dangerouslySetInnerHTML: { __html: interactiveOverride.markup } })) : (!isFullBleedVideo && !hideLede && lede && (React.createElement(ContentHeaderLeadAssetWrapper, { awards: awards, hasLightboxButton: hasLedeLightboxButton, hasStaticPositionedAward: hasStaticPositionedAward, hideLedeCaption: hideLedeCaption, hasDisabledCloseOnClickForLightbox: hasDisabledCloseOnClickForLightbox, lede: lede, captionWidth: captionWidth, shouldRenderRailAnchor: leadRailAnchor, shouldUseSmallLede: shouldUseSmallLede, socialIcons: ledeSocialIcons, mediaWidth: mediaWidth, containerTheme: theme, hasInvertedLedeBackground: hasInvertedLedeBackground, ledeAlign: ledeAlign, showFullWidthLeadImage: showFullWidthLeadImage, hasLeadAssetTopSpacing: showFullHeaderViewInMobile && !hasPublishDateBottomPadding && (hideDangerousDek || !dangerousDek || !isMiddleImage), isBusinessContentHeader: isBusinessContentHeader, shouldAlignCenterWhenNoCaption: shouldAlignCenterWhenNoCaption, as: LeadComponent, className: classnames({ [`lead-asset--width-${mediaWidth}`]: mediaWidth }) }))), isFullBleedVideo && (React.createElement(CNEVideoEmbed, { dangerousCaption: dangerousCaption, scriptUrl: scriptUrl, shouldAutoplay: shouldAutoplay, shouldMute: shouldMute, shouldHaveTeaser: shouldHaveTeaser, additionalEmbedParams: additionalEmbedParams, isStickyType: isStickyType, videoEmbedPosition: storyVideoPosition, variationName: variationVideoName, // eslint-disable-next-line react/forbid-component-props variations: variationsVideo }))), !showNativeShareButton && hasStickySocialIcons && socialMedia && (React.createElement(ContentHeaderPersistentAside, { attributes: { shouldFadeOnMove: true }, align: persistentAsideAlign, anchorBottom: stickySocialAnchorBottom, anchorTop: stickySocialAnchorTop, hasStickyBoxIndexPosition: hasStickyBoxIndexPosition, fullWidthSelector: FULL_WIDTH_SELECTOR }, React.createElement(ContentHeaderSocialIcons, { ...socialMedia, className: "social-icons--share" }))))); }; ContentHeader.propTypes = { additionalPhotos: PropTypes.array, authorsTitleBlockPosition: PropTypes.oneOf(['above', 'below', 'hidden']), awards: PropTypes.array, business: PropTypes.shape({ address: PropTypes.object, phone: PropTypes.string, email: PropTypes.string, socialMedia: PropTypes.array }), bylineVariation: PropTypes.string, captionStyle: PropTypes.oneOf(['default', 'span-content-well']), captionWidth: PropTypes.oneOf(['standard', 'fullbleed']), className: PropTypes.string, cneVideoEmbedProps: PropTypes.shape({ additionalEmbedParams: PropTypes.object, dangerousCaption: PropTypes.string, isStickyType: PropTypes.bool, scriptUrl: PropTypes.string, shouldAutoplay: PropTypes.bool, shouldHaveTeaser: PropTypes.bool, shouldMute: PropTypes.bool, variationsVideo: PropTypes.object, variationVideoName: PropTypes.object }), config: PropTypes.object, contentHeaderCategories: PropTypes.shape({ title: PropTypes.string, tags: PropTypes.array }), contentSponsorNames: PropTypes.array, contributorImage: PropTypes.shape(ResponsiveAsset.propTypes), contributors: PropTypes.shape(Bylines.propTypes.contributors), ctaText: PropTypes.string, dangerousDek: PropTypes.string, dangerousHed: PropTypes.string, dividerType: PropTypes.oneOf(['both', 'bottom', 'top']), externalLinks: PropTypes.array, hasContributorImageBackground: PropTypes.bool, hasDesktopTitleBlockDivider: PropTypes.bool, hasDisabledCloseOnClickForLightbox: PropTypes.bool, hasInvertedCaption: PropTypes.bool, hasInvertedLedeBackground: PropTypes.bool, hasLedeLightboxButton: PropTypes.bool, hasLightbox: PropTypes.bool, hasNarrowHeader: PropTypes.bool, hasNativeShareButton: PropTypes.bool, hasSlideshow: PropTypes.bool, hasStaticPositionedAward: PropTypes.bool, hasStickyBoxIndexPosition: PropTypes.bool, hasStickySocialIcons: PropTypes.bool, hideAdaptationByline: PropTypes.bool, hideByLine: PropTypes.bool, hideContributors: PropTypes.bool, hideDangerousDek: PropTypes.bool, hideIssueDate: PropTypes.bool, hideIssueDatePipeSeparator: PropTypes.bool, hideLede: PropTypes.bool, hideLedeCaption: PropTypes.bool, hidePublishDate: PropTypes.bool, hideRubric: PropTypes.bool, hideSocialIcons: PropTypes.bool, hideSocialIconsOnMobile: PropTypes.bool, hideTopDisclaimerOnMobile: PropTypes.bool, hideTopRating: PropTypes.bool, interactiveOverride: PropTypes.shape({ markup: PropTypes.string, behavior: PropTypes.string }), isBusinessContentHeader: PropTypes.bool, isFullBleedVideo: PropTypes.bool, isImagePositionBottomInSmallScreen: PropTypes.bool, isLiveStoryType: PropTypes.bool, isStoryLive: PropTypes.bool, issueDate: PropTypes.string, issueLink: PropTypes.string, itemsCount: PropTypes.shape(ItemsCount.propTypes), lede: PropTypes.oneOfType([ PropTypes.shape(ResponsiveAsset.propTypes), PropTypes.shape(GalleryEmbed.propTypes), PropTypes.shape(CNEVideoEmbed.propTypes) ]), ledeSocialIcons: PropTypes.shape(SocialIcons.propTypes), metadataVideo: PropTypes.shape({ isLive: PropTypes.bool, premiereDate: PropTypes.string, premiereGap: PropTypes.number, series: PropTypes.string, videoLength: PropTypes.number }), modifiedDate: PropTypes.string, offers: PropTypes.array, persistentAsideAlign: PropTypes.oneOf(['left', 'left-lead-asset']), podcastPagePrimaryCta: PropTypes.string, podcastPagePrimaryCtaLabel: PropTypes.string, price: PropTypes.string, publishDate: PropTypes.string.isRequired, rating: PropTypes.shape(Rating.propTypes), reviewRating: PropTypes.number, rubric: PropTypes.shape(Rubric.propTypes), rubricVariation: PropTypes.string, shouldAlignCenterWhenNoCaption: PropTypes.bool, shouldDisplayPremiereDate: PropTypes.bool, shouldDisplaySignageInline: PropTypes.bool, shouldEnableNativeShareOnDesktop: PropTypes.bool, shouldShortenHeadline: PropTypes.bool, showBreadCrumb: PropTypes.bool, showContentDivider: PropTypes.bool, showContributorImage: PropTypes.bool, showContributorImageOnMobile: PropTypes.bool, showFullHeaderViewInMobile: PropTypes.bool, showFullWidthLeadImage: PropTypes.bool, showHeaderButton: PropTypes.bool, showIssueCopyByDate: PropTypes.bool, showSponsorBlock: PropTypes.bool, showTextOverlayDek: PropTypes.bool, signage: PropTypes.string, slideShowVariation: PropTypes.string, socialDescription: PropTypes.string, socialIconsToHide: PropTypes.array, socialMedia: PropTypes.shape(SocialIcons.propTypes), socialTitle: PropTypes.string, sponsorByline: PropTypes.string, sponsoredContentHeaderProps: PropTypes.shape({ campaignUrl: PropTypes.string, sponsorLogo: PropTypes.shape(ResponsiveAsset.propTypes), sponsorName: PropTypes.string }), stickySocialAnchorBottom: PersistentAside.propTypes.anchorBottom, stickySocialAnchorTop: PersistentAside.propTypes.anchorTop, theme: PropTypes.oneOf(['standard', 'inverted', 'special', 'live']), variationName: PropTypes.string, variations: PropTypes.shape({ assetPosition: PropTypes.oneOf(['bottom', 'middle']), contentAlign: PropTypes.oneOf(['center', 'left']), contentPosition: PropTypes.oneOf(['above', 'below', 'start', 'end']), contentStyle: PropTypes.oneOf(['card', 'dense-card', 'item']), copyWidth: PropTypes.oneOf(['grid', 'fullbleed']), hasDivider: PropTypes.bool, hasAccreditationExtraSpacing: PropTypes.bool, hasAccreditationSocialBottomMargin: PropTypes.bool, hasAccreditationSocialTopMargin: PropTypes.bool, hasTitleWrapperTopSpacing: PropTypes.bool, shouldReduceAccreditationPadding: PropTypes.bool, shouldRemoveBylineTopMargin: PropTypes.bool, hasDateExtraTopSpacing: PropTypes.bool, hasDekBottomMargin: PropTypes.bool, hasExtraSpaceBetweenSeparator: PropTypes.bool, hasInlinePublishDate: PropTypes.bool, hasLedeLightbox: PropTypes.bool, hasNoRowPadding: PropTypes.bool, hasPublishDateBottomPadding: PropTypes.bool, hasReducedTitleTopMargin: PropTypes.bool, hasXsNavSpacing: PropTypes.bool, hideAccreditationBottomSpacing: PropTypes.bool, leadRailAnchor: PropTypes.bool, ledeAlign: PropTypes.oneOf(['default', 'center']), mediaWidth: PropTypes.oneOf(['small', 'smallrule', 'grid', 'fullbleed']), publishDatePosition: PropTypes.oneOf(['top', 'bottom']), reducedSpacings: PropTypes.bool, shouldRemoveContentHedWrapperTopSpacing: PropTypes.bool, shouldUseSmallLede: PropTypes.bool, showPodcastButton: PropTypes.bool }), venueAwards: PropTypes.string }; ContentHeader.displayName = 'ContentHeader'; module.exports = ContentHeader; //# sourceMappingURL=ContentHeader.js.map /***/ }), /***/ 88317: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled, css } = __webpack_require__(92168); const { applyGridSpacing, cssVariablesGrid } = __webpack_require__(1123); const { calculateSpacing, getColorToken, getLinkStyles, minScreen, maxScreen } = __webpack_require__(26865); const { roundImageBase } = __webpack_require__(52027); const { BaseText } = __webpack_require__(76955); const { BREAKPOINTS, INTERACTIVE } = __webpack_require__(96472); const { maxThresholds } = __webpack_require__(99906); const { BylinePreamble, BylineName } = __webpack_require__(74423); const { CaptionText, CaptionCredit } = __webpack_require__(38860); const { RubricLink } = __webpack_require__(6613); const { ResponsiveImageContainer } = __webpack_require__(7228); const { ResponsiveClipWrapper } = __webpack_require__(91783); const OffersData = __webpack_require__(19762); const { SpanWrapper } = __webpack_require__(18117); const Bylines = __webpack_require__(52540); const { ResponsiveCartoonCaption } = __webpack_require__(77527); const { SocialIconsList, SocialIconsWrapper } = __webpack_require__(51000); const PersistentAside = __webpack_require__(40855); const { ContentHeaderLeadAsset, ContentHeaderResponsiveAsset, ContentHeaderLeadAssetContent, ContentHeaderLeadAssetCaption, ContentHeaderLeadAssetContentMedia, ContentHeaderLeadRailAnchor, ContentHeaderLeadContentFullWidth } = __webpack_require__(5239); const { ContentHeaderContentDivider, ContentHeaderItemCount, ContentHeaderHed, ContentHeaderTitleBlockWrapper, ContentHeaderTitleBlockPublishDate, AddressBlockWrapper, HeaderSocialInformation } = __webpack_require__(1757); const { ContentHeaderRubricBlock, ContentHeaderRubricContainer, ContentHeaderRubricIssueDate } = __webpack_require__(21608); const { ContentHeaderByline, ContentHeaderAccreditationSocialIcons, ContentHeaderContributorImage, ContentHeaderNativeShareButton, ContentHeaderBylineContent, ContentHeaderAccreditation, ContentHeaderDek, ContentHeaderSignageLabel, SummaryPremiereWrapper } = __webpack_require__(80607); const { getPublishDateCommonStyle, defaultGridStyle, defaultColorPaddingStyle, rowWithCommonStyle } = __webpack_require__(60254); const colorsConsumptionLeadStandardContexTertiary = 'colors.consumption.lead.standard.context-tertiary'; const colorsConsumptionLeadInvertedContextTertiary = 'colors.consumption.lead.inverted.context-tertiary'; const colorsConsumptionLeadSpecialContextSignature = 'colors.consumption.lead.special.context-signature'; const colorsConsumptionLeadSpecialContextTertiary = 'colors.consumption.lead.special.context-tertiary'; const allGridChildStyle = ` > * { grid-column: 1/-1; } `; const ContentHeaderPersistentAside = styled(PersistentAside).withConfig({ displayName: 'ContentHeaderPersistentAside' }) ``; // 1. overwrite text decoration link styles see token: layouts_to_refactor.interactive.links const ContentHeaderPublishDate = styled(BaseText) .withConfig({ displayName: 'ContentHeaderPublishDate' }) .attrs(({ datetime }) => ({ dateTime: datetime })) ` ${({ theme }) => getPublishDateCommonStyle(theme)}; ${({ inlinePublishDate }) => inlinePublishDate && ` & { float: left; padding-top: ${calculateSpacing(0.5)}; padding-left: 10px; line-height: 1.7; } `}; ${({ mediaWidth, contentAlign }) => mediaWidth === 'smallrule' && ` float: left; ${contentAlign === 'center' && 'float: none;'}; `}; ${({ hasDateExtraTopSpacing }) => hasDateExtraTopSpacing && `& { padding-top: ${calculateSpacing(1)}; } `} ${({ hasPublishDateBottomPadding }) => hasPublishDateBottomPadding && ` ${maxScreen(`${maxThresholds.lg}px`)} { padding-bottom: ${calculateSpacing(4)}; } `} `; ContentHeaderPublishDate.defaultProps = { as: 'time', typeIdentity: 'typography.definitions.globalEditorial.context-tertiary' }; const getPublishDatePositionStyle = (hasExtraSpaceBetweenSeparator) => ` ${ContentHeaderTitleBlockPublishDate} { &:not(:first-child) { &::before { margin: 0 ${calculateSpacing(hasExtraSpaceBetweenSeparator ? 1 : 0.5)}; content: '|'; } } } `; const hasXsNavSpacingStyle = ` padding-top: 25px; @media (min-width: ${BREAKPOINTS.xl}) { padding-top: 25px; } `; const ContentHeaderBylines = styled(Bylines).withConfig({ displayName: 'ContentHeaderBylines' }) ` ${({ inlinePublishDate }) => inlinePublishDate && ` float: left; min-width: 5%; `} `; const getContainerThemeBasedStyle = (containerTheme, theme) => { if (containerTheme === 'inverted') { return css ` background-color: ${getColorToken('colors.consumption.lead.inverted.background')}; .fixed-header-large-logo-nav-variation & { margin-top: ${calculateSpacing(-14)}; padding-top: ${calculateSpacing(14)}; } ${ContentHeaderRubricContainer} { color: ${getColorToken('colors.consumption.lead.inverted.context-signature')}; ${RubricLink} { ${getLinkStyles(theme, 'colors.consumption.lead.inverted.link', 'colors.consumption.lead.inverted.link-hover', 'global')}; } } ${ContentHeaderRubricIssueDate} { color: ${getColorToken(colorsConsumptionLeadInvertedContextTertiary)}; ${RubricLink} { ${getLinkStyles(theme, colorsConsumptionLeadInvertedContextTertiary, colorsConsumptionLeadInvertedContextTertiary, 'global')}; } } ${ContentHeaderHed} { color: ${getColorToken('colors.consumption.lead.inverted.heading')}; &:hover { color: ${getColorToken('colors.consumption.lead.inverted.heading')}; } } ${ContentHeaderDek} { color: ${getColorToken('colors.consumption.lead.inverted.description')}; a { ${getLinkStyles(theme, 'colors.consumption.lead.inverted.link', 'colors.consumption.lead.inverted.link-hover', 'global')}; transition: color ${INTERACTIVE.timingLinkDefault} ease; } &:hover { color: ${getColorToken('colors.consumption.lead.inverted.description')}; } } ${ContentHeaderSignageLabel} { color: ${getColorToken('colors.consumption.lead.inverted.description')}; &:hover { color: ${getColorToken('colors.consumption.lead.inverted.description')}; } } ${ContentHeaderBylines} > *, ${BylinePreamble} { color: ${getColorToken('colors.consumption.lead.inverted.accreditation')}; a { ${getLinkStyles(theme, 'colors.consumption.lead.inverted.link', 'colors.consumption.lead.inverted.link-hover', 'global')}; transition: color ${INTERACTIVE.timingLinkDefault} ease; } } ${ContentHeaderByline} ${SpanWrapper} { display: none; } ${ContentHeaderPublishDate},${ContentHeaderTitleBlockPublishDate} { color: ${getColorToken(colorsConsumptionLeadInvertedContextTertiary)}; &:hover { color: ${getColorToken(colorsConsumptionLeadInvertedContextTertiary)}; } } .social-icons__list-item--standard { .icon path { fill: ${getColorToken('colors.interactive.base.white')}; } .social-icons__link--bookmark { background: ${getColorToken('colors.interactive.base.dark')}; &:hover { .icon-bookmark.icon path { fill: ${getColorToken('colors.interactive.base.white')}; } } .icon-bookmark-fill, .icon-bookmark-stroke { fill: ${getColorToken('colors.interactive.base.white')}; } @media (min-width: ${BREAKPOINTS.md}) { &:hover { background: ${getColorToken('colors.interactive.base.brand-primary')}; } } } .social-icons__link--bookmarkactivated { background: ${getColorToken('colors.interactive.base.brand-primary')}; .icon-bookmark-fill, .icon-bookmark-stroke { fill: ${getColorToken('colors.interactive.base.white')}; } @media (min-width: ${BREAKPOINTS.md}) { &:hover { background: ${getColorToken('colors.interactive.base.white')}; } } } } .social-icons__list-item--bookmark, .social-icons__list-item--bookmarkactivated { @media (min-width: 0) and (max-width: ${BREAKPOINTS.md}) { margin-top: ${calculateSpacing(0.25)}; } } .bylines--inlined-with-bg { .bylines__byline { ${BylineName} { background-color: ${getColorToken('colors.consumption.lead.inverted.context-signature')}; color: ${getColorToken('colors.consumption.lead.inverted.context-texture')}; a { ${getLinkStyles(theme, 'colors.consumption.lead.inverted.context-texture', null, 'global')}; } } } } `; } else if (containerTheme === 'special') { return css ` background-color: ${getColorToken('colors.consumption.lead.special.background')}; ${ContentHeaderRubricContainer} { color: ${getColorToken(colorsConsumptionLeadSpecialContextSignature)}; ${RubricLink} { ${getLinkStyles(theme, colorsConsumptionLeadSpecialContextSignature, colorsConsumptionLeadSpecialContextSignature, 'global')}; } } ${ContentHeaderRubricIssueDate} { color: ${getColorToken(colorsConsumptionLeadSpecialContextTertiary)}; ${RubricLink} { ${getLinkStyles(theme, colorsConsumptionLeadSpecialContextTertiary, colorsConsumptionLeadSpecialContextTertiary, 'global')}; } } ${ContentHeaderHed} { color: ${getColorToken('colors.consumption.lead.special.heading')}; &:hover { color: ${getColorToken('colors.consumption.lead.special.heading')}; } } ${ContentHeaderDek} { color: ${getColorToken('colors.consumption.lead.special.accreditation')}; &:hover { color: ${getColorToken('colors.consumption.lead.special.accreditation')}; } } ${ContentHeaderBylines} > * { color: ${getColorToken('colors.consumption.lead.special.accreditation')}; a { ${getLinkStyles(theme, 'colors.consumption.lead.special.link', 'colors.consumption.lead.special.link-hover', 'global')}; transition: color ${INTERACTIVE.timingLinkDefault} ease; } } ${ContentHeaderByline} ${SpanWrapper} { display: none; } ${ContentHeaderPublishDate},${ContentHeaderTitleBlockPublishDate} { color: ${getColorToken(colorsConsumptionLeadSpecialContextTertiary)}; &:hover { color: ${getColorToken(colorsConsumptionLeadSpecialContextTertiary)}; } } `; } return ''; }; const getContainerThemeStyle = (contentPosition, containerTheme) => { if (containerTheme === 'standard') { return css ` ${ContentHeaderTitleBlockWrapper}, ${ContentHeaderAccreditation} { background-color: ${getColorToken('colors.consumption.lead.standard.background')}; } ${contentPosition === 'below' && ` ${ContentHeaderLeadAssetCaption} { background-color: ${getColorToken('colors.consumption.lead.standard.background')}; } `}; `; } else if (containerTheme === 'inverted') { return css ` ${ContentHeaderTitleBlockWrapper}, ${ContentHeaderAccreditation} { background-color: ${getColorToken('colors.consumption.lead.inverted.background')}; } ${contentPosition === 'below' && ` ${ContentHeaderLeadAssetCaption} { background-color: ${getColorToken('colors.consumption.lead.inverted.background')}; } `}; `; } return ''; }; // 1. css-grid: 3 columns. 2 on both ends (label: full), 1 in center (label: main) const ContentHeaderContainer = styled.div.withConfig({ displayName: 'ContentHeaderContainer' }) ` display: grid; grid-auto-rows: auto; grid-template-columns: [full-start] minmax(0, 1fr) [main-start] minmax(0, ${BREAKPOINTS.xxl}) [main-end] minmax(0, 1fr) [full-end]; /* 1 */ overflow-x: hidden; width: 100%; ${({ containerTheme, theme }) => getContainerThemeBasedStyle(containerTheme, theme)} ${({ isFullBleedVideo, mediaWidth }) => mediaWidth === 'fullbleed' && isFullBleedVideo && `display: block`} ${({ mediaWidth, showFullWidthLeadImage }) => mediaWidth === 'fullbleed' && showFullWidthLeadImage && ` grid-template-columns: [full-start] minmax(0, 1fr) [main-start] minmax(0, 2400px) [main-end] minmax(0, 1fr) [full-end]; ${ContentHeaderLeadAssetContent} { max-width: 2400px; ${ContentHeaderLeadAssetContentMedia} { ${ContentHeaderResponsiveAsset} ${ResponsiveImageContainer} { width: 100%; @media (min-width: ${BREAKPOINTS.xl}) { max-height: 1800px; } } } } `} ${({ contentStyle, contentPosition, containerTheme }) => contentStyle === 'card' && getContainerThemeStyle(contentPosition, containerTheme)}; `; const PodcastContentHeaderDivider = styled.div.withConfig({ displayName: 'PodcastContentHeaderDivider' }) ` ${defaultGridStyle} && { ${defaultColorPaddingStyle} } > * { grid-column: 1/-1; } ${({ theme }) => ` @media (min-width: ${BREAKPOINTS.sm}) { &::after{ display: block; grid-column: 1/-1; border: 0; border-bottom: 1px solid ${getColorToken(theme, 'colors.consumption.lead.standard.divider')}; padding-bottom: ${calculateSpacing(2)}; width: 100%; height: 0; content: ''; } ${rowWithCommonStyle} &::after { @media (min-width: ${BREAKPOINTS.sm}) and (max-width: ${BREAKPOINTS.md}) { display: block; } `} `; const getContentAlignStyle = (contentAlign, mediaWidth, contentPosition, hasNarrowHeader, reducedSpacings, shouldShortenHeadline, shouldShowAuthorsInTitleBlock, isLedeTextCenterForMobile) => { if (contentAlign === 'center') { return ` text-align: center; ${ContentHeaderContentDivider} { justify-self: center; } `; } else if (contentAlign === 'left') { return ` [class$='-byline']:last-of-type { margin-bottom: ${calculateSpacing(1)}; } ${ContentHeaderItemCount} { margin-top: ${calculateSpacing(2)}; } ${ContentHeaderAccreditationSocialIcons} { margin-top: ${calculateSpacing(2)}; ${SocialIconsList} { justify-content: left; } } &,* { text-align: left; } ${ContentHeaderHed} { text-align: left; } .badge ul li { text-align: center; } ${ContentHeaderContainer} > * { align-items: flex-start; justify-items: flex-start; } [class$='-byline'] { text-align: left; } ${ContentHeaderByline} { @media (min-width: ${BREAKPOINTS.xl}) { display: flex; align-items: center; width: 100%; } } ${mediaWidth !== 'smallrule' && ` ${ContentHeaderByline} { ${SpanWrapper} { margin-right: ${calculateSpacing(3)}; } } `}; ${ContentHeaderContributorImage}, ${ContentHeaderBylineContent} { flex-basis: content; } ${ContentHeaderDek}, ${ContentHeaderPublishDate}, ${ContentHeaderTitleBlockPublishDate} { text-align: left; } ${ContentHeaderBylineContent} { flex: auto; padding-top: 0; } ${hasNarrowHeader ? ` @media (min-width: ${BREAKPOINTS.md}) { ${ContentHeaderHed}, ${ContentHeaderSignageLabel}, ${ContentHeaderRubricBlock}, ${SummaryPremiereWrapper}, ${ContentHeaderDek}, ${SocialIconsWrapper} { grid-column: 3 / span 8; } } ` : `@media (min-width: ${BREAKPOINTS.lg}) { ${ContentHeaderHed}, ${ContentHeaderDek} { grid-column: 1 / span 10; } }`} // With props.authorsTitleBlockPosition: 'above': headline should span 12 columns for all variations. ${shouldShowAuthorsInTitleBlock && ` @media (min-width: ${BREAKPOINTS.lg}) { ${ContentHeaderHed}, ${ContentHeaderDek} { grid-column: 1 / span 12; } } `}; // With props.shouldShortenHeadline: headline should span 8 columns. Actual only for left aligned headlines. ${shouldShortenHeadline && ` @media (min-width: ${BREAKPOINTS.lg}) { ${ContentHeaderHed} { grid-column: 1 / span 8; } } `}; // Variations.TextAboveLeftSmall: Hide bottom border and align social links on mobile ${contentPosition === 'above' && ` &&{ ${ContentHeaderAccreditation} { padding-top: ${calculateSpacing(4)}; @media (min-width: 0) and (max-width: ${BREAKPOINTS.sm}) { &::after { display: none; } } } } `}; // Variations.SubjectFocus: More dense spacing ${reducedSpacings && ` && { ${ContentHeaderAccreditation} { padding-top: ${calculateSpacing(3)}; padding-bottom: ${calculateSpacing(3)}; } } ${ContentHeaderHed} { margin-top: ${calculateSpacing(3)}; } ${ContentHeaderAccreditationSocialIcons} { margin-top: ${calculateSpacing(3)}; } `}; && { ${ContentHeaderLeadAssetCaption}, ${CaptionCredit} { text-align: left; ${isLedeTextCenterForMobile && ` ${maxScreen(`${maxThresholds.md}px`)} { text-align: center; } `} } } `; } return `&& { ${ContentHeaderLeadAssetCaption}, ${CaptionCredit} { ${maxScreen(`${maxThresholds.md}px`)} { ${isLedeTextCenterForMobile && ` text-align: center; `} } } }`; }; const getLeadAssetWrapperStyle = (mediaWidth, ledeAlign) => { if (mediaWidth === 'small') { return ` @media (min-width: ${BREAKPOINTS.lg}) and (max-width: 1190px) { grid-template-columns: repeat(8, 1fr) minmax(300px, 4fr); } @media (min-width: ${BREAKPOINTS.lg}) { .grid-layout__aside { grid-column: 9/-1; } } @media (min-width: ${BREAKPOINTS.xl}) and (max-width: 1464px) { grid-template-columns: repeat(12, 1fr); } `; } else if (mediaWidth === 'smallrule') { // 1. lead asset uses only 6 columns, align persistent asides to top edge return ` ${ContentHeaderLeadRailAnchor} { top: 0; // 1 @media (min-width: ${BREAKPOINTS.xl}) { margin-top: ${calculateSpacing(2)}; } } ${ledeAlign === 'center' && ` &&&{ @media (min-width: ${BREAKPOINTS.lg}) { grid-template-columns: repeat(12, 1fr); ${ContentHeaderLeadAssetContent} { grid-column: 4 / span 6; } } } `}; `; } return ''; }; const ContentHeaderHedAccreditationWrapper = styled.div.withConfig({ displayName: 'ContentHeaderHedAccreditationWrapper' }) ` display: grid; grid-column: main; grid-row: 1 / auto; width: 100%; ${ContentHeaderTitleBlockWrapper} { grid-column: 1/-1; } ${ContentHeaderAccreditation} { grid-column: 1/-1; } ${({ isBusinessContentHeader }) => isBusinessContentHeader && ` display: grid; grid-column: main; grid-row: 1 / auto; grid-template-columns: repeat(12, 1fr); ${cssVariablesGrid()} column-gap: var(--grid-gap); width: 100%; ${ContentHeaderTitleBlockWrapper} { grid-column: 1/-1; padding-right: 0; padding-left: 0; } ${ContentHeaderAccreditation} { grid-column: 1/-1; } @media (min-width: ${BREAKPOINTS.sm}) { grid-template-columns: repeat(4, 1fr); padding-top: ${calculateSpacing(5)}; ${applyGridSpacing('padding')} ${ContentHeaderTitleBlockWrapper} { grid-column: 1/5; grid-template-columns: repeat(8, 1fr); padding-top: 0; gap: 0; } ${ContentHeaderHed} { margin-top: 0; } ${AddressBlockWrapper} { ${HeaderSocialInformation} { padding-top: 2.2rem; a { padding-right: 0; } } } } @media (min-width: ${BREAKPOINTS.md}) { grid-template-columns: repeat(12, 1fr); column-gap: var(--grid-gap); padding-top: ${calculateSpacing(6)}; ${cssVariablesGrid()} ${applyGridSpacing('padding')} ${ContentHeaderTitleBlockWrapper} { grid-column: 1/9; grid-template-columns: repeat(8, 1fr); padding-top: 0; padding-bottom: 0; gap: 0; } ${ContentHeaderHed} { grid-column: 1/9; } ${ContentHeaderAccreditation} { grid-column: 9/13; gap: 0; grid-template-columns: none; padding-right: 0; } ${AddressBlockWrapper} { grid-column: 1/9; } } @media (min-width: ${BREAKPOINTS.lg}) { ${applyGridSpacing('padding')} ${ContentHeaderTitleBlockWrapper} { grid-column: 1/10; grid-template-columns: repeat(9, 1fr); gap: 0; } ${ContentHeaderAccreditation} { grid-column: 10/13; grid-template-columns: none; margin: 0; padding-top: 2.5rem; padding-right: 0; padding-left: 0; } ${ContentHeaderHed},${AddressBlockWrapper},${ContentHeaderContentDivider} { grid-column: 1/9; } } @media (min-width: ${BREAKPOINTS.xl}) { ${applyGridSpacing('padding')} ${ContentHeaderTitleBlockWrapper} { grid-column: 1/9; grid-template-columns: repeat(12, 1fr); gap: 0; } ${ContentHeaderContentDivider},${ContentHeaderHed},${AddressBlockWrapper} { grid-column: 2/12; } ${ContentHeaderAccreditation} { grid-column: 9/13; grid-template-columns: none; margin: 0; padding-top: 2.5rem; padding-right: 0; padding-left: 0; } } @media (min-width: ${BREAKPOINTS.xxl}) { ${applyGridSpacing('padding')} ${ContentHeaderTitleBlockWrapper} { grid-column: 1/9; grid-template-columns: repeat(10, 1fr); gap: 0; ${ContentHeaderHed},${AddressBlockWrapper},${ContentHeaderContentDivider} { grid-column: 2/10; } } } `} `; const ContentHeaderLeadAssetWrapper = styled.div.withConfig({ displayName: 'ContentHeaderLeadAssetWrapper' }) ` ${defaultGridStyle} @media (min-width: ${BREAKPOINTS.md}) { ${applyGridSpacing('padding')} } ${({ mediaWidth, ledeAlign }) => getLeadAssetWrapperStyle(mediaWidth, ledeAlign)} ${({ isBusinessContentHeader }) => isBusinessContentHeader && ` @media (min-width: ${BREAKPOINTS.md}) { grid-column: 1 / span 20; } @media (min-width: ${BREAKPOINTS.xl}) { max-height: 320px; } max-width:100%; `} ${({ shouldUseSmallLede }) => shouldUseSmallLede && ` margin-top:${calculateSpacing(5)}; ${ContentHeaderResponsiveAsset}{ width: ${calculateSpacing(20.75)}; height: ${calculateSpacing(20.75)}; `} ${({ hasLeadAssetTopSpacing }) => hasLeadAssetTopSpacing && ` ${maxScreen(`${maxThresholds.lg}px`)} { padding-top: ${calculateSpacing(4)}; } ${ContentHeaderLeadAssetCaption} { @media (min-width: 0) and (max-width: ${BREAKPOINTS.lg}) { margin-bottom: 0; } } `} `; // Variations: ContentHeader.AssetMiddleCenterBig (dek below image) const getAssetPositionMiddleStyle = (mediaWidth) => ` ${ContentHeaderAccreditation} { @media (min-width: 0) and (max-width: ${BREAKPOINTS.lg}) { &::after { display: none; } } } ${ContentHeaderAccreditationSocialIcons} { margin-bottom: 0; } .content-header__rating { margin: ${calculateSpacing(5)}; } ${mediaWidth === 'small' && ` ${ContentHeaderLeadAsset} { ${ContentHeaderLeadAssetContent} { @media (min-width: ${BREAKPOINTS.lg}) { grid-column: 1 / 9; } } } `}; `; const getContentHeaderCompactStyle = (contentPosition, hasLede) => ` padding-bottom: ${calculateSpacing(2)}; @media (min-width: ${BREAKPOINTS.md}) { padding-bottom: ${calculateSpacing(4)}; } ${ContentHeaderTitleBlockWrapper} { padding-top: ${calculateSpacing(4, 'px')}; @media (min-width: ${BREAKPOINTS.md}) { padding-top: ${calculateSpacing(5, 'px')}; } ${ContentHeaderHed} { margin-top: ${calculateSpacing(3, 'px')}; padding-bottom: ${calculateSpacing(2, 'px')}; @media (min-width: ${BREAKPOINTS.md}) { margin-top: ${calculateSpacing(4, 'px')}; } } } ${contentPosition === 'above' && ` ${ContentHeaderAccreditation} { padding-bottom: ${calculateSpacing(5, 'px')}; @media (min-width: ${BREAKPOINTS.md}) { padding-bottom: ${calculateSpacing(8, 'px')}; } } `}; ${(contentPosition === 'above' || contentPosition === 'below') && ` &&{ ${ContentHeaderAccreditation} { padding-top: 0; } } ${!hasLede && ` ${ContentHeaderAccreditation} { padding-bottom: 0; } `}; `}; ${ContentHeaderAccreditationSocialIcons} { margin-top: ${calculateSpacing(3, 'px')}; } .bylines { margin-right: ${calculateSpacing(2)}; .byline__name { margin-bottom: ${calculateSpacing(0.25)}; } } ${ContentHeaderRubricContainer} { margin-right: ${calculateSpacing(2)}; } `; const spanContentCaptionStyle = ` @media (min-width: ${BREAKPOINTS.md}) { ${ContentHeaderLeadAssetContent} { ${applyGridSpacing('padding')} display: grid; grid-gap: 1.25rem; grid-template-columns: repeat(12, 1fr); ${ContentHeaderLeadAssetContentMedia} { grid-column: 1 / -1; } ${ContentHeaderLeadAssetCaption} { grid-column: 2/-2; padding: 0; } } } @media (min-width: ${BREAKPOINTS.sm}) { ${ContentHeaderLeadContentFullWidth} { padding-top: ${calculateSpacing(1)}; } } `; const fullBleedCopyWidthStyle = ` ${ContentHeaderTitleBlockWrapper}, ${ContentHeaderAccreditation} { grid-column: full; max-width: 100vw; } `; // eslint-disable-next-line complexity const getContentMediaStyle = (mediaWidth, contentAlign, contentPosition, isBusinessContentHeader, shouldBylineContentStacked, hasAccreditationExtraSpacing, hasAccreditationSocialTopMargin, hasAccreditationSocialBottomMargin, hasDekBottomMargin, hasTitleWrapperTopSpacing, hasReducedTitleTopMargin, hasLeadAssetTopSpacing) => { if (mediaWidth === 'fullbleed') { if (isBusinessContentHeader) { return css ` ${contentAlign === 'center' && ` ${ContentHeaderAccreditation} ${ContentHeaderByline} { @media (min-width: ${BREAKPOINTS.md}) { grid-column: 1/-5; width: fit-content; } @media (min-width: ${BREAKPOINTS.md}) and (max-width: ${BREAKPOINTS.lg}) { grid-column: 5/12; } } `}; ${ContentHeaderLeadAssetContent} { max-width: 100%; } ${ContentHeaderResponsiveAsset} ${ResponsiveImageContainer} { @media (min-width: ${BREAKPOINTS.xl}) { max-height: 320px; object-fit: cover; } } ${ContentHeaderTitleBlockWrapper} { @media (min-width: ${BREAKPOINTS.xxl}) { --grid-gap: ${calculateSpacing(8)}; } } ${ContentHeaderAccreditation} { @media (min-width: ${BREAKPOINTS.xxl}) { grid-column-gap: ${calculateSpacing(6.5)}; } } `; } return css ` ${contentAlign === 'center' && ` ${ContentHeaderAccreditation} ${ContentHeaderByline} { @media (min-width: ${BREAKPOINTS.lg}) { grid-column: 5/-5; } @media (min-width: ${BREAKPOINTS.md}) and (max-width: ${BREAKPOINTS.lg}) { grid-column: 3/-3; } } `}; ${ContentHeaderLeadAssetContent} { max-width: ${BREAKPOINTS.xxl}; } ${ContentHeaderDek} { ${hasDekBottomMargin && `margin-bottom: ${calculateSpacing(2)};`} } ${ContentHeaderAccreditationSocialIcons} { ${hasAccreditationSocialTopMargin && css ` ${maxScreen(`${maxThresholds.lg}px`)} { margin-top: ${calculateSpacing(2)}; } `} ${hasAccreditationSocialBottomMargin && css ` ${maxScreen(`${maxThresholds.lg}px`)} { margin-bottom: ${calculateSpacing(4)}; } `} } `; } else if (mediaWidth === 'grid') { return ` ${ContentHeaderResponsiveAsset} ${ResponsiveImageContainer} { @media (min-width: ${BREAKPOINTS.xl}) { max-height: 1200px; } object-fit: cover; object-position: center; } `; } else if (mediaWidth === 'smallrule') { return css ` ${contentAlign === 'center' && ` @media (min-width: ${BREAKPOINTS.md}) { ${ContentHeaderHed}, ${ContentHeaderDek}, ${ContentHeaderByline} { grid-column: 4 / span 6; } ${!shouldBylineContentStacked && ` ${ContentHeaderBylineContent} { display: flex; align-items: baseline; justify-content: center; ${ContentHeaderPublishDate},${ContentHeaderTitleBlockPublishDate} { padding-left: ${calculateSpacing(1)}; } } `}; } @media (min-width: 0) and (max-width: ${BREAKPOINTS.md}) { ${ContentHeaderPublishDate},${ContentHeaderTitleBlockPublishDate} { line-height: 1.3em; } } `}; ${contentPosition === 'above' && ` && { ${ContentHeaderTitleBlockWrapper} { ${hasTitleWrapperTopSpacing ? `padding-top: ${calculateSpacing(4)};` : `padding-top: ${calculateSpacing(1)}`} } ${ContentHeaderAccreditation} { padding-top: ${calculateSpacing(1)}; padding-bottom: 0; ${hasAccreditationExtraSpacing && ` padding-top: ${calculateSpacing(2)}; &::after { padding-top: ${calculateSpacing(4)}; } `} ${!hasAccreditationExtraSpacing && `${minScreen(BREAKPOINTS.xl)} { padding-top: ${calculateSpacing(1.75)}; }`} } } ${ContentHeaderLeadAssetWrapper} { padding-top: ${hasLeadAssetTopSpacing ? calculateSpacing(4) : calculateSpacing(2)}; } `}; ${ContentHeaderLeadAsset} { @media (min-width: ${BREAKPOINTS.md}) and (max-width: 1190px) { grid-template-columns: repeat(8, 1fr) minmax(300px, 4fr); } @media (min-width: ${BREAKPOINTS.lg}) { .grid-layout__aside { grid-column: 9/-1; } } @media (min-width: ${BREAKPOINTS.xl}) and (max-width: 1464px) { grid-template-columns: repeat(12, 1fr); } ${ContentHeaderLeadAssetContentMedia} { @media (min-width: ${BREAKPOINTS.md}) { margin-right: 0; margin-left: 0; } } } ${ContentHeaderLeadAssetCaption} { padding-top: ${calculateSpacing(1)}; ${CaptionText} { color: ${getColorToken('colors.consumption.lead.standard.description')}; } ${CaptionCredit} { padding-top: ${calculateSpacing(1)}; text-align: left; color: ${getColorToken('colors.consumption.body.standard.body-deemphasized')}; } &.caption-shade--light ${CaptionCredit} { color: ${getColorToken('colors.consumption.lead.standard.syndication')}; } } ${ContentHeaderBylines} { float: none; } ${ContentHeaderPublishDate},${ContentHeaderTitleBlockPublishDate} { float: none; padding-left: 0; } ${ContentHeaderPersistentAside} { margin-top: ${calculateSpacing(5)}; } ${ContentHeaderRubricIssueDate} { color: ${getColorToken(colorsConsumptionLeadStandardContexTertiary)}; @media (min-width: ${BREAKPOINTS.md}) { margin-left: ${calculateSpacing(1)}; } &::before { content: none; /* Remove previously set pseudo-element */ } } && { ${SocialIconsList} { justify-content: center; } } ${ContentHeaderContributorImage} { ${roundImageBase('100%', '48px', '48px')}; margin-right: auto; margin-bottom: ${calculateSpacing(2)}; margin-left: auto; img { width: 100%; } } ${ContentHeaderDek} { margin-bottom: ${calculateSpacing(2)}; } ${ContentHeaderRubricBlock} { @media (min-width: 0) and (max-width: ${maxThresholds.md}px) { > div { margin: 0 ${calculateSpacing(0.5)}; } } } ${ContentHeaderAccreditationSocialIcons} { margin-top: ${calculateSpacing(3)}; } @media (min-width: ${BREAKPOINTS.sm}) { && { * { text-align: center; } } } ${ContentHeaderTitleBlockWrapper} { ${ContentHeaderHed} { ${hasReducedTitleTopMargin ? `margin-top: ${calculateSpacing(2)};` : `margin-top: ${calculateSpacing(3)};`} } ${ContentHeaderAccreditation} { ${ContentHeaderAccreditationSocialIcons} { margin: 0; } ${ContentHeaderAccreditationSocialIcons} { ${hasAccreditationSocialTopMargin && css ` ${maxScreen(`${maxThresholds.lg}px`)} { margin-top: ${calculateSpacing(2)}; } `} ${hasAccreditationSocialBottomMargin && css ` ${maxScreen(`${maxThresholds.lg}px`)} { margin-bottom: ${calculateSpacing(4)}; } `} margin-top: 0; margin-left: 0; } ${SocialIconsList} { margin-top: 0; } } ${ResponsiveCartoonCaption} { padding-right: ${calculateSpacing(3)}; padding-left: ${calculateSpacing(3)}; } } @media (min-width: ${BREAKPOINTS.md}) { ${ResponsiveCartoonCaption} { padding-right: 0; padding-left: 0; } } @media (min-width: ${BREAKPOINTS.lg}) { && { * { text-align: inherit; } } ${ContentHeaderTitleBlockWrapper}, ${ContentHeaderAccreditation} { display: inherit; } ${contentAlign === 'left' && ` ${ContentHeaderHed}, ${ContentHeaderDek} { grid-column: 1 / span 8; } ${ContentHeaderByline} { display: flex; } ${SpanWrapper} { margin-right: ${calculateSpacing(3)}; } ${ContentHeaderContributorImage} { margin-bottom: 0; } `}; ${SocialIconsList} { justify-content: left; } ${ContentHeaderAccreditationSocialIcons} { margin-left: ${calculateSpacing(-2)}; } } `; } return ''; }; const getContentStyle = (contentStyle, contentPosition, mediaWidth, contentAlign, containerTheme, theme) => { if (contentStyle === 'card') { return css ` ${contentPosition === 'below' && ` ${ContentHeaderAccreditation} { padding-bottom: ${calculateSpacing(8)}; } `}; ${containerTheme === 'inverted' && ` ${ContentHeaderTitleBlockWrapper}, ${ContentHeaderAccreditation} { background-color: ${getColorToken(theme, 'colors.consumption.lead.inverted.background')}; } ${contentPosition === 'below' && ` ${ContentHeaderLeadAssetCaption} { background-color: ${getColorToken(theme, 'colors.consumption.lead.inverted.background')}; } `}; `}; `; } else if (contentStyle === 'dense-card') { return css ` ${ContentHeaderTitleBlockWrapper} { grid-column: full; padding-bottom: ${calculateSpacing(6)}; max-width: 100vw; @media (min-width: ${BREAKPOINTS.sm}) { padding-bottom: ${calculateSpacing(9)}; } } ${mediaWidth === 'fullbleed' && ` ${ContentHeaderLeadAssetContent} { margin: 0 auto; } `}; ${contentPosition === 'below' && ` ${ContentHeaderTitleBlockWrapper} { padding-top: ${calculateSpacing(4)}; @media (min-width: ${BREAKPOINTS.sm}) { padding-top: ${calculateSpacing(3)}; } } `}; ${ContentHeaderTitleBlockWrapper}, ${ContentHeaderLeadAssetWrapper} { background: ${getColorToken('colors.consumption.lead.special.background')}; } ${ContentHeaderHed} { margin-top: ${calculateSpacing(1)}; color: ${getColorToken('colors.consumption.lead.special.heading')}; @media (min-width: 0) and (max-width: ${BREAKPOINTS.md}) { text-align: left; } @media (min-width: ${BREAKPOINTS.sm}) { margin-top: ${calculateSpacing(2)}; } } ${ContentHeaderDek}, ${ContentHeaderHed} { @media (min-width: ${BREAKPOINTS.lg}) { grid-column: 1 / span 8; } } ${ContentHeaderAccreditation}, ${ContentHeaderNativeShareButton}, ${ContentHeaderTitleBlockWrapper} { justify-items: start; } ${ContentHeaderLeadAssetContent} ${CaptionText} { color: ${getColorToken('colors.consumption.lead.special.description')}; } ${ContentHeaderLeadAssetContent} ${CaptionCredit} { color: ${getColorToken(colorsConsumptionLeadSpecialContextTertiary)}; } ${ContentHeaderDek} { grid-row: 2; padding-top: ${calculateSpacing(3)}; } ${ContentHeaderByline} { ${ContentHeaderContributorImage} { display: block; } } ${contentAlign === 'left' && ` ${ContentHeaderByline} { margin-top: 0; @media (min-width: ${BREAKPOINTS.sm}) { display: block; } } `}; ${ContentHeaderPublishDate}, ${ContentHeaderTitleBlockPublishDate}, .byline, ${ContentHeaderDek} { text-align: left; } .divider { color: ${getColorToken('colors.consumption.lead.standard.divider')}; } ${ContentHeaderRubricContainer}.rubric--with-bg { color: ${getColorToken(colorsConsumptionLeadSpecialContextSignature)}; a { color: ${getColorToken(colorsConsumptionLeadSpecialContextSignature)}; } } .items-count__icon path { fill: ${getColorToken('colors.consumption.lead.special.heading')}; } ${ContentHeaderLeadAssetContent} { ${ContentHeaderLeadAssetCaption} { padding-top: ${calculateSpacing(1)}; } ${CaptionCredit} { padding-top: ${calculateSpacing(1)}; } } `; } return ''; }; const contentPositionStartEndCommonStyle = ` ${ContentHeaderContainer} { grid-template-columns: repeat(4, 1fr); @media (min-width: ${BREAKPOINTS.md}) { grid-template-columns: repeat(12, 1fr); } } ${ContentHeaderLeadAssetWrapper} { grid-row: 3; padding: 0; ${ContentHeaderResponsiveAsset}{ height: 100%; ${ResponsiveImageContainer} { height: 100%; } } } ${ContentHeaderTitleBlockWrapper} { grid-row: 1; padding-top: ${calculateSpacing(4, 'px')}; @media (min-width: ${BREAKPOINTS.md}) { padding-top: ${calculateSpacing(5, 'px')}; } } ${ContentHeaderAccreditation} { grid-row: 2; } `; // eslint-disable-next-line complexity const getContentPositionStyle = (contentPosition, containerTheme, isLiveStoryType, mediaWidth, contentAlign, contentStyle, hasLede, showBreadCrumb, isBusinessContentHeader, isLedeOverride, hideAccreditationBottomSpacing, shouldReduceAccreditationPadding) => { if (contentPosition === 'above') { return ` // 1. Apply a universal padding to all ContentHeaders that use 'TextAbove' variations // check and not apply any padding if we have bredcrumb, since breadcrumb already has a padding ${!showBreadCrumb && ` ${ContentHeaderTitleBlockWrapper} { padding-top: ${calculateSpacing(4, 'px')}; @media (min-width: ${BREAKPOINTS.md}) { padding-top: ${calculateSpacing(5, 'px')}; } } `}; ${ContentHeaderAccreditation} { padding-top: ${calculateSpacing(2)}; padding-bottom: ${calculateSpacing(2)}; @media (min-width: ${BREAKPOINTS.md}) { padding-bottom: ${calculateSpacing(5)}; ${!shouldReduceAccreditationPadding && `padding-top: ${calculateSpacing(4)};`} ${isLiveStoryType && `padding-top: ${calculateSpacing(3)}`} } } ${!hasLede && ` ${ContentHeaderAccreditation} { padding-bottom: 0; } `}; ${containerTheme === 'inverted' && ` && { ${ContentHeaderAccreditation} { padding-bottom: ${calculateSpacing(4)}; } } `}; ${mediaWidth === 'fullbleed' && ` ${ContentHeaderPersistentAside} { margin-top: ${calculateSpacing(6)}; } `}; ${contentAlign === 'left' && ` &.content-header--no-lede { ${ContentHeaderPersistentAside} { margin-top: ${calculateSpacing(6)}; } } `}; ${mediaWidth === 'small' && ` .disclaimer-container { @media (min-width: ${BREAKPOINTS.xl}) { grid-template-columns: repeat(8, 1fr) minmax(300px, 3fr) 1fr; } } ${ContentHeaderPersistentAside} { margin-top: 0; } `}; `; } else if (contentPosition === 'below') { return ` ${ContentHeaderTitleBlockWrapper} { padding-top: ${calculateSpacing(4, 'px')}; @media (min-width: ${BREAKPOINTS.md}) { padding-top: ${calculateSpacing(5, 'px')}; } } ${ContentHeaderAccreditation} { padding-top: ${calculateSpacing(2)}; padding-bottom: 0; @media (min-width: ${BREAKPOINTS.md}) { ${!shouldReduceAccreditationPadding && `padding-top: ${calculateSpacing(4)};`} } } ${containerTheme === 'inverted' && ` &&{ ${ContentHeaderAccreditation} { padding-bottom: ${calculateSpacing(4)}; @media (min-width: ${BREAKPOINTS.md}) { padding-bottom: ${calculateSpacing(5)}; } } ${hideAccreditationBottomSpacing && ` ${maxScreen(`${maxThresholds.lg}px`)} { ${ContentHeaderAccreditation} { padding-bottom: 0; } } `} } `}; ${ContentHeaderLeadAssetWrapper} { grid-row: 1; } ${!isLedeOverride && `${ContentHeaderHedAccreditationWrapper} { grid-row: 3; }`} ${ContentHeaderLeadContentFullWidth} { grid-row: 2; } ${ContentHeaderTitleBlockWrapper} { padding-top: ${calculateSpacing(4)}; @media (min-width: ${BREAKPOINTS.md}) { padding-top: ${calculateSpacing(5)}; } } ${isBusinessContentHeader && ` ${ContentHeaderHedAccreditationWrapper} { grid-row: 3; } ${ContentHeaderTitleBlockWrapper} { padding-top: ${calculateSpacing(0)}; padding-bottom: ${calculateSpacing(2)}; } @media (min-width: ${BREAKPOINTS.sm}) { ${ContentHeaderLeadAssetWrapper} { max-width: 1600px; ${ResponsiveImageContainer} { aspect-ratio: 3/2; object-fit: cover; } } } @media (min-width: ${BREAKPOINTS.md}) { ${ContentHeaderTitleBlockWrapper} { padding-bottom: ${calculateSpacing(0)}; } ${ContentHeaderLeadAssetWrapper} { max-height: fit-content; padding-right: var(--grid-margin); padding-left: var(--grid-margin); ${ResponsiveImageContainer} { max-height: inherit; aspect-ratio: 16/9; } } } ${ContentHeaderAccreditation} { padding-top: ${calculateSpacing(0)}; } @media (min-width: ${BREAKPOINTS.md}) { ${ContentHeaderAccreditation} { padding-top: ${calculateSpacing(5)}; } } @media (min-width: ${BREAKPOINTS.lg}) { ${ContentHeaderAccreditation} { padding-top: ${calculateSpacing(0)}; } } `} ${contentAlign === 'left' && contentStyle === 'card' && ` ${ContentHeaderPersistentAside} { margin-top: 0; } `}; `; } else if (contentPosition === 'start') { return ` ${ContentHeaderHedAccreditationWrapper} { grid-row: 1 / span 2; grid-column: 1 / 7; } ${contentPositionStartEndCommonStyle} ${ContentHeaderLeadAssetWrapper} { grid-column: 1 / -1; @media (min-width: ${BREAKPOINTS.md}) { grid-column: 7 / -1; grid-row: 1 / span 2; } } ${ContentHeaderTitleBlockWrapper}, ${ContentHeaderAccreditation} { grid-column: 1 / span 6; } ${contentAlign === 'center' && contentStyle === 'card' && ` ${ContentHeaderContainer} { overflow-y: hidden } ${ContentHeaderLeadAssetCaption} { position: absolute; bottom:0px; padding-left: 0px; margin-bottom: 0px; vertical-align: text-bottom; } ${CaptionCredit} { background-color: rgba(255, 255, 255, 0.64); padding: 2px 5px 3px 5px; } ${ContentHeaderTitleBlockWrapper} { @media (max-width: ${BREAKPOINTS.md}) { padding-bottom: ${calculateSpacing(4)}; } } `}; `; } else if (contentPosition === 'end') { return ` ${ContentHeaderHedAccreditationWrapper} { grid-column: 7/-1; grid-row: 1 / span 2; } ${contentPositionStartEndCommonStyle} ${ContentHeaderContainer} { @media (min-width: ${BREAKPOINTS.md}) { column-gap: ${calculateSpacing(3)}; } @media (min-width: ${BREAKPOINTS.xl}) { column-gap: ${calculateSpacing(4)}; } } ${ContentHeaderLeadAssetWrapper} { grid-column: 1 / -1; @media (min-width: ${BREAKPOINTS.md}) { grid-column: 1 / span 6; grid-row: 1 / span 2; } } ${ContentHeaderTitleBlockWrapper}, ${ContentHeaderAccreditation} { grid-column: 1 / -1; @media (min-width: ${BREAKPOINTS.md}) { padding-left: 0; } @media (min-width: ${BREAKPOINTS.md}) { grid-column: 7 / -1; } } `; } return ''; }; const contentHeaderThemeStandardPrintStyle = (theme) => css ` background-color: ${getColorToken('colors.consumption.lead.standard.background')}; ${ContentHeaderRubricContainer} { color: ${getColorToken('colors.consumption.lead.standard.context-signature')}; ${RubricLink} { ${getLinkStyles(theme, 'colors.consumption.lead.standard.context-signature', 'colors.consumption.lead.standard.context-signature', 'global')}; } } ${ContentHeaderRubricIssueDate} { color: ${getColorToken(colorsConsumptionLeadStandardContexTertiary)}; ${RubricLink} { ${getLinkStyles(theme, colorsConsumptionLeadStandardContexTertiary, colorsConsumptionLeadStandardContexTertiary, 'global')}; color: ${getColorToken(colorsConsumptionLeadStandardContexTertiary)}; } } ${ContentHeaderHed} { color: ${getColorToken('colors.consumption.lead.standard.heading')}; &:hover { color: ${getColorToken('colors.consumption.lead.standard.heading')}; } } ${ContentHeaderDek} { color: ${getColorToken('colors.consumption.lead.standard.description')}; &:hover { color: ${getColorToken('colors.consumption.lead.standard.description')}; } } ${ContentHeaderBylines} > * { color: ${getColorToken('colors.consumption.lead.standard.accreditation')}; a { ${getLinkStyles(theme, 'colors.consumption.lead.standard.link', 'colors.consumption.lead.standard.link-hover', 'global')}; transition: color ${INTERACTIVE.timingLinkDefault} ease; } } ${ContentHeaderPublishDate},${ContentHeaderTitleBlockPublishDate} { color: ${getColorToken(colorsConsumptionLeadStandardContexTertiary)}; &:hover { color: ${getColorToken(colorsConsumptionLeadStandardContexTertiary)}; } } `; const mediaPrintStyle = (theme, containerTheme, contentPosition) => css ` @media print { display: block; ${SocialIconsWrapper} { display: none; } ${(containerTheme === 'inverted' || containerTheme === 'special') && contentHeaderThemeStandardPrintStyle(theme)}; ${(containerTheme === 'inverted' || containerTheme === 'special') && contentPosition !== 'above' && ` ${ContentHeaderLeadAssetContent}, ${ContentHeaderLeadContentFullWidth} { ${CaptionText} { color: ${getColorToken(theme, 'colors.consumption.lead.standard.description')}; } ${CaptionCredit} { color: ${getColorToken(theme, 'colors.consumption.body.standard.body-deemphasized')}; } } `}; } `; const getContentHeaderThemeStyle = (containerTheme, contentPosition, hasInvertedCaption, theme) => { if (containerTheme === 'inverted') { return ` ${contentPosition !== 'above' && ` ${ContentHeaderLeadAssetContent}, ${ContentHeaderLeadContentFullWidth} { background-color: transparent; ${CaptionText} { color: ${getColorToken(theme, 'colors.consumption.lead.inverted.description')}; } ${CaptionCredit} { color: ${getColorToken(theme, 'colors.consumption.body.inverted.body-deemphasized')}; } ${ContentHeaderLeadAssetCaption} { a { ${getLinkStyles(theme, 'colors.interactive.base.white', 'colors.interactive.base.white')}; } } } ${ContentHeaderLeadAssetCaption} ${CaptionCredit} { color: ${getColorToken(theme, colorsConsumptionLeadInvertedContextTertiary)}; } `}; ${hasInvertedCaption && ` ${ContentHeaderLeadAssetCaption} ${CaptionText} { color: ${getColorToken(theme, colorsConsumptionLeadInvertedContextTertiary)}; } ${ContentHeaderLeadAssetCaption} ${CaptionCredit} { color: ${getColorToken(theme, colorsConsumptionLeadInvertedContextTertiary)}; } `}; `; } else if (containerTheme === 'special') { return ` ${contentPosition !== 'above' && ` ${ContentHeaderLeadAssetContent}, ${ContentHeaderLeadContentFullWidth} { background-color: transparent; ${CaptionText} { color: ${getColorToken(theme, 'colors.consumption.lead.special.description')}; } ${CaptionCredit} { color: ${getColorToken(theme, 'colors.consumption.body.special.body-deemphasized')}; } } `}; `; } return ''; }; const ContentHeaderWrapper = styled.header.withConfig({ displayName: 'ContentHeaderWrapper' }) ` display: flex; justify-content: center; ${ContentHeaderPersistentAside} { margin-top: 0; } ${ResponsiveClipWrapper} { display: block; } &.content-header--no-lede { ${ContentHeaderAccreditation} { padding-bottom: 0; } } ${({ captionStyle }) => captionStyle === 'span-content-well' && spanContentCaptionStyle} ${({ contentAlign, mediaWidth, contentPosition, hasNarrowHeader, reducedSpacings, shouldShortenHeadline, shouldShowAuthorsInTitleBlock, isLedeTextCenterForMobile }) => getContentAlignStyle(contentAlign, mediaWidth, contentPosition, hasNarrowHeader, reducedSpacings, shouldShortenHeadline, shouldShowAuthorsInTitleBlock, isLedeTextCenterForMobile)} ${({ assetPosition, mediaWidth }) => assetPosition === 'middle' && getAssetPositionMiddleStyle(mediaWidth)} ${({ copyWidth }) => copyWidth === 'fullbleed' && fullBleedCopyWidthStyle} ${({ mediaWidth, contentAlign, contentPosition, isBusinessContentHeader, shouldBylineContentStacked, hasAccreditationExtraSpacing, hasAccreditationSocialTopMargin, hasAccreditationSocialBottomMargin, hasDekBottomMargin, hasTitleWrapperTopSpacing, hasReducedTitleTopMargin, hasLeadAssetTopSpacing }) => getContentMediaStyle(mediaWidth, contentAlign, contentPosition, isBusinessContentHeader, shouldBylineContentStacked, hasAccreditationExtraSpacing, hasAccreditationSocialTopMargin, hasAccreditationSocialBottomMargin, hasDekBottomMargin, hasTitleWrapperTopSpacing, hasReducedTitleTopMargin, hasLeadAssetTopSpacing)} ${({ contentPosition, containerTheme, isLiveStoryType, mediaWidth, contentAlign, contentStyle, hasLede, showBreadCrumb, isBusinessContentHeader, isLedeOverride, hideAccreditationBottomSpacing, shouldReduceAccreditationPadding }) => getContentPositionStyle(contentPosition, containerTheme, isLiveStoryType, mediaWidth, contentAlign, contentStyle, hasLede, showBreadCrumb, isBusinessContentHeader, isLedeOverride, hideAccreditationBottomSpacing, shouldReduceAccreditationPadding)} ${({ shouldShowAuthorsInTitleBlock, contentPosition, hasLede }) => shouldShowAuthorsInTitleBlock && getContentHeaderCompactStyle(contentPosition, hasLede)} ${({ hasXsNavSpacing }) => hasXsNavSpacing && hasXsNavSpacingStyle} ${({ shouldRemoveContentHedWrapperTopSpacing }) => shouldRemoveContentHedWrapperTopSpacing && ` ${minScreen(`${maxThresholds.sm}px`)} { padding-top: 0; } `} ${({ contentStyle, contentPosition, mediaWidth, contentAlign, containerTheme, theme }) => getContentStyle(contentStyle, contentPosition, mediaWidth, contentAlign, containerTheme, theme)} ${({ publishDatePosition, hasExtraSpaceBetweenSeparator }) => publishDatePosition === 'top' && getPublishDatePositionStyle(hasExtraSpaceBetweenSeparator)} ${({ containerTheme, contentPosition, hasInvertedCaption, theme }) => getContentHeaderThemeStyle(containerTheme, contentPosition, hasInvertedCaption, theme)} ${({ theme, containerTheme, contentPosition }) => mediaPrintStyle(theme, containerTheme, contentPosition)} ${({ showContributorImageOnMobile }) => !showContributorImageOnMobile && ` ${maxScreen(`${maxThresholds.lg}px`)} { ${ContentHeaderContributorImage} { display: none; } } } `} ${({ isImagePositionBottomInSmallScreen }) => isImagePositionBottomInSmallScreen && ` ${maxScreen(`${maxThresholds.lg}px`)} { ${ContentHeaderHedAccreditationWrapper} { grid-row: 1 / auto; } ${ContentHeaderLeadAsset} { grid-row: 2 / auto; } ${ContentHeaderLeadContentFullWidth} { grid-row: 3 / auto; } } `} `; const ContentHeaderOffersData = styled(OffersData).withConfig({ displayName: 'ContentHeaderOffersData' }) ` margin: 0; &&.disclaimer-container { ${defaultGridStyle} ${defaultColorPaddingStyle} display: block; margin-bottom: ${calculateSpacing(0.5)}; @media (min-width: ${BREAKPOINTS.lg}) { display: none; } } &&.offer-data { ${defaultGridStyle} ${defaultColorPaddingStyle} } `; const ContentHeaderLeadOverride = styled.div.withConfig({ displayName: 'ContentHeaderLeadOverride' }) ` grid-column: full; max-width: 100vw; .interactive-override__wirewax-embed { @media (min-width: ${BREAKPOINTS.lg}) { padding: 0 15vw; } } ${({ contentPosition }) => contentPosition === 'below' && 'grid-row: 1;'} `; const ContentHeaderAccreditationBottom = styled.div.withConfig({ displayName: 'ContentHeaderAccreditationBottom' }) ` ${defaultGridStyle} ${allGridChildStyle} ${defaultColorPaddingStyle} `; module.exports = { ContentHeaderWrapper, ContentHeaderOffersData, ContentHeaderLeadOverride, ContentHeaderAccreditationBottom, ContentHeaderContainer, ContentHeaderPublishDate, ContentHeaderLeadAssetWrapper, ContentHeaderBylines, ContentHeaderPersistentAside, PodcastContentHeaderDivider, ContentHeaderHedAccreditationWrapper }; //# sourceMappingURL=ContentHeader.styles.js.map /***/ }), /***/ 92027: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const classnames = __webpack_require__(32485); const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const { useIntl } = __webpack_require__(46984); const CNEVideoEmbed = __webpack_require__(64930); const { storyVideoPosition } = __webpack_require__(62327); const GalleryEmbed = __webpack_require__(75966); const GalleryIcon = __webpack_require__(39336); const ResponsiveAsset = __webpack_require__(73275); const SocialIcons = __webpack_require__(35676); const { transformLegacySources } = __webpack_require__(90072); const translations = (__webpack_require__(33193)/* ["default"] */ .A); const { ContentHeaderLeadAsset, ContentHeaderResponsiveAsset, ContentHeaderLeadAssetContent, ContentHeaderLeadAssetCaption, ContentHeaderLeadAssetContentMedia, ContentHeaderLedeLightboxButton, ContentHeaderLeadRailAnchor, ContentHeaderLeadContentFullWidth, ContentHeaderLeadContentCaptionCredit, ContentHeaderLeadAssetAwards } = __webpack_require__(5239); const { useState, Fragment } = React; /** * Wrapper around asset to contain caption, icons * * @param {object} props - React props * @param {Array} [awards] - Optional awards array * @param {string} props.className - Optional top-level class to add. * @param {boolean} props.hasStaticPositionedAward - Statically positions Awards for Review content types, this is set as a setting in the tenant config * @param {boolean} [props.shouldAlignCenterWhenNoCaption] - should apply align center in mobile if caption is not present * @param {object} props.lede - Lede image object. * @returns {ReactElement}
*/ const ASSET_CLASSES = { default: 'landscape', portrait: 'portrait' }; // this will help in reducing CLS when lead image is portrait const getInitialClassname = (lede) => { const dimensions = lede?.masterAspectRatio?.split(':'); if (lede?.restrictCropping && dimensions?.length === 2 && Number(dimensions[0]) / Number(dimensions[1]) <= 1) { return ASSET_CLASSES.portrait; } return ASSET_CLASSES.default; }; /* eslint-disable complexity */ const LeadAsset = ({ awards, className, captionWidth = 'standard', containerTheme, lede, mediaWidth, shouldRenderRailAnchor, showFullWidthLeadImage, socialIcons, hasLightboxButton, hasStaticPositionedAward = false, hasInvertedLedeBackground, hideLedeCaption = false, shouldAlignCenterWhenNoCaption = false }) => { const [ledeAssetOrientation, setLedeAssetOrientation] = useState(getInitialClassname(lede)); const { formatMessage } = useIntl(); const setImageOrientation = ({ width, height }) => { const isPortrait = width / height <= 1; if (isPortrait) { setLedeAssetOrientation(ASSET_CLASSES.portrait); } }; const augmentedLede = transformLegacySources(lede); const isCnevideo = lede.modelName === 'cnevideo'; const isGallery = lede.modelName === 'gallery'; const isClip = lede.modelName === 'clip'; let cneVideoOverrides = null; if (isCnevideo && lede.cneVideoOverrides && Object.keys(lede.cneVideoOverrides).length) { cneVideoOverrides = { ...lede.cneVideoOverrides }; } const shouldRenderCaption = !hideLedeCaption && ((lede.caption && lede.caption.trim()) || (lede.credit && lede.credit.trim())); const isLedeTextCenterForMobile = shouldAlignCenterWhenNoCaption && (!lede.caption || lede.caption === ''); const LeadCaption = (React.createElement(ContentHeaderLeadAssetCaption, { dangerousCaptionText: lede.caption, dangerousCredit: lede.credit, mediaWidth: mediaWidth, isLedeTextCenterForMobile: isLedeTextCenterForMobile })); const cneVideoProps = cneVideoOverrides ? { shouldAutoplay: Boolean(!cneVideoOverrides.disableAutoplay), shouldMute: Boolean(cneVideoOverrides.muted), shouldPlayContinuously: Boolean(cneVideoOverrides.continuousPlay), isStickyType: Boolean(cneVideoOverrides.sticky), shouldDisableAds: Boolean(cneVideoOverrides.disableAds), shouldLoopVideo: Boolean(cneVideoOverrides.loopVideo) } : { shouldAutoplay: true }; const contentHeaderResponsiveAsset = (React.createElement(ContentHeaderResponsiveAsset, { ...augmentedLede, onAssetLoaded: setImageOrientation, shouldRestrictCropping: lede?.restrictCropping, masterAspectRatio: lede?.masterAspectRatio, shouldHoldImageSpace: true, mediaWidth: mediaWidth, "data-testid": "assetMedia" })); return (React.createElement(Fragment, null, React.createElement(ContentHeaderLeadAsset, { className: classnames('lead-asset', className), mediaWidth: mediaWidth, containerTheme: containerTheme, ledeContentType: lede.contentType, ledeAssetOrientation: ledeAssetOrientation, hasInvertedLedeBackground: hasInvertedLedeBackground, "data-testid": "ContentHeaderLeadAsset" }, React.createElement(ContentHeaderLeadAssetContent, null, React.createElement(ContentHeaderLeadAssetContentMedia, { ledeContentType: lede.contentType, showFullWidthLeadImage: showFullWidthLeadImage, mediaWidth: mediaWidth, className: `lead-asset__content__${lede.contentType}` }, !isCnevideo && !isGallery && !isClip && (React.createElement(Fragment, null, awards && !hasStaticPositionedAward && (React.createElement(ContentHeaderLeadAssetAwards, { awards: awards, hasStaticPositionedAward: hasStaticPositionedAward })), contentHeaderResponsiveAsset)), isCnevideo && lede.scriptEmbedUrl && (React.createElement(CNEVideoEmbed, { ...cneVideoProps, animationClip: lede.animationClip, categories: lede.categories, isLive: lede.isLive, scriptUrl: lede.scriptEmbedUrl, shouldHaveTeaser: true, title: lede.title, videoEmbedPosition: storyVideoPosition })), isGallery && React.createElement(GalleryEmbed, { ...lede, showNoAdsFromParent: true }), socialIcons && React.createElement(SocialIcons.Overlay, { links: socialIcons.links }), isClip && contentHeaderResponsiveAsset, hasLightboxButton && (React.createElement(ContentHeaderLedeLightboxButton, { onClickHandler: () => { document .querySelector('.responsive-image--expandable') .click(); }, ButtonIcon: () => React.createElement(GalleryIcon, null), hasEnableIcon: true, btnStyle: "text", iconPosition: "before", inputKind: "button", isStaticText: true, label: formatMessage(translations.showAllPhotos), shouldRenderCaption: shouldRenderCaption })), shouldRenderCaption && captionWidth !== 'fullbleed' && LeadCaption, awards && hasStaticPositionedAward && (React.createElement(ContentHeaderLeadAssetAwards, { awards: awards, hasStaticPositionedAward: hasStaticPositionedAward })))), shouldRenderRailAnchor && (React.createElement(ContentHeaderLeadRailAnchor, { "data-testid": "ContentHeaderLeadRailAnchor" }))), shouldRenderCaption && captionWidth === 'fullbleed' && (React.createElement(ContentHeaderLeadContentFullWidth, null, React.createElement(ContentHeaderLeadContentCaptionCredit, null, LeadCaption))))); }; /* eslint-enable complexity */ LeadAsset.propTypes = { awards: PropTypes.array, captionWidth: PropTypes.oneOf(['standard', 'fullbleed']), className: PropTypes.string, containerTheme: PropTypes.oneOf(['standard', 'inverted', 'special']), hasInvertedLedeBackground: PropTypes.bool, hasLightboxButton: PropTypes.bool, hasStaticPositionedAward: PropTypes.bool, hideLedeCaption: PropTypes.bool, lede: PropTypes.oneOfType([ PropTypes.shape(ResponsiveAsset.propTypes), PropTypes.shape(CNEVideoEmbed.propTypes) ]).isRequired, mediaWidth: PropTypes.oneOf(['small', 'smallrule', 'grid', 'fullbleed']), shouldAlignCenterWhenNoCaption: PropTypes.bool, shouldRenderRailAnchor: PropTypes.bool, showFullWidthLeadImage: PropTypes.bool, socialIcons: PropTypes.shape(SocialIcons.propTypes) }; module.exports = LeadAsset; module.exports.transformLegacySources = transformLegacySources; //# sourceMappingURL=LeadAsset.js.map /***/ }), /***/ 5239: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled, css } = __webpack_require__(92168); const { applyGridSpacing } = __webpack_require__(1123); const { calculateSpacing, getColorToken, getLinkStyles, maxScreen } = __webpack_require__(26865); const { maxThresholds } = __webpack_require__(99906); const { BREAKPOINTS, INTERACTIVE } = __webpack_require__(96472); const ResponsiveAsset = __webpack_require__(73275); const Awards = __webpack_require__(866); const Caption = __webpack_require__(14760); const Button = __webpack_require__(73730); const { CaptionText, CaptionCredit } = __webpack_require__(38860); const { ResponsiveImageContainer } = __webpack_require__(7228); const responsiveAssetSmallStyle = ` @media (min-width: 1440px) { max-height: 1200px; } `; const responsiveAssetSmallRuleStyle = ` @media (min-width: ${BREAKPOINTS.md}) { max-height: 1000px; } @media (min-width: 1440px) { max-height: 1200px; } `; const colorsConsumptionLeadStandardContexTertiary = 'colors.consumption.lead.standard.context-tertiary'; const ContentHeaderResponsiveAsset = styled(ResponsiveAsset).withConfig({ displayName: 'ContentHeaderResponsiveAsset' }) ` width: 100%; // 1 ⬇. contain images to containers while preserving aspect ratios ${ResponsiveImageContainer} { @supports (object-fit: contain) { object-fit: contain; object-position: center; } @media (min-width: ${BREAKPOINTS.sm}) { width: 100%; } } @supports (object-fit: contain) { ${({ mediaWidth }) => mediaWidth === 'smallrule' && responsiveAssetSmallRuleStyle} } ${ResponsiveImageContainer}, .aspect-ratio--overlay-container { @supports (object-fit: contain) { ${({ mediaWidth }) => mediaWidth === 'small' && responsiveAssetSmallStyle} } .responsive-image { max-height: 900px; } ${({ mediaWidth }) => mediaWidth === 'smallrule' && responsiveAssetSmallRuleStyle} } `; const ContentHeaderLeadAssetContent = styled.figure.withConfig({ displayName: 'ContentHeaderLeadAssetContent' }) ` display: grid; position: relative; grid-column: 1 / -1; /* css-grid: span all columns. (start at column 1 / end at the last column) */ margin: 0 auto; width: 100%; `; const ContentHeaderLeadAssetCaption = styled(Caption).withConfig({ displayName: 'ContentHeaderLeadAssetCaption' }) ` position: relative; z-index: 2; margin-top: 0; margin-bottom: ${calculateSpacing(2)}; width: 100%; justify-self: left; && { text-align: left; } @media (min-width: ${BREAKPOINTS.sm}) { padding-right: ${calculateSpacing(3)}; padding-left: ${calculateSpacing(3)}; } @media (min-width: ${BREAKPOINTS.md}) { padding-right: 0; padding-left: 0; } &, > * { padding-top: ${calculateSpacing(1)}; } > *:first-child { padding-top: 0; } a { ${({ theme }) => getLinkStyles(theme, 'colors.consumption.lead.standard.link', 'colors.consumption.lead.standard.link-hover', 'global')}; transition: color ${INTERACTIVE.timingLinkDefault} ease; } ${CaptionText} { color: ${getColorToken('colors.consumption.lead.standard.heading')}; } ${CaptionCredit} { margin-top: 0; color: ${getColorToken(colorsConsumptionLeadStandardContexTertiary)}; ${({ mediaWidth }) => mediaWidth === 'small' && ` &&{text-align: center;}`} } &.caption-shade--light ${CaptionCredit} { color: ${getColorToken('colors.consumption.lead.standard.syndication')}; } ${({ mediaWidth }) => mediaWidth === 'small' && `&&{text-align: center;}`} ${maxScreen(`${maxThresholds.md}px`)} { ${({ isLedeTextCenterForMobile }) => isLedeTextCenterForMobile && css ` && { text-align: center; } `} } `; const getLeadAssetContentMediaStyle = (ledeContentType, mediaWidth, showFullWidthLeadImage) => { if (ledeContentType === 'gallery' || ledeContentType === 'clip') { return css ` margin-right: 0; margin-left: 0; color: ${getColorToken('colors.consumption.lead.standard.background')}; @media (min-width: ${BREAKPOINTS.sm}) and (max-width: ${BREAKPOINTS.md}) { padding-right: ${calculateSpacing(3)}; padding-left: ${calculateSpacing(3)}; } ${mediaWidth === 'fullbleed' && showFullWidthLeadImage && ` padding-right: 0; padding-left: 0; @media (min-width: ${BREAKPOINTS.sm}) and (max-width: ${BREAKPOINTS.md}) { padding-right: 0; padding-left: 0; } `}; `; } else if (ledeContentType === 'photo') { return ` ${mediaWidth === 'fullbleed' && showFullWidthLeadImage && ` width: 100%; @media (min-width: ${BREAKPOINTS.xl}) { max-height: 1800px; } `}; ${mediaWidth === 'grid' && ` @media (min-width: ${BREAKPOINTS.xl}) { max-height: 1200px; } `}; `; } return ''; }; const ContentHeaderLeadAssetContentMedia = styled.div.withConfig({ displayName: 'ContentHeaderLeadAssetContentMedia' }) ` position: relative; .cne-video-embed { margin: 0 auto; } &.lead-asset__content__clip { width: 100%; } ${({ ledeContentType, mediaWidth, showFullWidthLeadImage }) => getLeadAssetContentMediaStyle(ledeContentType, mediaWidth, showFullWidthLeadImage)} `; // 1. The image ratio should be at most 3:2, i.e. a full bleed lede image // height can not exceed 1067 pixels if the image width is 1600px. // The image is cropped and centered if its height exceeds the limit. const getContentHeaderLeadAssetStyle = (ledeAssetOrientation, mediaWidth, containerTheme, hasInvertedLedeBackground, ledeContentType, theme) => { if (ledeAssetOrientation === 'landscape') { return ` ${ContentHeaderResponsiveAsset} img { width: 100%; } ${mediaWidth === 'small' && ` @media (min-width: ${BREAKPOINTS.lg}) { ${ContentHeaderLeadAssetContent} { grid-column: 1 / 9; } } `}; ${mediaWidth === 'fullbleed' && containerTheme === 'inverted' && ` @media (min-width: ${BREAKPOINTS.lg}) { position: relative; &::before { position: absolute; top: 0; bottom: 0; width: 100vw; content: ''; } ${hasInvertedLedeBackground && ` ::before { background-color: ${getColorToken(theme, 'colors.background.dark')}; } `}; } `}; ${mediaWidth === 'fullbleed' && ` && { padding-right: 0; padding-left: 0; ${ContentHeaderLeadAssetContent} { padding-right: 0; padding-left: 0; } } ${ContentHeaderLeadAssetCaption} { ${applyGridSpacing('padding')} } @media (min-width: ${BREAKPOINTS.md}) { ${ContentHeaderLeadAssetContentMedia} { max-height: none; ${ResponsiveImageContainer} { object-fit: cover; } } } `}; ${mediaWidth === 'smallrule' && ` ${ContentHeaderLeadAssetContent} { @media (min-width: ${BREAKPOINTS.lg}) { grid-column: 2 / 8; } } `}; `; } else if (ledeAssetOrientation === 'portrait') { return ` ${ContentHeaderResponsiveAsset}, ${ContentHeaderResponsiveAsset} ${ResponsiveImageContainer} { @supports (object-fit: contain) { ${mediaWidth === 'small' && ` @media (min-width: ${BREAKPOINTS.lg}) { max-height: 530px; } @media (min-width: ${BREAKPOINTS.xl}) { max-height: 720px; } @media (min-width: 1440px) { max-height: 1200px; } `}; } } // 2. css-grid: portrait images span 8 columns (start at column 3 / end at the third from last column) ${ContentHeaderLeadAssetContent} { @media (min-width: ${BREAKPOINTS.lg}) { grid-column: 3 / -3; // 2 padding-right: 0; padding-left: 0; } } ${mediaWidth === 'small' && ` @media (min-width: ${BREAKPOINTS.lg}) { ${ContentHeaderLeadAssetContent} { grid-column: 1 / 9; } } `}; ${mediaWidth === 'smallrule' && ` ${ContentHeaderLeadAssetContent} { @media (min-width: ${BREAKPOINTS.lg}) { grid-column: 2 / 8; } } `}; @media print { ${ledeContentType === 'photo' && `max-height: ${calculateSpacing(69)};`}; ${ContentHeaderResponsiveAsset} ${ResponsiveImageContainer} { max-height: ${calculateSpacing(69)}; } } `; } return ''; }; const ContentHeaderLeadAsset = styled.div.withConfig({ displayName: 'ContentHeaderLeadAsset' }) ` position: relative; ${({ ledeAssetOrientation, mediaWidth, containerTheme, hasInvertedLedeBackground, ledeContentType, theme }) => getContentHeaderLeadAssetStyle(ledeAssetOrientation, mediaWidth, containerTheme, hasInvertedLedeBackground, ledeContentType, theme)} `; const ContentHeaderLedeLightboxButton = styled(Button.Utility).withConfig({ displayName: 'ContentHeaderLedeLightboxButton' }) ` position: absolute; bottom: ${calculateSpacing(2)}; left: ${calculateSpacing(2)}; background: ${getColorToken('colors.interactive.base.white')}; ${({ shouldRenderCaption }) => shouldRenderCaption && `bottom: ${calculateSpacing(7)};`} &:hover, :active, :focus { background: ${getColorToken('colors.interactive.base.black')}; .button__icon-container { .icon { fill: ${getColorToken('colors.interactive.base.brand-primary')}; } } } `; const ContentHeaderLeadRailAnchor = styled.div.withConfig({ displayName: 'ContentHeaderLeadRailAnchor' }) ` position: absolute; top: 100%; margin-top: ${calculateSpacing(8)}; `; const ContentHeaderLeadContentFullWidth = styled.div.withConfig({ displayName: 'ContentHeaderLeadContentFullWidth' }) ` grid-column: full; background-color: ${getColorToken('colors.consumption.lead.standard.background')}; padding: 0; `; const ContentHeaderLeadContentCaptionCredit = styled.figure.withConfig({ displayName: 'ContentHeaderLeadContentCaptionCredit' }) ` ${applyGridSpacing('padding')} display: grid; grid-gap: 1.25rem; grid-auto-rows: auto; grid-column: main; align-items: center; margin: 0 auto; max-width: 1600px; justify-items: center; @media (min-width: ${BREAKPOINTS.sm}) { --grid-margin: ${calculateSpacing(3)}; } @media (min-width: ${BREAKPOINTS.md}) { grid-template-columns: repeat(12, 1fr); } ${ContentHeaderLeadAssetCaption} { grid-column: 2/-2; padding: 0; } `; const ContentHeaderLeadAssetAwards = styled(Awards).withConfig({ displayName: 'ContentHeaderLeadAssetAwards' }) ` ${({ hasStaticPositionedAward }) => !hasStaticPositionedAward && `position: absolute; right: 0; z-index: 1; margin: ${calculateSpacing(2)}; height: 100px; && { text-align: right; } box-sizing: border-box; `} `; module.exports = { ContentHeaderLeadAsset, ContentHeaderResponsiveAsset, ContentHeaderLeadAssetContent, ContentHeaderLeadAssetCaption, ContentHeaderLeadAssetContentMedia, ContentHeaderLedeLightboxButton, ContentHeaderLeadRailAnchor, ContentHeaderLeadContentFullWidth, ContentHeaderLeadContentCaptionCredit, ContentHeaderLeadAssetAwards }; //# sourceMappingURL=LeadAsset.styles.js.map /***/ }), /***/ 50130: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled } = __webpack_require__(92168); const SocialIcons = __webpack_require__(35676); const { calculateSpacing, getColorToken } = __webpack_require__(26865); const { BREAKPOINTS } = __webpack_require__(96472); const { SocialIconsListItem, SocialIconContainer, SocialIconExternalLink, SocialIconsList } = __webpack_require__(51000); const iconSocialSmall = calculateSpacing(5, 'px'); const ContentHeaderSocialIcons = styled(SocialIcons).withConfig({ displayName: 'ContentHeaderSocialIcons' }) ` display: none; @media (min-width: ${BREAKPOINTS.lg}) { display: table; &:not(.social-icons--circular) { background-color: ${({ theme }) => getColorToken(theme, 'colors.interactive.base.black')}; } } ${SocialIconsListItem} { padding: 0; ${SocialIconExternalLink} ${SocialIconContainer} { background-color: transparent; } &:hover { ${SocialIconExternalLink} ${SocialIconContainer} { background-color: transparent; } } } ${SocialIconsList} { @media (min-width: ${BREAKPOINTS.lg}) { flex-direction: column; margin-left: 0; } } ${SocialIconExternalLink} { padding: 10px; width: ${calculateSpacing(7)}; height: ${calculateSpacing(7)}; } .social-icons__list-item--circular { ${SocialIconExternalLink} { width: ${iconSocialSmall}; height: ${iconSocialSmall}; } } `; module.exports = { ContentHeaderSocialIcons }; //# sourceMappingURL=SocialIconShare.styles.js.map /***/ }), /***/ 60254: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { css } = __webpack_require__(92168); const { applyGridSpacing } = __webpack_require__(1123); const { getLinkStyles, removeTextDecoration, calculateSpacing, getColorToken } = __webpack_require__(26865); const { BREAKPOINTS } = __webpack_require__(96472); const { universalGridCore } = __webpack_require__(89085); const { ContentHeaderRubricContainer } = __webpack_require__(21608); const getPublishDateCommonStyle = (theme) => ` ${getLinkStyles(theme, 'colors.consumption.lead.standard.context-tertiary', null)}; ${removeTextDecoration()} cursor: unset; display: block; padding-top: ${calculateSpacing(1)}; text-align: center; @media (min-width: ${BREAKPOINTS.md}) { padding-top: ${calculateSpacing(1)}; } `; const defaultGridStyle = ` ${universalGridCore(false)} grid-column: main; width: 100%; `; const defaultColorPaddingStyle = css ` ${applyGridSpacing('padding')} color: ${getColorToken('colors.consumption.lead.standard.background')}; `; const rowWithCommonStyle = ` margin-left: 0; padding-left: 0; @media (min-width: ${BREAKPOINTS.lg}) { margin-left: 0; padding-left: 0; } @media (min-width: ${BREAKPOINTS.xxl}) { margin-left: 0; padding-left: 0; } &::before, &::after { @media (min-width: ${BREAKPOINTS.sm}) and (max-width: ${BREAKPOINTS.md}) { display: none; } } ${ContentHeaderRubricContainer} { &:only-child { padding-right: 0; } @media (min-width: ${BREAKPOINTS.md}) { margin-left: 0; padding-left: 0; } } `; module.exports = { getPublishDateCommonStyle, defaultGridStyle, defaultColorPaddingStyle, rowWithCommonStyle }; //# sourceMappingURL=common.styles.js.map /***/ }), /***/ 69389: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { asConfiguredComponent } = __webpack_require__(12892); const { asThemedComponent } = __webpack_require__(20223); const VariedContentHeader = __webpack_require__(39416); module.exports = asThemedComponent(asConfiguredComponent(VariedContentHeader, 'ContentHeader')); //# sourceMappingURL=index.js.map /***/ }), /***/ 17384: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const React = __webpack_require__(96540); const PropTypes = __webpack_require__(5556); const ResponsiveAsset = __webpack_require__(73275); const GalleryEmbed = __webpack_require__(47811); const CNEVideoEmbed = __webpack_require__(59098); const { transformLegacySources } = __webpack_require__(90072); const { Image } = __webpack_require__(77032); const { storyVideoPosition } = __webpack_require__(62327); /** * ImageBlock component * * Image for the TextOverlay ContentHeader * * @param {object} props - React Props * @param {object} [props.lede] - Optional lede image asset * @returns {ReactElement}
*/ const ImageBlock = ({ lede = null }) => { if (!lede || Object.keys(lede).length === 0) { return null; } const isCnevideo = lede.modelName === 'cnevideo'; const isGallery = lede.modelName === 'gallery'; const augmentedLede = transformLegacySources(lede); return (React.createElement(Image, null, !isCnevideo && !isGallery && React.createElement(ResponsiveAsset, { ...augmentedLede }), isCnevideo && lede.scriptEmbedUrl && (React.createElement(CNEVideoEmbed, { shouldAutoplay: true, scriptUrl: lede.scriptEmbedUrl, videoEmbedPosition: storyVideoPosition })), isGallery && React.createElement(GalleryEmbed, { ...lede, showNoAdsFromParent: true }))); }; ImageBlock.propTypes = { lede: PropTypes.oneOfType([ PropTypes.shape(ResponsiveAsset.propTypes), PropTypes.shape(GalleryEmbed.propTypes), PropTypes.shape(CNEVideoEmbed.propTypes) ]) }; ImageBlock.displayName = 'ImageBlock'; module.exports = ImageBlock; //# sourceMappingURL=ImageBlock.js.map /***/ }), /***/ 60541: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const React = __webpack_require__(96540); const PropTypes = __webpack_require__(5556); const Caption = __webpack_require__(14760); const Rubric = __webpack_require__(34187); const NativeShareButton = __webpack_require__(77554); const Bylines = __webpack_require__(52540); const ResponsiveAsset = __webpack_require__(73275); const GalleryEmbed = __webpack_require__(47811); const CNEVideoEmbed = __webpack_require__(59098); const SocialIcons = __webpack_require__(35676); const CategoryEyebrow = __webpack_require__(71479); const ImageBlock = __webpack_require__(17384); const LiveIndicator = __webpack_require__(77938); const { useNativeShare } = __webpack_require__(90072); const { TextOverlayLogo, TextOverlayLogoLink, TextOverlayLogoImage, TextOverlayWrapper, ImageWrapper, Content, ContentAlign, Hed, DekWrapper, Dek, Figure, ContentDivider, ContributorImage, Accreditation, PublishDate, DekAndCaption, ContentGrid } = __webpack_require__(77032); const Clamp = __webpack_require__(94337); const LiveEventSponsorBlock = __webpack_require__(10705); /** * TextOverlay component * * Layout positioning for the ContentHeader * * @param {object} props - React Props * @param {string} [props.bylineVariation] - Optional variation of byline. * @param {string} [props.className] - Additional className to TextOvery Wrapper * @param {string} [props.contentAlign] - Alignment of the content 'center' or 'left' * @param {object} [props.contentHeaderCategories] - Optional object for content header categories * @param {string} [props.contentHeaderCategories.title] - Optional * @param {Array} [props.contentHeaderCategories.tags] - Optional * @param {object} [props.contributorImage] - Optional contributor image object. * @param {boolean} [props.hideContributors] - Optional hide contributors * @param {boolean} [props.hideDangerousDek] - Optional hide dek default value is false * @param {object} [props.contributors] - Optional object containing data to create authors byline. * @param {string} [props.dangerousDek] - Optional Article Dek. * @param {string} [props.dangerousHed] - Optional Article Hed. * @param {string} [props.background] - Background over the image 'gradient' or 'solid' * @param {boolean} [props.hasNativeShareButton] - Use native sharing * @param {boolean} [props.hideLedeCaption] - hide lede image caption * @param {boolean} [props.hidePublishDate] - Show or hide the publishDate * @param {boolean} [props.hideShareButtons] - Hide the share buttons * @param {boolean} [props.hideRubric] - Hide the share buttons * @param {boolean} [props.isLiveStoryType] - Optional Flag to mark Live Story * @param {boolean} [props.isStoryLive] - Optional Flag to mark live story is live * @param {object} [props.lede] - Optional lede image asset * @param {string} [props.ledeCaption] - Optional lede image caption * @param {object} [props.logoImage] - Logo image data including sources and alt text * @param {object} [props.logoBaseUrl] - Logo image data including sources and alt text * @param {string} [props.modifiedDate] - Optional modified date of the content * @param {object} [props.numberOfLinesToClamp] - Optional to clamp number of lines * @param {object} [props.preambles] - optional contributors preambles * @param {string} [props.publishDate] - Publish Date. * @param {object} [props.rubric] - Optional rubric. * @param {boolean} [props.shouldUseCustomPreambles] - Optional to use custom preambles * @param {object} [props.shouldUseCutomColorLiveIndicator] - Optional to view custombackgroundColor. * @param {boolean} [props.showContentDivider] - Optional to show a dividing line under the hed * @param {boolean} [props.showContributorImage] - Optional to show ContributorImage * @param {boolean} [props.showLogo] - hide Logo image * @param {boolean} [props.showSponsorBlock] - Optional to show sponsorContents * @param {object} [props.socialMedia] - Optional Social Icon Links to share article. * @param {object} [props.socialDescription] - Optional social description to be used with the native share button. * @param {object} [props.socialTitle] - Optional social title to be used with the native share button. * @param {string} [props.theme] - Optional theme name * @param {object} [props.sponsoredContentHeaderProps] - Optional sponsored text and logo details * @param {string} [props.sponsorByline] - Optional sponsored byline text * @param {bool} [props.showTextOverlayDek] - Show textOverlay dek * @param {boolean} [props.isReducedBottomMargin] - To reduce the bottom margin for the ContentGrid Grid Item * @param {boolean} [props.isStandardCaption] - To make the caption standard description token * @param {boolean} [props.isRubricInverted] - To apply inverted color token to rubric * @param {boolean} [props.isDekInverted] - Show inverted color token in Dek * @param {boolean} [props.showEnhancedPublishDate] - Show enhanced type token for PublishDate * @param {boolean} [props.hasDekMarginReduced] - To reduce Dek margin * @param {boolean} [props.shouldLimitContentWidth] - Limit the content width. * * @returns {ReactElement}
*/ // eslint-disable-next-line complexity const TextOverlay = ({ background = 'gradient', bylineVariation = 'Inverted', className = '', contentAlign = 'center', contentHeaderCategories, contributorImage, contributors, dangerousDek, dangerousHed, hasNativeShareButton, hideContributors = false, hideDangerousDek = false, hideLedeCaption = false, hidePublishDate, hideShareButtons, hideRubric, showEnhancedPublishDate = false, isLiveStoryType = false, isStoryLive = false, lede, ledeCaption, logoImage, logoBaseUrl = '/', modifiedDate, numberOfLinesToClamp = 2, preambles, publishDate, rubric, shouldUseCustomPreambles, shouldUseCutomColorLiveIndicator = false, showContentDivider = false, showContributorImage = true, showLogo, showTextOverlayDek = false, isDekInverted = false, showSponsorBlock = false, socialDescription, socialMedia, socialTitle, sponsoredContentHeaderProps, sponsorByline, theme, isReducedBottomMargin = false, isStandardCaption = false, isRubricInverted = false, hasDekMarginReduced = false, shouldLimitContentWidth = false }) => { const { showNativeShareButton, pageUrl } = useNativeShare(hasNativeShareButton); const isInverted = theme === 'inverted'; const shouldRenderCaption = lede && !hideLedeCaption && ((lede.caption && lede.caption.trim()) || (lede.credit && lede.credit.trim()) || ledeCaption); const getRubricOrLiveIndicator = () => { if (isLiveStoryType && isStoryLive) { return (React.createElement(ContentAlign, { contentAlign: contentAlign }, React.createElement(LiveIndicator, { hasBackground: true, isDiscovery: false, shouldEnableAnimation: true, shouldUseCutomColorLiveIndicator: shouldUseCutomColorLiveIndicator }))); } return rubric ? (React.createElement(ContentAlign, { contentAlign: contentAlign, "data-testid": "ContentHeaderRubric" }, React.createElement(Rubric.Inverted, { ...rubric }))) : null; }; const getLiveEventSponsorBlock = () => { if (isLiveStoryType && showSponsorBlock) { return (React.createElement(LiveEventSponsorBlock, { sponsorByline: sponsorByline, sponsoredContentHeaderProps: { ...sponsoredContentHeaderProps } })); } return null; }; const getLogoImage = () => { if (showLogo && logoImage) { return (React.createElement(TextOverlayLogo, null, React.createElement(TextOverlayLogoLink, { href: logoBaseUrl }, React.createElement(TextOverlayLogoImage, { ...logoImage })))); } return null; }; const dateTimeProps = modifiedDate && { datetime: modifiedDate }; return (React.createElement(TextOverlayWrapper, { className: className, "data-testid": "ContentHeader", isRubricInverted: isRubricInverted }, React.createElement(ImageWrapper, { background: background, contentAlign: contentAlign, shouldLimitContentWidth: shouldLimitContentWidth }, React.createElement(ImageBlock, { lede: lede }), getLogoImage(), React.createElement(ContentGrid, { contentAlign: contentAlign, isReducedBottomMargin: isReducedBottomMargin }, React.createElement(Content, null, !hideRubric && getRubricOrLiveIndicator(), React.createElement(ContentAlign, { contentAlign: contentAlign }, React.createElement(CategoryEyebrow, { ...contentHeaderCategories })), React.createElement(Hed, { dangerouslySetInnerHTML: { __html: dangerousHed }, "data-testid": "ContentHeaderHed", contentAlign: contentAlign }), !hideDangerousDek && dangerousDek && showTextOverlayDek && (React.createElement(Dek, { dangerouslySetInnerHTML: { __html: dangerousDek }, contentAlign: contentAlign, "data-testid": "ContentHeaderDek", isInverted: isDekInverted || isInverted, hasDekMarginReduced: hasDekMarginReduced })), showContentDivider && (React.createElement(ContentDivider, { contentAlign: contentAlign })), getLiveEventSponsorBlock(), showContributorImage && contributorImage && (React.createElement(ContributorImage, { contentAlign: contentAlign }, React.createElement(ResponsiveAsset, { ...contributorImage }))), React.createElement(Accreditation, { contentAlign: contentAlign }, contributors && !hideContributors && (React.createElement(Bylines, { contributors: contributors, bylineVariation: bylineVariation, contentAlign: contentAlign, isCompact: false, shouldUseCustomPreambles: shouldUseCustomPreambles, preambles: preambles })), !hidePublishDate && (React.createElement(PublishDate, { "data-testid": "ContentHeaderPublishDate", contentAlign: contentAlign, showEnhancedPublishDate: showEnhancedPublishDate, ...dateTimeProps }, publishDate))), !hideShareButtons && (showNativeShareButton ? (React.createElement(ContentAlign, { contentAlign: contentAlign, bottomSpacing: 4 }, React.createElement(NativeShareButton, { hasDarkBackground: true, shareData: { url: pageUrl, title: socialTitle, text: socialDescription }, theme: "inverted" }))) : (socialMedia && (React.createElement(ContentAlign, { contentAlign: contentAlign, bottomSpacing: 4 }, React.createElement(SocialIcons.Footer, { ...socialMedia })))))))), (shouldRenderCaption || (dangerousDek && !hideDangerousDek)) && (React.createElement(DekAndCaption, { isStandardCaption: isStandardCaption }, shouldRenderCaption && (React.createElement(Figure, { contentAlign: contentAlign }, React.createElement(Caption, { dangerousCaptionText: lede.caption, dangerousCredit: isLiveStoryType ? lede.credit || ledeCaption : lede.credit, topSpacing: 0 }))), !hideDangerousDek && dangerousDek && !showTextOverlayDek && (React.createElement(DekWrapper, null, React.createElement(Clamp, { isCollapsible: true, lines: numberOfLinesToClamp }, React.createElement(Dek, { dangerouslySetInnerHTML: { __html: dangerousDek }, contentAlign: contentAlign, "data-testid": "ContentHeaderDek", isInverted: isInverted })))))))); }; TextOverlay.propTypes = { background: PropTypes.oneOf(['gradient', 'solid']), bylineVariation: PropTypes.string, className: PropTypes.string, contentAlign: PropTypes.oneOf(['center', 'left']), contentHeaderCategories: PropTypes.shape({ title: PropTypes.string, tags: PropTypes.array }), contributorImage: PropTypes.shape(ResponsiveAsset.propTypes), contributors: PropTypes.shape(Bylines.propTypes.contributors), dangerousDek: PropTypes.string, dangerousHed: PropTypes.string, hasDekMarginReduced: PropTypes.bool, hasNativeShareButton: PropTypes.bool, hideContributors: PropTypes.bool, hideDangerousDek: PropTypes.bool, hideLedeCaption: PropTypes.bool, hidePublishDate: PropTypes.bool, hideRubric: PropTypes.bool, hideShareButtons: PropTypes.bool, isDekInverted: PropTypes.bool, isLiveStoryType: PropTypes.bool, isReducedBottomMargin: PropTypes.bool, isRubricInverted: PropTypes.bool, isStandardCaption: PropTypes.bool, isStoryLive: PropTypes.bool, lede: PropTypes.oneOfType([ PropTypes.shape(ResponsiveAsset.propTypes), PropTypes.shape(GalleryEmbed.propTypes), PropTypes.shape(CNEVideoEmbed.propTypes) ]), ledeCaption: PropTypes.string, logoBaseUrl: PropTypes.string, logoImage: PropTypes.shape(ResponsiveAsset.propTypes), modifiedDate: PropTypes.string, numberOfLinesToClamp: PropTypes.number, preambles: PropTypes.object, publishDate: PropTypes.string, rubric: PropTypes.shape(Rubric.propTypes), shouldLimitContentWidth: PropTypes.bool, shouldUseCustomPreambles: PropTypes.bool, shouldUseCutomColorLiveIndicator: PropTypes.bool, showContentDivider: PropTypes.bool, showContributorImage: PropTypes.bool, showEnhancedPublishDate: PropTypes.bool, showLogo: PropTypes.bool, showSponsorBlock: PropTypes.bool, showTextOverlayDek: PropTypes.bool, socialDescription: PropTypes.string, socialMedia: PropTypes.shape(SocialIcons.propTypes), socialTitle: PropTypes.string, sponsorByline: PropTypes.string, sponsoredContentHeaderProps: PropTypes.shape({ campaignUrl: PropTypes.string, sponsorLogo: PropTypes.shape(ResponsiveAsset.propTypes), sponsorName: PropTypes.string }), theme: PropTypes.oneOf(['standard', 'inverted', 'special']) }; TextOverlay.displayName = 'TextOverlay'; module.exports = TextOverlay; //# sourceMappingURL=TextOverlay.js.map /***/ }), /***/ 27308: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const TextOverlay = __webpack_require__(60541); module.exports = TextOverlay; //# sourceMappingURL=index.js.map /***/ }), /***/ 77032: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled, css } = __webpack_require__(92168); const { getColorToken, getTypographyStyles, calculateSpacing, minMaxScreen, minScreen, maxScreen, getColorStyles } = __webpack_require__(26865); const { maxThresholds } = __webpack_require__(99906); const { SocialIconsList } = __webpack_require__(51000); const { BREAKPOINTS } = __webpack_require__(96472); const { BaseText, BaseLink } = __webpack_require__(76955); const { SITE_HEADER_TOP_HEIGHT, SITE_HEADER_TOP_STICKY_HEIGHT_MD, SITE_HEADER_TOP_STICKY_HEIGHT_LG } = __webpack_require__(27985); const Grid = __webpack_require__(86659); const { GridItem } = __webpack_require__(40653); const { universalGridCore } = __webpack_require__(89085); const { applyGridSpacing } = __webpack_require__(1123); const ResponsiveAsset = __webpack_require__(73275); const { CaptionText } = __webpack_require__(38860); const { RubricName, RubricLink } = __webpack_require__(6613); const { cssVariablesGrid } = __webpack_require__(1123); const cssToHideSocialIcons = (socialIconsToHide) => socialIconsToHide .map((socialShareKey) => ` .social-icons__list-item--${socialShareKey} { display: none; } `) .join('\n'); const TextOverlayWrapper = styled.header.withConfig({ displayName: 'TextOverlayWrapper' }) ` .responsive-clip { height: 100%; } overflow: hidden; ${({ isRubricInverted, theme }) => isRubricInverted && css ` ${RubricLink}, ${RubricName} { ${getColorStyles(theme, 'color', 'colors.consumption.lead.inverted.context-signature')} } `} `; const Accreditation = styled.div.withConfig({ displayName: 'Accreditation' }) ` ${({ contentAlign }) => contentAlign === 'center' ? `margin: ${calculateSpacing(2)} auto` : `margin: ${calculateSpacing(2)} 0`} `; const PublishDate = styled.time .withConfig({ displayName: 'PublishDate' }) .attrs(({ datetime }) => ({ dateTime: datetime })) ` ${({ theme, showEnhancedPublishDate }) => getTypographyStyles(theme, showEnhancedPublishDate ? 'typography.definitions.globalEditorial.context-tertiary' : 'typography.definitions.globalEditorial.accreditation-core')} display: block; margin: ${calculateSpacing(1)} 0 ${calculateSpacing(4)}; text-align: ${({ contentAlign }) => contentAlign}; color: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.inverted.context-tertiary')}; `; const ContentGrid = styled(Grid.WithMargins).withConfig({ displayName: 'ContentGrid' }) ` > ${GridItem} { grid-column: 1 / span 4; margin-bottom: 4.5rem; @media (min-width: ${BREAKPOINTS.md}) { grid-column: ${({ contentAlign }) => contentAlign === 'left' ? '1 / span 10' : '2 / span 10'}; } } ${({ isReducedBottomMargin }) => isReducedBottomMargin && ` > ${GridItem} { margin-bottom: ${calculateSpacing(4)}; ${Accreditation}, ${PublishDate} { margin-bottom: 0; } ${minScreen(BREAKPOINTS.lg)} { margin-bottom: ${calculateSpacing(8)}; } } `} `; const ImageWrapper = styled.div.withConfig({ displayName: 'ImageWrapper' }) ` display: flex; position: relative; align-items: flex-end; justify-content: ${({ contentAlign }) => contentAlign}; @media (orientation: landscape) { display: grid; min-height: 400px; } @media (max-width: ${BREAKPOINTS.md}) { display: grid; min-height: 667px; } @media (min-width: ${BREAKPOINTS.md}) { display: grid; height: calc( 100vh - ${SITE_HEADER_TOP_HEIGHT} - ${SITE_HEADER_TOP_STICKY_HEIGHT_MD} ); } @media (min-width: ${BREAKPOINTS.lg}) { display: grid; height: calc( 100vh - ${SITE_HEADER_TOP_HEIGHT} - ${SITE_HEADER_TOP_STICKY_HEIGHT_LG} ); } @media (min-width: ${BREAKPOINTS.xl}) { display: grid; min-height: 720px; } ${({ shouldLimitContentWidth }) => shouldLimitContentWidth && ` ${cssVariablesGrid()} ${minScreen(BREAKPOINTS.lg)} { grid-template-columns: repeat(12, 1fr); gap: var(--grid-gap); } ${ContentGrid} { ${minScreen(BREAKPOINTS.lg)} { padding: 0; } ${minMaxScreen(BREAKPOINTS.lg, `${maxThresholds.xl}px`)} { grid-column: 3 / span 8; } ${minScreen(BREAKPOINTS.xl)} { grid-column: 4 / span 6; } } `} &::after { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: ${({ background }) => background === 'gradient' ? 'linear-gradient(to top, rgb(0, 0, 0) 0, transparent 65%)' : 'rgba(0, 0, 0, 0.65)'}; content: ''; pointer-events: none; } `; const Image = styled.div.withConfig({ displayName: 'Image' }) ` position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; .responsive-asset { &::before { display: block; width: 100%; content: ''; } } > *, picture, .responsive-asset picture, /* set to override the css specifity set on this component */ img { object-fit: cover; object-position: top; width: 100%; height: 100%; } picture { position: absolute; top: 0; left: 0; height: 100%; } `; const ContentAlign = styled.div.withConfig({ displayName: 'ContentAlign' }) ` display: flex; flex-wrap: wrap; justify-content: ${({ contentAlign }) => contentAlign}; width: 100%; > .social-icons--footer { ${SocialIconsList} { @media (min-width: ${BREAKPOINTS.md}) { position: relative; /* for bookmark onboarding alert placement */ } } } ${({ socialIconsToHide }) => socialIconsToHide && ` ${maxScreen(BREAKPOINTS.lg)} { ${cssToHideSocialIcons(socialIconsToHide)} } `} ${({ bottomSpacing }) => bottomSpacing && `margin-bottom: ${calculateSpacing(bottomSpacing)};`} `; const Content = styled.div.withConfig({ displayName: 'Content' }) ` position: relative; z-index: 2; `; const Hed = styled(BaseText).withConfig({ displayName: 'Hed' }) ` text-align: ${({ contentAlign }) => contentAlign}; `; Hed.defaultProps = { as: 'h1', colorToken: 'colors.consumption.lead.inverted.heading', topSpacing: 2, typeIdentity: 'typography.definitions.consumptionEditorial.hed-standard' }; const Figure = styled(BaseText).withConfig({ displayName: 'Figure' }) ` grid-column: 1 / span 4; text-align: ${({ contentAlign }) => contentAlign}; @media (min-width: ${BREAKPOINTS.md}) { grid-column: 1 / span 12; } `; Figure.defaultProps = { as: 'figure', colorToken: 'colors.consumption.lead.standard.description', topSpacing: 2, typeIdentity: 'typography.definitions.consumptionEditorial.description-embed' }; const DekAndCaption = styled('div').withConfig({ displayName: 'DekAndCaption' }) ` padding-top: ${calculateSpacing(1, 'px')}; ${universalGridCore()} ${applyGridSpacing('padding')} ${({ isStandardCaption, theme }) => isStandardCaption && ` ${Figure} { text-align: left; margin-top: 0; ${minScreen(BREAKPOINTS.lg)} { grid-column: 2 / -2; } } ${CaptionText} { ${getColorStyles(theme, 'color', 'colors.consumption.lead.standard.description')}; } `} `; const DekWrapper = styled.div.withConfig({ displayName: 'DekWrapper' }) ` grid-column: 1 / span 4; text-align: ${({ contentAlign }) => contentAlign}; @media (min-width: ${BREAKPOINTS.md}) { grid-column: 3 / span 8; } `; const Dek = styled(BaseText).withConfig({ displayName: 'Dek' }) ` text-align: ${({ contentAlign }) => contentAlign}; ${({ isInverted, theme }) => isInverted && ` color: ${getColorToken(theme, 'colors.consumption.lead.inverted.description')}; `} ${({ hasDekMarginReduced }) => hasDekMarginReduced && ` margin: ${calculateSpacing(2)} 0 0 0; `} `; Dek.defaultProps = { as: 'p', bottomSpacing: 4, colorToken: 'colors.consumption.lead.standard.description', topSpacing: 3, typeIdentity: 'typography.definitions.consumptionEditorial.description-core' }; const ContentDivider = styled.span.withConfig({ displayName: 'ContentDivider' }) ` display: block; margin-top: ${calculateSpacing(4)}; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: ${({ theme }) => getColorToken(theme, 'colors.consumption.lead.standard.accent')}; width: 100px; ${({ contentAlign }) => contentAlign === 'center' && `margin: ${calculateSpacing(4)} auto 0`} `; const ContributorImage = styled.div.withConfig({ displayName: 'ContributorImage' }) ` display: block; margin-top: ${calculateSpacing(4)}; border-radius: 50%; min-width: 60px; max-width: 66px; min-height: 60px; max-height: 66px; overflow: hidden; ${({ contentAlign }) => contentAlign === 'center' && `margin: ${calculateSpacing(4)} auto 0`} `; const TextOverlayLogoImage = styled(ResponsiveAsset).withConfig({ displayName: 'TextOverlayLogoImage' }) ` grid-column: 1 / span 4; img { max-width: 100%; height: 100px; vertical-align: bottom; } `; const TextOverlayLogoLink = styled(BaseLink).withConfig({ displayName: 'TextOverlayLogoLink' }) ` display: grid; grid-template-columns: repeat(4, 1fr); gap: ${calculateSpacing(2)}; @media (max-width: ${BREAKPOINTS.md}) { padding-right: calc(1 * ${calculateSpacing(3)}); padding-left: calc(1 * ${calculateSpacing(3)}); } `; const TextOverlayLogo = styled.div.withConfig({ displayName: 'TextOverlayLogo' }) ` margin: auto; margin-top: 1.5rem; `; module.exports = { TextOverlayLogo, TextOverlayLogoLink, TextOverlayLogoImage, TextOverlayWrapper, ImageWrapper, Image, ContentAlign, Content, Hed, DekAndCaption, DekWrapper, Dek, Figure, ContentDivider, ContributorImage, Accreditation, PublishDate, ContentGrid }; //# sourceMappingURL=styles.js.map /***/ }), /***/ 50459: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const React = __webpack_require__(96540); const PropTypes = __webpack_require__(5556); const { AddressBlockWrapper, HeaderContactInformation, HeaderSocialInformation, HeaderAddressDetails } = __webpack_require__(1757); const EmailIcon = __webpack_require__(57942); const InstagramIcon = __webpack_require__(7994); const FacebookIcon = __webpack_require__(69192); const PinterestIcon = __webpack_require__(24888); const LinkedInIcon = __webpack_require__(25534); const TwitterIcon = __webpack_require__(33189); const { isIOSDevice } = __webpack_require__(72362); const AddressBlock = ({ address, email, phone, socialMedia, link }) => { if (!address && !phone && !email) { return null; } const { street, city, state, postalCode, country } = address; // Check which address item is first so you do not have a comma before first item const addressValues = [street, city, state, postalCode, country]; const nonEmptyAddressValues = []; addressValues.forEach((item) => { if (item) { nonEmptyAddressValues.push(item); } }); const socialMediaIcons = { Instagram: InstagramIcon, Facebook: FacebookIcon, Pinterest: PinterestIcon, LinkedIn: LinkedInIcon, Twitter: TwitterIcon }; const openMapInMobile = (e) => { e.preventDefault(); if (nonEmptyAddressValues?.length > 0) { if (isIOSDevice()) { /* if iOS, open in Apple Maps */ window.open(`maps://maps.apple.com/maps?q=${nonEmptyAddressValues}`); } else { /* else use Google Maps */ window.open(`https://maps.google.com?q=${nonEmptyAddressValues}`); } } }; // Check and trim https:// or http exist and add www. if its missing. let checkedUrl = link.replace(/^(https?:|)\/\//, ''); checkedUrl = checkedUrl.includes('www.') ? checkedUrl : `www.${checkedUrl}`; return (React.createElement(AddressBlockWrapper, null, address && (React.createElement(HeaderAddressDetails, { "data-testid": "HeaderAddressDetails", href: "", onClick: (e) => openMapInMobile(e) }, React.createElement("div", { className: "StreetAndCity" }, street && React.createElement("span", { "data-testid": "HeaderAddressStreet" }, street), city && (React.createElement("span", { "data-testid": "HeaderAddressCity" }, nonEmptyAddressValues[0] !== city && ', ', city, nonEmptyAddressValues[0] !== state && ', '))), React.createElement("div", { className: "StatePostalAndCountry" }, state && React.createElement("span", { "data-testid": "HeaderAddressState" }, state), postalCode && (React.createElement("span", { "data-testid": "HeaderAddressPostalCode" }, nonEmptyAddressValues[0] !== postalCode && ', ', postalCode)), country && (React.createElement("span", { "data-testid": "HeaderAddressCountry" }, nonEmptyAddressValues[0] !== country && ', ', country))))), React.createElement(HeaderContactInformation, null, phone && (React.createElement("div", null, React.createElement("a", { "data-testid": "HeaderAddressPhone", href: `tel:${phone}`, "aria-label": "Opens in a new window", rel: "nofollow noopener noreferrer", target: "_blank" }, phone))), link && (React.createElement("a", { "data-testid": "HeaderAddressWebUrl", href: link, "aria-label": "Opens in a new window", rel: "nofollow noopener noreferrer", target: "_blank" }, checkedUrl))), React.createElement(HeaderSocialInformation, null, email && (React.createElement("a", { "data-testid": "HeaderAddressEmail", href: `mailto:${email}`, "aria-label": "Opens in a new window", rel: "nofollow noopener noreferrer", target: "_blank" }, React.createElement(EmailIcon, null))), socialMedia?.length > 0 && socialMedia.map((media, index) => { const IconComponent = socialMediaIcons[media.network]; return (IconComponent && (React.createElement("a", { key: index, "data-testid": `HeaderAddress${media.network}`, href: media.handle, "aria-label": `Opens ${media.network} in a new window`, rel: "nofollow noopener noreferrer", target: "_blank" }, React.createElement(IconComponent, null)))); })))); }; AddressBlock.propTypes = { address: PropTypes.object, email: PropTypes.string, link: PropTypes.string, phone: PropTypes.string, socialMedia: PropTypes.array }; module.exports = AddressBlock; //# sourceMappingURL=AddressBlock.js.map /***/ }), /***/ 71479: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const Categories = __webpack_require__(95865); /** * Wrapper to check the flag and data are set for eyebrow * * @param {boolean} [props.hasCategoryEyebrow] - the flag to display or not * @param {Array} [props.tags] - the array of tags * @param {string} [props.title] - the title * @returns {ReactElement|false} - The eyebrow category list */ // TODO: this logic we can move to const CategoryEyebrow = ({ hasCategoryEyebrow, tags, title }) => hasCategoryEyebrow && tags?.length > 0 ? (React.createElement(Categories, { title: title, tags: tags })) : null; CategoryEyebrow.propTypes = { hasCategoryEyebrow: PropTypes.bool, tags: PropTypes.array, title: PropTypes.string }; module.exports = CategoryEyebrow; //# sourceMappingURL=CategoryEyebrow.js.map /***/ }), /***/ 89656: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const { ContentHeaderRubricIssueDate } = __webpack_require__(21608); /** * The issue date display * * @param {boolean} props.hideIssueDate - Show or hide the issue date * @param {boolean} props.hideIssueDatePipeSeparator - Show or hide pipe separator between issue date and rubric * @param {string} props.issueDate - the Issue Date * @param {string} props.issueLink - Optional link for this article's issue * @param {boolean} props.showIssueCopyByDate - Optional show the text "Issue" by the issue date. * @returns {ReactElement|null} */ const IssueDate = ({ hideIssueDate, hideIssueDatePipeSeparator, issueDate, issueLink, showIssueCopyByDate }) => { if (hideIssueDate || !issueDate) { return null; } return (React.createElement(ContentHeaderRubricIssueDate, { name: `${issueDate}${showIssueCopyByDate ? ' Issue' : ''}`, url: issueLink, hideIssueDatePipeSeparator: hideIssueDatePipeSeparator })); }; IssueDate.propTypes = { hideIssueDate: PropTypes.bool, hideIssueDatePipeSeparator: PropTypes.bool, issueDate: PropTypes.string, issueLink: PropTypes.string, showIssueCopyByDate: PropTypes.bool }; module.exports = IssueDate; //# sourceMappingURL=IssueDate.js.map /***/ }), /***/ 10705: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const { SponsorContentContainer, SponsorImage, SponsoredContent, SponsoredContentCampaignLink } = __webpack_require__(61221); const ResponsiveAsset = __webpack_require__(73275); /** * Live Event Sponsor block * * @param {object} [props.sponsorLogo] - Optional sponsor logo image * @param {string} [props.sponsorName] - Optional sponsor name * @param {string} [props.campaignUrl] - The link to the sponsor's ad campaign or main site * @returns {ReactElement} */ const LiveEventSponsorBlock = ({ sponsorByline, sponsoredContentHeaderProps, theme = 'inverted' }) => { const { sponsorLogo, sponsorName, campaignUrl } = sponsoredContentHeaderProps; if (!sponsorName || !sponsorByline) { return null; } const sponsorBylineText = `${sponsorByline} ${sponsorName}`; return (React.createElement(SponsorContentContainer, null, React.createElement(SponsoredContentCampaignLink, { additionalRelVals: ['sponsored'], href: campaignUrl }, React.createElement(SponsorImage, { ...sponsorLogo }), React.createElement(SponsoredContent, { containerTheme: theme }, sponsorBylineText)))); }; LiveEventSponsorBlock.propTypes = { sponsorByline: PropTypes.string, sponsoredContentHeaderProps: PropTypes.shape({ campaignUrl: PropTypes.string, sponsorLogo: PropTypes.shape(ResponsiveAsset.propTypes), sponsorName: PropTypes.string }), theme: PropTypes.oneOf(['standard', 'inverted', 'special']) }; module.exports = LiveEventSponsorBlock; //# sourceMappingURL=LiveEventSponsorBlock.js.map /***/ }), /***/ 61221: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { default: styled } = __webpack_require__(92168); const { BREAKPOINTS } = __webpack_require__(96472); const { calculateSpacing, getColorToken, getTypographyStyles } = __webpack_require__(26865); const ResponsiveAsset = __webpack_require__(73275); const { SpanWrapper } = __webpack_require__(18117); const ExternalLink = __webpack_require__(39832); const SponsorContentContainer = styled.div.withConfig({ displayName: 'SponsorContentContainer' }) ` margin-top: ${calculateSpacing(3)}; text-align: center; ${SpanWrapper} { display: inline-flex; margin-top: 0; margin-bottom: 0; width: 66px; } `; const getSponsoredBorderColor = (containerTheme, theme) => { if (containerTheme === 'inverted' || containerTheme === 'special') { return ` border-color: ${getColorToken(theme, 'colors.consumption.lead.inverted.divider')}; `; } return ` border-color: ${getColorToken(theme, 'colors.consumption.lead.standard.divider')}; `; }; const SponsorImage = styled(ResponsiveAsset).withConfig({ displayName: 'SponsorImage' }) ` margin-right: auto; margin-left: auto; img { border: 1px solid; border-radius: 50%; ${({ containerTheme, theme }) => getSponsoredBorderColor(containerTheme, theme)} width: 64px; height: 64px; } `; const getColorBasedOnTheme = (containerTheme, theme) => { if (containerTheme === 'inverted' || containerTheme === 'special') { return ` color: ${getColorToken(theme, 'colors.consumption.lead.inverted.syndication')}; `; } return ` color: ${getColorToken(theme, 'colors.consumption.lead.standard.syndication')}; `; }; const SponsoredContent = styled.div.withConfig({ displayName: 'SponsoredContent' }) ` ${({ theme }) => getTypographyStyles(theme, 'typography.definitions.globalEditorial.syndication')} display: block; margin: ${calculateSpacing(2, 'px')} 0 ${calculateSpacing(2, 'px')}; ${({ containerTheme, theme }) => getColorBasedOnTheme(containerTheme, theme)} @media (min-width: 0) and (max-width: ${BREAKPOINTS.md}) { margin: ${calculateSpacing(1.5, 'px')} 0 ${calculateSpacing(1.5, 'px')}; } `; const SponsoredContentCampaignLink = styled(ExternalLink).withConfig({ displayName: 'SponsoredContentCampaignLink' }) ` text-decoration: none; `; module.exports = { SponsorContentContainer, SponsorImage, SponsoredContent, SponsoredContentCampaignLink }; //# sourceMappingURL=LiveEventSponsorBlock.styles.js.map /***/ }), /***/ 33198: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const PropTypes = __webpack_require__(5556); const React = __webpack_require__(96540); const { ContentHeaderTitleBlockPublishDate } = __webpack_require__(1757); /** * The publish date block * * @param {boolean} props.hasExtraSpaceBetweenSeparator - If `hasExtraSpaceBetweenSeparator` is set to true, there is a bigger margin between the | * @param {boolean} [props.hidePublishDate] - Toggles the display of publishDate * @param {string} props.publishDate - Publish Date. * @param {string} [props.modifiedDate] - Optional modified date of the content * @returns {ReactElement|null}