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,KAAIrD,OAAAC,OAAA,GAAKqH,GACLpB,EACAzC,EACAgC,GAEL/S,EAAAA,cAAC2Q,EAAAA,KAAIrD,OAAAC,OAAA,GAAKoH,GAAkCZ,GACzC,EAYuBwC,CAA0BrW,GAAgB,EAGhF","sources":["webpack://Citta2.0/./src/modules/checkout-apple-pay/checkout-apple-pay.data.ts?c986","webpack://Citta2.0/./src/modules/checkout-apple-pay/checkout-apple-pay.tsx?f243","webpack://Citta2.0/./src/modules/checkout-apple-pay/checkout-apple-pay.view.tsx?222d","webpack://Citta2.0/./src/modules/default-external-script/default-external-script.tsx?2a33","webpack://Citta2.0/./src/modules/default-inline-script/default-inline-script.tsx?5ccd","webpack://Citta2.0/./src/modules/default-inline-style/default-inline-style.tsx?3552","webpack://Citta2.0/./src/utils/script-utils.ts?cb52","webpack://Citta2.0/./src/modules/footer-category/footer-category.tsx?e0bd","webpack://Citta2.0/./src/modules/footer-category/footer-category.view.tsx?fdce","webpack://Citta2.0/./src/modules/text-block/text-block.tsx?db84","webpack://Citta2.0/./src/modules/text-block/text-block.view.tsx?9307","webpack://Citta2.0/./src/modules/tile-list-item/components/links.tsx?c969","webpack://Citta2.0/./src/modules/tile-list-item/tile-list-item.tsx?114a","webpack://Citta2.0/./src/modules/tile-list-item/tile-list-item.view.tsx?19a8"],"sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ICheckoutState } from '@msdyn365-commerce/global-state';\nimport {\n AsyncResult, CardPaymentAcceptPoint\n} from '@msdyn365-commerce/retail-proxy';\n\nexport enum ApplePayButtonState {\n Unknown,\n NotAvailable,\n Available\n};\n\n/**\n * Interface for checkout apple pay data.\n */\nexport interface ICheckoutApplePayData {\n checkout?: AsyncResult;\n cardPaymentAcceptPoint?: AsyncResult;\n}","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport { getCheckoutState, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport {\n getDeliveryOptionsAsync,\n retrieveCardPaymentAcceptResultAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport {\n Address,\n CardPaymentAcceptResult,\n Cart,\n FilterDeliveryModeOption\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { CardPaymentAcceptPoint } from '@msdyn365-commerce/retail-proxy';\nimport { EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { computed } from 'mobx';\nimport { ObjectExtensions, QueryResultSettingsProxy, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { ApplePayButtonState, ICheckoutApplePayData } from './checkout-apple-pay.data';\nimport { ICheckoutApplePayProps } from './checkout-apple-pay.props.autogenerated';\nimport { PlaceOrder } from '../../common/place-order';\nimport { ErrorComponent } from '../../common';\nimport { getThreeLetterCountryCode } from '../../common/country-codes';\n\nenum ApplePayPaymentAuthorizationResult {\n STATUS_SUCCESS = 0,\n STATUS_FAILURE = 1\n}\n\ninterface IApplePayLine {\n label: string;\n type: string;\n amount: string;\n}\n\ninterface IValidationEvent {\n validationUrl: string;\n}\n\ninterface IResult {\n newTotal: IApplePayLine;\n}\n\ninterface IAuthorizeEvent {\n paymentToken: string;\n shippingContact?: IShippingContactSelectedEvent;\n}\n\ninterface IAuthorizeResult {\n resultCode: ApplePayPaymentAuthorizationResult;\n}\n\ninterface IPaymentMethodEvent {\n type?: string;\n}\n\n/**\n * An interface that describes the shipping method for delivering physical goods.\n * Link to Apple doc - https://developer.apple.com/documentation/apple_pay_on_the_web/applepayshippingmethod\n */\ninterface IApplePayShippingMethod {\n /**\n * A short description of the shipping method.\n */\n label?: string;\n\n /**\n * The nonnegative cost associated with this shipping method.\n */\n amount?: string;\n\n /**\n * Additional description of the shipping method.\n */\n detail?: string;\n\n /**\n * A client-defined value used to identify this shipping method.\n */\n identifier?: string;\n}\n\n/**\n * Contact information fields to use for billing and shipping contact information.\n * Link to Apple doc - https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentcontact\n */\ninterface IShippingContactSelectedEvent {\n /**\n * A phone number for the contact.\n */\n phoneNumber?: string;\n\n /**\n * An email address for the contact.\n */\n emailAddress?: string;\n\n /**\n * The contact’s given name.\n */\n givenName?: string;\n\n /**\n * The contact’s family name.\n */\n familyName?: string;\n\n /**\n * The street portion of the address for the contact.\n */\n addressLines?: string[];\n\n /**\n * Additional information associated with the location, typically defined at the city or town level (such as district or neighborhood), in a postal address.\n */\n subLocality?: string;\n\n /**\n * The city for the contact.\n */\n locality?: string;\n\n /**\n * The zip code or postal code, where applicable, for the contact.\n */\n postalCode?: string;\n\n /**\n * The subAdministrative area (such as a county or other region) in a postal address.\n */\n subAdministrativeArea?: string;\n\n /**\n * The state for the contact.\n */\n administrativeArea?: string;\n\n /**\n * The name of the country or region for the contact.\n */\n country?: string;\n\n /**\n * The contact’s two-letter ISO 3166 country code.\n */\n countryCode?: string;\n}\n\ninterface IShippingMethodSelectedEvent {\n /**\n * The identifier of selected shipping method.\n */\n id: string;\n}\n\ninterface IAppleSessionHandler {\n onAuthorize(authorizeEvent: IAuthorizeEvent): Promise;\n onCancel(): void;\n onPaymentMethodUpdate(paymentMethodEvent: IPaymentMethodEvent): Promise;\n onValidation(validationEvent: IValidationEvent): Promise;\n\n onShippingContactSelected?(shippingContactSelectedEvent: IShippingContactSelectedEvent): Promise;\n onShippingMethodSelected?(shippingMethodSelectedEvent: IShippingMethodSelectedEvent): Promise;\n}\n\nexport interface ICheckoutApplePayViewProps extends ICheckoutApplePayProps<{}> {\n className?: string;\n checkoutApplePay: IModuleProps;\n applePayButton?: React.ReactNode;\n alert?: React.ReactNode;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare const window: any;\n\nexport interface ICheckoutApplePayModuleProps extends ICheckoutApplePayProps {}\n\ninterface ICheckoutApplePayState {\n applePayButtonState: ApplePayButtonState;\n paymentConnectorId?: string;\n lineDisplayName?: string;\n errorMessage?: string;\n shippingContact?: Address;\n shippingMethodId?: string;\n}\n/**\n *\n * CheckoutApplePay component\n * @extends {React.Component}\n */\nexport class CheckoutApplePay extends React.Component {\n private readonly moduleClassName: string = 'ms-checkout-apple-pay';\n private readonly applePaySdkId = 'd365-apple-pay-sdk';\n private readonly zeroAmount: number = 0;\n\n @computed private get getLoyaltyAmount(): number {\n const {\n data: { checkout }\n } = this.props;\n const checkoutState = checkout?.result;\n return checkoutState?.loyaltyAmount ? checkoutState.loyaltyAmount : this.zeroAmount;\n }\n\n @computed private get getGiftCardTotalAmount(): number {\n const {\n data: { checkout }\n } = this.props;\n const checkoutState = checkout?.result;\n if (!checkoutState || !checkoutState.giftCardExtends) {\n return this.zeroAmount;\n }\n return checkoutState.giftCardExtends.reduce((count: number, giftCard: IGiftCardExtend) => {\n return count + (giftCard.Balance || this.zeroAmount);\n }, 0);\n }\n\n @computed private get getCustomerAccountAmount(): number {\n const {\n data: { checkout }\n } = this.props;\n const checkoutState = checkout?.result;\n\n return checkoutState?.customerAccountAmount ?? this.zeroAmount;\n }\n\n @computed private get amountDue(): number {\n const {\n data: { checkout }\n } = this.props;\n\n const cart = checkout?.result?.checkoutCart.cart;\n if (!cart || !cart.AmountDue) {\n return this.zeroAmount;\n }\n\n return Math.max(\n this.zeroAmount,\n cart.AmountDue - this.getGiftCardTotalAmount - this.getLoyaltyAmount - this.getCustomerAccountAmount\n );\n }\n\n @computed private get merchantName(): string {\n return this.state.lineDisplayName || '';\n }\n\n public constructor(props: ICheckoutApplePayProps) {\n super(props);\n this.state = {\n applePayButtonState: ApplePayButtonState.Unknown\n };\n }\n\n public async componentDidMount() {\n const {\n data: { cardPaymentAcceptPoint },\n telemetry\n } = this.props;\n\n // load JS portion of payment connector for ApplePay\n await cardPaymentAcceptPoint;\n\n if (cardPaymentAcceptPoint?.result !== undefined) {\n this.loadPaymentConnectorSdk(cardPaymentAcceptPoint.result);\n\n // load official ApplePay JS SDK.\n const script = document.createElement('script');\n script.onload = () => {\n let isApplePayAvailable = false;\n if (typeof window.isApplePayAvailable === 'function') {\n isApplePayAvailable = window.isApplePayAvailable();\n }\n\n telemetry.information(`is Apple Pay available: ${isApplePayAvailable}`);\n return this.setState({\n applePayButtonState: isApplePayAvailable ? ApplePayButtonState.Available : ApplePayButtonState.NotAvailable,\n paymentConnectorId: cardPaymentAcceptPoint.result?.PaymentConnectorId\n });\n };\n\n script.src = 'https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js';\n script.async = false;\n script.onerror = () => telemetry.error('unable to load Apple Pay SDK');\n document.body.appendChild(script);\n } else {\n telemetry.error('unable to get Apple Pay connector SDK');\n }\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className },\n resources,\n telemetry\n } = this.props;\n\n if (this.props.context.request.user.isOBORequest && EnabledPaymentsForOBO.ExpressPayment === 0) {\n telemetry.information('isOBORequest is enabled, apple pay module wont render');\n return null;\n }\n\n let applePayButton: React.ReactNode;\n switch (this.state.applePayButtonState) {\n case ApplePayButtonState.Available:\n applePayButton = (\n
\n );\n break;\n\n case ApplePayButtonState.Unknown:\n case ApplePayButtonState.NotAvailable:\n default:\n applePayButton =
;\n break;\n }\n\n const viewProps: ICheckoutApplePayViewProps = {\n ...this.props,\n ...this.state,\n className,\n checkoutApplePay: {\n moduleProps: this.props,\n className: classNames(this.moduleClassName, className)\n },\n alert: this.state.errorMessage && (\n \n ),\n applePayButton\n };\n\n return this.props.renderView(viewProps);\n }\n\n /**\n * Handler for Apple Pay button.\n */\n public handlePayButton = async () => {\n const { config, resources, telemetry } = this.props;\n\n const handler: IAppleSessionHandler = {\n onAuthorize: this.authorizePayment,\n onCancel: this.cancelPayment,\n onPaymentMethodUpdate: this.updatePaymentMethod,\n onValidation: this.validateMerchant\n };\n\n // Set shipping related callbacks if corresponding options enabled.\n if (config.shouldRequestShippingAddress) {\n handler.onShippingContactSelected = this.shippingContactSelected;\n handler.onShippingMethodSelected = this.shippingMethodSelected;\n }\n\n try {\n // calling connector JS to create payment session.\n const displayName = window.CreateApplePaySession(handler, this.amountDue.toString());\n this.setState({\n lineDisplayName: displayName\n });\n } catch (error) {\n this.showErrorMessage(resources.genericErrorMessage);\n telemetry.error(`unable to create Apple Pay session: ${error}`);\n }\n };\n\n /**\n * Call CSU checkout API with Apple Pay token.\n * @param paymentToken {string} The gateway payment token\n */\n private checkout = async (paymentToken: string) => {\n const {\n data: { checkout },\n context: { actionContext }\n } = this.props;\n const { paymentConnectorId } = this.state;\n\n const checkoutState = await getCheckoutState(actionContext);\n const cartState = checkoutState.checkoutCart;\n\n const channelConfiguration = actionContext.requestContext.channel;\n if (!channelConfiguration) {\n throw new Error('unable to get channel configuration');\n }\n\n if (checkout !== null) {\n const cardPaymentAcceptResult: CardPaymentAcceptResult = {\n AccessCode: paymentToken,\n Settings: {\n PaymentConnectorId: paymentConnectorId\n }\n };\n\n await checkout?.result?.updateCardPaymentAcceptResult({ newCardPaymentAcceptResult: cardPaymentAcceptResult });\n await PlaceOrder(\n actionContext,\n checkoutState,\n undefined, // orderedProducts\n true, // redirect,\n cartState.cart.Version,\n false // isPaymentVerificationRedirection\n );\n }\n };\n\n /**\n * Load JS SDK from payment connector.\n * @param cardPaymentAcceptPoint {CardPaymentAcceptPoint} The card payment accept point object from CSU.\n */\n private loadPaymentConnectorSdk = (cardPaymentAcceptPoint: CardPaymentAcceptPoint) => {\n if (!cardPaymentAcceptPoint.AcceptPageContent) {\n this.props.telemetry.error(`Card payment accept page content can't be null or empty`);\n return;\n }\n\n const connectorSdk: string = cardPaymentAcceptPoint.AcceptPageContent || '';\n const sdk = document.createElement('script');\n sdk.id = this.applePaySdkId;\n sdk.type = 'text/javascript';\n sdk.appendChild(document.createTextNode(connectorSdk));\n document.body.appendChild(sdk);\n };\n\n /**\n * Validate Apple Pay merchant account with gateway.\n * @param validationEvent {IValidationEvent} The object containing merchant validation data.\n * @returns The response from CSU with validated data.\n */\n private validateMerchant = async (validationEvent: IValidationEvent): Promise => {\n const {\n data: { checkout, cardPaymentAcceptPoint },\n resources,\n telemetry\n } = this.props;\n\n telemetry.information('starting merchant validation for Apple Pay');\n const validationUrl = validationEvent?.validationUrl || '';\n if (!validationUrl) {\n telemetry.error(`Apple Pay validation failed: url can't be null or empty`);\n return Promise.reject('Validation url can not be null or empty');\n }\n\n const cartId = checkout?.result?.checkoutCart.cart.Id || '';\n if (!cartId) {\n telemetry.error(`Apple Pay validation failed: cart can't be null or empty`);\n return Promise.reject('Cart identifier can not be null or empty');\n }\n\n const paymentConnectorId = cardPaymentAcceptPoint?.result?.PaymentConnectorId || '';\n if (!paymentConnectorId) {\n telemetry.error(`Apple Pay validation failed: payment connector identifier can't be null or empty`);\n return Promise.reject('Connector identifier can not be null or empty');\n }\n\n const validationObject = {\n domainName: window.location.hostname,\n validationUrl: validationUrl\n };\n const validationBody = JSON.stringify(validationObject);\n const validationData = await retrieveCardPaymentAcceptResultAsync(\n { callerContext: this.props.context.actionContext },\n btoa(validationBody),\n [],\n cartId,\n { PaymentConnectorId: paymentConnectorId }\n ).catch(error => {\n this.showErrorMessage(resources.genericErrorMessage);\n telemetry.error(`Apple Pay validation failed: ${error}`);\n return Promise.reject(error);\n });\n\n telemetry.information('merchant validation for Apple Pay completed');\n return Promise.resolve(JSON.stringify(validationData));\n };\n\n /**\n * Authorize Apple Pay token by calling checkout API.\n * @param authorizeEvent {IAuthorizeEvent} The object containing authorization information.\n * @returns The authorization result.\n */\n private authorizePayment = async (authorizeEvent: IAuthorizeEvent): Promise => {\n const { resources, telemetry } = this.props;\n\n telemetry.information('starting authorization for Apple Pay');\n try {\n await this.updateContactInfo(authorizeEvent.shippingContact);\n await this.checkout(btoa(JSON.stringify(authorizeEvent)));\n telemetry.information('Apple Pay authorization completed');\n return Promise.resolve({ resultCode: ApplePayPaymentAuthorizationResult.STATUS_SUCCESS });\n } catch (error) {\n this.showErrorMessage(resources.genericErrorMessage);\n telemetry.error(`Apple Pay authorization failed: ${error as string}`);\n return Promise.reject(error as string);\n }\n };\n\n /**\n * Callback to notify Apple Pay sheet was closed/canceled.\n */\n private cancelPayment = (): void => {\n this.props.telemetry.information('Apple Pay popup canceled');\n };\n\n /**\n * The callback for Apple Pay payment method confirmation.\n * @param paymentMethodEvent {IPaymentMethodEvent} The payment method event object.\n * @returns The transaction result object.\n */\n private updatePaymentMethod = async (paymentMethodEvent: IPaymentMethodEvent): Promise => {\n return Promise.resolve({\n newTotal: {\n label: this.merchantName,\n type: 'final',\n amount: `${this.amountDue}`\n }\n });\n };\n\n /**\n * The callback for Apple Pay shipping contact confirmation.\n * @param shippingContact {IShippingContactSelectedEvent} The shipping contact event object.\n * @returns The transaction result object.\n */\n private shippingContactSelected = async (shippingContact: IShippingContactSelectedEvent): Promise => {\n const { resources, telemetry } = this.props;\n\n // construct Address object from Apple Pay shipping contact.\n const shippingAddress: Address = this.getAddressFromShippingContact(shippingContact);\n const shippingMethods = await this.getShippingMethods(shippingAddress);\n if (ObjectExtensions.isNullOrUndefined(shippingMethods) || shippingMethods.length === 0) {\n return Promise.reject();\n }\n\n try {\n const shippingMethodId = shippingMethods.at(0)?.identifier || '';\n await this.updateShippingInfo(shippingMethodId, shippingAddress);\n\n // save shipping contact to update shipping method later.\n this.setState({\n shippingContact: shippingAddress,\n shippingMethodId: shippingMethodId\n });\n } catch (e) {\n telemetry.error(`unable to update shipping info after shipping method change: ${e}`);\n this.showErrorMessage(resources.genericErrorMessage);\n }\n\n return Promise.resolve({\n newShippingMethods: shippingMethods,\n newTotal: {\n label: this.merchantName,\n type: 'final',\n amount: `${this.amountDue}`\n }\n });\n };\n\n /**\n * The callback for Apple Pay shipping method confirmation.\n * @param shippingMethodSelectedEvent {IShippingMethodSelectedEvent} The shipping method event object.\n * @returns The transaction result object.\n */\n private shippingMethodSelected = async (shippingMethod: IShippingMethodSelectedEvent): Promise => {\n const { resources, telemetry } = this.props;\n\n try {\n await this.updateShippingInfo(shippingMethod.id, this.state.shippingContact);\n\n // save selected shipping method.\n this.setState({ shippingMethodId: shippingMethod.id });\n } catch (e) {\n telemetry.error(`unable to update address after shipping method change: ${e}`);\n this.showErrorMessage(resources.genericErrorMessage);\n }\n\n return Promise.resolve({\n newTotal: {\n label: this.merchantName,\n type: 'final',\n amount: `${this.amountDue}`\n }\n });\n };\n\n /**\n * Helper function to obtain shipping methods available for Apple contact address.\n * @param address {Address} The shipping address.\n * @returns The cart delivery options.\n */\n private getShippingMethods = async (address: Address): Promise => {\n const {\n context: { actionContext },\n data: { checkout },\n telemetry\n } = this.props;\n\n const cartId = (checkout?.result?.checkoutCart?.cart as Cart).Id;\n const deliveryOptionFilter: FilterDeliveryModeOption = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n const appleDeliveryOptions: IApplePayShippingMethod[] = [];\n try {\n const deliveryOptions = await getDeliveryOptionsAsync(\n {\n callerContext: actionContext,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(actionContext)\n },\n cartId,\n address,\n [],\n deliveryOptionFilter,\n false\n );\n deliveryOptions.forEach(element =>\n appleDeliveryOptions.push({\n label: element.Description,\n amount: `${element.ShippingChargeAmount}`,\n detail: element.Description,\n identifier: element.Code\n })\n );\n } catch (e) {\n telemetry.error('unable to get delivery options for Apple Pay contact');\n }\n\n return appleDeliveryOptions;\n };\n\n /**\n * Helper function to convert Apple Pay shipping contact into Address object.\n * @param shippingContact {IShippingContactSelectedEvent} The shipping contact provided by Apple Pay SDK.\n * @returns The Address object.\n */\n private getAddressFromShippingContact = (shippingContact: IShippingContactSelectedEvent) => {\n const shippingAddress: Address = {\n ThreeLetterISORegionName: getThreeLetterCountryCode(shippingContact?.countryCode || ''),\n Name: this.getContactName(shippingContact),\n Street: shippingContact?.addressLines?.at(0),\n StreetNumber: shippingContact?.addressLines?.at(1),\n City: shippingContact?.locality,\n State: shippingContact?.administrativeArea,\n ZipCode: shippingContact?.postalCode\n };\n\n return shippingAddress;\n };\n\n /**\n * Helper function to return formatted contact name.\n * @param shippingContact {IShippingContactSelectedEvent} The shipping contact provided by Apple Pay SDK.\n * @returns The formatted contact name, i.e. 'Test User', 'Test', 'User' or empty string if both given and family names are missing.\n */\n private getContactName = (shippingContact: IShippingContactSelectedEvent) => {\n const givenName = shippingContact?.givenName || '';\n const familyName = shippingContact?.familyName || '';\n return `${givenName}${\n StringExtensions.isNullOrWhitespace(givenName) || StringExtensions.isNullOrWhitespace(familyName) ? '' : ' '\n }${familyName}`;\n };\n\n private updateContactInfo = async (shippingContact?: IShippingContactSelectedEvent) => {\n const {\n data: { checkout },\n telemetry\n } = this.props;\n\n if (shippingContact) {\n const shippingAddress: Address = this.getAddressFromShippingContact(shippingContact);\n const shippingMethodId = this.state.shippingMethodId || '';\n await this.updateShippingInfo(shippingMethodId, shippingAddress);\n const newGuestCheckoutEmail = shippingContact.emailAddress || '';\n if (!StringExtensions.isNullOrWhitespace(newGuestCheckoutEmail)) {\n await checkout?.result?.updateGuestCheckoutEmail({ newGuestCheckoutEmail });\n } else {\n telemetry.warning('email address missing in shipping contact from Apple');\n }\n } else {\n telemetry.information('no shipping information provided');\n }\n };\n\n /**\n * Update shipping information on cart.\n * @param shippingMethodId {string} The identifier for shipping method.\n * @param shippingAddress {Address} The shipping address.\n */\n private updateShippingInfo = async (shippingMethodId: string, shippingAddress?: Address) => {\n const {\n data: { checkout }\n } = this.props;\n\n const updateCartDeliverySpecificationInput = {\n deliveryModeId: shippingMethodId,\n shippingAddress: shippingAddress\n };\n\n const result = await checkout?.result?.checkoutCart.updateCartDeliverySpecification(updateCartDeliverySpecificationInput);\n if (result?.status !== 'SUCCESS') {\n throw new Error(result?.errorDetails?.LocalizedMessage);\n }\n };\n\n /**\n * Shows error message on screen next to Apple Pay button.\n * @param message {string} The error message to show.\n */\n private showErrorMessage = (message: string) => {\n this.setState({\n errorMessage: message\n });\n };\n}\n\nexport default CheckoutApplePay;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { ICheckoutApplePayViewProps } from './checkout-apple-pay';\n\nconst CheckoutApplePayView: React.FC = props => {\n const { checkoutApplePay, applePayButton, alert } = props;\n\n return (\n \n {alert}\n {applePayButton}\n \n );\n};\n\nexport default CheckoutApplePayView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { SDK_FRAGMENT_NAME, msdyn365Commerce } from '@msdyn365-commerce/core-internal';\nimport * as path from 'path';\nimport * as React from 'react';\nimport { isAbsoluteUrl, isRelativeUrl, logDebug, logError } from '../../utils/script-utils';\nimport { IDefaultExternalScriptProps } from './default-external-script.props.autogenerated';\n\n/**\n *\n * DefaultExternalScript component\n * @extends {React.PureComponent>}\n */\nclass DefaultExternalScript extends React.PureComponent> {\n constructor(props: IDefaultExternalScriptProps<{}>) {\n super(props);\n }\n\n public render(): JSX.Element | null {\n const { config } = this.props;\n logDebug(`Adding script tags for '${this.props.id}/${this.props.typeName}'`, this.props.telemetry);\n let source = config.scriptSource;\n\n let relativeBaseUrl: string = '';\n // Construct the relative base url, i.e. the base url from which statics will be served\n if (this.props.context) {\n relativeBaseUrl += this.props.context.request.url.staticCdnUrl;\n relativeBaseUrl += msdyn365Commerce.getEnvironmentVariable('SUBMISSIONID') || '';\n }\n\n if (isRelativeUrl(source)) {\n // If the source is a relative URL prepend the relative base url to the resolved source url for the actual source\n source = `${relativeBaseUrl}/${path.join(source)}`;\n } else if (source === '' || !isAbsoluteUrl(source)) {\n logError(\n 'Invalid external script - not a url. The external source is not an external or relative url, please use default-inline-script if you wish to load inline scripts',\n this.props.telemetry\n );\n return null;\n }\n const scriptHtml = ``;\n\n return React.createElement(SDK_FRAGMENT_NAME, { key: this.props.id, dangerouslySetInnerHTML: { __html: scriptHtml } });\n }\n}\n\nexport default DefaultExternalScript;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { isNonceEnabled, SDK_FRAGMENT_NAME } from '@msdyn365-commerce/core-internal';\nimport * as React from 'react';\nimport { isAbsoluteUrl, isRelativeUrl, logDebug, logError } from '../../utils/script-utils';\nimport { IDefaultInlineScriptProps } from './default-inline-script.props.autogenerated';\n\n/**\n *\n * DefaultScript\n * @extends {React.PureComponent>}\n */\nclass DefaultInlineScript extends React.PureComponent> {\n constructor(props: IDefaultInlineScriptProps<{}>) {\n super(props);\n }\n\n public render(): JSX.Element | null {\n const { config } = this.props;\n logDebug(`Adding script tags for '${this.props.id}/${this.props.typeName}'`, this.props.telemetry);\n const source = config.inlineScript;\n\n if (!source || source === '' || isAbsoluteUrl(source) || isRelativeUrl(source)) {\n logError(\n 'Invalid inline script - Empty inline source defined or a url is being used as a source. Use default-external-script to load scripts from an external or relative url.',\n this.props.telemetry\n );\n return null;\n }\n\n if (source.includes('')) {\n logError('Invalid inline script - inline script should not contain html tags', this.props.telemetry);\n return null;\n }\n\n const nonceToken = this.props.context && isNonceEnabled(this.props.context.request);\n const scriptHtml = ``;\n return React.createElement(SDK_FRAGMENT_NAME, { key: this.props.id, dangerouslySetInnerHTML: { __html: scriptHtml } });\n }\n}\n\nexport default DefaultInlineScript;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { SDK_FRAGMENT_NAME } from '@msdyn365-commerce/core-internal';\nimport * as React from 'react';\nimport { isAbsoluteUrl, isRelativeUrl, logDebug, logError } from '../../utils/script-utils';\nimport { IDefaultInlineStyleProps } from './default-inline-style.props.autogenerated';\n\n/**\n *\n * DefaultStyle\n * @extends {React.PureComponent>}\n */\n\nconst DefaultInlineStyle = (props: IDefaultInlineStyleProps<{}>) => {\n const { config, id, typeName, telemetry } = props;\n logDebug(`Adding style tags for '${id}/${typeName}'`, telemetry);\n const source = config.inlineStyle;\n\n if (!source || source === '' || isAbsoluteUrl(source) || isRelativeUrl(source)) {\n logError('Invalid inline style - Empty inline source defined or a url is being used as a source.', telemetry);\n return null;\n }\n\n if (source.includes('')) {\n logError('Invalid inline style - inline style should not contain html tags', telemetry);\n return null;\n }\n\n const styleHtml = ``;\n return React.createElement(SDK_FRAGMENT_NAME, { key: id, dangerouslySetInnerHTML: { __html: styleHtml } });\n};\n\nexport default DefaultInlineStyle;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IInternalTelemetry, LogLevel } from '@msdyn365-commerce/telemetry-internal';\n\nexport const logDebug = (debugMessage: string, telemetry: IInternalTelemetry | undefined): void => {\n telemetry && telemetry.log(LogLevel.Debug, debugMessage);\n};\n\nexport const logError = (errorMessage: string, telemetry: IInternalTelemetry | undefined): void => {\n telemetry && telemetry.log(LogLevel.Error, errorMessage);\n};\n\n/**\n * Returns true if the given string matches an URL pattern\n *\n * @param source The string to check against\n */\nexport const isAbsoluteUrl = (source: string): boolean => {\n // eslint-disable-next-line security/detect-unsafe-regex\n return /^(http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/.test(source);\n};\n\nexport const isRelativeUrl = (source: string): boolean => {\n return /^(?!www\\.|(?:http|ftp)s?:\\/\\/|[A-Za-z]:\\\\|\\/\\/).*(\\.js){1}$/.test(source);\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IFooterCategoryConfig, IFooterCategoryProps } from './footer-category.props.autogenerated';\n\nexport interface IFooterCategoryViewProps extends IFooterCategoryProps {\n categories: React.ReactNode[];\n FooterList: IModuleProps;\n FooterListItem: INodeProps;\n}\n\n/**\n *\n * FooterCategory component.\n * @extends {React.PureComponent>}\n */\nclass FooterCategory extends React.PureComponent> {\n public render(): JSX.Element | null {\n if (!this.props.slots || !this.props.slots.content || this.props.slots.content.length === 0) {\n this.props.context.telemetry.error('footer slots content is empty, module wont render');\n return null;\n }\n const viewprops = {\n ...this.props,\n categories: this.props.slots.content,\n FooterList: {\n moduleProps: this.props,\n className: classnames('ms-footer__list', this.props.config.className),\n tag: 'ul'\n },\n FooterListItem: {\n className: classnames('ms-footer__list-item', this.props.config.className),\n tag: 'li'\n }\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n}\n\nexport default FooterCategory;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport React, { ReactNode } from 'react';\n\nimport { IFooterCategoryViewProps } from './footer-category';\n\nexport const FooterCategoryView: React.FC = props => {\n const { categories, FooterList, FooterListItem } = props;\n if (!categories || categories.length === 0) {\n props.context.telemetry.error('Footer content is empty, module wont render');\n return null;\n }\n return (\n \n {categories.map((category: ReactNode, index: number) => {\n return (\n \n {category}\n \n );\n })}\n \n );\n};\n\nexport default FooterCategoryView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ITextBlockProps } from './text-block.props.autogenerated';\n\nexport interface ITextBlockViewProps extends ITextBlockProps<{}> {\n paragraph?: React.ReactNode;\n className?: string;\n}\n\n/**\n *\n * TextBlock component.\n */\nclass TextBlock extends React.PureComponent> {\n public render(): JSX.Element | null {\n const { paragraph, className } = this.props.config;\n const text = paragraph && (\n \n );\n const textBlockViewProps = {\n ...this.props,\n paragraph: text,\n className: classnames('ms-text-block', className)\n };\n return this.props.renderView(textBlockViewProps) as React.ReactElement;\n }\n\n public handleTextChange = (event: MsDyn365.ContentEditableEvent) => (this.props.config.paragraph = event.target.value);\n}\nexport default TextBlock;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nimport { ITextBlockViewProps } from './text-block';\n\nconst TextBlockView: React.FC = props => (\n
\n {props.paragraph}\n
\n);\n\nexport default TextBlockView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../tile-list-item.props.autogenerated';\n\n/**\n * Tile List links.\n */\nexport interface ITileListLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n telemetryContent: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\n/**\n *\n * ITileListLinks component.\n * @extends {React.PureComponent}\n */\nexport class TileListLinks extends React.PureComponent {\n public render(): JSX.Element {\n const editableLinks = this._mapEditableLinks(this.props.links);\n return (\n
\n {editableLinks && ArrayExtensions.hasElements(editableLinks) ? (\n \n ) : null}\n
\n );\n }\n\n /**\n * ITileListLinks component.\n * @param linkdata - Link data.\n * @returns Editable links.\n */\n private readonly _mapEditableLinks = (linkdata: ILinksData[]): Msdyn365.ILinksData[] | null => {\n if (!ArrayExtensions.hasElements(linkdata)) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n for (const link of linkdata) {\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\n const linkText = link.linkText ? link.linkText : '';\n payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.props.telemetryContent, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-tile-list__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'button',\n additionalProperties: attributes,\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\n };\n editableLinks.push(editableLink);\n }\n\n return editableLinks;\n };\n}\nexport default TileListLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { TileListLinks } from './components';\nimport { IHeadingData, ITileListItemProps } from './tile-list-item.props.autogenerated';\n\n/**\n * Tile-list-item view props.\n */\nexport interface ITileListItemViewProps extends ITileListItemProps<{}> {\n heading?: React.ReactNode;\n paragraph?: React.ReactNode;\n links?: React.ReactNode;\n backgroundImage?: React.ReactNode;\n thumbnailImage?: React.ReactNode;\n tileListItem: IModuleProps;\n tileListContainer: INodeProps;\n tileListImageContainer: INodeProps;\n tileListThumbnailImageContainer: INodeProps;\n tileListHeadingContainer: INodeProps;\n}\n\n/**\n *\n * TileListItem component.\n * @extends {React.PureComponent>}\n */\nexport class TileListItem extends React.PureComponent> {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n public constructor(props: ITileListItemProps<{}>) {\n super(props);\n }\n\n public render(): JSX.Element {\n const { heading, paragraph, backgroundImage, thumbnailImage, redirectionUrl, links } = this.props.config;\n const tileListLinks = links && ArrayExtensions.hasElements(links) && (\n \n );\n const tileListLinkContainer = {\n tag: 'a' as NodeTag,\n className: 'ms-tile-list-container',\n role: 'link',\n href: redirectionUrl?.linkUrl.destinationUrl,\n 'aria-label': redirectionUrl?.ariaLabel,\n target: redirectionUrl?.openInNewTab ? '_blank' : undefined\n };\n\n const tileListButtonContainer = {\n tag: 'button' as NodeTag,\n className: 'ms-tile-list-container'\n };\n const viewProps: ITileListItemViewProps = {\n ...this.props,\n heading: this._createHeading(heading),\n paragraph: this._createParagraph(paragraph),\n backgroundImage: this._renderBackgroundImage(backgroundImage),\n thumbnailImage: this._renderThumbnailImage(thumbnailImage),\n links: tileListLinks,\n tileListItem: {\n moduleProps: this.props,\n className: ''\n },\n tileListContainer: redirectionUrl ? tileListLinkContainer : tileListButtonContainer,\n tileListImageContainer: {\n className: 'ms-tile-list__image'\n },\n tileListThumbnailImageContainer: {\n className: 'ms-tile-list__thumbnail_image',\n 'aria-hidden': 'true'\n },\n tileListHeadingContainer: {\n className: 'ms-tile-list__heading'\n }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handles heading content change event.\n * @param event - Content editable event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Handles paragraph content change event.\n * @param event - Content editable event.\n */\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.paragraph = event.target.value;\n };\n\n /**\n * Handles paragraph content change event.\n * @param linkIndex - Index of link in linkarray.\n * @returns Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.links?.[Number(linkIndex)]) {\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\n }\n };\n\n private _createParagraph(text?: Msdyn365.RichText): React.ReactNode | null {\n if (!text) {\n return null;\n }\n return (\n \n );\n }\n\n private _createHeading(heading?: IHeadingData): React.ReactNode | null {\n if (!heading) {\n return null;\n }\n if (StringExtensions.isNullOrWhitespace(heading.text)) {\n return null;\n }\n\n return (\n \n );\n }\n\n private _renderBackgroundImage(item?: Msdyn365.IImageData, isAriaHiddenAttribute?: boolean): React.ReactNode | null {\n // If image is null, we want to render the placeholder SVG - by passing image data with empty src\n\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=328&h=412&m=6', w: 328, h: 412 },\n sm: { q: 'w=328&h=412&m=6', w: 328, h: 412 },\n md: { q: 'w=315&h=412&m=6', w: 315, h: 412 },\n lg: { q: 'w=315&h=412&m=6', w: 315, h: 412 },\n xl: { q: 'w=315&h=412&m=6', w: 315, h: 412 }\n },\n lazyload: true\n };\n const verifiedImageSettings = item?.imageSettings?.viewports ? item.imageSettings : defaultImageSettings;\n\n return (\n \n );\n }\n\n private _renderThumbnailImage(\n item?: Msdyn365.IImageData,\n itemImageSettings?: Msdyn365.IImageSettings,\n isAriaHiddenAttribute?: boolean\n ): React.ReactNode | null {\n if (!item) {\n return null;\n }\n if (StringExtensions.isNullOrWhitespace(item.src)) {\n return null;\n }\n\n return (\n \n );\n }\n}\n\nexport default TileListItem;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ITileListItemViewProps } from './tile-list-item';\n\n/**\n *\n * ITileListItemViewProps component.\n * @param props - Component props.\n * @returns TileListView.\n */\nconst renderTileListItemContent = (props: ITileListItemViewProps): JSX.Element => {\n const {\n heading,\n paragraph,\n backgroundImage,\n links,\n thumbnailImage,\n tileListContainer,\n tileListImageContainer,\n tileListThumbnailImageContainer,\n tileListHeadingContainer\n } = props;\n\n return (\n \n {backgroundImage}\n \n {heading}\n {paragraph}\n {links}\n \n {thumbnailImage}\n \n );\n};\n\n/**\n *\n * TileListItemViewProps component.\n * @param props - Component props.\n * @returns TileListView.\n */\nexport const TileListItemViewComponent: React.FC = props => {\n const { tileListItem } = props;\n return {renderTileListItemContent(props)};\n};\n\nexport default TileListItemViewComponent;\n"],"names":["ApplePayButtonState","ApplePayPaymentAuthorizationResult","CheckoutApplePay","React","constructor","props","super","moduleClassName","applePaySdkId","zeroAmount","handlePayButton","async","config","resources","telemetry","this","handler","onAuthorize","authorizePayment","onCancel","cancelPayment","onPaymentMethodUpdate","updatePaymentMethod","onValidation","validateMerchant","shouldRequestShippingAddress","onShippingContactSelected","shippingContactSelected","onShippingMethodSelected","shippingMethodSelected","displayName","window","CreateApplePaySession","amountDue","toString","setState","lineDisplayName","error","showErrorMessage","genericErrorMessage","checkout","data","context","actionContext","paymentConnectorId","state","checkoutState","getCheckoutState","cartState","checkoutCart","requestContext","channel","Error","_checkout$result","cardPaymentAcceptResult","AccessCode","paymentToken","Settings","PaymentConnectorId","result","updateCardPaymentAcceptResult","newCardPaymentAcceptResult","PlaceOrder","undefined","cart","Version","loadPaymentConnectorSdk","cardPaymentAcceptPoint","AcceptPageContent","connectorSdk","sdk","document","createElement","id","type","appendChild","createTextNode","body","_checkout$result2","_cardPaymentAcceptPoi","information","validationUrl","validationEvent","Promise","reject","cartId","Id","validationObject","domainName","location","hostname","validationBody","JSON","stringify","validationData","retrieveCardPaymentAcceptResultAsync","callerContext","btoa","catch","resolve","updateContactInfo","authorizeEvent","shippingContact","resultCode","STATUS_SUCCESS","newTotal","label","merchantName","amount","shippingAddress","getAddressFromShippingContact","shippingMethods","getShippingMethods","ObjectExtensions","isNullOrUndefined","length","_shippingMethods$at","shippingMethodId","at","identifier","updateShippingInfo","e","newShippingMethods","shippingMethod","_checkout$result3","deliveryOptionFilter","FilterDeliveryModeOption","FilterOutNonCarrierDeliveryMode","appleDeliveryOptions","getDeliveryOptionsAsync","queryResultSettings","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","address","forEach","element","push","Description","ShippingChargeAmount","detail","Code","_shippingContact$addr","_shippingContact$addr2","ThreeLetterISORegionName","getThreeLetterCountryCode","countryCode","Name","getContactName","Street","addressLines","StreetNumber","City","locality","State","administrativeArea","ZipCode","postalCode","givenName","familyName","StringExtensions","isNullOrWhitespace","newGuestCheckoutEmail","emailAddress","_checkout$result4","warning","updateGuestCheckoutEmail","_checkout$result5","updateCartDeliverySpecificationInput","deliveryModeId","updateCartDeliverySpecification","_result$errorDetails","status","errorDetails","LocalizedMessage","message","errorMessage","applePayButtonState","Unknown","getLoyaltyAmount","loyaltyAmount","getGiftCardTotalAmount","giftCardExtends","reduce","count","giftCard","Balance","getCustomerAccountAmount","_checkoutState$custom","customerAccountAmount","_checkout$result6","AmountDue","Math","max","script","onload","_cardPaymentAcceptPoi2","isApplePayAvailable","Available","NotAvailable","src","onerror","render","className","request","user","isOBORequest","EnabledPaymentsForOBO","ExpressPayment","applePayButton","onClick","viewProps","_objectSpread","checkoutApplePay","moduleProps","classNames","alert","ErrorComponent","Object","assign","title","errorMessageTitle","renderView","__decorate","computed","Module","DefaultExternalScript","logDebug","typeName","source","scriptSource","relativeBaseUrl","url","staticCdnUrl","msdyn365Commerce","getEnvironmentVariable","isRelativeUrl","path","isAbsoluteUrl","logError","scriptHtml","defer","SDK_FRAGMENT_NAME","key","dangerouslySetInnerHTML","__html","DefaultInlineScript","inlineScript","includes","nonceToken","isNonceEnabled","inlineStyle","styleHtml","debugMessage","log","LogLevel","Debug","test","FooterCategory","slots","content","viewprops","categories","FooterList","classnames","tag","FooterListItem","FooterCategoryView","map","category","index","Node","TextBlock","handleTextChange","event","paragraph","target","value","text","MsDyn365","editProps","onEdit","textBlockViewProps","renderModuleAttributes","TileListLinks","_mapEditableLinks","linkdata","ArrayExtensions","hasElements","editableLinks","link","payLoad","getPayloadObject","telemetryContent","linkText","contentAction","etext","attributes","getTelemetryAttributes","editableLink","ariaLabel","linkUrl","destinationUrl","openInNewTab","role","additionalProperties","onTelemetryClick","links","Msdyn365","onTextChange","TileListItem","_telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","handleHeadingChange","heading","handleParagraphChange","handleLinkTextChange","linkIndex","_this$props$config$li","Number","backgroundImage","thumbnailImage","redirectionUrl","tileListLinks","tileListLinkContainer","href","_createHeading","_createParagraph","_renderBackgroundImage","_renderThumbnailImage","tileListItem","tileListContainer","tileListImageContainer","tileListThumbnailImageContainer","tileListHeadingContainer","_heading$tag","item","isAriaHiddenAttribute","_item$imageSettings","_this$props$config$ba","verifiedImageSettings","imageSettings","viewports","xs","q","w","h","sm","md","lg","xl","lazyload","gridSettings","loadFailureBehavior","moduleType","imagePropertyName","itemImageSettings","_this$props$config$th","layout","msdyn365__moduleLayout","TileListItemViewComponent","renderTileListItemContent"],"sourceRoot":""}