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commerce/./src/common/buybox-product-configure.tsx?139c","webpack://nss-commerce/./src/common/buyboxInterface.ts?9d60","webpack://nss-commerce/./src/common/dropdown/dropdown.tsx?f1d3","webpack://nss-commerce/./src/common/dropdown/dropdown.props.ts?7676","webpack://nss-commerce/./src/common/utilities/error-utilities.ts?bb69","webpack://nss-commerce/./src/modules/buybox/components/buybox-find-in-store.tsx?3ef8","webpack://nss-commerce/./src/modules/buybox/buybox.tsx?e22d","webpack://nss-commerce/./src/modules/buybox/buybox.view.tsx?376b","webpack://nss-commerce/./src/modules/quickview/utilities/helper.ts?f31d","webpack://nss-commerce/./src/modules/quickview/utilities/get-valid-product-images.ts?78b7","webpack://nss-commerce/./src/modules/quickview/quickview.tsx?4080","webpack://nss-commerce/./src/modules/quickview/utilities/get-product-details.ts?5cc2","webpack://nss-commerce/./src/modules/quickview/quickview.view.tsx?ee5b","webpack://nss-commerce/./src/modules/recently-viewed/base/recently-viewed-product-item.ts?4982","webpack://nss-commerce/./src/modules/recently-viewed/base/recently-viewed-item.ts?54c9","webpack://nss-commerce/./src/modules/recently-viewed/recently-viewed-state.ts?c73b","webpack://nss-commerce/./src/modules/recently-viewed/recently-viewed-manager.ts?a2a8"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductDimensionsWithAvailabilitiesFull } from '@msdyn365-commerce/commerce-entities';\nimport { ProductDimensionsMatrix } from '@msdyn365-commerce/components';\nimport { RichTextComponent } from '@msdyn365-commerce/core';\nimport { ICoreContext, getCatalogId } from '@msdyn365-commerce/core-internal';\nimport { ArrayExtensions, IDimensionsApp, validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, Collapse, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { FeatureState } from '@msdyn365-commerce/retail-proxy';\nimport { IBulkPurchaseData } from './bulk-purchase.data';\nimport { IBulkPurchaseProps } from './bulk-purchase.props.autogenerated';\n\n/**\n * Additional optional props for the bulk purchase.\n */\nexport interface IBulkPurchaseExtendedProps extends IBulkPurchaseProps<IBulkPurchaseData> {\n    productDimensions?: IProductDimensionsWithAvailabilitiesFull[];\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseViewProps extends IBulkPurchaseProps<IBulkPurchaseData> {\n    container: IModuleProps;\n    content: React.ReactElement;\n}\n\n/**\n * BulkPurchase state message Interface.\n */\nexport interface IBulkPurchaseStateMessage {\n    isOpen: boolean;\n    messageGlyph: string;\n    messageText: string;\n    statusCssString: string;\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseState {\n    isExpanded: boolean;\n    stateMessage?: IBulkPurchaseStateMessage;\n}\n\n/**\n * Bulk-purchase module.\n */\nexport class BulkPurchase extends React.PureComponent<IBulkPurchaseExtendedProps, IBulkPurchaseState> {\n    public static readonly className = 'ms-bulk-purchase';\n    private readonly _errorCssClass: string = 'danger';\n    private readonly _errorCssGlyphClass: string = 'fas fa-exclamation-triangle';\n    private readonly collapseRef: React.RefObject<Collapse> = React.createRef<Collapse>();\n\n    public constructor(props: IBulkPurchaseExtendedProps) {\n        super(props);\n\n        this.state = {\n            isExpanded: false\n        };\n    }\n\n    public render(): React.ReactElement | null {\n        const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n        const hasDimensionsInData = ArrayExtensions.hasElements(this.props.data.productDimensions?.result);\n        if (!hasDimensionsInProps && !hasDimensionsInData) {\n            return null;\n        }\n\n        const viewProps: IBulkPurchaseViewProps = {\n            ...this.props,\n            container: {\n                moduleProps: this.props,\n                className: classnames(BulkPurchase.className, this.props.config.className)\n            },\n            content: this._renderCollapseContent(`${BulkPurchase.className}__content`)\n        };\n\n        return this.props.renderView(viewProps) as React.ReactElement;\n    }\n\n    private _renderCollapseContent(className: string): React.ReactElement {\n        return (\n            <div className={className}>\n                {this._renderCollapseButton(`${className}__collapse-button`)}\n                {this._renderCollapse(`${className}__collapse`)}\n            </div>\n        );\n    }\n\n    private _renderCollapseButton(className: string): React.ReactElement {\n        return (\n            <Button\n                className={className}\n                onClick={this._toggleCollapse}\n                aria-expanded={this.state.isExpanded}\n                title={this.props.resources.bulkPurchaseHeaderTitle}\n            >\n                {this.props.resources.bulkPurchaseHeaderTitle}\n            </Button>\n        );\n    }\n\n    /**\n     *This function is being used to handel variant change dropdown.\n     */\n    private _dimensionDropDownChange = () => {\n        this.collapseRef.current?.reEvaluateHeight();\n    };\n\n    private _renderCollapse(className: string): React.ReactElement {\n        return (\n            <Collapse className={className} isOpen={this.state.isExpanded} ref={this.collapseRef}>\n                {this._renderMainContent(`${className}__main-content`)}\n            </Collapse>\n        );\n    }\n\n    private _renderMainContent(className: string): React.ReactElement {\n        const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n\n        const userMessageNode = this.state.stateMessage ? (\n            <Alert color={this.state.stateMessage.statusCssString} isOpen={this.state.stateMessage.isOpen}>\n                <span className={this.state.stateMessage.messageGlyph} />\n                <span>{this.state.stateMessage.messageText}</span>\n            </Alert>\n        ) : (\n            undefined\n        );\n\n        return (\n            <div className={className}>\n                {!isMobileDevice && (\n                    <div className={`${className}__description`}>\n                        <RichTextComponent text={this.props.resources.bulkPurchaseDescriptionText} />\n                    </div>\n                )}\n                {userMessageNode}\n                {this._renderMatrix(`${className}__matrix-container`)}\n            </div>\n        );\n    }\n\n    private _renderMatrix(className: string): React.ReactElement {\n        const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n        const channelMultipleCatalogsFeature = 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature';\n        const { featureState } = this.props.data;\n        const isMultipleCatalogsFeatureEnabled =\n            featureState?.result?.find((item: FeatureState) => item.Name === channelMultipleCatalogsFeature)?.IsEnabled || false;\n        const catalogId = getCatalogId(this.props.context.request);\n        validateCatalogId(catalogId);\n        return (\n            <ProductDimensionsMatrix\n                className={className}\n                context={this.props.context as ICoreContext<IDimensionsApp>}\n                data={{\n                    dimensions: hasDimensionsInProps ? this.props.productDimensions! : this.props.data.productDimensions!.result!,\n                    orderTemplates: this.props.data.orderTemplates?.result,\n                    customerInformation: this.props.data.customerInformation?.result\n                }}\n                resources={this.props.resources}\n                dimensionOnChange={this._dimensionDropDownChange}\n                onErrorMessage={this._onErrorMessage}\n                isMultipleCatalogFeatureEnabledInHq={isMultipleCatalogsFeatureEnabled}\n                catalogId={catalogId}\n            />\n        );\n    }\n\n    private _onErrorMessage = (errorMessage: string) => {\n        this.setState({\n            stateMessage: {\n                messageText: errorMessage,\n                statusCssString: this._errorCssClass,\n                messageGlyph: this._errorCssGlyphClass,\n                isOpen: true\n            }\n        });\n    };\n\n    /**\n     * Callback which toggles collapse mode.\n     */\n    private readonly _toggleCollapse = () => {\n        this.setState(state => ({\n            isExpanded: !state.isExpanded\n        }));\n    };\n}\n\nexport default BulkPurchase;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n    AddToCartComponent,\n    AddToOrderTemplateComponent,\n    AddToWishlistComponent,\n    IAddToCartFailureResult,\n    IAddToCartResources,\n    IAddToOrderTemplateDialogResources,\n    IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n    IItemAddedToOrderTemplateDialogResources,\n    IOrderTemplateActionErrorResult,\n    IOrderTemplateNameDialogResources,\n    IWishlistActionErrorResult,\n    PriceComponent,\n    RatingComponent\n} from '@msdyn365-commerce/components';\nimport { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\nimport { ICartActionResult, ICartState } from '@msdyn365-commerce/global-state';\nimport { ProductAvailableQuantity, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, DeliveryMode, validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n    Alert,\n    Button,\n    format,\n    getPayloadObject,\n    getTelemetryAttributes,\n    getTelemetryObject,\n    Heading,\n    ITelemetryContent,\n    Node,\n    Quantity,\n    TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n    IBuyboxAddToCartViewProps,\n    IBuyboxAddToOrderTemplateViewProps,\n    IBuyboxAddToWishlistViewProps,\n    IBuyboxCallbacks,\n    IBuyboxCommonData,\n    IBuyboxCommonResources,\n    IBuyboxErrorBlockProps,\n    IBuyboxExtentedProps,\n    IBuyboxKeyInPriceViewProps,\n    IBuyboxProductQuantityViewProps,\n    IBuyboxShopSimilarLookViewProps,\n    IBuyboxState,\n    IProductDetails,\n    ShopSimiliarButtonType\n} from './buyboxInterface';\nimport { getConfigureErrors, getGenericError, getQuantityError } from './utilities/error-utilities';\n\nconst _getClassNamePrefix = (typeName: string): string => {\n    return typeName.toLocaleLowerCase() === 'quickview' ? 'ms-quickView' : 'ms-buybox';\n};\n\nexport function getBuyBoxInventoryLabel(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    productDetails?: IProductDetails\n): React.ReactElement | undefined {\n    const { typeName } = props;\n\n    // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n    const productAvailableQuantity = props.data.productAvailableQuantity?.result ?? productDetails?.productAvailableQuantity;\n\n    const className = _getClassNamePrefix(typeName);\n    if (!productAvailableQuantity || !ArrayExtensions.hasElements(productAvailableQuantity)) {\n        return undefined;\n    }\n    const shippingInventory = productAvailableQuantity.find(shipping => shipping.deliveryType === DeliveryMode.shipping);\n\n    if (shippingInventory) {\n        let inventoryClassName: string;\n        if (shippingInventory.StockLevelCode) {\n            inventoryClassName = `${className}__inventory-label ${className}__inventory-code-${shippingInventory.StockLevelCode.toLowerCase()}`;\n        } else {\n            inventoryClassName = `${className}__inventory-label`;\n        }\n        return (\n            <div className={`${className}__inventory-info`}>\n                <span className={inventoryClassName}>{shippingInventory.StockLevelLabel}</span>\n            </div>\n        );\n    }\n\n    return undefined;\n}\n\nexport function getBuyboxProductTitle(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    productDetails?: IProductDetails\n): React.ReactElement | undefined {\n    const {\n        config: { titleHeadingTag = 'h1' },\n        typeName\n    } = props;\n    const className = _getClassNamePrefix(typeName);\n\n    // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n    const product = props.data.product?.result ?? productDetails?.product ?? undefined;\n\n    return product && <Heading className={`${className}__product-title`} headingTag={titleHeadingTag} text={product.Name ?? ''} />;\n}\n\nexport function getBuyboxProductDescription(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    productDetails?: IProductDetails\n): React.ReactElement | undefined {\n    const { typeName } = props;\n    const className = _getClassNamePrefix(typeName);\n\n    // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n    const product = props.data.product?.result ?? productDetails?.product ?? undefined;\n\n    return product && <p className={`${className}__product-description`}>{product.Description}</p>;\n}\n\n/**\n * Gets the react node for product unit of measure display.\n * @param {IBuyboxExtentedProps<IBuyboxCommonData>} props The buybox module props.\n * @param {IProductDetails} productDetails The product details to be displyed in buybox.\n * @returns {React.ReactElement} The node representing markup for unit of measure component.\n */\nexport function getBuyboxProductUnitOfMeasure(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    productDetails?: IProductDetails\n): React.ReactElement | undefined {\n    const { typeName } = props;\n    const className = _getClassNamePrefix(typeName);\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for appsettings\n    if (\n        props.context.app.config &&\n        (!props.context.app.config.unitOfMeasureDisplayType || props.context.app.config.unitOfMeasureDisplayType === 'none')\n    ) {\n        return undefined;\n    }\n\n    // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n    const product = props.data.product?.result ?? productDetails?.product;\n    if (!product || !product.DefaultUnitOfMeasure) {\n        props.telemetry.warning('Missing defult unit of measureor theproduct');\n        return undefined;\n    }\n\n    return (\n        <div className={`${className}__product-unit-of-measure`}>\n            <span>{product.DefaultUnitOfMeasure}</span>\n        </div>\n    );\n}\n\nlet telemetryContent: ITelemetryContent;\n\n/**\n * On add to cart failed function.\n * @param props -The buybox module props.\n * @param state -The buybox module state.\n * @param callbacks -The buybox module callbacks.\n * @param defaultMinimumKeyInPrice -The default minimum key in price.\n * @param defaultMaximumKeyInPrice -The default maximum key in price.\n * @param cart -The cart state.\n * @param product -The simple product.\n * @param productAvailability -The product available quantity.\n * @returns Update error state.\n */\nconst onAddToCartFailed = (\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    state: IBuyboxState,\n    callbacks: IBuyboxCallbacks,\n    defaultMinimumKeyInPrice: number,\n    defaultMaximumKeyInPrice: number,\n    cart: ICartState,\n    product: SimpleProduct,\n    productAvailability: ProductAvailableQuantity | undefined\n) => (result: IAddToCartFailureResult) => {\n    let quantityErrorForState: string | undefined;\n    let customAmountErrorForState: string | undefined;\n    let otherErrorForState: string | undefined = getGenericError(\n        result,\n        cart,\n        props.resources,\n        props.context,\n        product,\n        productAvailability,\n        undefined\n    );\n\n    if (result.failureReason === 'OUTOFSTOCK') {\n        quantityErrorForState = result.failureReason === 'OUTOFSTOCK' ? getQuantityError(result.stockLeft, props.resources) : undefined;\n    } else if (\n        result.failureReason === 'CARTACTIONFAILED' &&\n        result.cartActionResult &&\n        (result.cartActionResult.substatus === 'MAXQUANTITY' || result.cartActionResult.substatus === 'QUANTITYLIMITS')\n    ) {\n        quantityErrorForState = getGenericError(result, cart, props.resources, props.context, product, productAvailability, undefined);\n        otherErrorForState = undefined; // Prevent error duplication in otherError and quantityError\n    }\n\n    if (result.failureReason === 'INVALIDCUSTOMAMOUNT') {\n        if (state.keyInPriceAmount === undefined || state.keyInPriceAmount < (props.config.minimumKeyInPrice || defaultMinimumKeyInPrice)) {\n            const formatedAmountLimit = props.context.cultureFormatter.formatCurrency(\n                props.config.minimumKeyInPrice || defaultMinimumKeyInPrice\n            );\n            customAmountErrorForState = props.resources.invalidSmallCustomAmountText.replace('{minAmount}', formatedAmountLimit);\n        } else if (state.keyInPriceAmount > (props.config.maximumKeyInPrice || defaultMaximumKeyInPrice)) {\n            const formatedAmountLimit = props.context.cultureFormatter.formatCurrency(\n                props.config.maximumKeyInPrice || defaultMaximumKeyInPrice\n            );\n            customAmountErrorForState = props.resources.invalidLargeCustomAmountText.replace('{maxAmount}', formatedAmountLimit);\n        }\n    }\n\n    callbacks.updateErrorState({\n        errorHost: 'ADDTOCART',\n        quantityError: quantityErrorForState,\n        configureErrors:\n            result.failureReason === 'MISSINGDIMENSION'\n                ? getConfigureErrors(result.missingDimensions, props.resources, product?.IsGiftCard)\n                : {},\n        customAmountError: customAmountErrorForState,\n        otherError: otherErrorForState\n    });\n};\n\n/**\n * On Item Add To Cart function.\n * @param typeName -Type name.\n * @param callbacks -Buybox Callbacks.\n * @returns Change modal open.\n */\nconst onItemAddedToCart = (typeName: string, callbacks: IBuyboxCallbacks) => (result: ICartActionResult) => {\n    if (typeName === 'quickview') {\n        callbacks.changeModalOpen(false);\n    }\n};\n\nexport function getBuyboxAddToCart(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    state: IBuyboxState,\n    callbacks: IBuyboxCallbacks,\n    defaultMinimumKeyInPrice: number,\n    defaultMaximumKeyInPrice: number,\n    productDetails?: IProductDetails,\n    hasAvailableProducts?: boolean\n): IBuyboxAddToCartViewProps {\n    const { id, typeName, context, resources } = props;\n\n    // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n    const product = props.data.product?.result ?? productDetails?.product;\n\n    // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n    const cart = props.data.cart?.result ?? productDetails?.cart;\n\n    // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n    const productAvailableQuantity = props.data.productAvailableQuantity?.result ?? productDetails?.productAvailableQuantity;\n\n    const {\n        quantity,\n        errorState: { configureErrors, quantityError, customAmountError, otherError, errorHost },\n        selectedProduct,\n        isUpdatingDimension,\n        isUpdatingDeliveryOptions,\n        isServiceItem\n    } = state;\n\n    const productAvailability = state.productAvailableQuantity\n        ? state.productAvailableQuantity.ProductAvailableQuantity\n        : productAvailableQuantity && productAvailableQuantity.length > 0\n        ? productAvailableQuantity[0].ProductAvailableQuantity\n        : undefined;\n\n    const dialogStrings: IAddToCartResources = {\n        goToCartText: resources.buyBoxGoToCartText,\n        continueShoppingText: resources.buyBoxContinueShoppingText,\n        closeNotificationLabel: resources.closeNotificationLabel,\n        headerItemOneText: resources.buyBoxSingleItemText,\n        headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\n        headerMessageText: resources.buyBoxHeaderMessageText,\n        freePriceText: resources.priceFree,\n        originalPriceText: resources.originalPriceText,\n        currentPriceText: resources.currentPriceText,\n        addedQuantityText: resources.addedQuantityText\n    };\n\n    const defaultImageSettings: IImageSettings = {\n        viewports: {\n            xs: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n            lg: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n            xl: { q: 'w=240&h=240&m=6', w: 0, h: 0 }\n        },\n        lazyload: true\n    };\n\n    const isProductQuantityLoading = typeName !== 'quickview' && props.data.productAvailableQuantity.status === 'LOADING';\n    if (isProductQuantityLoading) {\n        callbacks.changeUpdatingDimension(false);\n    }\n\n    const isLoadingDeliveryOptions = typeName !== 'quickview' && props.data.deliveryOptions?.status === 'LOADING';\n    if (isLoadingDeliveryOptions && callbacks.changeUpdatingDeliveryOptions) {\n        callbacks.changeUpdatingDeliveryOptions(false);\n    }\n\n    telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.typeName, props.telemetry);\n\n    // Check if the product delivery mode is electronic\n    const emailDeliveryModeCode = props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\n    // from quickview we are not getting deliveryoptions in props.data hence getting it from quickview state\n    const deliveryOptions = typeName === 'quickview' ? state.productDeliveryOptions : props.data.deliveryOptions?.result;\n    const isEmailDelivery =\n        ArrayExtensions.hasElements(deliveryOptions?.DeliveryOptions) && deliveryOptions!.DeliveryOptions[0].Code === emailDeliveryModeCode;\n    const className = _getClassNamePrefix(typeName);\n    const isDisabled = isUpdatingDimension && typeName === 'quickview';\n    const { enableHidePdpRepeatingErrors } = props.context.request.features;\n    return {\n        ContainerProps: {\n            className: `${className}__add-to-cart-container`\n        },\n        button: product && (\n            <AddToCartComponent\n                addToCartText={resources.addToCartText}\n                outOfStockText={resources.outOfStockText}\n                navigationUrl={getUrlSync('cart', context.actionContext)}\n                quantity={quantity}\n                data={{ product, price: state.productPrice }}\n                context={context}\n                disabled={isDisabled}\n                id={id}\n                hasAvailableProducts={hasAvailableProducts}\n                typeName={typeName}\n                onError={onAddToCartFailed(\n                    props,\n                    state,\n                    callbacks,\n                    defaultMinimumKeyInPrice,\n                    defaultMaximumKeyInPrice,\n                    cart!,\n                    product,\n                    productAvailability\n                )}\n                getSelectedProduct={selectedProduct}\n                productAvailability={productAvailability}\n                isProductQuantityLoading={isProductQuantityLoading}\n                isUpdatingDimension={isUpdatingDimension}\n                changeUpdatingDimension={callbacks.changeUpdatingDimension}\n                isLoadingDeliveryOptions={isLoadingDeliveryOptions}\n                isUpdatingDeliveryOptions={isUpdatingDeliveryOptions}\n                changeUpdatingDeliveryOptions={callbacks.changeUpdatingDeliveryOptions}\n                dialogStrings={dialogStrings}\n                gridSettings={props.context.request.gridSettings}\n                imageSettings={defaultImageSettings}\n                telemetryContent={telemetryContent}\n                isAddServiceItemToCart={isServiceItem}\n                isPriceKeyedIn={state.isPriceKeyedIn}\n                customPriceAmount={state.keyInPriceAmount}\n                isCustomPriceSelected={state.isCustomPriceSelected}\n                maximumKeyInPrice={props.config.maximumKeyInPrice}\n                minimumKeyInPrice={props.config.minimumKeyInPrice}\n                defaultMinimumKeyInPrice={defaultMinimumKeyInPrice}\n                defaultMaximumKeyInPrice={defaultMaximumKeyInPrice}\n                isOrderQuantityLimitsFeatureEnabled={_isOrderQuantityLimitsFeatureEnabled(props) || _isChannelLimitsFeatureEnabled(props)}\n                isAddEmailDeliveryItemToCart={isEmailDelivery}\n                onAdd={onItemAddedToCart(typeName, callbacks)}\n                isNavigationToCartPageDisabled={typeName === 'quickview'}\n            />\n        ),\n        errorBlock: (\n            <BuyboxErrorBlock\n                configureErrors={configureErrors}\n                quantityError={quantityError}\n                customAmountError={customAmountError}\n                otherError={otherError}\n                resources={resources}\n                showError={errorHost === 'ADDTOCART'}\n                enableHidePdpRepeatingErrors={enableHidePdpRepeatingErrors}\n            />\n        )\n    };\n}\n\n/**\n * Get the React.ReactElement contains price.\n * @param props - The IBuyboxExtentedProps.\n * @param state - The buybox state.\n * @returns The React.ReactElement.\n */\nexport function getBuyboxProductPrice(props: IBuyboxExtentedProps<IBuyboxCommonData>, state: IBuyboxState): React.ReactElement | undefined {\n    const { id, typeName, context, resources } = props;\n\n    return (\n        state.productPrice && (\n            <PriceComponent\n                id={id}\n                typeName={typeName}\n                context={context}\n                data={{ price: state.productPrice }}\n                product={props.data.product?.result}\n                isPriceMinMaxEnabled={\n                    props.data.featureState.result?.find(\n                        featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n                    )?.IsEnabled\n                }\n                isSalesAgreementPriceFeatureEnabled={\n                    props.data.featureState.result?.find(\n                        featureState => featureState.Name === 'Dynamics.AX.Application.RetailSalesAgreementPriceSupportFeature'\n                    )?.IsEnabled\n                }\n                priceResources={{\n                    priceRangeSeparator: resources.priceRangeSeparator,\n                    salesAgreementPricePrompt: resources.salesAgreementPricePrompt,\n                    salesAgreementExpirationDatePrompt: resources.salesAgreementExpirationDatePrompt,\n                    salesAgreementCommittedQuantityPrompt: resources.salesAgreementCommittedQuantityPrompt,\n                    salesAgreementRemainingQuantityPrompt: resources.salesAgreementRemainingQuantityPrompt\n                }}\n                freePriceText={resources.priceFree}\n                originalPriceText={resources.originalPriceText}\n                currentPriceText={resources.currentPriceText}\n            />\n        )\n    );\n}\n\nexport function getBuyboxProductRating(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    productDetails?: IProductDetails\n): React.ReactElement | undefined {\n    const { id, typeName, context, resources } = props;\n\n    // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n    const ratingsSummary = props.data.ratingsSummary?.result ?? productDetails?.ratingsSummary;\n    if (!ratingsSummary || !ratingsSummary.averageRating) {\n        return <div />;\n    }\n    const ratingComponent = (\n        <RatingComponent\n            avgRating={ratingsSummary.averageRating || 0}\n            readOnly\n            ariaLabel={format(resources.averageRatingAriaLabel, ratingsSummary.averageRating, '5')}\n            ratingCount={`${ratingsSummary.reviewsCount}`}\n            data={{}}\n            context={context}\n            id={id}\n            typeName={typeName}\n        />\n    );\n\n    return ratingComponent;\n}\n\nfunction generateAddToOrderTemplateDialogResources(resources: IBuyboxCommonResources): IAddToOrderTemplateDialogResources {\n    return {\n        addToOrderTemplateHeader: resources.addToOrderTemplateHeader,\n\n        noOrderTemplatesMessage: resources.noOrderTemplatesMessage,\n        noOrderTemplatesDescription: resources.noOrderTemplatesDescription,\n\n        createAnOrderTemplateButtonText: resources.createAnOrderTemplateButtonText,\n        createNewOrderTemplateButtonText: resources.createNewOrderTemplateButtonText,\n        cancelOrderTemplateCreationButtonText: resources.cancelOrderTemplateCreationButtonText,\n\n        selectTemplatesText: resources.selectTemplatesText,\n        addToTemplateButtonText: resources.addToTemplateButtonText,\n        lineItemsText: resources.lineItemsText\n    };\n}\n\nfunction generateOrderTemplateNameDialogResources(resources: IBuyboxCommonResources): IOrderTemplateNameDialogResources {\n    return {\n        orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\n        orderTemplateTitleLabel: resources.orderTemplateTitle,\n        orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\n        orderTemplateDescription: resources.createOrderTemplateDescription,\n\n        defaultOrderTemplateName: resources.defaultOrderTemplateName,\n\n        orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\n        orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\n    };\n}\n\nfunction generateItemAddedToOrderTemplateDialogResources(resources: IBuyboxCommonResources): IItemAddedToOrderTemplateDialogResources {\n    return {\n        viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\n        continueShoppingButtonText: resources.continueShoppingButtonText,\n        itemAddedToOrderTemplateHeaderItemOneText: resources.itemAddedToOrderTemplateHeaderItemOneText,\n        itemAddedToOrderTemplateHeaderItemFormatText: resources.itemAddedToOrderTemplateHeaderItemFormatText,\n        itemAddedToOrderTemplateHeaderMessageText: resources.itemAddedToOrderTemplateHeaderMessageText,\n        freePriceText: resources.priceFree,\n        originalPriceText: resources.originalPriceText,\n        currentPriceText: resources.currentPriceText\n    };\n}\n\nfunction generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\n    resources: IBuyboxCommonResources\n): IDuplicateItemsWhenAddingToOrderTemplateDialogResources {\n    return {\n        duplicatedProductsHeader: resources.duplicatedProductsHeader,\n        duplicatedProductsDescription: resources.duplicatedProductsDescription,\n        updateQuantityButtonText: resources.updateQuantityButtonText,\n        cancelDuplicateItemsButtonText: resources.cancelDuplicateItemsButtonText\n    };\n}\n\n/**\n * Add to order template failed function.\n * @param callbacks -Buybox callbacks.\n * @param resources -Buybox common resources.\n * @param product -Simple product.\n * @returns Update error state.\n */\nconst onAddToOrderTemplateFailed = (callbacks: IBuyboxCallbacks, resources: IBuyboxCommonResources, product: SimpleProduct | undefined) => (\n    result: IOrderTemplateActionErrorResult\n) => {\n    callbacks.updateErrorState({\n        errorHost: 'ORDER_TEMPLATE',\n        configureErrors:\n            result.status === 'MISSING_DIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {}\n    });\n};\n\nexport function getBuyboxProductAddToOrderTemplate(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    state: IBuyboxState,\n    callbacks: IBuyboxCallbacks,\n    isMultipleCatalogsFeatureEnabled?: boolean,\n    catalogId?: number\n): IBuyboxAddToOrderTemplateViewProps | undefined {\n    const {\n        id,\n        typeName,\n        context,\n        data: {\n            orderTemplates: { result: orderTemplates },\n            customerInformation: { result: customerInformation }\n        },\n        resources\n    } = props;\n\n    const product = props.data.product?.result;\n\n    const {\n        errorState: { configureErrors, quantityError, customAmountError, otherError, errorHost },\n        quantity\n    } = state;\n\n    // If custom amount is selected, add-to-orderTemplate is disabled\n    if (state.isCustomPriceSelected) {\n        return undefined;\n    }\n    const className = _getClassNamePrefix(typeName);\n    const { enableHidePdpRepeatingErrors } = props.context.request.features;\n\n    return {\n        ContainerProps: {\n            className: `${className}__add-to-order-template-container`\n        },\n        button: product && orderTemplates && (\n            <AddToOrderTemplateComponent\n                className='msc-add-to-cart-extra-actions'\n                addToOrderTemplateButtonText={resources.addToOrderTemplateButtonText}\n                addToOrderTemplateButtonTooltip={resources.addToOrderTemplateButtonTooltip}\n                addToOrderTemplateDialogResources={generateAddToOrderTemplateDialogResources(resources)}\n                createOrderTemplateDialogResources={generateOrderTemplateNameDialogResources(resources)}\n                itemAddedToOrderTemplateDialogResources={generateItemAddedToOrderTemplateDialogResources(resources)}\n                duplicateItemsWhenAddingToOrderTemplateDialogResources={generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\n                    resources\n                )}\n                data={{ product, quantity, orderTemplates, customerInformation }}\n                context={context}\n                id={id}\n                typeName={typeName}\n                onError={onAddToOrderTemplateFailed(callbacks, resources, product)}\n                shouldShowButtonFailedTooltip={state.isCustomPriceSelected}\n                isMultipleCatalogFeatureEnabledInHq={isMultipleCatalogsFeatureEnabled}\n                {...(isMultipleCatalogsFeatureEnabled && { catalogId: catalogId })}\n            />\n        ),\n        errorBlock: (\n            <BuyboxErrorBlock\n                configureErrors={configureErrors}\n                quantityError={quantityError}\n                customAmountError={customAmountError}\n                otherError={otherError}\n                resources={resources}\n                showError={errorHost === 'ORDER_TEMPLATE'}\n                enableHidePdpRepeatingErrors={enableHidePdpRepeatingErrors}\n            />\n        )\n    };\n}\n\n/**\n * Renders add to comparison button for the given product.\n * @param productComparisonButton - React element of the button.\n * @param product - Product information.\n * @param catalogId - Current catalog.\n * @param state - Buybox state.\n * @returns React element of the button.\n */\nexport function getBuyboxProductComparisonButton(\n    productComparisonButton: React.ReactNode,\n    product: SimpleProduct,\n    catalogId: number,\n    state: IBuyboxState\n): JSX.Element | undefined {\n    if (state.isCustomPriceSelected) {\n        return undefined;\n    }\n\n    validateCatalogId(catalogId);\n    return React.cloneElement(productComparisonButton as React.ReactElement, { product, catalogId });\n}\n\n/**\n * Add to wishlist failed function.\n * @param callbacks -Buybox callbacks.\n * @param resources -Buybox resources.\n * @param product -Simple product.\n * @returns Update error state.\n */\nconst onAddToWishlistFailed = (callbacks: IBuyboxCallbacks, resources: IBuyboxCommonResources, product: SimpleProduct | undefined) => (\n    result: IWishlistActionErrorResult\n) => {\n    callbacks.updateErrorState({\n        errorHost: 'WISHLIST',\n        configureErrors:\n            result.status === 'MISSINGDIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {}\n    });\n};\n\nexport function getBuyboxProductAddToWishlist(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    state: IBuyboxState,\n    callbacks: IBuyboxCallbacks,\n    productDetails?: IProductDetails\n): IBuyboxAddToWishlistViewProps | undefined {\n    const {\n        id,\n        typeName,\n        context,\n        data: {\n            wishlists: { result: wishlists }\n        },\n        resources\n    } = props;\n\n    const product = props.data.product?.result ? props.data.product.result : productDetails?.product;\n\n    const {\n        errorState: { configureErrors, quantityError, customAmountError, otherError, errorHost },\n        selectedProduct\n    } = state;\n\n    // If custom amount is selected, add-to-wishlist is disabled\n    if (state.isCustomPriceSelected) {\n        return undefined;\n    }\n\n    const className = _getClassNamePrefix(typeName);\n    const { enableHidePdpRepeatingErrors } = props.context.request.features;\n    return {\n        ContainerProps: {\n            className: `${className}__add-to-wishlist-container`\n        },\n        button: product && (\n            <AddToWishlistComponent\n                className='msc-add-to-cart-extra-actions'\n                addToWishlistButtonText={resources.addToWishlistButtonText}\n                removeFromWishlistButtonText={resources.removeFromWishlistButtonText}\n                addToWishlistMessage={resources.addToWishlistMessage}\n                removedFromWishlistMessage={resources.removedFromWishlistMessage}\n                addItemToWishlistError={resources.addItemToWishlistError}\n                removeItemFromWishlistError={resources.removeItemFromWishlistError}\n                nameOfWishlist={resources.nameOfWishlist}\n                data={{ product, wishlists }}\n                context={context}\n                id={id}\n                ariaRole='button'\n                typeName={typeName}\n                onError={onAddToWishlistFailed(callbacks, resources, product)}\n                getSelectedProduct={selectedProduct}\n            />\n        ),\n        errorBlock: (\n            <BuyboxErrorBlock\n                configureErrors={configureErrors}\n                quantityError={quantityError}\n                customAmountError={customAmountError}\n                otherError={otherError}\n                resources={resources}\n                showError={errorHost === 'WISHLIST'}\n                enableHidePdpRepeatingErrors={enableHidePdpRepeatingErrors}\n            />\n        )\n    };\n}\n\n/**\n * On quantity change function.\n * @param callbacks -Buybox callbacks.\n * @returns Update quantity.\n */\nconst onQuantityChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number) => {\n    if (callbacks.updateQuantity) {\n        callbacks.updateQuantity(newValue);\n    }\n};\n\nexport function getBuyboxProductQuantity(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    state: IBuyboxState,\n    callbacks: IBuyboxCallbacks\n): IBuyboxProductQuantityViewProps {\n    const { resources, typeName } = props;\n\n    const {\n        quantity,\n        min,\n        max,\n        errorState: { quantityError }\n    } = state;\n\n    const className = _getClassNamePrefix(typeName);\n\n    return {\n        ContainerProps: {\n            className: `${className}__quantity`\n        },\n        LabelContainerProps: {\n            tag: 'label',\n            className: `${className}__product-quantity-label`,\n            htmlFor: `${className}__product-quantity-input`\n        },\n        heading: <div className={`${className}__product-quantity-label-heading`}>{resources.productQuantityHeading}</div>,\n        errors: quantityError && (\n            <span className='msc-alert msc-alert-noborder msc-alert-danger'>\n                <span className='msi-exclamation-triangle' aria-hidden='true' />\n                <span>{quantityError}</span>\n            </span>\n        ),\n        input: (\n            <Quantity\n                id={`${className}__product-quantity-input`}\n                min={min}\n                max={max}\n                currentCount={quantity}\n                onChange={onQuantityChangeHandler(callbacks)}\n                inputQuantityAriaLabel={resources.inputQuantityAriaLabel}\n                telemetryContent={telemetryContent}\n            />\n        )\n    };\n}\n\nexport function getBuyboxShopSimilarButton(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    buttonType: ShopSimiliarButtonType\n): IBuyboxShopSimilarLookViewProps {\n    const { resources, context, typeName } = props;\n    const product = props.data.product?.result;\n\n    const className = _getClassNamePrefix(typeName);\n    const navigationUrl = (shopSimiliarButtonType: ShopSimiliarButtonType) => () => {\n        const searchURL = getUrlSync('search', context && context.actionContext);\n        const separator = searchURL!.includes('?') ? '&' : '?';\n        document.location.href = `${searchURL}${separator}productId=${product &&\n            product.RecordId}&recommendation=${shopSimiliarButtonType}`;\n    };\n    const telemetryText =\n        buttonType === ShopSimiliarButtonType.Looks ? TelemetryConstant.ShopSimliarLooks : TelemetryConstant.ShopSimliarDescription;\n    const payLoad = getPayloadObject('click', telemetryContent, telemetryText);\n    const attribute = getTelemetryAttributes(telemetryContent, payLoad);\n    const text = buttonType === ShopSimiliarButtonType.Looks ? resources.shopSimilarLooksText : resources.shopSimilarDescriptionText;\n\n    return {\n        ContainerProps: {\n            className: `${className}__shopsimilar${buttonType}`\n        },\n        input: (\n            <Button\n                title={text}\n                className={`${className}__shop-similar-${buttonType}-button`}\n                aria-label={text}\n                onClick={navigationUrl(buttonType)}\n                {...attribute}\n            >\n                {text}\n            </Button>\n        )\n    };\n}\n\n/**\n * On price change function.\n * @param callbacks -Buybox callbacks.\n * @returns Update key in price.\n */\nconst onPriceChangeHandler = (callbacks: IBuyboxCallbacks) => (event: React.ChangeEvent<HTMLInputElement>) => {\n    const value = event.currentTarget.value;\n    callbacks.updateKeyInPrice(value.length > 0 ? Number(value) : Number.parseFloat(value));\n};\n\nexport function getBuyboxKeyInPrice(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    state: IBuyboxState,\n    callbacks: IBuyboxCallbacks\n): IBuyboxKeyInPriceViewProps {\n    const { config, resources } = props;\n\n    const {\n        errorState: {}\n    } = state;\n\n    const className = _getClassNamePrefix(props.typeName);\n\n    return {\n        ContainerProps: {\n            className: `${className}__key_in_price`\n        },\n        LabelContainerProps: {\n            tag: 'label',\n            className: `${className}__key_in_price-label`,\n            htmlFor: `${className}__key_in_price`\n        },\n        heading: <div className={`${className}__key_in_price-label-heading`}>{resources.buyboxKeyInPriceLabelHeading}</div>,\n        input: (\n            <input\n                type='number'\n                className={`${className}__key_in_price_custom-amount__input`}\n                onChange={onPriceChangeHandler(callbacks)}\n                aria-label={resources.buyboxKeyInPriceLabelHeading}\n                aria-valuemin={config.minimumKeyInPrice}\n                aria-valuemax={config.minimumKeyInPrice}\n                aria-valuenow={state.keyInPriceAmount}\n                value={state.keyInPriceAmount}\n                min={config.minimumKeyInPrice}\n                max={config.minimumKeyInPrice}\n            />\n        )\n    };\n}\n\nexport const BuyboxErrorBlock: React.FC<IBuyboxErrorBlockProps> = ({\n    showError,\n    configureErrors,\n    quantityError,\n    customAmountError,\n    otherError,\n    resources,\n    enableHidePdpRepeatingErrors\n}) => {\n    let errorMessages: (string | undefined)[] = [];\n\n    // skip configuration repeating errors when flight is enabled\n    if (!enableHidePdpRepeatingErrors) {\n        errorMessages = Object.values(configureErrors).filter(message => message !== undefined);\n    }\n\n    // skip quantity repeating errors when flight is enabled\n    if (quantityError && !enableHidePdpRepeatingErrors) {\n        errorMessages.push(quantityError);\n    }\n\n    if (customAmountError) {\n        errorMessages.push(customAmountError);\n    }\n\n    if (otherError) {\n        errorMessages.push(otherError);\n    }\n\n    return (\n        <Alert isOpen={showError && errorMessages.length > 0} color='danger' assertive aria-label={resources.buyboxErrorMessageHeader}>\n            <div className='msc-alert__header' aria-hidden='true'>\n                <span className='msi-exclamation-triangle' />\n                <span>{resources.buyboxErrorMessageHeader}</span>\n            </div>\n            {errorMessages.map((message, index) => {\n                return (\n                    <div key={index} className='msc-alert__line'>\n                        {message}\n                    </div>\n                );\n            })}\n        </Alert>\n    );\n};\n\nexport function getQuantityLimitsMessages(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    state: IBuyboxState\n): React.ReactElement | undefined {\n    const { resources } = props;\n\n    const { min, max } = state;\n\n    if (!_isOrderQuantityLimitsFeatureEnabled(props) && !_isChannelLimitsFeatureEnabled(props)) {\n        return undefined;\n    }\n\n    return (\n        <Node className='quantity_text_message'>\n            {_renderMaxLabel(props, max, resources.maxQuantityText)}\n            {_renderMinLabel(props, min, resources.minQuantityText)}\n        </Node>\n    );\n}\n\nexport const RetailDefaultOrderQuantityLimitsFeatureName: string = 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature';\nexport const EcommerceQuantityLimitConfigurationsFeatureName: string =\n    'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature';\nexport const RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName: string = 'RevertToSiteBuilderOrderQuantityLimitsSettings';\n\nconst _renderMaxLabel = (\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    max: number | undefined,\n    maxQuantityText: string\n): React.ReactElement | undefined => {\n    const { resources, typeName } = props;\n    const className = _getClassNamePrefix(typeName);\n    if (max && max !== 0 && max !== Number.MAX_VALUE) {\n        return (\n            <p className={`${className}__minmax_label_text`}>\n                <span className='sr-only'>{resources.informationIconText}</span>\n                <i className='msi-InfoCircle' aria-hidden='true' />\n                {maxQuantityText.replace('{max}', max.toString())}\n            </p>\n        );\n    }\n    return undefined;\n};\n\nconst _renderMinLabel = (\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    min: number | undefined,\n    minQuantityText: string\n): JSX.Element | undefined => {\n    const { resources, typeName } = props;\n    const className = _getClassNamePrefix(typeName);\n    if (min && min > 1) {\n        return (\n            <p className={`${className}__minmax_label_text`}>\n                <span className='sr-only'>{resources.informationIconText}</span>\n                <i className='msi-InfoCircle' aria-hidden='true' />\n                {minQuantityText.replace('{min}', min.toString())}\n            </p>\n        );\n    }\n    return undefined;\n};\n\nconst _isOrderQuantityLimitsFeatureEnabled = (props: IBuyboxExtentedProps<IBuyboxCommonData>): boolean | undefined => {\n    const featureStatuses = props.data.featureState.result;\n\n    const isFeatureEnabledInHq = featureStatuses?.find(featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName)\n        ?.IsEnabled;\n    if (!isFeatureEnabledInHq) {\n        return false;\n    }\n\n    const useSiteBuilderSettings = featureStatuses?.find(\n        featureState => featureState.Name === RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName\n    )?.IsEnabled;\n\n    if (useSiteBuilderSettings) {\n        const defaultOrderQuantityLimitsFeatureConfig = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n        if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n            return false;\n        }\n\n        if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n            return true;\n        }\n\n        const customerInfo = props.data.customerInformation.result;\n        return (\n            customerInfo &&\n            ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n                (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\n        );\n    } else {\n        const cartConfiguration = props.data.cartConfiguration?.result;\n        return !(cartConfiguration?.IgnoreOrderSettings ?? false);\n    }\n};\n\nconst _isChannelLimitsFeatureEnabled = (props: IBuyboxExtentedProps<IBuyboxCommonData>): boolean => {\n    const featureStatuses = props.data.featureState.result;\n\n    const isChannelLimitsFeatureEnabledInHq = featureStatuses?.find(\n        featureState => featureState.Name === EcommerceQuantityLimitConfigurationsFeatureName\n    )?.IsEnabled;\n\n    return isChannelLimitsFeatureEnabledInHq ?? false;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICoreContext } from '@msdyn365-commerce/core-internal';\nimport { ProductDimension, ProductDimensionType } from '@msdyn365-commerce/retail-proxy';\nimport {\n    ArrayExtensions,\n    convertProductDimensionTypeToDimensionTypes,\n    DimensionTypes,\n    getDimensionValuesFromQuery,\n    getInventoryLevelCodeFromDimensionValue,\n    IDimensionForSelectedVariant,\n    IDimensionsApp,\n    IDimensionValueForSelectedVariant,\n    InventoryLevelValues,\n    ObjectExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { format, getTelemetryObject, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n    IBuyboxCallbacks,\n    IBuyboxCommonData,\n    IBuyboxCommonResources,\n    IBuyboxExtentedProps,\n    IBuyboxProductConfigureDropdownViewProps,\n    IBuyboxProductConfigureViewProps,\n    IBuyboxState,\n    IProductDetails\n} from './buyboxInterface';\nimport {\n    Dropdown,\n    IDropdownItemProps,\n    IDropdownOnInitializeNotification,\n    IDropdownOnSelectionChangeNotification,\n    SelectionType\n} from './dropdown';\n\nlet telemetryContent: ITelemetryContent;\n\n/**\n * Dimension pre-processing info.\n */\ninterface IProductDimensionInfo {\n    dropdownName: string;\n    dropdownId: string;\n    dropdownList: IDropdownItemProps[];\n}\n\n/**\n * Props for rendering a dropdown.\n */\ninterface IProductDimensionDropdownProps extends IProductDimensionInfo {\n    resources: IBuyboxCommonResources;\n    className: string;\n    context: ICoreContext<IDimensionsApp>;\n\n    configureErrors: { [configureId: string]: string | undefined };\n\n    getDropdownName(dimensionType: number, resources: IBuyboxCommonResources): string;\n    dropdownCallback(notification: IDropdownOnSelectionChangeNotification): Promise<void>;\n    initializeCallback(notification: IDropdownOnInitializeNotification): void;\n}\n\nconst mapProductDimensionFullToDropdownViewProps = (props: IProductDimensionDropdownProps): IBuyboxProductConfigureDropdownViewProps => {\n    const dimensionId = Number.parseInt(props.dropdownId, 10) as ProductDimensionType;\n    const dropdownToggleName = format(props.resources.selectDimensionFormatString, props.dropdownName);\n\n    const errorMessage = props.configureErrors[props.dropdownId];\n\n    let dimensionSelectionType = SelectionType.dropdown;\n\n    const dimensionType = convertProductDimensionTypeToDimensionTypes(dimensionId);\n\n    const dimensionsAsSwatchConfiguration = props.context.app.config.dimensionsAsSwatchType;\n    if (\n        ArrayExtensions.hasElements(dimensionsAsSwatchConfiguration) &&\n        !dimensionsAsSwatchConfiguration.includes(DimensionTypes.none) &&\n        dimensionsAsSwatchConfiguration.includes(dimensionType)\n    ) {\n        dimensionSelectionType = SelectionType.swatch;\n    }\n\n    return {\n        ContainerProps: {\n            className: `${props.className}__dropdown`\n        },\n        LabelContainerProps: {\n            tag: 'label',\n            className: `${props.className}__dropdown-quantity-label`,\n            htmlFor: `${props.className}__dropown-quantity-input-${props.dropdownId}`\n        },\n        errors: errorMessage && (\n            <span className='msc-alert msc-alert-noborder msc-alert-danger' role='alert' aria-live='assertive'>\n                <span className='msi-exclamation-triangle' aria-hidden='true' />\n                <span>{errorMessage}</span>\n            </span>\n        ),\n        heading: <div>{props.dropdownName}</div>,\n        select: (\n            <Dropdown\n                dropdownId={props.dropdownId}\n                dropdownName={props.dropdownName}\n                dropdownToggleName={dropdownToggleName}\n                dropdownList={props.dropdownList}\n                onChange={props.dropdownCallback}\n                onInitialize={props.initializeCallback}\n                telemetryContent={telemetryContent}\n                selectionType={dimensionSelectionType}\n                apiSettings={props.context.request.apiSettings}\n            />\n        )\n    };\n};\n\nexport function getBuyboxProductConfigure(\n    props: IBuyboxExtentedProps<IBuyboxCommonData>,\n    state: IBuyboxState,\n    callbacks: IBuyboxCallbacks,\n    productDetails?: IProductDetails,\n    selectedDimensions?: ProductDimension[]\n): IBuyboxProductConfigureViewProps | undefined {\n    const { resources, typeName } = props;\n\n    const {\n        errorState: { configureErrors }\n    } = state;\n\n    const { getDropdownName } = callbacks;\n\n    const context = props.context as ICoreContext<IDimensionsApp>;\n\n    // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n    const product = props.data.product?.result ? props.data.product.result : productDetails?.product;\n\n    // Since the data action can return no value, and the type is non-nullable due to backward compatibility reasons, the null check is required.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n    const productDimensionsData = props.data.productDimensions?.result ?? productDetails?.productDimensions;\n\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access -- app context is generic\n    const enableStockCheck = props.context.app.config.enableStockCheck;\n\n    const hasProductDimensions = ArrayExtensions.hasElements(productDimensionsData);\n\n    if (!product || !hasProductDimensions) {\n        return undefined;\n    }\n\n    const className = _getClassNamePrefix(typeName);\n\n    const onChanged = async (notification: IDropdownOnSelectionChangeNotification) =>\n        _onChanged(notification, callbacks.dimensionSelectedAsync);\n\n    const onInitializedDimension = async (notification: IDropdownOnInitializeNotification) =>\n        _onInitializedDimension(notification, callbacks.initializeDimension);\n\n    telemetryContent = getTelemetryObject(context.request.telemetryPageName!, props.typeName, props.telemetry);\n\n    const inventoryLevel = context.app.config.inventoryLevel;\n\n    let dimensionsInfo: IProductDimensionInfo[] = [];\n\n    const productDimensions = productDimensionsData as IDimensionForSelectedVariant[];\n\n    dimensionsInfo = productDimensions.map(productDimensionFull => {\n        const dropdownName = getDropdownName(productDimensionFull.DimensionTypeValue, resources);\n        const dropdownId = productDimensionFull.DimensionTypeValue.toString();\n\n        const dimensions = (productDimensionFull.dimensionValuesWithInventory ??\n            productDimensionFull.DimensionValues ??\n            []) as IDimensionValueForSelectedVariant[];\n        const validProductDimensionsFull = dimensions.filter(\n            value => !ObjectExtensions.isNullOrUndefined(value.DimensionValue?.RecordId ?? value.RecordId)\n        );\n\n        const dropdownList: IDropdownItemProps[] = validProductDimensionsFull.map<IDropdownItemProps>(dimensionValuesWithInventory => {\n            const dimensionValue = dimensionValuesWithInventory.DimensionValue ?? dimensionValuesWithInventory;\n            const inventoryLevelCode = getInventoryLevelCodeFromDimensionValue(dimensionValuesWithInventory, inventoryLevel);\n            return {\n                value: dimensionValue.Value ?? '',\n                id: dimensionValue.RecordId.toString(),\n                colorHexCode: dimensionValue.ColorHexCode,\n                imageUrl: dimensionValue.ImageUrl,\n                isDisabled: enableStockCheck && inventoryLevelCode === InventoryLevelValues.outOfStock,\n                swatchItemAriaLabel: resources.swatchItemAriaLabel ? resources.swatchItemAriaLabel : ''\n            };\n        });\n        return {\n            dropdownName,\n            dropdownId,\n            dropdownList\n        };\n    });\n\n    const matchedDimensions = selectedDimensions ?? getDimensionValuesFromQuery(context.request.url.requestUrl);\n    for (const dimensionInfo of dimensionsInfo) {\n        const currentDimensionsFromQuery = matchedDimensions.filter(\n            dimensionFromQuery => dimensionFromQuery.DimensionTypeValue.toString() === dimensionInfo.dropdownId\n        );\n        if (!ArrayExtensions.hasElements(currentDimensionsFromQuery)) {\n            continue;\n        }\n        const currentDimensionFromQuery = currentDimensionsFromQuery[0];\n        const selectedDimensionItem = dimensionInfo.dropdownList.filter(\n            dimensionItem =>\n                dimensionItem.value.toLocaleLowerCase() === currentDimensionFromQuery.DimensionValue?.Value?.toLocaleLowerCase()\n        );\n        if (!ArrayExtensions.hasElements(selectedDimensionItem)) {\n            continue;\n        }\n        selectedDimensionItem[0].isDefault = true;\n    }\n\n    const dropdowns: IBuyboxProductConfigureDropdownViewProps[] = dimensionsInfo.map(dimensionInfo => {\n        return mapProductDimensionFullToDropdownViewProps({\n            ...dimensionInfo,\n            resources,\n            configureErrors,\n            getDropdownName,\n            dropdownCallback: onChanged,\n            initializeCallback: onInitializedDimension,\n            className,\n            context\n        });\n    });\n\n    return {\n        ContainerProps: {\n            className: `${className}__configure`\n        },\n        dropdowns\n    };\n}\n\nconst _onChanged = async (\n    notification: IDropdownOnSelectionChangeNotification,\n    dimensionChanged: (newValue: number, selectedDimensionValue: string, initializedDimension?: string) => Promise<void>\n): Promise<void> => {\n    await dimensionChanged(+notification.dropdownId, notification.selectId);\n};\n\nconst _onInitializedDimension = (\n    notification: IDropdownOnInitializeNotification,\n    initializeDimension?: (initializedDimension: string | undefined) => void\n): void => {\n    if (initializeDimension) {\n        initializeDimension(notification.initializedDimension);\n    }\n};\n\nconst _getClassNamePrefix = (typeName: string): string => {\n    return typeName.toLocaleLowerCase() === 'quickview' ? 'ms-quickView' : 'ms-buybox';\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProductDimensionFull, RatingsSummary } from '@msdyn365-commerce/commerce-entities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport {\n    AsyncResult,\n    CommerceList,\n    Customer,\n    FeatureState,\n    ProductDeliveryOptions,\n    ProductPrice,\n    SimpleProduct,\n    CartConfiguration\n} from '@msdyn365-commerce/retail-proxy';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\nimport {\n    IDimensionForSelectedVariant,\n    IProductInventoryInformation,\n    ISelectedProduct,\n    OrderTemplate\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\n\nexport interface IBuyboxState {\n    quantity: number;\n    min: number | undefined;\n    max: number | undefined;\n    errorState: IErrorState;\n    selectedProduct?: Promise<SimpleProduct | null>;\n    productAvailableQuantity?: IProductInventoryInformation;\n    productPrice?: ProductPrice;\n    productDeliveryOptions?: ProductDeliveryOptions;\n    modalOpen?: boolean;\n    isUpdatingDimension?: boolean;\n    isUpdatingDeliveryOptions?: boolean;\n    isServiceItem?: boolean;\n    isPriceKeyedIn?: boolean;\n    keyInPriceAmount?: number;\n    isCustomPriceSelected?: boolean;\n    activeIndex?: number;\n    animating?: boolean;\n    lastUpdate?: number;\n    mediaGalleryItems?: Msdyn365.IImageData[] | undefined;\n    isPriceApiCalled?: boolean;\n}\n\nexport interface IBuyboxCommonData {\n    deliveryOptions: AsyncResult<ProductDeliveryOptions | undefined> | undefined;\n    product: AsyncResult<SimpleProduct>;\n    productDimensions: AsyncResult<ProductDimensionFull[]>;\n    productPrice: AsyncResult<ProductPrice>;\n    ratingsSummary: AsyncResult<RatingsSummary>;\n    storeSelectorStateManager: AsyncResult<IStoreSelectorStateManager>;\n    wishlists: AsyncResult<CommerceList[]>;\n    orderTemplates: AsyncResult<OrderTemplate[]>;\n    cart: AsyncResult<ICartState>;\n    productAvailableQuantity: AsyncResult<IProductInventoryInformation[]>;\n    customerInformation: AsyncResult<Customer>;\n    featureState: AsyncResult<FeatureState[]>;\n    cartConfiguration?: AsyncResult<CartConfiguration>;\n}\nexport declare type IBuyboxErrorHost = 'ADDTOCART' | 'FINDINSTORE' | 'WISHLIST' | 'SHOPSIMILARITEM' | 'ORDER_TEMPLATE';\n\nexport interface IErrorState {\n    errorHost?: IBuyboxErrorHost;\n    configureErrors: { [configureId: string]: string | undefined };\n    quantityError?: string;\n    customAmountError?: string;\n    otherError?: string;\n}\n\nexport interface IBuyboxAddToCartViewProps {\n    ContainerProps: INodeProps;\n    errorBlock?: React.ReactNode;\n    button?: React.ReactNode;\n}\n\nexport interface IBuyboxAddToOrderTemplateViewProps {\n    ContainerProps: INodeProps;\n    errorBlock?: React.ReactNode;\n    button?: React.ReactNode;\n}\n\nexport interface IBuyboxProductQuantityViewProps {\n    ContainerProps: INodeProps;\n    LabelContainerProps: INodeProps;\n\n    heading: React.ReactNode;\n    errors?: React.ReactNode;\n\n    input: React.ReactNode;\n}\n\nexport interface IBuyboxAddToWishlistViewProps {\n    ContainerProps: INodeProps;\n    errorBlock?: React.ReactNode;\n    button?: React.ReactNode;\n}\n\nexport interface IBuyboxShopSimilarLookViewProps {\n    ContainerProps: INodeProps;\n    errors?: React.ReactNode;\n    input: React.ReactNode;\n}\n\nexport enum ShopSimiliarButtonType {\n    Looks = 'looks',\n    Description = 'descriptions'\n}\n\nexport interface IBuyboxKeyInPriceViewProps {\n    ContainerProps: INodeProps;\n    LabelContainerProps: INodeProps;\n    heading: React.ReactNode;\n    input: React.ReactNode;\n}\n\nexport interface IBuyboxErrorBlockProps {\n    configureErrors: { [configureId: string]: string | undefined };\n    quantityError?: string;\n    customAmountError?: string;\n    otherError?: string;\n    resources: IBuyboxCommonResources;\n    showError: boolean;\n    enableHidePdpRepeatingErrors?: boolean;\n}\n\nexport interface IBuyboxProductConfigureProps {\n    product: SimpleProduct;\n    productDimensions: ProductDimensionFull[];\n    resources: IBuyboxCommonResources;\n    channelId: number;\n    actionContext: Msdyn365.IActionContext;\n    errors: { [configureId: string]: string | undefined };\n\n    dimensionChanged?(newValue: number): void;\n}\n\nexport interface IBuyboxProductConfigureDropdownViewProps {\n    ContainerProps: INodeProps;\n    LabelContainerProps: INodeProps;\n\n    heading: React.ReactNode;\n    errors?: React.ReactNode;\n\n    select: React.ReactNode;\n}\n\nexport interface IBuyboxProductConfigureViewProps {\n    ContainerProps: INodeProps;\n\n    dropdowns: IBuyboxProductConfigureDropdownViewProps[];\n}\n\nexport interface IBuyboxCallbacks {\n    updateQuantity(newQuantity: number): boolean;\n    updateKeyInPrice(keyInPrice: number): void;\n    updateErrorState(newErrorState: IErrorState): void;\n    updateSelectedProduct(\n        selectedProduct: Promise<SimpleProduct | null>,\n        newInventory: IProductInventoryInformation | undefined,\n        newPrice: ProductPrice | undefined,\n        newDeliveryOptions: ProductDeliveryOptions | undefined\n    ): void;\n    getDropdownName(dimensionType: number, resources: IBuyboxCommonResources): string;\n    dimensionSelectedAsync(selectedDimensionId: number, selectedDimensionValueId: string): Promise<void>;\n    changeModalOpen(isModalOpen: boolean): void;\n    changeUpdatingDimension(isUpdatingDimension: boolean): void;\n    changeUpdatingDeliveryOptions?(isUpdatingDeliveryOptions: boolean): void;\n\n    initializeDimension?(initializedDimension: string | undefined): void;\n}\n\nexport interface IBuyboxExtentedProps<T> extends Msdyn365.IModule<T> {\n    resources: IBuyboxCommonResources;\n    config: IBuyboxCommonConfig;\n    slots: {};\n}\n\nexport interface IBuyboxCommonConfig {\n    titleHeadingTag?: titleHeadingTag;\n    className?: string;\n    enableShopSimilarLooks?: boolean;\n    enableShopSimilarDescription?: boolean;\n    enableKeyInPrice?: boolean;\n    minimumKeyInPrice?: number;\n    maximumKeyInPrice?: number;\n}\n\nexport interface IProductDetails {\n    product?: ISelectedProduct | null;\n    productPrice?: ProductPrice | null;\n    ratingsSummary?: RatingsSummary;\n    productAvailableQuantity?: IProductInventoryInformation[];\n    cart?: ICartState | undefined;\n    productDimensions?: IDimensionForSelectedVariant[] | null;\n}\n\nexport enum titleHeadingTag {\n    h1 = 'h1',\n    h2 = 'h2',\n    h3 = 'h3',\n    h4 = 'h4',\n    h5 = 'h5',\n    h6 = 'h6'\n}\n\nexport interface IBuyboxCommonResources {\n    priceFree: string;\n    invalidSmallCustomAmountText: string;\n    invalidLargeCustomAmountText: string;\n    buyBoxGoToCartText: string;\n    buyBoxContinueShoppingText: string;\n    closeNotificationLabel: string;\n    buyBoxSingleItemText: string;\n    buyBoxMultiLineItemFormatText: string;\n    buyBoxHeaderMessageText: string;\n    originalPriceText: string;\n    currentPriceText: string;\n    addedQuantityText: string;\n    addToCartText: string;\n    outOfStockText: string;\n    averageRatingAriaLabel: string;\n    addToOrderTemplateHeader: string;\n    noOrderTemplatesMessage: string;\n    noOrderTemplatesDescription: string;\n    createAnOrderTemplateButtonText: string;\n    createNewOrderTemplateButtonText: string;\n    cancelOrderTemplateCreationButtonText: string;\n    selectTemplatesText: string;\n    addToTemplateButtonText: string;\n    lineItemsText: string;\n    createOrderTemplateHeader: string;\n    orderTemplateTitle: string;\n    orderTemplateNameAriaLabel: string;\n    createOrderTemplateDescription: string;\n    defaultOrderTemplateName: string;\n    createOrderTemplateButtonText: string;\n    cancelNewOrderTemplateCreationButtonText: string;\n    viewOrderTemplateButtonText: string;\n    continueShoppingButtonText: string;\n    itemAddedToOrderTemplateHeaderItemOneText: string;\n    itemAddedToOrderTemplateHeaderItemFormatText: string;\n    itemAddedToOrderTemplateHeaderMessageText: string;\n    duplicatedProductsHeader: string;\n    duplicatedProductsDescription: string;\n    updateQuantityButtonText: string;\n    cancelDuplicateItemsButtonText: string;\n    addToWishlistButtonText: string;\n    removeFromWishlistButtonText: string;\n    addToWishlistMessage: string;\n    removedFromWishlistMessage: string;\n    addItemToWishlistError: string;\n    removeItemFromWishlistError: string;\n    nameOfWishlist: string;\n    productQuantityHeading: string;\n    inputQuantityAriaLabel: string;\n    buyboxKeyInPriceLabelHeading: string;\n    buyboxErrorMessageHeader: string;\n    maxQuantityText: string;\n    minQuantityText: string;\n    selectDimensionFormatString: string;\n    errorMessageOutOfStock: string;\n    errorMessageOutOfRangeOneLeft: string;\n    errorMessageOutOfRangeFormat: string;\n    addToOrderTemplateButtonText: string;\n    addedToCartFailureMessage: string;\n    maxQuantityLimitText: string;\n    productDimensionTypeColorErrorMessage: string;\n    productDimensionTypeConfigurationErrorMessage: string;\n    productDimensionTypeSizeErrorMessage: string;\n    productDimensionTypeAmountErrorMessage: string;\n    productDimensionTypeStyleErrorMessage: string;\n    shopSimilarLooksText?: string;\n    shopSimilarDescriptionText?: string;\n    addToOrderTemplateButtonTooltip: string;\n    loadingText?: string;\n    informationIconText?: string;\n    priceRangeSeparator?: string;\n    swatchItemAriaLabel?: string;\n    salesAgreementPricePrompt?: string;\n    salesAgreementExpirationDatePrompt?: string;\n    salesAgreementCommittedQuantityPrompt?: string;\n    salesAgreementRemainingQuantityPrompt?: string;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ISwatchItem, SwatchComponent } from '@msdyn365-commerce/components';\nimport { DimensionTypes } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IDropdownItemProps, IDropdownProps, SelectionType } from './dropdown.props';\n\n/**\n * State for a dropdown component.\n */\ninterface IDropdownState {\n    /**\n     * @friendlyName selectedIndex\n     * @description Selected index.\n     */\n    selectedIndex: string;\n}\n\n/**\n *\n * DropDown component.\n * @extends {React.PureComponent<IDropdownProps, IDropdownState>}\n */\nexport class Dropdown extends React.PureComponent<IDropdownProps, IDropdownState> {\n    private readonly selectMenu: React.RefObject<HTMLSelectElement> = React.createRef<HTMLSelectElement>();\n\n    private readonly payLoad: IPayLoad;\n\n    public constructor(props: IDropdownProps, state: IDropdownState) {\n        super(props);\n\n        if (this.props.onInitialize) {\n            this.props.onInitialize({\n                initializedDimension: this.props.dropdownId\n            });\n        }\n\n        const selectedItem = this.props.dropdownList.find(item => item.isDefault);\n        if (selectedItem) {\n            this.state = {\n                selectedIndex: selectedItem.id.toString()\n            };\n            if (this.props.onChange) {\n                // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Update for default.\n                this.props.onChange({\n                    dropdownId: this.props.dropdownId,\n                    selectId: selectedItem.id,\n                    selectedValue: selectedItem.value\n                });\n            }\n        } else {\n            this.state = {\n                selectedIndex: ''\n            };\n        }\n        this.payLoad = getPayloadObject('click', props.telemetryContent!, this.props.dropdownName);\n    }\n\n    public render(): JSX.Element {\n        if (this.props.apiSettings && this.props.selectionType === SelectionType.swatch) {\n            return this._renderSwatch();\n        }\n\n        return this._renderDropdown();\n    }\n\n    private _renderDropdown(): JSX.Element {\n        const { dropdownId, dropdownList, dropdownName, dropdownToggleName } = this.props;\n        const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n        return (\n            <select\n                id={`msc-dropdown__entry-${dropdownId}`}\n                ref={this.selectMenu}\n                aria-label={dropdownName}\n                className='msc-dropdown__select'\n                onChange={this._onChanged}\n                {...attribute}\n            >\n                <option value='' aria-selected={this.state.selectedIndex === ''} selected={this.state.selectedIndex === ''} hidden disabled>\n                    {dropdownToggleName}\n                </option>\n                {dropdownList.map(\n                    (item: IDropdownItemProps) =>\n                        item && (\n                            <option\n                                value={item.id}\n                                key={item.id}\n                                selected={this.state.selectedIndex === item.id.toString()}\n                                aria-selected={this.state.selectedIndex === item.id.toString()}\n                                className={item.isDisabled ? 'msc-dropdown__select__disabled' : undefined}\n                            >\n                                {item.value}\n                            </option>\n                        )\n                )}\n            </select>\n        );\n    }\n\n    private _renderSwatch(): JSX.Element {\n        const swatchItems = this.props.dropdownList.map<ISwatchItem>(item => {\n            return {\n                ...item,\n                itemId: item.id,\n                dimensionType: this.props.dropdownName as DimensionTypes\n            };\n        });\n        return <SwatchComponent list={swatchItems} apiSettings={this.props.apiSettings!} onSelectItem={this._selectSwatch} />;\n    }\n\n    /**\n     * Updates state on swatch selection.\n     * @param item - Selected swatch item.\n     */\n    private readonly _selectSwatch = async (item: ISwatchItem) => {\n        this.setState({ selectedIndex: item.itemId });\n\n        if (this.props.onChange) {\n            await this.props.onChange({\n                dropdownId: this.props.dropdownId,\n                selectId: item.itemId,\n                selectedValue: item.value\n            });\n        }\n    };\n\n    private readonly _onChanged = async (event: React.ChangeEvent<HTMLSelectElement>) => {\n        this.setState({ selectedIndex: event.target.value });\n\n        if (this.props.onChange) {\n            await this.props.onChange({\n                dropdownId: this.props.dropdownId,\n                selectId: event.target.value,\n                selectedValue: event.target.innerText\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 { ICommerceApiSettings } from '@msdyn365-commerce/core-internal';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\n\n/**\n * Specifies the type of selection.\n */\nexport enum SelectionType {\n    dropdown = 0,\n    swatch = 1\n}\n\n/**\n * Copyright (c) 2018 Microsoft Corporation.\n */\nexport interface IDropdownProps {\n    /**\n     * Specifies the type of selection. Dropdown by default.\n     */\n    selectionType?: SelectionType;\n\n    /**\n     * @friendlyName dropdownId\n     * @description Id for dropdown component.\n     */\n    dropdownId: string;\n\n    /**\n     * @friendlyName dropdownName\n     * @description Name of the dropdown component.\n     */\n    dropdownName: string;\n\n    /**\n     * @friendlyName dropdownList\n     * @description List of items in dropdown.\n     */\n    dropdownList: IDropdownItemProps[];\n\n    /**\n     * @friendlyName dropdownToggleName\n     * @description Name to use for the toggle when nothing is selected.\n     */\n    dropdownToggleName: string;\n\n    /**\n     * @telemetryContent telemetryContent\n     * @description Telemetry content.\n     */\n    telemetryContent?: ITelemetryContent;\n\n    apiSettings?: ICommerceApiSettings;\n\n    /**\n     * @friendlyName onChange\n     * @description Callback that gets fired when when a selected dimension changes.\n     */\n    onChange?(notification: IDropdownOnSelectionChangeNotification): Promise<void>;\n\n    /**\n     * @friendlyName onInitialize\n     * @description Callback that gets fired when dimension is initialized.\n     */\n    onInitialize?(notification: IDropdownOnInitializeNotification): void;\n}\n\nexport interface IDropdownItemProps {\n    value: string;\n    id: string;\n    colorHexCode?: string;\n    imageUrl?: string;\n    isDisabled?: boolean;\n    isDefault?: boolean;\n}\n\nexport interface IDropdownOnSelectionChangeNotification {\n    dropdownId: string;\n    selectId: string;\n    selectedValue: string;\n}\n\nexport interface IDropdownOnInitializeNotification {\n    initializedDimension: string;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IAddToCartFailureResult } from '@msdyn365-commerce/components';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { OrgUnitLocation, ProductAvailableQuantity, ProductDimension, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IBuyboxCommonResources } from '../buyboxInterface';\n\n/**\n * Get the quantity limit.\n * @param context - The context.\n * @param productAvailability - The product availability.\n * @returns The quantity limit.\n */\nexport function getQuantityLimit(context: ICoreContext<IGeneric<IAny>>, productAvailability: ProductAvailableQuantity | undefined): number {\n    // Get the quantity limit for the product\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- need read from config.\n    const maxQuantityForCartLineItem: number | undefined = context.app.config.maxQuantityForCartLineItem;\n    const availableQty = productAvailability?.AvailableQuantity;\n    const defaultQuantityLimit = 10;\n\n    let quantityLimit: number;\n\n    if (maxQuantityForCartLineItem === undefined && availableQty === undefined) {\n        quantityLimit = defaultQuantityLimit;\n    } else if (availableQty === undefined) {\n        quantityLimit = maxQuantityForCartLineItem ?? defaultQuantityLimit;\n    } else if (maxQuantityForCartLineItem === undefined) {\n        quantityLimit = availableQty;\n    } else {\n        quantityLimit = Math.min(maxQuantityForCartLineItem, availableQty);\n    }\n\n    return quantityLimit;\n}\n\n/**\n * Get the element index.\n * @param cart - The cart.\n * @param product - The product.\n * @param location - The location.\n * @returns The index of the element.\n */\nexport function getElementIndex(\n    cart: ICartState | undefined,\n    product: SimpleProduct | undefined,\n    location: OrgUnitLocation | undefined\n): number {\n    // Get the quantity of the product in cart\n    let elementFoundAt: number = -1;\n\n    const productIdToFind = product?.RecordId;\n\n    for (let index = 0; index < cart!.cart.CartLines!.length; index++) {\n        if (\n            cart!.cart.CartLines![index].ProductId === productIdToFind &&\n            (cart!.cart.CartLines![index].FulfillmentStoreId || '') === (location?.OrgUnitNumber || '')\n        ) {\n            elementFoundAt = index;\n\n            break;\n        }\n    }\n\n    return elementFoundAt;\n}\n\nexport function getQuantityError(stockLeft: number | undefined, resources: IBuyboxCommonResources): string | undefined {\n    if (!stockLeft || stockLeft <= 0) {\n        return resources.errorMessageOutOfStock;\n    } else if (stockLeft === 1) {\n        return resources.errorMessageOutOfRangeOneLeft;\n    }\n    return resources.errorMessageOutOfRangeFormat.replace('{numLeft}', stockLeft.toString());\n}\n\nexport function getGenericError(\n    result: IAddToCartFailureResult,\n    cart: ICartState | undefined,\n    resources: IBuyboxCommonResources,\n    context: ICoreContext<IGeneric<IAny>>,\n    product: SimpleProduct | undefined,\n    productAvailability: ProductAvailableQuantity | undefined,\n    location: OrgUnitLocation | undefined\n): string | undefined {\n    if (result.failureReason === 'EMPTYINPUT') {\n        return resources.addedToCartFailureMessage;\n    } else if (result.failureReason === 'CARTACTIONFAILED') {\n        if (result.cartActionResult && result.cartActionResult.substatus === 'MAXQUANTITY') {\n            // Get the quantity of the product in cart\n            const elementFoundAt: number = getElementIndex(cart, product, location);\n\n            let currentQuantity: number = 0;\n            if (elementFoundAt !== -1) {\n                const cartLineToUpdate = { ...cart!.cart.CartLines![elementFoundAt] };\n                currentQuantity = cartLineToUpdate.Quantity ?? 0;\n            }\n\n            // Get the quantity limit for the product\n            const quantityLimit = getQuantityLimit(context, productAvailability);\n            return resources.maxQuantityLimitText\n                .replace('{curQuantity}', currentQuantity.toString())\n                .replace('{maxQuantity}', quantityLimit.toString());\n        } else if (\n            result.cartActionResult &&\n            (result.cartActionResult.substatus === 'QUANTITYLIMITS' || result.cartActionResult.substatus === 'INVOICEINCART')\n        ) {\n            return result.cartActionResult.errorDetails?.LocalizedMessage;\n        }\n\n        if (result.cartActionResult?.validationResults && ArrayExtensions.hasElements(result.cartActionResult.validationResults)) {\n            return result.cartActionResult.validationResults\n                .map(item => {\n                    return StringExtensions.isNullOrEmpty(item.LocalizedMessage)\n                        ? item.ErrorContext ?? item.ErrorResourceId\n                        : item.LocalizedMessage;\n                })\n                .toString();\n        }\n\n        return resources.addedToCartFailureMessage;\n    }\n\n    return undefined;\n}\n\nexport function getConfigureErrors(\n    result: ProductDimension[] | undefined,\n    resources: IBuyboxCommonResources,\n    isGiftCard?: boolean\n): { [configureId: string]: string | undefined } {\n    if (!result) {\n        return {};\n    }\n\n    const dimensions: { [configureId: string]: string | undefined } = {};\n\n    for (const dimension of result) {\n        dimensions[dimension.DimensionTypeValue] = getDimensionErrorString(dimension.DimensionTypeValue, resources, isGiftCard);\n    }\n\n    return dimensions;\n}\n\nexport function getDimensionErrorString(dimensionTypeValue: number, resources: IBuyboxCommonResources, isGiftCard?: boolean): string {\n    switch (dimensionTypeValue) {\n        case 1: // ProductDimensionType.Color\n            return resources.productDimensionTypeColorErrorMessage;\n        case 2: // ProductDimensionType.Configuration\n            return resources.productDimensionTypeConfigurationErrorMessage;\n        case 3: // ProductDimensionType.Size\n            return resources.productDimensionTypeSizeErrorMessage;\n        case 4: // ProductDimensionType.Style\n            return isGiftCard ? resources.productDimensionTypeAmountErrorMessage : resources.productDimensionTypeStyleErrorMessage;\n        default:\n            return '';\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n    AddToCartBehavior,\n    IAddToCartFailureResult,\n    IAddToCartResources,\n    ItemSuccessfullyAddedToCartNotification,\n    PriceComponent\n} from '@msdyn365-commerce/components';\nimport { getUrlSync, ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\nimport { ICartActionResult } from '@msdyn365-commerce/global-state';\nimport { DeliveryOption, FeatureState, OrgUnitLocation, ProductAvailableQuantity, ProductDimension } from '@msdyn365-commerce/retail-proxy';\nimport { NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\nimport {\n    ArrayExtensions,\n    DeliveryMode,\n    IProductInventoryInformation,\n    isAggregatedInventory\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, Heading, INodeProps, IPopupProps, Popup } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { BuyboxErrorBlock } from '../../../common/buybox-components';\nimport { IBuyboxCallbacks, IBuyboxState } from '../../../common/buyboxInterface';\nimport { getConfigureErrors, getGenericError } from '../../../common/utilities/error-utilities';\nimport { IBuyboxData } from '../buybox.data';\nimport { IBuyboxProps, IBuyboxResources } from '../buybox.props.autogenerated';\n\nconst modalCloseButtonReference: React.RefObject<HTMLButtonElement> = React.createRef();\n\n/**\n * FindinStore failure Interface.\n */\nexport interface IFindInStoreFailureResult {\n    missingDimensions?: ProductDimension[];\n}\n\n/**\n * BuyBoxFindinStore View Props Interface.\n */\nexport interface IBuyboxFindInStoreViewProps {\n    storeSelector?: React.ReactNode;\n    heading?: React.ReactNode;\n    description?: React.ReactNode;\n    errors?: React.ReactNode;\n    button?: React.ReactNode;\n    productPickupOptionList?: React.ReactNode;\n\n    modal?: React.ReactNode;\n\n    ContainerProps: INodeProps;\n\n    openFindInStoreDialog(): Promise<void>;\n}\n\n/**\n * On click find store handler.\n * @param props -Buybox data.\n * @param state -Buybox state.\n * @param callbacks -Buybox callbacks.\n * @returns Find in store.\n */\nconst onClickFindInStoreHandler = (props: IBuyboxProps<IBuyboxData>, state: IBuyboxState, callbacks: IBuyboxCallbacks) => async () => {\n    await findInStoreOnClick(props, state, callbacks);\n};\n\n/**\n * Inventory settings based on the inventory policy for aggregated availability.\n */\ninterface IInventorySettingsProps {\n    isSectionDisabled: boolean;\n    description: string;\n    buttonText: string;\n}\n\n/**\n * The function defines the settings values for a given inventory configuration.\n * @param context - The context.\n * @param isStockCheck - Flag to enable inventory validation.\n * @param productAvailability - The product inventory information.\n * @param buyboxResources - The buybox string resources.\n * @param isLoading - Is loading.\n * @returns Boolean.\n */\nfunction getFindInStoreInventorySettings(\n    context: ICoreContext,\n    isStockCheck: boolean,\n    productAvailability: IProductInventoryInformation[] | undefined,\n    buyboxResources: IBuyboxResources,\n    isLoading?: boolean\n): IInventorySettingsProps {\n    // If shouldValidateAggregation is true then is required to check for the product inventory, based on this the messaging will change\n    // and the find in store button will be ensbled or disabled\n\n    let isSectionDisabled: boolean;\n    let buttonText;\n    let description: string;\n\n    let pickupInventory: IProductInventoryInformation | undefined;\n\n    if (!isStockCheck || isLoading) {\n        return {\n            isSectionDisabled: false,\n            buttonText: buyboxResources.findInStoreLinkText,\n            description: buyboxResources.findInStoreDescriptionText\n        };\n    }\n\n    if (productAvailability) {\n        pickupInventory = productAvailability.find(pickup => pickup.deliveryType === DeliveryMode.pickup);\n    }\n\n    // If aggregated is enabled, then we need to validate the inventor check for find in store.\n    // If an individual is selected, then we will always show a find in store button.\n    if (isAggregatedInventory(context.actionContext)) {\n        if (productAvailability && pickupInventory?.IsProductAvailable) {\n            isSectionDisabled = false;\n            buttonText = buyboxResources.findInStoreLinkText;\n            description = buyboxResources.findInStoreDescriptionText;\n        } else {\n            isSectionDisabled = true;\n            buttonText = buyboxResources.findInStoreNotAvailableTextButton;\n            description = buyboxResources.findInStoreNotAvailableDescription;\n        }\n    } else {\n        isSectionDisabled = false;\n        buttonText = buyboxResources.findInStoreLinkText;\n        description = buyboxResources.findInStoreDescriptionText;\n    }\n\n    return {\n        isSectionDisabled,\n        description,\n        buttonText\n    };\n}\n\n/**\n * Method to check if we have atleast one common delivery code between product and channel.\n * @param productdeliveryOptions - Product DeliveryOption List.\n * @param storePickUpOptionList - Channel DeliveryOption List.\n * @returns Boolean flag.\n */\nconst matchDeliveryOptions = (\n    productdeliveryOptions: DeliveryOption[] | undefined,\n    storePickUpOptionList: string[] | undefined\n): boolean => {\n    const deliveryOption: string[] = [];\n    productdeliveryOptions?.map(delivery => {\n        const pickup = storePickUpOptionList?.find(deliveryCode => deliveryCode === delivery.Code);\n        if (pickup) {\n            deliveryOption.push(pickup);\n        }\n        return deliveryOption;\n    });\n\n    return ArrayExtensions.hasElements(deliveryOption);\n};\n\nexport function getBuyboxFindInStore(\n    props: IBuyboxProps<IBuyboxData>,\n    state: IBuyboxState,\n    callbacks: IBuyboxCallbacks\n): IBuyboxFindInStoreViewProps | undefined {\n    const {\n        data,\n        slots: { storeSelector },\n        resources: {\n            priceFree,\n            originalPriceText,\n            currentPriceText,\n            findInStoreHeaderText,\n            buyBoxGoToCartText,\n            buyBoxContinueShoppingText,\n            closeNotificationLabel,\n            buyBoxSingleItemText,\n            buyBoxMultiLineItemFormatText,\n            buyBoxHeaderMessageText,\n            descriptionTextToShowAllPickupOptions\n        },\n        context: {\n            request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\n        }\n    } = props;\n\n    const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n    const product = data?.product?.result;\n    const price = data?.productPrice?.result;\n    const cart = data?.cart?.result;\n    const deliveryOptions = data?.deliveryOptions?.result;\n    const productAvailability = data.productAvailableQuantity?.result;\n    const retailMulitplePickupMFeatureState = data?.featureState?.result?.find(\n        (featureState: FeatureState) => featureState.Name === multiplePickupStoreSwitchName\n    )?.IsEnabled;\n    const channelDeliveryOptionConfig = data?.channelDeliveryOptionConfig?.result;\n\n    const missingDimensions = product?.Dimensions?.filter(dimension => !dimension.DimensionValue?.Value);\n\n    const {\n        errorState: { configureErrors, quantityError, otherError, errorHost },\n        modalOpen,\n        quantity\n    } = state;\n\n    const { isSectionDisabled, buttonText, description } = getFindInStoreInventorySettings(\n        props.context,\n        props.context.app.config.enableStockCheck,\n        productAvailability,\n        props.resources,\n        props.data.productAvailableQuantity.status === 'LOADING' || ArrayExtensions.hasElements(missingDimensions)\n    );\n\n    if (!product || !ArrayExtensions.hasElements(storeSelector)) {\n        return undefined;\n    }\n\n    if (!deliveryOptions || !deliveryOptions.DeliveryOptions) {\n        return undefined;\n    }\n\n    // If no delivery options present on the product, or none of the delivery options\n    // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\n    if (retailMulitplePickupMFeatureState && channelDeliveryOptionConfig) {\n        if (!matchDeliveryOptions(deliveryOptions.DeliveryOptions, channelDeliveryOptionConfig?.PickupDeliveryModeCodes)) {\n            return undefined;\n        }\n    } else if (\n        !PickupDeliveryModeCode ||\n        !deliveryOptions.DeliveryOptions.find((option: DeliveryOption) => option.Code === PickupDeliveryModeCode)\n    ) {\n        return undefined;\n    }\n\n    const dialogStrings = {\n        goToCartText: buyBoxGoToCartText,\n        continueShoppingText: buyBoxContinueShoppingText,\n        closeNotificationLabel,\n        headerItemOneText: buyBoxSingleItemText,\n        headerItemFormatText: buyBoxMultiLineItemFormatText,\n        headerMessageText: buyBoxHeaderMessageText,\n        freePriceText: priceFree,\n        originalPriceText,\n        currentPriceText\n    };\n\n    const priceComponent = price ? (\n        <PriceComponent\n            data={{ price }}\n            context={props.context}\n            id={props.id}\n            typeName={props.typeName}\n            freePriceText={dialogStrings.freePriceText}\n            originalPriceText={dialogStrings.originalPriceText}\n            currentPriceText={dialogStrings.currentPriceText}\n        />\n    ) : (\n        ''\n    );\n\n    const defaultImageSettings: IImageSettings = {\n        viewports: {\n            xs: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n            lg: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n            xl: { q: 'w=240&h=240&m=6', w: 0, h: 0 }\n        },\n        lazyload: true\n    };\n\n    const popupProps: IPopupProps = {\n        context: props.context,\n        className: 'ms-buybox',\n        id: props.id,\n        typeName: props.typeName,\n        data: { product: props.data.product?.result, price: props.data.productPrice?.result },\n        dialogStrings,\n        imageSettings: defaultImageSettings,\n        gridSettings: props.context.request.gridSettings,\n        productQuantity: quantity,\n        priceComponent,\n        navigationUrl: getUrlSync('cart', props.context.actionContext),\n        modalOpen,\n        setModalOpen: callbacks.changeModalOpen\n    };\n    const renderModalPopup = <Popup {...popupProps} />;\n    const { enableHidePdpRepeatingErrors } = props.context.request.features;\n    return {\n        ContainerProps: {\n            className: 'ms-buybox__find-in-store'\n        },\n\n        storeSelector: storeSelector[0],\n\n        openFindInStoreDialog: onClickFindInStoreHandler(props, state, callbacks),\n\n        heading: <Heading className='ms-buybox__find-in-store-heading' headingTag='h4' text={findInStoreHeaderText} />,\n\n        description: <p className='ms-buybox__find-in-store-description'>{description}</p>,\n        productPickupOptionList:\n            retailMulitplePickupMFeatureState && !isSectionDisabled ? (\n                <>\n                    <p className='ms-buybox__find-in-store-description'>{descriptionTextToShowAllPickupOptions}</p>\n                    <ul className='ms-buybox__find-in-store-pickup' aria-label={descriptionTextToShowAllPickupOptions}>\n                        {deliveryOptions.DeliveryOptions.map((item: DeliveryOption) => {\n                            return (\n                                <li className='ms-buybox__find-in-store-pickup-option' aria-label={item.Description} key={item.Code}>\n                                    {item.Description}\n                                </li>\n                            );\n                        })}\n                    </ul>\n                </>\n            ) : null,\n        errors: (\n            <BuyboxErrorBlock\n                configureErrors={configureErrors}\n                quantityError={quantityError}\n                otherError={otherError}\n                resources={props.resources}\n                showError={errorHost === 'FINDINSTORE'}\n                enableHidePdpRepeatingErrors={enableHidePdpRepeatingErrors}\n            />\n        ),\n\n        button: (\n            <button\n                className='ms-buybox__find-in-store-button'\n                onClick={onClickFindInStoreHandler(props, state, callbacks)}\n                color='secondary'\n                ref={modalCloseButtonReference}\n                aria-label={buttonText}\n                disabled={cart === undefined || isSectionDisabled}\n                title={buttonText}\n            >\n                {buttonText}\n            </button>\n        ),\n\n        modal: renderModalPopup\n    };\n}\n\n/**\n * Handler for find in store button.\n * @param props - BuyBox data.\n * @param state - BuyBox state.\n * @param callbacks - BuyBox callbacks.\n * @returns - Promise.\n */\nasync function findInStoreOnClick(props: IBuyboxProps<IBuyboxData>, state: IBuyboxState, callbacks: IBuyboxCallbacks): Promise<void> {\n    const {\n        data: {\n            storeSelectorStateManager: { result: storeSelectorStateManager },\n            cart: { result: cart },\n            productAvailableQuantity: { result: productAvailableQuantity }\n        },\n        resources,\n        context,\n        modules\n    } = props;\n\n    const { selectedProduct, quantity } = state;\n\n    let dataProduct = props.data.product.result;\n    const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n    const retailMulitplePickupMFeatureState = props.data?.featureState?.result?.find(\n        (featureState: FeatureState) => featureState.Name === multiplePickupStoreSwitchName\n    )?.IsEnabled;\n\n    if (selectedProduct) {\n        dataProduct = (await selectedProduct) || dataProduct;\n    }\n\n    if (!dataProduct || !storeSelectorStateManager) {\n        return;\n    }\n\n    const product = dataProduct;\n\n    const missingDimensions =\n        product.Dimensions &&\n        product.Dimensions.filter((dimension: ProductDimension) => !(dimension.DimensionValue && dimension.DimensionValue.Value));\n\n    let storeSelectorId: string = '';\n    if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\n        storeSelectorId = modules.storeSelector[0].id;\n    }\n\n    if (missingDimensions && missingDimensions.length > 0) {\n        if (callbacks.updateErrorState) {\n            callbacks.updateErrorState({\n                errorHost: 'FINDINSTORE',\n                configureErrors: getConfigureErrors(missingDimensions, resources)\n            });\n        }\n    } else {\n        storeSelectorStateManager\n            .openDialog({\n                product,\n                id: storeSelectorId,\n                parentElementRef: modalCloseButtonReference,\n                deliveryOptions: retailMulitplePickupMFeatureState ? props.data.deliveryOptions.result : undefined,\n                onLocationSelected: async (orgUnitLocation: OrgUnitLocation, deliveryMode: string) => {\n                    if (!cart) {\n                        return Promise.resolve();\n                    }\n\n                    const behavior = props.context?.app?.config?.addToCartBehavior;\n\n                    return cart\n                        .addProductToCart({ product, count: quantity, location: orgUnitLocation, deliveryMode })\n                        .then((result: ICartActionResult) => {\n                            if (result.status === 'FAILED' && result.substatus === 'MAXQUANTITY') {\n                                callbacks.changeModalOpen(false);\n                                let productAvailability: ProductAvailableQuantity | undefined;\n                                if (state.productAvailableQuantity) {\n                                    productAvailability = state.productAvailableQuantity.ProductAvailableQuantity;\n                                } else if (productAvailableQuantity && ArrayExtensions.hasElements(productAvailableQuantity)) {\n                                    const shippingInventory = productAvailableQuantity.find(\n                                        shipping => shipping.deliveryType === DeliveryMode.pickup\n                                    );\n                                    productAvailability = shippingInventory?.ProductAvailableQuantity;\n                                } else {\n                                    productAvailability = undefined;\n                                }\n                                const failureResult: IAddToCartFailureResult = {\n                                    failureReason: 'CARTACTIONFAILED',\n                                    cartActionResult: { status: result.status, substatus: result.substatus }\n                                };\n                                callbacks.updateErrorState({\n                                    errorHost: 'ADDTOCART',\n                                    configureErrors: {},\n                                    otherError: getGenericError(\n                                        failureResult,\n                                        cart,\n                                        resources,\n                                        context,\n                                        product,\n                                        productAvailability,\n                                        orgUnitLocation\n                                    )\n                                });\n                            } else {\n                                callbacks.updateErrorState({\n                                    configureErrors: {}\n                                });\n                                const navigationUrl = getUrlSync('cart', context.actionContext);\n                                if (behavior === undefined || behavior === AddToCartBehavior.goToCart) {\n                                    if (result.status === 'SUCCESS' && navigationUrl) {\n                                        window.location.assign(navigationUrl);\n                                    }\n                                } else if (behavior === AddToCartBehavior.showModal) {\n                                    callbacks.changeModalOpen(true);\n                                } else if (behavior === AddToCartBehavior.showNotification) {\n                                    const defaultImageSettings: IImageSettings = {\n                                        viewports: {\n                                            xs: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n                                            lg: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n                                            xl: { q: 'w=240&h=240&m=6', w: 0, h: 0 }\n                                        },\n                                        lazyload: true\n                                    };\n                                    const telemetryContent = getTelemetryObject(\n                                        props.context.request.telemetryPageName!,\n                                        props.friendlyName,\n                                        props.telemetry\n                                    );\n                                    const dialogStrings: IAddToCartResources = {\n                                        goToCartText: resources.buyBoxGoToCartText,\n                                        continueShoppingText: resources.buyBoxContinueShoppingText,\n                                        closeNotificationLabel: resources.closeNotificationLabel,\n                                        headerItemOneText: resources.buyBoxSingleItemText,\n                                        headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\n                                        headerMessageText: resources.buyBoxHeaderMessageText,\n                                        freePriceText: resources.priceFree,\n                                        originalPriceText: resources.originalPriceText,\n                                        currentPriceText: resources.currentPriceText,\n                                        addedQuantityText: resources.addedQuantityText\n                                    };\n                                    const notification = new ItemSuccessfullyAddedToCartNotification(\n                                        props.context,\n                                        dialogStrings,\n                                        defaultImageSettings,\n                                        props.context.request.gridSettings,\n                                        product,\n                                        props.data.productPrice?.result,\n                                        quantity,\n                                        navigationUrl,\n                                        telemetryContent,\n                                        props.id,\n                                        props.typeName\n                                    );\n                                    NotificationsManager.instance().addNotification(notification);\n                                }\n                            }\n                        })\n                        .catch((error: Error) => {\n                            if (props.telemetry) {\n                                props.telemetry.exception(error);\n                                props.telemetry.debug('Unable to add product to cart');\n                            }\n                        });\n                }\n            })\n            .catch((error: Error) => {\n                if (props.telemetry) {\n                    props.telemetry.error(error.message);\n                    props.telemetry.debug('Unable to find in store');\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 { getCatalogId, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core-internal';\nimport {\n    CommerceProperty,\n    ProductCatalog,\n    ProductDeliveryOptions,\n    ProductDimensionValue,\n    ProductDimensionValueInventoryAvailability,\n    ProductPrice,\n    ReleasedProductType,\n    SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { BulkPurchase } from '@msdyn365-commerce-modules/bulk-purchase';\nimport {\n    ArrayExtensions,\n    DeliveryMode,\n    FinitePromiseQueue,\n    FinitePromiseQueueError,\n    getDeliveryOptionsForSelectedVariant,\n    GetDeliveryOptionsForSelectedVariantInput,\n    getDimensionsForSelectedVariant,\n    GetDimensionsForSelectedVariantInput,\n    getDimensionValuesFromQuery,\n    getInventoryLevelCodeFromDimensionValue,\n    getPriceForSelectedVariant,\n    getProductAvailabilitiesForSelectedVariant,\n    getSelectedVariant,\n    IDimensionsApp,\n    IDimensionValueForSelectedVariant,\n    InventoryLevelValues,\n    IProductInventoryInformation,\n    IPromiseQueue,\n    PriceForSelectedVariantInput,\n    ProductAvailabilitiesForSelectedVariantInput,\n    SelectedVariantInput,\n    setDimensionValuesToQuery,\n    validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n    Button,\n    getTelemetryObject,\n    IModuleProps,\n    INodeProps,\n    ITelemetryContent,\n    updateMaxQuantityForCartLineItem\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport {\n    getBuyboxAddToCart,\n    getBuyBoxInventoryLabel,\n    getBuyboxKeyInPrice,\n    getBuyboxProductAddToOrderTemplate,\n    getBuyboxProductAddToWishlist,\n    getBuyboxProductComparisonButton,\n    getBuyboxProductDescription,\n    getBuyboxProductPrice,\n    getBuyboxProductQuantity,\n    getBuyboxProductRating,\n    getBuyboxProductTitle,\n    getBuyboxProductUnitOfMeasure,\n    getBuyboxShopSimilarButton,\n    getQuantityLimitsMessages,\n    RetailDefaultOrderQuantityLimitsFeatureName,\n    EcommerceQuantityLimitConfigurationsFeatureName,\n    RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName\n} from '../../common/buybox-components';\nimport { getBuyboxProductConfigure } from '../../common/buybox-product-configure';\nimport {\n    IBuyboxAddToCartViewProps,\n    IBuyboxAddToOrderTemplateViewProps,\n    IBuyboxAddToWishlistViewProps,\n    IBuyboxCallbacks,\n    IBuyboxCommonData,\n    IBuyboxExtentedProps,\n    IBuyboxKeyInPriceViewProps,\n    IBuyboxProductConfigureViewProps,\n    IBuyboxProductQuantityViewProps,\n    IBuyboxShopSimilarLookViewProps,\n    IBuyboxState,\n    IErrorState,\n    ShopSimiliarButtonType\n} from '../../common/buyboxInterface';\nimport { IBuyboxData } from './buybox.data';\nimport { IBuyboxProps, IBuyboxResources } from './buybox.props.autogenerated';\nimport { getBuyboxFindInStore, IBuyboxFindInStoreViewProps } from './components/buybox-find-in-store';\nimport { RecentlyViewedState } from '../recently-viewed';\n\nexport interface IBuyboxViewProps extends IBuyboxProps<IBuyboxData> {\n    state: IBuyboxState;\n    ModuleProps: IModuleProps;\n    ProductInfoContainerProps: INodeProps;\n    MediaGalleryContainerProps: INodeProps;\n    callbacks: IBuyboxCallbacks;\n    mediaGallery?: React.ReactNode;\n    title?: React.ReactNode;\n    description?: React.ReactNode;\n    rating?: React.ReactNode;\n    price?: React.ReactNode;\n    productComparisonButton?: React.ReactNode;\n    bulkPurchaseLink?: React.ReactNode;\n    addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps;\n    addToWishlist?: IBuyboxAddToWishlistViewProps;\n    min?: number | undefined;\n    max: number | undefined;\n    addToCart: IBuyboxAddToCartViewProps;\n    findInStore?: IBuyboxFindInStoreViewProps;\n    quantity?: IBuyboxProductQuantityViewProps;\n    configure?: IBuyboxProductConfigureViewProps;\n    inventoryLabel?: React.ReactNode;\n    shopSimilarLook?: IBuyboxShopSimilarLookViewProps;\n    shopSimilarDescription?: IBuyboxShopSimilarLookViewProps;\n    quantityLimitsMessages: React.ReactNode;\n    telemetryContent?: ITelemetryContent;\n    keyInPrice?: IBuyboxKeyInPriceViewProps;\n    unitOfMeasure?: React.ReactNode;\n    catalogs?: ProductCatalog[] | undefined;\n    isChannelMultipleCatalogsFeatureEnabled?: boolean;\n    currentCatalogId?: number;\n    applyDefaultOrderSettings?: boolean;\n}\n\n/**\n * Buybox Module.\n */\nclass Buybox extends React.PureComponent<IBuyboxProps<IBuyboxData>, IBuyboxState> {\n    /**\n     * A queue of tasks of processing the changes in the dimensions.\n     * Limit to two processes:\n     * 1 - for the current process, which is under execution at the moment.\n     * 2 - next process, which will process the latest version of data.\n     * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\n     */\n    private readonly dimensionUpdateQueue: IPromiseQueue<void> = new FinitePromiseQueue<void>(2);\n\n    private dimensions: { [id: number]: string } = {};\n    private initializedDimensions: Set<string> = new Set();\n\n    private readonly buyboxCallbacks: IBuyboxCallbacks = {\n        updateQuantity: (newQuantity: number): boolean => {\n            const errorState = { ...this.state.errorState };\n            errorState.quantityError = undefined;\n            errorState.otherError = undefined;\n\n            this.setState({ quantity: newQuantity, errorState });\n            return true;\n        },\n        updateErrorState: (newErrorState: IErrorState): void => {\n            this.setState({ errorState: newErrorState });\n        },\n        updateSelectedProduct: (\n            newSelectedProduct: Promise<SimpleProduct | null>,\n            newInventory: IProductInventoryInformation | undefined,\n            newPrice: ProductPrice | undefined,\n            newDeliveryOptions: ProductDeliveryOptions | undefined\n        ): void => {\n            this.setState({\n                selectedProduct: newSelectedProduct,\n                productAvailableQuantity: newInventory,\n                productDeliveryOptions: newDeliveryOptions\n            });\n            this._updatePrice(newPrice);\n        },\n        initializeDimension: (initializedDimension: string): void => {\n            if (initializedDimension) {\n                this.initializedDimensions.add(initializedDimension);\n            }\n        },\n        dimensionSelectedAsync: async (selectedDimensionId: number, selectedDimensionValueId: string): Promise<void> => {\n            this.dimensions[selectedDimensionId] = selectedDimensionValueId;\n            // Only trigger _updateDimensions when all dimensions are initialized\n            if (this.initializedDimensions.size === (this.props.data.product.result?.Dimensions?.length || 0)) {\n                return this.dimensionUpdateQueue\n                    .enqueue(async () => {\n                        return this._updateDimensions();\n                    })\n                    .catch((error: unknown) => {\n                        // Ignore discarded processes.\n                        if (error !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\n                            throw error;\n                        }\n                    });\n            }\n        },\n        getDropdownName: (dimensionType: number, resources: IBuyboxResources): string => {\n            return this._getDropdownName(dimensionType, resources);\n        },\n        changeModalOpen: (isModalOpen: boolean): void => {\n            this.setState({ modalOpen: isModalOpen });\n        },\n        changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\n            this.setState({ isUpdatingDimension });\n        },\n\n        /**\n         * Update isUpdatingDeliveryOptions state.\n         *\n         * @param isUpdatingDeliveryOptions - The status of updating delivery options.\n         */\n        changeUpdatingDeliveryOptions: (isUpdatingDeliveryOptions: boolean): void => {\n            this.setState({ isUpdatingDeliveryOptions });\n        },\n\n        updateKeyInPrice: (customPrice: number): void => {\n            // Remove custom amount error when updating the custom price\n            const errorState = { ...this.state.errorState };\n            errorState.customAmountError = undefined;\n\n            this.setState({ isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState });\n            this._updatePrice(this.state.productPrice, customPrice);\n        }\n    };\n\n    private readonly telemetryContent: ITelemetryContent;\n\n    public constructor(props: IBuyboxProps<IBuyboxData>, state: IBuyboxState) {\n        super(props);\n        this.state = {\n            errorState: {\n                configureErrors: {}\n            },\n            quantity: 1,\n            min: undefined,\n            max: undefined,\n            selectedProduct: undefined,\n            productPrice: undefined,\n            productDeliveryOptions: undefined,\n\n            modalOpen: false,\n            isUpdatingDimension: false,\n            isUpdatingDeliveryOptions: false,\n            isPriceApiCalled: false\n        };\n        this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n    }\n\n    public async componentDidMount(): Promise<void> {\n        const {\n            data: {\n                product: { result: product },\n                productPrice\n            },\n            context\n        } = this.props;\n\n        // There are multiple sources triggering the callback function dimensionSelectedAsync calling the GetActivePrice api before componentDidMount and after componentDidMount.\n        // Set isPriceApiCalled to false here to prevent redundant API call after componentDidMount:\n        // If the price has not been hydrated before, this means the component was just loaded for the first time with variant selected.\n        // We will skip calling RS API in this case as the price data has already been fetched via module data action in node server.\n\n        const matchedDimensions = getDimensionValuesFromQuery(this.props.context.request.url.requestUrl);\n\n        // Set isPriceApiCalled to false only when variant is there\n        if (matchedDimensions.length > 0) {\n            this.setState({ isPriceApiCalled: false });\n        } else {\n            this.setState({ isPriceApiCalled: true });\n        }\n\n        productPrice.then(async result => {\n            this._updatePrice(result);\n        });\n\n        if (product) {\n            // Check if the product is service or not by product type\n            if (product.ItemTypeValue === ReleasedProductType.Service) {\n                this.setState({ isServiceItem: true });\n            }\n            await this._updateQuantitiesInState(product);\n        }\n\n        if (product && context.app.config.maxRecentlyViewedItemsCount > 0) {\n            RecentlyViewedState.instance(this.props.context, context.app.config.maxRecentlyViewedItemsCount, product.RecordId);\n        }\n    }\n\n    public render(): JSX.Element | null {\n        const {\n            slots: { mediaGallery, productComparisonButton },\n            data: {\n                product: { result: product }\n            },\n            config: { className = '' }\n        } = this.props;\n\n        const { min, max } = this.state;\n\n        if (!product) {\n            this.props.context.telemetry.error('Product content is empty, module wont render');\n            return null;\n        }\n\n        const props = this.props as IBuyboxExtentedProps<IBuyboxCommonData>;\n        const defaultMinimumKeyInPrice = 10;\n        const defaultMaximumKeyInPrice = 100;\n\n        const context = this.props.context as ICoreContext<IDimensionsApp>;\n        const inventoryLevel = context.app.config.inventoryLevel;\n        const dimensionValuesWithInventory = ArrayExtensions.flatten(\n            ArrayExtensions.validValues(this.props.data.productDimensions.result?.map(value => value.dimensionValuesWithInventory))\n        );\n        const applyDefaultOrderSettings =\n            (this.props.data.featureState?.result?.find(featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName)\n                ?.IsEnabled ??\n                false) &&\n            (this.props.data.cartConfiguration?.result?.ValidateDefaultOrderSettingsPerLine ?? false);\n        const hasAvailableProducts =\n            !ArrayExtensions.hasElements(dimensionValuesWithInventory) ||\n            dimensionValuesWithInventory.some((value: unknown) => {\n                const inventoryLevelCode = getInventoryLevelCodeFromDimensionValue(\n                    value as ProductDimensionValueInventoryAvailability,\n                    inventoryLevel\n                );\n                return inventoryLevelCode !== InventoryLevelValues.outOfStock;\n            });\n        const catalogId = getCatalogId(this.props.context.request);\n        validateCatalogId(catalogId);\n\n        const viewProps: IBuyboxViewProps = {\n            ...(this.props as IBuyboxProps<IBuyboxData>),\n            state: this.state,\n            mediaGallery: mediaGallery && mediaGallery.length > 0 ? mediaGallery[0] : undefined,\n            ModuleProps: {\n                moduleProps: this.props,\n                className: classnames('ms-buybox', className)\n            },\n            ProductInfoContainerProps: {\n                className: 'ms-buybox__content'\n            },\n            MediaGalleryContainerProps: {\n                className: 'ms-buybox__media-gallery'\n            },\n            telemetryContent: this.telemetryContent,\n            callbacks: this.buyboxCallbacks,\n            title: getBuyboxProductTitle(props),\n            description: getBuyboxProductDescription(props),\n            bulkPurchaseLink: this._renderBuyboxBulkPurchaseLink(),\n            unitOfMeasure: getBuyboxProductUnitOfMeasure(props),\n            configure: getBuyboxProductConfigure(props, this.state, this.buyboxCallbacks),\n            findInStore: getBuyboxFindInStore(this.props, this.state, this.buyboxCallbacks),\n            price: getBuyboxProductPrice(props, this.state),\n            addToCart: getBuyboxAddToCart(\n                props,\n                this.state,\n                this.buyboxCallbacks,\n                defaultMinimumKeyInPrice,\n                defaultMaximumKeyInPrice,\n                undefined,\n                hasAvailableProducts\n            ),\n            productComparisonButton: ArrayExtensions.hasElements(productComparisonButton)\n                ? getBuyboxProductComparisonButton(\n                      productComparisonButton[0],\n                      product,\n                      getCatalogId(this.props.context.request),\n                      this.state\n                  )\n                : undefined,\n            addToOrderTemplate: getBuyboxProductAddToOrderTemplate(\n                props,\n                this.state,\n                this.buyboxCallbacks,\n                this._isChannelMultipleCatalogsFeatureEnabled(),\n                catalogId\n            ),\n            addToWishlist: getBuyboxProductAddToWishlist(props, this.state, this.buyboxCallbacks),\n            rating: !props.context.app.config.hideRating && getBuyboxProductRating(props),\n            quantity: product.IsGiftCard ? undefined : getBuyboxProductQuantity(props, this.state, this.buyboxCallbacks),\n            inventoryLabel: getBuyBoxInventoryLabel(props),\n            shopSimilarLook:\n                this.props.config.enableShopSimilarLooks && !product.IsGiftCard\n                    ? getBuyboxShopSimilarButton(props, ShopSimiliarButtonType.Looks)\n                    : undefined,\n            shopSimilarDescription:\n                this.props.config.enableShopSimilarDescription && !product.IsGiftCard\n                    ? getBuyboxShopSimilarButton(props, ShopSimiliarButtonType.Description)\n                    : undefined,\n            keyInPrice:\n                this.props.config.enableKeyInPrice && this.state.isCustomPriceSelected\n                    ? getBuyboxKeyInPrice(props, this.state, this.buyboxCallbacks)\n                    : undefined,\n            quantityLimitsMessages: getQuantityLimitsMessages(props, this.state),\n            min: applyDefaultOrderSettings ? min : 1,\n            max,\n            applyDefaultOrderSettings: applyDefaultOrderSettings,\n            isChannelMultipleCatalogsFeatureEnabled: this._isChannelMultipleCatalogsFeatureEnabled(),\n            currentCatalogId: catalogId,\n            catalogs: this._validateCatalogDetails(catalogId)\n        };\n\n        return this.props.renderView(viewProps) as React.ReactElement;\n    }\n\n    /**\n     * Handles anchor click event and scrolls to the given bulk purchase module.\n     * @param bulkPurchaseModule - Bulk purchase module.\n     * @returns Handler.\n     */\n    private readonly _onBulkPurchaseLinkClick = (bulkPurchaseModule: Element) => () => {\n        const boundingRect = bulkPurchaseModule.getBoundingClientRect();\n        const scrollX = boundingRect.left + window.pageXOffset;\n        const scrollY = boundingRect.top + window.pageYOffset;\n\n        window.scrollTo(scrollX, scrollY);\n    };\n    private readonly _isChannelMultipleCatalogsFeatureEnabled = (): boolean => {\n        let isMultipleCatalogFeatureEnabledInHq = false;\n        if (this.props.data.featureState) {\n            isMultipleCatalogFeatureEnabledInHq =\n                this.props.data.featureState.result?.find(\n                    feature => feature.Name === 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature'\n                )?.IsEnabled || false;\n        }\n        return isMultipleCatalogFeatureEnabledInHq;\n    };\n\n    private _renderBuyboxBulkPurchaseLink(): React.ReactNode {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Temporary switch for the feature which is under development.\n        if (!this.props.context.app.config.isBulkPurchaseEnabled) {\n            return null;\n        }\n\n        if (!msdyn365Commerce.isBrowser) {\n            return null;\n        }\n\n        const bulkPurchaseModules = Array.from(document.getElementsByClassName(BulkPurchase.className));\n\n        if (!ArrayExtensions.hasElements(bulkPurchaseModules)) {\n            return null;\n        }\n\n        return (\n            <Button\n                className='ms-buybox__bulk-purchase-anchor'\n                title={this.props.resources.bulkPurchaseLinkText}\n                onClick={this._onBulkPurchaseLinkClick(bulkPurchaseModules[0])}\n            >\n                {this.props.resources.bulkPurchaseLinkText}\n            </Button>\n        );\n    }\n\n    private _updatePrice(newPrice: ProductPrice | undefined, customPrice: number | undefined = this.state.keyInPriceAmount): void {\n        if (this.state.isCustomPriceSelected && newPrice) {\n            newPrice.CustomerContextualPrice = customPrice;\n        }\n        this.setState({ productPrice: newPrice });\n    }\n\n    private _getProductVariant(dimensionsToUpdate: { [id: number]: string }) {\n        const {\n            data: {\n                product: { result: product }\n            },\n            context: {\n                actionContext,\n                request: {\n                    apiSettings: { channelId }\n                }\n            }\n        } = this.props;\n\n        const productDimensions = this.props.data.productDimensions.result!;\n\n        // Step 3, Build the actually selected dimensions, prioritizing the information in state\n        // over the information in data\n        const mappedDimensions = productDimensions\n            .map(dimension => {\n                const dimensions = (dimension.dimensionValuesWithInventory ??\n                    dimension.DimensionValues ??\n                    []) as IDimensionValueForSelectedVariant[];\n                return {\n                    DimensionTypeValue: dimension.DimensionTypeValue,\n                    DimensionValue:\n                        dimensions.find(\n                            value => value.DimensionValue?.RecordId.toString() === dimensionsToUpdate[dimension.DimensionTypeValue]\n                        )?.DimensionValue ?? dimension.DimensionValue,\n                    ExtensionProperties: dimension.ExtensionProperties\n                };\n            })\n            .filter(dimension => dimension.DimensionValue);\n        setDimensionValuesToQuery(this.props.context.actionContext.requestContext.url.requestUrl, mappedDimensions);\n\n        // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\n        // so that places like add to cart can await it\n        const selectedProductPromise = getSelectedVariant(\n            new SelectedVariantInput(\n                product!.MasterProductId ? product!.MasterProductId : product!.RecordId,\n                channelId,\n                undefined,\n                undefined,\n                this.props.context.request\n            ),\n            actionContext\n        );\n        this.setState({ selectedProduct: selectedProductPromise });\n\n        return { productVariantPromise: selectedProductPromise, mappedDimensions };\n    }\n\n    private readonly _updateDimensions = async (): Promise<void> => {\n        const product = this.props.data.product.result;\n\n        const productDimensions = this.props.data.productDimensions.result;\n\n        const hasProductDimensions = ArrayExtensions.hasElements(productDimensions);\n\n        if (!product || !hasProductDimensions) {\n            return;\n        }\n\n        const dimensionsToUpdate: { [id: number]: string } = { ...this.dimensions };\n\n        this.setState({ isUpdatingDimension: true, isUpdatingDeliveryOptions: true });\n\n        // Step 1: Clear error state to display relevant errors\n        if (this.state.errorState.otherError || this.state.errorState.quantityError) {\n            const clearErrorState = { ...this.state.errorState };\n            clearErrorState.otherError = undefined;\n            if (this.state.errorState.errorHost === 'ADDTOCART') {\n                clearErrorState.quantityError = undefined;\n                clearErrorState.errorHost = undefined;\n            }\n            this.setState({ errorState: clearErrorState });\n        }\n\n        // Step 2: Clear any errors indicating the dimension wasn't selected\n        for (const key of Object.keys(dimensionsToUpdate)) {\n            if (this.state.errorState.configureErrors[key]) {\n                this.setState(previousState => {\n                    const errorState = previousState.errorState;\n                    errorState.configureErrors[key] = undefined;\n                    return { errorState };\n                });\n            }\n        }\n\n        const data = this._getProductVariant(dimensionsToUpdate);\n        const productVariant: SimpleProduct | null = await data.productVariantPromise;\n\n        if (!productVariant) {\n            return;\n        }\n\n        const promises: Promise<void>[] = [\n            this._getDimensionsForSelectedVariant(productVariant, data.mappedDimensions),\n            this._hydrateInventoryInfo(productVariant),\n            this._hydratePrice(productVariant),\n            this._hydrateDeliveryOptions(productVariant),\n            this._updateQuantitiesInState(productVariant)\n        ];\n\n        await Promise.all(promises);\n    };\n\n    private async _getDimensionsForSelectedVariant(\n        productVariant: SimpleProduct,\n        mappedDimensions: {\n            /* eslint-disable @typescript-eslint/naming-convention -- Retail proxy values */\n            DimensionTypeValue: number;\n            DimensionValue: ProductDimensionValue | undefined;\n            ExtensionProperties: CommerceProperty[] | undefined;\n            /* eslint-enable @typescript-eslint/naming-convention -- Retail proxy values */\n        }[]\n    ): Promise<void> {\n        await getDimensionsForSelectedVariant(\n            new GetDimensionsForSelectedVariantInput(\n                productVariant.MasterProductId ? productVariant.MasterProductId : productVariant.RecordId,\n                this.props.context.request.apiSettings.channelId,\n                mappedDimensions,\n                this.props.context.request\n            ),\n            this.props.context.actionContext\n        );\n    }\n\n    private async _hydrateInventoryInfo(productVariant: SimpleProduct): Promise<void> {\n        // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\n        // so that places like add to cart can await it\n        const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\n            new ProductAvailabilitiesForSelectedVariantInput(\n                productVariant.RecordId,\n                this.props.context.request.apiSettings.channelId,\n                productVariant\n            ),\n            this.props.context.actionContext\n        );\n\n        const newShippingQuantity = newAvailableQuantity?.find(\n            // @ts-expect-error\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            (shipping: { deliveryType: any }) => shipping.deliveryType === DeliveryMode.shipping\n        );\n        const isCustomPriceSelected = productVariant.Dimensions?.find(\n            dimension =>\n                dimension.DimensionTypeValue === 4 && dimension.DimensionValue && dimension.DimensionValue.Value?.toLowerCase() === 'custom'\n        );\n        if (isCustomPriceSelected) {\n            this.setState({ isCustomPriceSelected: true });\n        } else {\n            this.setState(previousState => {\n                const errorState = previousState.errorState;\n                errorState.customAmountError = undefined;\n                return { isCustomPriceSelected: false, isPriceKeyedIn: false, errorState };\n            });\n        }\n\n        if (newShippingQuantity) {\n            this.setState({ productAvailableQuantity: newShippingQuantity });\n        } else {\n            this.setState({ productAvailableQuantity: undefined });\n        }\n    }\n\n    private async _hydratePrice(productVariant: SimpleProduct): Promise<void> {\n        // This function is invoked when dimensionSelectedAsync get called.\n        // If the price has not been hydrated before, this means the component was just loaded for the first time with variant selected.\n        // We will skip calling RS API in this case as the price data has already been fetched via module data action in node server.\n        if (!this.state.isPriceApiCalled) {\n            this.setState({ isPriceApiCalled: true });\n            return;\n        }\n\n        // Step 6. Use these dimensions hydrate the product price.\n        const newPrice = await getPriceForSelectedVariant(\n            new PriceForSelectedVariantInput(productVariant.RecordId, this.props.context.request.apiSettings.channelId, productVariant),\n            this.props.context.actionContext\n        );\n\n        if (newPrice) {\n            this._updatePrice(newPrice);\n        }\n    }\n\n    private async _hydrateDeliveryOptions(productVariant: SimpleProduct): Promise<void> {\n        const retailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\n            featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\n        );\n\n        // Step 7. Use these dimensions hydrate the product delivery options.\n        const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\n            new GetDeliveryOptionsForSelectedVariantInput(\n                productVariant.RecordId,\n                this.props.context.request.apiSettings.channelId,\n                productVariant,\n                undefined,\n                retailMultiplePickupFeatureState?.IsEnabled\n            ),\n            this.props.context.actionContext\n        );\n\n        if (newDeliveryOptions) {\n            this.setState({ productDeliveryOptions: newDeliveryOptions });\n        }\n    }\n\n    private async _updateQuantitiesInState(product: SimpleProduct): Promise<void> {\n        const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\n        const isChannelLimitsFeatureEnabled = await this._isChannelLimitsFeatureEnabled();\n\n        const min: number = this._getMinQuantityForCartLineItem(isOrderQuantityLimitsFeatureEnabled, product);\n        const max: number = this._getMaxQuantityForCartLineItem(\n            isChannelLimitsFeatureEnabled || isOrderQuantityLimitsFeatureEnabled,\n            product\n        );\n        let quantity: number = this._getQuantity(product, isOrderQuantityLimitsFeatureEnabled);\n        quantity = Math.max(quantity, min);\n\n        this.setState({\n            min,\n            max,\n            quantity\n        });\n    }\n\n    private _getMinQuantityForCartLineItem(isOrderQuantityLimitsFeatureEnabled: boolean, product: SimpleProduct): number {\n        if (\n            isOrderQuantityLimitsFeatureEnabled &&\n            this._getIgnoreOrderSettings() &&\n            product?.Behavior?.MinimumQuantity &&\n            product.Behavior.MinimumQuantity > 0\n        ) {\n            return product.Behavior.MinimumQuantity;\n        }\n\n        return 1;\n    }\n\n    private _getMaxQuantityForCartLineItem(isQuantityLimitsFeatureEnabled: boolean, product: SimpleProduct): number {\n        if (\n            isQuantityLimitsFeatureEnabled &&\n            this._getIgnoreOrderSettings() &&\n            product?.Behavior?.MaximumQuantity &&\n            product.Behavior.MaximumQuantity > 0\n        ) {\n            return product.Behavior.MaximumQuantity;\n        }\n\n        return updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem);\n    }\n\n    /**\n     * Retrieves the value of the IgnoreOrderSettings property from the cart configuration.\n     * If the property is not present, it defaults to false.\n     * @returns {boolean} The value of the IgnoreOrderSettings property.\n     */\n    private _getIgnoreOrderSettings(): boolean {\n        const cartConfiguration = this.props.data.cartConfiguration;\n        return !(cartConfiguration?.result?.IgnoreOrderSettings ?? false);\n    }\n\n    private _getQuantity(product: SimpleProduct, isOrderQuantityLimitsFeatureEnabled: boolean): number {\n        const { quantity } = this.state;\n        let defaultQuantity = 1;\n\n        if (quantity !== defaultQuantity || !isOrderQuantityLimitsFeatureEnabled) {\n            return quantity;\n        }\n\n        const cartConfiguration = this.props.data.cartConfiguration;\n        const applyDefaultOrderSettingsForCartLine = cartConfiguration?.result?.ValidateDefaultOrderSettingsPerLine ?? false;\n        if (!applyDefaultOrderSettingsForCartLine) {\n            return quantity;\n        }\n\n        if (product?.Behavior?.DefaultQuantity && product.Behavior.DefaultQuantity > 0) {\n            defaultQuantity = product.Behavior.DefaultQuantity;\n        }\n\n        return defaultQuantity;\n    }\n\n    private readonly _getDropdownName = (dimensionType: number, resources: IBuyboxResources): string => {\n        const isGiftCard = this.props.data.product.result?.IsGiftCard;\n\n        switch (dimensionType) {\n            case 1: // ProductDimensionType.Color\n                return resources.productDimensionTypeColor;\n            case 2: // ProductDimensionType.Configuration\n                return resources.productDimensionTypeConfiguration;\n            case 3: // ProductDimensionType.Size\n                return resources.productDimensionTypeSize;\n            case 4: // ProductDimensionType.Style\n                return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\n            default:\n                return '';\n        }\n    };\n\n    private async _isOrderQuantityLimitsFeatureEnabled(): Promise<boolean> {\n        const featureStatuses = await this.props.data.featureState;\n\n        const isFeatureEnabledInHq = featureStatuses?.find(\n            featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName\n        )?.IsEnabled;\n        if (!isFeatureEnabledInHq) {\n            return false;\n        }\n        const useSiteBuilderSettings = featureStatuses?.find(\n            featureState => featureState.Name === RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName\n        )?.IsEnabled;\n\n        if (useSiteBuilderSettings) {\n            const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n            if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n                return false;\n            }\n\n            if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n                return true;\n            }\n            let customerInfo;\n            try {\n                customerInfo = await this.props.data.customerInformation;\n            } catch (error) {\n                this.props.telemetry.information(error);\n                this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\n                return false;\n            }\n\n            return (\n                customerInfo &&\n                ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n                    (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\n            );\n        } else {\n            const cartConfiguration = await this.props.data.cartConfiguration;\n            return !(cartConfiguration?.IgnoreOrderSettings ?? false);\n        }\n    }\n\n    private _validateCatalogDetails(catalogId: number): ProductCatalog[] | undefined {\n        const catalogs = this.props.data.catalogs?.result?.filter(item => item.RecordId === catalogId);\n        if (ArrayExtensions.hasElements(catalogs) && catalogs[0].RecordId === 0) {\n            return;\n        }\n\n        return catalogs;\n    }\n\n    private async _isChannelLimitsFeatureEnabled(): Promise<boolean> {\n        const featureStatuses = await this.props.data.featureState;\n\n        const isChannelLimitsFeatureEnabledInHq = featureStatuses?.find(\n            featureState => featureState.Name === EcommerceQuantityLimitConfigurationsFeatureName\n        )?.IsEnabled;\n\n        return isChannelLimitsFeatureEnabledInHq ?? false;\n    }\n}\n\nexport default Buybox;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n    IBuyboxAddToCartViewProps,\n    IBuyboxAddToOrderTemplateViewProps,\n    IBuyboxAddToWishlistViewProps,\n    IBuyboxKeyInPriceViewProps,\n    IBuyboxProductConfigureDropdownViewProps,\n    IBuyboxProductConfigureViewProps,\n    IBuyboxProductQuantityViewProps,\n    IBuyboxShopSimilarLookViewProps\n} from '../../common';\nimport { IBuyboxViewProps } from './buybox';\nimport { IBuyboxFindInStoreViewProps } from './components/buybox-find-in-store';\n\nconst BuyboxView: React.FC<IBuyboxViewProps> = props => {\n    const {\n        ModuleProps,\n        MediaGalleryContainerProps,\n        ProductInfoContainerProps,\n        addToCart,\n        addToOrderTemplate,\n        addToWishlist,\n        configure,\n        description,\n        findInStore,\n        quantity,\n        price,\n        title,\n        rating,\n        inventoryLabel,\n        shopSimilarLook,\n        keyInPrice,\n        shopSimilarDescription,\n        unitOfMeasure,\n        productComparisonButton\n    } = props;\n\n    return (\n        <Module {...ModuleProps}>\n            <Node {...MediaGalleryContainerProps}>{props.mediaGallery}</Node>\n            <Node {...ProductInfoContainerProps}>\n                {title}\n                {price}\n                {unitOfMeasure}\n                {props.bulkPurchaseLink}\n                {description}\n                {rating}\n                {configure && _renderConfigure(configure)}\n                {keyInPrice && _renderKeyInPrice(keyInPrice)}\n                {quantity && _renderQuantity(quantity)}\n                {inventoryLabel}\n                {addToCart && _renderAddToCart(addToCart)}\n                {findInStore && _renderFindInStore(findInStore)}\n                {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\n                {addToWishlist && _renderAddToWishlist(addToWishlist)}\n                {_renderSocialShare(props.slots && props.slots.socialShare)}\n                {productComparisonButton}\n                {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\n                {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\n            </Node>\n        </Module>\n    );\n};\n\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n    const { ContainerProps, errorBlock, button } = addToCart;\n\n    return (\n        <Node {...ContainerProps}>\n            {errorBlock}\n            {button}\n        </Node>\n    );\n};\n\nconst _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\n    const { ContainerProps, errorBlock, button } = addToOrderTemplate;\n\n    return (\n        <Node {...ContainerProps}>\n            {errorBlock}\n            {button}\n        </Node>\n    );\n};\n\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\n    const { ContainerProps, errorBlock, button } = addToWishlist;\n\n    return (\n        <Node {...ContainerProps}>\n            {errorBlock}\n            {button}\n        </Node>\n    );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n    const { ContainerProps, dropdowns } = configure;\n\n    return <Node {...ContainerProps}>{dropdowns.map(_renderConfigureDropdown)}</Node>;\n};\n\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\n    if (!socialShare || socialShare.length === 0) {\n        return undefined;\n    }\n\n    return <>{socialShare[0]}</>;\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n    const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n    return (\n        <Node {...ContainerProps}>\n            <Node {...LabelContainerProps}>\n                {heading}\n                {errors}\n            </Node>\n            {select}\n        </Node>\n    );\n};\n\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\n    const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\n\n    return (\n        <Node {...ContainerProps}>\n            {storeSelector}\n            {heading}\n            {productPickupOptionList}\n            {description}\n            {errors}\n            {button}\n            {modal}\n        </Node>\n    );\n};\n\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): JSX.Element => {\n    const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\n\n    return (\n        <Node {...ContainerProps}>\n            <Node {...LabelContainerProps}>\n                {heading}\n                {errors}\n            </Node>\n            {input}\n        </Node>\n    );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n    const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n    return (\n        <Node {...ContainerProps}>\n            <Node {...LabelContainerProps}>{heading}</Node>\n            {input}\n        </Node>\n    );\n};\n\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\n    const { ContainerProps, errors, input } = shopSimilarItem;\n\n    return (\n        <Node {...ContainerProps}>\n            {errors}\n            {input}\n        </Node>\n    );\n};\nexport default BuyboxView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IRequestContext } from '@msdyn365-commerce/core';\n\n/**\n * Gets correct alt text for image based on configuration of site.\n * @param context Current request context.\n * @param shouldUseCmsAltText Should use CMS alt text.\n * @param productName Product name.\n * @param imageAltText Alt-text from CMS image.\n */\nexport function getAltText(\n    context: IRequestContext,\n    shouldUseCmsAltText: boolean,\n    productName?: string,\n    imageAltText?: string\n): string | undefined {\n    if (!context?.app?.config?.OmniChannelMedia) {\n        return productName;\n    }\n    if (shouldUseCmsAltText) {\n        return imageAltText;\n    }\n    return productName;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { commerceApiRequest, getCatalogId, IActionContext, IImageData, IImageSettings } from '@msdyn365-commerce/core';\nimport { MediaLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getMediaLocationsForSelectedVariant, MediaLocationsForSelectedVariantInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { getAltText } from './helper';\n\nexport async function getValidProductImages(\n    productId: number,\n    channelId: number,\n    actionContext: IActionContext,\n    imageSettings: IImageSettings,\n    selectedProduct?: SimpleProduct\n): Promise<IImageData[]> {\n    const catalogId = getCatalogId(actionContext.requestContext);\n    const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct, catalogId);\n\n    return getMediaLocationsForSelectedVariant(actionInput, actionContext)\n        .then(mediaLocations => {\n            if (mediaLocations) {\n                return Promise.all(mediaLocations.map(async mediaLocation => validateMediaLocaionAsync(mediaLocation, imageSettings))).then(\n                    pairs => {\n                        return pairs.filter(pair => pair[1]).map(pair => pair[0]);\n                    }\n                );\n            }\n            return [];\n        })\n        .catch(error => {\n            actionContext.telemetry.exception(error);\n            actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\n            return [];\n        });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-unused-vars-experimental -- .\nasync function validateMediaLocaionAsync(mediaLocation: MediaLocation, imageSettings?: IImageSettings): Promise<[IImageData, boolean]> {\n    const imageData = {\n        src: mediaLocation.Uri || '',\n        altText: mediaLocation.AltText || ''\n    };\n\n    if (imageData.src === '') {\n        return [imageData, false];\n    }\n\n    return new Promise<[IImageData, boolean]>(resolve => {\n        try {\n            const http = new XMLHttpRequest();\n            http.open('HEAD', imageData.src, true);\n\n            http.addEventListener('load', () => {\n                resolve([imageData, http.status === 200 || http.status === 201]);\n            });\n\n            http.addEventListener('error', () => {\n                resolve([imageData, false]);\n            });\n\n            http.send();\n        } catch {\n            resolve([imageData, false]);\n        }\n    });\n}\n\n/**\n * Gets product variant images on dimension change of buy-box module for Omni scenario.\n * @param productId Product record id.\n * @param shouldUseCmsAltText Alt-text source to use.\n * @param channelId Current channel id.\n * @param actionContext Current action context.\n * @param productName Product name.\n * @param selectedProduct Currently selected variant product.\n * @returns List of images.\n */\n\nexport async function getProductImages(\n    productId: number,\n    shouldUseCmsAltText: boolean,\n    channelId: number,\n    actionContext: IActionContext,\n    productName?: string,\n    selectedProduct?: SimpleProduct\n): Promise<IImageData[]> {\n    const catalogId = getCatalogId(actionContext.requestContext);\n    if (actionContext.requestContext?.params?.isPreview) {\n        const response = await commerceApiRequest(actionContext.requestContext, 'msdyn365-ochannel-product-info', 'post', {\n            productId: productId,\n            channelId: channelId,\n            catalogId: catalogId\n        });\n        if (response.status !== 200) {\n            actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant for preview scenario');\n            return [];\n        }\n        const previewImageData = response?.data as MediaLocation[];\n        if (previewImageData) {\n            return previewImageData.map(mediaLocation => {\n                return {\n                    src: mediaLocation.Uri ?? '',\n                    altText: getAltText(actionContext.requestContext, shouldUseCmsAltText, productName, mediaLocation.AltText),\n                    additionalProperties: mediaLocation.IsApplicableForChildEntities\n                        ? {\n                              isApplicableForChildEntities: 'true'\n                          }\n                        : undefined\n                };\n            });\n        }\n        return [];\n    }\n    const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct, catalogId);\n    return getMediaLocationsForSelectedVariant(actionInput, actionContext)\n        .then(mediaLocations => {\n            if (mediaLocations) {\n                return mediaLocations.map(mediaLocation => {\n                    return {\n                        src: mediaLocation.Uri ?? '',\n                        altText: getAltText(actionContext.requestContext, shouldUseCmsAltText, productName, mediaLocation.AltText),\n                        additionalProperties: mediaLocation.IsApplicableForChildEntities\n                            ? {\n                                  isApplicableForChildEntities: 'true'\n                              }\n                            : undefined\n                    };\n                });\n            }\n            return [];\n        })\n        .catch(error => {\n            actionContext.telemetry.exception(error);\n            actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\n            return [];\n        });\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { Carousel, ICarouselProps } from '@msdyn365-commerce/components';\nimport msdyn365Commerce, { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport {\n    ProductDeliveryOptions,\n    ProductDimension,\n    ProductDimensionValue,\n    ProductPrice,\n    ReleasedProductType,\n    SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n    ArrayExtensions,\n    convertProductDimensionTypeToDimensionTypes,\n    FinitePromiseQueue,\n    FinitePromiseQueueError,\n    getDeliveryOptionsForSelectedVariant,\n    GetDeliveryOptionsForSelectedVariantInput,\n    getDimensionsForSelectedVariant,\n    GetDimensionsForSelectedVariantInput,\n    getPriceForSelectedVariant,\n    getProductAvailabilitiesForSelectedVariant,\n    getProductPageUrlSync,\n    getSelectedVariant,\n    IProductInventoryInformation,\n    IPromiseQueue,\n    ISelectedProduct,\n    ObjectExtensions,\n    PriceForSelectedVariantInput,\n    ProductAvailabilitiesForSelectedVariantInput,\n    QueryResultSettingsProxy,\n    SelectedVariantInput,\n    StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n    Button,\n    format,\n    getPayloadObject,\n    getTelemetryAttributes,\n    getTelemetryObject,\n    IComponentNodeProps,\n    IModuleProps,\n    IncrementalQuantity,\n    INodeProps,\n    ISingleSlideCarouselProps,\n    isMobile,\n    ITelemetryContent,\n    KeyCodes,\n    Modal,\n    ModalBody,\n    ModalFooter,\n    ModalHeader,\n    NodeTag,\n    onTelemetryClick,\n    SingleSlideCarousel,\n    TelemetryConstant,\n    updateMaxQuantityForCartLineItem,\n    VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { Spinner, SpinnerSize } from 'office-ui-fabric-react';\nimport React, { ReactNode } from 'react';\n\nimport {\n    getBuyboxAddToCart,\n    getBuyBoxInventoryLabel,\n    getBuyboxKeyInPrice,\n    getBuyboxProductAddToWishlist,\n    getBuyboxProductDescription,\n    getBuyboxProductPrice,\n    getBuyboxProductRating,\n    getBuyboxProductTitle,\n    getBuyboxProductUnitOfMeasure,\n    getQuantityLimitsMessages,\n    IBuyboxAddToCartViewProps,\n    IBuyboxAddToOrderTemplateViewProps,\n    IBuyboxAddToWishlistViewProps,\n    IBuyboxCallbacks,\n    IBuyboxCommonData,\n    IBuyboxExtentedProps,\n    IBuyboxKeyInPriceViewProps,\n    IBuyboxProductConfigureViewProps,\n    IBuyboxProductQuantityViewProps,\n    IBuyboxState,\n    IErrorState,\n    IProductDetails,\n    RetailDefaultOrderQuantityLimitsFeatureName,\n    EcommerceQuantityLimitConfigurationsFeatureName,\n    RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName\n} from '../../common';\nimport { getBuyboxProductConfigure } from '../../common/buybox-product-configure';\nimport { IQuickviewData } from './quickview.data';\nimport { IQuickviewProps, IQuickviewResources } from './quickview.props.autogenerated';\nimport { getProductDetails } from './utilities/get-product-details';\nimport { getProductImages, getValidProductImages } from './utilities/get-valid-product-images';\nimport { RecentlyViewedState } from '../recently-viewed';\nimport { getDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\n\n/**\n * QuickView props Interface.\n */\nexport interface IQuickviewViewProps extends IQuickviewProps<IQuickviewData> {\n    quickView: IModuleProps;\n    quickViewButton: React.ReactNode;\n    ModalContainer: IModuleProps;\n    ModalHeaderContainer: INodeProps;\n    ModalHeaderContent: React.ReactNode;\n    ModalFooterContainer: INodeProps;\n    ModalBodyContainer: INodeProps;\n    cartContainerProps: INodeProps;\n    state: IBuyboxState;\n    ModuleProps?: IModuleProps;\n    ProductInfoContainerProps: INodeProps;\n    MediaGalleryContainerProps: INodeProps;\n    callbacks?: IBuyboxCallbacks;\n    title?: React.ReactNode;\n    description?: React.ReactNode;\n    configure?: IBuyboxProductConfigureViewProps;\n    inventoryLabel?: React.ReactNode;\n    rating?: React.ReactNode;\n    price?: React.ReactNode;\n    addToCart?: IBuyboxAddToCartViewProps;\n    addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps;\n    addToWishlist?: IBuyboxAddToWishlistViewProps;\n    max: number | undefined;\n    keyInPrice?: IBuyboxKeyInPriceViewProps;\n    quantity?: IBuyboxProductQuantityViewProps;\n    quantityLimitsMessages?: React.ReactNode;\n    CarouselProps: INodeProps;\n    Thumbnails: IQuickViewThumbnailsViewProps;\n    seeDetailsbutton: React.ReactNode;\n    isModalOpen: boolean;\n    loading?: React.ReactNode;\n    unitOfMeasure?: React.ReactNode;\n    productDetails?: IProductDetails | undefined;\n    isMobileDevice?: boolean;\n}\n\n/**\n * QuickView extend props Interface.\n */\nexport interface IQuickviewExtentedProps<T> extends IQuickviewProps<IQuickviewData> {\n    selectedProductId?: number;\n    selectedDimensions?: ProductDimension[];\n}\n\n/**\n * QuickView thumbnails props Interface.\n */\nexport interface IQuickViewThumbnailsViewProps {\n    ThumbnailsContainerProps: INodeProps;\n    SingleSlideCarouselComponentProps: INodeProps;\n    items?: IQuickViewThumbnailItemViewProps[];\n}\n\n/**\n * QuickView thumbnail item view props Interface.\n */\nexport interface IQuickViewThumbnailItemViewProps {\n    ThumbnailItemContainerProps: INodeProps;\n    Picture: React.ReactElement;\n}\n\n/**\n * QuickView state Interface.\n */\nexport interface IQuickViewState extends IBuyboxState {\n    isDataLoaded: boolean;\n}\n\n/**\n *\n * Quickview component.\n * @extends {React.Component<IQuickviewProps<IQuickviewData>>}\n */\nclass Quickview extends React.Component<IQuickviewExtentedProps<IQuickviewData>, IQuickViewState> {\n    /**\n     * A queue of tasks of processing the changes in the dimensions.\n     * Limit to two processes:\n     * 1 - for the current process, which is under execution at the moment.\n     * 2 - next process, which will process the latest version of data.\n     * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\n     */\n    private readonly dimensionUpdateQueue: IPromiseQueue<void> = new FinitePromiseQueue<void>(2);\n\n    private dimensions: { [id: number]: string } = {};\n\n    private initializedDimensions: Set<string> = new Set();\n\n    private readonly telemetryContent: ITelemetryContent;\n\n    private productDetails: IProductDetails | undefined;\n\n    private readonly quickViewCallbacks: IBuyboxCallbacks = {\n        updateQuantity: (newQuantity: number): boolean => {\n            const errorState = { ...this.state.errorState };\n            errorState.quantityError = undefined;\n            errorState.otherError = undefined;\n\n            this.setState({ quantity: newQuantity, errorState });\n            return true;\n        },\n        updateErrorState: (newErrorState: IErrorState): void => {\n            this.setState({ errorState: newErrorState });\n        },\n        updateSelectedProduct: (\n            newSelectedProduct: Promise<SimpleProduct | null>,\n            newInventory: IProductInventoryInformation | undefined,\n            newPrice: ProductPrice | undefined,\n            newDeliveryOptions: ProductDeliveryOptions | undefined\n        ): void => {\n            this.setState({\n                selectedProduct: newSelectedProduct,\n                productAvailableQuantity: newInventory,\n                productDeliveryOptions: newDeliveryOptions\n            });\n            this._updatePrice(newPrice);\n        },\n        initializeDimension: (initializedDimension: string): void => {\n            if (initializedDimension) {\n                this.initializedDimensions.add(initializedDimension);\n            }\n        },\n        dimensionSelectedAsync: async (selectedDimensionId: number, selectedDimensionValueId: string): Promise<void> => {\n            this.dimensions[selectedDimensionId] = selectedDimensionValueId;\n            // Only trigger _updateDimensions when all dimensions are initialized\n            if (this.initializedDimensions.size === this.productDetails?.product?.Dimensions?.length) {\n                return this.dimensionUpdateQueue\n                    .enqueue(async () => {\n                        return this._updateDimensions();\n                    })\n                    .catch((error: unknown) => {\n                        // Ignore discarded processes.\n                        if (error !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\n                            throw error;\n                        }\n                    });\n            }\n        },\n        getDropdownName: (dimensionType: number, resources: IQuickviewResources): string => {\n            return this._getDropdownName(dimensionType, resources);\n        },\n        changeModalOpen: (isModalOpen: boolean): void => {\n            this._hideQuickViewDialog();\n        },\n        changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\n            this.setState({ isUpdatingDimension });\n        },\n        updateKeyInPrice: (customPrice: number): void => {\n            // Remove custom amount error when updating the custom price\n            const errorState = { ...this.state.errorState };\n            errorState.customAmountError = undefined;\n\n            this.setState({ isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState });\n            this._updatePrice(this.state.productPrice, customPrice);\n        }\n    };\n\n    private readonly defaultGalleryImageSettings: IImageSettings = {\n        viewports: {\n            xs: { q: 'w=767&h=767&m=8', w: 0, h: 0 },\n            sm: { q: 'w=600&h=600&m=8', w: 0, h: 0 },\n            md: { q: 'w=600&h=772&m=8', w: 0, h: 0 },\n            lg: { q: 'h=772&m=8', w: 0, h: 0 }\n        },\n        lazyload: true,\n        cropFocalRegion: true\n    };\n\n    private readonly defaultThumbnailImageSettings: IImageSettings = {\n        viewports: {\n            xs: { q: 'w=100&m=8', w: 100, h: 0 },\n            lg: { q: 'w=100&m=8', w: 100, h: 0 }\n        },\n        lazyload: true,\n        cropFocalRegion: true\n    };\n\n    public constructor(props: IQuickviewProps<IQuickviewData>) {\n        super(props);\n        this.state = {\n            modalOpen: false,\n            quantity: 1,\n            min: undefined,\n            max: undefined,\n            errorState: {\n                configureErrors: {}\n            },\n            selectedProduct: undefined,\n            productPrice: undefined,\n            productDeliveryOptions: undefined,\n            isUpdatingDimension: false,\n            activeIndex: 0,\n            animating: false,\n            mediaGalleryItems: undefined,\n            isDataLoaded: false\n        };\n\n        this._quickViewCloseButtonclick = this._quickViewCloseButtonclick.bind(this);\n        this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n    }\n\n    /**\n     * React should component udpate function.\n     * @param nextProps - Next Props.\n     * @param nextState - Next State.\n     * @returns Boolean - Whether the module will rerender or not.\n     */\n    public shouldComponentUpdate(nextProps: IQuickviewProps<IQuickviewData>, nextState: IBuyboxState): boolean {\n        if (this.state === nextState && this.props.data === nextProps.data) {\n            return false;\n        }\n        return true;\n    }\n\n    public render(): JSX.Element | null {\n        const {\n            config: { className = '' },\n            resources\n        } = this.props;\n        const { max } = this.state;\n        const product = this.productDetails?.product ? this.productDetails.product : undefined;\n        const props = this.props as IBuyboxExtentedProps<IBuyboxCommonData>;\n        const defaultMinimumKeyInPrice = 10;\n        const defaultMaximumKeyInPrice = 100;\n        const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n        const viewprops: IQuickviewViewProps = {\n            ...(this.props as IQuickviewExtentedProps<IQuickviewData>),\n            state: this.state,\n            productDetails: this.productDetails,\n            isModalOpen: this.state.modalOpen!,\n            quickView: {\n                moduleProps: this.props,\n                className: classnames('ms-quickView', className),\n                tag: 'div'\n            },\n            isMobileDevice,\n            quickViewButton: (\n                <button className='ms-quickView__button' onClick={this.onClickHandler} aria-label={resources.quickViewbuttonText}>\n                    {resources.quickViewbuttonText}\n                </button>\n            ),\n            ModalContainer: {\n                moduleProps: this.props,\n                tag: Modal,\n                className: 'ms-quickView__dialog',\n                isOpen: this.state.modalOpen,\n                'aria-label': format(resources.quickViewAriaLabel, this.productDetails?.product?.Name),\n                toggle: this._quickViewCloseButtonclick,\n                modalTransition: { timeout: 0 },\n                shouldUpdateFocusToFirstElement: this.state.isDataLoaded\n            },\n            ModalHeaderContainer: {\n                tag: ModalHeader,\n                className: 'ms-quickView__header',\n                toggle: this._quickViewCloseButtonclick\n            },\n            ModalFooterContainer: {\n                tag: ModalFooter,\n                className: 'ms-quickView__footer'\n            },\n            ModalHeaderContent: '',\n            ModalBodyContainer: {\n                tag: ModalBody,\n                className: 'ms-quickView__body'\n            },\n            cartContainerProps: {\n                className: 'ms-quickView__product-add-to-cart'\n            },\n            ProductInfoContainerProps: {\n                className: 'ms-quickView__content'\n            },\n            MediaGalleryContainerProps: {\n                className: 'ms-quickView__media-gallery'\n            },\n            seeDetailsbutton: this._renderSeeDetailButton(product),\n            loading: !this.state.isDataLoaded && (\n                <Spinner className='ms-quickView__loading__icon' label={resources.loadingText} size={SpinnerSize.large} />\n            ),\n            callbacks: this.quickViewCallbacks,\n            title: this.state.isDataLoaded && getBuyboxProductTitle(props, this.productDetails),\n            description: this.state.isDataLoaded && getBuyboxProductDescription(props, this.productDetails),\n            configure: this.state.isDataLoaded\n                ? getBuyboxProductConfigure(props, this.state, this.quickViewCallbacks, this.productDetails, this.props.selectedDimensions)\n                : undefined,\n            price: this.state.isDataLoaded && getBuyboxProductPrice(props, this.state),\n            unitOfMeasure: this.state.isDataLoaded && getBuyboxProductUnitOfMeasure(props, this.productDetails),\n            rating:\n                this.state.isDataLoaded && !this.props.context.app.config.hideRating && getBuyboxProductRating(props, this.productDetails),\n            addToCart: this.state.isDataLoaded\n                ? getBuyboxAddToCart(\n                      props,\n                      this.state,\n                      this.quickViewCallbacks,\n                      defaultMinimumKeyInPrice,\n                      defaultMaximumKeyInPrice,\n                      this.productDetails\n                  )\n                : undefined,\n            keyInPrice:\n                this.state.isDataLoaded && this.props.config.enableKeyInPrice && this.state.isCustomPriceSelected\n                    ? getBuyboxKeyInPrice(props, this.state, this.quickViewCallbacks)\n                    : undefined,\n            quantity: product?.IsGiftCard ? undefined : this._renderQuantity(this.props, this.state, this.quickViewCallbacks),\n            inventoryLabel: this.state.isDataLoaded && getBuyBoxInventoryLabel(props, this.productDetails),\n            addToWishlist: this.state.isDataLoaded\n                ? getBuyboxProductAddToWishlist(props, this.state, this.quickViewCallbacks, this.productDetails)\n                : undefined,\n            quantityLimitsMessages: this.state.isDataLoaded && getQuantityLimitsMessages(props, this.state),\n            max,\n            CarouselProps: this._renderCarousel(),\n            Thumbnails: this._renderThumbnails()\n        };\n\n        return this.props.renderView(viewprops) as React.ReactElement;\n    }\n\n    /**\n     * Method to render detail button on quick view.\n     * @param product - Simple product object.\n     * @returns JSX element.\n     */\n    private readonly _renderSeeDetailButton = (product: SimpleProduct | undefined): JSX.Element => {\n        const { config } = this.props;\n        const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.seeDetails, '');\n        const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n\n        return (\n            <Button\n                className='ms-quickView__seeDetailsbutton'\n                onClick={onTelemetryClick(this.telemetryContent, payLoad, TelemetryConstant.seeDetails)}\n                {...attributes}\n                aria-label={config.seeDetailsLinkText}\n                href={this._getProductURL(product)}\n            >\n                {config.seeDetailsLinkText}\n            </Button>\n        );\n    };\n\n    /**\n     * Method to return carousel.\n     * @returns Node props.\n     */\n    private readonly _renderCarousel = (): INodeProps => {\n        const { config, resources } = this.props;\n        let mediaGalleryItems: ReactNode[];\n        let keys: (string | undefined)[];\n        const galleryImageSettings = config.galleryImageSettings;\n        if (galleryImageSettings) {\n            galleryImageSettings.cropFocalRegion = true;\n        }\n\n        if (ArrayExtensions.hasElements(this.state.mediaGalleryItems)) {\n            mediaGalleryItems = this.state.mediaGalleryItems.map((item: IImageData, index: number) => {\n                return this._renderCarouselItemImageView(item, galleryImageSettings || this.defaultGalleryImageSettings, index);\n            });\n            keys = [...this.state.mediaGalleryItems.map(item => item.src)];\n        } else {\n            mediaGalleryItems = [this._renderEmptyImage(galleryImageSettings)];\n            keys = ['empty'];\n        }\n\n        const props: IComponentNodeProps<ICarouselProps> = {\n            tag: Carousel,\n            className: 'ms-media-gallery__carousel',\n            items: mediaGalleryItems,\n            activeIndex: this.state.activeIndex ?? 0,\n            next: this.next,\n            previous: this.previous,\n            interval: false,\n            directionTextPrev: resources.previousScreenshotFlipperText,\n            directionTextNext: resources.nextScreenshotFlipperText,\n            indicatorAriaText: resources.ariaLabelForSlide,\n            onIndicatorsClickHandler: this.goToIndex,\n            handleOnExited: this.onExited,\n            handleOnExiting: this.onExiting,\n            key: keys\n        };\n\n        return props;\n    };\n\n    /**\n     * Method to render thumbnails.\n     * @returns QuickView Thumbnails view props.\n     */\n    private readonly _renderThumbnails = (): IQuickViewThumbnailsViewProps => {\n        const { config, id, resources } = this.props;\n\n        const thumbnailImageSettings = config.thumbnailImageSettings;\n        if (thumbnailImageSettings) {\n            thumbnailImageSettings.cropFocalRegion = true;\n        }\n\n        let mediaGalleryItems: IQuickViewThumbnailItemViewProps[];\n        let keys: (string | undefined)[];\n        if (ArrayExtensions.hasElements(this.state.mediaGalleryItems)) {\n            mediaGalleryItems = this.state.mediaGalleryItems.map((item: IImageData, index: number) => {\n                return this._getThumbnailItem(\n                    item,\n                    thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n                    index,\n                    this.state.activeIndex!\n                );\n            });\n            keys = [...this.state.mediaGalleryItems.map(item => item.src)];\n        } else {\n            mediaGalleryItems = [];\n            keys = [];\n        }\n\n        return {\n            ThumbnailsContainerProps: { className: 'ms-media-gallery__thumbnails-container' },\n            SingleSlideCarouselComponentProps: {\n                tag: SingleSlideCarousel,\n                className: 'ms-media-gallery__thumbnails',\n                flipperPrevLabel: resources.previousScreenshotFlipperText,\n                flipperNextLabel: resources.nextScreenshotFlipperText,\n                parentId: id,\n                useTabList: true,\n                key: JSON.stringify(keys)\n            } as IComponentNodeProps<ISingleSlideCarouselProps>,\n            items: mediaGalleryItems\n        };\n    };\n\n    private _updateMediaItems(lastUpdatedTime: number): void {\n        const product = this.productDetails?.product;\n        if (!this.state.mediaGalleryItems && product?.PrimaryImageUrl) {\n            this.setState({\n                mediaGalleryItems: [this._mapProductToImageData(product)],\n                lastUpdate: lastUpdatedTime\n            });\n        }\n    }\n\n    private _updatePrice(newPrice: ProductPrice | undefined, customPrice: number | undefined = this.state.keyInPriceAmount): void {\n        if (this.state.isCustomPriceSelected && newPrice) {\n            newPrice.CustomerContextualPrice = customPrice;\n        }\n        this.setState({ productPrice: newPrice });\n    }\n\n    private readonly _updateDimensions = async (): Promise<void> => {\n        const {\n            context: {\n                actionContext,\n                request: {\n                    apiSettings: { channelId }\n                }\n            }\n        } = this.props;\n\n        const { product, productDimensions } = this.productDetails!;\n\n        if (!product || !productDimensions) {\n            return;\n        }\n\n        const dimensionsToUpdate: { [id: number]: string } = { ...this.dimensions };\n        this.setState({ isUpdatingDimension: true });\n\n        // Step 1: Clear error state to display relevant errors\n        if (this.state.errorState.otherError || this.state.errorState.quantityError) {\n            const clearErrorState = { ...this.state.errorState };\n            clearErrorState.otherError = undefined;\n            if (this.state.errorState.errorHost === 'ADDTOCART') {\n                clearErrorState.quantityError = undefined;\n                clearErrorState.errorHost = undefined;\n            }\n            this.setState({ errorState: clearErrorState });\n        }\n\n        // Step 2: Clear any errors indicating the dimension wasn't selected\n        for (const key of Object.keys(dimensionsToUpdate)) {\n            if (this.state.errorState.configureErrors[key]) {\n                const errorState = { ...this.state.errorState };\n                errorState.configureErrors[key] = undefined;\n\n                this.setState({ errorState });\n            }\n        }\n\n        // Step 3, Build the actually selected dimensions, prioritizing the information in state\n        // over the information in data\n        const mappedDimensions = productDimensions\n            .map(dimension => {\n                return {\n                    DimensionTypeValue: dimension.DimensionTypeValue,\n                    DimensionValue:\n                        this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) || dimension.DimensionValue,\n                    ExtensionProperties: dimension.ExtensionProperties\n                };\n            })\n            .filter(dimension => {\n                return dimension && dimension.DimensionValue;\n            });\n\n        // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\n        // so that places like add to cart can await it\n        const selectedProduct = new Promise<ISelectedProduct | null>(async resolve => {\n            const newProduct = await getSelectedVariant(\n                new SelectedVariantInput(\n                    product.MasterProductId ? product.MasterProductId : product.RecordId,\n                    channelId,\n                    mappedDimensions,\n                    undefined,\n                    this.props.context.request\n                ),\n                actionContext\n            );\n            if (newProduct) {\n                // @ts-expect-error\n                this.productDetails.productDimensions = await getDimensionsForSelectedVariant(\n                    new GetDimensionsForSelectedVariantInput(\n                        newProduct.MasterProductId ? newProduct.MasterProductId : newProduct.RecordId,\n                        channelId,\n                        mappedDimensions,\n                        this.props.context.request\n                    ),\n                    actionContext\n                );\n            }\n\n            resolve(newProduct);\n        });\n\n        this.setState({ selectedProduct });\n        const variantProduct = await selectedProduct;\n\n        if (variantProduct && this.productDetails) {\n            // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\n            // so that places like add to cart can await it\n            this.productDetails.product = variantProduct;\n            let images: IImageData[] = await this.getImagesForProduct(product, variantProduct);\n            images = this._filterMasterImageFromVariant(images, variantProduct);\n            this.setState({\n                mediaGalleryItems: [...images],\n                activeIndex: 0,\n                lastUpdate: Date.now()\n            });\n\n            const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\n                new ProductAvailabilitiesForSelectedVariantInput(variantProduct.RecordId, channelId),\n                actionContext\n            );\n\n            this.productDetails.productAvailableQuantity = newAvailableQuantity!;\n\n            const isCustompriceSelected = variantProduct.Dimensions?.find(\n                dimension => dimension.DimensionTypeValue === 4 && dimension.DimensionValue?.Value?.toLowerCase() === 'custom'\n            );\n\n            if (isCustompriceSelected) {\n                this.setState({ isCustomPriceSelected: true });\n            } else {\n                // Remove custom amount error when unselect the custom amount\n                const errorState = { ...this.state.errorState };\n                errorState.customAmountError = undefined;\n\n                this.setState({ isCustomPriceSelected: false, isPriceKeyedIn: false, errorState });\n            }\n\n            if (newAvailableQuantity && newAvailableQuantity.length > 0) {\n                this.setState({ productAvailableQuantity: newAvailableQuantity[0] });\n            } else {\n                this.setState({ productAvailableQuantity: undefined });\n            }\n\n            // Step 6. Use these dimensions hydrate the product price.\n            const newPrice = await getPriceForSelectedVariant(\n                new PriceForSelectedVariantInput(variantProduct.RecordId, channelId),\n                actionContext\n            );\n\n            if (newPrice) {\n                this._updatePrice(newPrice);\n            }\n\n            const RetailMulitplePickupMFeatureState = this.props.data.featureState.result?.find(\n                featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\n            );\n\n            // Step 7. Use these dimensions hydrate the product delivery options.\n            const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\n                new GetDeliveryOptionsForSelectedVariantInput(\n                    variantProduct.RecordId,\n                    channelId,\n                    undefined,\n                    undefined,\n                    RetailMulitplePickupMFeatureState?.IsEnabled\n                ),\n                actionContext\n            );\n\n            if (newDeliveryOptions) {\n                this.setState({ productDeliveryOptions: newDeliveryOptions });\n            }\n\n            this.setState({ isUpdatingDimension: false });\n            await this._updateQuantitiesInState(variantProduct);\n        }\n    };\n\n    private _getProductURL(product: SimpleProduct | undefined): string {\n        if (!product || !msdyn365Commerce.isBrowser) {\n            return '';\n        }\n\n        let productUrl = '';\n        productUrl = getProductPageUrlSync(product.Name || '', product.RecordId, this.props.context.actionContext, undefined);\n\n        const fullUrl = new URL(productUrl, window.location.href);\n        product.Dimensions?.map(dimension => {\n            const dimensionValue = dimension.DimensionValue?.Value;\n            if (!StringExtensions.isNullOrWhitespace(dimensionValue)) {\n                const dimensionName = convertProductDimensionTypeToDimensionTypes(dimension.DimensionTypeValue);\n                fullUrl.searchParams.set(dimensionName, dimensionValue!);\n            }\n        });\n        return fullUrl.href;\n    }\n\n    private shouldUseCmsAltText = (): boolean => {\n        if (this.props.config.altTextSource === 'product') {\n            return false;\n        } else {\n            return true;\n        }\n    };\n\n    private async _updateQuantitiesInState(product: SimpleProduct): Promise<void> {\n        const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\n        const isChannelLimitsFeatureEnabled = await this._isChannelLimitsFeatureEnabled();\n\n        const min: number = this._getMinQuantityForCartLineItem(isOrderQuantityLimitsFeatureEnabled, product);\n        const max: number = this._getMaxQuantityForCartLineItem(\n            isChannelLimitsFeatureEnabled || isOrderQuantityLimitsFeatureEnabled,\n            product\n        );\n        let quantity: number = this._getQuantity(product, isOrderQuantityLimitsFeatureEnabled);\n        quantity = Math.max(quantity, min);\n\n        this.setState({\n            min,\n            max,\n            quantity\n        });\n    }\n\n    private _getMinQuantityForCartLineItem(isOrderQuantityLimitsFeatureEnabled: boolean, product: SimpleProduct): number {\n        if (\n            isOrderQuantityLimitsFeatureEnabled &&\n            this._getIgnoreOrderSettings() &&\n            product?.Behavior?.MinimumQuantity &&\n            product.Behavior.MinimumQuantity > 0\n        ) {\n            return product.Behavior.MinimumQuantity;\n        }\n\n        return 1;\n    }\n\n    private _getMaxQuantityForCartLineItem(isQuantityLimitsFeatureEnabled: boolean, product: SimpleProduct): number {\n        if (\n            isQuantityLimitsFeatureEnabled &&\n            this._getIgnoreOrderSettings() &&\n            product?.Behavior?.MaximumQuantity &&\n            product.Behavior.MaximumQuantity > 0\n        ) {\n            return product.Behavior.MaximumQuantity;\n        }\n\n        return updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem);\n    }\n\n    /**\n     * Retrieves the value of the IgnoreOrderSettings property from the cart configuration.\n     * If the property is not present, it defaults to false.\n     * @returns {boolean} The value of the IgnoreOrderSettings property.\n     */\n    private _getIgnoreOrderSettings(): boolean {\n        const cartConfiguration = this.props.data.cartConfiguration;\n        return !(cartConfiguration?.result?.IgnoreOrderSettings ?? false);\n    }\n\n    private _getQuantity(product: SimpleProduct, isOrderQuantityLimitsFeatureEnabled: boolean): number {\n        const { quantity } = this.state;\n        let defaultQuantity = 1;\n\n        if (quantity !== defaultQuantity || !isOrderQuantityLimitsFeatureEnabled) {\n            return quantity;\n        }\n\n        const cartConfiguration = this.props.data.cartConfiguration;\n        const applyDefaultOrderSettingsForCartLine = cartConfiguration?.result?.ValidateDefaultOrderSettingsPerLine ?? false;\n        if (!applyDefaultOrderSettingsForCartLine) {\n            return quantity;\n        }\n\n        if (product?.Behavior?.DefaultQuantity && product.Behavior.DefaultQuantity > 0) {\n            defaultQuantity = product.Behavior.DefaultQuantity;\n        }\n\n        return defaultQuantity;\n    }\n\n    private _filterMasterImageFromVariant(images?: IImageData[], product?: ISelectedProduct | null): IImageData[] {\n        const shouldHidePrimaryImages = this.props.config.shouldHideMasterProductImagesForVariant ?? true;\n        let variantImages = images ?? [];\n        const isVariantProduct =\n            !ObjectExtensions.isNullOrUndefined(product?.MasterProductId) || !ObjectExtensions.isNullOrUndefined(product?.productVariant);\n        const itemId = product?.ItemId;\n        if (shouldHidePrimaryImages && isVariantProduct && itemId) {\n            variantImages = variantImages.filter(item => {\n                const isApplicableForChildEntities = item.additionalProperties?.isApplicableForChildEntities;\n                return !isApplicableForChildEntities;\n            });\n            if (!ArrayExtensions.hasElements(variantImages)) {\n                variantImages = images ?? [];\n            }\n        }\n        return variantImages;\n    }\n\n    private readonly _updateDimensionValue = (\n        productDimensionFull: ProductDimensionFull,\n        newValueId: string | undefined\n    ): ProductDimensionValue | undefined => {\n        if (newValueId && productDimensionFull.DimensionValues) {\n            return productDimensionFull.DimensionValues.find(dimension => dimension.RecordId === +newValueId);\n        }\n\n        return undefined;\n    };\n\n    private readonly _getDropdownName = (dimensionType: number, resources: IQuickviewResources): string => {\n        const isGiftCard = this.productDetails?.product?.IsGiftCard;\n\n        switch (dimensionType) {\n            case 1: // ProductDimensionType.Color\n                return resources.productDimensionTypeColor;\n            case 2: // ProductDimensionType.Configuration\n                return resources.productDimensionTypeConfiguration;\n            case 3: // ProductDimensionType.Size\n                return resources.productDimensionTypeSize;\n            case 4: // ProductDimensionType.Style\n                return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\n            default:\n                return '';\n        }\n    };\n\n    private async _isOrderQuantityLimitsFeatureEnabled(): Promise<boolean> {\n        const featureStatuses = await this.props.data.featureState;\n\n        const isFeatureEnabledInHq = featureStatuses?.find(\n            featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName\n        )?.IsEnabled;\n        if (!isFeatureEnabledInHq) {\n            return false;\n        }\n        const useSiteBuilderSettings = featureStatuses?.find(\n            featureState => featureState.Name === RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName\n        )?.IsEnabled;\n\n        if (useSiteBuilderSettings) {\n            const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n            if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n                return false;\n            }\n\n            if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n                return true;\n            }\n            let customerInfo;\n            try {\n                customerInfo = await this.props.data.customerInformation;\n            } catch (error) {\n                this.props.telemetry.information(error);\n                this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\n                return false;\n            }\n\n            return (\n                customerInfo &&\n                ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n                    (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\n            );\n        } else {\n            const cartConfiguration = await this.props.data.cartConfiguration;\n            return !(cartConfiguration?.IgnoreOrderSettings ?? false);\n        }\n    }\n\n    private async _isChannelLimitsFeatureEnabled(): Promise<boolean> {\n        const featureStatuses = await this.props.data.featureState;\n\n        const isChannelLimitsFeatureEnabledInHq = featureStatuses?.find(\n            featureState => featureState.Name === EcommerceQuantityLimitConfigurationsFeatureName\n        )?.IsEnabled;\n\n        return isChannelLimitsFeatureEnabledInHq ?? false;\n    }\n\n    private readonly onExiting = () => {\n        this.setState({ animating: true });\n    };\n\n    private readonly onExited = () => {\n        this.setState({ animating: false });\n    };\n\n    private readonly next = (): void => {\n        if (this.isLastItem() === undefined) {\n            return;\n        }\n\n        const nextIndex = this.isLastItem() ? 0 : this.state.activeIndex! + 1;\n        this.goToIndex(nextIndex);\n    };\n\n    private readonly previous = (): void => {\n        const nextIndex = this.isFirstItem()\n            ? this.state.mediaGalleryItems\n                ? this.state.mediaGalleryItems.length - 1\n                : 0\n            : this.state.activeIndex! - 1;\n        this.goToIndex(nextIndex);\n    };\n\n    private readonly goToIndex = (index: number): void => {\n        this.setState({ activeIndex: index });\n    };\n\n    private _renderCarouselItemImageView(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n        return <>{this._getCarouselItem(image, imageSettings, index)}</>;\n    }\n\n    private readonly _getCarouselItem = (image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode => (\n        <Image\n            requestContext={this.props.context.actionContext.requestContext}\n            className='ms-media-gallery__item'\n            {...image}\n            gridSettings={this.props.context.request.gridSettings!}\n            imageSettings={imageSettings}\n            loadFailureBehavior='default'\n            role='tabpanel'\n            key={image.src}\n            id={`${this.props.id}__carousel-item__${index}`}\n        />\n    );\n\n    private readonly _getThumbnailItem = (\n        image: IImageData,\n        imageSettings: IImageSettings,\n        index: number,\n        modifiedActiveIndex: number\n    ): IQuickViewThumbnailItemViewProps => {\n        const classes = classnames(\n            'ms-media-gallery__thumbnail-item',\n            modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\n        );\n\n        return {\n            ThumbnailItemContainerProps: {\n                tag: 'li' as NodeTag,\n                className: classes,\n                role: 'tab',\n                tabIndex: 0,\n                key: index,\n                'aria-label': image.altText,\n                'aria-selected': modifiedActiveIndex === index,\n                'aria-controls': `${this.props.id}__carousel-item__${index}`,\n                onClick: this._generateOnThumbnailClick(index),\n                onKeyDown: this._generateOnThumbnailKeyDown(index)\n            },\n            Picture: (\n                <Image\n                    requestContext={this.props.context.actionContext.requestContext}\n                    className='ms-media-gallery__thumbnail'\n                    {...image}\n                    key={image.src}\n                    gridSettings={this.props.context.request.gridSettings!}\n                    imageSettings={imageSettings}\n                    loadFailureBehavior='default'\n                />\n            )\n        };\n    };\n\n    private readonly _generateOnThumbnailKeyDown = (index: number) => {\n        return (event: React.KeyboardEvent) => {\n            if (event.which === KeyCodes.Enter || event.which === KeyCodes.Space) {\n                event.preventDefault();\n                this.goToIndex(index);\n            }\n        };\n    };\n\n    private readonly _generateOnThumbnailClick = (index: number) => {\n        return (event: React.MouseEvent<HTMLLIElement>) => {\n            event.preventDefault();\n            this.goToIndex(index);\n        };\n    };\n\n    private _mapProductToImageData(product: SimpleProduct): IImageData {\n        return {\n            src: product.PrimaryImageUrl || '',\n            altText: product.Name\n        };\n    }\n\n    private readonly isFirstItem = () => this.state.activeIndex === 0;\n\n    private readonly isLastItem = () => this.state.mediaGalleryItems && this.state.activeIndex === this.state.mediaGalleryItems.length - 1;\n\n    private readonly onClickHandler = async (event: React.MouseEvent<HTMLElement>) => {\n        return this._onClick(event, this.props);\n    };\n\n    private readonly _onClick = async (_event: React.MouseEvent<HTMLElement>, props: IQuickviewExtentedProps<IQuickviewData>) => {\n        if (!ObjectExtensions.isNullOrUndefined(props.selectedProductId)) {\n            const {\n                context: {\n                    actionContext,\n                    request: {\n                        apiSettings: { channelId }\n                    }\n                }\n            } = this.props;\n\n            if (this.props.selectedProductId) {\n                this.setState({ modalOpen: true });\n                const productId = this.props.selectedProductId;\n                const selectedDimensions = this.props.selectedDimensions;\n                this.productDetails = await getProductDetails(productId, channelId, actionContext, selectedDimensions);\n                const { product, productPrice } = this.productDetails;\n                const currentTime: number = Date.now();\n                this._updateMediaItems(currentTime);\n                if (productPrice) {\n                    this._updatePrice(productPrice);\n                }\n\n                if (product) {\n                    const { context } = this.props;\n                    if (context.app.config.maxRecentlyViewedItemsCount > 0) {\n                        RecentlyViewedState.instance(this.props.context, context.app.config.maxRecentlyViewedItemsCount, product.RecordId);\n                    }\n                    // Check if the product is service or not by product type\n                    if (product.ItemTypeValue === ReleasedProductType.Service) {\n                        this.setState({ isServiceItem: true });\n                    }\n                    await this._updateQuantitiesInState(product);\n                    let images = await this.getImagesForProduct(product, product);\n                    images = this._filterMasterImageFromVariant(images);\n                    this.setState({\n                        mediaGalleryItems: [...images],\n                        activeIndex: 0,\n                        lastUpdate: currentTime\n                    });\n                    // update product delivery options on product on quickview popUp load\n                    const newDeliveryOptions = await getDeliveryOptionsAsync(\n                        {\n                            callerContext: this.props.context.actionContext,\n                            queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(\n                                this.props.context.actionContext\n                            )\n                        },\n                        [this.props.selectedProductId]\n                    );\n                    if (newDeliveryOptions && newDeliveryOptions.length > 0) {\n                        this.setState({ productDeliveryOptions: newDeliveryOptions[0] });\n                    }\n                }\n                this.setState({ isDataLoaded: true });\n            }\n        }\n    };\n\n    private getImagesForProduct = async (product: ISelectedProduct, variantProduct: ISelectedProduct): Promise<IImageData[]> => {\n        let images: IImageData[];\n        if (this.props.context.app?.config?.OmniChannelMedia) {\n            images = await getProductImages(\n                product.RecordId,\n                this.shouldUseCmsAltText(),\n                +this.props.context.request.apiSettings.channelId,\n                this.props.context.actionContext,\n                product.Name,\n                product.productVariant ?? variantProduct\n            );\n        } else {\n            images = await getValidProductImages(\n                product.RecordId || 0,\n                +this.props.context.request.apiSettings.channelId,\n                this.props.context.actionContext,\n                this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n                product.productVariant ?? variantProduct\n            );\n        }\n        return images;\n    };\n\n    private readonly _quickViewCloseButtonclick = () => {\n        this._hideQuickViewDialog();\n    };\n\n    private _hideQuickViewDialog(): void {\n        this.dimensions = [];\n        this.setState({\n            modalOpen: false,\n            quantity: 1,\n            min: undefined,\n            max: undefined,\n            errorState: {\n                configureErrors: {}\n            },\n            selectedProduct: undefined,\n            productPrice: undefined,\n            productDeliveryOptions: undefined,\n            isUpdatingDimension: false,\n            productAvailableQuantity: undefined,\n            lastUpdate: undefined,\n            activeIndex: undefined,\n            animating: undefined,\n            mediaGalleryItems: [],\n            isDataLoaded: false\n        });\n    }\n\n    /**\n     * Quantity Change Handler.\n     * @param callbacks -Buybox callbacks.\n     * @returns Update quantity.\n     */\n    private readonly onChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number): boolean => {\n        if (callbacks.updateQuantity) {\n            return callbacks.updateQuantity(newValue);\n        }\n        return true;\n    };\n\n    private readonly _renderQuantity = (\n        props: IQuickviewExtentedProps<IQuickviewData>,\n        state: IBuyboxState,\n        callbacks: IBuyboxCallbacks\n    ): IBuyboxProductQuantityViewProps => {\n        const { resources } = props;\n\n        const {\n            quantity,\n            min,\n            max,\n            errorState: { quantityError }\n        } = state;\n\n        return {\n            ContainerProps: {\n                className: 'ms-quickView__quantity'\n            },\n            LabelContainerProps: {\n                tag: 'label',\n                className: 'ms-quickView__product-quantity-label',\n                htmlFor: 'ms-quickView__product-quantity-input'\n            },\n            heading: <div className='ms-quickView__product-quantity-label-heading'>{resources.productQuantityHeading}</div>,\n            errors: quantityError && (\n                <span className='msc-alert msc-alert-noborder msc-alert-danger'>\n                    <span className='msi-exclamation-triangle' aria-hidden='true' />\n                    <span>{quantityError}</span>\n                </span>\n            ),\n            input: (\n                <IncrementalQuantity\n                    id='ms-buybox__product-quantity-input'\n                    min={min}\n                    max={max}\n                    currentCount={quantity}\n                    onChange={this.onChangeHandler(callbacks)}\n                    inputQuantityAriaLabel={resources.inputQuantityAriaLabel}\n                    decrementButtonAriaLabel={resources.decrementButtonAriaLabel}\n                    incrementButtonAriaLabel={resources.incrementButtonAriaLabel}\n                    minQuantityText={resources.minQuantityText}\n                    maxQuantityText={resources.maxQuantityText}\n                    telemetryContent={this.telemetryContent}\n                    disabled={this.state.isUpdatingDimension}\n                />\n            )\n        };\n    };\n\n    private _renderEmptyImage(imageSettings: IImageSettings | undefined): React.ReactNode {\n        return (\n            <div className='ms-media-gallery__item'>\n                <Image\n                    requestContext={this.props.context.actionContext.requestContext}\n                    className='ms-media-gallery__item__image'\n                    src='empty'\n                    gridSettings={this.props.context.request.gridSettings!}\n                    imageSettings={imageSettings ?? this.defaultGalleryImageSettings}\n                    loadFailureBehavior='empty'\n                />\n            </div>\n        );\n    }\n}\nexport default Quickview;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { getCartStateData, GetCartStateDataInput } from '@msdyn365-commerce/global-state';\nimport { ProductDimension } from '@msdyn365-commerce/retail-proxy';\nimport {\n    getDimensionsForSelectedVariant,\n    GetDimensionsForSelectedVariantInput,\n    getPriceForSelectedVariant,\n    getProductAvailabilitiesForSelectedVariant,\n    getRatingsSummary,\n    GetRatingsSummaryInput,\n    getRnrEndpointId,\n    getRnrPartnerId,\n    getSelectedVariant,\n    PriceForSelectedVariantInput,\n    ProductAvailabilitiesForSelectedVariantInput,\n    SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IProductDetails } from '../../../common/buyboxInterface';\n\n/**\n * Calls the Retail API and returns the product details.\n * @param productId\n * @param channelId\n * @param ctx\n * @param selectedDimensions - Dimensions previously selected for the product variant.\n */\nexport async function getProductDetails(\n    productId: number,\n    channelId: number,\n    ctx: IActionContext,\n    selectedDimensions?: ProductDimension[]\n): Promise<IProductDetails> {\n    const productDetails: IProductDetails = {};\n\n    if (productId > 0 && channelId > 0) {\n        const tenantId = getRnrPartnerId(ctx);\n        const serviceEndPoint = getRnrEndpointId(ctx);\n\n        // Get Product Details\n        await getSelectedVariant(new SelectedVariantInput(productId, channelId, selectedDimensions, 'get', ctx.requestContext), ctx)\n            .then(async productResult => {\n                if (productResult) {\n                    productDetails.product = productResult;\n                }\n            })\n            .catch(error => {\n                ctx.telemetry.exception(error);\n            });\n\n        // Get Product Availability\n        await getProductAvailabilitiesForSelectedVariant(new ProductAvailabilitiesForSelectedVariantInput(productId, channelId), ctx)\n            .then(productAvailabilities => {\n                if (productAvailabilities) {\n                    productDetails.productAvailableQuantity = productAvailabilities;\n                }\n            })\n            .catch(error => {\n                ctx.telemetry.exception(error);\n            });\n\n        // Get Product Price\n        await getPriceForSelectedVariant(new PriceForSelectedVariantInput(productId, channelId, undefined), ctx)\n            .then(productPrice => {\n                if (productPrice) {\n                    productDetails.productPrice = productPrice;\n                }\n            })\n            .catch(error => {\n                ctx.telemetry.exception(error);\n            });\n\n        // Get product dimensions\n        await getDimensionsForSelectedVariant(\n            new GetDimensionsForSelectedVariantInput(productId, channelId, selectedDimensions, ctx.requestContext),\n            ctx\n        )\n            .then(productDimensions => {\n                if (productDimensions) {\n                    productDetails.productDimensions = productDimensions;\n                }\n            })\n            .catch(error => {\n                ctx.telemetry.exception(error);\n            });\n\n        // Get Cart State\n        await getCartStateData(new GetCartStateDataInput(ctx.requestContext.apiSettings, ctx.requestContext), ctx)\n            .then(cartState => {\n                productDetails.cart = cartState;\n            })\n            .catch(error => {\n                ctx.telemetry.exception(error);\n            });\n\n        // Get Product Ratings\n        if (tenantId && serviceEndPoint) {\n            await getRatingsSummary(new GetRatingsSummaryInput(productId.toString(), tenantId, serviceEndPoint), ctx)\n                .then(ratingsSummaryData => {\n                    if (ratingsSummaryData) {\n                        productDetails.ratingsSummary = ratingsSummaryData;\n                    }\n                })\n                .catch(error => {\n                    ctx.telemetry.exception(error);\n                });\n        }\n    }\n\n    return productDetails;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n    IBuyboxAddToCartViewProps,\n    IBuyboxAddToWishlistViewProps,\n    IBuyboxKeyInPriceViewProps,\n    IBuyboxProductConfigureDropdownViewProps,\n    IBuyboxProductConfigureViewProps,\n    IBuyboxProductQuantityViewProps\n} from '../../common';\nimport { IQuickviewViewProps } from './quickview';\n\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n    const { ContainerProps, errorBlock, button } = addToCart;\n\n    return (\n        <Node {...ContainerProps}>\n            {errorBlock}\n            {button}\n        </Node>\n    );\n};\n\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\n    const { ContainerProps, errorBlock, button } = addToWishlist;\n\n    return (\n        <Node {...ContainerProps}>\n            {errorBlock}\n            {button}\n        </Node>\n    );\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n    const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n    return (\n        <Node {...ContainerProps}>\n            <Node {...LabelContainerProps}>\n                {heading}\n                {errors}\n            </Node>\n            {select}\n        </Node>\n    );\n};\n\nconst _renderQuickViewPopup = (props: IQuickviewViewProps): JSX.Element => {\n    const {\n        ModalContainer,\n        ModalHeaderContainer,\n        ModalFooterContainer,\n        ModalHeaderContent,\n        ModalBodyContainer,\n        addToWishlist,\n        addToCart,\n        cartContainerProps\n    } = props;\n\n    return (\n        <Module {...ModalContainer}>\n            <Node {...ModalHeaderContainer}>{ModalHeaderContent}</Node>\n            <Node {...ModalBodyContainer}>{_renderBodyContent(props)}</Node>\n            <Node {...ModalFooterContainer}>\n                <Node {...cartContainerProps}>\n                    {addToCart && _renderAddToCart(addToCart)}\n                    {addToWishlist && _renderAddToWishlist(addToWishlist)}\n                </Node>\n            </Node>\n        </Module>\n    );\n};\n\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps, quantityLimitsMessages: React.ReactNode): JSX.Element => {\n    const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\n\n    return (\n        <Node {...ContainerProps}>\n            <Node {...LabelContainerProps}>\n                {heading}\n                {errors}\n            </Node>\n            {input}\n            {quantityLimitsMessages}\n        </Node>\n    );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n    const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n    return (\n        <Node {...ContainerProps}>\n            <Node {...LabelContainerProps}>{heading}</Node>\n            {input}\n        </Node>\n    );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n    const { ContainerProps, dropdowns } = configure;\n\n    return <Node {...ContainerProps}>{dropdowns.map(_renderConfigureDropdown)}</Node>;\n};\n\nconst _renderBodyContent = (props: IQuickviewViewProps): JSX.Element => {\n    const {\n        title,\n        price,\n        rating,\n        keyInPrice,\n        quantity,\n        configure,\n        inventoryLabel,\n        quantityLimitsMessages,\n        seeDetailsbutton,\n        loading,\n        ProductInfoContainerProps,\n        MediaGalleryContainerProps,\n        CarouselProps,\n        unitOfMeasure\n    } = props;\n    if (loading) {\n        return <>{loading}</>;\n    }\n    return (\n        <>\n            <Node {...MediaGalleryContainerProps}>\n                <Node {...CarouselProps} />\n            </Node>\n            <Node {...ProductInfoContainerProps}>\n                {title}\n                {price}\n                {unitOfMeasure}\n                {rating}\n                {configure && _renderConfigure(configure)}\n                {keyInPrice && _renderKeyInPrice(keyInPrice)}\n                {quantity && _renderQuantity(quantity, quantityLimitsMessages)}\n                {seeDetailsbutton}\n                {inventoryLabel}\n            </Node>\n        </>\n    );\n};\n\n/**\n * Functional component which renders quick view button and popup based by the given props file.\n * @param {IQuickviewViewProps} props - Configuration for the quick view component.\n * @returns {React.FC<IQuickviewViewProps>} - Functional component of the quick view.\n */\nexport const QuickViewFunctionalComponent: React.FC<IQuickviewViewProps> = (props: IQuickviewViewProps) => {\n    const { quickView, quickViewButton, isModalOpen, isMobileDevice } = props;\n    return (\n        <Module {...quickView}>\n            {!isMobileDevice && quickViewButton}\n            {isModalOpen && _renderQuickViewPopup(props)}\n        </Module>\n    );\n};\n\nexport default QuickViewFunctionalComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { RecentlyViewedItem } from './recently-viewed-item';\n\n/**\n * Represents a product for comparison.\n */\nexport class RecentlyViewedProductItem extends RecentlyViewedItem<string> {\n    public readonly productId: number;\n\n    public readonly catalogId: number;\n\n    public static getItemId(productId: number, catalogId: number): string {\n        return `${productId}-${catalogId}`;\n    }\n\n    public constructor(productId: number, catalogId: number) {\n        const itemId = RecentlyViewedProductItem.getItemId(productId, catalogId);\n        super(itemId);\n\n        this.productId = productId;\n        this.catalogId = catalogId;\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 * Represents an item for recently viewed.\n */\nexport abstract class RecentlyViewedItem<ItemId> {\n    public readonly itemId: ItemId;\n\n    public constructor(itemId: ItemId) {\n        this.itemId = itemId;\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getCatalogId, ICookieContext, ICoreContext } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { RecentlyViewedProductItem } from './base';\nimport { RecentlyViewedManager } from './recently-viewed-manager';\n\n/**\n * Represents a recently viewed product which operates a list of products and cookies to store the list.\n */\nexport class RecentlyViewedState extends RecentlyViewedManager<string, RecentlyViewedProductItem> {\n    private static readonly _recentlyViewedLocalStorageKey: string = '_msdyn365___recently_viewed_products';\n\n    public static instance(context: ICoreContext, maxRecentlyViewedItemsCount: number, productId: number): void {\n        const cookieContext: ICookieContext = context.request.cookies;\n        let items = RecentlyViewedState._retrieveItemsFromCookies(cookieContext);\n\n        const catalogId = getCatalogId(context.request);\n\n        const item = new RecentlyViewedProductItem(productId, catalogId);\n        const max: number = maxRecentlyViewedItemsCount + 1 || 11;\n        const index: number = items.map(object => object.productId).indexOf(item.productId);\n        if (item && index === -1) {\n            items.push(item);\n        } else {\n            items.splice(items.length - 1, 0, items.splice(index, 1)[0]);\n        }\n        if (items.length > max) {\n            items = items.slice(Math.max(items.length - max, 0));\n        }\n\n        RecentlyViewedState._writeToCookie(cookieContext, RecentlyViewedState._recentlyViewedLocalStorageKey, items);\n    }\n\n    private static _retrieveItemsFromCookies(cookieContext: ICookieContext): RecentlyViewedProductItem[] {\n        const items = RecentlyViewedState._readFromCookie(cookieContext, RecentlyViewedState._recentlyViewedLocalStorageKey);\n        if (!ArrayExtensions.hasElements(items)) {\n            return [];\n        }\n        return items;\n    }\n\n    private static _readFromCookie(cookieContext: ICookieContext, cookieKey: string): RecentlyViewedProductItem[] | undefined | null {\n        if (!cookieKey) {\n            return undefined;\n        }\n\n        if (!cookieContext.isConsentGiven()) {\n            return undefined;\n        }\n\n        const cookieValue = cookieContext.get<RecentlyViewedProductItem[] | undefined | null>(cookieKey);\n\n        return cookieValue.value;\n    }\n\n    private static _writeToCookie(cookieContext: ICookieContext, cookieKey: string, value: RecentlyViewedProductItem[]): void {\n        if (!cookieKey) {\n            return;\n        }\n\n        cookieContext.set(cookieKey, value, { secure: true, maxAge: 5_184_000 });\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { RecentlyViewedItem } from './base';\n\n/**\n * Represents base functionality of a recently viewed manager which operates a list of items for recently viewed.\n */\nexport class RecentlyViewedManager<ItemId, Item extends RecentlyViewedItem<ItemId> = RecentlyViewedItem<ItemId>> {\n    private _recentlyViewedItems: Item[];\n\n    public get items(): Item[] {\n        return this._recentlyViewedItems;\n    }\n\n    public constructor(...items: Item[]) {\n        this._recentlyViewedItems = items;\n    }\n}\n"],"names":["BulkPurchase","React","constructor","props","super","_errorCssClass","_errorCssGlyphClass","collapseRef","_dimensionDropDownChange","_this$collapseRef$cur","this","current","reEvaluateHeight","_onErrorMessage","errorMessage","setState","stateMessage","messageText","statusCssString","messageGlyph","isOpen","_toggleCollapse","state","isExpanded","render","_this$props$data$prod","hasDimensionsInProps","ArrayExtensions","hasElements","productDimensions","hasDimensionsInData","data","result","viewProps","_objectSpread","container","moduleProps","className","classnames","config","content","_renderCollapseContent","renderView","_renderCollapseButton","_renderCollapse","Button","onClick","title","resources","bulkPurchaseHeaderTitle","Collapse","ref","_renderMainContent","isMobileDevice","isMobile","variant","VariantType","Viewport","context","request","userMessageNode","Alert","color","undefined","RichTextComponent","text","bulkPurchaseDescriptionText","_renderMatrix","_featureState$result","_this$props$data$orde","_this$props$data$cust","featureState","isMultipleCatalogsFeatureEnabled","find","item","Name","IsEnabled","catalogId","getCatalogId","validateCatalogId","ProductDimensionsMatrix","dimensions","orderTemplates","customerInformation","dimensionOnChange","onErrorMessage","isMultipleCatalogFeatureEnabledInHq","_getClassNamePrefix","typeName","toLocaleLowerCase","getBuyBoxInventoryLabel","productDetails","_props$data$productAv","_props$data$productAv2","productAvailableQuantity","shippingInventory","shipping","deliveryType","DeliveryMode","inventoryClassName","StockLevelCode","toLowerCase","StockLevelLabel","getBuyboxProductTitle","_ref","_props$data$product$r","_props$data$product","_product$Name","titleHeadingTag","product","Heading","headingTag","getBuyboxProductDescription","_ref2","_props$data$product$r2","_props$data$product2","Description","getBuyboxProductUnitOfMeasure","_props$data$product$r3","_props$data$product3","app","unitOfMeasureDisplayType","DefaultUnitOfMeasure","telemetry","warning","telemetryContent","onAddToCartFailed","callbacks","defaultMinimumKeyInPrice","defaultMaximumKeyInPrice","cart","productAvailability","quantityErrorForState","customAmountErrorForState","otherErrorForState","getGenericError","failureReason","getQuantityError","stockLeft","cartActionResult","substatus","keyInPriceAmount","minimumKeyInPrice","formatedAmountLimit","cultureFormatter","formatCurrency","invalidSmallCustomAmountText","replace","maximumKeyInPrice","invalidLargeCustomAmountText","updateErrorState","errorHost","quantityError","configureErrors","getConfigureErrors","missingDimensions","IsGiftCard","customAmountError","otherError","onItemAddedToCart","changeModalOpen","getBuyboxAddToCart","hasAvailableProducts","_props$data$product$r4","_props$data$product4","_props$data$cart$resu","_props$data$cart","_props$data$productAv3","_props$data$productAv4","_props$data$deliveryO","_props$context$action","_props$data$deliveryO2","id","quantity","errorState","selectedProduct","isUpdatingDimension","isUpdatingDeliveryOptions","isServiceItem","ProductAvailableQuantity","length","dialogStrings","goToCartText","buyBoxGoToCartText","continueShoppingText","buyBoxContinueShoppingText","closeNotificationLabel","headerItemOneText","buyBoxSingleItemText","headerItemFormatText","buyBoxMultiLineItemFormatText","headerMessageText","buyBoxHeaderMessageText","freePriceText","priceFree","originalPriceText","currentPriceText","addedQuantityText","isProductQuantityLoading","status","changeUpdatingDimension","isLoadingDeliveryOptions","deliveryOptions","changeUpdatingDeliveryOptions","getTelemetryObject","telemetryPageName","emailDeliveryModeCode","actionContext","requestContext","channel","EmailDeliveryModeCode","productDeliveryOptions","isEmailDelivery","DeliveryOptions","Code","isDisabled","enableHidePdpRepeatingErrors","features","ContainerProps","button","AddToCartComponent","addToCartText","outOfStockText","navigationUrl","getUrlSync","price","productPrice","disabled","onError","getSelectedProduct","gridSettings","imageSettings","viewports","xs","q","w","h","lg","xl","lazyload","isAddServiceItemToCart","isPriceKeyedIn","customPriceAmount","isCustomPriceSelected","isOrderQuantityLimitsFeatureEnabled","_isOrderQuantityLimitsFeatureEnabled","_isChannelLimitsFeatureEnabled","isAddEmailDeliveryItemToCart","onAdd","isNavigationToCartPageDisabled","errorBlock","BuyboxErrorBlock","showError","getBuyboxProductPrice","_props$data$product5","_props$data$featureSt","_props$data$featureSt2","PriceComponent","isPriceMinMaxEnabled","isSalesAgreementPriceFeatureEnabled","priceResources","priceRangeSeparator","salesAgreementPricePrompt","salesAgreementExpirationDatePrompt","salesAgreementCommittedQuantityPrompt","salesAgreementRemainingQuantityPrompt","getBuyboxProductRating","_props$data$ratingsSu","_props$data$ratingsSu2","ratingsSummary","averageRating","RatingComponent","avgRating","readOnly","ariaLabel","format","averageRatingAriaLabel","ratingCount","reviewsCount","generateAddToOrderTemplateDialogResources","addToOrderTemplateHeader","noOrderTemplatesMessage","noOrderTemplatesDescription","createAnOrderTemplateButtonText","createNewOrderTemplateButtonText","cancelOrderTemplateCreationButtonText","selectTemplatesText","addToTemplateButtonText","lineItemsText","generateOrderTemplateNameDialogResources","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","generateItemAddedToOrderTemplateDialogResources","viewOrderTemplateButtonText","continueShoppingButtonText","itemAddedToOrderTemplateHeaderItemOneText","itemAddedToOrderTemplateHeaderItemFormatText","itemAddedToOrderTemplateHeaderMessageText","generateDuplicateItemsWhenAddingToOrderTemplateDialogResources","duplicatedProductsHeader","duplicatedProductsDescription","updateQuantityButtonText","cancelDuplicateItemsButtonText","onAddToOrderTemplateFailed","getBuyboxProductAddToOrderTemplate","_props$data$product6","AddToOrderTemplateComponent","Object","assign","addToOrderTemplateButtonText","addToOrderTemplateButtonTooltip","addToOrderTemplateDialogResources","createOrderTemplateDialogResources","itemAddedToOrderTemplateDialogResources","duplicateItemsWhenAddingToOrderTemplateDialogResources","shouldShowButtonFailedTooltip","getBuyboxProductComparisonButton","productComparisonButton","onAddToWishlistFailed","getBuyboxProductAddToWishlist","_props$data$product7","wishlists","AddToWishlistComponent","addToWishlistButtonText","removeFromWishlistButtonText","addToWishlistMessage","removedFromWishlistMessage","addItemToWishlistError","removeItemFromWishlistError","nameOfWishlist","ariaRole","onQuantityChangeHandler","newValue","updateQuantity","getBuyboxProductQuantity","min","max","LabelContainerProps","tag","htmlFor","heading","productQuantityHeading","errors","input","Quantity","currentCount","onChange","inputQuantityAriaLabel","getBuyboxShopSimilarButton","buttonType","_props$data$product8","telemetryText","ShopSimiliarButtonType","Looks","TelemetryConstant","ShopSimliarLooks","ShopSimliarDescription","payLoad","getPayloadObject","attribute","getTelemetryAttributes","shopSimilarLooksText","shopSimilarDescriptionText","shopSimiliarButtonType","searchURL","separator","includes","document","location","href","RecordId","onPriceChangeHandler","event","value","currentTarget","updateKeyInPrice","Number","parseFloat","getBuyboxKeyInPrice","buyboxKeyInPriceLabelHeading","type","_ref3","errorMessages","values","filter","message","push","assertive","buyboxErrorMessageHeader","map","index","key","getQuantityLimitsMessages","Node","_renderMaxLabel","maxQuantityText","_renderMinLabel","minQuantityText","RetailDefaultOrderQuantityLimitsFeatureName","EcommerceQuantityLimitConfigurationsFeatureName","RevertToSiteBuilderOrderQuantityLimitsSettingsCRTFeatureName","MAX_VALUE","informationIconText","toString","_featureStatuses$find","_featureStatuses$find2","featureStatuses","_props$context","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","IsB2b","_props$data$cartConfi","_cartConfiguration$Ig","cartConfiguration","IgnoreOrderSettings","_featureStatuses$find3","isChannelLimitsFeatureEnabledInHq","getBuyboxProductConfigure","selectedDimensions","_props$data$productDi","_props$data$productDi2","getDropdownName","productDimensionsData","enableStockCheck","hasProductDimensions","onChanged","async","_onChanged","notification","dimensionSelectedAsync","onInitializedDimension","_onInitializedDimension","initializeDimension","inventoryLevel","dimensionsInfo","productDimensionFull","_productDimensionFull","dropdownName","DimensionTypeValue","dropdownId","dropdownList","dimensionValuesWithInventory","DimensionValues","_value$DimensionValue","_value$DimensionValue2","ObjectExtensions","isNullOrUndefined","DimensionValue","_dimensionValuesWithI","_dimensionValue$Value","dimensionValue","inventoryLevelCode","getInventoryLevelCodeFromDimensionValue","Value","colorHexCode","ColorHexCode","imageUrl","ImageUrl","InventoryLevelValues","outOfStock","swatchItemAriaLabel","matchedDimensions","getDimensionValuesFromQuery","url","requestUrl","dimensionInfo","currentDimensionsFromQuery","dimensionFromQuery","currentDimensionFromQuery","selectedDimensionItem","dimensionItem","_currentDimensionFrom","isDefault","dropdowns","dimensionId","parseInt","dropdownToggleName","selectDimensionFormatString","dimensionSelectionType","SelectionType","dropdown","dimensionType","convertProductDimensionTypeToDimensionTypes","dimensionsAsSwatchConfiguration","dimensionsAsSwatchType","DimensionTypes","none","swatch","role","select","Dropdown","dropdownCallback","onInitialize","initializeCallback","selectionType","apiSettings","mapProductDimensionFullToDropdownViewProps","dimensionChanged","selectId","initializedDimension","selectMenu","_selectSwatch","selectedIndex","itemId","selectedValue","target","innerText","selectedItem","_renderSwatch","_renderDropdown","selected","hidden","swatchItems","SwatchComponent","list","onSelectItem","errorMessageOutOfStock","errorMessageOutOfRangeOneLeft","errorMessageOutOfRangeFormat","addedToCartFailureMessage","_result$cartActionRes2","_result$cartActionRes","elementFoundAt","productIdToFind","CartLines","ProductId","FulfillmentStoreId","OrgUnitNumber","getElementIndex","currentQuantity","_cartLineToUpdate$Qua","quantityLimit","maxQuantityForCartLineItem","availableQty","AvailableQuantity","Math","getQuantityLimit","maxQuantityLimitText","validationResults","_item$ErrorContext","StringExtensions","isNullOrEmpty","LocalizedMessage","ErrorContext","ErrorResourceId","errorDetails","isGiftCard","dimension","getDimensionErrorString","dimensionTypeValue","productDimensionTypeColorErrorMessage","productDimensionTypeConfigurationErrorMessage","productDimensionTypeSizeErrorMessage","productDimensionTypeAmountErrorMessage","productDimensionTypeStyleErrorMessage","modalCloseButtonReference","onClickFindInStoreHandler","_props$data","storeSelectorStateManager","modules","dataProduct","multiplePickupStoreSwitchName","retailMulitplePickupMFeatureState","Dimensions","storeSelectorId","keys","storeSelector","openDialog","parentElementRef","onLocationSelected","orgUnitLocation","deliveryMode","Promise","resolve","behavior","addToCartBehavior","addProductToCart","count","then","pickup","failureResult","AddToCartBehavior","goToCart","window","showModal","showNotification","_props$data$productPr2","defaultImageSettings","friendlyName","ItemSuccessfullyAddedToCartNotification","NotificationsManager","instance","addNotification","catch","error","exception","debug","findInStoreOnClick","getBuyboxFindInStore","_data$product","_data$productPrice","_data$cart","_data$deliveryOptions","_data$productAvailabl","_data$featureState","_data$channelDelivery","_product$Dimensions","_props$data$productPr","slots","findInStoreHeaderText","descriptionTextToShowAllPickupOptions","PickupDeliveryModeCode","channelDeliveryOptionConfig","_dimension$DimensionV","modalOpen","isSectionDisabled","buttonText","description","isStockCheck","buyboxResources","isLoading","pickupInventory","findInStoreLinkText","findInStoreDescriptionText","isAggregatedInventory","_pickupInventory","IsProductAvailable","findInStoreNotAvailableTextButton","findInStoreNotAvailableDescription","getFindInStoreInventorySettings","matchDeliveryOptions","productdeliveryOptions","storePickUpOptionList","deliveryOption","delivery","deliveryCode","PickupDeliveryModeCodes","option","priceComponent","popupProps","productQuantity","setModalOpen","renderModalPopup","Popup","openFindInStoreDialog","productPickupOptionList","modal","Buybox","dimensionUpdateQueue","FinitePromiseQueue","initializedDimensions","Set","buyboxCallbacks","newQuantity","newErrorState","updateSelectedProduct","newSelectedProduct","newInventory","newPrice","newDeliveryOptions","_updatePrice","add","selectedDimensionId","selectedDimensionValueId","size","enqueue","_updateDimensions","FinitePromiseQueueError","ProcessWasDiscardedFromTheQueue","_getDropdownName","isModalOpen","customPrice","_onBulkPurchaseLinkClick","bulkPurchaseModule","boundingRect","getBoundingClientRect","scrollX","left","pageXOffset","scrollY","top","pageYOffset","scrollTo","_isChannelMultipleCatalogsFeatureEnabled","_this$props$data$feat","feature","dimensionsToUpdate","clearErrorState","previousState","_getProductVariant","productVariant","productVariantPromise","promises","_getDimensionsForSelectedVariant","mappedDimensions","_hydrateInventoryInfo","_hydratePrice","_hydrateDeliveryOptions","_updateQuantitiesInState","all","_this$props$data$prod2","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeSize","productDimensionTypeAmount","productDimensionTypeStyle","isPriceApiCalled","ItemTypeValue","ReleasedProductType","Service","maxRecentlyViewedItemsCount","RecentlyViewedState","_this$props$data$prod3","_this$props$data$feat2","_this$props$data$feat3","_this$props$data$cart","_this$props$data$cart2","mediaGallery","flatten","validValues","applyDefaultOrderSettings","ValidateDefaultOrderSettingsPerLine","some","ModuleProps","ProductInfoContainerProps","MediaGalleryContainerProps","bulkPurchaseLink","_renderBuyboxBulkPurchaseLink","unitOfMeasure","configure","findInStore","addToCart","addToOrderTemplate","addToWishlist","rating","hideRating","inventoryLabel","shopSimilarLook","enableShopSimilarLooks","shopSimilarDescription","enableShopSimilarDescription","keyInPrice","enableKeyInPrice","quantityLimitsMessages","isChannelMultipleCatalogsFeatureEnabled","currentCatalogId","catalogs","_validateCatalogDetails","isBulkPurchaseEnabled","msdyn365Commerce","isBrowser","bulkPurchaseModules","Array","from","getElementsByClassName","bulkPurchaseLinkText","arguments","CustomerContextualPrice","channelId","_dimension$dimensionV","_dimensions$find$Dime","_dimensions$find","ExtensionProperties","setDimensionValuesToQuery","selectedProductPromise","getSelectedVariant","SelectedVariantInput","MasterProductId","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","_productVariant$Dimen","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","newShippingQuantity","getPriceForSelectedVariant","PriceForSelectedVariantInput","_this$props$data$feat4","retailMultiplePickupFeatureState","getDeliveryOptionsForSelectedVariant","GetDeliveryOptionsForSelectedVariantInput","isChannelLimitsFeatureEnabled","_getMinQuantityForCartLineItem","_getMaxQuantityForCartLineItem","_getQuantity","_product$Behavior","_getIgnoreOrderSettings","Behavior","MinimumQuantity","isQuantityLimitsFeatureEnabled","_product$Behavior2","MaximumQuantity","updateMaxQuantityForCartLineItem","_cartConfiguration$re","_cartConfiguration$re2","_cartConfiguration$re3","_cartConfiguration$re4","_product$Behavior3","defaultQuantity","DefaultQuantity","_this$props$context","information","_this$props$data$cata","_renderAddToCart","_renderAddToOrderTemplate","_renderAddToWishlist","_renderConfigure","_renderConfigureDropdown","_renderSocialShare","socialShare","_renderFindInStore","_renderQuantity","_renderKeyInPrice","_renderShopSimilarItem","shopSimilarItem","Module","getAltText","shouldUseCmsAltText","productName","imageAltText","_context$app","OmniChannelMedia","getValidProductImages","productId","actionInput","MediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariant","mediaLocations","mediaLocation","imageData","src","Uri","altText","AltText","http","XMLHttpRequest","open","addEventListener","send","_unused","validateMediaLocaionAsync","pairs","pair","Quickview","quickViewCallbacks","_this$productDetails","_hideQuickViewDialog","defaultGalleryImageSettings","sm","md","cropFocalRegion","defaultThumbnailImageSettings","_renderSeeDetailButton","seeDetails","attributes","onTelemetryClick","seeDetailsLinkText","_getProductURL","_renderCarousel","_this$state$activeInd","mediaGalleryItems","galleryImageSettings","_renderCarouselItemImageView","_renderEmptyImage","Carousel","items","activeIndex","next","previous","interval","directionTextPrev","previousScreenshotFlipperText","directionTextNext","nextScreenshotFlipperText","indicatorAriaText","ariaLabelForSlide","onIndicatorsClickHandler","goToIndex","handleOnExited","onExited","handleOnExiting","onExiting","_renderThumbnails","thumbnailImageSettings","_getThumbnailItem","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperNextLabel","parentId","useTabList","JSON","stringify","_updateDimensionValue","newProduct","variantProduct","_variantProduct$Dimen","images","getImagesForProduct","_filterMasterImageFromVariant","lastUpdate","Date","now","RetailMulitplePickupMFeatureState","altTextSource","newValueId","_this$productDetails2","animating","isLastItem","nextIndex","isFirstItem","_getCarouselItem","image","Image","loadFailureBehavior","modifiedActiveIndex","ThumbnailItemContainerProps","tabIndex","_generateOnThumbnailClick","onKeyDown","_generateOnThumbnailKeyDown","Picture","which","KeyCodes","Enter","Space","preventDefault","onClickHandler","_onClick","_event","selectedProductId","ctx","tenantId","getRnrPartnerId","serviceEndPoint","getRnrEndpointId","productResult","productAvailabilities","getCartStateData","GetCartStateDataInput","cartState","getRatingsSummary","GetRatingsSummaryInput","ratingsSummaryData","getProductDetails","currentTime","_updateMediaItems","getDeliveryOptionsAsync","callerContext","queryResultSettings","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","isDataLoaded","_this$props$context$a","_product$productVaria","_this$props$config$th","_product$productVaria2","_actionContext$reques","params","isPreview","response","commerceApiRequest","previewImageData","_mediaLocation$Uri","additionalProperties","IsApplicableForChildEntities","isApplicableForChildEntities","_mediaLocation$Uri2","getProductImages","_quickViewCloseButtonclick","onChangeHandler","IncrementalQuantity","decrementButtonAriaLabel","incrementButtonAriaLabel","bind","shouldComponentUpdate","nextProps","nextState","_this$productDetails3","_this$productDetails4","viewprops","quickView","quickViewButton","quickViewbuttonText","ModalContainer","Modal","quickViewAriaLabel","toggle","modalTransition","timeout","shouldUpdateFocusToFirstElement","ModalHeaderContainer","ModalHeader","ModalFooterContainer","ModalFooter","ModalHeaderContent","ModalBodyContainer","ModalBody","cartContainerProps","seeDetailsbutton","loading","Spinner","label","loadingText","SpinnerSize","large","CarouselProps","Thumbnails","lastUpdatedTime","_this$productDetails5","PrimaryImageUrl","_mapProductToImageData","productUrl","getProductPageUrlSync","fullUrl","URL","_dimension$DimensionV2","isNullOrWhitespace","dimensionName","searchParams","set","_this$props$config$sh","shouldHidePrimaryImages","shouldHideMasterProductImagesForVariant","variantImages","isVariantProduct","ItemId","_item$additionalPrope","_renderQuickViewPopup","_renderBodyContent","QuickViewFunctionalComponent","RecentlyViewedProductItem","getItemId","_len","_key","_recentlyViewedItems","cookieContext","cookies","_retrieveItemsFromCookies","object","indexOf","splice","slice","_writeToCookie","_recentlyViewedLocalStorageKey","_readFromCookie","cookieKey","isConsentGiven","get","secure","maxAge"],"sourceRoot":""}