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,EACV6E,uBAAwB/I,EAAU+I,uBAClCC,yBAA0BhJ,EAAUgJ,yBACpCC,yBAA0BjJ,EAAUiJ,yBACpCrL,IAAKhI,EAAMI,KAAKgG,SAAS0M,OACzBQ,UAAWtT,EAAMuT,iBACjBC,WAAyC,QAA/Bf,EAAEzS,EAAMI,KAAKiB,QAAQqH,kBAAU,IAAA+J,EAAAA,EAAIzS,EAAMyT,aACnD5F,iBAAkB7N,EAAM6N,qBAMpC0E,EAAM1I,KACF7H,EAAAA,cAAA,OACIC,UAAWyR,GAAAA,CAAW,0BAA2B,CAC7C,kBAjCW,IAiCQ1T,EAAMI,KAAKgG,SAASqF,YAI3CzJ,EAAAA,cAAA,SAAOC,UAAU,iBAAiB0R,QAAQ,YACrCvJ,EAAUwJ,sBACV,MAGJnF,IAEDzM,EAAAA,cAAA,QAAMC,UAAU,kBAAkBjC,EAAMI,KAAKgG,SAASqF,aAqCtE,OAAO8G,GAiKWD,IACc,QAAlBtS,EAAMyI,UAAwC,oBAAlBzI,EAAMyI,UACpCzG,EAAAA,cAAA,OAAKC,UAAU,kCACXD,EAAAA,cAACO,EAAAA,EAAgB,CACbnC,KACI0M,EACM,CACEzM,MAAO,CACHgC,wBAA0BrC,EAAMI,KAAKgG,SAAuB+L,YAC5D3R,UAAYR,EAAMI,KAAKgG,SAAuBoF,QAGpD,CACEnL,MAAO,CACHgC,wBAA0BrC,EAAMI,KAAKgG,SAAsBgM,SAC3D5R,UAAWR,EAAMI,KAAKgG,SAASgM,WAI/CtR,QAASd,EAAMc,QACfiK,GAAI/K,EAAM+K,GACVtC,SAAUzI,EAAMyI,SAChBxG,UAAU,2CAOE,SAAnBjC,EAAMyI,UACPzG,EAAAA,cAAA,QAAMuB,QAASA,KACXoL,EAAW3O,KACXA,EAAMqS,mBA+BnBnL,IAIX","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/common/cz-price.components.tsx?c326","webpack://Msdyn365.Commerce.Online/./src/modules/common/imageSettingsViewports.tsx?3eaa","webpack://Msdyn365.Commerce.Online/./src/themes/bakersdelight/views/components/cartlineitem.component.tsx?ea61"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { ProductPrice, ProductType, SalesAgreementPriceLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { Button, format, ICollapseProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nconst defaultPrice: number = 0;\r\nconst freePrice: number = 0;\r\n\r\n/**\r\n * Interface for price component resources.\r\n * @param {string} priceRangeSeparator - The price range separator.\r\n */\r\nexport interface IPriceComponentResources {\r\n priceRangeSeparator?: string;\r\n salesAgreementPricePrompt?: string;\r\n salesAgreementExpirationDatePrompt?: string;\r\n salesAgreementCommittedQuantityPrompt?: string;\r\n salesAgreementRemainingQuantityPrompt?: string;\r\n}\r\n\r\n/**\r\n * Interface for price component props.\r\n * @param {boolean} isPriceMinMaxEnabled - Whether the price range feature is enabled or not.\r\n * @param {IPriceComponentResources} priceResources - The price range resources.\r\n */\r\nexport interface IPriceComponentProps extends IComponentProps<{ price: ProductPrice }> {\r\n className?: string;\r\n product?: SimpleProduct;\r\n savingsText?: string;\r\n freePriceText?: string;\r\n originalPriceText?: string;\r\n currentPriceText?: string;\r\n isPriceMinMaxEnabled?: boolean;\r\n isSalesAgreementPriceFeatureEnabled?: boolean;\r\n useLegacySalesAgreementHTMLFeature?: boolean;\r\n salesAgreementLineId?: number;\r\n priceResources?: IPriceComponentResources;\r\n salesAgreementDetailCollapseProps?: ICollapseProps;\r\n currencyCode?: string;\r\n\r\n salesAgreementDetailOnClick?(event: React.MouseEvent | React.KeyboardEvent): void;\r\n}\r\n\r\n/**\r\n * The interface of price component.\r\n */\r\nexport interface IPriceComponent extends IComponent {}\r\n\r\nconst priceComponentActions = {};\r\n\r\n/**\r\n * Get the original price from price component props.\r\n * @param props - The IPriceComponentProps.\r\n * @returns The original price.\r\n */\r\nconst getOriginalPrice = (props: IPriceComponentProps): number => {\r\n return props.data.price.AdjustedPrice ?? props.data.price.TradeAgreementPrice ?? props.data.price.BasePrice ?? defaultPrice;\r\n};\r\n\r\nconst getActivePrice = (props: IPriceComponentProps): number => {\r\n if (showPriceRangeForMasterProduct(props) && props.data.price.MinVariantPrice !== undefined) {\r\n return props.data.price.MinVariantPrice;\r\n }\r\n\r\n if (props.data.price.CustomerContextualPrice !== undefined) {\r\n return props.data.price.CustomerContextualPrice;\r\n }\r\n\r\n return getOriginalPrice(props);\r\n};\r\n\r\n/**\r\n * Get the formatted currency.\r\n * @param props - The props.\r\n * @param price - The price.\r\n * @param shouldUseFreePriceText - The shouldUseFreePriceText.\r\n * @returns The formatted currency.\r\n */\r\nconst formatCurrency = (\r\n props: IPriceComponentProps,\r\n price: number | undefined,\r\n shouldUseFreePriceText: boolean | undefined,\r\n currencyCode?: string | undefined\r\n): string => {\r\n if (price === undefined) {\r\n return '';\r\n }\r\n\r\n if (shouldUseFreePriceText && price === freePrice && props.freePriceText) {\r\n return props.freePriceText;\r\n }\r\n\r\n return props.context.cultureFormatter.formatCurrency(price, currencyCode);\r\n};\r\n\r\nconst showPriceRangeForMasterProduct = (props: IPriceComponentProps): boolean => {\r\n return (\r\n (props.isPriceMinMaxEnabled ?? false) &&\r\n (props.product?.ProductTypeValue === ProductType.Master || props.product?.ProductTypeValue === ProductType.KitMaster) &&\r\n props.data.price.MinVariantPrice !== undefined &&\r\n props.data.price.MaxVariantPrice !== undefined\r\n );\r\n};\r\n\r\n/**\r\n * ShowStrikethroughPricing.\r\n * @param props - The props.\r\n * @returns True if showStrikethroughPricing, false otherwise.\r\n */\r\nconst showStrikethroughPricing = (props: IPriceComponentProps): boolean => {\r\n const originalSalesPrice = getOriginalPrice(props);\r\n const activeSalesPrice = showPriceRangeForMasterProduct(props)\r\n ? props.data.price.MinVariantPrice\r\n : props.data.price.CustomerContextualPrice;\r\n\r\n if (activeSalesPrice && originalSalesPrice) {\r\n return activeSalesPrice < originalSalesPrice;\r\n }\r\n\r\n return false;\r\n};\r\n\r\n/**\r\n * Render current price.\r\n * @param props - The props.\r\n * @returns The JSX.Element.\r\n */\r\nconst renderCurrentPrice = (props: IPriceComponentProps): JSX.Element => {\r\n const maxVariantPrice: string = formatCurrency(props, props.data.price.MaxVariantPrice, false, props.currencyCode);\r\n const minVariantPrice: string = formatCurrency(props, props.data.price.MinVariantPrice, false, props.currencyCode);\r\n if (\r\n props.isPriceMinMaxEnabled &&\r\n props.data.price.MaxVariantPrice &&\r\n props.data.price.MinVariantPrice &&\r\n props.data.price.MaxVariantPrice > props.data.price.MinVariantPrice\r\n ) {\r\n return (\r\n \r\n \r\n {minVariantPrice}\r\n \r\n \r\n {props.priceResources?.priceRangeSeparator}\r\n \r\n \r\n {maxVariantPrice}\r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {formatCurrency(props, getActivePrice(props), true, props.currencyCode)}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render active sales price with original sales price.\r\n * @param props - The props.\r\n * @returns The JSX.Element.\r\n */\r\nconst renderCurrentPriceWithOriginalPrice = (props: IPriceComponentProps): JSX.Element => {\r\n const initialPrice: string = formatCurrency(props, getOriginalPrice(props), true);\r\n\r\n return (\r\n <>\r\n \r\n {/*{` `}*/}\r\n {/*{props.originalPriceText}*/}\r\n {/*{` `}*/}\r\n {/*{initialPrice}*/}\r\n {/*{` `}*/}\r\n {/*{props.currentPriceText}*/}\r\n {/*{` `}*/}\r\n {/*{renderCurrentPrice(props)}*/}\r\n \r\n \r\n \r\n {props.savingsText && {props.savingsText}}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * The state of sales agreement details.\r\n * @deprecated This will be removed with SalesAgreementPrice class soon.\r\n */\r\n// export interface ISalesAgreementDetailState {\r\n// isOpen: boolean;\r\n// }\r\n\r\n/**\r\n * The SalesAgreementPrice class.\r\n * @deprecated This implementation is deprecated. It will be removed soon. Please use the implementation in the Price function component.\r\n */\r\n// eslint-disable-next-line react/require-optimization -- Not needed.\r\n// class SalesAgreementPrice extends React.Component {\r\n// public constructor(props: IPriceComponentProps) {\r\n// super(props);\r\n// this._toggle = this._toggle.bind(this);\r\n// this.state = {\r\n// isOpen: true\r\n// } as ISalesAgreementDetailState;\r\n// }\r\n//\r\n// public render(): React.ReactElement {\r\n// const priceLines: PriceLine[] = this.props.data.price.AttainablePriceLines ?? [];\r\n// const firstPriceLine: SalesAgreementPriceLine = priceLines[0] as SalesAgreementPriceLine;\r\n// if (this.props.salesAgreementDetailCollapseProps) {\r\n// this.props.salesAgreementDetailCollapseProps.isOpen = this.state.isOpen;\r\n// }\r\n// return (\r\n// \r\n//

\r\n// {formatCurrency(\r\n// this.props,\r\n// this.props.data.price.SalesAgreementPrice ?? this.props.data.price.CustomerContextualPrice,\r\n// true\r\n// )}\r\n//

\r\n// \r\n// {this.props.priceResources?.salesAgreementPricePrompt}\r\n//

\r\n// \r\n//

\r\n// \r\n// {/* Available date */}\r\n// {// eslint-disable-next-line prefer-template -- Copied from other class.\r\n// ' · ' +\r\n// format(\r\n// this.props.priceResources?.salesAgreementExpirationDatePrompt ?? '',\r\n// this.props.context.cultureFormatter.formatDate(firstPriceLine.EffectiveDate as Date),\r\n// this.props.context.cultureFormatter.formatDate(firstPriceLine.ExpirationDate as Date)\r\n// )}\r\n// \r\n// \r\n// {/* Quantity commitment */}\r\n// {// eslint-disable-next-line prefer-template -- Copied from other class.\r\n// ' · ' +\r\n// format(\r\n// this.props.priceResources?.salesAgreementCommittedQuantityPrompt ?? '',\r\n// firstPriceLine.CommittedQuantity\r\n// )}\r\n// \r\n// \r\n// {/* Remaining quantity to qualify */}\r\n// {// eslint-disable-next-line prefer-template -- Copied from other class.\r\n// ' · ' +\r\n// format(\r\n// this.props.priceResources?.salesAgreementRemainingQuantityPrompt ?? '',\r\n// firstPriceLine.RemainingQuantity\r\n// )}\r\n// \r\n//

\r\n//
\r\n//
\r\n// );\r\n// }\r\n//\r\n// /**\r\n// * Callback which toggles collapse mode.\r\n// * @param event - The mouse or keyboard event.\r\n// */\r\n// private _toggle(event: React.MouseEvent | React.KeyboardEvent): void {\r\n// event.preventDefault();\r\n// // eslint-disable-next-line react/no-access-state-in-setstate -- Copied from other class.\r\n// this.setState({ isOpen: !this.state.isOpen });\r\n// }\r\n// }\r\n\r\nconst renderSalesAgreementDetail = (props: IPriceComponentProps): JSX.Element => {\r\n // In most cases there should be only one sales agreement line.\r\n // If there are more than one, only the first one will be shown.\r\n const firstPriceLine: SalesAgreementPriceLine = (props.data.price.AttainablePriceLines ?? [])[0] as SalesAgreementPriceLine;\r\n return (\r\n

\r\n

\r\n {/* Available date */}\r\n {` . ${format(\r\n props.priceResources?.salesAgreementExpirationDatePrompt ?? '',\r\n props.context.cultureFormatter.formatDate(firstPriceLine.EffectiveDate as Date),\r\n props.context.cultureFormatter.formatDate(firstPriceLine.ExpirationDate as Date)\r\n )}`}\r\n

\r\n

\r\n {/* Quantity commitment */}\r\n {` · ${format(props.priceResources?.salesAgreementCommittedQuantityPrompt ?? '', firstPriceLine.CommittedQuantity)}`}\r\n

\r\n

\r\n {/* Remaining quantity to qualify */}\r\n {` · ${format(props.priceResources?.salesAgreementRemainingQuantityPrompt ?? '', firstPriceLine.RemainingQuantity)}`}\r\n

\r\n

\r\n );\r\n};\r\n\r\n/**\r\n * Price.\r\n * @param props - The props.\r\n * @returns The JSX.Element.\r\n */\r\nconst Price: React.FC = (props: IPriceComponentProps): JSX.Element | null => {\r\n // CustomerContextualPrice could be zero\r\n if (props.data.price.CustomerContextualPrice === undefined) {\r\n return null;\r\n }\r\n\r\n // Determine if contract price is avaiable/applied by:\r\n // isFeatureEnabled and SA price != 0, for PDP.\r\n // SA line id != 0, for cart line.\r\n if (props.isSalesAgreementPriceFeatureEnabled && props.data.price.SalesAgreementPrice !== 0) {\r\n const [isExpanded, setIsExpanded] = React.useState(false);\r\n const toggle = () => {\r\n setIsExpanded(!isExpanded);\r\n };\r\n return (\r\n \r\n \r\n

\r\n {formatCurrency(props, props.data.price.SalesAgreementPrice ?? props.data.price.CustomerContextualPrice, true)}\r\n

\r\n \r\n {props.priceResources?.salesAgreementPricePrompt}\r\n \r\n {isExpanded && renderSalesAgreementDetail(props)}\r\n
\r\n
\r\n );\r\n }\r\n\r\n return (\r\n \r\n {showStrikethroughPricing(props) ? renderCurrentPriceWithOriginalPrice(props) : renderCurrentPrice(props)}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * The PriceComponent.\r\n */\r\nexport const CzPriceComponent: React.FunctionComponent = msdyn365Commerce.createComponent('Price', {\r\n component: Price,\r\n ...priceComponentActions\r\n});\r\n","const imageSettingsViewports = {\r\n searchResultContainer: {\r\n xs: { w: 214, h: 214 },\r\n sm: { w: 214, h: 214 },\r\n md: { w: 214, h: 214 },\r\n lg: { w: 214, h: 214 },\r\n xl: { w: 214, h: 214 }\r\n },\r\n quickView: {\r\n xs: { w: 200, h: 200 },\r\n sm: { w: 200, h: 200 },\r\n md: { w: 200, h: 200 },\r\n lg: { w: 200, h: 200 },\r\n xl: { w: 200, h: 200 }\r\n },\r\n cartLineItemComponent: {\r\n xs: { w: 74, h: 74 },\r\n sm: { w: 74, h: 74 },\r\n md: { w: 74, h: 74 },\r\n lg: { w: 74, h: 74 },\r\n xl: { w: 74, h: 74 }\r\n },\r\n pdpSlider: {\r\n xs: { w: 505, h: 505 },\r\n sm: { w: 505, h: 505 },\r\n md: { w: 505, h: 505 },\r\n lg: { w: 505, h: 505 },\r\n xl: { w: 505, h: 505 }\r\n },\r\n pdpSliderThumb: {\r\n xs: { w: 66, h: 66 },\r\n sm: { w: 66, h: 66 },\r\n md: { w: 66, h: 66 },\r\n lg: { w: 66, h: 66 },\r\n xl: { w: 66, h: 66 }\r\n },\r\n shopByCategory: {\r\n xs: { w: 98, h: 98 },\r\n sm: { w: 98, h: 98 },\r\n md: { w: 98, h: 98 },\r\n lg: { w: 98, h: 98 },\r\n xl: { w: 98, h: 98 }\r\n },\r\n productCollection: {\r\n xs: { w: 214, h: 214 },\r\n sm: { w: 214, h: 214 },\r\n md: { w: 214, h: 214 },\r\n lg: { w: 214, h: 214 },\r\n xl: { w: 214, h: 214 }\r\n },\r\n search: {\r\n xs: { w: 92, h: 92 },\r\n sm: { w: 92, h: 92 },\r\n md: { w: 92, h: 92 },\r\n lg: { w: 92, h: 92 },\r\n xl: { w: 92, h: 92 }\r\n },\r\n navigationMenu: {\r\n xs: { w: 292, h: 292 },\r\n sm: { w: 292, h: 292 },\r\n md: { w: 292, h: 292 },\r\n lg: { w: 292, h: 292 },\r\n xl: { w: 292, h: 292 }\r\n }\r\n};\r\nexport default imageSettingsViewports;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { ICartLinePriceEditorResources } from '@msdyn365-commerce/components';\r\nimport { CzPriceComponent } from '../../../../modules/common/cz-price.components';\r\nimport MsDyn365, {\r\n IComponentProps,\r\n IGridSettings,\r\n IImageSettings,\r\n Image,\r\n isChannelTypeB2B,\r\n msdyn365Commerce\r\n} from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport {\r\n CartLine,\r\n ChannelDeliveryOptionConfiguration,\r\n DiscountLine,\r\n DiscountLineType,\r\n ProductCatalog,\r\n ProductDimensionType,\r\n SalesLine,\r\n SimpleProduct,\r\n CommerceProperty\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n getFallbackImageUrl,\r\n StringExtensions,\r\n validateCatalogId\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n IncrementalQuantity,\r\n ITelemetryContent\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport imageSettingsViewports from '../../../../modules/common/imageSettingsViewports';\r\n\r\n/**\r\n * ICartlineResourceString: Interface for specifying the\r\n * resource strings that the component needs.\r\n */\r\nexport interface ICartlineResourceString {\r\n /**\r\n * Display string for discount label.\r\n */\r\n discountStringText: string;\r\n\r\n /**\r\n * String for size key.\r\n */\r\n sizeString: string;\r\n\r\n /**\r\n * String for color key.\r\n */\r\n colorString: string;\r\n\r\n /**\r\n * String associated with the configuration product dimension.\r\n */\r\n configString: string;\r\n\r\n /**\r\n * String for style key.\r\n */\r\n styleString: string;\r\n\r\n /**\r\n * String for amount key.\r\n */\r\n amountString?: string;\r\n\r\n /**\r\n * Display string for quantity label.\r\n */\r\n quantityDisplayString: string;\r\n\r\n /**\r\n * Display string for quantity label.\r\n */\r\n inputQuantityAriaLabel: string;\r\n\r\n /**\r\n * Aria label for the decrement button in quantity component.\r\n */\r\n decrementButtonAriaLabel: string;\r\n\r\n /**\r\n * Aria label for the increment button in quantity component.\r\n */\r\n incrementButtonAriaLabel: string;\r\n\r\n /**\r\n * Original text screenreader.\r\n */\r\n originalPriceText: string;\r\n\r\n /**\r\n * Current text screenreader.\r\n */\r\n currentPriceText: string;\r\n\r\n /**\r\n * Shipping Charges Text.\r\n */\r\n shippingChargesText: string;\r\n\r\n /**\r\n * Price Editor Charges Text.\r\n */\r\n priceEditorResources?: ICartLinePriceEditorResources;\r\n\r\n /**\r\n * Sales agreement price prompt text.\r\n */\r\n salesAgreementPricePrompt?: string;\r\n\r\n /**\r\n * Shipping text.\r\n */\r\n shippingText?: string;\r\n\r\n /**\r\n * Confirmed Ship Date Label.\r\n */\r\n confirmedShipDateLabel?: string;\r\n\r\n /**\r\n * Request Delivery Date Label.\r\n */\r\n requestDeliveryDateLabel?: string;\r\n}\r\n\r\n/**\r\n * Represents cart line data interface.\r\n */\r\ninterface ICartLineData {\r\n cartLine: CartLine | SalesLine;\r\n cartState?: ICartState;\r\n product?: SimpleProduct;\r\n catalogs?: ProductCatalog[];\r\n storeSelectorStateManager?: any;\r\n}\r\n\r\n/**\r\n * ICartLineProps: The props required to render cartLineitem.\r\n */\r\nexport interface ICartLineProps extends IComponentProps {\r\n /**\r\n * The flag to change the quantity component from interactible to static.\r\n */\r\n disableQuantityInteractivity?: boolean;\r\n\r\n /**\r\n * The primary image url.\r\n */\r\n primaryImageUrl?: string;\r\n\r\n /**\r\n * The product url.\r\n */\r\n productUrl?: string;\r\n\r\n /**\r\n * GridSettings for the product image in cartLine.\r\n */\r\n gridSettings: IGridSettings;\r\n\r\n /**\r\n * ImageSettings for the product image in cartLine.\r\n */\r\n imageSettings: IImageSettings;\r\n\r\n /**\r\n * Boolean flag to indicate if the item is out of stock.\r\n */\r\n isOutOfStock?: boolean;\r\n\r\n /**\r\n * Flag to make quantity section editable.\r\n */\r\n isQuantityEditable?: boolean;\r\n\r\n removeButton?: any;\r\n\r\n /**\r\n * Max quantity for line item.\r\n */\r\n maxQuantity?: number;\r\n\r\n /**\r\n * Current quantity for line item.\r\n */\r\n currentQuantity?: number;\r\n\r\n /**\r\n * Resource string for the component.\r\n */\r\n resources: any; //change to - ICartlineResourceString\r\n\r\n /**\r\n * SalesLine flag.\r\n */\r\n isSalesLine?: boolean;\r\n\r\n /**\r\n * Error message to show in place of quantity.\r\n */\r\n errorMessage?: string;\r\n\r\n /**\r\n * Inventory information label.\r\n */\r\n inventoryInformationLabel?: string;\r\n\r\n /**\r\n * Inventory information class name.\r\n */\r\n inventoryLabelClassName?: string;\r\n\r\n /**\r\n * Flag to show/hide shipping charges for line items.\r\n */\r\n showShippingChargesForLineItems?: boolean;\r\n\r\n /**\r\n * Boolean flag to indicate if cart state status is ready.\r\n */\r\n isCartStateReady?: boolean;\r\n\r\n /**\r\n * Chanel Delivery Option configuration is from api.\r\n */\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n\r\n /**\r\n * The telemetry content.\r\n */\r\n telemetryContent?: ITelemetryContent;\r\n\r\n /**\r\n * The cart line delivery location.\r\n */\r\n deliveryLocation?: string;\r\n displayMode?: any;\r\n productInventoryInformation?: any;\r\n isTodaySelected?: boolean;\r\n\r\n /**\r\n * Quantity onChange callback.\r\n */\r\n quantityOnChange?(cartLine: CartLine, newQuantity: number): boolean;\r\n\r\n priceCurrency?: string;\r\n\r\n /**\r\n * Sales line confirmed ship date.\r\n */\r\n confirmedShipDate?: string;\r\n\r\n /**\r\n * Sales line request delivery date.\r\n */\r\n requestDeliveryDate?: string;\r\n}\r\n\r\n/**\r\n * Represents dimensions strings.\r\n */\r\ninterface IDimensionStrings {\r\n styleOption: string | undefined;\r\n /**\r\n * String for size key.\r\n */\r\n sizeString: string;\r\n\r\n /**\r\n * String for color key.\r\n */\r\n colorString: string;\r\n\r\n /**\r\n * String associated with the configuration product dimension.\r\n */\r\n configString: string;\r\n\r\n /**\r\n * String for style key.\r\n */\r\n styleString: string;\r\n\r\n /**\r\n * String for amount key.\r\n */\r\n amountString?: string;\r\n\r\n typeName?: string;\r\n}\r\n\r\n/**\r\n * Renders catalog label for the cart line.\r\n * @param props - Cart line props.\r\n * @returns Catalog label.\r\n */\r\nconst CatalogLabelComponent: React.FC = (props: ICartLineProps) => {\r\n const catalogId = props.data.cartLine.CatalogId;\r\n validateCatalogId(catalogId);\r\n\r\n if (!isChannelTypeB2B(props.context.actionContext.requestContext) || !catalogId || !ArrayExtensions.hasElements(props.data.catalogs)) {\r\n return null;\r\n }\r\n\r\n const catalog = props.data.catalogs.find(item => item.RecordId === catalogId);\r\n\r\n if (!catalog || !catalog.Name) {\r\n return null;\r\n }\r\n\r\n return
{catalog.Name}
;\r\n};\r\n\r\nconst cartLineItemFunctions = {\r\n /**\r\n * Render product dimensions.\r\n * @param product - Product data.\r\n * @param dimensionStrings - Dimension strings interface.\r\n * @returns JSX Element.\r\n */\r\n renderProductDimensions: (product: SimpleProduct, dimensionStrings: IDimensionStrings) => {\r\n if (!product.Dimensions) {\r\n return [];\r\n }\r\n\r\n return product.Dimensions.map(productDimension => {\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Color) {\r\n return (\r\n
\r\n \r\n {dimensionStrings.colorString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Configuration) {\r\n return (\r\n
\r\n \r\n {dimensionStrings.configString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Size) {\r\n return (\r\n
\r\n \r\n {dimensionStrings.sizeString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Style) {\r\n return (\r\n
\r\n \r\n {dimensionStrings.typeName !== 'cz-cart-icon' && (product.IsGiftCard ? dimensionStrings.amountString : dimensionStrings.styleOption ?? dimensionStrings.styleString)}\r\n {dimensionStrings.typeName !== 'cz-cart-icon' && ': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n return null;\r\n });\r\n },\r\n\r\n /**\r\n * Gets the react node for product unit of price display.\r\n * @param props - The cart line props.\r\n * @returns The node representing markup for unit of measure component.\r\n */\r\n // renderProductUnitPrice: (props: ICartLineProps) => {\r\n // if (!props.data.cartLine.Price) {\r\n // return null;\r\n // }\r\n // const zeroQuantity: number = 0;\r\n // return (\r\n //
\r\n // \r\n // zeroQuantity\r\n // ? {\r\n // price: {\r\n // CustomerContextualPrice: props.data.cartLine.Price\r\n // }\r\n // }\r\n // : {\r\n // price: {\r\n // CustomerContextualPrice: props.data.cartLine.Price\r\n // }\r\n // }\r\n // }\r\n // context={props.context}\r\n // id={props.id}\r\n // typeName={props.typeName}\r\n // currencyCode={props.priceCurrency}\r\n // />\r\n // \r\n //
\r\n // );\r\n // },\r\n\r\n /**\r\n * Render discount lines.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n renderSliceSize: (props: ICartLineProps, dimensionStrings: IDimensionStrings) => {\r\n\r\n let productSlicingAllowed: CommerceProperty | undefined;\r\n\r\n if (props.data.cartLine && props.data.cartLine.ExtensionProperties) {\r\n productSlicingAllowed = props.data.cartLine.ExtensionProperties.find((property: any) => {\r\n return property.Key === 'OPT_PRODUCTISSLICINGALLOWED' && property.Value?.IntegerValue;\r\n });\r\n if (productSlicingAllowed || props.typeName === 'cz-order-details') {\r\n let sliceOption: any = [];\r\n if (props.context.app.config.sliceOptions) {\r\n const orgSliceOptions: any = props.context.app.config.sliceOptions;\r\n orgSliceOptions.forEach((o: any) => {\r\n const option = o.split(';');\r\n sliceOption.push({ value: option[0], label: option[1] });\r\n });\r\n }\r\n productSlicingAllowed = props.data.cartLine.ExtensionProperties.find((property: any) => {\r\n return property.Key === 'OPT_SLICINGOPTION';\r\n });\r\n if (productSlicingAllowed && productSlicingAllowed.Value && productSlicingAllowed.Value.StringValue) {\r\n let sliceValue = sliceOption.find((item: any) => {\r\n return item.value === productSlicingAllowed?.Value?.StringValue;\r\n });\r\n return (\r\n \r\n {dimensionStrings.typeName !== 'cz-cart-icon' && (props.resources.sliceOption ?? props.resources.sizeString)}\r\n {dimensionStrings.typeName !== 'cz-cart-icon' && ': '}\r\n {sliceValue && {sliceValue.label}}\r\n \r\n );\r\n }\r\n }\r\n }\r\n return null;\r\n },\r\n\r\n /**\r\n * Render discount lines.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n renderDiscountLines: (props: ICartLineProps) => {\r\n if (!props.data.cartLine.DiscountLines || !ArrayExtensions.hasElements(props.data.cartLine.DiscountLines)) {\r\n return null;\r\n }\r\n\r\n /**\r\n * Get the updated discount percentage.\r\n * @param discountLine - The discount line.\r\n * @param cartLine - The cart line.\r\n * @returns The updated discount percentage.\r\n */\r\n const discountPercent = (discountLine: DiscountLine, cartLine: CartLine): number => {\r\n const numberZero = 0;\r\n const decimalPrecision = 2;\r\n const fullPercentage = 100;\r\n let updatedPercent: number = discountLine.Percentage ?? numberZero;\r\n\r\n if (\r\n (discountLine.Percentage === numberZero ||\r\n (discountLine.DiscountLineTypeValue && discountLine.DiscountLineTypeValue === DiscountLineType.TenderTypeDiscount)) &&\r\n cartLine.Price &&\r\n cartLine.Price > numberZero &&\r\n cartLine.Quantity &&\r\n cartLine.Quantity !== numberZero\r\n ) {\r\n const effectiveAmount = discountLine.EffectiveAmount ?? numberZero;\r\n updatedPercent = Number(\r\n ((effectiveAmount / (cartLine.Price * cartLine.Quantity)) * fullPercentage).toFixed(decimalPrecision)\r\n );\r\n }\r\n\r\n return updatedPercent;\r\n };\r\n\r\n return props.data.cartLine.DiscountLines.map((discountLine, index) => {\r\n return (\r\n
\r\n \r\n {discountLine.OfferName ? discountLine.OfferName : ''}\r\n \r\n \r\n \r\n \r\n \r\n {` (${discountLine.Percentage !== undefined ? discountPercent(discountLine, props.data.cartLine) : ''}%)`}\r\n \r\n
\r\n );\r\n });\r\n },\r\n\r\n /**\r\n * Render inventory label.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n // renderInventoryLabel: (props: ICartLineProps) => {\r\n // const inventoryCssName = props.inventoryLabelClassName\r\n // ? `msc-cart-line__product-inventory-label ${props.inventoryLabelClassName}`\r\n // : 'msc-cart-line__product-inventory-label';\r\n //\r\n // return

{props.inventoryInformationLabel}

;\r\n // },\r\n\r\n /**\r\n * Render shipping label.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n // renderShippingLabel: (props: ICartLineProps) => {\r\n // const pickupDeliveryModeCode = props.context.request.channel?.PickupDeliveryModeCode;\r\n // const channelDeliveryOptionConfig = props.channelDeliveryOptionConfig;\r\n // const cartline = props.data.cartLine;\r\n // let hasShippingMethod = false;\r\n // if (channelDeliveryOptionConfig !== undefined) {\r\n // hasShippingMethod = !!(\r\n // cartline.DeliveryMode &&\r\n // channelDeliveryOptionConfig.PickupDeliveryModeCodes?.some(deliveryMode => deliveryMode !== cartline.DeliveryMode)\r\n // );\r\n // } else {\r\n // hasShippingMethod = !!(cartline.DeliveryMode && cartline.DeliveryMode !== pickupDeliveryModeCode);\r\n // }\r\n // if (!hasShippingMethod) {\r\n // return undefined;\r\n // }\r\n //\r\n // const shippingChargeLines = (cartline.ChargeLines ?? []).filter(chargeLine => chargeLine.IsShipping);\r\n //\r\n // if (!ArrayExtensions.hasElements(shippingChargeLines)) {\r\n // return undefined;\r\n // }\r\n //\r\n // const defaultCharge: number = 0;\r\n // const freightFee = shippingChargeLines.reduce((chargeTotal, chargeLine) => {\r\n // return chargeTotal + (chargeLine.CalculatedAmount ?? defaultCharge);\r\n // }, defaultCharge);\r\n //\r\n // const priceComponent = (\r\n // \r\n // );\r\n // return (\r\n // <>\r\n // \r\n // {priceComponent}\r\n // \r\n // );\r\n // },\r\n\r\n /**\r\n * Render other charges.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n // renderOtherCharges: (props: ICartLineProps) => {\r\n // const cartline = props.data.cartLine;\r\n // const otherCharges = cartline.ChargeLines?.filter(chargeline => !chargeline.IsShipping);\r\n //\r\n // return (\r\n // otherCharges?.map((otherCharge, index) => {\r\n // const itemIndex = index;\r\n // return otherCharge.CalculatedAmount ? (\r\n //
\r\n // \r\n // \r\n // \r\n // \r\n //
\r\n // ) : (\r\n // ''\r\n // );\r\n // }) ?? undefined\r\n // );\r\n // },\r\n\r\n /**\r\n * Render the sales agreement prompt.\r\n * @param props - The ICartLineProps.\r\n * @returns The JSX.Element.\r\n */\r\n renderSalesAgreementPrompt: (props: ICartLineProps): JSX.Element | null => {\r\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers -- We use 0 to indicate no sales agreement applied on the cart line.\r\n if (props.data.cartLine.SalesAgreementLineRecordId === 0) {\r\n return null;\r\n }\r\n return
{props.resources.salesAgreementPricePrompt}
;\r\n },\r\n\r\n renderConfirmedShipDate: (props: ICartLineProps) => {\r\n if (!props.isSalesLine || props.confirmedShipDate === undefined || StringExtensions.isNullOrEmpty(props.confirmedShipDate)) {\r\n return null;\r\n }\r\n return (\r\n
\r\n {props.resources.confirmedShipDateLabel}\r\n {props.confirmedShipDate}\r\n
\r\n );\r\n },\r\n\r\n renderRequestDeliveryDate: (props: ICartLineProps) => {\r\n if (!props.isSalesLine || props.requestDeliveryDate === undefined || StringExtensions.isNullOrEmpty(props.requestDeliveryDate)) {\r\n return null;\r\n }\r\n return (\r\n
\r\n {props.resources.requestDeliveryDateLabel}\r\n {props.requestDeliveryDate}\r\n
\r\n );\r\n }\r\n};\r\n\r\n/**\r\n * Render cartline component.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n// eslint-disable-next-line no-redeclare\r\nconst CartLine: React.FC = (props: ICartLineProps) => {\r\n const { productUrl, resources } = props;\r\n const isPriceIncludingTax = props.context.app.config.isPriceIncludingTax;\r\n const { product, cartLine } = props.data;\r\n\r\n\r\n const destructDimensionStrings = {\r\n sizeString: resources.sizeString,\r\n colorString: resources.colorString,\r\n styleString: resources.styleString,\r\n configString: resources.configString,\r\n amountString: resources.amountString,\r\n styleOption: resources.styleOption,\r\n typeName: props.typeName\r\n };\r\n\r\n const fallbackImageUrl =\r\n product &&\r\n getFallbackImageUrl(\r\n product.ItemId,\r\n props.context.actionContext.requestContext.apiSettings,\r\n props.context.request.app?.config?.OmniChannelMedia\r\n );\r\n const productDimensions = product && cartLineItemFunctions.renderProductDimensions(product, destructDimensionStrings);\r\n // const renderProductUnitPrice = cartLineItemFunctions.renderProductUnitPrice(props);\r\n const imageSettings = props.imageSettings;\r\n if (imageSettings) {\r\n imageSettings.cropFocalRegion = true;\r\n imageSettings.viewports = imageSettingsViewports.cartLineItemComponent;\r\n }\r\n const renderDiscountLines = cartLineItemFunctions.renderDiscountLines(props);\r\n // const renderInventoryLabel = cartLineItemFunctions.renderInventoryLabel(props);\r\n // const renderShippingLabel = cartLineItemFunctions.renderShippingLabel(props);\r\n // const renderOtherCharges = cartLineItemFunctions.renderOtherCharges(props);\r\n // const renderSalesAgreementPrompt = cartLineItemFunctions.renderSalesAgreementPrompt(props);\r\n // const renderConfirmedShipDate = cartLineItemFunctions.renderConfirmedShipDate(props);\r\n const sliceOption = cartLineItemFunctions.renderSliceSize(props, destructDimensionStrings);\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, '', product?.RecordId.toString());\r\n const productAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n const productName = product?.Name ?? cartLine.Description;\r\n const imgeClassName = props.data.cartLine.IsInvoiceLine ? 'msc-cart-line__invoice-image' : 'msc-cart-line__product-image';\r\n const cartLineContentClassName = props.data.cartLine.IsInvoiceLine ? 'msc-cart-line__invoice-content' : 'msc-cart-line__content';\r\n\r\n /**\r\n * Render other charges.\r\n * @param newValue - The cart line props.\r\n * @returns Boolean.\r\n */\r\n const onChange = (newValue: number): boolean => {\r\n if (props.quantityOnChange) {\r\n return props.quantityOnChange(props.data.cartLine, newValue);\r\n }\r\n return true;\r\n };\r\n\r\n /**\r\n * Generate error message.\r\n * @returns JSX element.\r\n */\r\n const generateErrorMessage = (): JSX.Element | null => {\r\n if (props.errorMessage) {\r\n return (\r\n
\r\n \r\n {props.errorMessage}\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Render Saving component.\r\n * @returns JSX element.\r\n */\r\n // const renderSaving = (): JSX.Element | null => {\r\n // if (!props.data.cartLine.DiscountAmount) {\r\n // return null;\r\n // }\r\n // const discountAmountZero: number = 0;\r\n //\r\n // if (props.data.cartLine.DiscountAmount > discountAmountZero) {\r\n // return (\r\n // <>\r\n // {/*{`${props.resources.discountStringText || 'Discount'}`}*/}\r\n // \r\n // \r\n // );\r\n // }\r\n // return null;\r\n // };\r\n\r\n /**\r\n * Gets the react node for product unit of measure display.\r\n * @returns The node representing markup for unit of measure component.\r\n */\r\n // const renderUnitOfMeasure = () => {\r\n // if (props.data.cartLine.IsInvoiceLine) {\r\n // return null;\r\n // }\r\n //\r\n // // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for appsettings\r\n // if (!props.context.app.config.unitOfMeasureDisplayType || props.context.app.config.unitOfMeasureDisplayType === 'none') {\r\n // return undefined;\r\n // }\r\n //\r\n // if (!product || !product.DefaultUnitOfMeasure) {\r\n // return undefined;\r\n // }\r\n //\r\n // return (\r\n //
\r\n // {product.DefaultUnitOfMeasure}\r\n //
\r\n // );\r\n // };\r\n\r\n /**\r\n * Generate quantity and price component.\r\n * @returns JSX element.\r\n */\r\n const generateQuantityAndPrice = (): JSX.Element[] | null => {\r\n const nodes = [];\r\n const defaultMaxQuantity: number = 10;\r\n const singleQuantity: number = 1;\r\n // const unitOfMeasure = renderUnitOfMeasure();\r\n\r\n // No quantity selector for invoice line\r\n if (!props.data.cartLine.IsInvoiceLine) {\r\n if (props.data.product && props.isQuantityEditable) {\r\n nodes.push(\r\n
\r\n {/*
{resources.quantityDisplayString}
*/}\r\n\r\n {generateErrorMessage()}\r\n\r\n \r\n {/*{unitOfMeasure}*/}\r\n
\r\n );\r\n } else {\r\n nodes.push(\r\n \r\n {/*{unitOfMeasure}*/}\r\n \r\n\r\n {generateErrorMessage()}\r\n\r\n {props.data.cartLine.Quantity}\r\n \r\n );\r\n }\r\n }\r\n\r\n // nodes.push(\r\n //
\r\n // \r\n // {renderSaving()}\r\n // {props.isOutOfStock ? renderInventoryLabel : null}\r\n //
\r\n // );\r\n\r\n return nodes;\r\n };\r\n const removeItem = (props: ICartLineProps) => {\r\n const { cartLine, product } = props.data;\r\n const currency = props.context.actionContext.requestContext.channel?.CompanyCurrency;\r\n const storeId = props.data.storeSelectorStateManager.result?.preferredStore?.StoreId ?? '';\r\n const storeName = props.data.storeSelectorStateManager.result?.preferredStore?.StoreName ?? '';\r\n let seed = '';\r\n let slicingOption = '';\r\n if (cartLine && product) {\r\n product?.Dimensions?.forEach((Dimension: any) => {\r\n if (Dimension.DimensionTypeValue === 4 && Dimension.DimensionValue.Value) {\r\n seed = Dimension.DimensionValue.Value;\r\n }\r\n });\r\n cartLine && cartLine.ExtensionProperties && cartLine.ExtensionProperties.forEach((ep: any) => {\r\n if (ep.Key === 'OPT_SLICINGOPTION') {\r\n slicingOption = ep.Value.StringValue;\r\n }\r\n });\r\n if (cartLine && product) {\r\n const removedItem = {\r\n item_id: cartLine.ItemId,\r\n item_name: product.Name,\r\n affiliation: '',\r\n coupon: '',\r\n discount: cartLine.LineDiscount,\r\n index: 0,\r\n item_brand: '',\r\n item_category: 'Product',\r\n item_list_id: 'related_products',\r\n item_list_name: 'Related Products',\r\n store_name: storeName,\r\n store_id: storeId,\r\n item_variant: `seed:${seed};slice:${slicingOption}`,\r\n location_id: '',\r\n price: cartLine.Price,\r\n quantity: cartLine.Quantity\r\n };\r\n if (typeof gtag !== 'undefined') {\r\n gtag('event', 'remove_from_cart', {\r\n currency: currency,\r\n value: product.Price,\r\n items: [removedItem]\r\n });\r\n }\r\n }\r\n }\r\n };\r\n\r\n // const _renderStoreLocation = (): JSX.Element | null => {\r\n // if (cartLine && cartLine.FulfillmentStoreId) {\r\n // return (\r\n //
\r\n // {props.deliveryLocation}\r\n //
\r\n // );\r\n // } else {\r\n // return (\r\n //
\r\n // {props.deliveryLocation}\r\n //
\r\n // );\r\n // }\r\n // };\r\n\r\n return (\r\n
\r\n {MsDyn365.isBrowser ? (\r\n \r\n \r\n ) : null}\r\n
\r\n
\r\n \r\n {MsDyn365.isBrowser ? (\r\n \r\n {productName}\r\n \r\n ) : null}\r\n {props.isTodaySelected && props.productInventoryInformation && props.productInventoryInformation.PhysicalAvailableInventoryLevelCode && props.productInventoryInformation.PhysicalAvailableInventoryLevelCode === 'OOS' &&\r\n
\r\n {'Out of stock today'}\r\n
}\r\n {props.typeName === 'cart' &&
\r\n \r\n {/*{renderSaving()}*/}\r\n {/*{props.isOutOfStock ? renderInventoryLabel : null}*/}\r\n {props.typeName === 'cart' && {\r\n removeItem(props);\r\n }}>{props.removeButton}}\r\n
}\r\n {renderDiscountLines}\r\n {/*
*/}\r\n {/* */}\r\n {/* /!*{renderUnitOfMeasure()}*!/*/}\r\n {/*
*/}\r\n {ArrayExtensions.hasElements(productDimensions) ? (\r\n
{productDimensions}
\r\n ) : (\r\n ''\r\n )}\r\n {sliceOption}\r\n {props.typeName === 'cz-order-details' && props.data.cartLine.Price &&\r\n \r\n Price\r\n {props.context.cultureFormatter.formatCurrency(props.data.cartLine.Price)}\r\n }\r\n
{generateQuantityAndPrice()}
\r\n {(props.typeName != 'cart' && props.typeName != 'cz-order-details') &&\r\n
\r\n \r\n {/*{renderSaving()}*/}\r\n {/*{props.isOutOfStock ? renderInventoryLabel : null}*/}\r\n
}\r\n {props.typeName !== 'cart' &&\r\n {\r\n removeItem(props);\r\n }}>{props.removeButton}}\r\n {/*{renderProductUnitPrice}*/}\r\n {/*{renderInventoryLabel}*/}\r\n {/*{renderDiscountLines}*/}\r\n {/*{props.showShippingChargesForLineItems &&
{renderShippingLabel}
}*/}\r\n {/*{renderOtherCharges}*/}\r\n {/*{renderSalesAgreementPrompt}*/}\r\n
\r\n {/*{generateQuantityAndPrice()}*/}\r\n {/*{renderSalesAgreementPrompt}*/}\r\n {/*{props.data.cartLine.IsInvoiceLine && props.data.cartState && props.resources.priceEditorResources && (*/}\r\n {/* */}\r\n {/*)}*/}\r\n {/*{_renderStoreLocation()}*/}\r\n {/*{props.removeButton}*/}\r\n
\r\n
\r\n );\r\n};\r\n\r\n// @ts-ignore\r\nexport const CartLineItemComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride(\r\n 'CartLineItem',\r\n {\r\n component: CartLine,\r\n ...cartLineItemFunctions\r\n }\r\n);\r\n\r\nexport default CartLineItemComponent;\r\n"],"names":["getOriginalPrice","props","_ref","_ref2","_props$data$price$Adj","data","price","AdjustedPrice","TradeAgreementPrice","BasePrice","formatCurrency","shouldUseFreePriceText","currencyCode","undefined","freePriceText","context","cultureFormatter","showPriceRangeForMasterProduct","_props$isPriceMinMaxE","_props$product","_props$product2","isPriceMinMaxEnabled","product","ProductTypeValue","ProductType","Master","KitMaster","MinVariantPrice","MaxVariantPrice","renderCurrentPrice","maxVariantPrice","minVariantPrice","_props$priceResources","React","className","itemProp","priceResources","priceRangeSeparator","CustomerContextualPrice","getActivePrice","CzPriceComponent","msdyn365Commerce","createComponent","_objectSpread","component","isSalesAgreementPriceFeatureEnabled","SalesAgreementPrice","_props$data$price$Sal","_props$priceResources8","_props$priceResources9","isExpanded","setIsExpanded","toggle","classnames","Button","salesAgreementPricePrompt","onClick","tabIndex","_props$data$price$Att","_props$priceResources2","_props$priceResources3","_props$priceResources4","_props$priceResources5","_props$priceResources6","_props$priceResources7","firstPriceLine","AttainablePriceLines","format","salesAgreementExpirationDatePrompt","formatDate","EffectiveDate","ExpirationDate","salesAgreementCommittedQuantityPrompt","CommittedQuantity","salesAgreementRemainingQuantityPrompt","RemainingQuantity","renderSalesAgreementDetail","originalSalesPrice","activeSalesPrice","showStrikethroughPricing","initialPrice","savingsText","renderCurrentPriceWithOriginalPrice","searchResultContainer","xs","w","h","sm","md","lg","xl","quickView","cartLineItemComponent","pdpSlider","pdpSliderThumb","shopByCategory","productCollection","search","navigationMenu","CatalogLabelComponent","catalogId","cartLine","CatalogId","validateCatalogId","isChannelTypeB2B","actionContext","requestContext","ArrayExtensions","hasElements","catalogs","catalog","find","item","RecordId","Name","cartLineItemFunctions","renderProductDimensions","dimensionStrings","Dimensions","map","productDimension","_productDimension$Dim","_productDimension$Dim2","_productDimension$Dim3","_dimensionStrings$sty","_productDimension$Dim4","DimensionTypeValue","ProductDimensionType","Color","key","colorString","DimensionValue","Value","Configuration","configString","Size","sizeString","Style","typeName","IsGiftCard","amountString","styleOption","styleString","renderSliceSize","productSlicingAllowed","ExtensionProperties","property","_property$Value","Key","IntegerValue","sliceOption","app","config","sliceOptions","forEach","o","option","split","push","value","label","StringValue","_props$resources$slic","sliceValue","_productSlicingAllowe","resources","renderDiscountLines","DiscountLines","discountLine","index","_discountLine$OfferId","OfferId","OfferName","isSalesLine","PeriodicDiscount","EffectiveAmount","id","priceCurrency","Percentage","discountPercent","_discountLine$Percent","updatedPercent","DiscountLineTypeValue","DiscountLineType","TenderTypeDiscount","Price","Quantity","_discountLine$Effecti","effectiveAmount","Number","toFixed","renderSalesAgreementPrompt","SalesAgreementLineRecordId","renderConfirmedShipDate","confirmedShipDate","StringExtensions","isNullOrEmpty","confirmedShipDateLabel","renderRequestDeliveryDate","requestDeliveryDate","requestDeliveryDateLabel","CartLineItemComponent","createComponentOverride","_props$context$reques","_product$Name","_props$primaryImageUr","productUrl","isPriceIncludingTax","destructDimensionStrings","fallbackImageUrl","getFallbackImageUrl","ItemId","apiSettings","request","OmniChannelMedia","productDimensions","imageSettings","cropFocalRegion","viewports","imageSettingsViewports","payLoad","getPayloadObject","telemetryContent","toString","productAttribute","getTelemetryAttributes","productName","Description","imgeClassName","IsInvoiceLine","cartLineContentClassName","onChange","newValue","quantityOnChange","generateErrorMessage","errorMessage","removeItem","_props$context$action","_props$data$storeSele","_props$data$storeSele2","_props$data$storeSele3","_props$data$storeSele4","currency","channel","CompanyCurrency","storeId","storeSelectorStateManager","result","preferredStore","StoreId","storeName","StoreName","seed","slicingOption","_product$Dimensions","Dimension","ep","removedItem","item_id","item_name","affiliation","coupon","discount","LineDiscount","item_brand","item_category","item_list_id","item_list_name","store_name","store_id","item_variant","location_id","quantity","gtag","items","MsDyn365","isBrowser","href","role","Image","src","primaryImageUrl","fallBackSrc","altText","gridSettings","loadFailureBehavior","shouldSkipToMainImage","Object","assign","isTodaySelected","productInventoryInformation","PhysicalAvailableInventoryLevelCode","TotalAmount","NetPrice","removeButton","generateQuantityAndPrice","nodes","_props$maxQuantity","_props$data$product$I","isQuantityEditable","IncrementalQuantity","String","DeliveryMode","LineId","max","maxQuantity","currentCount","currentQuantity","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","disabled","isCartStateReady","isGiftCard","isOutOfStock","classNames","htmlFor","quantityDisplayString"],"sourceRoot":""}