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,KAAKgG,OAAK,IACbyE,YAAa,CACTC,IAAK,MACLC,YAAa3K,KAAKgG,MAClBsE,UAAWM,GAAAA,CAAU,SAAU,CAAEC,KAAMN,GAAoBD,IAE/DQ,OAAQ,CACJC,YAAa,CAAET,UAAW,kBAC1BjE,SAASA,MAAAA,OAAO,EAAPA,EAASC,OACdP,EAAAA,cAACiF,EAAAA,GAAa,eACVV,UAAU,mBACNjE,EAAO,CACXqE,IAAKrE,EAAQqE,KAAO,KACpBpE,KAAMD,EAAQC,KACd2E,UAAW,CAAEC,OAAQlL,KAAKmG,oBAAqB1D,eAAgBzC,KAAKgG,MAAMS,QAAQ0E,aAI9FC,SAAU,CACNV,IAAK,MACLJ,UAAW,eACXe,IAAKrL,KAAKkG,QAEdJ,IAAK9F,KAAK2G,MAGd,OAAO3G,KAAKgG,MAAMsF,WAAWd,MA7GrBxI,EAAAA,EAAAA,IAAAA,CAAXE,EAAAA,IAAU,0BADT4D,GAAG,SADRyF,EAAAA,IACKzF,GAoPN,+EC7QA,MAAM0F,EAA+B,QAAC,YAAET,EAAW,QAAE1E,GAAS,SAAKN,EAAAA,cAAC0F,EAAAA,KAAI,iBAAKV,GAAc1E,IAiB3F,EAPyC,QAAC,YAAEoE,EAAW,OAAEK,EAAM,SAAEM,GAAU,SACvErF,EAAAA,cAAC2F,EAAAA,OAAM,iBAAKjB,GACPK,GAAU/E,EAAAA,cAACyF,EAAS,iBAAKV,IAC1B/E,EAAAA,cAAC0F,EAAAA,KAAI,iBAAKL,aC9BlBO,EAAOC,QAAU7F,cCAjB4F,EAAOC,QAAUC","sources":["webpack://goodwill-loyalty/./lib/map/module-registration.js?7fc9","webpack://goodwill-loyalty/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://goodwill-loyalty/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://goodwill-loyalty/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://goodwill-loyalty/./src/modules/map/map.tsx?6111","webpack://goodwill-loyalty/./src/modules/map/map.view.tsx?5db9","webpack://goodwill-loyalty/external var \"React\"?0d3b","webpack://goodwill-loyalty/external var \"ReactDOM\"?853b"],"sourcesContent":["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['map'] = {\n c: () => require('@msdyn365-commerce-modules/map/dist/lib/modules/map/map'),\n $type: 'contentModule',\n da: [{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'map',\n p: 'map',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/map/dist/lib/modules/map'\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 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['@msdyn365-commerce-modules|map|modules|map|map'] = {\n c: () => require('@msdyn365-commerce-modules/map/dist/lib/modules/map/map.view.js'),\n cn: '@msdyn365-commerce-modules-map-map'\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 // 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\n/// \n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IMapData } from './map.data';\nimport { IMapProps, IPushpinOptionsData } from './map.props.autogenerated';\n\n/**\n * Header Interface.\n */\nexport interface IHeader {\n headerProps: INodeProps;\n heading: React.ReactNode;\n}\n\n/**\n * MapViewProps Interface.\n */\nexport interface IMapViewProps extends IMapProps {\n ModuleProps: IModuleProps;\n Header: IHeader;\n MapProps: INodeProps;\n Map: Microsoft.Maps.Map | undefined;\n}\n\n/**\n *\n * Map component.\n * @extends {React.Component>}\n */\n@observer\nclass Map extends React.PureComponent> {\n @observable public map: Microsoft.Maps.Map | undefined;\n\n private readonly mapRef: React.RefObject = React.createRef();\n\n public constructor(props: IMapProps) {\n super(props);\n }\n\n public componentDidMount(): void {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n }\n } = this.props;\n\n if (channel && !channel.BingMapsApiKey) {\n telemetry.error('BingMapsApiKey is missing.');\n return;\n }\n\n if (channel && !channel.BingMapsEnabled) {\n telemetry.error('Map is disabled from HQ.');\n return;\n }\n\n if (this.props.data.storeSelectorStateManager.result?.isMapApiLoaded) {\n this._initMap();\n this._updateMap();\n }\n\n when(\n () => !!this.props.data.storeSelectorStateManager.result?.setMapModuleLoaded,\n () => {\n this.props.data.storeSelectorStateManager.result?.setMapModuleLoaded(true);\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.loadMapApi,\n () => {\n this.props.data.storeSelectorStateManager.result?.loadMapApi({\n key: channel?.BingMapsApiKey,\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode\n });\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.isMapApiLoaded,\n () => {\n this._initMap();\n }\n );\n\n reaction(\n () => {\n return [\n this.props.data.storeSelectorStateManager.result?.context?.orgUnitStoreInformation,\n this.props.data.storeSelectorStateManager.result?.selectedStoreLocationId,\n this.map\n ];\n },\n () => {\n this._updateMap();\n }\n );\n }\n\n public render(): JSX.Element | null {\n const {\n config: { heading, className },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const shouldDisplayMap = storeSelectorStateManager?.listMapViewState.displayMap;\n\n const viewProps: IMapViewProps = {\n ...this.props,\n ModuleProps: {\n tag: 'div',\n moduleProps: this.props,\n className: classname('ms-map', { show: shouldDisplayMap }, className)\n },\n Header: {\n headerProps: { className: 'ms-map__header' },\n heading: heading?.text && (\n \n )\n },\n MapProps: {\n tag: 'div',\n className: 'ms-map__body',\n ref: this.mapRef\n },\n Map: this.map\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Method to be called on heading change.\n * @param event -Content Edit Event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Initialize the map.\n */\n private readonly _initMap = () => {\n const {\n context: {\n actionContext: {\n requestContext: { channel }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n if (storeSelectorStateManager?.isMapApiLoaded) {\n this.map = new Microsoft.Maps.Map(this.mapRef.current as HTMLElement, {\n credentials: channel?.BingMapsApiKey,\n pushpinAccessible: true\n });\n Microsoft.Maps.Events.addHandler(this.map, 'click', async () => {\n await storeSelectorStateManager.setSelectedStoreLocationId(undefined);\n });\n }\n };\n\n /**\n * Update the map.\n */\n private readonly _updateMap = () => {\n const pushpinOptions = this.props.config.pushpinOptions;\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager?.result;\n const orgUnitStoreInformation = storeSelectorStateManager?.context?.orgUnitStoreInformation;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n\n if (this.map && orgUnitStoreInformation) {\n let mapLocation: OrgUnitLocation | undefined;\n this.map.entities.clear();\n const pushpins: Microsoft.Maps.IPrimitive[] = [];\n\n const storeLocationList = orgUnitStoreInformation.filter(store => store.OrgUnitAvailability !== undefined);\n\n for (const [index, unitStoreInfo] of storeLocationList.entries()) {\n const storeLocation = unitStoreInfo.OrgUnitAvailability?.OrgUnitLocation;\n\n if (storeLocation?.Latitude && storeLocation.Longitude) {\n const isSelectedLocation = selectedStoreLocationId === storeLocation.OrgUnitNumber;\n const options = this._getPushpinOptions(isSelectedLocation, index, pushpinOptions);\n const pushpin = new Microsoft.Maps.Pushpin(\n new Microsoft.Maps.Location(storeLocation.Latitude, storeLocation.Longitude),\n options\n );\n\n Microsoft.Maps.Events.addHandler(pushpin, 'click', () => {\n this.handleClickEvent(storeLocation.OrgUnitNumber);\n });\n isSelectedLocation ? pushpins.unshift(pushpin) : pushpins.push(pushpin);\n\n if (isSelectedLocation) {\n mapLocation = storeLocation;\n }\n }\n }\n\n if (mapLocation) {\n const currentLocation = new Microsoft.Maps.Location(mapLocation.Latitude, mapLocation.Longitude);\n this.map.setView({ center: currentLocation });\n } else {\n // Create a LocationRect from array of pushpins and set the map view.\n this.map.setView({\n bounds: Microsoft.Maps.LocationRect.fromShapes(pushpins)\n });\n }\n\n this.map.setOptions({ pushpinAccessible: true });\n this.map.entities.push(pushpins);\n }\n };\n\n /**\n * Handle click event.\n * @param orgUnitNumber - Organization unit number.\n */\n private readonly handleClickEvent = (orgUnitNumber: string | undefined): void => {\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager.result;\n storeSelectorStateManager?.setSelectedStoreLocationId(undefined);\n if (orgUnitNumber) {\n setTimeout(() => {\n storeSelectorStateManager?.setSelectedStoreLocationId(orgUnitNumber);\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers -- Time out.\n }, 500);\n }\n };\n\n /**\n * Get the pushpin option.\n * @param isSelectedLocation - Is selected location.\n * @param index - Index.\n * @param pushpinOptions - PushpinOptions.\n * @returns - The pushpin options.\n */\n private readonly _getPushpinOptions = (isSelectedLocation: boolean, index: number, pushpinOptions?: IPushpinOptionsData) => {\n const text = pushpinOptions?.showIndex ? (index + 1).toString() : undefined;\n\n const size = pushpinOptions?.size || 1;\n const color = isSelectedLocation ? pushpinOptions?.selectionColor || pushpinOptions?.color : pushpinOptions?.color;\n const icon = this._getSvgIcon(size, color, text);\n\n return {\n // Fallback if icon doesn't render properly\n color: isSelectedLocation ? pushpinOptions?.selectionColor : pushpinOptions?.color,\n icon\n };\n };\n\n private readonly _getSvgIcon = (size: number, color?: string, text?: string) => {\n const baseValue: number = 32;\n return `\n \n ${text ? `${text}` : ''}\n `;\n };\n}\n\nexport default Map;\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 { IHeader, IMapViewProps } from './map';\n\n/**\n * Render the heading.\n * @param param0 -- Heading props.\n * @param param0.headerProps -- Heading Props.\n * @param param0.heading -- Heading Node.\n * @returns -- Returns the node.\n */\nconst MapHeader: React.FC = ({ headerProps, heading }) => {heading};\n\n/**\n * Renders the map view props.\n * @param param0 -- Map view props.\n * @param param0.ModuleProps -- Module props.\n * @param param0.Header -- Header props.\n * @param param0.MapProps -- Map props.\n * @returns -- Returns the map module.\n */\nconst MapView: React.FC = ({ ModuleProps, Header, MapProps }) => (\n \n {Header && }\n \n \n);\n\nexport default MapView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","registerSanitizedActionPath","window","__bindings__","viewDictionary","cn","BaseStoreSelectorStateManager","constructor","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","this","isMapModuleLoaded","value","_readFromToCookie","storeInfo","JSON","parse","undefined","preferredStore","_context","input","storeId","selectedStoreLocationId","storeName","writeToCookie","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","key","MsDyn365","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","trim","query","encodeURI","geolocationApiUrl","app","config","requestUrl","Promise","resolve","script","document","createElement","setAttribute","data","remove","resourceSets","length","resources","point","coordinates","body","appendChild","StringExtensions","getElementById","url","lang","market","reject","type","async","defer","src","mapAPIReady","isMapApiLoaded","addEventListener","error","createStoreSelectorStateInput","result","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","Map","React","props","super","mapRef","handleHeadingChange","event","heading","text","target","_initMap","context","storeSelectorStateManager","map","Microsoft","Maps","current","credentials","pushpinAccessible","Events","addHandler","setSelectedStoreLocationId","_updateMap","pushpinOptions","orgUnitStoreInformation","mapLocation","entities","clear","pushpins","storeLocationList","filter","store","OrgUnitAvailability","index","unitStoreInfo","entries","storeLocation","OrgUnitLocation","isSelectedLocation","OrgUnitNumber","options","_getPushpinOptions","pushpin","Pushpin","Location","handleClickEvent","unshift","push","currentLocation","setView","center","bounds","LocationRect","fromShapes","setOptions","orgUnitNumber","setTimeout","showIndex","toString","size","color","selectionColor","icon","_getSvgIcon","componentDidMount","telemetry","when","setMapModuleLoaded","reaction","loadMapApi","locale","render","className","shouldDisplayMap","viewProps","ModuleProps","tag","moduleProps","classname","show","Header","headerProps","Msdyn365","editProps","onEdit","request","MapProps","ref","renderView","observer","MapHeader","Node","Module","module","exports","ReactDOM"],"sourceRoot":""}