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cAAC8I,EAAAA,KAAI7I,OAAAC,OAAA,GAAKyD,GACLpD,EACAD,IA6Bb,EAxBuFI,IACnF,MAAM,2BACFoH,EAA0B,iBAC1BlH,EAAgB,UAChB6G,EAAS,0BACTQ,EAAyB,aACzBjE,EAAY,WACZkE,EAAU,WACVC,EAAU,aACVC,GACA1H,EAEJ,OAEIV,EAAAA,cAACiJ,EAAAA,OAAMhJ,OAAAC,OAAA,GAAK4H,EAA0B,CAAEoB,IAAKtI,IACxC6G,EAAUL,SAAWpD,GAAgBhE,EAAAA,cAAC+I,EAAY9I,OAAAC,OAAA,GAAK8D,IACxDhE,EAAAA,cAAC6I,EAAiB5I,OAAAC,OAAA,GAAK+H,IACtBR,EAAUC,kBAAoBQ,EAC9BT,EAAUG,kBAAoBO,EAC9BV,EAAUI,oBAAsBO,WCnD7Ce,EAAOC,QAAUpJ,cCAjBmJ,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./lib/checkout-terms-and-conditions/module-registration.js?67e8","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.check-box.tsx?3b17","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.error-message.tsx?c6a5","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.error-title.tsx?f908","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/checkout-terms-and-conditions.tsx?9243","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/checkout-terms-and-conditions.view.tsx?26e8","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["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-terms-and-conditions'] = {\n c: () => require('@msdyn365-commerce-modules/checkout/dist/lib/modules/checkout-terms-and-conditions/checkout-terms-and-conditions'),\n $type: 'contentModule',\n da: [{name:'checkout', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/checkout-state-data-action', runOn: 1}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'checkout-terms-and-conditions',\n p: 'checkout',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/checkout/dist/lib/modules/checkout-terms-and-conditions'\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['@msdyn365-commerce-modules|checkout|modules|checkout-terms-and-conditions|checkout-terms-and-conditions'] = {\n c: () => require('@msdyn365-commerce-modules/checkout/dist/lib/modules/checkout-terms-and-conditions/checkout-terms-and-conditions.view.js'),\n cn: '@msdyn365-commerce-modules-checkout-checkout-terms-and-conditions'\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 { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICheckoutTermsAndConditionsCheckboxProps {\n isChecked: boolean;\n ariaLabel?: string;\n disabled: boolean;\n id?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.isChecked\n * @param root0.ariaLabel\n * @param root0.disabled\n * @param root0.telemetryContent\n * @param root0.onChange\n * @param root0.id\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsCheckbox: React.FC = ({\n isChecked,\n ariaLabel,\n disabled,\n telemetryContent,\n onChange,\n id\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n <>\n \n \n );\n};\n\nexport default CheckoutTermsAndConditionsCheckbox;\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\nexport interface ICheckoutTermsAndConditionsErrorMessageProps {\n message?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.message\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsErrorMessage: React.FC = ({ message }) => {\n if (!message) {\n return null;\n }\n\n return

{message}

;\n};\n\nexport default CheckoutTermsAndConditionsErrorMessage;\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\nexport interface ICheckoutTermsAndConditionsErrorTitleProps {\n title?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.title\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsErrorTitle: React.FC = ({ title }) => {\n if (!title) {\n return null;\n }\n\n return

{title}

;\n};\n\nexport default CheckoutTermsAndConditionsErrorTitle;\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 { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classname from 'classnames';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutTermsAndConditionsData } from './checkout-terms-and-conditions.data';\nimport { ICheckoutTermsAndConditionsProps } from './checkout-terms-and-conditions.props.autogenerated';\nimport CheckboxComponent from './components/checkout-terms-and-conditions.check-box';\nimport ErrorMessageComponent from './components/checkout-terms-and-conditions.error-message';\nimport ErrorTitleComponent from './components/checkout-terms-and-conditions.error-title';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutTermsAndConditionsModuleProps\n extends ICheckoutTermsAndConditionsProps,\n IModuleStateProps {}\n\nexport interface ICheckoutTermsAndConditions {\n termsAndConditionAcceptance: INodeProps;\n checkBox: React.ReactNode;\n description: React.ReactNode;\n}\n\nexport interface ICheckoutTermsAndConditionsError {\n error: INodeProps;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ICheckoutTermsAndConditionsViewState {\n isError: boolean;\n isShowSaveButton: boolean;\n isShowEditButton: boolean;\n isShowCancelButton: boolean;\n}\n\nexport interface ICheckoutTermsAndConditionsViewProps extends ICheckoutTermsAndConditionsProps<{}> {\n checkoutTermsAndConditions: IModuleProps;\n isTermsAccepted: boolean;\n errorMessageData: string;\n viewState: ICheckoutTermsAndConditionsViewState;\n termsAndConditionsContent: ICheckoutTermsAndConditions;\n errorMessage?: ICheckoutTermsAndConditionsError;\n saveButton?: React.ReactNode;\n editButton?: React.ReactNode;\n cancelButton?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n onChange(event: React.ChangeEvent): void;\n onSave(): void;\n onEdit(): void;\n onCancel(): void;\n}\n\n/**\n *\n * CheckoutTermsAndConditions component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutTermsAndConditions extends React.Component {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n @observable private isTermsAccepted: boolean = true;\n\n @observable private errorMessage?: string;\n\n constructor(props: ICheckoutTermsAndConditionsModuleProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n @computed get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n @computed get isShowButtons(): boolean {\n const { showControlButtons } = this.props.config;\n return !this.props.moduleState.hasExternalSubmitGroup && (showControlButtons || false);\n }\n\n @computed get isAutoSave(): boolean {\n const { showControlButtons } = this.props.config;\n return !this.props.moduleState.hasExternalSubmitGroup && !showControlButtons;\n }\n\n @computed get defaultTermsAndConditionAcceptedValue(): boolean {\n const { showCheckbox } = this.props.config;\n return !showCheckbox;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result && this.props.data.checkout.result.isTermsAndConditionAccepted,\n async () => {\n this.isTermsAccepted =\n this.props.data.checkout.result?.isTermsAndConditionAccepted || this.defaultTermsAndConditionAcceptedValue;\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutTermsAndConditions &&\n checkoutError.errorMessage\n ) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutTermsAndConditions) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(\n nextProps: ICheckoutTermsAndConditionsModuleProps,\n nextState: ICheckoutTermsAndConditionsViewState\n ): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n moduleState: { isReady, hasError },\n config: { className }\n } = this.props;\n const isTermsAndConditionAccepted = this.props.data.checkout.result?.isTermsAndConditionAccepted;\n const isError = hasError;\n const isShowContent = !isReady;\n const isShowSelected = !hasError && isReady;\n\n const viewProps = {\n ...this.props,\n ...this.state,\n isTermsAccepted: this.isTermsAccepted,\n errorMessageData: this.errorMessage,\n checkoutErrorRef: this.checkoutErrorRef,\n viewState: {\n isError,\n isShowSaveButton: isShowContent && this.isShowButtons,\n isShowEditButton: isShowSelected && this.isShowButtons,\n isShowCancelButton: isShowContent && this.isShowButtons && isTermsAndConditionAccepted\n },\n checkoutTermsAndConditions: {\n moduleProps: this.props,\n className: classname('ms-checkout-terms-and-conditions', className)\n },\n termsAndConditionsContent: this.getTermsAndConditions(),\n errorMessage: this.getErrorMessage(),\n saveButton: this.getSaveButton(),\n editButton: this.getEditButton(),\n cancelButton: this.getCancelButton(),\n onSave: this.onSubmit,\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onChange: this.onChange\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleTextChange = (event: MsDyn365.ContentEditableEvent) => (this.props.config.description = event.target.value);\n\n private readonly getTermsAndConditions = (): ICheckoutTermsAndConditions => {\n const {\n moduleState: { isReady },\n config: { showCheckbox, description }\n } = this.props;\n const isDisabled = isReady && !this.isAutoSave;\n const isTermsAndConditionAccepted = this.isTermsAccepted;\n const { checkboxAriaLabel } = this.props.resources;\n return {\n termsAndConditionAcceptance: { className: 'ms-checkout-terms-and-conditions__container' },\n checkBox: showCheckbox && (\n \n ),\n description: (\n \n )\n };\n };\n\n @action\n private readonly init = async (): Promise => {\n const {\n data,\n config: { showCheckbox }\n } = this.props;\n\n const hasInvoiceLine = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n\n // If hasInvoiceLine is true, this is for b2b and isTermsAccepted should be true\n if (hasInvoiceLine || data.checkout.result?.isTermsAndConditionAccepted || !showCheckbox) {\n await this.updateTermsAndConditionsAcceptance(true);\n this.isTermsAccepted = true;\n } else if (showCheckbox) {\n await this.updateTermsAndConditionsAcceptance(false);\n this.isTermsAccepted = false;\n }\n\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n status: hasInvoiceLine ? 'disabled' : this.isTermsAccepted ? 'ready' : 'updating'\n });\n\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n this.isTermsAccepted = true;\n this.props.moduleState.setHasError(false);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly getErrorMessage = (): ICheckoutTermsAndConditionsError => {\n const { errorMessageTitle } = this.props.resources;\n return {\n error: { tag: 'div', className: 'ms-checkout-terms-and-conditions__error', role: 'alert', 'aria-live': 'assertive' },\n title: ,\n message: \n };\n };\n\n private readonly getCancelButton = (): React.ReactNode => {\n const { cancelBtnLabel = 'Cancel', cancelBtnAriaLabel } = this.props.resources;\n return (\n \n {cancelBtnLabel}\n \n );\n };\n\n private readonly getSaveButton = (): React.ReactNode => {\n const { saveBtnLabel = 'Save', saveBtnAriaLabel } = this.props.resources;\n return (\n \n {saveBtnLabel}\n \n );\n };\n\n private readonly getEditButton = (): React.ReactNode => {\n const { editBtnLabel = 'Change', editBtnAriaLabel } = this.props.resources;\n return (\n \n {editBtnLabel}\n \n );\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Terms and conditions onEdit is called.');\n\n this.onUpdating();\n };\n\n private readonly onSubmit = async (): Promise => {\n this.props.telemetry.information('Terms and conditions onSubmit is called.');\n\n if (!this.isTermsAccepted) {\n if (this.isAutoSave) {\n await this.updateTermsAndConditionsAcceptance(this.isTermsAccepted);\n } else {\n this.setError(this.props.resources.errorMessage);\n this.props.moduleState.setHasError(true);\n }\n } else {\n this.clearError();\n await this.updateTermsAndConditionsAcceptance(this.isTermsAccepted);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onUpdating = () => {\n this.props.moduleState.onUpdating();\n };\n\n private readonly setError = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.errorMessage = errorMessage;\n };\n\n private readonly onCancel = (): void => {\n this.props.telemetry.information('Terms and conditions onCancel is called.');\n\n // Reset to the saved value\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const isTermsAccepted = this.props.data.checkout.result.isTermsAndConditionAccepted;\n if (!isTermsAccepted) {\n // It has no saved email, set to status updating and request user to fill the email form\n this.props.moduleState.onUpdating();\n } else {\n // It has saved email, set to status ready\n this.isTermsAccepted = true;\n this.props.moduleState.setHasError(false);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly updateTermsAndConditionsAcceptance = async (isTermsAccepted: boolean): Promise => {\n if (this.props.data.checkout.result) {\n await this.props.data.checkout.result.updateTermsAndConditionsAcceptance({ newIsTermsAndConditionAccepted: isTermsAccepted });\n }\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.errorMessage = undefined;\n };\n\n private readonly onChange = async (event: React.ChangeEvent) => {\n const checked = event.target.checked;\n this.isTermsAccepted = checked;\n\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout) {\n await this.props.data.checkout.result.updateIsTermsAndConditionsChecked({ newIsTermsAndConditionChecked: checked });\n }\n\n if (this.isAutoSave) {\n await this.onSubmit();\n }\n };\n}\n\nexport default CheckoutTermsAndConditions;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ICheckoutTermsAndConditions,\n ICheckoutTermsAndConditionsError,\n ICheckoutTermsAndConditionsViewProps\n} from './checkout-terms-and-conditions';\n\nconst TermsAndCondition: React.FC = ({ termsAndConditionAcceptance, checkBox, description }) => {\n return (\n \n {checkBox}\n {description}\n \n );\n};\n\nconst ErrorMessage: React.FC = ({ error, title, message }) => {\n return (\n \n {title}\n {message}\n \n );\n};\n\nconst CheckoutTermsAndConditionsView: React.FC = props => {\n const {\n checkoutTermsAndConditions,\n checkoutErrorRef,\n viewState,\n termsAndConditionsContent,\n errorMessage,\n saveButton,\n editButton,\n cancelButton\n } = props;\n\n return (\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\n \n {viewState.isError && errorMessage && }\n \n {viewState.isShowSaveButton && saveButton}\n {viewState.isShowEditButton && editButton}\n {viewState.isShowCancelButton && cancelButton}\n \n );\n};\n\nexport default CheckoutTermsAndConditionsView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","window","__bindings__","_objectSpread","viewDictionary","cn","_ref","isChecked","ariaLabel","disabled","telemetryContent","onChange","payLoad","getPayloadObject","attribute","getTelemetryAttributes","React","Object","assign","className","type","checked","message","title","CheckoutTermsAndConditions","constructor","props","super","checkoutErrorRef","isTermsAccepted","handleTextChange","event","this","config","description","target","value","getTermsAndConditions","moduleState","isReady","showCheckbox","isDisabled","isAutoSave","isTermsAndConditionAccepted","checkboxAriaLabel","resources","termsAndConditionAcceptance","checkBox","CheckboxComponent","MsDyn365","text","editProps","onEdit","requestContext","context","request","init","async","_this$props$data$chec","_data$checkout$result","_this$props$data$chec2","data","hasInvoiceLine","checkout","result","checkoutCart","updateTermsAndConditionsAcceptance","onCancel","onSubmit","status","isPaymentVerificationRedirection","setHasError","onReady","getErrorMessage","errorMessageTitle","error","tag","role","ErrorTitleComponent","ErrorMessageComponent","errorMessage","getCancelButton","cancelBtnLabel","cancelBtnAriaLabel","Button","color","onClick","getSaveButton","saveBtnLabel","saveBtnAriaLabel","getEditButton","editBtnLabel","editBtnAriaLabel","telemetry","information","onUpdating","clearError","setError","newIsTermsAndConditionAccepted","undefined","_this$props$data$chec3","shouldEnableSinglePaymentAuthorizationCheckout","updateIsTermsAndConditionsChecked","newIsTermsAndConditionChecked","getTelemetryObject","telemetryPageName","friendlyName","showControlButtons","hasExternalSubmitGroup","_this$props$data$chec5","when","isDataReady","reaction","_this$props$data$chec4","defaultTermsAndConditionAcceptedValue","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec6","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec7","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","actionContext","shouldComponentUpdate","nextProps","nextState","state","render","_this$props$data$chec8","hasError","isError","isShowContent","isShowSelected","viewProps","errorMessageData","viewState","isShowSaveButton","isShowButtons","isShowEditButton","isShowCancelButton","checkoutTermsAndConditions","moduleProps","classname","termsAndConditionsContent","saveButton","editButton","cancelButton","onSave","renderView","__decorate","observable","computed","action","withModuleState","observer","TermsAndCondition","Node","ErrorMessage","_ref2","Module","ref","module","exports","ReactDOM"],"sourceRoot":""}