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BH,EAAWtE,EAAYlS,OAASkS,EAAYlS,MACnEwW,EAAWtR,cAZFoP,GAAM,WACjB,MAAO,CAAC,EAAG,GAAGoC,mBAAqB,IAAIzG,EAAU,CAAC,EAAG,IAAIyG,sBACpDpC,GAAM,WACXrE,EAAUE,UAAUuG,eAAetC,KAAK,CAAC,EAAG","sources":["webpack://Msdyn365.Commerce.Online/../../src/get-customer.ts?8319","webpack://Msdyn365.Commerce.Online/../../../src/utilities/QueryResultSettingsProxy.ts?5e44","webpack://Msdyn365.Commerce.Online/../../../src/utilities/extensions/array-extensions.ts?9229","webpack://Msdyn365.Commerce.Online/../../../src/utilities/extensions/enum-extensions.ts?88eb","webpack://Msdyn365.Commerce.Online/../../../src/utilities/extensions/string-extensions.ts?a5a2","webpack://Msdyn365.Commerce.Online/../../../src/utilities/extensions/object-extensions.ts?676e","webpack://Msdyn365.Commerce.Online/../../../src/utilities/input-data-parser.ts?027a","webpack://Msdyn365.Commerce.Online/../../../src/utilities/utils.ts?fbc0","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/array-buffer-basic-detection.js?ea7b","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/array-buffer-view-core.js?36a4","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/array-fill.js?3959","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/to-big-int.js?4235","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/to-offset.js?7834","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/to-positive-integer.js?d73e","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.fill.js?922b","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.set.js?a61b","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.sort.js?69ea","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.to-locale-string.js?30ef"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { Customer, CustomersDataActions } from '@msdyn365-commerce/retail-proxy';\n\nimport { buildCacheKey } from './utilities/utils';\n\n/**\n * Input class for get customer data action.\n */\nexport class GetCustomerInput implements IActionInput {\n public customerAccountNumber?: string;\n\n private readonly apiSettings: ICommerceApiSettings;\n\n private readonly cacheType?: CacheType;\n\n public constructor(apiSettings: ICommerceApiSettings, accountNumber?: string, cacheType?: CacheType) {\n this.customerAccountNumber = accountNumber;\n this.apiSettings = apiSettings;\n this.cacheType = cacheType;\n }\n\n /**\n * GetCacheKey.\n * @returns - Returns string.\n */\n public getCacheKey = (): string => buildCacheKey(`Customer-${this.customerAccountNumber}`, this.apiSettings);\n\n /**\n * GetCacheObjectType.\n * @returns - Cache Object Type string.\n */\n public getCacheObjectType = (): string => 'Customer';\n\n /**\n * DataCacheType.\n * @returns - CacheType string.\n */\n public dataCacheType = (): CacheType => {\n return this.cacheType ? this.cacheType : 'request';\n };\n}\n\n/**\n * Creates the input required to make the retail api call.\n * @param inputData -- The input data passed to the createInput method.\n * @returns - ProductAvailabilitiesForSelectedVariant or error.\n */\nconst createInput = (inputData: ICreateActionContext>): GetCustomerInput => {\n const { user, apiSettings } = inputData.requestContext;\n if (!user.token || !user.isAuthenticated) {\n throw new Error('[getCustomer][createInput]: User is not Authenticated.');\n }\n\n return new GetCustomerInput(apiSettings);\n};\n\n/**\n * GetCustomerAction.\n * @param input - GetCustomerInput.\n * @param ctx - Action Context.\n * @returns - Customer information.\n */\nconst getCustomerAction = async (input: GetCustomerInput, ctx: IActionContext): Promise => {\n if (input && ctx.requestContext.user.isAuthenticated) {\n // TO-DO- Need to clean up this code once SDK releases new proxy that handles null.\n return CustomersDataActions.readAsync({ callerContext: ctx, bypassCache: 'get' }, input.customerAccountNumber || '').then(\n response => {\n return Array.isArray(response) ? response[0] : response;\n }\n );\n }\n\n ctx.trace('[getCustomer]Invalid input passed to action');\n return {};\n};\n\n/**\n * The customer data action.\n */\nexport const getCustomerActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/retail-actions/get-customer',\n action: >getCustomerAction,\n input: createInput\n});\n\nexport default getCustomerActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IAny, ICreateActionContext, IGeneric, IRequestContext } from '@msdyn365-commerce/core';\nimport { QueryResultSettings, SortColumn } from '@msdyn365-commerce/retail-proxy';\n\nimport { IQueryResultSettingsModuleConfig } from './IQueryResultSettingsModuleConfig';\n\n/**\n * Wrapper for query result settings, which guarantees some properties that are optional in the real subject\n * and includes some common utilities for data actions.\n */\nexport class QueryResultSettingsProxy {\n // Real subject\n private readonly queryResultSettings: QueryResultSettings;\n\n /**\n * Factory method for data actions.\n * @param inputData - Input data.\n * @returns - Returns query result settings proxy.\n */\n public static fromInputData(inputData: ICreateActionContext>): QueryResultSettingsProxy {\n const { requestContext, config } = inputData;\n return QueryResultSettingsProxy.fromModuleData(requestContext, config as IQueryResultSettingsModuleConfig);\n }\n\n /**\n * Factory method for modules.\n * @param requestContext - RequestContext.\n * @param config - Module config from props.\n * @returns - Returns query result settings proxy.\n */\n public static fromModuleData(requestContext: IRequestContext, config: IQueryResultSettingsModuleConfig): QueryResultSettingsProxy {\n const sortingCriteria = (config && config.sortingCriteria) || undefined;\n const query = requestContext && requestContext.query;\n const top = (query && query.top) || undefined;\n const skip = (query && query.skip) || undefined;\n\n const queryResultSettings = {\n Paging: {\n Skip: (skip && Number(skip)) || 0,\n Top: (top && Number(top)) || config?.itemsPerPage || 50\n },\n Sorting: sortingCriteria || {}\n };\n\n return new QueryResultSettingsProxy(queryResultSettings);\n }\n\n /**\n * Return the query result settings with default paging or with the passed value.\n * @param inputData - Input Data.\n * @returns - Query Result settings.\n */\n public static getPagingFromInputDataOrDefaultValue(inputData: ICreateActionContext>): QueryResultSettings {\n const config: IQueryResultSettingsModuleConfig | undefined = inputData.config;\n const defaultPageSize: number = 100;\n const queryResultSettings: QueryResultSettings = {\n Paging: {\n // eslint-disable-next-line max-len -- Disable max length for next line.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unnecessary-condition -- Reading from config.\n Top:\n config?.itemsPerPage ??\n Number.parseInt(inputData.requestContext?.app?.platform?.defaultPageSizeForAPI ?? defaultPageSize, 10)\n }\n };\n return queryResultSettings;\n }\n\n /**\n * Factory method.\n * @returns - Returns query result settings proxy.\n */\n public static getDefault(): QueryResultSettingsProxy {\n return new QueryResultSettingsProxy({ Paging: {}, Sorting: {} });\n }\n\n /**\n * Private constructor, expect instances to be created with the factory method.\n * @param queryResultSettings - Query result setting.\n */\n private constructor(queryResultSettings: QueryResultSettings) {\n this.queryResultSettings = queryResultSettings;\n }\n\n public get QueryResultSettings(): QueryResultSettings {\n return this.queryResultSettings;\n }\n\n /**\n * Gets the hints for the cache key based on query result settings.\n * @returns - Returns cache key hint.\n */\n public get cacheKeyHint(): string {\n // The factory method guarantees values are defined\n const topHint = `top-${this.queryResultSettings.Paging!.Top!}`;\n const skipHint = `skip-${this.queryResultSettings.Paging!.Skip!}`;\n const sortingHintData =\n (this.queryResultSettings.Sorting!.Columns || [])\n .map((column: SortColumn) => {\n return `${column.ColumnName}--${(column.IsDescending && 'desc') || 'asc'}`;\n })\n .join(',') || undefined;\n const sortingHint = `sortBy-${sortingHintData}`;\n return `${topHint}|${skipHint}|${sortingHint}`;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ObjectExtensions } from './object-extensions';\n\n/**\n * Represents an array which is defined with at least one value.\n */\nexport type NonEmptyArray = [T, ...T[]];\n\n/**\n * Namespace which extends Array functionality.\n */\nexport namespace ArrayExtensions {\n /**\n * Verifies whether the object array has elements.\n * @param value - The array to examine.\n * @returns True if the object has at least one element in the array, false otherwise (if array is not defined or empty).\n */\n export function hasElements(value: NonEmptyArray | T[] | null | undefined): value is NonEmptyArray {\n const emptyArrayLength = 0;\n return !ObjectExtensions.isNullOrUndefined(value) && value.length > emptyArrayLength;\n }\n\n /**\n * Retrieves the first element in the array or default value if the array is empty.\n * @param values - The array with values.\n * @param defaultValue - Optional parameter to specify default value. If not specified, undefined will be used.\n * @returns First element or default value.\n */\n export function firstOrDefault(values: NonEmptyArray | T[] | null | undefined, defaultValue?: T): T | undefined {\n if (hasElements(values)) {\n return values[0];\n }\n return defaultValue;\n }\n\n /**\n * Remove duplicate elements in the array.\n * @param value - The array to examine.\n * @returns An array with only unique elements.\n */\n export function unique(value: T[]): T[] {\n if (!hasElements(value)) {\n return [];\n }\n\n return Array.from(new Set(value));\n }\n\n /**\n * Checks if all elements satisfy given condition.\n * @param value - The array to examine.\n * @param predicate - The function which checks an element.\n * @returns True if the array is empty or all the inner elements satisfy given condition,\n * false if at least one element does not pass the condition.\n */\n export function all(value: T[] | null | undefined, predicate: (value: T, index: number, array: T[]) => boolean): boolean {\n if (!hasElements(value)) {\n return true;\n }\n\n return value.filter(predicate).length === value.length;\n }\n\n /**\n * Filters out null and undefined values from the given array.\n * @param value - The array with possibly undefined/null items.\n * @returns All items which are not null or undefined.\n */\n export function validValues(value: (T | undefined | null)[] | undefined | null): T[] {\n if (!hasElements(value)) {\n return [];\n }\n\n return value.filter(item => !ObjectExtensions.isNullOrUndefined(item)) as T[];\n }\n\n /**\n * Merges items from 2-dimensional array into one array with all items.\n * @param value - The 2-dimensional array with the items.\n * @returns All items retrieved from all inner arrays.\n */\n export function flatten(value: ((T | undefined | null)[] | undefined | null)[]): T[] {\n let result: T[] = [];\n\n if (!hasElements(value)) {\n return result;\n }\n\n for (const arrayLine of value) {\n if (!ObjectExtensions.isNullOrUndefined(arrayLine)) {\n result = result.concat(validValues(arrayLine));\n }\n }\n\n return result;\n }\n\n /**\n * Check if two arrays are equal.\n * @param firstArray - The array with the items.\n * @param secondArray - Another array with the items.\n * @param comparator - The comparator which compares the values and returns true if two objects are equal, false otherwise.\n * @returns True if arrays have the same items, false otherwise.\n */\n export function equals(\n firstArray: T[],\n secondArray: T[],\n comparator?: (valueFromFirstArray: T, valueFromSecondArray: T) => boolean\n ): boolean {\n if (firstArray.length !== secondArray.length) {\n return false;\n }\n\n if (comparator === undefined) {\n return JSON.stringify(firstArray) === JSON.stringify(secondArray);\n }\n\n for (let index = 0; index < firstArray.length; ++index) {\n if (!comparator(firstArray[index], secondArray[index])) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Check if two arrays have the same elements irrespective of the order.\n * @param firstArray - The array with the items.\n * @param secondArray - Another array with the items.\n * @param comparator - The comparator which compares the values and returns true if two objects are equal, false otherwise.\n * @returns True if arrays have the same items, false otherwise.\n */\n export function haveSameItems(\n firstArray: T[],\n secondArray: T[],\n comparator: (valueFromFirstArray: T, valueFromSecondArray: T) => boolean = (valueFromFirstArray: T, valueFromSecondArray: T) =>\n valueFromFirstArray === valueFromSecondArray\n ): boolean {\n if (firstArray.length !== secondArray.length) {\n return false;\n }\n\n for (const item of firstArray) {\n if (!secondArray.some(otherItem => comparator(item, otherItem))) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Calculates a sum of elements in the given array.\n * @param data - List of items.\n * @returns Sum of elements.\n */\n export function calculateSum(data: NonEmptyArray): number {\n let result = data[0];\n for (let index = 1; index < data.length; ++index) {\n result += data[index];\n }\n\n return result;\n }\n\n /**\n * Reverses the elements in the array without modifying the original one.\n * @param array - The array with the items.\n * @returns A new array with reversed order.\n */\n export function reverse(array: T[]): T[] {\n const newArray: T[] = [];\n\n for (let index = array.length - 1; index >= 0; --index) {\n newArray.push(array[index]);\n }\n\n return newArray;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ObjectExtensions } from './object-extensions';\n\n/**\n * Namespace which extends enum functionality.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport namespace EnumExtensions {\n /**\n * @description Returns a list of numeric values and enum names for the specified enum.\n * @param enumClass\n * @param {any} value The enum to examine.\n * @returns {(number | string)[]} An array of numeric values and enum names.\n */\n export function getValues(enumClass: any): (number | string)[] {\n if (ObjectExtensions.isNullOrUndefined(enumClass)) {\n return [];\n }\n\n return Object.keys(enumClass).map(item => enumClass[item]);\n }\n\n /**\n * @description Returns a list of enum names for the specified enum.\n * @param enumClass\n * @param {any} value The enum to examine.\n * @returns {(number | string)[]} An array of string values.\n */\n export function getNames(enumClass: any): string[] {\n return getValues(enumClass).filter(ObjectExtensions.isString);\n }\n\n /**\n * @description Returns a list of numeric values for the specified enum.\n * @param enumClass\n * @param {any} value The enum to examine.\n * @returns {number[]} An array of numeric values.\n */\n export function getNumericValues(enumClass: any): number[] {\n return getValues(enumClass).filter(ObjectExtensions.isNumber);\n }\n\n /**\n * @description Returns a list of enum values for the specified enum.\n * @param enumClass\n * @param {any} value The enum to examine.\n * @returns {number[]} An array of enum values.\n */\n export function getEnumValues(enumClass: any): T[] {\n return getNumericValues(enumClass).map(value => value);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ObjectExtensions } from './object-extensions';\n\n/**\n * Namespace which extends string functionality.\n */\nexport namespace StringExtensions {\n /**\n * Checks if string is null, undefined, empty, or whitespace.\n * @param {string | null | undefined} value The string to examine.\n * @returns {boolean} True if it's null, undefined, empty, or whitespace; false otherwise.\n */\n export function isNullOrWhitespace(value: string | null | undefined): boolean {\n return isNullOrEmpty(value) || value!.trim() === '';\n }\n\n /**\n * Checks if string is null, undefined, or empty.\n * @param {string | null | undefined} value The string to examine.\n * @returns {boolean} True if it's null, undefined, empty, or whitespace; false otherwise.\n */\n export function isNullOrEmpty(value: string | null | undefined): boolean {\n if (ObjectExtensions.isNullOrUndefined(value)) {\n return true;\n }\n\n if (!ObjectExtensions.isString(value)) {\n throw new Error('StringExtensions has received a non-string input.');\n }\n\n return value === '';\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Namespace which extends Object functionality.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport namespace ObjectExtensions {\n /**\n * @description Verifies whether the value is null or undefined.\n * @param {any} value The value to examine.\n * @returns {boolean} True if the value is null or undefined, false otherwise.\n */\n export function isNullOrUndefined(value: any): value is null | undefined {\n return value === null || value === undefined;\n }\n\n /**\n * @description Verifies whether the value is of type string.\n * @param {any} value The value to examine.\n * @returns {boolean} True if the value is a string, false otherwise.\n */\n export function isString(value: any): value is string {\n return typeof value === 'string';\n }\n\n /**\n * @description Verifies whether the value is of type number.\n * @param {any} value The value to examine.\n * @returns {boolean} True if the value is a number, false otherwise.\n */\n export function isNumber(value: any): value is number {\n return typeof value === 'number';\n }\n\n /**\n * Verifies whether the object is a function.\n * @param {any} object The object.\n * @param value\n * @returns {boolean} True if the object is a function, false otherwise.\n */\n export function isFunction(value: any): boolean {\n return typeof value === 'function';\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { QueryResultSettings } from '@msdyn365-commerce/retail-proxy';\n\nimport { QueryResultSettingsProxy } from './QueryResultSettingsProxy';\n\nexport interface ISearchData {\n q: string;\n skip: number;\n top: number;\n itemsPerPage: string;\n maxItems: string;\n channelId: number;\n queryResultSettings: QueryResultSettings;\n}\n\nexport const parseSearchData = (inputData: ICreateActionContext>): ISearchData => {\n // Query is of type 'IDictionary | undefined', so that q and skip are not recognized by tsc\n const {\n requestContext: {\n // @ts-expect-error:2339\n query: { q, top, skip },\n apiSettings: { channelId }\n },\n // @ts-expect-error:2339\n config: { maxItems, itemsPerPage }\n } = inputData;\n const queryResultSettings = QueryResultSettingsProxy.fromInputData(inputData).QueryResultSettings;\n return {\n q,\n skip: (skip && Number(skip)) || 0,\n top: (top && Number(top)) || 50,\n itemsPerPage, // TODO BUGBUG 21667361\n maxItems, // TODO BUGBUG 21667361\n channelId,\n queryResultSettings\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport msdyn365Commerce, {\n generateImageUrl as generateImageUrlFromSdk,\n IAny,\n ICommerceApiSettings,\n ICoreContext,\n ICreateActionContext,\n IGeneric,\n IRequestContext\n} from '@msdyn365-commerce/core';\nimport {\n AsyncResult,\n AttributeValue,\n CartLine,\n ChannelInventoryConfiguration,\n CommerceListLine,\n ProductDimension,\n ProductDimensionType,\n ProductSearchResult,\n QueryResultSettings,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\n\nimport { ProductDetailsCriteria } from '../get-full-products';\nimport { ArrayExtensions, StringExtensions } from './extensions';\nimport { parseSearchData } from './input-data-parser';\nimport { InventoryLevels } from './product-inventory-information';\n\nexport const wrapInResolvedAsyncResult = (input: T | null | undefined): AsyncResult => {\n return >{\n status: 'SUCCESS',\n result: input,\n metadata: {}\n };\n};\n\nexport const wrapInRejectedAsyncResult = (input: T | null | undefined): AsyncResult => {\n return >{\n status: 'FAILED',\n result: input,\n metadata: {}\n };\n};\n\nexport const buildQueryResultSettings = (inputData: ICreateActionContext, IGeneric>): QueryResultSettings => {\n try {\n const searchInputData = parseSearchData(inputData);\n const search = searchInputData.q;\n if (!search) {\n throw new Error('Query string ?q={searchText} is needed for search actions.');\n }\n const top = (searchInputData.maxItems && Number(searchInputData.maxItems)) || searchInputData.top;\n return { Paging: { Top: top, Skip: searchInputData.skip } };\n } catch {\n return {};\n }\n};\n\n/**\n * Utility function to extract the active productId in the following priority:\n * First query param (productId), then UrlToken (itemId), then module config.\n * @param inputData - The Action Input data.\n * @returns Productid or undefined.\n */\nexport const getSelectedProductIdFromActionInput = (inputData: ICreateActionContext>): string | undefined => {\n const context = inputData.requestContext;\n if (context.query?.productId) {\n return context.query.productId;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Exsiting code.\n } else if (\n context.urlTokens &&\n inputData.requestContext.urlTokens.itemId &&\n inputData.requestContext.urlTokens.pageType === 'Product'\n ) {\n return context.urlTokens.itemId;\n } else if (inputData && inputData.config && inputData.config.productId) {\n return inputData.config.productId;\n }\n return undefined;\n};\n\n/**\n * Generates a Image URL based on data return from retail server.\n * @param imageUrl The image url returned by Retail Server.\n * @param ctx The request context.\n * @param apiSettings\n */\nexport const generateImageUrl = (imageUrl: string | undefined, apiSettings: ICommerceApiSettings): string | undefined => {\n return generateImageUrlFromSdk(apiSettings, imageUrl);\n};\n\n/**\n * Represents app configuration for dimensions.\n */\nexport interface IDimensionsConfig {\n dimensionsAsSwatchType?: DimensionTypes[];\n dimensionsInProductCard?: DimensionTypes[];\n inventoryLevel?: InventoryLevels;\n dimensionToPreSelectInProductCard?: DimensionTypes;\n enableStockCheck?: boolean;\n warehouseAggregation?: string;\n}\n\n/**\n * Represents app configuration for dimensions.\n */\nexport interface IDimensionsApp {\n config: IDimensionsConfig;\n}\n\n/**\n * Represents product dimension types.\n */\nexport enum DimensionTypes {\n none = 'none',\n color = 'color',\n configuration = 'configuration',\n size = 'size',\n style = 'style'\n}\n\n/**\n * Defines display configuration types.\n */\nexport enum DimensionSwatchDisplayTypes {\n default = 'default',\n productCard = 'productCard'\n}\n\n/**\n * Checks if rendering the particular dimensions is allowed.\n * @param dimensionType - Dimension to be displayed.\n * @param context - Core application context.\n * @param displayType - The swatch location, the component from which it comes from.\n * @returns Updates the state with new product page url.\n */\nexport const checkIfShouldDisplayAsSwatch = (\n dimensionType: DimensionTypes,\n context: ICoreContext,\n displayType: DimensionSwatchDisplayTypes = DimensionSwatchDisplayTypes.default\n): boolean => {\n // Additional checks for the product card since it has a separate config setting.\n if (displayType === DimensionSwatchDisplayTypes.productCard) {\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\n if (\n !ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) ||\n dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) ||\n !dimensionsToDisplayOnProductCard.includes(dimensionType)\n ) {\n return false;\n }\n }\n\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\n return (\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none) &&\n dimensionsToDisplayAsSwatch.includes(dimensionType)\n );\n};\n\n/**\n * Generates an image URL for a swatch.\n * @param imageUrl - The image url returned by Retail Server.\n * @param apiSettings - The request context.\n * @returns Full image url.\n */\nexport const generateSwatchImageUrl = (imageUrl: string, apiSettings: ICommerceApiSettings): string => {\n if (imageUrl.startsWith('http')) {\n return imageUrl;\n }\n\n return apiSettings.baseImageUrl + encodeURIComponent(imageUrl);\n};\n\n/**\n * Generates a Image URL for a product based on data return from retail server.\n * @param product The Product returned by Retail Server.\n * @param ctx The request context.\n * @param apiSettings\n */\nexport const generateProductImageUrl = (\n product: SimpleProduct | ProductSearchResult,\n apiSettings: ICommerceApiSettings\n): string | undefined => {\n return generateImageUrl(product.PrimaryImageUrl, apiSettings);\n};\n\n/**\n * Creates a CartLine object from the passed data.\n * @param product The product.\n * @param quantity The quantity.\n * @param catalogId The catalog.\n */\nexport const buildCartLine = (product: SimpleProduct, quantity?: number, catalogId?: number): CartLine => {\n return {\n CatalogId: catalogId || 0,\n Description: product.Description,\n\n // TODO: Investigate this value and what it represents\n EntryMethodTypeValue: 3,\n ItemId: product.ItemId,\n ProductId: product.RecordId,\n Quantity: quantity || 1,\n TrackingId: '',\n UnitOfMeasureSymbol: product.DefaultUnitOfMeasure\n };\n};\n\n/**\n * Creates a CommerceListLine (also know as WishlistLine) object from the passed data.\n * @param productId The RecordId of the Product to be added.\n * @param customerId The account number of the customer.\n * @param wishlistId The Id of the commerce list.\n */\nexport const buildWishlistLine = (productId: number, customerId: string, wishlistId: number): CommerceListLine => {\n return {\n CommerceListId: wishlistId,\n ProductId: productId,\n CustomerId: customerId\n };\n};\n\n/**\n * Utility function to prepare the product details criteria before getting full product:\n * @param inputData The Action Input data\n */\nexport const getProductDetailsCriteriaFromActionInput = (inputData: ICreateActionContext>): ProductDetailsCriteria => {\n if (inputData && inputData.config) {\n return {\n getPrice: !inputData.config.hidePrice,\n getRating: !inputData.config.hideRating\n };\n }\n return {\n getPrice: true,\n getRating: true\n };\n};\n\n/**\n * Transforms search text into the expected 'search terms' format, expected by refiner APIs.\n * @param searchText Free-form text used for searching for products or categories of products.\n */\nexport const ensureSearchTextIsFormedProperly = (searchText: string): string => {\n const prefix = searchText.startsWith(\"'\") ? '' : \"'\";\n const suffix = searchText.endsWith(\"'\") ? '' : \"'\";\n return `${prefix}${searchText}${suffix}`;\n};\n\nexport const ensureSafeSearchText = (searchText: string): string => {\n return searchText.replace(/[^\\d\\sA-Za-z]+/g, '');\n};\n\nexport const buildCacheKey = (base: string, apiSettings: ICommerceApiSettings, locale?: string): string => {\n return `${base}-chanId:${apiSettings.channelId}-catId:${apiSettings.catalogId}${locale ? `-${locale}` : ''}`;\n};\n\nexport const buildCacheKeyWithUrlTokens = (base: string, requestContext: IRequestContext): string => {\n const urlTokens = requestContext.urlTokens;\n const defaultCacheKey = buildCacheKey(base, requestContext.apiSettings, requestContext.locale);\n return urlTokens ? `${defaultCacheKey}-${urlTokens.itemId}-${urlTokens.recordId}-${urlTokens.pageType}` : defaultCacheKey;\n};\n\n/**\n * Generates a key from set of arguments as inputs.\n *\n * @param args Argument list of pivots to generate key from.\n * @param handler Handler function for null/undefined values.\n */\n\ntype TKeyTypes = string | number | boolean | null | undefined;\ninterface IGenerateKeyOptions {\n separator?: string;\n handler?(input: null | undefined): string;\n}\nexport const generateKey = (args: TKeyTypes[], options?: IGenerateKeyOptions): string => {\n const { handler, separator }: IGenerateKeyOptions = { ...{ separator: '-', handler: undefined }, ...(options || {}) };\n return args\n .map(arg => {\n if (arg === null || arg === undefined) {\n if (handler) {\n return handler(arg);\n }\n }\n return arg;\n })\n .join(separator);\n};\n\n/**\n * Gets the fall back image url for a variant image.\n * @param itemId Item id of a product.\n * @param apiSettings Api setting from request context.\n */\nexport const getFallbackImageUrl = (itemId: string | undefined, apiSettings: ICommerceApiSettings): string | undefined => {\n if (!itemId) {\n return '';\n }\n\n const parsedItemId = itemId.trim().split(' ')[0];\n\n const productUrl = `Products/${parsedItemId}_000_001.png`;\n return generateImageUrl(productUrl, apiSettings);\n};\n\n/**\n * Converts retail proxy product dimension type to display dimension type.\n * @param productDimensionType - Product dimension type from retail proxy.\n * @returns Local dimension type.\n */\nexport const convertProductDimensionTypeToDimensionTypes = (productDimensionType: ProductDimensionType): DimensionTypes => {\n switch (productDimensionType) {\n case ProductDimensionType.Color:\n return DimensionTypes.color;\n case ProductDimensionType.Configuration:\n return DimensionTypes.configuration;\n case ProductDimensionType.Size:\n return DimensionTypes.size;\n case ProductDimensionType.Style:\n return DimensionTypes.style;\n default:\n return DimensionTypes.none;\n }\n};\n\n/**\n * Converts display dimension type to retail proxy product dimension type.\n * @param dimensionType - Local dimension type.\n * @returns Product dimension type from retail proxy.\n */\nexport const convertDimensionTypeToProductDimensionType = (dimensionType: DimensionTypes): ProductDimensionType => {\n switch (dimensionType) {\n case DimensionTypes.color:\n return ProductDimensionType.Color;\n case DimensionTypes.configuration:\n return ProductDimensionType.Configuration;\n case DimensionTypes.size:\n return ProductDimensionType.Size;\n case DimensionTypes.style:\n return ProductDimensionType.Style;\n default:\n return ProductDimensionType.None;\n }\n};\n\n/**\n * Sets dimensions to url.\n * @param inputUrl - Url to update.\n * @param productDimensions - Dimensions to set.\n */\nexport const setDimensionValuesToQuery = (inputUrl: URL, productDimensions: ProductDimension[]): void => {\n for (const dimension of productDimensions) {\n const dimensionValue = dimension.DimensionValue?.Value;\n if (!StringExtensions.isNullOrWhitespace(dimensionValue)) {\n inputUrl.searchParams.set(convertProductDimensionTypeToDimensionTypes(dimension.DimensionTypeValue), dimensionValue!);\n }\n }\n\n if (msdyn365Commerce.isBrowser) {\n window.history.replaceState(window.history.state, '', inputUrl.toString().replace(inputUrl.host, window.location.host));\n }\n};\n\n/**\n * Retrieves dimension value stored in url.\n * @param urlParameters - Url parameters.\n * @param productDimensionType - The dimension type to retrieve.\n * @returns Product dimension item.\n */\nconst parseDimensionFromUrl = (\n urlParameters: URLSearchParams,\n productDimensionType: ProductDimensionType\n): ProductDimension | undefined => {\n const localDimensionType = convertProductDimensionTypeToDimensionTypes(productDimensionType);\n const value = urlParameters.get(localDimensionType);\n if (!value) {\n return undefined;\n }\n return {\n DimensionTypeValue: productDimensionType,\n DimensionValue: {\n RecordId: 0,\n Value: value\n }\n };\n};\n\n/**\n * Retrieves all dimensions from URL.\n * @param urlParameters - Url parameters.\n * @returns Product dimensions stored in url.\n */\nconst parseDimensionsFromUrl = (urlParameters: URLSearchParams): ProductDimension[] => {\n const dimensionsToParse: ProductDimensionType[] = [\n ProductDimensionType.Color,\n ProductDimensionType.Configuration,\n ProductDimensionType.Size,\n ProductDimensionType.Style\n ];\n const parsedDimensions = dimensionsToParse.map(dimension => parseDimensionFromUrl(urlParameters, dimension));\n return ArrayExtensions.validValues(parsedDimensions);\n};\n\n/**\n * Utility function to extract the dimension values from input url querystring.\n * @param inputUrl - The request url.\n * @returns The selected dimension values.\n */\nexport const getDimensionValuesFromQuery = (inputUrl: URL): ProductDimension[] => {\n const urlWithIgnoredCase = new URL(inputUrl.toString().toLocaleLowerCase());\n const urlParameters = urlWithIgnoredCase.searchParams;\n const dimensions: ProductDimension[] = parseDimensionsFromUrl(urlParameters);\n return dimensions;\n};\n\n/**\n * Get attribute values by channel inventory configuration.\n * @param attributeValues - The attributeValues.\n * @param channelInventoryConfiguration - The channelInventoryConfiguration.\n * @returns The attributeValues filter by channel inventory configuration.\n */\nexport const getAttributeValuesByConfiguration = (\n attributeValues: AttributeValue[] | null,\n channelInventoryConfiguration: ChannelInventoryConfiguration | null\n): AttributeValue[] => {\n if (!attributeValues) {\n return [];\n }\n if (!channelInventoryConfiguration) {\n return attributeValues;\n }\n\n return attributeValues.filter(\n attribute =>\n attribute.RecordId !== channelInventoryConfiguration.InventoryProductAttributeRecordId &&\n attribute.RecordId !== channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId\n );\n};\n\n/**\n * Utility function to remove domain querystring parameter from url.\n * @param inputUrl - The request url.\n * @returns The yrl after dropping domain querystring.\n */\nexport const removeDomainQspFromUrl = (inputUrl: string, requestContext: IRequestContext): string => {\n if (requestContext?.features && requestContext.features.remove_domain_qsp) {\n const Url = new URL(inputUrl);\n const urlParams: URLSearchParams = new URLSearchParams(Url.search);\n if (urlParams.has('domain')) {\n urlParams.delete('domain');\n }\n Url.search = urlParams.toString();\n return Url.toString();\n }\n return inputUrl;\n};\n","'use strict';\n// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';\n","'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar classof = require('../internals/classof');\nvar tryToString = require('../internals/try-to-string');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar TypeError = global.TypeError;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\nvar TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQUIRED = false;\nvar NAME, Constructor, Prototype;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || hasOwn(TypedArrayConstructorsList, klass)\n || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar getTypedArrayConstructor = function (it) {\n var proto = getPrototypeOf(it);\n if (!isObject(proto)) return;\n var state = getInternalState(proto);\n return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return hasOwn(TypedArrayConstructorsList, klass)\n || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw new TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;\n throw new TypeError(tryToString(C) + ' is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced, options) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {\n delete TypedArrayConstructor.prototype[KEY];\n } catch (error) {\n // old WebKit bug - some methods are non-configurable\n try {\n TypedArrayConstructor.prototype[KEY] = property;\n } catch (error2) { /* empty */ }\n }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n defineBuiltIn(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {\n delete TypedArrayConstructor[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n defineBuiltIn(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n else NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\nfor (NAME in BigIntArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw new TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQUIRED = true;\n defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG, {\n configurable: true,\n get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n }\n });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n getTypedArrayConstructor: getTypedArrayConstructor,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.fill` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = lengthOfArrayLike(O);\n var argumentsLength = arguments.length;\n var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n var end = argumentsLength > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\n\nvar $TypeError = TypeError;\n\n// `ToBigInt` abstract operation\n// https://tc39.es/ecma262/#sec-tobigint\nmodule.exports = function (argument) {\n var prim = toPrimitive(argument, 'number');\n if (typeof prim == 'number') throw new $TypeError(\"Can't convert number to bigint\");\n // eslint-disable-next-line es/no-bigint -- safe\n return BigInt(prim);\n};\n","'use strict';\nvar toPositiveInteger = require('../internals/to-positive-integer');\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it, BYTES) {\n var offset = toPositiveInteger(it);\n if (offset % BYTES) throw new $RangeError('Wrong offset');\n return offset;\n};\n","'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it) {\n var result = toIntegerOrInfinity(it);\n if (result < 0) throw new $RangeError(\"The argument can't be less than 0\");\n return result;\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $fill = require('../internals/array-fill');\nvar toBigInt = require('../internals/to-big-int');\nvar classof = require('../internals/classof');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar slice = uncurryThis(''.slice);\n\n// V8 ~ Chrome < 59, Safari < 14.1, FF < 55, Edge <=18\nvar CONVERSION_BUG = fails(function () {\n var count = 0;\n // eslint-disable-next-line es/no-typed-arrays -- safe\n new Int8Array(2).fill({ valueOf: function () { return count++; } });\n return count !== 1;\n});\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n var length = arguments.length;\n aTypedArray(this);\n var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value;\n return call($fill, this, actualValue, length > 1 ? arguments[1] : undefined, length > 2 ? arguments[2] : undefined);\n}, CONVERSION_BUG);\n","'use strict';\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toOffset = require('../internals/to-offset');\nvar toIndexedObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar RangeError = global.RangeError;\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar $set = Int8ArrayPrototype && Int8ArrayPrototype.set;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS = !fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n var array = new Uint8ClampedArray(2);\n call($set, array, { length: 1, 0: 3 }, 1);\n return array[1] !== 3;\n});\n\n// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other\nvar TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {\n var array = new Int8Array(2);\n array.set(1);\n array.set('2', 1);\n return array[0] !== 0 || array[1] !== 2;\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var src = toIndexedObject(arrayLike);\n if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);\n var length = this.length;\n var len = lengthOfArrayLike(src);\n var index = 0;\n if (len + offset > length) throw new RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, !WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);\n","'use strict';\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar fails = require('../internals/fails');\nvar aCallable = require('../internals/a-callable');\nvar internalSort = require('../internals/array-sort');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = global.Uint16Array;\nvar nativeSort = Uint16Array && uncurryThis(Uint16Array.prototype.sort);\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !(fails(function () {\n nativeSort(new Uint16Array(2), null);\n}) && fails(function () {\n nativeSort(new Uint16Array(2), {});\n}));\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 74;\n if (FF) return FF < 67;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 602;\n\n var array = new Uint16Array(516);\n var expected = Array(516);\n var index, mod;\n\n for (index = 0; index < 516; index++) {\n mod = index % 4;\n array[index] = 515 - index;\n expected[index] = index - 2 * mod + 3;\n }\n\n nativeSort(array, function (a, b) {\n return (a / 4 | 0) - (b / 4 | 0);\n });\n\n for (index = 0; index < 516; index++) {\n if (array[index] !== expected[index]) return true;\n }\n});\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (y !== y) return -1;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (x !== x) return 1;\n if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;\n return x > y;\n };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n if (STABLE_SORT) return nativeSort(this, comparefn);\n\n return internalSort(aTypedArray(this), getSortCompare(comparefn));\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n","'use strict';\nvar global = require('../internals/global');\nvar apply = require('../internals/function-apply');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\nvar arraySlice = require('../internals/array-slice');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() !== new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return apply(\n $toLocaleString,\n TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this),\n arraySlice(arguments)\n );\n}, FORCED);\n"],"names":["GetCustomerInput","constructor","apiSettings","accountNumber","cacheType","getCacheKey","buildCacheKey","this","customerAccountNumber","getCacheObjectType","dataCacheType","getCustomerActionDataAction","createObservableDataAction","id","action","async","input","ctx","requestContext","user","isAuthenticated","CustomersDataActions","callerContext","bypassCache","then","response","Array","isArray","trace","inputData","token","Error","QueryResultSettingsProxy","queryResultSettings","config","fromModuleData","sortingCriteria","undefined","query","top","skip","Paging","Skip","Number","Top","itemsPerPage","Sorting","_config$itemsPerPage","_inputData$requestCon","_inputData$requestCon2","parseInt","app","platform","defaultPageSizeForAPI","Columns","map","column","ColumnName","IsDescending","join","ArrayExtensions","hasElements","value","ObjectExtensions","isNullOrUndefined","length","validValues","filter","item","firstOrDefault","values","defaultValue","unique","from","Set","all","predicate","flatten","result","arrayLine","concat","equals","firstArray","secondArray","comparator","JSON","stringify","index","haveSameItems","arguments","valueFromFirstArray","valueFromSecondArray","some","otherItem","calculateSum","data","reverse","array","newArray","push","EnumExtensions","StringExtensions","getValues","enumClass","Object","keys","getNumericValues","isNumber","getNames","isString","getEnumValues","isNullOrEmpty","isNullOrWhitespace","trim","isFunction","parseSearchData","q","channelId","maxItems","fromInputData","QueryResultSettings","getSelectedProductIdFromActionInput","_context$query","context","productId","urlTokens","itemId","pageType","generateImageUrl","imageUrl","generateImageUrlFromSdk","DimensionTypes","DimensionSwatchDisplayTypes","checkIfShouldDisplayAsSwatch","dimensionType","displayType","default","productCard","dimensionsToDisplayOnProductCard","dimensionsInProductCard","includes","none","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","generateSwatchImageUrl","startsWith","baseImageUrl","encodeURIComponent","generateProductImageUrl","product","PrimaryImageUrl","buildWishlistLine","customerId","wishlistId","CommerceListId","ProductId","CustomerId","getProductDetailsCriteriaFromActionInput","getPrice","hidePrice","getRating","hideRating","base","locale","catalogId","buildCacheKeyWithUrlTokens","defaultCacheKey","recordId","generateKey","args","options","handler","separator","_objectSpread","arg","getFallbackImageUrl","parsedItemId","split","convertProductDimensionTypeToDimensionTypes","productDimensionType","ProductDimensionType","Color","color","Configuration","configuration","Size","size","Style","style","convertDimensionTypeToProductDimensionType","None","setDimensionValuesToQuery","inputUrl","productDimensions","dimension","_dimension$DimensionV","dimensionValue","DimensionValue","Value","searchParams","set","DimensionTypeValue","msdyn365Commerce","isBrowser","window","history","replaceState","state","toString","replace","host","location","parseDimensionsFromUrl","urlParameters","parsedDimensions","parseDimensionFromUrl","localDimensionType","get","RecordId","getDimensionValuesFromQuery","URL","toLocaleLowerCase","getAttributeValuesByConfiguration","attributeValues","channelInventoryConfiguration","attribute","InventoryProductAttributeRecordId","ProductAvailabilitySortableAttributeRecordId","removeDomainQspFromUrl","features","remove_domain_qsp","Url","urlParams","URLSearchParams","search","has","delete","module","exports","ArrayBuffer","DataView","NAME","Constructor","Prototype","NATIVE_ARRAY_BUFFER","DESCRIPTORS","global","isCallable","isObject","hasOwn","classof","tryToString","createNonEnumerableProperty","defineBuiltIn","defineBuiltInAccessor","isPrototypeOf","getPrototypeOf","setPrototypeOf","wellKnownSymbol","uid","InternalStateModule","enforceInternalState","enforce","getInternalState","Int8Array","Int8ArrayPrototype","prototype","Uint8ClampedArray","Uint8ClampedArrayPrototype","TypedArray","TypedArrayPrototype","ObjectPrototype","TypeError","TO_STRING_TAG","TYPED_ARRAY_TAG","TYPED_ARRAY_CONSTRUCTOR","NATIVE_ARRAY_BUFFER_VIEWS","opera","TYPED_ARRAY_TAG_REQUIRED","TypedArrayConstructorsList","Uint8Array","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigIntArrayConstructorsList","BigInt64Array","BigUint64Array","getTypedArrayConstructor","it","proto","isTypedArray","klass","Function","configurable","aTypedArray","aTypedArrayConstructor","C","exportTypedArrayMethod","KEY","property","forced","ARRAY","TypedArrayConstructor","error","error2","exportTypedArrayStaticMethod","isView","toObject","toAbsoluteIndex","lengthOfArrayLike","O","argumentsLength","end","endPos","toPrimitive","$TypeError","argument","prim","BigInt","toPositiveInteger","$RangeError","RangeError","BYTES","offset","toIntegerOrInfinity","ArrayBufferViewCore","$fill","toBigInt","call","uncurryThis","fails","slice","actualValue","count","fill","valueOf","toOffset","toIndexedObject","$set","WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS","0","TO_OBJECT_BUG","arrayLike","src","len","aCallable","internalSort","FF","IE_OR_EDGE","V8","WEBKIT","nativeSort","sort","ACCEPT_INCORRECT_ARGUMENTS","STABLE_SORT","mod","expected","a","b","comparefn","x","y","getSortCompare","apply","arraySlice","$toLocaleString","toLocaleString","TO_LOCALE_STRING_BUG"],"sourceRoot":""}