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AenV,GAEnB,IAMD,MAAMoV,GAAyBC,EAAAA,EAAAA,IAA2B,CAC7DxB,GAAI,sEACJyB,OAAoCN,EACpCC,MAAOH,IAGX,WChEAS,EAAOC,QAAUxO,cCAjBuO,EAAOC,QAAUC","sources":["webpack://henrys-ecommerce/./src/common/createGoogleAnalyticsEvent.ts?b6fa","webpack://henrys-ecommerce/./src/common/pushGoogleAnalyticsEvent.tsx?9c4e","webpack://henrys-ecommerce/./src/common/useGoogleAnalytics.tsx?0c00","webpack://henrys-ecommerce/./src/modules/quickview/utilities/get-product-details.ts?0cc4","webpack://henrys-ecommerce/./src/modules/quickview/utilities/get-valid-product-images.ts?8145","webpack://henrys-ecommerce/./src/themes/henrys/views/checkout.view.tsx?5dbb","webpack://henrys-ecommerce/./src/themes/henrys/views/components/CartGuide.tsx?ff5c","webpack://henrys-ecommerce/./lib/checkout/module-registration.js?9188","webpack://henrys-ecommerce/../../src/search-org-unit-locations.ts?d18d","webpack://henrys-ecommerce/external var \"React\"?0d3b","webpack://henrys-ecommerce/external var \"ReactDOM\"?853b"],"sourcesContent":["import { CacheType, getCatalogId, IActionContext, IActionInput, ICommerceApiSettings, IRequestContext } from '@msdyn365-commerce/core';\r\nimport { Cart, CategoryPathLookup } from '@msdyn365-commerce/retail-proxy';\r\nimport { GaEvent, GaItem, GaPayload } from './pushGoogleAnalyticsEvent';\r\nimport { getProductDetails } from '../modules/quickview/utilities';\r\n\r\nexport const buildCacheKey = (base: string, apiSettings: ICommerceApiSettings, locale?: string): string => {\r\n return `${base}-chanId:${apiSettings.channelId}-catId:${apiSettings.catalogId}${locale ? `-${locale}` : ''}`;\r\n};\r\n\r\n/**\r\n * Category path input.\r\n */\r\nexport class GetCategoryPathsInput implements IActionInput {\r\n public readonly ChannelId: number;\r\n\r\n public readonly CatalogId: number;\r\n\r\n public readonly categoryPathLooksups: CategoryPathLookup[];\r\n\r\n public readonly apiSettings: ICommerceApiSettings;\r\n\r\n private readonly locale: string;\r\n\r\n private constructedCacheKey: string;\r\n\r\n public constructor(context: IRequestContext, categoryPathLooksups: CategoryPathLookup[]) {\r\n this.ChannelId = context.apiSettings.channelId;\r\n this.CatalogId = getCatalogId(context);\r\n this.categoryPathLooksups = categoryPathLooksups;\r\n this.apiSettings = context.apiSettings;\r\n this.constructedCacheKey = '';\r\n categoryPathLooksups.forEach(categoryPath => {\r\n this.constructedCacheKey += `${categoryPath.ProductId && categoryPath.ProductId.toString()}|`;\r\n });\r\n this.constructedCacheKey += `${this.ChannelId.toString()}|`;\r\n this.constructedCacheKey += `${this.CatalogId.toString()}|`;\r\n this.locale = context.locale;\r\n }\r\n\r\n public getCacheKey = () => buildCacheKey(this.constructedCacheKey, this.apiSettings, this.locale);\r\n\r\n public getCacheObjectType = () => 'CategoryPath';\r\n\r\n public dataCacheType = (): CacheType => 'request';\r\n\r\n /**\r\n * Retrieves locale to use for the current API call.\r\n * @returns A string which represents locale.\r\n */\r\n public getLocale = (): string => this.locale;\r\n}\r\n\r\nconst createGoogleAnalyticsEvent = async (cart: Readonly, eventName: GaEvent, actionContext: IActionContext): Promise => {\r\n var channelId = actionContext.requestContext.channel?.RecordId;\r\n\r\n const items: GaItem[] = [];\r\n\r\n if (channelId && cart.CartLines) {\r\n let i = 0;\r\n for (const cartLine of cart.CartLines) {\r\n if (cartLine.ProductId) {\r\n const productDetails = await getProductDetails(cartLine.ProductId, channelId, actionContext);\r\n\r\n const product = productDetails.product;\r\n const variant = product?.Dimensions?.map(d => d.DimensionValue?.Value).join(',');\r\n\r\n process.env.NODE_ENV === 'development' &&\r\n console.log('createGoogleAnalyticsEvent', cartLine.ProductId, JSON.parse(JSON.stringify(product)));\r\n\r\n const discount = (cartLine.DiscountLines ?? []).reduce((a, b) => a + (b.Amount ?? 0), 0);\r\n\r\n var brand = product?.ExtensionProperties?.find(ep => ep.Key === 'Brand')?.Value?.StringValue;\r\n\r\n var item = {\r\n recId: cartLine.ProductId,\r\n item_id: product?.ProductNumber || product?.ItemId || cartLine.ItemId || '',\r\n item_name: product?.Name ?? '',\r\n index: i,\r\n item_variant: variant,\r\n price: (product?.Price ?? cartLine.Price ?? 0) - discount,\r\n discount: discount,\r\n pid: product?.ItemId || cartLine.ItemId || '',\r\n item_brand: brand,\r\n quantity: cartLine.Quantity ?? 0\r\n };\r\n\r\n items.push(item);\r\n }\r\n\r\n i++;\r\n }\r\n }\r\n\r\n const total = items.reduce((a, b) => a + (b.price ?? 0) * b.quantity, 0);\r\n\r\n return {\r\n event: eventName,\r\n ecommerce: {\r\n currency: 'CAD',\r\n value: total,\r\n items: items\r\n }\r\n };\r\n};\r\n\r\nexport { createGoogleAnalyticsEvent };\r\n","import { IActionContext } from '@msdyn365-commerce/core';\r\nimport { GetCategoryPathsInput } from './createGoogleAnalyticsEvent';\r\nimport { getCategoryPaths } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nexport type GaDataLayer = {\r\n push: (payload: GaPayload) => void;\r\n};\r\n\r\nexport type GaItem = {\r\n item_id: string;\r\n item_name: string;\r\n affiliation?: string;\r\n coupon?: string;\r\n discount?: number;\r\n index: number;\r\n item_brand?: string;\r\n item_category?: string;\r\n item_category2?: string;\r\n item_category3?: string;\r\n item_category4?: string;\r\n item_category5?: string;\r\n item_list_id?: string;\r\n item_list_name?: string;\r\n item_variant?: string;\r\n location_id?: string;\r\n price: number;\r\n quantity: number;\r\n pid?: string;\r\n recId?: number;\r\n};\r\n\r\nexport type GaEvent =\r\n | 'view_item'\r\n | 'view_cart'\r\n | 'purchase'\r\n | 'begin_checkout'\r\n | 'add_to_cart'\r\n | 'add_to_wishlist'\r\n | 'remove_from_cart'\r\n | 'add_shipping_info'\r\n | 'add_payment_info';\r\n\r\nexport type GaPayload = {\r\n event?: GaEvent;\r\n ecommerce?: {\r\n transaction_id?: string;\r\n currency?: string;\r\n value: number;\r\n tax?: number;\r\n shipping?: number;\r\n shipping_tier?: string;\r\n payment_type?: string;\r\n coupon?: string;\r\n items?: GaItem[];\r\n } | null;\r\n};\r\n\r\nexport const pushGoogleAnalyticsEvent = async (payload?: GaPayload, actionContext?: IActionContext) => {\r\n const dataLayer = typeof window !== 'undefined' && (window['dataLayer'] as GaDataLayer);\r\n if (dataLayer) {\r\n process.env.NODE_ENV === 'development' && console.log('pushGoogleAnalyticsEvent', payload);\r\n dataLayer.push({ ecommerce: null });\r\n if (payload) {\r\n for (const gaItem of payload?.ecommerce?.items ?? []) {\r\n if (gaItem.recId) {\r\n if (actionContext) {\r\n const categoryPaths = await getCategoryPaths(\r\n new GetCategoryPathsInput(actionContext.requestContext, [{ ProductId: +gaItem.recId }]),\r\n actionContext\r\n );\r\n\r\n if (categoryPaths.length > 0) {\r\n gaItem.item_category = categoryPaths[0].Name ?? undefined;\r\n }\r\n if (categoryPaths.length > 1) {\r\n gaItem.item_category2 = categoryPaths[1].Name ?? undefined;\r\n }\r\n if (categoryPaths.length > 2) {\r\n gaItem.item_category3 = categoryPaths[2].Name ?? undefined;\r\n }\r\n if (categoryPaths.length > 3) {\r\n gaItem.item_category4 = categoryPaths[3].Name ?? undefined;\r\n }\r\n if (categoryPaths.length > 4) {\r\n gaItem.item_category5 = categoryPaths[4].Name ?? undefined;\r\n }\r\n }\r\n\r\n delete gaItem.recId;\r\n }\r\n }\r\n\r\n dataLayer.push(payload);\r\n }\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\r\nimport { GaPayload, pushGoogleAnalyticsEvent } from './pushGoogleAnalyticsEvent';\r\n\r\nlet lastCached = '';\r\n\r\nconst useGoogleAnalytics = (payload?: GaPayload, actionContext?: IActionContext, deps?: React.DependencyList | undefined) => {\r\n const isBrowser = MsDyn365.isBrowser;\r\n\r\n const cacheKey = React.useMemo(() => {\r\n if (payload?.event === 'view_item' && payload.ecommerce?.items) {\r\n return payload.ecommerce?.items[0]?.item_id;\r\n } else if (payload?.event === 'purchase') {\r\n return payload.ecommerce?.transaction_id;\r\n } else if (payload?.event === 'begin_checkout' && payload.ecommerce?.items) {\r\n return payload.ecommerce?.items.map(i => i.item_id).join(',');\r\n }\r\n\r\n return '';\r\n }, [payload]);\r\n\r\n if (cacheKey) {\r\n // skip if the event is unrecognized\r\n lastCached = cacheKey;\r\n }\r\n\r\n process.env.NODE_ENV === 'development' && console.log('useGoogleAnalytics', 'cacheKey', cacheKey);\r\n\r\n React.useEffect(() => {\r\n if (isBrowser) {\r\n void pushGoogleAnalyticsEvent(payload, actionContext);\r\n }\r\n }, [isBrowser, cacheKey || lastCached, ...(deps ?? [])]);\r\n};\r\n\r\nexport { useGoogleAnalytics };\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { getCartStateData, GetCartStateDataInput } from '@msdyn365-commerce/global-state';\r\nimport { ProductDimension } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n getDimensionsForSelectedVariant,\r\n GetDimensionsForSelectedVariantInput,\r\n getPriceForSelectedVariant,\r\n getProductAvailabilitiesForSelectedVariant,\r\n getRatingsSummary,\r\n GetRatingsSummaryInput,\r\n getRnrEndpointId,\r\n getRnrPartnerId,\r\n getSelectedVariant,\r\n PriceForSelectedVariantInput,\r\n ProductAvailabilitiesForSelectedVariantInput,\r\n SelectedVariantInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport { IProductDetails } from '@msdyn365-commerce-modules/buybox';\r\n\r\n/**\r\n * Calls the Retail API and returns the product details.\r\n * @param productId\r\n * @param channelId\r\n * @param ctx\r\n * @param selectedDimensions - Dimensions previously selected for the product variant.\r\n */\r\nexport async function getProductDetails(\r\n productId: number,\r\n channelId: number,\r\n ctx: IActionContext,\r\n selectedDimensions?: ProductDimension[]\r\n): Promise {\r\n const productDetails: IProductDetails = {};\r\n\r\n if (productId > 0 && channelId > 0) {\r\n const tenantId = getRnrPartnerId(ctx);\r\n const serviceEndPoint = getRnrEndpointId(ctx);\r\n\r\n // Get Product Details\r\n await getSelectedVariant(new SelectedVariantInput(productId, channelId, selectedDimensions, 'get'), ctx)\r\n .then(async productResult => {\r\n if (productResult) {\r\n productDetails.product = productResult;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n\r\n // Get Product Availability\r\n await getProductAvailabilitiesForSelectedVariant(new ProductAvailabilitiesForSelectedVariantInput(productId, channelId), ctx)\r\n .then(productAvailabilities => {\r\n if (productAvailabilities) {\r\n productDetails.productAvailableQuantity = productAvailabilities;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n\r\n // Get Product Price\r\n await getPriceForSelectedVariant(new PriceForSelectedVariantInput(productId, channelId, undefined), ctx)\r\n .then(productPrice => {\r\n if (productPrice) {\r\n productDetails.productPrice = productPrice;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n\r\n // Get product dimensions\r\n await getDimensionsForSelectedVariant(new GetDimensionsForSelectedVariantInput(productId, channelId, selectedDimensions), ctx)\r\n .then(productDimensions => {\r\n if (productDimensions) {\r\n productDetails.productDimensions = productDimensions;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n\r\n // Get Cart State\r\n await getCartStateData(new GetCartStateDataInput(ctx.requestContext.apiSettings), ctx)\r\n .then(cartState => {\r\n productDetails.cart = cartState;\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n\r\n // Get Product Ratings\r\n if (tenantId && serviceEndPoint) {\r\n await getRatingsSummary(new GetRatingsSummaryInput(productId.toString(), tenantId, serviceEndPoint), ctx)\r\n .then(ratingsSummaryData => {\r\n if (ratingsSummaryData) {\r\n productDetails.ratingsSummary = ratingsSummaryData;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n });\r\n }\r\n }\r\n\r\n return productDetails;\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IActionContext, IImageData, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { MediaLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { getMediaLocationsForSelectedVariant, MediaLocationsForSelectedVariantInput } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nexport async function getValidProductImages(\r\n productId: number,\r\n channelId: number,\r\n actionContext: IActionContext,\r\n imageSettings: IImageSettings,\r\n selectedProduct?: SimpleProduct\r\n): Promise {\r\n const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct);\r\n\r\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\r\n .then(mediaLocations => {\r\n if (mediaLocations) {\r\n return Promise.all(mediaLocations.map(async mediaLocation => validateMediaLocaionAsync(mediaLocation, imageSettings))).then(\r\n pairs => {\r\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\r\n }\r\n );\r\n }\r\n return [];\r\n })\r\n .catch(error => {\r\n actionContext.telemetry.exception(error);\r\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\r\n return [];\r\n });\r\n}\r\n\r\nasync function validateMediaLocaionAsync(mediaLocation: MediaLocation, imageSettings: IImageSettings): Promise<[IImageData, boolean]> {\r\n const imageData = {\r\n src: mediaLocation.Uri || '',\r\n altText: mediaLocation.AltText || ''\r\n };\r\n\r\n const imageSettingsVal = imageSettings.viewports.lg!.q!.replace(/[\"']+/g, '');\r\n\r\n if (imageData.src === '') {\r\n return [imageData, false];\r\n }\r\n\r\n const imageConcatVal = `${imageData.src}` + '&' + `${imageSettingsVal}`;\r\n\r\n return new Promise<[IImageData, boolean]>(resolve => {\r\n try {\r\n const http = new XMLHttpRequest();\r\n http.open('HEAD', imageConcatVal, true);\r\n\r\n http.addEventListener('load', () => {\r\n resolve([imageData, http.status === 200 || http.status === 201]);\r\n });\r\n\r\n http.addEventListener('error', () => {\r\n resolve([imageData, false]);\r\n });\r\n\r\n http.send();\r\n } catch {\r\n resolve([imageData, false]);\r\n }\r\n });\r\n}\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\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node, Waiting } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { useGoogleAnalytics } from '../../../common/useGoogleAnalytics';\r\n\r\nimport {\r\n ICheckoutViewProps,\r\n ILineItem,\r\n ILineItemDeliveryGroup,\r\n ILineItems,\r\n IOrderSummary,\r\n IPickUpAtStore,\r\n IEmailDelivery\r\n} from '@msdyn365-commerce-modules/checkout';\r\nimport { IInvoiceSummaryLines } from '@msdyn365-commerce-modules/invoice-payment-summary';\r\nimport { GaPayload } from '../../../common/pushGoogleAnalyticsEvent';\r\nimport { CartGuide } from './components/CartGuide';\r\n\r\ninterface IInvoicePaymentSummary {\r\n heading?: React.ReactNode;\r\n lines?: IInvoiceSummaryLines;\r\n}\r\n\r\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => {label};\r\n\r\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {pickUpAtStore && }\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\r\n \r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\r\n LineItemDeliveryGroup,\r\n LineItemList,\r\n heading,\r\n lineItems,\r\n lineItemWraper,\r\n lineItemWraperIcon\r\n}) => (\r\n \r\n {lineItemWraperIcon}\r\n {lineItemWraper}\r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const LineItemsComponent: React.FC = ({\r\n LineItems,\r\n Header,\r\n heading,\r\n editLink,\r\n itemsForPickup,\r\n itemsForShip,\r\n itemsForEmail,\r\n itemsGroupWithMulitplePickupMode\r\n}) => (\r\n \r\n \r\n {heading}\r\n {editLink}\r\n \r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\r\n {itemsGroupWithMulitplePickupMode !== undefined\r\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\r\n return ;\r\n })\r\n : null}\r\n \r\n);\r\n\r\nconst OrderSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.subtotal}\r\n {lines.shipping}\r\n {lines.otherCharge}\r\n {lines.tax}\r\n {lines.totalDiscounts}\r\n {lines.loyalty}\r\n {lines.giftCard}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.invoices}\r\n {lines.giftCard}\r\n {lines.loyalty}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst CheckoutView: React.FC = props => {\r\n const {\r\n isPaymentVerificationRedirection,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n canShow,\r\n checkoutProps,\r\n headerProps,\r\n hasSalesOrder,\r\n hasInvoiceLine,\r\n bodyProps,\r\n mainProps,\r\n mainControlProps,\r\n sideProps,\r\n sideControlFirstProps,\r\n sideControlSecondProps,\r\n termsAndConditionsProps,\r\n orderConfirmation,\r\n loading,\r\n alert,\r\n title,\r\n guidedForm,\r\n orderSummary,\r\n invoicePaymentSummary,\r\n lineItems,\r\n placeOrderButton,\r\n termsAndConditions,\r\n keepShoppingButton,\r\n checkoutExpressPaymentContainer,\r\n data: { checkout, products }\r\n } = props;\r\n\r\n const cartRes = checkout?.result?.checkoutCart.cart;\r\n const productsRes = products?.result;\r\n\r\n process.env.NODE_ENV === 'development' && console.log('useGoogleAnalytics 1', JSON.parse(JSON.stringify(productsRes ?? null)));\r\n process.env.NODE_ENV === 'development' && console.log('useGoogleAnalytics 2', JSON.parse(JSON.stringify(cartRes ?? null)));\r\n\r\n const gaPayload = React.useMemo(() => {\r\n if (cartRes && productsRes) {\r\n const gaPayload: GaPayload = {\r\n event: 'begin_checkout',\r\n ecommerce: {\r\n value: cartRes.TotalAmount ?? 0,\r\n currency: 'CAD', // TODO: investigate why it's not available\r\n coupon: cartRes.Coupons?.map(c => c.Code)[0] ?? '',\r\n items: cartRes.CartLines?.map((l, i) => {\r\n const product = productsRes.find(p => p.RecordId === l.ProductId);\r\n const brandFromExt = product?.ExtensionProperties?.find(p => p.Key === 'Brand')?.Value?.StringValue;\r\n const variant = product?.Dimensions?.map(d => d.DimensionValue?.Value).join(',');\r\n const discount = (l.DiscountLines ?? []).reduce((a, b) => a + (b.Amount ?? 0), 0);\r\n return {\r\n recId: product?.RecordId,\r\n item_name: product?.Name ?? '',\r\n item_id: (product?.ProductNumber || product?.ItemId) ?? '',\r\n price: (l.Price ?? 0) - discount,\r\n discount: discount,\r\n quantity: l.Quantity ?? 1,\r\n item_variant: variant,\r\n pid: product?.ItemId ?? '',\r\n item_brand: brandFromExt ?? undefined,\r\n index: i\r\n };\r\n })\r\n }\r\n };\r\n\r\n return gaPayload;\r\n }\r\n\r\n return undefined;\r\n }, [cartRes, productsRes]);\r\n\r\n useGoogleAnalytics(gaPayload, props.context.actionContext);\r\n\r\n return (\r\n \r\n {!hasSalesOrder && {title}}\r\n {!hasSalesOrder && isPaymentVerificationRedirection && shouldEnableSinglePaymentAuthorizationCheckout && !alert && !loading && (\r\n \r\n )}\r\n {!hasSalesOrder && (\r\n \r\n {loading}\r\n {alert}\r\n {canShow && (\r\n <>\r\n \r\n {checkoutExpressPaymentContainer}\r\n {guidedForm}\r\n {termsAndConditions}\r\n \r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n {!hasInvoiceLine\r\n ? orderSummary && \r\n : invoicePaymentSummary && }\r\n \r\n {termsAndConditions}\r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n {lineItems && }\r\n \r\n {termsAndConditions}\r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n {hasSalesOrder && orderConfirmation}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutView;\r\n","import React from 'react';\r\n\r\nconst CartGuide = () => {\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n Having trouble? Contact us!\r\n
\r\n
\r\n {\r\n const iframe = document.getElementById('launcher') as HTMLIFrameElement;\r\n\r\n try {\r\n iframe?.contentWindow?.document.querySelector('button')?.click();\r\n } catch (err) {\r\n console.error(err);\r\n }\r\n }}\r\n >\r\n Live Chat\r\n \r\n
\r\n
\r\n 1 844-976-1699\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Shipping Policy\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport { CartGuide };\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['checkout'] = {\n c: () => require('@msdyn365-commerce-modules/checkout/dist/lib/modules/checkout/checkout'),\n $type: 'containerModule',\n da: [{name:'catalogs', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs', runOn: 0},{name:'channelDeliveryOptionConfig', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration', runOn: 0},{name:'checkout', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/checkout-state-data-action', runOn: 1},{name:'customerInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'deliveryOptions', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-delivery-options-for-cartlines', runOn: 1},{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0},{name:'orgUnitLocations', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/search-org-unit-locations', runOn: 1},{name:'products', path:'@msdyn365-commerce-modules/checkout/dist/lib/modules/checkout/actions/get-products-in-active-checkout-cart', runOn: 1}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'checkout',\n p: 'checkout',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/checkout/dist/lib/modules/checkout'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/checkout/dist/lib/modules/checkout/actions/get-products-in-active-checkout-cart';\n let dataAction = require('@msdyn365-commerce-modules/checkout/dist/lib/modules/checkout/actions/get-products-in-active-checkout-cart');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-delivery-options-for-cartlines';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-delivery-options-for-cartlines');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/search-org-unit-locations';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/search-org-unit-locations');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/checkout-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/checkout-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|themes|henrys|views|checkout'] = {\n c: () => require('partner/themes/henrys/views/checkout.view.tsx'),\n cn: '__local__-__local__-checkout'\n };\nviewDictionary['@msdyn365-commerce-modules|checkout|modules|checkout|checkout'] = {\n c: () => require('@msdyn365-commerce-modules/checkout/dist/lib/modules/checkout/checkout.view.js'),\n cn: '@msdyn365-commerce-modules-checkout-checkout'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IAny,\n IActionContext,\n IActionInput,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { searchOrgUnitLocationsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/OrgUnitsDataActions.g';\n\n/**\n * Input for search-org-unit-locations data action.\n */\nexport class SearchOrgUnitLocationsInput implements IActionInput {\n public getCacheKey = () => 'SearchOrgUnitLocations';\n\n public getCacheObjectType = () => 'SearchOrgUnitLocations';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * Creates the input required to make the retail api call.\n * @param inputData -- Input data.\n * @returns -- IActionInput.\n */\nexport const createSearchOrgUnitLocationsInputFunc = (inputData: ICreateActionContext>): IActionInput => {\n return new SearchOrgUnitLocationsInput();\n};\n\n/**\n * Calls the Retail API and returns all the orgUnitLocations as array.\n * @param input - Input.\n * @param ctx - Context.\n * @returns - orgUnitLocations.\n */\nexport async function getSearchOrgUnitLocationsAction(\n input: SearchOrgUnitLocationsInput,\n context: IActionContext\n): Promise {\n const OrgUnitLocations = await searchOrgUnitLocationsAsync(\n {\n callerContext: context\n },\n {}\n );\n\n return OrgUnitLocations;\n}\n\nexport const retailActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/retail-actions/search-org-unit-locations',\n action: >getSearchOrgUnitLocationsAction,\n input: createSearchOrgUnitLocationsInputFunc\n});\n\nexport default retailActionDataAction;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["GetCategoryPathsInput","constructor","context","categoryPathLooksups","getCacheKey","buildCacheKey","base","this","constructedCacheKey","apiSettings","locale","channelId","catalogId","getCacheObjectType","dataCacheType","getLocale","ChannelId","CatalogId","getCatalogId","forEach","categoryPath","ProductId","toString","createGoogleAnalyticsEvent","async","cart","eventName","actionContext","_actionContext$reques","requestContext","channel","RecordId","items","CartLines","i","cartLine","_product$Dimensions","_cartLine$DiscountLin","_product$ExtensionPro","_product$Name","_ref","_product$Price","_cartLine$Quantity","product","getProductDetails","variant","Dimensions","map","d","_d$DimensionValue","DimensionValue","Value","join","discount","DiscountLines","reduce","a","b","_b$Amount","Amount","brand","ExtensionProperties","find","ep","Key","StringValue","item","recId","item_id","ProductNumber","ItemId","item_name","Name","index","item_variant","price","Price","pid","item_brand","quantity","Quantity","push","event","ecommerce","currency","value","_b$price","pushGoogleAnalyticsEvent","payload","dataLayer","window","gaItem","_payload$ecommerce$it","_payload$ecommerce","categoryPaths","getCategoryPaths","_categoryPaths$0$Name","_categoryPaths$1$Name","_categoryPaths$2$Name","_categoryPaths$3$Name","_categoryPaths$4$Name","length","item_category","undefined","item_category2","item_category3","item_category4","item_category5","lastCached","useGoogleAnalytics","deps","isBrowser","MsDyn365","cacheKey","React","_payload$ecommerce4","_payload$ecommerce2","_payload$ecommerce3","_payload$ecommerce5","transaction_id","productId","ctx","selectedDimensions","productDetails","tenantId","getRnrPartnerId","serviceEndPoint","getRnrEndpointId","getSelectedVariant","SelectedVariantInput","then","productResult","catch","error","telemetry","exception","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","productAvailabilities","productAvailableQuantity","getPriceForSelectedVariant","PriceForSelectedVariantInput","productPrice","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","productDimensions","getCartStateData","GetCartStateDataInput","cartState","getRatingsSummary","GetRatingsSummaryInput","ratingsSummaryData","ratingsSummary","getValidProductImages","imageSettings","selectedProduct","actionInput","MediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariant","mediaLocations","Promise","all","mediaLocation","imageData","src","Uri","altText","AltText","imageSettingsVal","viewports","lg","q","replace","imageConcatVal","resolve","http","XMLHttpRequest","open","addEventListener","status","send","_unused","validateMediaLocaionAsync","pairs","filter","pair","debug","PickUpAtStoreComponent","PickUpAtStore","label","location","Node","Object","assign","EmailDeliveryComponent","_ref2","EmailDelivery","LineItemComponent","_ref3","LineItem","pickUpAtStore","emailDelivery","LineItemGroupComponent","_ref4","LineItemDeliveryGroup","LineItemList","heading","lineItems","lineItem","key","LineId","LineItemGroupComponentWithMultiplePickUp","_ref5","lineItemWraper","lineItemWraperIcon","LineItemComponentWithMultiplePickUp","_ref6","PickUpAtStoreComponentWithMultiplePickUp","_ref7","LineItemsComponent","_ref8","LineItems","Header","editLink","itemsForPickup","itemsForShip","itemsForEmail","itemsGroupWithMulitplePickupMode","OrderSummaryComponent","_ref9","lines","className","subtotal","shipping","otherCharge","tax","totalDiscounts","loyalty","giftCard","orderTotal","PaymentSummaryComponent","_ref10","invoices","props","_checkout$result","isPaymentVerificationRedirection","shouldEnableSinglePaymentAuthorizationCheckout","canShow","checkoutProps","headerProps","hasSalesOrder","hasInvoiceLine","bodyProps","mainProps","mainControlProps","sideProps","sideControlFirstProps","sideControlSecondProps","termsAndConditionsProps","orderConfirmation","loading","alert","title","guidedForm","orderSummary","invoicePaymentSummary","placeOrderButton","termsAndConditions","keepShoppingButton","checkoutExpressPaymentContainer","data","checkout","products","cartRes","result","checkoutCart","productsRes","gaPayload","_cartRes$TotalAmount","_cartRes$Coupons$map$","_cartRes$Coupons","_cartRes$CartLines","TotalAmount","coupon","Coupons","c","Code","l","_l$DiscountLines","_ref11","_l$Price","_l$Quantity","_product$ItemId","p","brandFromExt","Module","Waiting","CartGuide","href","onClick","iframe","document","getElementById","_iframe$contentWindow","contentWindow","querySelector","click","err","console","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","require","$type","da","name","path","runOn","iNM","ns","n","pdp","md","__bindings__","_objectSpread","viewDictionary","cn","SearchOrgUnitLocationsInput","createSearchOrgUnitLocationsInputFunc","inputData","getSearchOrgUnitLocationsAction","input","searchOrgUnitLocationsAsync","callerContext","retailActionDataAction","createObservableDataAction","action","module","exports","ReactDOM"],"sourceRoot":""}