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RhD,OAAOiD,aAAejD,OAAOiD,cAAgB,GAC7CjD,OAAOiD,aAAajL,QAApB,OACOgI,OAAOiD,aAAajL,SAAW,IAC/BqK,EAAQrK,SAGXgI,OAAOiD,aAAaX,YAApB,OACGtC,OAAOiD,aAAaX,aAAe,IACnCD,EAAQC,aAEY,MAAMY,EAAiB,GAC9BA,EAAe,+DAAiE,CACxFX,EAAG,IAAMC,EAAQ,MACjBW,GAAI,uCAEpBnD,OAAOiD,aAAejD,OAAOiD,cAAgB,GAC7CjD,OAAOiD,aAAaC,eAApB,OAC2BlD,OAAOiD,aAAaC,gBAAkB,IACtCA,UCtC3BE,EAAOC,QAAU1M,cCAjByM,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/Utilities/analytics/clickTrack.ts?bce2","webpack://mattressfirm/./src/Utilities/analytics/htmlToText.ts?c3c7","webpack://mattressfirm/./src/Utilities/analytics/promotionClickTrack.ts?a0bd","webpack://mattressfirm/./src/Utilities/analytics/utagCaller.ts?3814","webpack://mattressfirm/./src/Utilities/get-dynamic-image.tsx?8e0f","webpack://mattressfirm/./src/Utilities/plp-url-utils.ts?728b","webpack://mattressfirm/./src/modules/mfrm-hero-slide/mfrm-hero-slide.tsx?7503","webpack://mattressfirm/./src/modules/mfrm-hero-slide/mfrm-hero-slide.view.tsx?73c3","webpack://mattressfirm/./src/modules/mfrm-hero-slide/tealium-analytics.tsx?4261","webpack://mattressfirm/./lib/mfrm-hero-slide/module-registration.js?2c5c","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["import { callUtagLink } from \"./utagCaller\";\r\n\r\nexport interface IUtagPromoConfig {\r\n promotion_impression_name?: string[];\r\n promotion_impression_id?: string[];\r\n promotion_impression_creative?: string[];\r\n promotion_impression_position?: (string | undefined)[];\r\n promotion_name?: string[];\r\n promotion_id?: string[];\r\n promotion_creative?: string[];\r\n promotion_position?: (string | undefined)[];\r\n}\r\n\r\nexport interface IUtagGeneralConfig {\r\n enhanced_action?: string | undefined;\r\n}\r\nexport interface ICustomerConfig {\r\n customer_email?: string;\r\n}\r\nexport interface IProductConfig {\r\n product_id?: string[];\r\n product_name?: string[];\r\n product_category?: (string | undefined)[];\r\n product_brand?: (string | undefined)[];\r\n product_variant?: (string | undefined)[];\r\n product_price?: (string | undefined)[];\r\n product_list_name?: string[];\r\n product_position?: (number | undefined)[];\r\n product_quantity?: (string | undefined)[];\r\n checkout_step?: string;\r\n}\r\nexport interface IProductImpressionConfig {\r\n product_impression_brand?: (string | undefined)[];\r\n product_impression_list_name?: (string | undefined)[];\r\n product_impression_id?: string[];\r\n product_impression_name?: string[];\r\n product_impression_category?: string[];\r\n product_impression_variant?: (string | undefined)[];\r\n product_impression_position?: number[];\r\n product_impression_price?: number[];\r\n}\r\nexport interface IAnalyticsConfiguration {\r\n event?: string | null;\r\n eventName?: string | null;\r\n eventCategory?: string | null;\r\n eventAction?: string | null;\r\n eventLabel?: string | null;\r\n eventType?: string | null;\r\n eventNoninteraction?: string;\r\n enhancedAction?: string | null;\r\n searchTerm?: string | undefined | null;\r\n searchType?: string | undefined | null;\r\n generalConfig?: IUtagGeneralConfig;\r\n promoConfig?: IUtagPromoConfig;\r\n productConfig?: IProductConfig;\r\n customerConfig?: ICustomerConfig;\r\n productImpressionConfig?: IProductImpressionConfig;\r\n}\r\n\r\nexport const fireAnalyticsLink = ({\r\n searchTerm = null,\r\n searchType = null,\r\n eventName = null,\r\n eventCategory = null,\r\n eventAction = null,\r\n eventLabel = null,\r\n eventType = null,\r\n eventNoninteraction = 'false',\r\n enhancedAction = null,\r\n generalConfig = {},\r\n promoConfig = {},\r\n productConfig = {},\r\n customerConfig = {},\r\n productImpressionConfig = {}\r\n}: IAnalyticsConfiguration) => {\r\n void callUtagLink({\r\n ...generalConfig,\r\n ...promoConfig,\r\n ...productConfig,\r\n ...customerConfig,\r\n ...productImpressionConfig,\r\n event: eventName,\r\n event_category: eventCategory,\r\n event_action: eventAction,\r\n event_label: eventLabel,\r\n event_type: eventType,\r\n event_noninteraction: eventNoninteraction,\r\n enhanced_action: enhancedAction,\r\n search_term: searchTerm,\r\n search_type: searchType\r\n });\r\n};","\r\n// Convert Rich Text inner text to string for analytics tagging\r\n\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const htmltoText = (html: string) => {\r\n if(MsDyn365.isBrowser) {\r\n // Create a new div element\r\n const tempDivElement = document.createElement('div');\r\n\r\n // Set the HTML content with the given value\r\n // tslint:disable-next-line: no-inner-html\r\n tempDivElement.innerHTML = html;\r\n\r\n // Retrieve the text property of the element\r\n return tempDivElement.textContent || tempDivElement.innerText || '';\r\n } else {\r\n return '';\r\n }\r\n};","import { fireAnalyticsLink } from './clickTrack';\r\n\r\ninterface IPromotionConfigs {\r\n eventLabel: string;\r\n promotionName: string[];\r\n promotionId: string[];\r\n promotionCreative: string[];\r\n promotionPosition: (string | undefined)[];\r\n}\r\n\r\nexport const firePromotionImpression = ({ eventLabel = '', promotionName = [], promotionId = [], promotionCreative = [], promotionPosition = [] }: IPromotionConfigs) => {\r\n fireAnalyticsLink({\r\n eventName: 'promotion-impression',\r\n eventCategory: 'ecommerce',\r\n eventAction: 'promotion impression',\r\n eventLabel: eventLabel,\r\n eventNoninteraction: 'true',\r\n promoConfig: {\r\n promotion_impression_name: promotionName,\r\n promotion_impression_id: promotionId,\r\n promotion_impression_creative: promotionCreative,\r\n promotion_impression_position: promotionPosition\r\n }\r\n });\r\n};\r\n\r\nexport const firePromotionClick = ({ eventLabel = '', promotionName = [], promotionId = [], promotionCreative = [], promotionPosition = [] }: IPromotionConfigs) => {\r\n fireAnalyticsLink({\r\n eventName: 'promotion-click',\r\n eventCategory: 'ecommerce',\r\n eventAction: 'promotion click',\r\n eventLabel: eventLabel,\r\n eventNoninteraction: 'false',\r\n promoConfig: {\r\n promotion_name: promotionName,\r\n promotion_id: promotionId,\r\n promotion_creative: promotionCreative,\r\n promotion_position: promotionPosition\r\n }\r\n });\r\n};","import { IAnalyticsConfiguration } from './clickTrack';\r\n\r\n// Interface for 3rd-party function. AKA utag.\r\ninterface ITealium {\r\n link(data: {}): void | false;\r\n view(data: {}): void | false;\r\n data(data: {}): void | false;\r\n}\r\n\r\nexport interface IPromotionConfig {\r\n event?: string | null;\r\n event_name?: string | null;\r\n search_term?: string | null;\r\n search_type?: string | null;\r\n event_category?: string | null;\r\n event_action?: string | null;\r\n event_label?: string | null;\r\n event_type?: string | null;\r\n event_noninteraction?: string;\r\n enhanced_action?: string | null;\r\n customer_email?: string | undefined;\r\n customer_phone_number?: string | undefined;\r\n first_name?: string | undefined;\r\n last_name?: string | undefined;\r\n address1?: string | undefined;\r\n address2?: string | undefined;\r\n city?: string | undefined;\r\n state?: string | undefined;\r\n zip_code?: string | undefined;\r\n order_subtotal?: string | undefined;\r\n order_currency?: string | undefined;\r\n country?: string | undefined;\r\n // productConfig?: IProductDataConfig;\r\n checkout_step?: string;\r\n checkout_option?:(string | undefined)[];\r\n checkout_type?:(string | undefined)[];\r\n product_id?: (string | undefined)[];\r\n product_name?: (string | undefined)[];\r\n product_category?: (string | undefined)[];\r\n product_brand?: (string | undefined)[];\r\n product_variant?: (string | undefined | number)[];\r\n product_price?: (string | undefined)[];\r\n product_quantity?: (string | undefined)[];\r\n product_url?: (string | undefined)[];\r\n product_size?: (string | undefined)[];\r\n product_image_url?: (string | undefined)[];\r\n core_item_flag?: string | null;\r\n funnel_type?: string | null;\r\n ga_title?: string | null;\r\n ga_location?: string | null;\r\n}\r\n\r\ninterface IProductDataConfig {\r\n product_variant?: (string | undefined)[];\r\n product_price?: (string | undefined)[];\r\n}\r\n\r\nexport interface IAnalyticsConfigurationData {\r\n productConfig?: IProductDataConfig;\r\n}\r\n\r\n\r\n// Legacy function\r\nexport const callUtag = async (objToCall: IPromotionConfig) => {\r\n void await callUtagLink(objToCall);\r\n};\r\n\r\n/**\r\n * Tealium dispatch click tracking.\r\n * @param objToCall\r\n */\r\nexport const callUtagLink = async (objToCall: IPromotionConfig | IAnalyticsConfiguration) => {\r\n try {\r\n Object.keys(objToCall).forEach(\r\n key => {\r\n if (objToCall[key] === null) {\r\n delete objToCall[key];\r\n }\r\n }\r\n );\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n if(utag) { utag.link(objToCall); }\r\n\r\n } catch (e) {\r\n console.log('Utag Error', e);\r\n }\r\n};\r\n\r\n/**\r\n * Tealium dispatch view tracking.\r\n * @param objToCall\r\n */\r\nexport const callUtagView = async (objToCall: {}) => {\r\n try {\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n if(utag) { utag.view(objToCall); }\r\n } catch (e) {\r\n console.log('utag View Error', e);\r\n }\r\n};\r\n\r\n/**\r\n * Not currently implemented.\r\n * @param objToCall\r\n * @param dataType\r\n */\r\nexport const callUtagData = ({ productConfig = {} }: IAnalyticsConfigurationData , dataType: string) => {\r\n try {\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n switch (dataType) {\r\n case 'data':\r\n // @ts-ignore\r\n if(utag) { utag.data = {...utag.data, ...productConfig}; }\r\n break;\r\n case '_data':\r\n // @ts-ignore\r\n utag_data = {...utag_data , ...productConfig};\r\n break;\r\n default:\r\n null;\r\n }\r\n } catch (e) {\r\n console.log('Utag Error', e);\r\n }\r\n};","import MsDyn365, { IImageData } from '@msdyn365-commerce/core';\r\nimport _get from 'lodash/get';\r\nimport _cloneDeep from 'lodash/cloneDeep';\r\nimport * as React from 'react';\r\n\r\ninterface IImageDimension {\r\n width: string;\r\n height: string;\r\n}\r\ninterface IImageSettings {\r\n sm: IImageDimension;\r\n md: IImageDimension;\r\n lg: IImageDimension;\r\n}\r\nexport interface IResponsiveImage {\r\n desktop: IImageData | undefined;\r\n tablet: IImageData | undefined;\r\n mobile: IImageData | undefined;\r\n defaultImg: IImageData | undefined;\r\n imageSettingViewports?: IImageSettings | undefined;\r\n}\r\n\r\nexport interface IResponsiveImageFromSeoData {\r\n desktop: IImageData | undefined;\r\n tablet: IImageData | undefined;\r\n mobile: IImageData | undefined;\r\n imageSettingViewports?: IImageSettings | undefined;\r\n}\r\n\r\nexport const getResponsiveFromSeoData = ({ desktop, tablet, mobile }: IResponsiveImageFromSeoData) => {\r\n const desktopWidth = 1025;\r\n const tabletWidth = 768;\r\n\r\n const query = {\r\n desktop: '',\r\n tablet: '',\r\n mobile: ''\r\n };\r\n\r\n // Removing resizing for the time being to discuss with Microsoft\r\n // if (imageSettingViewports) {\r\n // const { sm, md, lg } = imageSettingViewports;\r\n // query.desktop = `&w=${lg.width}&h=${lg.height}`;\r\n // query.tablet = `&w=${md.width}&h=${md.height}`;\r\n // query.mobile = `&w=${sm.width}&h=${sm.height}`;\r\n // }\r\n\r\n return (\r\n \r\n <>\r\n {desktop?.src && }\r\n {tablet?.src && }\r\n {mobile?.src && }\r\n {desktop?.altText}\r\n \r\n \r\n );\r\n\r\n};\r\n\r\n// Note Responsive Image does not use Msdyn365 Image component\r\nexport const getResponsiveImage = ({ desktop, tablet, mobile, defaultImg }: IResponsiveImage): React.ReactNode => {\r\n // Note this is a temp solution as D365 does not support dynamic images across viewports\r\n\r\n const desktopWidth = 1025;\r\n const tabletWidth = 768;\r\n const lazyload = !defaultImg?.imageSettings?.disableLazyLoad;\r\n\r\n const query = {\r\n desktop: '',\r\n tablet: '',\r\n mobile: ''\r\n };\r\n\r\n // Removing resizing for the time being to discuss with Microsoft\r\n // if (imageSettingViewports) {\r\n // const { sm, md, lg } = imageSettingViewports;\r\n // query.desktop = `&w=${lg.width}&h=${lg.height}`;\r\n // query.tablet = `&w=${md.width}&h=${md.height}`;\r\n // query.mobile = `&w=${sm.width}&h=${sm.height}`;\r\n // }\r\n\r\n const defaultImgSrc = `${defaultImg?.src}${query.desktop}${\r\n defaultImg?.imageSettings?.quality ? `&q=${defaultImg.imageSettings.quality}` : ''\r\n }`;\r\n\r\n return (\r\n \r\n {lazyload ? (\r\n <>\r\n {desktop?.src && }\r\n {tablet?.src && }\r\n {mobile?.src && }\r\n \r\n \r\n ) : (\r\n <>\r\n {desktop?.src && }\r\n {tablet?.src && }\r\n {mobile?.src && }\r\n {defaultImg?.altText}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport interface IDynamicImageProps {\r\n moduleName: string;\r\n}\r\n\r\nexport const getDynamicImageSettings = ({ moduleName }: IDynamicImageProps) => {\r\n // This logic is directly from MsDyn Image Component src builder\r\n // just applied to get dynamic image settings if they are defined\r\n const imageSettings = { viewports: undefined };\r\n const themeSettingsForModule = MsDyn365.themeSettings?.mattressfirm?.modules?.[moduleName];\r\n if (themeSettingsForModule) {\r\n const themeSettingsForLayout = themeSettingsForModule.properties.dynamic;\r\n if (themeSettingsForLayout) {\r\n const imageViewportProperties = _get(themeSettingsForLayout.properties, ['image'], { properties: imageSettings }).properties;\r\n // Clone the image viewport properties from theme settings\r\n // so that the proxy traps do not affect the global themesettings\r\n imageSettings.viewports = _cloneDeep(imageViewportProperties);\r\n }\r\n }\r\n\r\n return imageSettings.viewports;\r\n};\r\n","import { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { IRequestContext } from '@msdyn365-commerce/core';\r\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\r\nexport interface IVirtualRefinersConfig {\r\n order: number;\r\n refinerName: string;\r\n enableForMattresses: boolean;\r\n enableForOtherCategories: boolean;\r\n allowDuplicate: boolean;\r\n}\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const origin = requestUrl.origin;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `${origin}/${filteredPath}`;\r\n};\r\n\r\nexport const filteredURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `/${filteredPath}`;\r\n};\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURLWithoutBaseUrl = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('\\/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n return urlParts?.join('\\/');\r\n};\r\n\r\n/**\r\n * This will remove the Pipe sign value set from urlParts\r\n * @param urlParts\r\n * @returns\r\n */\r\nexport const removePipeSignValue = (urlParts: string[]) => {\r\n // urlParts.forEach((part, index) => {\r\n // const indexOfValue = urlParts.indexOf('%7c');\r\n // if (indexOfValue !== -1) {\r\n // urlParts.splice(indexOfValue, 1);\r\n // }\r\n // });\r\n\r\n if (urlParts !== undefined && urlParts.length > 0) {\r\n urlParts = urlParts.filter(urlPart => urlPart.indexOf('%7c') === -1);\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will remove the keywords from urlParts array which were received from\r\n * the app.settings.json/CMS Extensions\r\n * @param urlParts\r\n * @param requestContext\r\n * @returns urlParts array filtered\r\n */\r\nexport const removeKeywords = (urlParts: string[], requestContext: IRequestContext): string[] => {\r\n const removeKeywordFromUrl = requestContext.app.config.removeKeywordFromUrl;\r\n\r\n if (urlParts.length > 0 && removeKeywordFromUrl && removeKeywordFromUrl.length > 0) {\r\n const removeKeywordFromUrlArray: string[] = removeKeywordFromUrl?.trim().split(',');\r\n removeKeywordFromUrlArray?.length > 0 &&\r\n urlParts.forEach(_part => {\r\n removeKeywordFromUrlArray.forEach(removeKeyword => {\r\n const trimmedKeyword = removeKeyword.trim().toLowerCase();\r\n const indexOfValue = urlParts.indexOf(trimmedKeyword);\r\n if (trimmedKeyword.length > 0 && indexOfValue !== -1) {\r\n urlParts.splice(indexOfValue, 1);\r\n }\r\n });\r\n });\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will sort the Virtual refiner config based on order and return\r\n * only active virtual refiner configs based on isMattress category will\r\n * be returned\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getSortedVirtualRefinerConfig = (\r\n requestContext: IRequestContext,\r\n isMattressesCategory: boolean | undefined\r\n): IVirtualRefinersConfig[] | undefined => {\r\n let appConfigSorted = getVirtualRefinerConfig(requestContext);\r\n\r\n // sort the config by provided config\r\n if (appConfigSorted) {\r\n if (isMattressesCategory === true) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForMattresses;\r\n });\r\n } else if (isMattressesCategory === false) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForOtherCategories;\r\n });\r\n }\r\n appConfigSorted.sort((a: IVirtualRefinersConfig, b: IVirtualRefinersConfig) => {\r\n return a.order - b.order;\r\n });\r\n }\r\n\r\n return appConfigSorted;\r\n};\r\n\r\n/**\r\n * Virtual refiner names from the app.settings.json will be returned which can be used\r\n * to filter out refiners data based upon active virtual refiners\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns string[]\r\n */\r\nexport const getVirtualRefinerNames = (requestContext: IRequestContext, isMattressesCategory: boolean | undefined): string[] => {\r\n const sortedVirtualRefinerConfig = getSortedVirtualRefinerConfig(requestContext, isMattressesCategory);\r\n\r\n const appConfigRefinerNames: string[] = [];\r\n\r\n sortedVirtualRefinerConfig &&\r\n sortedVirtualRefinerConfig.forEach(sortedConfig => {\r\n appConfigRefinerNames.push(sortedConfig.refinerName.trim().toLowerCase());\r\n });\r\n\r\n return appConfigRefinerNames;\r\n};\r\n\r\n/**\r\n * This will return the value of virtual refiner configuration\r\n * @param requestContext\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getVirtualRefinerConfig = (requestContext: IRequestContext): IVirtualRefinersConfig[] => {\r\n return requestContext.app.config.urlModifications;\r\n};\r\n\r\nexport async function getVirtualRefinerValues(\r\n requestContext: IRequestContext,\r\n virtualRefiners: IProductRefinerHierarchy[]\r\n): Promise {\r\n const virtualRefinerValues: ProductRefinerValue[] = [];\r\n if (virtualRefiners.length === 0) {\r\n return virtualRefinerValues;\r\n }\r\n const requestUrl = requestContext.url.requestUrl;\r\n // const origin = requestUrl.origin;\r\n const path = requestUrl.pathname;\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // remove category id {categoryid}.c\r\n const categoryIdToken = requestContext.urlTokens.recordId;\r\n const categoryId = categoryIdToken ? `${categoryIdToken}.c` : undefined;\r\n\r\n if (categoryId) {\r\n urlParts.splice(-1);\r\n }\r\n\r\n // run loop for each url part and get values from refiners for further usage\r\n const finalizedUrlParts: string[] = [];\r\n urlParts.forEach(plainUrlPart => {\r\n const urlPart = decodeURIComponent(plainUrlPart);\r\n if (urlPart.indexOf('|') !== -1) {\r\n const splitOnPipeSign = urlPart?.split('|');\r\n const filteredParts = splitOnPipeSign.filter(part => part.length > 0);\r\n filteredParts.forEach(filteredPart => {\r\n finalizedUrlParts.push(filteredPart.toLowerCase().trim());\r\n });\r\n }\r\n finalizedUrlParts.push(urlPart);\r\n });\r\n finalizedUrlParts.forEach((urlPart) => {\r\n virtualRefiners.forEach((mainRefiner) => {\r\n mainRefiner.Values.forEach((refinerValue) => {\r\n const refinerValueKeyName = refinerValue.LeftValueBoundString?.toLowerCase().trim().split(' ')?.join('-').replace(/\\&/g, 'and').replace(regExSpecialChars(requestContext.app.config.canonicalUrlspecialCharIncludeList), '-');\r\n if (refinerValueKeyName && refinerValueKeyName === urlPart) {\r\n virtualRefinerValues.push(refinerValue);\r\n }\r\n });\r\n });\r\n });\r\n\r\n return virtualRefinerValues;\r\n}\r\n\r\n/**\r\n * For navigation menu links, it will remove keywords configured in global configurations from the navigation link\r\n * and clp link and return url path string\r\n * @param link\r\n * @param requestContext\r\n * @returns string\r\n */\r\nexport const navLinkKeywordRemoval = (link: string, requestContext: IRequestContext): string => {\r\n // Using the rest operator in case there is a weirdly formatted URL with multiple question marks.\r\n const [linkBase, ...linkParams] = link?.split('?');\r\n\r\n // Only apply to category links and product links, which end in .c or .p. Check that a keyword is configured.\r\n if (!linkBase.endsWith('.c') && !linkBase.endsWith('.p') || !requestContext.app.config) {\r\n return link;\r\n }\r\n\r\n // Separate out url parts split on forward /\r\n let urlParts = linkBase?.split('\\/');\r\n\r\n // Remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // Glue the URL params back together\r\n const linkParam = linkParams.map(param => `?${param}`)?.join('');\r\n\r\n // Rebuild URL by joining with forward slash and appending any URL parameters\r\n const filteredLink = `${urlParts?.join('/')}${linkParam}`;\r\n return `${filteredLink}`;\r\n};\r\nexport const regExSpecialChars = (includeConfigList: string): RegExp => {\r\n let includeConfig = '';\r\n if (includeConfigList !== undefined && includeConfigList !== '') {\r\n includeConfig = includeConfigList?.trim().split(',')?.join('\\\\\\\\');\r\n includeConfig = includeConfig && includeConfig !== '' ? `\\\\\\\\${includeConfig}` : '';\r\n const pattern = `[^\\\\w\\\\&\\\\|${includeConfig}]`;\r\n return new RegExp(pattern, 'gi');\r\n } else {\r\n\r\n const pattern = `[^\\\\w\\\\&\\\\|]`;\r\n return new RegExp(pattern, 'gi');\r\n }\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport classname from 'classnames';\r\n\r\nimport { IDynamicImagesData } from '../../themes/mattressfirm/definition-extensions/content-block.ext.props.autogenerated';\r\nimport { navLinkKeywordRemoval } from '../../Utilities/plp-url-utils';\r\nimport { IMfrmHeroSlideData } from './mfrm-hero-slide.data';\r\nimport { IMfrmHeroSlideProps } from './mfrm-hero-slide.props.autogenerated';\r\nexport interface IMfrmHeroSlideViewProps extends IMfrmHeroSlideProps {\r\n eyebrow?: string;\r\n subCopy?: React.ReactNode;\r\n ctaCopy?: string;\r\n image?: React.ReactNode;\r\n imageAriaLabel?: string;\r\n link?: string;\r\n className?: string;\r\n useDynamicImages?: boolean;\r\n dynamicImages?: IDynamicImagesData;\r\n enhancedEcommTracking?: string;\r\n heading?: React.ReactNode;\r\n heroLayout?: string;\r\n heroColor?: string;\r\n heroTextColor?: string;\r\n}\r\n\r\n/**\r\n *\r\n * MfrmHeroSlide component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass MfrmHeroSlide extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n const {\r\n eyebrow,\r\n subCopy,\r\n ctaCopy,\r\n image,\r\n imageAriaLabel,\r\n className,\r\n useDynamicImages,\r\n dynamicImages,\r\n enhancedEcommTracking,\r\n heading,\r\n heroLayout,\r\n heroColor,\r\n heroTextColor\r\n } = this.props.config;\r\n\r\n const imageProps = {\r\n gridSettings: this.props.context.request.gridSettings || {},\r\n imageSettings: image && image.imageSettings\r\n };\r\n\r\n const heroImage = image && (\r\n \r\n );\r\n const subcopyText = subCopy && (\r\n \r\n );\r\n\r\n const headerRichText = heading && (\r\n \r\n );\r\n const heroSlideViewProps = {\r\n ...this.props,\r\n eyebrow,\r\n subCopy: subcopyText,\r\n ctaCopy,\r\n image: heroImage,\r\n moduleClass: className,\r\n link: this._getLink(),\r\n imageAriaLabel,\r\n className,\r\n useDynamicImages,\r\n dynamicImages,\r\n enhancedEcommTracking,\r\n heading: headerRichText,\r\n heroLayout,\r\n heroTextColor: this._getTextColor(heroTextColor),\r\n heroColor: this._getBkgColor(heroColor)\r\n };\r\n\r\n return this.props.renderView(heroSlideViewProps);\r\n }\r\n\r\n\r\n public handleSubCopyChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading = event.target.value;\r\n\r\n private _getLink(): string | null {\r\n const { link } = this.props.config;\r\n if (link) {\r\n return navLinkKeywordRemoval(link.destinationUrl, this.props.context.request);\r\n }\r\n return null;\r\n }\r\n\r\n private _getTextColor(heroTextColor: any) {\r\n let textColor;\r\n switch (heroTextColor) {\r\n case 'white':\r\n textColor = 'font-white';\r\n break;\r\n case 'black':\r\n textColor = 'font-black';\r\n break;\r\n }\r\n\r\n return textColor;\r\n }\r\n\r\n private _getBkgColor(heroColor: any) {\r\n let heroBkgColor;\r\n switch (heroColor) {\r\n case 'red':\r\n heroBkgColor = 'bkg-red';\r\n break;\r\n case 'blue':\r\n heroBkgColor = 'bkg-blue';\r\n break;\r\n case 'white':\r\n heroBkgColor = 'bkg-white';\r\n break;\r\n }\r\n return heroBkgColor;\r\n }\r\n\r\n}\r\n\r\nexport default MfrmHeroSlide;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport classname from 'classnames';\r\nimport _get from 'lodash/get';\r\nimport _cloneDeep from 'lodash/cloneDeep';\r\nimport * as React from 'react';\r\nimport { useInView } from 'react-intersection-observer';\r\nimport { fireAnalyticsLink } from '../../Utilities/analytics/clickTrack';\r\nimport { htmltoText } from '../../Utilities/analytics/htmlToText';\r\nimport { firePromotionClick, firePromotionImpression } from '../../Utilities/analytics/promotionClickTrack';\r\nimport { getDynamicImageSettings, getResponsiveImage } from '../../Utilities/get-dynamic-image';\r\nimport _getViewPort from '../../Utilities/get-view-port';\r\nimport { IMfrmHeroSlideViewProps } from './mfrm-hero-slide';\r\nimport { getAnalyticsConfig, getPromoAnalyticsConfig } from './tealium-analytics';\r\n\r\n// tslint:disable: max-func-body-length\r\n// tslint:disable: cyclomatic-complexity\r\nexport default (props: IMfrmHeroSlideViewProps) => {\r\n const {\r\n eyebrow,\r\n subCopy,\r\n ctaCopy,\r\n link,\r\n image,\r\n imageAriaLabel,\r\n className,\r\n useDynamicImages,\r\n dynamicImages,\r\n enhancedEcommTracking,\r\n config,\r\n heading,\r\n heroLayout,\r\n heroColor,\r\n heroTextColor\r\n } = props;\r\n\r\n const pagePath = MsDyn365.isBrowser ? (window.location.href.split(location.host)[1].includes('?') ? window.location.href.split(location.host)[1].split('?')[0] : window.location.href.split(location.host)[1]) : '';\r\n const text = config.heading ? htmltoText(config.heading.toString()).trim() : '';\r\n\r\n const analyticsConfig = getAnalyticsConfig(text, imageAriaLabel, config.tealiumEvent);\r\n const promoAnalyticsConfig = getPromoAnalyticsConfig(dynamicImages?.desktopImage?.altText, imageAriaLabel, text, pagePath, config.tealiumPromotion);\r\n\r\n const isPromotion = enhancedEcommTracking === 'promotion';\r\n const isTwoColLayout = heroLayout === 'twoCol' || heroLayout === 'twoColAlt';\r\n\r\n const handleAnalytics = () => {\r\n if (MsDyn365.isBrowser) {\r\n fireAnalyticsLink({ ...analyticsConfig });\r\n if (isPromotion) {\r\n firePromotionClick({ ...promoAnalyticsConfig });\r\n }\r\n\r\n if (link) {\r\n window.location.href = link;\r\n }\r\n }\r\n };\r\n\r\n const handleClick = (event: React.MouseEvent) => {\r\n // @ts-ignore\r\n if (utag) {\r\n event.preventDefault();\r\n handleAnalytics();\r\n }\r\n };\r\n\r\n const [ref, inView] = useInView({\r\n triggerOnce: true,\r\n rootMargin: '25px'\r\n });\r\n\r\n React.useEffect(() => {\r\n if (MsDyn365.isBrowser && isPromotion && inView) {\r\n firePromotionImpression({ ...promoAnalyticsConfig });\r\n }\r\n }, [inView]);\r\n\r\n let currentImage = image;\r\n // Only use responsive Image if dynamic Images defined\r\n if (dynamicImages && useDynamicImages) {\r\n currentImage = getResponsiveImage({\r\n desktop: dynamicImages?.desktopImage,\r\n tablet: dynamicImages?.tabletImage,\r\n mobile: dynamicImages?.mobileImage,\r\n defaultImg: props.config.image,\r\n imageSettingViewports: getDynamicImageSettings({ moduleName: 'mfrm-hero-slide' })\r\n });\r\n }\r\n\r\n const dataCy = heroLayout === 'twoColAlt' ? 'Sleep-Distrupter-Hero' : '';\r\n\r\n const standardLayout = (\r\n
\r\n {currentImage &&
{currentImage}
}\r\n {heading &&
\r\n {eyebrow &&
{eyebrow}
}\r\n {heading &&
{heading}
}\r\n {subCopy &&
{subCopy}
}\r\n {ctaCopy && }\r\n
}\r\n
\r\n );\r\n\r\n const twoColLayout = isTwoColLayout && (\r\n
\r\n
\r\n
\r\n {eyebrow &&
{eyebrow}
}\r\n {heading &&

{heading}

}\r\n {subCopy &&
{subCopy}
}\r\n {ctaCopy &&
}\r\n
\r\n
\r\n {currentImage &&
{currentImage}
}\r\n
\r\n );\r\n\r\n return (\r\n \r\n {!isTwoColLayout && standardLayout}\r\n {isTwoColLayout && twoColLayout}\r\n \r\n );\r\n};\r\n","import { ITealiumEventData, ITealiumPromotionData } from './mfrm-hero-slide.props.autogenerated';\r\n\r\nexport const getAnalyticsConfig = (\r\n text: string | undefined,\r\n imageAriaLabel: string | undefined,\r\n tealiumEvent: ITealiumEventData | undefined\r\n) => {\r\n // GENERAL ANALYTICS CONFIG\r\n return {\r\n eventName: tealiumEvent?.event || 'hero-carousel',\r\n eventCategory: tealiumEvent?.event_category || 'hero carousel module',\r\n eventAction: tealiumEvent?.event_action || 'hero carousel click',\r\n eventLabel: tealiumEvent?.event_label || text || imageAriaLabel || ''\r\n };\r\n};\r\n\r\nexport const getPromoAnalyticsConfig = (\r\n imageAltText: string | undefined,\r\n imageAriaLabel: string | undefined,\r\n text: string | undefined,\r\n pagePath: string | undefined,\r\n tealiumPromotion: ITealiumPromotionData | undefined\r\n) => {\r\n // PROMO ANALYTICS CONFIG\r\n // Use Configured Paragraph text as Promotion Name\r\n const promoName = tealiumPromotion?.promotion_name || text || '';\r\n // Use Configured Link as Promotion ID\r\n const promoId = tealiumPromotion?.promotion_id || imageAltText || '';\r\n // Use Configured Image URL as default Creative\r\n const promoCreative = tealiumPromotion?.promotion_creative_version || imageAriaLabel || '';\r\n const promoPosition = tealiumPromotion?.promotion_position || undefined;\r\n\r\n return {\r\n eventLabel: `${promoName} from ${pagePath}`,\r\n promotionName: [promoName],\r\n promotionId: [promoId],\r\n promotionCreative: [promoCreative],\r\n promotionPosition: [promoPosition]\r\n };\r\n};\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['mfrm-hero-slide'] = {\n c: () => require('partner/modules/mfrm-hero-slide/mfrm-hero-slide.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'mfrm-hero-slide',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-hero-slide'\n });\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|mfrm-hero-slide|mfrm-hero-slide'] = {\n c: () => require('partner/modules/mfrm-hero-slide/mfrm-hero-slide.view.tsx'),\n cn: '__local__-__local__-mfrm-hero-slide'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["fireAnalyticsLink","searchTerm","searchType","eventName","eventCategory","eventAction","eventLabel","eventType","eventNoninteraction","enhancedAction","generalConfig","promoConfig","productConfig","customerConfig","productImpressionConfig","callUtagLink","event","event_category","event_action","event_label","event_type","event_noninteraction","enhanced_action","search_term","search_type","htmltoText","html","MsDyn365","tempDivElement","document","createElement","innerHTML","textContent","innerText","firePromotionImpression","promotionName","promotionId","promotionCreative","promotionPosition","promotion_impression_name","promotion_impression_id","promotion_impression_creative","promotion_impression_position","firePromotionClick","promotion_name","promotion_id","promotion_creative","promotion_position","callUtag","async","objToCall","Object","keys","forEach","key","utag","global","hasOwnProperty","link","e","console","log","callUtagView","view","getResponsiveFromSeoData","desktop","tablet","mobile","query","React","src","media","srcSet","alt","altText","getResponsiveImage","defaultImg","tabletWidth","lazyload","imageSettings","disableLazyLoad","defaultImgSrc","quality","className","getDynamicImageSettings","moduleName","viewports","undefined","themeSettingsForModule","mattressfirm","modules","themeSettingsForLayout","properties","dynamic","imageViewportProperties","_get","_cloneDeep","canonicalURL","requestContext","requestUrl","url","origin","path","pathname","toLowerCase","urlParts","split","splice","match","removePipeSignValue","removeKeywords","filteredPath","join","filteredURL","length","filter","urlPart","indexOf","removeKeywordFromUrl","app","config","removeKeywordFromUrlArray","trim","_part","removeKeyword","trimmedKeyword","indexOfValue","getSortedVirtualRefinerConfig","isMattressesCategory","appConfigSorted","getVirtualRefinerConfig","appConfig","enableForMattresses","enableForOtherCategories","sort","a","b","order","getVirtualRefinerNames","sortedVirtualRefinerConfig","appConfigRefinerNames","sortedConfig","push","refinerName","urlModifications","getVirtualRefinerValues","virtualRefiners","virtualRefinerValues","categoryIdToken","urlTokens","recordId","finalizedUrlParts","plainUrlPart","decodeURIComponent","part","filteredPart","mainRefiner","Values","refinerValue","refinerValueKeyName","LeftValueBoundString","replace","regExSpecialChars","canonicalUrlspecialCharIncludeList","navLinkKeywordRemoval","linkBase","linkParams","endsWith","linkParam","map","param","filteredLink","includeConfigList","includeConfig","pattern","RegExp","MfrmHeroSlide","constructor","handleSubCopyChange","this","props","heading","target","value","render","eyebrow","subCopy","ctaCopy","image","imageAriaLabel","useDynamicImages","dynamicImages","enhancedEcommTracking","heroLayout","heroColor","heroTextColor","imageProps","gridSettings","context","request","heroImage","Msdyn365","editProps","subcopyText","text","onEdit","headerRichText","classname","_getTextColor","heroSlideViewProps","moduleClass","_getLink","_getBkgColor","renderView","destinationUrl","textColor","heroBkgColor","pagePath","window","location","href","host","includes","toString","analyticsConfig","getAnalyticsConfig","tealiumEvent","promoAnalyticsConfig","getPromoAnalyticsConfig","desktopImage","tealiumPromotion","isPromotion","isTwoColLayout","ref","inView","useInView","triggerOnce","rootMargin","currentImage","tabletImage","mobileImage","imageSettingViewports","dataCy","standardLayout","Button","twoColLayout","title","onClick","preventDefault","imageAltText","promoName","promoId","promoCreative","promotion_creative_version","promoPosition","binding","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}