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UAAU,sCACZD,IAAAA,cAACwS,EAAAA,KAAI,CAACvS,UAAU,4BACXjB,EACGK,EACA2T,EACA/T,EACAkO,EACAyD,GAEHvL,EACGsK,EACAQ,EACA4D,EACAf,EACAzC,EACApD,EACAyD,IAGP7K,EACG6J,EACAQ,EACAnR,EACAuR,EACArD,EACAyD,MAOvB4E,GAAgBvW,EAAMyG,sBACnB1F,IAAAA,cAACwS,EAAAA,KAAIxR,OAAAC,OAAA,GAAKyO,GACJmG,EAAAA,iBAAiBC,cAAclB,GAG7B,GAFA5U,IAAAA,cAACwS,EAAAA,KAAIxR,OAAAC,OAAA,GAAKuO,GAAuBC,GAInCoG,EAAAA,iBAAiBC,cAAclB,GAmC7B,KAlCA5U,IAAAA,cAAAA,IAAAA,SAAA,KACIA,IAAAA,cAACwS,EAAAA,KAAI,CAACvS,UAAU,2CACVqQ,EAA8BpL,UAC/BwP,EAAYC,EAAyBhZ,IAE1CqE,IAAAA,cAACwS,EAAAA,KAAI,CAACvS,UAAU,sCACZD,IAAAA,cAACwS,EAAAA,KAAI,CAACvS,UAAU,4BACXjB,EACGK,EACA2T,EACA/T,EACAkO,EACAyD,GAEHvL,EACGsK,EACAQ,EACA4D,EACAf,EACAzC,EACApD,EACAyD,IAGP7K,EACG6J,EACAQ,EACAnR,EACAuR,EACArD,EACAyD,eClNpCoF,EAAOC,QAAUjW,cCAjBgW,EAAOC,QAAUC","sources":["webpack://bju-press/./lib/search/module-registration.js?f197","webpack://bju-press/./src/search-state-data-action.ts?8223","webpack://bju-press/./src/search-state.ts?dd10","webpack://bju-press/./src/modules/search/actions/get-auto-suggest-suggestions.ts?4735","webpack://bju-press/./src/modules/search/components/search.categorysuggest.tsx?c65d","webpack://bju-press/./src/modules/search/components/search.form.tsx?25a5","webpack://bju-press/./src/modules/search/components/search.keywordsuggest.tsx?297c","webpack://bju-press/./src/modules/search/components/search.label.tsx?0c17","webpack://bju-press/./src/modules/search/components/search.productsuggest.tsx?2af9","webpack://bju-press/./src/modules/search/search.tsx?72fb","webpack://bju-press/./src/modules/search/search.view.tsx?1505","webpack://bju-press/./src/modules/adventureworks/views/components/search.categorysuggest.tsx?6bcf","webpack://bju-press/./src/modules/adventureworks/views/components/search.mobile.empty.tsx?ff32","webpack://bju-press/./src/modules/adventureworks/views/components/search.form.tsx?d41a","webpack://bju-press/./src/modules/adventureworks/views/components/search.keywordsuggest.tsx?2724","webpack://bju-press/./src/modules/adventureworks/views/components/search.productsuggest.tsx?6616","webpack://bju-press/./src/modules/adventureworks/views/search.view.tsx?bfa7","webpack://bju-press/external var \"React\"?0d3b","webpack://bju-press/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['search'] = {\n c: () => require('@msdyn365-commerce-modules/search/dist/lib/modules/search/search'),\n $type: 'contentModule',\n da: [{name:'searchState', path:'@msdyn365-commerce-modules/search-utilities/dist/lib/search-state-data-action', runOn: 1}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'search',\n p: 'search',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/search/dist/lib/modules/search'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/search-utilities/dist/lib/search-state-data-action';\n let dataAction = require('@msdyn365-commerce-modules/search-utilities/dist/lib/search-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['@msdyn365-commerce-modules|search|modules|search|search'] = {\n c: () => require('@msdyn365-commerce-modules/search/dist/lib/modules/search/search.view.js'),\n cn: '@msdyn365-commerce-modules-search-search'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|search'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/search.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-search'\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 { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { SearchState } from './search-state';\n\nexport function createSearchStateInput(result: SearchState): GenericInput {\n return new GenericInput('searchState', result, 'SearchState');\n}\n\nconst createsearchStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createSearchStateInput({ searchText: '' });\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createsearchStateInputInternal\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 { observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a autosuggest.\n */\nexport class SearchState {\n @observable public searchText?: string;\n\n @observable public defaultBasicSearchUrl?: string;\n\n @observable public searchQueryStringParameter?: string;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\nimport {\n CacheType,\n createObservableDataAction,\n getCatalogId,\n IAction,\n IActionContext,\n IActionInput,\n ICreateActionContext\n} from '@msdyn365-commerce/core';\nimport { SearchSuggestion, SearchSuggestionCriteria } from '@msdyn365-commerce/retail-proxy';\nimport { getSearchSuggestionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\n\nexport enum SuggestionType {\n Category = 'ScopedCategory',\n Keyword = 'Keyword',\n Product = 'Product',\n None = 'None'\n}\n\n/**\n * Input class for auto suggest search input.\n */\nexport class AutoSuggestInput implements IActionInput {\n public searchQuery?: string;\n\n public topResultsCount?: number;\n\n public suggestionType?: string;\n\n public hitPrefix?: string;\n\n public hitSuffix?: string;\n\n public constructor(searchText?: string, top?: number, suggestionType?: string, hitPrefix?: string, hitSuffix?: string) {\n this.searchQuery = searchText;\n this.topResultsCount = top;\n this.suggestionType = suggestionType;\n this.hitPrefix = hitPrefix;\n this.hitSuffix = hitSuffix;\n }\n\n public getCacheKey = () => 'AutoSuggestSearchSuggestions';\n\n public getCacheObjectType = () => 'AutoSuggestSearchSuggestions';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nconst createInput = (inputData: ICreateActionContext) => {\n return new AutoSuggestInput();\n};\n\n/**\n * Calls the Retail API and returns a auto-suggest suggestions.\n * @param input\n * @param ctx\n */\nexport async function getSearchSuggestionsAction(input: AutoSuggestInput, ctx: IActionContext): Promise {\n // If no input is provided fail out\n if (!input || !input.searchQuery) {\n throw new Error('[getSearchSuggestionsAction]No valid Input was provided, failing');\n }\n\n const autosuggest: Autosuggestions = {};\n\n const autoSuggestPromises = [_getAutoSuggest(input, autosuggest, ctx)];\n return Promise.all(autoSuggestPromises).then(() => {\n return autosuggest;\n });\n}\n\nasync function _getAutoSuggest(input: AutoSuggestInput, autosuggest: Autosuggestions, ctx: IActionContext): Promise {\n const catalogId = getCatalogId(ctx.requestContext);\n const searchCriteria: SearchSuggestionCriteria = {\n ProductSearchCriteria: {\n SearchCondition: input.searchQuery && input.searchQuery.length > 0 ? input.searchQuery : '',\n Context: {\n ChannelId: +ctx.requestContext.apiSettings.channelId,\n CatalogId: catalogId\n }\n },\n HitPrefix: input.hitPrefix,\n HitSuffix: input.hitSuffix,\n SuggestionType: input.suggestionType\n };\n\n const searchSuggestions = await getSearchSuggestionsAsync(\n { callerContext: ctx, queryResultSettings: { Paging: { Top: input.topResultsCount } } },\n searchCriteria\n );\n\n if (searchSuggestions && searchSuggestions.length > 0) {\n // Generate image url\n searchSuggestions.map(\n (item: SearchSuggestion) =>\n (item.ImageUrl = item.ImageUrl ? generateImageUrl(item.ImageUrl, ctx.requestContext.apiSettings) : '')\n );\n\n autosuggest.AllSearchResults = searchSuggestions;\n } else {\n ctx.telemetry.error(\n `[getSearchSuggestionsAction] unable to get availabilites for search with suggestion type ${searchCriteria.SuggestionType}`\n );\n }\n}\n\nexport const getSearchSuggestionsActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/search/get-auto-suggest-suggestions',\n action: >getSearchSuggestionsAction,\n input: createInput\n});\n\nexport default getSearchSuggestionsActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { getRichTextHtml } from '@msdyn365-commerce/core';\nimport { ProductRefiner, ProductRefinerSource, ProductRefinerValue, SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\nimport { format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchData } from '../search.data';\nimport { ISearchProps } from '../search.props.autogenerated';\n\nexport interface ISearchCategorySuggestProps {\n searchCategorySuggestClass: string;\n searchPageURL: string;\n searchQsp: string | undefined;\n hitPrefix: string;\n hitSuffix: string;\n autoSuggestProps: ISearchProps;\n searchText: string;\n searchRefiners: ProductRefiner[] | undefined;\n suggestions: SearchSuggestion[] | undefined;\n telemetryContent?: ITelemetryContent;\n shouldShowFullPath?: boolean;\n}\n\nexport interface ISearchCategoryViewProps {\n title: React.ReactNode;\n text: React.ReactNode[];\n}\n\nlet payLoad: IPayLoad;\n\n/**\n * CategorySuggestionsComponent.\n * @param props\n */\nexport const CategorySuggestionsComponent = (props: ISearchCategorySuggestProps): ISearchCategoryViewProps | undefined => {\n const {\n suggestions,\n searchText,\n autoSuggestProps: {\n resources: { categorySuggestionHeading }\n }\n } = props;\n\n const reactNodes: React.ReactNode[] = [];\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n suggestions?.map(item => {\n reactNodes.push(_assembleNode(item, props));\n });\n\n const titleNode = _renderTitle(categorySuggestionHeading, searchText);\n\n return { title: titleNode, text: reactNodes };\n};\n\nconst _renderTitle = (categorySuggestionHeading: string, searchText: string) => {\n const categoryAutoSuggestionHeading = categorySuggestionHeading\n ? format(categorySuggestionHeading, searchText)\n : `Search \"${searchText}\" in categories`;\n\n return
  • {categoryAutoSuggestionHeading}
  • ;\n};\n\nconst _assembleNode = (item: SearchSuggestion, props: ISearchCategorySuggestProps) => {\n const { searchText, hitPrefix, hitSuffix, shouldShowFullPath } = props;\n\n const splitValue = shouldShowFullPath ? item.Value : item.Value && item.Value.split('|').pop();\n const ariaLabel = splitValue\n ? splitValue.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '')\n : item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n payLoad.contentAction.etext = item.Value;\n const attribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return (\n
  • \n \n {_generateLink(item, searchText, props) && _getHighlightedText(splitValue ? splitValue : '', hitPrefix, hitSuffix)}\n \n
  • \n );\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, searchText: string, props: ISearchCategorySuggestProps): string => {\n return suggestion && suggestion.Id ? _getCategoryLink(suggestion.Id, searchText, props) : '';\n};\n\nconst _getCategoryLink = (id: string, searchText: string, props: ISearchCategorySuggestProps): string => {\n const { searchPageURL, searchQsp, searchRefiners } = props;\n\n if (!MsDyn365.isBrowser) {\n return '';\n }\n\n const queryUrl = new URL(searchPageURL, window.location.href);\n\n if (searchQsp && searchText) {\n queryUrl.searchParams.set(searchQsp, searchText);\n }\n\n const categoryRefiners = searchRefiners?.find(refiners => {\n return refiners.SourceValue === ProductRefinerSource.Category;\n });\n const refiner = categoryRefiners?.Values?.find(item => {\n return item.RefinerRecordId === Number.parseInt(id, 10);\n });\n\n const encodedRefiner = refiner && JSON.stringify(compressRefiners([refiner]));\n if (encodedRefiner) {\n queryUrl.searchParams.set('refiners', encodedRefiner);\n }\n\n return queryUrl.href;\n};\n\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\n const formattedText = suggestion\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n // eslint-disable-next-line react/no-danger\n return ;\n};\n\n// TODO: This code is currently duplicated in categoryautosuggest need to either remove one of these files\n// or move this code to a common place\nconst compressedRefinerKeys = [\n 'DataTypeValue',\n 'LeftValueBoundString',\n 'RefinerRecordId',\n 'RefinerSourceValue',\n 'RightValueBoundString',\n 'UnitText'\n];\n\n/**\n * Compressed a list of refiners for use in URLs.\n * @param refiners The uncompressed refiners.\n */\nconst compressRefiners = (refiners: ProductRefinerValue[]) => {\n const compressedRefiners: (string | number)[][] = [];\n\n refiners.forEach(refiner => {\n const compressedRefiner: (string | number)[] = [];\n compressedRefinerKeys.forEach(refinerKey => {\n compressedRefiner.push(refiner[refinerKey]);\n });\n compressedRefiners.push(compressedRefiner);\n });\n\n return compressedRefiners;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISearchFormProps {\n hideSearchLabel: boolean | undefined;\n isSearchFormExpanded?: boolean | undefined;\n disableSubmitSearch: boolean | undefined;\n searchTextInput: React.RefObject;\n maxChars: number;\n searchQsp: string;\n searchPlaceholder: string;\n query: string;\n ariaLabelCancel: string;\n ariaLabelSearch: string;\n ariaLabelSubmit: string;\n handleCancelSearchChange(): void;\n handleInputChange(query: string): void;\n}\n\nexport interface ISearchFormViewProps {\n input: React.ReactNode;\n submitBtn: React.ReactNode;\n cancelBtn: React.ReactNode;\n}\n\n/**\n * On Input Change functionality.\n * @param handleInputChange -Input change function.\n * @returns Set updated input value.\n */\nconst onInputChangeFunction = (handleInputChange: (query: string) => void) => (event: React.ChangeEvent) => {\n handleInputChange(event.target.value || '');\n};\nexport const FormComponent = (props: ISearchFormProps): ISearchFormViewProps => {\n const {\n searchQsp,\n searchPlaceholder,\n hideSearchLabel,\n searchTextInput,\n handleInputChange,\n maxChars,\n disableSubmitSearch,\n handleCancelSearchChange,\n query,\n ariaLabelCancel,\n ariaLabelSearch,\n ariaLabelSubmit\n } = props;\n\n const onInputChange = onInputChangeFunction(handleInputChange);\n\n const inputNode = !hideSearchLabel ? (\n \n ) : (\n \n );\n\n const submitBtnNode = !disableSubmitSearch && \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 { PriceComponent } from '@msdyn365-commerce/components';\nimport { getRichTextHtml, IActionContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport { SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\nimport { getProductPageUrlSync, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n NodeTag\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchData } from '../search.data';\nimport { ISearchProps } from '../search.props.autogenerated';\n\n/**\n * Search product suggest resources.\n */\nexport interface ISearchProductSuggestResources {\n freePriceText: string;\n}\n\nexport interface ISearchProductSuggestProps {\n searchProductSuggestClass: string;\n searchPageURL: string;\n searchQsp: string | undefined;\n hitPrefix: string;\n hitSuffix: string;\n autoSuggestProps: ISearchProps;\n searchText: string;\n suggestions: SearchSuggestion[] | undefined;\n telemetry: ITelemetry;\n moduleType: string;\n moduleId: string;\n telemetryContent?: ITelemetryContent;\n resources?: ISearchProductSuggestResources;\n}\n\nexport interface ISearchProductViewProps {\n title: React.ReactNode;\n items: ISearchProductItemViewProps[];\n}\n\nexport interface ISearchProductItemViewProps {\n text: React.ReactNode;\n thumbnail: React.ReactNode;\n price: React.ReactNode;\n LiProduct: INodeProps;\n AProduct: INodeProps;\n id: string | undefined;\n}\n\nlet payLoad: IPayLoad;\nlet telemetryContent: ITelemetryContent | undefined;\n\n/**\n * ProductSuggestionsComponent.\n * @param props\n */\nexport const ProductSuggestionsComponent = (props: ISearchProductSuggestProps): ISearchProductViewProps | undefined => {\n const {\n suggestions,\n hitSuffix,\n hitPrefix,\n autoSuggestProps: {\n context: { actionContext },\n resources: { productSuggestionHeading }\n },\n moduleType,\n moduleId\n } = props;\n const reactNodes: ISearchProductItemViewProps[] = [];\n telemetryContent = props.telemetryContent;\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n suggestions?.map(item => {\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, actionContext, props, moduleType, moduleId));\n });\n\n const titleNode = _renderTitle(productSuggestionHeading);\n\n return { title: titleNode, items: reactNodes };\n};\n\nconst _renderTitle = (productSuggestionHeading: string) => {\n const productAutoSuggestionHeading = productSuggestionHeading ? productSuggestionHeading : 'Go to products';\n\n return
  • {productAutoSuggestionHeading}
  • ;\n};\n\nconst _assembleNode = (\n item: SearchSuggestion,\n hitPrefix: string,\n hitSuffix: string,\n actionContext: IActionContext,\n props: ISearchProductSuggestProps,\n moduleType: string,\n moduleId: string\n): ISearchProductItemViewProps => {\n const altText =\n item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n const price = item.Value3?.Value?.DecimalValue;\n return {\n text: _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix),\n thumbnail: _renderThumbnail(item, altText ? altText : '', props),\n price: !ObjectExtensions.isNullOrUndefined(price) && _renderPrice(price, price, moduleId, moduleType, props),\n LiProduct: _getLiWrapper(),\n AProduct: _getAWrapper(item, hitPrefix, hitSuffix, actionContext, props),\n id: item.Id\n };\n};\n\nconst _getLiWrapper = () => {\n return {\n className: 'msc-autoSuggest__productResults-item',\n tag: 'li' as NodeTag\n };\n};\n\nconst _getAWrapper = (\n item: SearchSuggestion,\n hitPrefix: string,\n hitSuffix: string,\n actionContext: IActionContext,\n props: ISearchProductSuggestProps\n) => {\n const {\n autoSuggestProps: { context }\n } = props;\n const ariaLabel =\n item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n payLoad.contentAction.recid = item.Id;\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n const productPrice = context.cultureFormatter.formatCurrency(item.Value3!.Value!.DecimalValue!);\n\n return {\n className: 'msc-autoSuggest__productResults-item',\n tag: 'a' as NodeTag,\n 'aria-label': `${ariaLabel!} ${productPrice}`,\n href: _generateLink(item, hitPrefix, hitSuffix, actionContext),\n ...attribute\n };\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, actionContext: IActionContext) => {\n const formattedLink = (suggestion.Value as string)\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n return suggestion.Value && suggestion.Id\n ? getProductPageUrlSync(formattedLink, (suggestion.Id as unknown) as number, actionContext, undefined)\n : '';\n};\n\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\n const formattedText = suggestion\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n return (\n // eslint-disable-next-line react/no-danger\n \n );\n};\n\nconst _renderPrice = (\n adjustedPrice: number,\n basePrice: number,\n moduleId: string,\n moduleType: string,\n props: ISearchProductSuggestProps\n): JSX.Element | null => {\n const {\n autoSuggestProps: { context }\n } = props;\n\n return (\n \n );\n};\n\nconst _renderThumbnail = (suggestion: SearchSuggestion, altText: string, props: ISearchProductSuggestProps): JSX.Element | null => {\n const {\n autoSuggestProps: {\n context: {\n request: { gridSettings }\n },\n config: { imageSettings }\n }\n } = props;\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n if (!suggestion || !suggestion.ImageUrl) {\n props.telemetry.error('Search suggestion content is empty, module wont render.');\n return null;\n }\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=40&h=40&m=6', w: 0, h: 0 },\n lg: { q: 'w=40&h=40&m=6', w: 0, h: 0 },\n xl: { q: 'w=40&h=40&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n return (\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 { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { getCatalogId, getUrlSync } from '@msdyn365-commerce/core';\nimport { ProductRefiner, ProductRefinerSource, ProductsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions, Random, validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport { createSearchStateInput } from '@msdyn365-commerce-modules/search-utilities';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, KeyCodes } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { debounce } from 'lodash';\nimport { Spinner, SpinnerSize } from 'office-ui-fabric-react';\nimport * as React from 'react';\n\nimport getSearchSuggestionsAction, { AutoSuggestInput, SuggestionType } from './actions/get-auto-suggest-suggestions';\nimport {\n CategorySuggestionsComponent,\n FormComponent,\n ISearchCategoryViewProps,\n ISearchKeywordViewProps,\n ISearchProductViewProps,\n KeywordSuggestionsComponent,\n LabelComponent,\n ProductSuggestionsComponent\n} from './components';\nimport { ISearchData } from './search.data';\nimport { ISearchProps, ISuggestionTypeCriterionData, SuggestionTypeCriterionSuggestionType } from './search.props.autogenerated';\n\nexport interface ISearchState {\n isSearchFormExpanded: boolean;\n searchText: string;\n searchKeywordSuggestClass: string;\n searchProductSuggestClass: string;\n searchCategorySuggestClass: string;\n suggestions: Autosuggestions | undefined;\n searchRefiners?: ProductRefiner[] | undefined;\n autoSuggestAriaLabel: string;\n isInitialState: boolean;\n isLoadingAutoSuggest?: boolean;\n}\n\nexport interface ISearchViewProps extends ISearchProps {\n Search: IModuleProps;\n AutoSuggestAriaLabel: INodeProps;\n AutoSuggestAriaLabelText: string;\n searchText: string;\n AutoSuggest: INodeProps;\n KeywordSuggest: INodeProps;\n ProductSuggest: INodeProps;\n CategorySuggest: INodeProps;\n SearchForm: INodeProps;\n FormWrapper: INodeProps;\n UlKeyword: INodeProps;\n UlProduct: INodeProps;\n UlCategory: INodeProps;\n label: React.ReactNode;\n form: React.ReactNode;\n autosuggestKeyword?: ISearchKeywordViewProps;\n autosuggestProduct?: ISearchProductViewProps;\n autosuggestCategory?: ISearchCategoryViewProps;\n callbacks: {\n handleCancelSearchChange(): void;\n handleCancelSearchFocused?(): void;\n };\n isSearchFormExpanded: boolean;\n isLoadingAutoSuggest?: boolean;\n isLoadingNode?: React.ReactNode;\n}\n\n/**\n *\n * Search module.\n * @extends {React.Component, ISearchState>}\n */\nclass Search extends React.Component, ISearchState> {\n private readonly searchTextInput: React.RefObject;\n\n private readonly searchCollapsedLabel: React.RefObject;\n\n private readonly formReference: React.RefObject;\n\n private readonly maxChars: number;\n\n private readonly topResultsCount?: number;\n\n private readonly hitPrefix: string = '{';\n\n private readonly hitSuffix: string = '}';\n\n private readonly waitTime: number = 500;\n\n private readonly autoSuggestResultScreenReaderDiv: React.RefObject;\n\n private readonly autoSuggestResultDiv: React.RefObject;\n\n private readonly searchFormClass: string;\n\n private readonly searchLabelClass: string;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private loadSuggestionsRequestId?: string;\n\n private inputSuggestionType: ISuggestionTypeCriterionData[];\n\n // @ts-expect-error\n private cancellabelDebounce: debounce;\n\n public constructor(props: ISearchProps) {\n super(props);\n this.searchTextInput = React.createRef();\n this.searchCollapsedLabel = React.createRef();\n this.autoSuggestResultScreenReaderDiv = React.createRef();\n this.autoSuggestResultDiv = React.createRef();\n this.formReference = React.createRef();\n this.state = {\n isSearchFormExpanded: false,\n searchText: '',\n searchKeywordSuggestClass: 'ms-search__autoSuggest__keyword',\n searchProductSuggestClass: 'ms-search__autoSuggest__product',\n searchCategorySuggestClass: 'ms-search__autoSuggest__category',\n suggestions: undefined,\n searchRefiners: undefined,\n autoSuggestAriaLabel: '',\n isInitialState: true,\n isLoadingAutoSuggest: false\n };\n this.maxChars =\n (this.props.context &&\n this.props.context.app &&\n this.props.context.app.config &&\n this.props.context.app.config.searchInputMaxLength) ||\n 50;\n\n this.inputSuggestionType = [];\n this.topResultsCount = this.props.config && this.props.config.topResultsCount ? this.props.config.topResultsCount : 5;\n this.searchFormClass = 'ms-search__form';\n this.searchLabelClass = 'ms-search__label';\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n this._initSuggestionTypes();\n }\n\n public async componentDidMount(): Promise {\n document.body && document.body.addEventListener('mousedown', this._focusOutTarget);\n window && window.addEventListener('keyup', this._keyup);\n }\n\n public componentWillUnmount(): void {\n document.body && document.body.removeEventListener('mousedown', this._focusOutTarget, false);\n window && window.removeEventListener('keyup', this._keyup, false);\n }\n\n public componentDidUpdate(): void {\n const {\n config: { hideSearchLabel }\n } = this.props;\n const { isSearchFormExpanded, isInitialState } = this.state;\n\n if (!this.props.context.request.params.isEditor) {\n if (!hideSearchLabel && isSearchFormExpanded) {\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\n } else if (!isInitialState) {\n this.searchCollapsedLabel && this.searchCollapsedLabel.current && this.searchCollapsedLabel.current.focus();\n }\n }\n }\n\n public shouldComponentUpdate(nextProps: ISearchProps, nextState: ISearchState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n // eslint-disable-next-line complexity -- ignore complexity.\n public render(): JSX.Element {\n const {\n context,\n resources: { searchtext, searchLabelArialLabel, cancelBtnAriaLabel, searchBtnAriaLabel, submitBtnAriaLabel },\n config: { hideSearchLabel, disableSubmitSearch, searchplaceholderText, shouldShowFullCategoryPath, className = '' }\n } = this.props;\n\n const {\n isSearchFormExpanded,\n searchText,\n searchKeywordSuggestClass,\n searchProductSuggestClass,\n searchCategorySuggestClass,\n suggestions,\n searchRefiners,\n isLoadingAutoSuggest\n } = this.state;\n\n const searchQsp = (context && context.app && context.app.config && context.app.config.searchQueryStringParameter) || 'q';\n const searchPageURL = getUrlSync('search', context && context.actionContext) || '';\n const searchURL = this._appendQueryParams(searchPageURL, searchText, searchQsp);\n const searchPlaceholder = searchplaceholderText && searchplaceholderText.length > 0 ? searchplaceholderText : 'Search in Fabrikam';\n\n const keywordSuggestions = suggestions?.AllSearchResults?.filter(\n suggestion => suggestion.SuggestionType === SuggestionType.Keyword || suggestion.SuggestionType === SuggestionType.None\n );\n const productSuggestions = suggestions?.AllSearchResults?.filter(\n suggestion => suggestion.SuggestionType === SuggestionType.Product\n );\n const categoryRefiners = searchRefiners?.find(refiner => {\n return refiner.SourceValue === ProductRefinerSource.Category;\n });\n const categorySuggestions = suggestions?.AllSearchResults?.filter(suggestion => {\n if (suggestion.SuggestionType !== SuggestionType.Category) {\n return false;\n }\n const refiner = categoryRefiners?.Values?.find(item => {\n return `${item.RefinerRecordId ?? 0}` === suggestion.Id;\n });\n\n return !ObjectExtensions.isNullOrUndefined(refiner);\n });\n\n const viewProps: ISearchViewProps = {\n ...(this.props as ISearchProps),\n\n Search: {\n moduleProps: this.props,\n className: `${classnames('ms-search', className)} ${disableSubmitSearch ? 'no-submit' : 'with-submit'}`\n },\n AutoSuggestAriaLabel: {\n tag: 'div',\n className: 'msc-autoSuggest__screen-reader',\n 'aria-live': 'assertive',\n ref: this.autoSuggestResultScreenReaderDiv\n },\n AutoSuggestAriaLabelText: this.state.autoSuggestAriaLabel,\n searchText: this.state.searchText,\n AutoSuggest: {\n ref: this.autoSuggestResultDiv,\n className: 'ms-search__autoSuggest'\n },\n KeywordSuggest: {\n className: searchKeywordSuggestClass\n },\n ProductSuggest: {\n className: searchProductSuggestClass\n },\n CategorySuggest: {\n className: searchCategorySuggestClass\n },\n SearchForm: {\n className: `${this.searchFormClass} ${isSearchFormExpanded ? 'bx-show' : 'bx-hide'}`\n },\n FormWrapper: {\n tag: 'form',\n ref: this.formReference,\n className: 'ms-search__searchForm',\n 'aria-label': 'Search',\n name: 'searchForm',\n role: 'search',\n action: searchURL,\n autoComplete: 'off',\n onSubmit: this._handleSubmit\n },\n UlKeyword: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__keywordResults-items', className)\n },\n UlProduct: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__productResults-items', className)\n },\n UlCategory: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__categoryResults-items', className)\n },\n label: LabelComponent({\n isSearchFormExpanded,\n searchLabelClass: `${this.searchLabelClass} ${isSearchFormExpanded ? 'bx-hide' : 'bx-show'}`,\n searchtext,\n searchLabelArialLabel,\n searchCollapsedLabel: this.searchCollapsedLabel,\n hideSearchLabel,\n handleCancelSearchChange: this._handleCancelSearchChange,\n telemetryContent: this.telemetryContent\n }),\n form: FormComponent({\n ariaLabelCancel: cancelBtnAriaLabel,\n ariaLabelSearch: searchBtnAriaLabel,\n ariaLabelSubmit: submitBtnAriaLabel,\n hideSearchLabel,\n searchTextInput: this.searchTextInput,\n disableSubmitSearch,\n handleInputChange: this._handleInputChange,\n handleCancelSearchChange: this._handleCancelSearchChange,\n maxChars: this.maxChars,\n searchQsp,\n searchPlaceholder,\n query: searchText\n }),\n autosuggestKeyword:\n searchText &&\n searchText.length > 0 &&\n (isLoadingAutoSuggest || (keywordSuggestions && ArrayExtensions.hasElements(keywordSuggestions)))\n ? KeywordSuggestionsComponent({\n searchKeywordSuggestClass,\n searchPageURL,\n searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText,\n suggestions: keywordSuggestions,\n telemetryContent: this.telemetryContent\n })\n : undefined,\n autosuggestProduct:\n searchText &&\n searchText.length > 0 &&\n (isLoadingAutoSuggest || (productSuggestions && ArrayExtensions.hasElements(productSuggestions)))\n ? ProductSuggestionsComponent({\n searchProductSuggestClass,\n searchPageURL,\n searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText,\n suggestions: productSuggestions,\n telemetry: this.props.telemetry,\n moduleType: this.props.typeName,\n moduleId: this.props.id,\n telemetryContent: this.telemetryContent,\n resources: this.props.resources\n })\n : undefined,\n autosuggestCategory:\n searchText &&\n searchText.length > 0 &&\n (isLoadingAutoSuggest || (categorySuggestions && ArrayExtensions.hasElements(categorySuggestions)))\n ? CategorySuggestionsComponent({\n searchCategorySuggestClass,\n searchPageURL,\n searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText,\n suggestions: categorySuggestions,\n searchRefiners,\n telemetryContent: this.telemetryContent,\n shouldShowFullPath: shouldShowFullCategoryPath\n })\n : undefined,\n callbacks: {\n handleCancelSearchChange: this._handleCancelSearchChange,\n handleCancelSearchFocused: this._handleCancelSearchFocused\n },\n isSearchFormExpanded: this.state.isSearchFormExpanded,\n isLoadingAutoSuggest,\n isLoadingNode: this._isLoadingNode()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _initSuggestionTypes() {\n const suggestionTypes = this.props.config.suggestionTypeCriterion;\n\n const suggestions = ArrayExtensions.unique(ArrayExtensions.validValues(suggestionTypes));\n if (!ArrayExtensions.hasElements(suggestions)) {\n this.inputSuggestionType = [\n { SuggestionType: SuggestionTypeCriterionSuggestionType.keyword },\n { SuggestionType: SuggestionTypeCriterionSuggestionType.product },\n { SuggestionType: SuggestionTypeCriterionSuggestionType.scopedCategory }\n ];\n return;\n }\n\n const validSuggestions = suggestions.filter(suggestion => suggestion.SuggestionType);\n if (ArrayExtensions.hasElements(validSuggestions)) {\n this.inputSuggestionType = validSuggestions;\n return;\n }\n\n this.inputSuggestionType = [];\n }\n\n /**\n * Function to create the ReactNode for loading Autosuggest result.\n * @returns ReachNode for loading Autosuggest result.\n */\n private readonly _isLoadingNode = (): React.ReactNode => {\n const loadingText = this.props.resources.autoSuggestResultLoadingMessage;\n return ;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _focusOutTarget = (e: any): void => {\n const { suggestions } = this.state;\n\n if (suggestions && suggestions.AllSearchResults && e.target.closest('.ms-search') === null) {\n this._clearAutoSuggestState();\n }\n };\n\n private readonly _keyup = (e: KeyboardEvent): void => {\n const { suggestions } = this.state;\n\n if (suggestions && suggestions.AllSearchResults && e.keyCode === KeyCodes.Escape) {\n this._clearAutoSuggestState();\n } else if (this.state.isSearchFormExpanded && e.keyCode === KeyCodes.Escape) {\n if (this.state.isSearchFormExpanded) {\n this.setState({ isSearchFormExpanded: false });\n }\n }\n\n if (\n !(\n (this.formReference.current && this.formReference.current.contains((e.target as unknown) as Node)) ||\n (this.autoSuggestResultDiv.current && this.autoSuggestResultDiv.current.contains((e.target as unknown) as Node))\n )\n ) {\n if (suggestions && suggestions.AllSearchResults) {\n this._clearAutoSuggestState();\n }\n\n if (this.state.isSearchFormExpanded) {\n this.setState({ isSearchFormExpanded: false });\n }\n }\n };\n\n private readonly _clearAutoSuggestState = (): void => {\n const {\n context: { actionContext },\n data: { searchState }\n } = this.props;\n\n if (this.searchTextInput.current && this.searchTextInput.current.value.length > 0) {\n searchState.searchText = '';\n searchState.defaultBasicSearchUrl = '';\n searchState.searchQueryStringParameter = '';\n actionContext ? actionContext.update(createSearchStateInput(searchState), searchState) : null;\n this.searchTextInput.current.value = '';\n }\n\n this.setState({ searchText: '', suggestions: undefined, searchRefiners: undefined });\n };\n\n private async _getSearchSuggestions(loadSuggestionsRequestId: string, query: string) {\n try {\n const searchSuggestions = await getSearchSuggestionsAction(\n new AutoSuggestInput(query, this.topResultsCount, this._getSuggestionType(), this.hitPrefix, this.hitSuffix),\n this.props.context.actionContext\n );\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return undefined;\n }\n return searchSuggestions;\n } catch (error) {\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return undefined;\n }\n this.setState({ suggestions: undefined, searchRefiners: undefined, autoSuggestAriaLabel: this._setAutoSuggestResultCount() });\n this.props.telemetry.exception(error);\n this.props.telemetry.debug('Unable to get auto suggest results');\n return undefined;\n }\n }\n\n private async _updateSearchRefiners(loadSuggestionsRequestId: string, query: string, suggestions: Autosuggestions | undefined) {\n try {\n const refiners = await this._getSearchRefiners(query);\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return;\n }\n this.setState({\n suggestions,\n searchRefiners: refiners,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(suggestions),\n isLoadingAutoSuggest: false\n });\n } catch (error) {\n if (loadSuggestionsRequestId !== this.loadSuggestionsRequestId) {\n return;\n }\n this.setState({ suggestions, searchRefiners: undefined, autoSuggestAriaLabel: this._setAutoSuggestResultCount(suggestions) });\n this.props.telemetry.exception(error);\n this.props.telemetry.debug('Unable to get refiners results');\n }\n }\n\n private _loadSuggestions(query: string) {\n this.cancellabelDebounce = debounce(async () => {\n this.setState({ isLoadingAutoSuggest: true });\n const loadSuggestionsRequestId = Random.Guid.generateGuid();\n this.loadSuggestionsRequestId = loadSuggestionsRequestId;\n const searchSuggestions = await this._getSearchSuggestions(loadSuggestionsRequestId, query);\n await this._updateSearchRefiners(loadSuggestionsRequestId, query, searchSuggestions);\n }, this.waitTime);\n\n setTimeout(() => {\n this.cancellabelDebounce();\n }, 0);\n }\n\n private readonly _handleInputChange = (query: string): void => {\n if (!query || query.length <= this.maxChars) {\n this.setState({ searchText: query });\n }\n\n if (this.cancellabelDebounce) {\n this.cancellabelDebounce.cancel();\n }\n\n const {\n context,\n data: { searchState }\n } = this.props;\n\n if (context) {\n if (query && query.length > 0) {\n if (query.length > this.maxChars) {\n return;\n }\n\n if (ArrayExtensions.hasElements(this.inputSuggestionType)) {\n this._loadSuggestions(query);\n }\n\n searchState.searchText = query;\n } else {\n this.setState({ suggestions: undefined, searchRefiners: undefined });\n searchState.searchText = '';\n }\n context.actionContext.update(createSearchStateInput(searchState), searchState);\n }\n };\n\n private _getSuggestionType(): string {\n const distinctSuggestionTypes: string[] = this.inputSuggestionType.map(\n suggestionTypeItem => suggestionTypeItem.SuggestionType!.charAt(0).toUpperCase() + suggestionTypeItem.SuggestionType!.slice(1)\n );\n return distinctSuggestionTypes.join(',');\n }\n\n private async _getSearchRefiners(searchText: string): Promise {\n const { actionContext: ctx } = this.props.context;\n const catalogId = getCatalogId(ctx.requestContext);\n validateCatalogId(catalogId);\n return ProductsDataActions.getProductSearchRefinersAsync(\n { callerContext: ctx },\n {\n SearchCondition: searchText,\n Context: {\n ChannelId: +ctx.requestContext.apiSettings.channelId,\n CatalogId: catalogId\n }\n }\n );\n }\n\n private readonly _handleSubmit = (\n e: React.MouseEvent | React.KeyboardEvent | React.FormEvent\n ): void => {\n const {\n config: { disableSubmitSearch },\n context: {\n actionContext,\n app: {\n config: { searchQueryStringParameter }\n }\n }\n } = this.props;\n\n const query = this.searchTextInput.current && this.searchTextInput.current.value;\n e.preventDefault();\n\n if (!query || (query && query.length === 0) || disableSubmitSearch) {\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\n } else {\n const searchQsp = searchQueryStringParameter || 'q';\n const searchURL = this._appendQueryParams(getUrlSync('search', actionContext) || '', query, searchQsp);\n document.location.href = searchURL;\n }\n };\n\n private readonly _handleCancelSearchChange = (): void => {\n const { isSearchFormExpanded, suggestions } = this.state;\n\n if (!isSearchFormExpanded) {\n this.setState({\n isSearchFormExpanded: true,\n searchText: '',\n isInitialState: false\n });\n } else {\n if (suggestions && suggestions.AllSearchResults) {\n this._clearAutoSuggestState();\n }\n this.setState({ isSearchFormExpanded: false });\n }\n };\n\n private readonly _handleCancelSearchFocused = (): void => {\n const { suggestions } = this.state;\n if (!(suggestions && suggestions.AllSearchResults)) {\n this._clearAutoSuggestState();\n this.setState({ isSearchFormExpanded: false });\n }\n };\n\n private readonly _appendQueryParams = (route: string, query: string, qsp: string): string => {\n if (!MsDyn365.isBrowser) {\n return '';\n }\n\n const queryUrl = new URL(route, window.location.href);\n if (qsp && query) {\n queryUrl.searchParams.set(qsp, query);\n }\n\n return queryUrl.href;\n };\n\n private readonly _setAutoSuggestResultCount = (result?: Autosuggestions) => {\n if (this.autoSuggestResultScreenReaderDiv.current !== null) {\n const ariaLiveRegion = this.autoSuggestResultScreenReaderDiv.current;\n const suggestResultString = this.props.resources.autoSuggestFoundMessage;\n const emptyResultString = this.props.resources.noAutoSuggestionMessage;\n ariaLiveRegion.innerText =\n result && result.AllSearchResults && result.AllSearchResults.length > 0 ? suggestResultString : emptyResultString;\n ariaLiveRegion.setAttribute('aria-live', 'assertive');\n return ariaLiveRegion.innerText;\n }\n return '';\n };\n}\n\nexport default Search;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from './components';\nimport { ISearchViewProps } from './search';\n\nconst SearchView: React.FC = props => {\n const {\n Search,\n AutoSuggestAriaLabel,\n AutoSuggestAriaLabelText,\n searchText,\n AutoSuggest,\n KeywordSuggest,\n ProductSuggest,\n CategorySuggest,\n UlKeyword,\n UlProduct,\n UlCategory,\n form,\n autosuggestCategory,\n autosuggestKeyword,\n autosuggestProduct,\n SearchForm,\n FormWrapper,\n label,\n isLoadingAutoSuggest,\n isLoadingNode\n } = props;\n\n return (\n \n {label}\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\n \n {searchText && searchText.length > 0 ? {AutoSuggestAriaLabelText} : ''}\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword, isLoadingAutoSuggest, isLoadingNode)}\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct, isLoadingAutoSuggest, isLoadingNode)}\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory, isLoadingAutoSuggest, isLoadingNode)}\n \n \n );\n};\n\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\n return (\n \n \n {form.input}\n {form.cancelBtn}\n {form.submitBtn}\n \n \n );\n};\n\nconst _renderKeywordSuggestions = (\n KeywordSuggest: INodeProps,\n UlKeyword: INodeProps,\n keywordSuggestions?: ISearchKeywordViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n) => {\n return (\n keywordSuggestions && (\n \n \n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest &&\n keywordSuggestions.text.map(text => {\n return text;\n })}\n \n \n )\n );\n};\n\nconst _renderProductSuggestions = (\n ProductSuggest: INodeProps,\n UlProduct: INodeProps,\n productSuggestions?: ISearchProductViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n) => {\n return (\n productSuggestions && (\n \n \n {productSuggestions.title}\n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest &&\n productSuggestions.items.map((item, index) => {\n return (\n \n \n {item.thumbnail}\n {item.text}\n {item.price}\n \n \n );\n })}\n \n \n )\n );\n};\n\nconst _renderCategorySuggestions = (\n CategorySuggest: INodeProps,\n UlCategory: INodeProps,\n categorySuggestions?: ISearchCategoryViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n) => {\n return (\n categorySuggestions && (\n \n \n {categorySuggestions.title}\n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest &&\n categorySuggestions.text.map(text => {\n return text;\n })}\n \n \n )\n );\n};\n\nexport default SearchView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ISearchData, ISearchViewProps } from '@msdyn365-commerce-modules/search';\nimport { Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\n\n/**\n * Render Categories heading.\n * @param inCategoriesHeading - The Keywords result heading.\n * @returns The JSX Element.\n */\nconst renderCategorySuggestionsTitle = (inCategoriesHeading: string): JSX.Element => {\n const categoryAutoSuggestionHeading = inCategoriesHeading ? inCategoriesHeading : 'In categories';\n\n return
    {categoryAutoSuggestionHeading}
    ;\n};\n\n/**\n * Render Categories suggestion result.\n * @param inCategoriesHeading - The Categories result heading.\n * @param noResultText - The \"No Result\" text.\n * @param props - The Categories suggestion result.\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\n * @param isLoadingNode - The autosuggestion loading node.\n * @returns The JSX Element.\n */\nexport const CategorySuggestionsComponent = (\n inCategoriesHeading: string,\n noResultText: string,\n props: ISearchViewProps & ISearchProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n): JSX.Element => {\n return props.autosuggestCategory ? (\n \n {renderCategorySuggestionsTitle(inCategoriesHeading)}\n \n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest &&\n props.autosuggestCategory.text.map(text => {\n return text;\n })}\n \n \n ) : (\n \n {renderCategorySuggestionsTitle(inCategoriesHeading)}\n \n
  • {noResultText}
  • \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 { IImageData, Image } from '@msdyn365-commerce/core';\nimport { ISearchData } from '@msdyn365-commerce-modules/search';\nimport { Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\n\n/**\n * Render Products Suggestion result heading.\n * @param props -The props.\n * @returns The JSX Element.\n */\nconst renderProductNotFoundResultsImage = (props: ISearchProps): JSX.Element | null => {\n const noSearchResultImage: IImageData | undefined = props.config.noSearchResultImage;\n if (!noSearchResultImage || !noSearchResultImage.src) {\n return null;\n }\n const imageSettings = {\n lazyload: true,\n viewports: {\n xs: { w: 100, h: 100, q: 'w=100&h=100&q=60&m=6' }\n }\n };\n return (\n \n );\n};\n\n/**\n * Render Product suggestion result.\n * @param props -The props.\n * @returns The JSX Element.\n */\nexport const MobileAutoSuggestEmptyComponent = (props: ISearchProps): JSX.Element => {\n return (\n \n
    {renderProductNotFoundResultsImage(props)}
    \n
    \n
    {props.resources.emptyMobileSearchTextHeading}
    \n
    {props.resources.emptyMobileSearchText}
    \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 { ISearchData, ISearchFormViewProps } from '@msdyn365-commerce-modules/search';\nimport { Button, INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\nimport { MobileAutoSuggestEmptyComponent } from './search.mobile.empty';\n\n/**\n * Render Clear button for mobile viewport.\n * @param clearSearchButtonText -The Clear button text.\n * @param clearSearch -Clear Search callback.\n * @returns -The JSX Element.\n */\nconst renderClearButton = (clearSearchButtonText: string, clearSearch: () => void): JSX.Element => {\n return (\n \n );\n};\n\n/**\n * Render Search form.\n * @param form -Form view props.\n * @param searchForm -Search Form props.\n * @param formWrapper -Form Wrapper props.\n * @param isMobile -Is mobile viewport flag.\n * @param clearSearchButtonText -The Clear button text.\n * @param props -The props for resource.\n * @param isSearchText -Is SearchText flag for input text.\n * @param clearSearch -Clear Search callback.\n * @returns -The JSX Element.\n */\nexport const FormComponent = (\n form: ISearchFormViewProps,\n searchForm: INodeProps,\n formWrapper: INodeProps,\n isMobile: boolean,\n clearSearchButtonText: string,\n props: ISearchProps,\n isSearchText: boolean,\n clearSearch: () => void\n): JSX.Element => {\n const cancelButtonNode = (\n \n );\n\n return isMobile ? (\n \n {form.cancelBtn}\n \n {form.input}\n {isSearchText && renderClearButton(clearSearchButtonText, clearSearch)}\n {!isSearchText ? MobileAutoSuggestEmptyComponent(props) : null}\n \n \n ) : (\n \n \n {form.submitBtn}\n {form.input}\n {isSearchText && cancelButtonNode}\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 { ISearchKeywordViewProps } from '@msdyn365-commerce-modules/search';\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\n/**\n * Render keywords heading.\n * @param keywordsHeading -The Keywords result heading.\n * @returns The JSX Element.\n */\nconst renderKeywordSuggestionsTitle = (keywordsHeading: string): JSX.Element => {\n const categoryAutoSuggestionHeading = keywordsHeading ? keywordsHeading : 'Keywords';\n\n return
    {categoryAutoSuggestionHeading}
    ;\n};\n\n/**\n * Render keywords reults.\n * @param keywordSuggest -The Keywords suggest Node props.\n * @param ulKeyword -The List Node props.\n * @param keywordsHeading -The Keywords result heading.\n * @param noResultText -The \"No Result\" text.\n * @param keywordSuggestions -The Keywords suggestion result.\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\n * @param isLoadingNode - The autosuggestion loading node.\n * @returns -The JSX Element.\n */\nexport const KeywordSuggestionsComponent = (\n keywordSuggest: INodeProps,\n ulKeyword: INodeProps,\n keywordsHeading: string,\n noResultText: string,\n keywordSuggestions?: ISearchKeywordViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n): JSX.Element => {\n return keywordSuggestions ? (\n \n {renderKeywordSuggestionsTitle(keywordsHeading)}\n \n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest &&\n keywordSuggestions.text.map(text => {\n return text;\n })}\n \n \n ) : (\n \n {renderKeywordSuggestionsTitle(keywordsHeading)}\n \n
  • {noResultText}
  • \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 { IImageData, Image } from '@msdyn365-commerce/core';\nimport { ISearchData, ISearchProductViewProps } from '@msdyn365-commerce-modules/search';\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\n\n/**\n * Render Products Suggestion result heading.\n * @param productSuggestionsHeading -The products suggestion result heading.\n * @returns The JSX Element.\n */\nconst renderProductSuggestionsTitle = (productSuggestionsHeading: string): JSX.Element => {\n const productAutoSuggestionHeading = productSuggestionsHeading ? productSuggestionsHeading : 'Products';\n\n return
    {productAutoSuggestionHeading}
    ;\n};\n\n/**\n * Render Products Suggestion result heading.\n * @param props -The props.\n * @returns The JSX Element.\n */\nconst renderProductNotFoundResultsImage = (props: ISearchProps): JSX.Element | null => {\n const noSearchResultImage: IImageData | undefined = props.config.noSearchResultImage;\n if (!noSearchResultImage || !noSearchResultImage.src) {\n return null;\n }\n return (\n \n );\n};\n\n/**\n * Render Products No result section.\n * @param props -The props.\n * @returns The JSX Element.\n */\nconst renderProductNotFoundResults = (props: ISearchProps): JSX.Element => {\n return (\n \n
    {renderProductNotFoundResultsImage(props)}
    \n
    {props.resources.noResultContentHeadingText}
    \n
    \n {props.resources.noResultContentParagraphText}\n
    \n
    \n );\n};\n\n/**\n * Render Product suggestion result.\n * @param productSuggest -The product suggest Node props.\n * @param ulProduct -The List Node props.\n * @param props -The props.\n * @param productSuggestions -The Product suggestion result.\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\n * @param isLoadingNode - The autosuggestion loading node.\n * @returns The JSX Element.\n */\nexport const ProductSuggestionsComponent = (\n productSuggest: INodeProps,\n ulProduct: INodeProps,\n props: ISearchProps,\n productSuggestions?: ISearchProductViewProps,\n isLoadingAutoSuggest?: boolean,\n isLoadingNode?: React.ReactNode\n): JSX.Element => {\n const liProduct: INodeProps = {\n tag: 'li',\n className: 'msc-no-result-content'\n };\n return productSuggestions ? (\n \n {renderProductSuggestionsTitle(props.resources.productSuggestionHeading)}\n \n {isLoadingAutoSuggest && isLoadingNode}\n {!isLoadingAutoSuggest &&\n productSuggestions.items.map((item, index) => {\n return (\n \n \n {item.thumbnail}\n {item.text}\n {item.price}\n \n \n );\n })}\n \n \n ) : (\n \n {renderProductSuggestionsTitle(props.resources.productSuggestionHeading)}\n \n {renderProductNotFoundResults(props)}\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 { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { ISearchData, ISearchFormViewProps, ISearchViewProps } from '@msdyn365-commerce-modules/search';\nimport { Button, format, isMobile, Module, Node, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport React, { useCallback, useEffect, useState } from 'react';\n\nimport { ISearchProps } from '../definition-extensions/search.ext.props.autogenerated';\nimport { CategorySuggestionsComponent } from './components/search.categorysuggest';\nimport { FormComponent } from './components/search.form';\nimport { KeywordSuggestionsComponent } from './components/search.keywordsuggest';\nimport { ProductSuggestionsComponent } from './components/search.productsuggest';\n\n/**\n * Render Title for AutoSuggest.\n * @param searchSuggestionHeading -The heading resource string.\n * @param searchText -The search string.\n * @returns -The JSX Element.\n */\nconst renderTitle = (searchSuggestionHeading: string, searchText: string): JSX.Element => {\n const searchTextString = '\"'.concat(searchText.concat('\"'));\n const searchAutoSuggestionHeading = searchSuggestionHeading\n ? format(searchSuggestionHeading, searchTextString)\n : `Search for ${searchTextString}`;\n\n return {searchAutoSuggestionHeading};\n};\n\n/**\n * Search View.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst SearchView: React.FC> = (\n props: ISearchViewProps & ISearchProps\n): JSX.Element => {\n const {\n Search,\n AutoSuggestAriaLabel,\n AutoSuggestAriaLabelText,\n searchText,\n AutoSuggest,\n KeywordSuggest,\n ProductSuggest,\n UlKeyword,\n UlProduct,\n form,\n autosuggestKeyword,\n autosuggestProduct,\n SearchForm,\n FormWrapper,\n label,\n context,\n isLoadingAutoSuggest,\n isLoadingNode,\n callbacks: { handleCancelSearchFocused }\n } = props;\n\n const { searchSuggestionHeading, categorySuggestionHeading, keywordsHeading, noResultText, clearSearchButtonText } = props.resources;\n\n const [searchTextString, setSearchTextString] = useState();\n const [isMobilePort, setIsMobile] = useState(false);\n\n useEffect(() => {\n setSearchTextString(searchText);\n }, [searchText]);\n\n /**\n * ClearSearch callback method to clear search string.\n */\n const clearSearch = (): void => {\n setSearchTextString('');\n\n const propsForm = props.form as ISearchFormViewProps;\n const propsFormInput = propsForm.input as React.DetailedHTMLProps, HTMLInputElement>;\n const propsFormInputCurrent = (propsFormInput.ref as React.RefObject).current;\n\n if (propsFormInputCurrent) {\n propsFormInputCurrent.value = '';\n }\n\n propsFormInput.value = '';\n props.searchText = '';\n props.FormWrapper.action = '';\n };\n\n const isMobileViewport = useCallback(() => {\n const isMobileView = isMobile({ variant: VariantType.Browser, context: context.request }) === 'xs';\n setIsMobile(isMobileView);\n }, [context]);\n\n useEffect(() => {\n window.addEventListener('resize', isMobileViewport);\n isMobileViewport();\n }, [isMobileViewport]);\n\n const viewport = isMobile({ variant: VariantType.Browser, context: context.request });\n\n const isMobileView = viewport === 'sm' || viewport === 'xs';\n\n AutoSuggest.className = !StringExtensions.isNullOrEmpty(searchTextString)\n ? `${AutoSuggest.className} show`\n : `${AutoSuggest.className} hide`;\n const isSearchText: boolean = !StringExtensions.isNullOrEmpty(searchTextString);\n\n return (\n \n {label}\n {FormComponent(\n form as ISearchFormViewProps,\n SearchForm,\n FormWrapper,\n isMobilePort,\n clearSearchButtonText,\n props,\n isSearchText,\n clearSearch\n )}\n {!isMobileView && (\n \n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\n {AutoSuggestAriaLabelText}\n ) : (\n ''\n )}\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\n <>\n \n \n {renderTitle(searchSuggestionHeading, searchText)}\n \n \n \n {CategorySuggestionsComponent(\n categorySuggestionHeading,\n noResultText,\n props,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n {KeywordSuggestionsComponent(\n KeywordSuggest,\n UlKeyword,\n keywordsHeading,\n noResultText,\n autosuggestKeyword,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n \n {ProductSuggestionsComponent(\n ProductSuggest,\n UlProduct,\n props,\n autosuggestProduct,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n \n \n ) : null}\n \n )}\n {isMobileView && props.isSearchFormExpanded && (\n \n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\n {AutoSuggestAriaLabelText}\n ) : (\n ''\n )}\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\n <>\n \n {(form as ISearchFormViewProps).cancelBtn}\n {renderTitle(searchSuggestionHeading, searchText)}\n \n \n \n {CategorySuggestionsComponent(\n categorySuggestionHeading,\n noResultText,\n props,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n {KeywordSuggestionsComponent(\n KeywordSuggest,\n UlKeyword,\n keywordsHeading,\n noResultText,\n autosuggestKeyword,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n \n {ProductSuggestionsComponent(\n ProductSuggest,\n UlProduct,\n props,\n autosuggestProduct,\n isLoadingAutoSuggest,\n isLoadingNode\n )}\n \n \n ) : null}\n \n )}\n \n );\n};\nexport default SearchView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","window","__bindings__","_objectSpread","viewDictionary","cn","createSearchStateInput","result","GenericInput","getGenericActionDataAction","createObservableDataAction","action","getGenericAction","input","inputData","searchText","SearchState","__decorate","observable","SuggestionType","AutoSuggestInput","constructor","top","suggestionType","hitPrefix","hitSuffix","getCacheKey","getCacheObjectType","dataCacheType","this","searchQuery","topResultsCount","async","_getAutoSuggest","autosuggest","ctx","catalogId","getCatalogId","requestContext","searchCriteria","ProductSearchCriteria","SearchCondition","length","Context","ChannelId","apiSettings","channelId","CatalogId","HitPrefix","HitSuffix","searchSuggestions","getSearchSuggestionsAsync","callerContext","queryResultSettings","Paging","Top","map","item","ImageUrl","generateImageUrl","AllSearchResults","telemetry","error","autoSuggestPromises","Promise","all","then","payLoad","CategorySuggestionsComponent","props","suggestions","autoSuggestProps","resources","categorySuggestionHeading","reactNodes","getPayloadObject","telemetryContent","push","_assembleNode","title","_renderTitle","text","categoryAutoSuggestionHeading","format","React","className","shouldShowFullPath","splitValue","Value","split","pop","ariaLabel","replace","RegExp","contentAction","etext","attribute","getTelemetryAttributes","key","Id","Object","assign","href","_generateLink","_getHighlightedText","suggestion","_getCategoryLink","_categoryRefiners$Val","searchPageURL","searchQsp","searchRefiners","MsDyn365","isBrowser","queryUrl","URL","location","searchParams","set","categoryRefiners","find","refiners","SourceValue","ProductRefinerSource","Category","refiner","Values","RefinerRecordId","Number","parseInt","encodedRefiner","JSON","stringify","compressRefiners","formattedText","dangerouslySetInnerHTML","getRichTextHtml","compressedRefinerKeys","compressedRefiners","forEach","compressedRefiner","refinerKey","FormComponent","searchPlaceholder","hideSearchLabel","searchTextInput","handleInputChange","maxChars","disableSubmitSearch","handleCancelSearchChange","query","ariaLabelCancel","ariaLabelSearch","ariaLabelSubmit","onInputChange","event","target","value","onInputChangeFunction","inputNode","type","placeholder","ref","onChange","maxLength","submitBtnNode","Button","cancelBtn","onClick","submitBtn","KeywordSuggestionsComponent","formattedLink","LabelComponent","searchLabelClass","searchLabelArialLabel","isSearchFormExpanded","searchtext","searchCollapsedLabel","attributes","innerRef","ProductSuggestionsComponent","context","actionContext","productSuggestionHeading","moduleType","moduleId","items","productAutoSuggestionHeading","_item$Value","altText","price","Value3","DecimalValue","thumbnail","_renderThumbnail","ObjectExtensions","isNullOrUndefined","_renderPrice","LiProduct","_getLiWrapper","AProduct","_getAWrapper","tag","recid","cultureFormatter","formatCurrency","getProductPageUrlSync","undefined","adjustedPrice","basePrice","_props$resources","PriceComponent","typeName","data","CustomerContextualPrice","BasePrice","freePriceText","request","gridSettings","config","imageSettings","cropFocalRegion","Image","src","viewports","xs","q","w","h","lg","xl","lazyload","loadFailureBehavior","Search","super","waitTime","_isLoadingNode","loadingText","autoSuggestResultLoadingMessage","Spinner","label","size","SpinnerSize","medium","labelPosition","_focusOutTarget","e","state","closest","_clearAutoSuggestState","_keyup","keyCode","KeyCodes","Escape","setState","formReference","current","contains","autoSuggestResultDiv","searchState","defaultBasicSearchUrl","searchQueryStringParameter","update","_handleInputChange","cancellabelDebounce","cancel","ArrayExtensions","hasElements","inputSuggestionType","_loadSuggestions","_handleSubmit","app","preventDefault","focus","searchURL","_appendQueryParams","getUrlSync","document","_handleCancelSearchChange","isInitialState","_handleCancelSearchFocused","route","qsp","_setAutoSuggestResultCount","autoSuggestResultScreenReaderDiv","ariaLiveRegion","suggestResultString","autoSuggestFoundMessage","emptyResultString","noAutoSuggestionMessage","innerText","setAttribute","searchKeywordSuggestClass","searchProductSuggestClass","searchCategorySuggestClass","autoSuggestAriaLabel","isLoadingAutoSuggest","searchInputMaxLength","searchFormClass","getTelemetryObject","telemetryPageName","friendlyName","_initSuggestionTypes","body","addEventListener","componentWillUnmount","removeEventListener","componentDidUpdate","params","isEditor","shouldComponentUpdate","nextProps","nextState","render","_suggestions$AllSearc","_suggestions$AllSearc2","_suggestions$AllSearc3","cancelBtnAriaLabel","searchBtnAriaLabel","submitBtnAriaLabel","searchplaceholderText","shouldShowFullCategoryPath","keywordSuggestions","filter","Keyword","None","productSuggestions","Product","categorySuggestions","_item$RefinerRecordId","viewProps","moduleProps","classnames","AutoSuggestAriaLabel","AutoSuggestAriaLabelText","AutoSuggest","KeywordSuggest","ProductSuggest","CategorySuggest","SearchForm","FormWrapper","role","autoComplete","onSubmit","UlKeyword","UlProduct","UlCategory","form","autosuggestKeyword","autosuggestProduct","autosuggestCategory","callbacks","handleCancelSearchFocused","isLoadingNode","renderView","suggestionTypes","suggestionTypeCriterion","unique","validValues","validSuggestions","loadSuggestionsRequestId","getSearchSuggestionsAction","_getSuggestionType","exception","debug","_getSearchRefiners","_debounce","Random","Guid","generateGuid","_getSearchSuggestions","_updateSearchRefiners","setTimeout","suggestionTypeItem","charAt","toUpperCase","slice","join","validateCatalogId","ProductsDataActions","_renderForm","Node","_renderKeywordSuggestions","_renderProductSuggestions","index","_renderCategorySuggestions","Module","renderCategorySuggestionsTitle","inCategoriesHeading","noResultText","MobileAutoSuggestEmptyComponent","noSearchResultImage","renderProductNotFoundResultsImage","emptyMobileSearchTextHeading","emptyMobileSearchText","searchForm","formWrapper","isMobile","clearSearchButtonText","isSearchText","clearSearch","cancelButtonNode","renderClearButton","renderKeywordSuggestionsTitle","keywordsHeading","keywordSuggest","ulKeyword","renderProductSuggestionsTitle","productSuggestionsHeading","renderProductNotFoundResults","noResultContentHeadingText","noResultContentParagraphText","productSuggest","ulProduct","_item$id","renderTitle","searchSuggestionHeading","searchTextString","concat","searchAutoSuggestionHeading","setSearchTextString","useState","isMobilePort","setIsMobile","useEffect","propsFormInput","propsFormInputCurrent","isMobileViewport","useCallback","isMobileView","variant","VariantType","Browser","viewport","StringExtensions","isNullOrEmpty","onBlur","module","exports","ReactDOM"],"sourceRoot":""}