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E,EAAAA,cAAA,OAAK8B,UAAU,4BAA4BW,KAAKvC,MAAM+D,SACrDxB,KAAKvC,MAAMgE,KACXzB,KAAK0B,oBACL1B,KAAKL,qBAAqBK,KAAKvC,MAAMkE,QACrC3B,KAAKvC,MAAMmE,eACX5B,KAAKpB,oBAAoBoB,KAAKvC,OAC/BF,EAAAA,cAAC+B,EAAAA,KAAIC,OAAAC,OAAA,GAAKmB,IACTX,KAAKvC,MAAMqE,SACX9B,KAAKL,qBAAqBK,KAAKvC,MAAMoE,cAE1CtE,EAAAA,cAAC+B,EAAAA,KAAIC,OAAAC,OAAA,GAAKoB,GACNrD,EAAAA,cAAC+B,EAAAA,KAAIC,OAAAC,OAAA,GAAKqB,GACLb,KAAKvC,MAAMsE,iBACX/B,KAAKL,qBAAqBK,KAAKvC,MAAM8D,SACtChE,EAAAA,cAAC+B,EAAAA,KAAIC,OAAAC,OAAA,GAAKsB,KACLd,KAAKvC,MAAMyB,cAAec,KAAKvC,MAAMyB,aAAaO,KAAIC,GAAQA,IAC9DM,KAAKvC,MAAMoE,YACX7B,KAAKvC,MAAMuE,mBACXhC,KAAKvC,MAAMwB,WACXe,KAAKvC,MAAMuB,iBA6ChC0C,oBAAiB,IAAAO,EACrB,MAAM,OAAE9B,EAAM,QAAEc,EAAO,SAAEiB,GAAalC,KAAKvC,MAC3C,OACIF,EAAAA,cAAC4E,EAAAA,KAAI5C,OAAAC,OAAA,GACG,CACAE,KAAMS,EAAOiC,SACbC,MAA6B,QAAxBJ,EAAE9B,EAAOmC,uBAAe,IAAAL,EAAAA,EAAI,GACjC5C,UAAW,yBACXkD,aAActB,EAAQC,QAAQqB,aAC9BC,eAAgBvB,EAAQC,QACxBgB,SAAAA,MA8EpB,iBCvNA2E,EAAOC,QAAUvJ,cCAjBsJ,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/themes/peetsaw/views/header.view.tsx?91fb","webpack://Msdyn365.Commerce.Online/./lib/header/module-registration.js?4d67","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/header.view.tsx?6d84","webpack://Msdyn365.Commerce.Online/../../src/get-employee.ts?b8bb","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/header.view.tsx?9bd3","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*--------------------------------------------------------------\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 MsDyn365 from '@msdyn365-commerce/core';\r\nimport { IHeaderViewProps, Logo } from '@msdyn365-commerce-modules/header';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IHeaderProps } from '../definition-extensions/header.ext.props.autogenerated';\r\n\r\n/**\r\n * GridSizes.\r\n */\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\n/**\r\n *\r\n * HeaderView component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class HeaderView extends React.PureComponent> {\r\n private readonly menuNode: React.RefObject;\r\n\r\n public constructor(props: IHeaderViewProps & IHeaderProps<{}>) {\r\n\r\n super(props);\r\n this.menuNode = React.createRef();\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.config.useStickyHeader) {\r\n // Set header update methods to trigger on scroll\r\n if (MsDyn365.isBrowser) {\r\n window.addEventListener('scroll', () => {\r\n this._configureStickyHeader();\r\n });\r\n }\r\n this._configureStickyHeader();\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\r\n const { HeaderTag, HeaderContainer, HeaderTopBarContainer, Divider, MobileMenuContainer, MobileMenuBodyContainer, MobileMenuLinksContainer\r\n } = this.props;\r\n const shouldShowNav = this.props.config.hideNavIfNotAuthenticated ? this.props.context.request.user.isAuthenticated : true;\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n {shouldShowNav ? this._renderReactFragment(this.props.menuBar) :
}\r\n
\r\n {shouldShowNav ? \r\n
\r\n {this.props.navIcon}\r\n
\r\n :
}\r\n {this.props.logo}\r\n {this._renderMobileLogo()}\r\n {shouldShowNav ? this._renderReactFragment(this.props.search) :
}\r\n {this.props.preferredStore}\r\n {this._renderReactFragment(this.props.siteOptions)}\r\n {this._renderAccountBlock(this.props)}\r\n \r\n {shouldShowNav ? this.props.cartIcon :
}\r\n
\r\n \r\n \r\n { this.props.MobileMenuHeader }\r\n {this._renderReactFragment(this.props.menuBar)}\r\n \r\n { this.props.accountLinks ? this.props.accountLinks.map(link => link) : false }\r\n { this.props.siteOptions }\r\n { this.props.wishListIconMobile }\r\n { this.props.signInLink }\r\n { this.props.signOutLink }\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to update header.\r\n */\r\n private readonly _configureStickyHeader = (): void => {\r\n // Get heights of cookie and promotion banners\r\n const defaultValue = 0;\r\n const headerAlertsContainer: HTMLElement | null = document.querySelector('.ms-promo-banner');\r\n const bannerHeights = headerAlertsContainer ? headerAlertsContainer.offsetHeight : defaultValue;\r\n\r\n // Triggers opacity change of header\r\n const headerElement = document.querySelector('header .default-container');\r\n if (headerElement) {\r\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > defaultValue) {\r\n headerElement.classList.add('lock-opaque');\r\n headerElement.classList.add('fixed');\r\n } else {\r\n headerElement.classList.remove('lock-opaque');\r\n headerElement.classList.remove('fixed');\r\n }\r\n }\r\n\r\n // Update sticky header position and opacity\r\n const stickyHeader: HTMLElement | null = document.querySelector('.desktop-navicon-container');\r\n const headerLogo: HTMLElement | null = document.querySelector('.ms-header__logo');\r\n\r\n if (stickyHeader && headerLogo) {\r\n // Fix center sticky header\r\n const navStickyPos = headerLogo.offsetHeight + bannerHeights;\r\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > navStickyPos) {\r\n stickyHeader.classList.add('fixed');\r\n } else {\r\n stickyHeader.classList.remove('fixed');\r\n }\r\n }\r\n };\r\n\r\n private _renderMobileLogo(): JSX.Element | null {\r\n const { config, context, typeName } = this.props;\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to render account block.\r\n * @param props - IHeaderViewProps.\r\n * @returns Returns JSX.Element | null.\r\n */\r\n private readonly _renderAccountBlock = (props: IHeaderViewProps): JSX.Element | null => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\r\n const { AccountInfoDropdownParentContainer, AccountInfoDropdownPopoverConentContainer,\r\n accountInfoDropdownButton,\r\n signOutLink,\r\n signInLink,\r\n accountLinks\r\n } = props;\r\n if (AccountInfoDropdownParentContainer) {\r\n const accountClassName = classnames(AccountInfoDropdownParentContainer.className, 'account-desktop');\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 return null;\r\n };\r\n\r\n /**\r\n * Function to render react fragment.\r\n * @param items - React nodes.\r\n * @returns Returns JSX.Element | null.\r\n */\r\n private readonly _renderReactFragment = (items: React.ReactNode[]): JSX.Element | null => {\r\n return (\r\n <>\r\n {ArrayExtensions.hasElements(items) ? items.map((slot: React.ReactNode) => {\r\n return (<>\r\n {slot}\r\n );\r\n }) : null}\r\n \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|peetsaw|views|header'] = {\n c: () => require('partner/themes/peetsaw/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 { 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 { 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 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._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":["HeaderView","React","constructor","props","super","_configureStickyHeader","headerAlertsContainer","document","querySelector","bannerHeights","offsetHeight","headerElement","MsDyn365","isBrowser","documentElement","scrollTop","classList","add","remove","stickyHeader","headerLogo","navStickyPos","_renderAccountBlock","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","accountInfoDropdownButton","signOutLink","signInLink","accountLinks","accountClassName","classnames","className","Node","Object","assign","map","link","_renderReactFragment","items","ArrayExtensions","hasElements","slot","this","menuNode","componentDidMount","config","useStickyHeader","window","addEventListener","render","HeaderTag","HeaderContainer","HeaderTopBarContainer","Divider","MobileMenuContainer","MobileMenuBodyContainer","MobileMenuLinksContainer","shouldShowNav","hideNavIfNotAuthenticated","context","request","user","isAuthenticated","Module","ref","menuBar","navIcon","logo","_renderMobileLogo","search","preferredStore","siteOptions","cartIcon","MobileMenuHeader","wishListIconMobile","_config$mobileLogoIma","typeName","Logo","logoLink","image","mobileLogoImage","gridSettings","requestContext","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","renderCustomerName","accountInformation","customer","result","FirstName","Name","length","index","key","renderForMobile","wishListIconDesktop","mobileMenuCollapsed","Collapse","isOpen","data","Drawer","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","_renderMobileAccountBlock","_renderCollapseMenu","GetEmployeeInput","getCacheKey","getCacheObjectType","dataCacheType","createGetEmployeeInput","async","getEmployeeAction","input","ctx","isOboRequest","StaffId","firstName","getEmployeeActionDataAction","createObservableDataAction","action","_renderAccountDropdownLinks","isOBORequest","switchCustomerLink","module","exports","ReactDOM"],"sourceRoot":""}