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c,EAAOmc,uBAAe,IAAAD,EAAAA,EAAI,GACjChY,UAAW,yBACX2L,aAAcjN,EAAQ5E,QAAQ6R,aAC9B3F,eAAgBtH,EAAQ5E,QACxBwS,SAAAA,MA8EpB,iBCxNA4L,EAAOC,QAAU9d,cCAjB6d,EAAOC,QAAUC","sources":["webpack://henrys-ecommerce/./src/themes/henrys/views/components/shared-scripts.tsx?1505","webpack://henrys-ecommerce/./src/themes/henrys/views/header.view.tsx?7cd5","webpack://henrys-ecommerce/./lib/header/module-registration.js?4d67","webpack://henrys-ecommerce/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://henrys-ecommerce/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://henrys-ecommerce/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://henrys-ecommerce/./src/modules/fabrikam/views/header.view.tsx?6d84","webpack://henrys-ecommerce/./src/modules/header/components/header-preferred-store.tsx?ee9c","webpack://henrys-ecommerce/./src/modules/header/components/logo.tsx?f27e","webpack://henrys-ecommerce/./src/modules/header/components/nav-icon.tsx?2475","webpack://henrys-ecommerce/./src/modules/header/header.tsx?e91a","webpack://henrys-ecommerce/./src/modules/header/header.view.tsx?cf0f","webpack://henrys-ecommerce/../../src/get-employee.ts?b8bb","webpack://henrys-ecommerce/./src/modules/header/utilities/mock-utilities.ts?d017","webpack://henrys-ecommerce/./src/modules/adventureworks/views/header.view.tsx?9bd3","webpack://henrys-ecommerce/external var \"React\"?0d3b","webpack://henrys-ecommerce/external var \"ReactDOM\"?853b"],"sourcesContent":["import * as React from 'react';\r\nimport { HtmlHeadInclude, IRequestContext } from '@msdyn365-commerce/core';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nconst isDev = false; // process.env.NODE_ENV === 'development';\r\n\r\ntype SharedScriptsProps = {\r\n googleTagManagerId?: string;\r\n bazaarVoiceEnv?: string;\r\n request: IRequestContext;\r\n sailthruCustomerId?: string;\r\n};\r\n\r\nconst bvHandlerScript = `\r\nwindow.bvCallback = function (BV) {\r\n BV.reviews && BV.reviews.on('show', function () {\r\n var elem = document.getElementsByClassName(\"hei-bv-reviews\")[0];\r\n elem && elem.click();\r\n });\r\n}\r\n `.trim();\r\n\r\nconst klaviyoInitScript = `\r\n!function(){if(!window.klaviyo){window._klOnsite=window._klOnsite||[];try{window.klaviyo=new Proxy({},{get:function(n,i){return\"push\"===i?function(){var n;(n=window._klOnsite).push.apply(n,arguments)}:function(){for(var n=arguments.length,o=new Array(n),w=0;w {\r\n const { locale } = request;\r\n\r\n const userEmail = request.user.emailAddress;\r\n\r\n const bvLocale = (locale || 'en-CA').replace('-', '_');\r\n const bvScript = `https://apps.bazaarvoice.com/deployments/henrys/main_site/${bazaarVoiceEnv || 'staging'}/${bvLocale}/bv.js`;\r\n\r\n React.useEffect(() => {\r\n if (googleTagManagerId && !isDev) {\r\n (function(w, d, s, l, i) {\r\n w[l] = w[l] || [];\r\n w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });\r\n var f = d.getElementsByTagName(s)[0],\r\n j = d.createElement(s) as HTMLScriptElement,\r\n dl = l != 'dataLayer' ? '&l=' + l : '';\r\n j.async = true;\r\n j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\r\n f.parentNode?.insertBefore(j, f);\r\n })(window, document, 'script', 'dataLayer', googleTagManagerId);\r\n }\r\n }, [googleTagManagerId]);\r\n\r\n const [klaviyoPublicKey, klaviyoScript] = React.useMemo(() => {\r\n const publicKey: string = request.app.config.heiKlaviyoPublicKey;\r\n process.env.NODE_ENV === 'development' && console.log('klaviyo', publicKey);\r\n\r\n if (publicKey) {\r\n let script = klaviyoInitScript;\r\n if (request.user.emailAddress) {\r\n const user = request.user;\r\n script += `\r\n klaviyo.identify({\r\n 'email' : '${user.emailAddress}',\r\n 'first_name' : '${user.firstName?.replace(\"'\", \"\\\\'\")}',\r\n 'last_name' : '${user.lastName?.replace(\"'\", \"\\\\'\")}'\r\n });\r\n `.trim();\r\n }\r\n\r\n return [publicKey, script];\r\n }\r\n\r\n if (process.env.NODE_ENV === 'development') {\r\n return ['RLch2r', klaviyoInitScript];\r\n }\r\n\r\n return ['', ''];\r\n }, []);\r\n\r\n process.env.NODE_ENV === 'development' && console.log('klaviyo', 'klaviyoPublicKey', klaviyoPublicKey);\r\n\r\n // if (isDev) {\r\n // React.useEffect(() => {\r\n // const bodyTag = document.getElementsByTagName('body')[0];\r\n\r\n // const script = document.createElement('script');\r\n // script.async = true;\r\n // script.src = `/assets/gtm.js`;\r\n // bodyTag.appendChild(script);\r\n // }, []);\r\n // }\r\n\r\n // if (process.env.NODE_ENV === 'development') {\r\n // userEmail = 'elin@bicameral.ca';\r\n // }\r\n\r\n var isBrowser = MsDyn365.isBrowser;\r\n React.useEffect(() => {\r\n if (sailthruCustomerId && isBrowser && !window.sailthruInit && window.Sailthru) {\r\n window.sailthruInit = true;\r\n window.Sailthru.init({ customerId: sailthruCustomerId });\r\n }\r\n }, [isBrowser, sailthruCustomerId]);\r\n\r\n React.useEffect(() => {\r\n if (userEmail && isBrowser && window.sailthruInit && window.Sailthru && !request.cookies.get('sailthru_hid').value) {\r\n // Set SailThru hid\r\n window.Sailthru.integration('userSignUp', {\r\n email: userEmail,\r\n vars: {}\r\n });\r\n }\r\n }, [isBrowser, userEmail]);\r\n\r\n return (\r\n <>\r\n \r\n {/* tslint:disable-next-line: react-no-dangerous-html */}\r\n \r\n\r\n {klaviyoPublicKey && (\r\n \r\n )}\r\n {klaviyoScript && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default SharedScripts;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { AsyncResult } from '@msdyn365-commerce/core';\r\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\r\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header';\r\nimport { Collapse, Drawer, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport SharedScripts from './components/shared-scripts';\r\nimport { IHeaderProps } from '../definition-extensions/header.ext.props.autogenerated';\r\n\r\nconst HeaderView: React.FC> = props => {\r\n const {\r\n HeaderTag,\r\n HeaderContainer,\r\n HeaderTopBarContainer,\r\n Divider,\r\n config: { googleTagManagerId, bazaarVoiceEnv, showWishlistIcon, enableStaticMenu, sailthruCustomerId },\r\n context: { request }\r\n } = props;\r\n\r\n const useStaticMenu = process.env.NODE_ENV === 'development' || (enableStaticMenu && props.slots.staticMenu);\r\n const heiSailthruCustomerId = props.context.app.config.heiSailthruCustomerId || sailthruCustomerId;\r\n\r\n return (\r\n \r\n \r\n \r\n {props.navIcon}\r\n {props.logo}\r\n {_renderReactFragment(props.search)}\r\n {props.preferredStore}\r\n {_renderAccountBlock(props, false)}\r\n {showWishlistIcon && props.wishListIconDesktop}\r\n \r\n {props.cartIcon}\r\n {_renderReactFragment(props.siteOptions)}\r\n \r\n {_renderCollapseMenu(props)}\r\n \r\n {useStaticMenu ? _renderReactFragment(props.slots.staticMenu) : _renderReactFragment(props.menuBar)}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction _renderCollapseMenu(props: IHeaderViewProps & IHeaderProps<{}>): JSX.Element | null {\r\n const {\r\n Divider,\r\n MobileMenuLinksContainer,\r\n mobileMenuCollapsed,\r\n config: { showAccountLinksInMobileView, showWishlistIcon, enableStaticMenu }\r\n } = props;\r\n\r\n const useStaticMenu = process.env.NODE_ENV === 'development' || (enableStaticMenu && props.slots.staticMenu);\r\n\r\n return (\r\n \r\n \r\n {_renderReactFragment(props.search)}\r\n {showAccountLinksInMobileView && _renderMobileAccountBlock(props, true)}\r\n {showWishlistIcon && props.wishListIconMobile}\r\n \r\n \r\n {useStaticMenu\r\n ? _renderReactFragment(props.slots.staticMenu, { actionBtn: props.navIcon })\r\n : _renderReactFragment(props.menuBar)}\r\n \r\n );\r\n}\r\n\r\nconst renderCustomerName = (accountInformation: AsyncResult): React.ReactChild => {\r\n const customer = accountInformation && accountInformation.result;\r\n return <>{customer ? customer.FirstName || customer.Name : ''};\r\n};\r\n\r\nfunction _renderMobileAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\r\n const { AccountInfoDropdownParentContainer, signOutLink, signInLink, data, accountLinks } = props;\r\n\r\n if (AccountInfoDropdownParentContainer) {\r\n const accountClassName = classnames(\r\n 'ms-header__drawer',\r\n AccountInfoDropdownParentContainer.className,\r\n renderForMobile ? 'account-mobile' : 'account-desktop'\r\n );\r\n\r\n if (accountLinks) {\r\n return (\r\n \r\n
\r\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\r\n {signOutLink}\r\n
\r\n \r\n );\r\n } else if (signInLink) {\r\n return (\r\n \r\n {signInLink}\r\n \r\n );\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nfunction _renderAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\r\n const {\r\n AccountInfoDropdownParentContainer,\r\n AccountInfoDropdownPopoverConentContainer,\r\n accountInfoDropdownButton,\r\n signOutLink,\r\n signInLink,\r\n accountLinks\r\n } = props;\r\n\r\n if (AccountInfoDropdownParentContainer) {\r\n const accountClassName = classnames(\r\n AccountInfoDropdownParentContainer.className,\r\n renderForMobile ? 'account-mobile' : 'account-desktop'\r\n );\r\n if (AccountInfoDropdownPopoverConentContainer) {\r\n return (\r\n \r\n {accountInfoDropdownButton}\r\n \r\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\r\n {signOutLink}\r\n \r\n \r\n );\r\n } else if (signInLink) {\r\n return (\r\n \r\n {signInLink}\r\n \r\n );\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction _renderReactFragment(items: React.ReactNode[], additionalProps?: any): JSX.Element | null {\r\n return (\r\n <>\r\n {items && items.length > 0\r\n ? items.map((slot: React.ReactNode, index: number) => {\r\n return (\r\n \r\n {React.isValidElement(slot) && additionalProps ? React.cloneElement(slot, additionalProps) : slot}\r\n \r\n );\r\n })\r\n : null}\r\n \r\n );\r\n}\r\n\r\nexport default HeaderView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['header'] = {\n c: () => require('@msdyn365-commerce-modules/header/dist/lib/modules/header/header'),\n $type: 'containerModule',\n da: [{name:'accountInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action', runOn: 1},{name:'employee', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee', runOn: 0},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1},{name:'wishlists', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'header',\n p: 'header',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/header/dist/lib/modules/header'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action';\n let dataAction = require('@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\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__|themes|henrys|views|header'] = {\n c: () => require('partner/themes/henrys/views/header.view.tsx'),\n cn: '__local__-__local__-header'\n };\nviewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|header'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/header.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-header'\n };\nviewDictionary['@msdyn365-commerce-modules|header|modules|header|header'] = {\n c: () => require('@msdyn365-commerce-modules/header/dist/lib/modules/header/header.view.js'),\n cn: '@msdyn365-commerce-modules-header-header'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|header'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/header.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-header'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IStoreInfo,\n IStoreSelectionStateContext,\n IStoreSelectorLocation,\n IStoreSelectorStateManager\n} from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(\n storeId?: string,\n storeName?: string | undefined,\n writeToCookie: boolean = false,\n latitude?: number,\n longitude?: number\n ): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n if (window) {\n const currentWindowAPI = window.mapAPIReady;\n window.mapAPIReady = () => {\n if (currentWindowAPI) {\n currentWindowAPI();\n }\n this.isMapApiLoaded = true;\n };\n }\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header';\nimport { Collapse, Drawer, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nconst headerView: React.FC = props => {\n const { HeaderTag, HeaderContainer, HeaderTopBarContainer, Divider } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {_renderAccountBlock(props, false)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n {_renderCollapseMenu(props)}\n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderCollapseMenu(props: IHeaderViewProps): JSX.Element | null {\n const { Divider, MobileMenuLinksContainer, mobileMenuCollapsed } = props;\n return (\n \n \n {_renderReactFragment(props.search)}\n {_renderMobileAccountBlock(props, true)}\n {props.wishListIconMobile}\n {props.siteOptions}\n \n \n {_renderReactFragment(props.menuBar)}\n \n );\n}\n\nconst renderCustomerName = (accountInformation: AsyncResult): React.ReactChild => {\n const customer = accountInformation && accountInformation.result;\n return <>{customer ? customer.FirstName || customer.Name : ''};\n};\n\nfunction _renderMobileAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const { AccountInfoDropdownParentContainer, signOutLink, signInLink, data, accountLinks } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n 'ms-header__drawer',\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n\n if (accountLinks) {\n return (\n \n
\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n
\n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n}\n\nfunction _renderAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IHeaderData } from '../header.data';\nimport { IHeaderProps } from '../header.props.autogenerated';\n\n/**\n * The header preferred store component.\n */\n@observer\nexport class HeaderPreferredStore extends React.PureComponent> {\n private readonly modalCloseButtonRef: React.RefObject = React.createRef();\n\n /**\n * Handle click on the store selector.\n * @returns : Promise void.\n */\n public handleClick = () => {\n return this._findPreferredStoreOnClick(this.props);\n };\n\n public render(): JSX.Element | undefined {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n slots,\n resources\n } = this.props;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- slots can be undefined.\n if (ArrayExtensions.hasElements(slots?.storeSelector)) {\n const storeName =\n storeSelectorStateManager?.preferredStore && storeSelectorStateManager.preferredStore.StoreName\n ? storeSelectorStateManager.preferredStore.StoreName\n : resources.headerPreferredStoreText;\n\n return (\n
\n \n {storeName}\n \n {slots.storeSelector}\n
\n );\n }\n\n return undefined;\n }\n\n private async _findPreferredStoreOnClick(props: IHeaderProps): Promise {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n modules\n } = props;\n if (!storeSelectorStateManager) {\n return;\n }\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && ArrayExtensions.hasElements(modules.storeSelector)) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n await storeSelectorStateManager\n .openDialog({\n id: storeSelectorId,\n showMapViewLink: true,\n parentElementRef: this.modalCloseButtonRef,\n onLocationSelected: orgUnitLocation => {\n return Promise.resolve();\n }\n })\n .catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.error(error.message);\n props.telemetry.debug('Unable to set preferred store');\n }\n });\n }\n}\n\nexport default HeaderPreferredStore;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ILogoProps {\n image: Msdyn365.IImageData;\n gridSettings?: Msdyn365.IGridSettings;\n link?: ILinkData;\n className?: string;\n telemetryContent?: ITelemetryContent;\n requestContext: Msdyn365.IRequestContext;\n typeName?: string;\n}\n\nexport interface ILinkData {\n linkUrl: Msdyn365.ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n linkText?: string;\n}\n\n/**\n *\n * Logo component.\n * @extends {React.PureComponent}\n */\nexport class Logo extends React.PureComponent {\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: ILogoProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.Logo);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n return
{this._renderLogo(this.props)}
;\n }\n\n private _renderLogo(config: ILogoProps): JSX.Element {\n if (config.link && config.link.linkUrl.destinationUrl) {\n return (\n \n {this._renderImage(config)}\n \n );\n }\n return this._renderImage(config);\n }\n\n private _renderImage(config: ILogoProps): JSX.Element {\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=132&h=28&m=6', w: 0, h: 0 },\n lg: { q: 'w=160&h=48&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n return (\n \n );\n }\n}\n\nexport default Logo;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IHeaderResources } from '../header.props.autogenerated';\n\nexport interface INavIconProps {\n resources: IHeaderResources;\n isExpanded: boolean;\n targetId: string;\n telemetryContent?: ITelemetryContent;\n toggleNavBar(): void;\n}\n\n/**\n *\n * NavIcon component.\n * @extends {React.PureComponent}\n */\n\n@observer\nexport class NavIcon extends React.PureComponent {\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: INavIconProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.NavIcon);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n return (\n \n );\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartIconComponent, WishListIconComponent } from '@msdyn365-commerce/components';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { ErrorNotification, NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n format,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n KeyCodes,\n Modal,\n ModalBody,\n ModalHeader,\n onTelemetryClick,\n Popover,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { HeaderPreferredStore, Logo, NavIcon } from './components';\nimport { IHeaderData } from './header.data';\nimport { IHeaderProps, IHeaderResources, IMyAccountLinksData } from './header.props.autogenerated';\n\nexport interface IHeaderState {\n mobileMenuCollapsed: boolean;\n signinPopoverOpen: boolean;\n hasSigninerror?: boolean;\n}\n\nexport interface IHeaderViewProps extends IHeaderProps, IHeaderState {\n logo: React.ReactNode;\n wishListIconDesktop: React.ReactNode;\n wishListIconMobile: React.ReactNode;\n cartIcon: React.ReactNode;\n navIcon: React.ReactNode;\n className: string;\n menuBar: React.ReactNode[];\n search: React.ReactNode[];\n siteOptions: React.ReactNode[];\n HeaderTag: IModuleProps;\n HeaderContainer: INodeProps;\n MobileMenuContainer: INodeProps;\n MobileMenuHeader: React.ReactNode;\n MobileMenuBodyContainer: INodeProps;\n MobileMenuLinksContainer: INodeProps;\n HeaderTopBarContainer: INodeProps;\n Divider: INodeProps;\n\n AccountInfoDropdownParentContainer?: INodeProps;\n AccountInfoDropdownPopoverConentContainer?: INodeProps;\n accountInfoDropdownButton?: React.ReactNode;\n\n signOutLink?: React.ReactNode;\n signInLink?: React.ReactNode;\n switchCustomerLink?: React.ReactNode;\n isOBORequest?: boolean;\n accountLinks?: React.ReactNode[];\n preferredStore?: React.ReactNode;\n currentDistributor?: React.ReactNode;\n}\n\n/**\n *\n * Header component.\n * @extends {React.PureComponent>}\n */\n@observer\nclass Header extends React.PureComponent, IHeaderState> {\n private readonly popOverRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private cart: ICartState | undefined;\n\n private isB2BSite: boolean = false;\n\n /**\n * The signed-in user name displayed in the header bar\n */\n @computed public get displayName(): Readonly {\n return (\n (MsDyn365.isOboRequest(this.props.context.request) ? this.workerName : this.customerName) ||\n this.props.context.request?.user?.name\n );\n }\n\n /**\n * OBO scenario. The name of worker who shops on behalf of customer.\n */\n @computed public get workerName(): Readonly {\n const worker = this.props.data.employee?.result;\n return worker?.Name;\n }\n\n @computed public get customerName(): Readonly {\n const customer = this.props.data.accountInformation?.result;\n if (MsDyn365.isOboRequest(this.props.context.request)) {\n // For OBO scenario, display full customer name because multiple customers may have the same first name.\n return customer ? customer.Name : undefined;\n } else {\n return customer ? customer.FirstName || customer.Name : undefined;\n }\n }\n\n public constructor(props: IHeaderProps) {\n super(props);\n this.popOverRef = React.createRef();\n this._toggleNavbar = this._toggleNavbar.bind(this);\n this._togglePopover = this._togglePopover.bind(this);\n this._keydown = this._keydown.bind(this);\n this.state = {\n mobileMenuCollapsed: true,\n signinPopoverOpen: false,\n hasSigninerror: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.isB2BSite = isChannelTypeB2B(this.props.context.request);\n }\n\n public componentDidMount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.addEventListener('keydown', this._keydown);\n }\n reaction(\n () => {\n this.props.data.cart.result;\n },\n () => {\n this.cart = this.props.data.cart.result;\n }\n );\n\n const {\n context: {\n request: { user }\n },\n resources: {\n signUpCustomerNotFoundTitle,\n signUpMultipleCustomerFoundTitle,\n signInCustomerNotAuthorizedTitle,\n closeNotificationLabel\n }\n } = this.props;\n\n const signinNotificationError = this._getSigninNotification(\n user,\n signUpMultipleCustomerFoundTitle,\n signUpCustomerNotFoundTitle,\n signInCustomerNotAuthorizedTitle\n );\n if (signinNotificationError !== undefined && this.state.hasSigninerror === false) {\n // For signup show simple error notification.\n NotificationsManager.instance().addNotification(new ErrorNotification(signinNotificationError, closeNotificationLabel));\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.removeEventListener('keydown', this._keydown, false);\n }\n }\n\n public render(): JSX.Element | null {\n const {\n id,\n typeName,\n data: { accountInformation, wishlists },\n context: {\n request: { user }\n },\n context,\n resources: { cartLabel, cartQtyLabel }\n } = this.props;\n const { logoLink, logoImage, shouldShowWishlistCount } = this.props.config;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- app config is generic\n const disableTooltip = this.props.context.app.config.disableTooltip || false;\n const headerToggleClass = this.state.mobileMenuCollapsed ? '' : 'ms-header-open';\n const headerClassName = classnames('ms-header', this.props.config.className, headerToggleClass);\n const navbarKey = 'header-nav-mobile';\n const customer = accountInformation && accountInformation.result;\n const cartIconSlot = this._getSlot('cartIcon');\n const menuBarSlot = this._getSlot('menuBar');\n const searchSlot = this._getSlot('search');\n let wishlistCount = 0;\n const siteOptionsSlot = this._getSlot('siteOptions');\n const preferredStoreSlot = this._getSlot('storeSelector');\n const currentDistributorSlot = this._getSlot('distributorSelector');\n if (wishlists !== undefined) {\n if (\n !wishlists.result ||\n !ArrayExtensions.hasElements(wishlists.result) ||\n !wishlists.result[0].CommerceListLines ||\n !ArrayExtensions.hasElements(wishlists.result[0].CommerceListLines)\n ) {\n wishlistCount = 0;\n } else {\n wishlistCount = wishlists.result[0].CommerceListLines.length;\n }\n }\n const viewProps: IHeaderViewProps = {\n ...(this.props as IHeaderProps),\n ...this.state,\n logo: (\n \n ),\n wishListIconDesktop: (\n \n ),\n wishListIconMobile: (\n \n ),\n cartIcon: ArrayExtensions.hasElements(cartIconSlot) ? (\n cartIconSlot[0]\n ) : (\n \n ),\n navIcon: (\n \n ),\n menuBar: ArrayExtensions.hasElements(menuBarSlot) ? menuBarSlot : [],\n search: ArrayExtensions.hasElements(searchSlot) ? searchSlot : [],\n siteOptions: ArrayExtensions.hasElements(siteOptionsSlot) ? siteOptionsSlot : [],\n className: headerClassName,\n HeaderTag: {\n moduleProps: this.props,\n className: classnames(headerClassName),\n 'aria-label': this.props.resources.headerAriaLabel,\n tag: 'header'\n },\n HeaderContainer: {\n className: classnames('ms-header__container')\n },\n HeaderTopBarContainer: {\n className: classnames('ms-header__topbar')\n },\n Divider: {\n className: classnames('ms-header__divider')\n },\n MobileMenuContainer: {\n tag: Modal,\n id: navbarKey,\n className: 'ms-header__mobile-hamburger',\n isOpen: !this.state.mobileMenuCollapsed,\n wrapClassName: 'ms-header__modal',\n toggle: this._toggleNavbar\n },\n MobileMenuHeader: ,\n MobileMenuBodyContainer: {\n tag: ModalBody,\n className: 'ms-header__mobile-hamburger-menu-body'\n },\n MobileMenuLinksContainer: {\n className: 'ms-header__mobile-hamburger-menu-links'\n },\n AccountInfoDropdownParentContainer: {\n className: 'ms-header__account-info'\n },\n AccountInfoDropdownPopoverConentContainer: this.displayName\n ? {\n tag: Popover,\n id: 'myprofilePopover',\n className: 'ms-header__account-info-content',\n placement: 'bottom',\n isOpen: this.state.signinPopoverOpen,\n target: this.popOverRef,\n toggle: this._togglePopover\n }\n : undefined,\n signInLink: this._getSigninButton(user, this.props.resources),\n signOutLink: this._getSignOutButton(user, this.props.resources),\n isOBORequest: MsDyn365.isOboRequest(this.props.context.request),\n switchCustomerLink: this._getSwitchCustomerButton(user, this.props.resources),\n accountInfoDropdownButton: this._getAccountInfoDropdownButton(user, this.props.resources),\n accountLinks: this._getAccountLinks(customer),\n preferredStore: ArrayExtensions.hasElements(preferredStoreSlot) && ,\n currentDistributor: this.isB2BSite && ArrayExtensions.hasElements(currentDistributorSlot) ? currentDistributorSlot : undefined\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle link text change.\n * @param linkIndex - Link Index.\n * @returns : Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: MsDyn365.ContentEditableEvent): void => {\n if (this.props.config.myAccountLinks?.[linkIndex]) {\n this.props.config.myAccountLinks[linkIndex].linkText = event.target.value;\n }\n };\n\n /**\n * Get the slot.\n * @param slotName - Name of the slot.\n * @returns The slot.\n */\n private _getSlot(slotName: string): React.ReactNode[] | null {\n const { slots } = this.props;\n return (slots && slots[slotName] && slots[slotName].length && slots[slotName]) || null;\n }\n\n /**\n * Renders the sign in button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSigninButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n !this.displayName && (\n \n \n {resources.signInLinkText}\n \n \n )\n );\n }\n\n /**\n * Renders the sign out button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSignOutButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignOut);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n this.displayName && (\n \n \n {resources.signOutLinkText}\n \n \n )\n );\n }\n\n /**\n * Renders the sign out button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSwitchCustomerButton(\n user: MsDyn365.IRequestContextUser | undefined,\n resources: IHeaderResources\n ): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SwitchCustomer);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const isOBOAccountSelected =\n MsDyn365.isOboRequest(this.props.context.request) && this.props.context.request.cookies.getAccountSelectionCookie();\n return (\n this.displayName &&\n isOBOAccountSelected && (\n this.props.context.request.cookies.removeAccountSelectionCookie()}\n {...attributes}\n >\n
\n
{format(resources.shoppingAsText, this.customerName)}
\n
{resources.switchCustomerLinkText}
\n
\n \n )\n );\n }\n\n private getBusinessPartnerSelectionUrl(): string | undefined {\n const route = MsDyn365.getUrlSync('businessPartnerSelection', this.props.context.actionContext);\n if (!route || !MsDyn365.msdyn365Commerce.isBrowser) {\n return undefined;\n }\n\n // MsDyn365.getUrlSync persists some params in the route and remove other params.\n // Among the persisted params, we need to remove catalogid.\n const persistedParamToRemove = ['catalogid'];\n const url = new URL(route, window.location.href);\n persistedParamToRemove.forEach(param => url.searchParams.delete(param));\n return url.href;\n }\n\n private _getSigninNotification(\n user: MsDyn365.IRequestContextUser | undefined,\n signUpMultipleCustomerFoundTitle: string,\n signUpCustomerNotFoundTitle: string,\n signInCustomerNotAuthorizedTitle: string\n ): string | undefined {\n if (!user?.retailServerErrorCode) {\n return undefined;\n }\n\n const { signUpCustomerNotFound, signUpMultipleCustomerFound, signInCustomerNotAuthorized } = this.props.config;\n const notFoundError = 'Microsoft_Dynamics_Commerce_Runtime_CustomerNotFound_WhenAutoLinking';\n const multipleAccountError = 'Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountsFoundWithSameEmailAddress';\n const accountAuthorizationError = 'Microsoft_Dynamics_Commerce_Runtime_AuthorizationFailed';\n\n if (user?.retailServerErrorCode === notFoundError) {\n return signUpCustomerNotFound !== undefined ? signUpCustomerNotFound : signUpCustomerNotFoundTitle;\n } else if (user?.retailServerErrorCode === multipleAccountError) {\n return signUpMultipleCustomerFound !== undefined ? signUpMultipleCustomerFound : signUpMultipleCustomerFoundTitle;\n } else if (user?.retailServerErrorCode === accountAuthorizationError) {\n return signInCustomerNotAuthorized !== undefined ? signInCustomerNotAuthorized : signInCustomerNotAuthorizedTitle;\n }\n return user?.retailServerErrorMessage;\n }\n\n private _getAccountInfoDropdownButton(\n user: MsDyn365.IRequestContextUser | undefined,\n resources: IHeaderResources\n ): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.MyProfile);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n this.displayName && (\n \n
\n
{this.displayName}
\n {MsDyn365.isOboRequest(this.props.context.request) && this.customerName && (\n
{format(resources.shoppingAsText, this.customerName)}
\n )}\n
\n \n )\n );\n }\n\n private _getAccountLinks(customer: Customer | undefined): React.ReactNode[] | undefined {\n const { myAccountLinks } = this.props.config;\n const payLoad = getPayloadObject('click', this.telemetryContent, '');\n if (!this.displayName || !myAccountLinks || !ArrayExtensions.hasElements(myAccountLinks)) {\n return undefined;\n }\n return myAccountLinks.map((cta: IMyAccountLinksData, index: number) => {\n payLoad.contentAction.etext = cta.linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: cta.ariaLabel,\n className: 'ms-signin-info__account-link-button',\n linkText: cta.linkText,\n linkUrl: cta.linkUrl.destinationUrl,\n openInNewTab: cta.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n\n return (\n \n );\n });\n }\n\n private _toggleNavbar(): void {\n this.setState({\n mobileMenuCollapsed: !this.state.mobileMenuCollapsed\n });\n }\n\n private _togglePopover(): void {\n this.setState({\n signinPopoverOpen: !this.state.signinPopoverOpen\n });\n }\n\n private _keydown(event: KeyboardEvent): void {\n if (event.keyCode === KeyCodes.Escape) {\n this.setState({ mobileMenuCollapsed: true });\n }\n }\n}\n\nexport default Header;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IHeaderViewProps } from './header';\n\nconst headerView: React.FC = props => {\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer,\n Divider\n } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {props.currentDistributor}\n {_renderDesktopAccountBlock(props)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n \n \n {props.MobileMenuHeader}\n {_renderReactFragment(props.menuBar)}\n \n {props.accountLinks ? props.accountLinks.map(link => link) : false}\n {props.siteOptions}\n {props.wishListIconMobile}\n {props.signInLink}\n {props.signOutLink}\n \n \n \n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderDesktopAccountBlock(props: IHeaderViewProps): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map(link => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return {signInLink};\n }\n }\n props.context.telemetry.error('Header content is empty, module wont render.');\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, isOboRequest } from '@msdyn365-commerce/core';\nimport { Employee } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * Input class for the GetEmployeeInput data action.\n */\nexport class GetEmployeeInput implements IActionInput {\n /**\n * Get Cache Key.\n * @returns - Cache key string.\n */\n public getCacheKey = (): string => 'Employee';\n\n /**\n * Get Cache type Name.\n * @returns - Cache name string.\n */\n public getCacheObjectType = (): string => 'Employee';\n\n /**\n * Get Cache type.\n * @returns - CacheType enum.\n */\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * CreateInput method for the getEmployee.\n * @returns - Input for data action.\n */\nexport const createGetEmployeeInput = (): IActionInput => {\n return new GetEmployeeInput();\n};\n\n/**\n * The action method for the getEmployee data action.\n * @param input -- The action input.\n * @param ctx -- The action context.\n * @returns -- Employee.\n */\nexport async function getEmployeeAction(input: GetEmployeeInput, ctx: IActionContext): Promise {\n // For now, we just need the name information of employee. When we need more information, we will invoke EmployeeDataActions.readAsync retail proxy API.\n if (isOboRequest(ctx.requestContext)) {\n const user = ctx.requestContext.user;\n return {\n StaffId: '',\n Name: user?.firstName || user?.name\n };\n }\n return;\n}\n\n/**\n * The getEmployee data action.\n * Gets the employee.\n * @returns Employee.\n */\nexport const getEmployeeActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/retail-actions/get-employee',\n action: getEmployeeAction as IAction,\n input: createGetEmployeeInput\n});\n\nexport default getEmployeeActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { buildHydratedMockActionContext, buildMockRequest, ICoreContext, IRequestContext } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { AsyncResult, Customer, Employee } from '@msdyn365-commerce/retail-proxy';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\n\nimport { IHeaderData } from '../header.data';\nimport { IHeaderConfig, IHeaderResources } from '../header.props.autogenerated';\n\nconst mockRequest: IRequestContext = buildMockRequest();\nconst mockRequestURL = {\n requestUrl: new URL('https://wwww.example.com'),\n staticCdnUrl: 'https://wwww.example.com'\n};\nmockRequest.gridSettings = {\n xs: { w: 767, h: 0 },\n sm: { w: 991, h: 0 },\n md: { w: 1199, h: 0 },\n lg: { w: 1599, h: 0 },\n xl: { w: 1600, h: 0 }\n};\nmockRequest.user.isAuthenticated = true;\nmockRequest.user.signInUrl = '/signin';\nmockRequest.user.signOutUrl = '/signout';\nmockRequest.user.signUpUrl = '/signup';\n\nconst mockAnonRequest = buildMockRequest();\nmockAnonRequest.user.isAuthenticated = false;\nmockAnonRequest.user.signInUrl = '/signin';\nmockAnonRequest.user.signOutUrl = '/signout';\nmockAnonRequest.user.signUpUrl = '/signup';\nmockAnonRequest.url = mockRequestURL;\n\nconst mockSigninErrorRequest = buildMockRequest();\nmockSigninErrorRequest.user.isAuthenticated = false;\nmockSigninErrorRequest.user.retailServerErrorCode = 'Microsoft_Dynamics_Commerce_Runtime_CustomerNotFound_WhenAutoLinking';\nmockSigninErrorRequest.user.signInUrl = '/signin';\nmockSigninErrorRequest.user.signOutUrl = '/signout';\nmockSigninErrorRequest.user.signUpUrl = '/signup';\nmockSigninErrorRequest.url = mockRequestURL;\n\nconst mockActionContext = buildHydratedMockActionContext();\nmockActionContext.requestContext.url = mockRequestURL;\n\n/**\n * Method to mock auth context.\n */\n// @ts-expect-error\nexport const mockAuthContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\n// @ts-expect-error\nexport const mockAnonContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockAnonRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- Due to partial mock.\n// @ts-expect-error\nexport const mockSigninContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockSigninErrorRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\nexport const mockHeaderConfig: IHeaderConfig = {\n logoLink: {\n linkUrl: {\n destinationUrl: 'https://ppe.fabrikam.com/fe'\n },\n ariaLabel: 'fabrikam'\n },\n logoImage: {\n src: 'https://img-prod-cms-mr-microsoft-com.akamaized.net/cms/api/fabrikam/imageFileData/MA1G3L'\n }\n};\n\nexport const mockResources: IHeaderResources = {\n mobileHamburgerAriaLabel: 'Mobile view hamburger aria label',\n wishlistTooltipText: 'My wishlist',\n cartLabel: 'Shopping bag, ({0}) items',\n cartQtyLabel: '({0})',\n signInLinkText: 'Sign In',\n signInLinkAriaText: 'Sign In',\n signOutLinkText: 'Sign Out',\n signOutLinkAriaText: 'Sign Out',\n shoppingAsText: 'Shopping as {0}',\n switchCustomerLinkText: 'Switch customer',\n switchCustomerLinkAriaText: 'Switch customer',\n headerPreferredStoreText: 'Select store',\n headerPreferredStoreAriaLabel: 'select preferred store',\n signInCustomerNotAuthorizedTitle: 'Error message if customer not authorized',\n signUpCustomerNotFoundTitle: 'Error message if cutsomer not found',\n signUpMultipleCustomerFoundTitle: 'Multiple customer found error msg',\n closeNotificationLabel: 'Close',\n wishlistCountLabel: '({0})',\n headerAriaLabel: 'Header'\n};\n\nexport const getMockData = (totalItemsInCart: number = 0, accountNumber: string = '2', firstName: string = ''): IHeaderData => {\n return {\n cart: >{\n status: 'SUCCESS',\n result: {\n totalItemsInCart\n }\n },\n employee: >{\n status: 'SUCCESS',\n result: {\n Name: 'Worker'\n }\n },\n accountInformation: >{\n status: 'SUCCESS',\n result: {\n AccountNumber: accountNumber,\n FirstName: firstName\n }\n },\n storeSelectorStateManager: >{\n status: 'SUCCESS',\n result: {}\n }\n };\n};\n\nexport const getMockErrorData = (): IHeaderData => {\n return {\n cart: >{\n status: 'FAILED',\n result: undefined\n },\n employee: >{\n status: 'FAILED',\n result: undefined\n },\n accountInformation: >{\n status: 'FAILED',\n result: undefined\n },\n storeSelectorStateManager: >{\n status: 'FAILED',\n result: undefined\n }\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { IHeaderViewProps, Logo } from '@msdyn365-commerce-modules/header';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IHeaderProps } from '../definition-extensions/header.ext.props.autogenerated';\n\n/**\n * GridSizes.\n */\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n *\n * HeaderView component.\n * @extends {React.PureComponent}\n */\nexport class HeaderView extends React.PureComponent> {\n private readonly menuNode: React.RefObject;\n\n public constructor(props: IHeaderViewProps & IHeaderProps<{}>) {\n super(props);\n this.menuNode = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this.props.config.useStickyHeader) {\n // Set header update methods to trigger on scroll\n if (MsDyn365.isBrowser) {\n window.addEventListener('scroll', () => {\n this._configureStickyHeader();\n });\n }\n this._configureStickyHeader();\n }\n }\n\n public render(): JSX.Element | null {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n Divider,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer\n } = this.props;\n\n return (\n \n \n \n
\n {this._renderReactFragment(this.props.menuBar)}\n
\n
{this.props.navIcon}
\n {this.props.logo}\n {this._renderMobileLogo()}\n {this._renderReactFragment(this.props.search)}\n {this.props.preferredStore}\n {this.props.currentDistributor}\n {this._renderAccountBlock(this.props)}\n \n {this.props.cartIcon}\n {this._renderReactFragment(this.props.siteOptions)}\n \n \n \n {this.props.MobileMenuHeader}\n {this._renderReactFragment(this.props.menuBar)}\n \n {this.props.accountLinks ? this.props.accountLinks.map(link => link) : false}\n {this.props.siteOptions}\n {this.props.wishListIconMobile}\n {this.props.signInLink}\n {this.props.signOutLink}\n \n \n \n
\n
\n );\n }\n\n /**\n * Function to update header.\n */\n private readonly _configureStickyHeader = (): void => {\n // Get heights of cookie and promotion banners\n const defaultValue = 0;\n const headerAlertsContainer: HTMLElement | null = document.querySelector('.ms-promo-banner');\n const bannerHeights = headerAlertsContainer ? headerAlertsContainer.offsetHeight : defaultValue;\n\n // Triggers opacity change of header\n const headerElement = document.querySelector('header .default-container');\n if (headerElement) {\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > defaultValue) {\n headerElement.classList.add('lock-opaque');\n headerElement.classList.add('fixed');\n } else {\n headerElement.classList.remove('lock-opaque');\n headerElement.classList.remove('fixed');\n }\n }\n\n // Update sticky header position and opacity\n const stickyHeader: HTMLElement | null = document.querySelector('.desktop-navicon-container');\n const headerLogo: HTMLElement | null = document.querySelector('.ms-header__logo');\n\n if (stickyHeader && headerLogo) {\n // Fix center sticky header\n const navStickyPos = headerLogo.offsetHeight + bannerHeights;\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > navStickyPos) {\n stickyHeader.classList.add('fixed');\n } else {\n stickyHeader.classList.remove('fixed');\n }\n }\n };\n\n private _renderMobileLogo(): JSX.Element | null {\n const { config, context, typeName } = this.props;\n return (\n \n );\n }\n\n /**\n * Function to render account block.\n * @param props - IHeaderViewProps.\n * @returns Returns JSX.Element | null.\n */\n private readonly _renderAccountBlock = (props: IHeaderViewProps): JSX.Element | null => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signInLink\n } = props;\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(AccountInfoDropdownParentContainer.className, 'account-desktop');\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n {this._renderAccountDropdownLinks(props)}\n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n };\n\n private readonly _renderAccountDropdownLinks = (props: IHeaderViewProps): JSX.Element | null => {\n const { isOBORequest, switchCustomerLink, accountLinks, signOutLink } = props;\n if (isOBORequest) {\n return (\n <>\n {switchCustomerLink}\n {signOutLink}\n {accountLinks ? : false}\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n \n );\n } else {\n return (\n <>\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n );\n }\n };\n\n /**\n * Function to render react fragment.\n * @param items - React nodes.\n * @returns Returns JSX.Element | null.\n */\n private readonly _renderReactFragment = (items: React.ReactNode[]): JSX.Element | null => {\n return (\n <>\n {ArrayExtensions.hasElements(items)\n ? items.map((slot: React.ReactNode) => {\n return <>{slot};\n })\n : null}\n \n );\n };\n}\n\nexport default HeaderView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["bvHandlerScript","trim","klaviyoInitScript","_ref","googleTagManagerId","bazaarVoiceEnv","sailthruCustomerId","request","locale","userEmail","user","emailAddress","bvScript","replace","React","w","d","s","l","i","_f$parentNode","push","Date","getTime","event","f","getElementsByTagName","j","createElement","async","src","parentNode","insertBefore","window","document","klaviyoPublicKey","klaviyoScript","publicKey","app","config","heiKlaviyoPublicKey","script","_user$firstName","_user$lastName","firstName","lastName","isBrowser","MsDyn365","sailthruInit","Sailthru","init","customerId","cookies","get","value","integration","email","vars","HtmlHeadInclude","dangerouslySetInnerHTML","__html","type","renderCustomerName","accountInformation","customer","result","FirstName","Name","_renderReactFragment","items","additionalProps","length","map","slot","index","key","props","HeaderTag","HeaderContainer","HeaderTopBarContainer","Divider","showWishlistIcon","enableStaticMenu","context","useStaticMenu","slots","staticMenu","heiSailthruCustomerId","Module","Object","assign","Node","navIcon","logo","search","preferredStore","renderForMobile","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","accountInfoDropdownButton","signOutLink","signInLink","accountLinks","accountClassName","classnames","className","link","_renderAccountBlock","wishListIconDesktop","cartIcon","siteOptions","MobileMenuLinksContainer","mobileMenuCollapsed","showAccountLinksInMobileView","Collapse","isOpen","data","Drawer","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","_renderMobileAccountBlock","wishListIconMobile","actionBtn","menuBar","_renderCollapseMenu","SharedScripts","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","__bindings__","_objectSpread","viewDictionary","cn","BaseStoreSelectorStateManager","constructor","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","this","isMapModuleLoaded","_readFromToCookie","storeInfo","JSON","parse","undefined","_unused","_context","input","storeId","selectedStoreLocationId","storeName","writeToCookie","arguments","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","localStorage","removeItem","setItem","cookieValue","getItem","__decorate","computed","observable","action","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","actionContext","requestContext","channel","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","query","encodeURI","geolocationApiUrl","requestUrl","Promise","resolve","setAttribute","remove","resourceSets","resources","point","coordinates","body","appendChild","_document","StringExtensions","isNullOrEmpty","getElementById","currentWindowAPI","mapAPIReady","isMapApiLoaded","url","lang","market","reject","_document2","_document3","defer","addEventListener","error","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","HeaderPreferredStore","modalCloseButtonRef","handleClick","_findPreferredStoreOnClick","render","storeSelectorStateManager","ArrayExtensions","hasElements","storeSelector","headerPreferredStoreText","color","headerPreferredStoreAriaLabel","onClick","ref","storeSelectorId","keys","openDialog","showMapViewLink","parentElementRef","onLocationSelected","orgUnitLocation","catch","telemetry","message","debug","observer","Logo","super","payLoad","getPayloadObject","telemetryContent","TelemetryConstant","attributes","getTelemetryAttributes","_renderLogo","linkUrl","destinationUrl","href","ariaLabel","target","openInNewTab","rel","_renderImage","Msdyn365","image","gridSettings","imageSettings","viewports","xs","q","h","lg","lazyload","loadFailureBehavior","editProps","moduleType","typeName","imagePropertyName","shouldSkipToMainImage","NavIcon","Button","toggleNavBar","title","mobileHamburgerAriaLabel","isExpanded","targetId","Header","isB2BSite","handleLinkTextChange","linkIndex","_this$props$config$my","myAccountLinks","linkText","popOverRef","_toggleNavbar","bind","_togglePopover","_keydown","state","signinPopoverOpen","hasSigninerror","getTelemetryObject","telemetryPageName","friendlyName","isChannelTypeB2B","_this$props$context$r","workerName","customerName","_this$props$data$empl","worker","employee","_this$props$data$acco","componentDidMount","reaction","cart","signUpCustomerNotFoundTitle","signUpMultipleCustomerFoundTitle","signInCustomerNotAuthorizedTitle","closeNotificationLabel","signinNotificationError","_getSigninNotification","NotificationsManager","instance","addNotification","ErrorNotification","componentWillUnmount","removeEventListener","wishlists","cartLabel","cartQtyLabel","logoLink","logoImage","shouldShowWishlistCount","disableTooltip","headerToggleClass","headerClassName","navbarKey","cartIconSlot","_getSlot","menuBarSlot","searchSlot","wishlistCount","siteOptionsSlot","preferredStoreSlot","currentDistributorSlot","CommerceListLines","viewProps","WishListIconComponent","showButtonTooltip","wishlistTooltipText","wishlistCountLabel","isDispayWishlistCount","CartIconComponent","moduleProps","headerAriaLabel","tag","MobileMenuContainer","Modal","wrapClassName","toggle","MobileMenuHeader","ModalHeader","MobileMenuBodyContainer","ModalBody","displayName","Popover","placement","_getSigninButton","_getSignOutButton","isOBORequest","switchCustomerLink","_getSwitchCustomerButton","_getAccountInfoDropdownButton","_getAccountLinks","currentDistributor","renderView","slotName","SignIn","signInLinkText","signInUrl","signInLinkAriaText","onTelemetryClick","_user$signOutUrl","SignOut","signOutLinkText","signOutUrl","signOutLinkAriaText","SwitchCustomer","isOBOAccountSelected","getAccountSelectionCookie","switchCustomerLinkAriaText","switchCustomerLinkText","getBusinessPartnerSelectionUrl","role","removeAccountSelectionCookie","format","shoppingAsText","route","URL","location","forEach","param","searchParams","delete","retailServerErrorCode","signUpCustomerNotFound","signUpMultipleCustomerFound","signInCustomerNotAuthorized","retailServerErrorMessage","MyProfile","innerRef","cta","contentAction","etext","editableLink","additionalProperties","onTextChange","setState","keyCode","KeyCodes","Escape","_renderDesktopAccountBlock","GetEmployeeInput","getCacheKey","getCacheObjectType","dataCacheType","createGetEmployeeInput","getEmployeeAction","ctx","isOboRequest","StaffId","getEmployeeActionDataAction","mockRequest","buildMockRequest","mockRequestURL","staticCdnUrl","sm","xl","isAuthenticated","signUpUrl","mockAnonRequest","mockSigninErrorRequest","mockActionContext","buildHydratedMockActionContext","HeaderView","_configureStickyHeader","headerAlertsContainer","querySelector","bannerHeights","offsetHeight","headerElement","documentElement","scrollTop","classList","add","stickyHeader","headerLogo","navStickyPos","_renderAccountDropdownLinks","menuNode","useStickyHeader","_renderMobileLogo","_config$mobileLogoIma","mobileLogoImage","module","exports","ReactDOM"],"sourceRoot":""}