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JG,IAoCkBkH,CAAkB5C,GAChCvS,GA5DO,EAACA,EAA2C8S,KAChE,MAAM,eAAEnF,EAAF,oBAAkBC,EAAlB,QAAuCE,EAAvC,MAAgDG,EAAhD,OAAuDD,GAAWhO,EAExE,OACIjB,EAAAA,cAAC0V,EAAAA,KAAInR,OAAAA,OAAAA,GAAKqK,GACN5O,EAAAA,cAAC0V,EAAAA,KAAInR,OAAAA,OAAAA,GAAKsK,GACLE,EACAE,GAEJC,EACA6E,IAkDgBrF,CAAgBzN,EAAU8S,GACtC9B,EACA0B,KAYJ0C,EAA+DnW,IACxE,MAAM,UAAEwQ,EAAF,gBAAaE,EAAb,YAA8BrO,EAA9B,eAA2C8N,GAAmBnQ,EACpE,OACIF,EAAAA,cAAC4V,EAAAA,OAAMrR,OAAAA,OAAAA,GAAKmM,IACNL,GAAkBO,EACnBrO,GAAeoT,EAAsBzV,KAKlD","sources":["webpack://mattressfirm/./src/modules/quickview/utilities/get-valid-product-images.ts?78b7","webpack://mattressfirm/./src/modules/quickview/quickview.tsx?4080","webpack://mattressfirm/./src/modules/quickview/utilities/get-product-details.ts?5cc2","webpack://mattressfirm/./src/modules/quickview/quickview.view.tsx?ee5b"],"sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { 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';\n\nexport async function getValidProductImages(\n productId: number, channelId: number,\n actionContext: IActionContext, imageSettings: IImageSettings,\n selectedProduct?: SimpleProduct): Promise {\n\n const catalogId = getCatalogId(actionContext.requestContext);\n const actionInput = new MediaLocationsForSelectedVariantInput(\n productId,\n channelId,\n selectedProduct,\n catalogId\n );\n\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\n .then(mediaLocations => {\n if (mediaLocations) {\n return Promise.all(mediaLocations.map(async (mediaLocation) => validateMediaLocaionAsync(mediaLocation, imageSettings)))\n .then(pairs => {\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\n });\n }\n return [];\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 * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { Carousel, ICarouselProps } from '@msdyn365-commerce/components';\nimport { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport {\n ProductDeliveryOptions, ProductDimension,\n ProductDimensionValue, ProductPrice, ReleasedProductType, SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions, FinitePromiseQueue, FinitePromiseQueueError,\n getDeliveryOptionsForSelectedVariant, GetDeliveryOptionsForSelectedVariantInput,\n getDimensionsForSelectedVariant, GetDimensionsForSelectedVariantInput, getPriceForSelectedVariant,\n getProductAvailabilitiesForSelectedVariant, getProductPageUrlSync, getSelectedVariant,\n IProductInventoryInformation, IPromiseQueue, ISelectedProduct, ObjectExtensions, PriceForSelectedVariantInput,\n ProductAvailabilitiesForSelectedVariantInput, SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, format, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IComponentNodeProps, IModuleProps, IncrementalQuantity, INodeProps,\n ISingleSlideCarouselProps, isMobile, ITelemetryContent, KeyCodes, Modal,\n ModalBody, ModalFooter, ModalHeader, NodeTag, onTelemetryClick, SingleSlideCarousel,\n TelemetryConstant, VariantType } 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, getBuyBoxInventoryLabel, getBuyboxKeyInPrice, getBuyboxProductAddToWishlist,\n getBuyboxProductDescription, getBuyboxProductPrice, getBuyboxProductRating, getBuyboxProductTitle,\n getBuyboxProductUnitOfMeasure, getQuantityLimitsMessages,\n IBuyboxAddToCartViewProps, IBuyboxAddToOrderTemplateViewProps, IBuyboxAddToWishlistViewProps,\n IBuyboxCallbacks, IBuyboxCommonData, IBuyboxExtentedProps, IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureViewProps, IBuyboxProductQuantityViewProps,\n IBuyboxState, IErrorState, IProductDetails,\n RetailDefaultOrderQuantityLimitsFeatureName\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 { getValidProductImages } from './utilities/get-valid-product-images';\n\n/**\n * QuickView props Interface.\n */\nexport interface IQuickviewViewProps extends IQuickviewProps {\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 extends IQuickviewProps {\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>}\n */\nclass Quickview extends React.Component, 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 = new FinitePromiseQueue(2);\n\n private dimensions: { [id: number]: string } = {};\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,\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 dimensionSelectedAsync: async (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\n this.dimensions[selectedDimensionId] = selectedDimensionValueId;\n return this.dimensionUpdateQueue.enqueue(async () => {\n return this._updateDimensions();\n }).catch((error: any) => { // Ignore discarded processes.\n if (error !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\n throw error;\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) {\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, 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;\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),\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 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 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 ? getBuyboxProductConfigure(\n props, this.state, this.quickViewCallbacks, this.productDetails, this.props.selectedDimensions) : undefined,\n price: this.state.isDataLoaded && getBuyboxProductPrice(props, this.state),\n unitOfMeasure: this.state.isDataLoaded && getBuyboxProductUnitOfMeasure(props, this.productDetails),\n rating: this.state.isDataLoaded && !this.props.context.app.config.hideRating && getBuyboxProductRating(props, this.productDetails),\n addToCart:\n this.state.isDataLoaded ? (\n getBuyboxAddToCart(props, this.state, this.quickViewCallbacks, defaultMinimumKeyInPrice, defaultMaximumKeyInPrice, this.productDetails)\n ) : undefined,\n keyInPrice:\n this.state.isDataLoaded && this.props.config.enableKeyInPrice &&\n this.state.isCustomPriceSelected ? getBuyboxKeyInPrice(props, this.state, this.quickViewCallbacks) : 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 ? getBuyboxProductAddToWishlist(props, this.state, this.quickViewCallbacks, this.productDetails) : 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 \n {config.seeDetailsLinkText}\n \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 = {\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 {\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,\n items: mediaGalleryItems\n }\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(\n newPrice: ProductPrice | undefined,\n 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 => {\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.map(dimension => {\n return {\n DimensionTypeValue: dimension.DimensionTypeValue,\n DimensionValue: this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) || dimension.DimensionValue,\n ExtensionProperties: dimension.ExtensionProperties\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(async (resolve) => {\n const newProduct = (await getSelectedVariant(\n new SelectedVariantInput(\n product.MasterProductId ? product.MasterProductId : product.RecordId,\n channelId,\n mappedDimensions, 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 const images = await getValidProductImages(\n this.productDetails.product.RecordId || 0,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings || this.defaultThumbnailImageSettings,\n variantProduct.productVariant ?? variantProduct\n );\n this.setState({\n mediaGalleryItems: [...images],\n activeIndex: 0,\n lastUpdate: Date.now()\n });\n\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\n new ProductAvailabilitiesForSelectedVariantInput(\n variantProduct.RecordId,\n channelId\n ),\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 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(\n variantProduct.RecordId,\n channelId\n ),\n actionContext\n );\n\n if (newPrice) {\n this._updatePrice(newPrice);\n }\n\n const RetailMulitplePickupMFeatureState = this.props.data.featureState.result?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature');\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) {\n let producturl = ' ';\n producturl = getProductPageUrlSync(product.Name || '', product.RecordId, this.props.context && this.props.context.actionContext, undefined);\n return producturl;\n }\n return '';\n }\n\n private async _updateQuantitiesInState(product: SimpleProduct): Promise {\n const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\n const defaultQuantity = 1;\n const defaultMaxQuantity = 10;\n if (isOrderQuantityLimitsFeatureEnabled && product) {\n\n // For some of the products the DefaultQuantity is zero\n this.setState({\n min: product.Behavior?.MinimumQuantity || defaultQuantity,\n\n // If max by feature in default order settings is not defined then use max from site settings or default max 10.\n max: (product.Behavior?.MaximumQuantity && product.Behavior?.MaximumQuantity > 0) ? product.Behavior?.MaximumQuantity : this.props.context.app.config.maxQuantityForCartLineItem || defaultMaxQuantity\n });\n } else {\n this.setState({\n min: 1,\n max: this.props.context.app.config.maxQuantityForCartLineItem || 10\n });\n }\n }\n\n private readonly _updateDimensionValue = (productDimensionFull: ProductDimensionFull, newValueId: string | undefined): 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 {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context.request.app.platform?.enableDefaultOrderQuantityLimits;\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n return false;\n }\n\n const featureStatuses = await this.props.data.featureState;\n const isFeatureEnabledInHq = featureStatuses.find(featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName)?.IsEnabled;\n if (!isFeatureEnabledInHq) {\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 customerInfo !== undefined &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\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() ? (this.state.mediaGalleryItems ? this.state.mediaGalleryItems.length - 1 : 0) : 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 (<>\n {this._getCarouselItem(image, imageSettings, index)}\n );\n }\n\n private readonly _getCarouselItem = (image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode => (\n \n );\n\n private readonly _getThumbnailItem = (image: IImageData, imageSettings: IImageSettings, index: number, modifiedActiveIndex: number): 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 \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) => {\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) => {\n return this._onClick(event, this.props);\n };\n\n private readonly _onClick = async (_event: React.MouseEvent, props: IQuickviewExtentedProps) => {\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 {\n product,\n productPrice\n } = 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 // 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 const images = await getValidProductImages(\n product.RecordId,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings || this.defaultThumbnailImageSettings,\n product.productVariant ?? product\n );\n\n this.setState({\n mediaGalleryItems: [...images],\n activeIndex: 0,\n lastUpdate: currentTime\n });\n }\n this.setState({ isDataLoaded: true });\n }\n }\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 /**\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 = (props: IQuickviewExtentedProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxProductQuantityViewProps => {\n\n const {\n resources\n } = props;\n\n const\n {\n quantity,\n max,\n errorState: {\n quantityError\n }\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: (\n
\n {resources.productQuantityHeading}\n
\n ),\n errors: quantityError && (\n \n \n ),\n input: (\n \n )\n };\n };\n\n private _renderEmptyImage(imageSettings: IImageSettings | undefined): React.ReactNode {\n return (\n
\n \n
\n );\n }\n}\nexport default Quickview;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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, GetDimensionsForSelectedVariantInput, getPriceForSelectedVariant, getProductAvailabilitiesForSelectedVariant, getRatingsSummary, GetRatingsSummaryInput,\n getRnrEndpointId, getRnrPartnerId, getSelectedVariant, PriceForSelectedVariantInput, 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, channelId: number, ctx: IActionContext, selectedDimensions?: ProductDimension[]): Promise {\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(\n new SelectedVariantInput(productId, channelId, selectedDimensions, 'get',\n ctx.requestContext),\n 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(\n new ProductAvailabilitiesForSelectedVariantInput(\n productId,\n channelId\n ),\n 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(\n new PriceForSelectedVariantInput(productId, channelId, undefined),\n 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,\n ctx.requestContext),\n ctx\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(\n new GetCartStateDataInput(ctx.requestContext.apiSettings, ctx.requestContext),\n 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(\n new GetRatingsSummaryInput(productId.toString(), tenantId, serviceEndPoint),\n 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\n return productDetails;\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBuyboxAddToCartViewProps, IBuyboxAddToWishlistViewProps, IBuyboxKeyInPriceViewProps, IBuyboxProductConfigureDropdownViewProps, IBuyboxProductConfigureViewProps, IBuyboxProductQuantityViewProps } from '../../common';\nimport { IQuickviewViewProps } from './quickview';\n\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToCart;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToWishlist;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n \n {heading}\n {errors}\n \n {select}\n \n );\n};\n\nconst _renderQuickViewPopup = (props: IQuickviewViewProps): JSX.Element => {\n const { ModalContainer, ModalHeaderContainer, ModalFooterContainer, ModalHeaderContent, ModalBodyContainer, addToWishlist, addToCart,\n cartContainerProps } = props;\n\n return (\n \n \n {ModalHeaderContent}\n \n \n {_renderBodyContent(props)}\n \n \n \n {addToCart && _renderAddToCart(addToCart)}\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\n \n \n \n );\n};\n\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps, quantityLimitsMessages: React.ReactNode): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\n\n return (\n \n \n {heading}\n {errors}\n \n {input}\n {quantityLimitsMessages}\n \n );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return (\n \n \n {heading}\n \n {input}\n \n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return (\n \n {dropdowns.map(_renderConfigureDropdown)}\n \n );\n};\n\nconst _renderBodyContent = (props: IQuickviewViewProps): JSX.Element => {\n const { title, price, rating, keyInPrice, quantity, configure, inventoryLabel, quantityLimitsMessages, seeDetailsbutton, loading,\n ProductInfoContainerProps, MediaGalleryContainerProps, CarouselProps, unitOfMeasure } = props;\n if (loading) {\n return (\n <>\n {loading}\n \n );\n }\n return (\n <>\n \n \n \n \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 \n \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} - Functional component of the quick view.\n */\nexport const QuickViewFunctionalComponent: React.FC = (props: IQuickviewViewProps) => {\n const { quickView, quickViewButton, isModalOpen, isMobileDevice } = props;\n return (\n \n {!isMobileDevice && quickViewButton}\n {isModalOpen && _renderQuickViewPopup(props)}\n \n );\n};\n\nexport default QuickViewFunctionalComponent;\n"],"names":["async","getValidProductImages","productId","channelId","actionContext","imageSettings","selectedProduct","catalogId","getCatalogId","requestContext","actionInput","MediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariant","then","mediaLocations","Promise","all","map","mediaLocation","imageData","src","Uri","altText","AltText","resolve","http","XMLHttpRequest","open","addEventListener","status","send","validateMediaLocaionAsync","pairs","filter","pair","catch","error","telemetry","exception","debug","Quickview","React","constructor","props","super","dimensionUpdateQueue","FinitePromiseQueue","dimensions","quickViewCallbacks","updateQuantity","newQuantity","errorState","this","state","quantityError","undefined","otherError","setState","quantity","updateErrorState","newErrorState","updateSelectedProduct","newSelectedProduct","newInventory","newPrice","newDeliveryOptions","productAvailableQuantity","productDeliveryOptions","_updatePrice","dimensionSelectedAsync","selectedDimensionId","selectedDimensionValueId","enqueue","_updateDimensions","FinitePromiseQueueError","getDropdownName","dimensionType","resources","_getDropdownName","changeModalOpen","isModalOpen","_hideQuickViewDialog","changeUpdatingDimension","isUpdatingDimension","updateKeyInPrice","customPrice","customAmountError","isPriceKeyedIn","keyInPriceAmount","productPrice","defaultGalleryImageSettings","viewports","xs","q","w","h","sm","md","lg","lazyload","cropFocalRegion","defaultThumbnailImageSettings","_renderSeeDetailButton","product","config","payLoad","getPayloadObject","telemetryContent","TelemetryConstant","attributes","getTelemetryAttributes","Button","Object","className","onClick","onTelemetryClick","seeDetailsLinkText","href","_getProductURL","_renderCarousel","mediaGalleryItems","keys","galleryImageSettings","ArrayExtensions","item","index","_renderCarouselItemImageView","_renderEmptyImage","tag","Carousel","items","activeIndex","next","previous","interval","directionTextPrev","previousScreenshotFlipperText","directionTextNext","nextScreenshotFlipperText","indicatorAriaText","ariaLabelForSlide","onIndicatorsClickHandler","goToIndex","handleOnExited","onExited","handleOnExiting","onExiting","key","_renderThumbnails","id","thumbnailImageSettings","_getThumbnailItem","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperNextLabel","parentId","useTabList","JSON","stringify","context","request","apiSettings","productDimensions","productDetails","dimensionsToUpdate","clearErrorState","errorHost","configureErrors","mappedDimensions","dimension","DimensionTypeValue","DimensionValue","_updateDimensionValue","ExtensionProperties","newProduct","getSelectedVariant","SelectedVariantInput","MasterProductId","RecordId","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","variantProduct","images","productVariant","lastUpdate","Date","now","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","Dimensions","find","Value","toLowerCase","isCustomPriceSelected","length","getPriceForSelectedVariant","PriceForSelectedVariantInput","RetailMulitplePickupMFeatureState","data","featureState","result","Name","getDeliveryOptionsForSelectedVariant","GetDeliveryOptionsForSelectedVariantInput","IsEnabled","_updateQuantitiesInState","productDimensionFull","newValueId","DimensionValues","isGiftCard","IsGiftCard","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeSize","productDimensionTypeAmount","productDimensionTypeStyle","animating","isLastItem","nextIndex","isFirstItem","_getCarouselItem","image","Image","gridSettings","loadFailureBehavior","role","modifiedActiveIndex","ThumbnailItemContainerProps","classnames","tabIndex","_generateOnThumbnailClick","onKeyDown","_generateOnThumbnailKeyDown","Picture","event","which","KeyCodes","preventDefault","onClickHandler","_onClick","_event","ObjectExtensions","selectedProductId","modalOpen","selectedDimensions","ctx","tenantId","getRnrPartnerId","serviceEndPoint","getRnrEndpointId","productResult","productAvailabilities","getCartStateData","GetCartStateDataInput","cartState","cart","getRatingsSummary","GetRatingsSummaryInput","toString","ratingsSummaryData","ratingsSummary","getProductDetails","currentTime","_updateMediaItems","ItemTypeValue","ReleasedProductType","isServiceItem","isDataLoaded","_quickViewCloseButtonclick","onChangeHandler","callbacks","newValue","_renderQuantity","max","ContainerProps","LabelContainerProps","htmlFor","heading","productQuantityHeading","errors","input","IncrementalQuantity","currentCount","onChange","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","disabled","min","bind","getTelemetryObject","telemetryPageName","friendlyName","shouldComponentUpdate","nextProps","nextState","render","isMobileDevice","isMobile","variant","VariantType","viewprops","quickView","moduleProps","quickViewButton","quickViewbuttonText","ModalContainer","Modal","isOpen","format","quickViewAriaLabel","toggle","modalTransition","timeout","shouldUpdateFocusToFirstElement","ModalHeaderContainer","ModalHeader","ModalFooterContainer","ModalFooter","ModalHeaderContent","ModalBodyContainer","ModalBody","cartContainerProps","ProductInfoContainerProps","MediaGalleryContainerProps","seeDetailsbutton","loading","Spinner","label","loadingText","size","SpinnerSize","title","getBuyboxProductTitle","description","getBuyboxProductDescription","configure","getBuyboxProductConfigure","price","getBuyboxProductPrice","unitOfMeasure","getBuyboxProductUnitOfMeasure","rating","app","hideRating","getBuyboxProductRating","addToCart","getBuyboxAddToCart","keyInPrice","enableKeyInPrice","getBuyboxKeyInPrice","inventoryLabel","getBuyBoxInventoryLabel","addToWishlist","getBuyboxProductAddToWishlist","quantityLimitsMessages","getQuantityLimitsMessages","CarouselProps","Thumbnails","renderView","lastUpdatedTime","PrimaryImageUrl","_mapProductToImageData","CustomerContextualPrice","producturl","getProductPageUrlSync","_isOrderQuantityLimitsFeatureEnabled","Behavior","MinimumQuantity","MaximumQuantity","maxQuantityForCartLineItem","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","RetailDefaultOrderQuantityLimitsFeatureName","customerInfo","customerInformation","information","IsB2b","_renderConfigureDropdown","dropdown","select","Node","_renderQuickViewPopup","Module","_renderBodyContent","errorBlock","button","_renderAddToCart","_renderAddToWishlist","dropdowns","_renderConfigure","_renderKeyInPrice","QuickViewFunctionalComponent"],"sourceRoot":""}