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EAAI,EACJoF,EAAKf,EACFe,GAAM,MACXpF,GAAK,GACLoF,GAAM,KAER,KAAOA,GAAM,GACXpF,GAAK,EACLoF,GAAM,EACN,OAAOpF,EAiEDqF,CAAIJ,EAASb,EAAI,EAAG,GAAI,IAAM,IAC1B,EAAIa,EAASb,EAAI,GAAI/Q,EAAG,GAAK4R,EAASb,EAAI,EAAG/Q,EAAG,GACxD2G,GAAK,kBACL3G,EAAI,GAAKA,GACD,EAAG,CAGT,IAFAkR,EAASzI,EAAM,EAAG9B,GAClB+K,EAAIG,EACGH,GAAK,GACVR,EAASzI,EAAM,IAAK,GACpBiJ,GAAK,EAIP,IAFAR,EAASzI,EAAMsI,EAAI,GAAIW,EAAG,GAAI,GAC9BA,EAAI1R,EAAI,EACD0R,GAAK,IACVN,EAAO3I,EAAM,GAAK,IAClBiJ,GAAK,GAEPN,EAAO3I,EAAM,GAAKiJ,GAClBR,EAASzI,EAAM,EAAG,GAClB2I,EAAO3I,EAAM,GACbC,EAAS2I,EAAa5I,QAEtByI,EAASzI,EAAM,EAAG9B,GAClBuK,EAASzI,EAAM,IAAMzI,EAAG,GACxB0I,EAAS2I,EAAa5I,GAAQkI,EAAO,IAAKkB,GAU5C,OALAnJ,EAFEmJ,EAAc,EAEPC,IADTH,EAAIjJ,EAAOR,SACW2J,EAClB,KAAOlB,EAAO,IAAKkB,EAAcF,GAAKjJ,EACtCkI,EAAYlI,EAAQ,EAAGiJ,EAAIE,GAAe,IAAMjB,EAAYlI,EAAQiJ,EAAIE,IAEnEC,EAAOpJ","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/get-zone-prices.action.ts?fc01","webpack://Msdyn365.Commerce.Online/./src/modules/eve-price-calculator/utils/Validations.ts?9de4","webpack://Msdyn365.Commerce.Online/./src/modules/eve-price-calculator/components/EvePriceCalculatorInput.tsx?b888","webpack://Msdyn365.Commerce.Online/./src/modules/eve-price-calculator/components/EvePriceCalculatorSelect.tsx?116b","webpack://Msdyn365.Commerce.Online/./src/modules/eve-price-calculator/components/EvePriceCalculatorButton.tsx?e5bc","webpack://Msdyn365.Commerce.Online/./src/modules/eve-price-calculator/components/EvePriceCalculatorCheckbox.tsx?2701","webpack://Msdyn365.Commerce.Online/./src/modules/eve-price-calculator/utils/FormatNumber.ts?0e29","webpack://Msdyn365.Commerce.Online/./src/modules/eve-price-calculator/components/EvePriceCalculatorResultsRow.tsx?d8cd","webpack://Msdyn365.Commerce.Online/./src/modules/eve-price-calculator/utils/Calculations.ts?3123","webpack://Msdyn365.Commerce.Online/./src/modules/eve-price-calculator/eve-price-calculator.tsx?8489","webpack://Msdyn365.Commerce.Online/./src/modules/eve-price-calculator/eve-price-calculator.view.tsx?288f","webpack://Msdyn365.Commerce.Online/./lib/eve-price-calculator/module-registration.js?b59b","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/does-not-exceed-safe-integer.js?9e9d","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/flatten-into-array.js?a994","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/string-repeat.js?60f7","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/this-number-value.js?2acf","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.array.flat-map.js?a1b3","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.array.unscopables.flat-map.js?8a78","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.number.to-fixed.js?ccf4"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getZonePricesAsync } from './DataActionExtension.g';\r\nimport { IZonePricingEntity } from './DataServiceEntities.g';\r\n\r\n/**\r\n * GetZonePrices Input Action\r\n */\r\nexport class GetZonePricesInput implements Msdyn365.IActionInput {\r\n public shouldGetZonePrices: boolean;\r\n constructor(shouldGetZonePrices: boolean) {\r\n this.shouldGetZonePrices = shouldGetZonePrices;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `ZonePrices`;\r\n public getCacheObjectType = () => 'ZonePrices';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetZonePricesData {\r\n zones: IZonePricingEntity[];\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createZonePricesInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n // @ts-expect-error\r\n const shouldGetZonePrices: boolean = args.config?.shouldGetZonePrices;\r\n return new GetZonePricesInput(shouldGetZonePrices);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetZonePricesInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n if (input.shouldGetZonePrices) {\r\n const response = await getZonePricesAsync({ callerContext: ctx });\r\n return { zones: response };\r\n }\r\n return { zones: [] };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetZonePrices',\r\n input: createZonePricesInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/**\r\n * Checks to see if any select state variables are set to the default value\r\n * @param stateVarList List of all state vaiables current value\r\n * @param defaultOptionsList List of all the default options\r\n * @returns Returns true if no select state variables are set to the default value\r\n */\r\nexport const validateSelect = (stateVarList: string[], defaultOptionsList: string[]): boolean =>\r\n !stateVarList.some(item => defaultOptionsList.includes(item));\r\n\r\n/**\r\n * Checks to verify that all values are valid floats\r\n * @param valuesToValidate List of strings to validate\r\n * @returns Returns true if all strings are valid floats\r\n */\r\nexport const validateAllInputs = (valuesToValidate: string[]): boolean => !valuesToValidate.some(value => isNaN(parseFloat(value)));\r\n\r\n/**\r\n * Checks to verify that the input string is a valid float or an empty string.\r\n * @param valueToValidate String to validate\r\n * @returns Returns true if the input is either a valid float or an empty string\r\n */\r\nexport const validateCurrentInput = (valueToValidate: string): boolean => {\r\n if (isNaN(parseFloat(valueToValidate))) {\r\n return valueToValidate === '';\r\n }\r\n return true;\r\n};\r\n","import React from 'react';\r\n\r\nimport { validateCurrentInput } from '../utils/Validations';\r\n\r\ninterface IEvePriceCalculatorInputProps {\r\n label: string;\r\n inputName: string;\r\n value: string;\r\n errorText: string;\r\n onChange: (name: string, value: string) => void;\r\n}\r\n\r\nexport const EvePriceCalculatorInput: React.FC = props => {\r\n const { label, inputName, value, errorText, onChange } = props;\r\n const className = `eve-price-calculator-display__form-row-${inputName}`;\r\n\r\n /**\r\n * Emits input change\r\n * @param e Event\r\n */\r\n const handleOnChange = (e: React.ChangeEvent): void => onChange(e.target.name, e.target.value);\r\n\r\n return (\r\n
\r\n \r\n \r\n {validateCurrentInput(value) ? <> :
{errorText}
}\r\n
\r\n );\r\n};\r\n","import React from 'react';\r\n\r\ninterface IEvePriceCalculatorSelectProps {\r\n label: string;\r\n selectName: string;\r\n value: string;\r\n getOptions: (selectLabel: string) => string[];\r\n onChange: (name: string, value: string) => void;\r\n}\r\n\r\nexport const EvePriceCalculatorSelect: React.FC = props => {\r\n const { label, selectName, value, onChange, getOptions } = props;\r\n\r\n const className = `eve-price-calculator-display__form-row-${selectName}`;\r\n const options = getOptions(label);\r\n\r\n /**\r\n * Emits select change\r\n * @param e Event\r\n */\r\n const handleOnChange = (e: React.ChangeEvent): void => onChange(e.target.name, e.target.value);\r\n\r\n return (\r\n
\r\n \r\n {options ? (\r\n \r\n ) : (\r\n <>\r\n )}\r\n
\r\n );\r\n};\r\n","import React from 'react';\r\n\r\ninterface IEvePriceCalculatorButtonProps {\r\n label: string;\r\n buttonName: string;\r\n isDisabled: boolean;\r\n onClick: () => void;\r\n}\r\n\r\nexport const EvePriceCalculatorButton: React.FC = props => {\r\n const { label, buttonName, isDisabled, onClick } = props;\r\n const className = `eve-price-calculator-display__form-row-button-${buttonName}`;\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n","import React from 'react';\r\n\r\ninterface IEvePriceCalculatorCheckboxProps {\r\n label: string;\r\n checkboxName: string;\r\n value: boolean;\r\n onChange: (name: string, value: string) => void;\r\n}\r\n\r\nexport const EvePriceCalculatorCheckbox: React.FC = props => {\r\n const { label, checkboxName, value, onChange } = props;\r\n const className = `eve-price-calculator-display__form-row-${checkboxName}`;\r\n\r\n /**\r\n * Emits checkbox toggle change\r\n * @param e Event\r\n */\r\n const handleOnChange = (e: React.ChangeEvent): void => onChange(e.target.name, e.target.value);\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n","// CONSTANTS\r\nconst ONE_HUNDRED_PERCENT = 100;\r\nconst NUM_OF_DECIMALS = 2;\r\n\r\n/**\r\n * Rounds up number to 2 decimal places\r\n * @param valueToRound Value to be rounded up\r\n * @returns Rounded up value\r\n */\r\nexport const roundUpNumber = (valueToRound: number): number => Math.ceil(valueToRound * ONE_HUNDRED_PERCENT) / ONE_HUNDRED_PERCENT;\r\n\r\n/**\r\n * Formats dollar amount into a string with $ prefix and fixed to 2 decimal places\r\n * @param valueToFormat Dollar amount to be formatted\r\n * @param formatCurrency Format currency method from context.cultureFormatter that uses the current channels financial unit\r\n * @returns Formatted dollar amount as a string\r\n */\r\nexport const formatAmountToString = (valueToFormat: number, formatCurrency: (price: string) => string): string =>\r\n `${formatCurrency(valueToFormat.toFixed(NUM_OF_DECIMALS))}`;\r\n","import React from 'react';\r\n\r\nimport { formatAmountToString } from '../utils/FormatNumber';\r\n\r\ninterface IEvePriceCalculatorResultsRowProps {\r\n label: string;\r\n value: number;\r\n formatCurrency: (price: string) => string;\r\n}\r\n\r\nexport const EvePriceCalculatorResultsRow: React.FC = props => {\r\n const { label, value, formatCurrency } = props;\r\n const className = `eve-price-calculator-display__results`;\r\n\r\n return (\r\n
\r\n
{label}
\r\n
{formatAmountToString(value, formatCurrency)}
\r\n
\r\n );\r\n};\r\n","import { roundUpNumber } from './FormatNumber';\r\n\r\n// CONSTANTS\r\nconst ML_TO_OZ_CONVERSION_VALUE = 29.574;\r\nconst ML_TO_L_CONVERSION_VALUE = 1000;\r\nconst TAX_TYPE_RATE_PER_NUM_OF_ML = 100;\r\nconst ONE_HUNDRED_PERCENT = 100;\r\n\r\n/**\r\n * Converts ounces to milliliters\r\n * @param valueToConvert Ounces value that needs to be converted to milliliters\r\n * @returns Milliliters equivalent of parameter\r\n */\r\nexport const ouncesToMilliliters = (valueToConvert: string): number => parseFloat(valueToConvert) * ML_TO_OZ_CONVERSION_VALUE;\r\n\r\n/**\r\n * Converts liters to milliliters\r\n * @param valueToConvert Liter value that needs to be converted to milliliters\r\n * @returns Milliliters equivalent of parameter\r\n */\r\nexport const litersToMilliliters = (valueToConvert: string): number => parseFloat(valueToConvert) * ML_TO_L_CONVERSION_VALUE;\r\n\r\n/**\r\n * Calculates the excise tax amount\r\n * @param sizeOfBottle Amount entered into size of bottle input converted to milliliters\r\n * @param taxTypeRate Amount calculated based on chosen tax type\r\n * @param numOfBottles Amount entered into the bottles per case input\r\n * @returns Excise tax amount\r\n */\r\nexport const calculateExciseTax = (sizeOfBottle: number, taxTypeRate: number, numOfBottles: string): number => {\r\n return roundUpNumber((sizeOfBottle / TAX_TYPE_RATE_PER_NUM_OF_ML) * taxTypeRate * parseFloat(numOfBottles));\r\n};\r\n\r\n/**\r\n * Calculates the markup amount\r\n * @param markupPercent Markup percent amount from site builder config\r\n * @param landedCost Calculated landed cost amount\r\n * @returns Markup dollar amount\r\n */\r\nexport const calculateMarkup = (markupPercent: number, landedCost: number): number => {\r\n const test2 = roundUpNumber(landedCost * (markupPercent / ONE_HUNDRED_PERCENT));\r\n return test2;\r\n};\r\n\r\n/**\r\n * Calculates the landed cost amount for FOB\r\n * @param pricePerCase Amount entered into the price per case input\r\n * @param incomingFreight Incoming freight fee from data action based on chosen zone\r\n * @returns Landed cost amount for FOB\r\n */\r\nexport const calculateLandedCostFob = (pricePerCase: number, incomingFreight: number): number => pricePerCase + incomingFreight;\r\n\r\n/**\r\n * Calculates the landed cost amount for retail\r\n * @param subTotal Calculated subtotal\r\n * @param markupPercent Markup percent amount from site builder config\r\n * @returns Landed cost amount for retail\r\n */\r\nexport const calculateLandedCostRetail = (subTotal: number, markupPercent: number): number =>\r\n subTotal / ((ONE_HUNDRED_PERCENT + markupPercent) / ONE_HUNDRED_PERCENT);\r\n\r\n/**\r\n * Calculates the subtotal for FOB\r\n * @param landedCost Calculated landed cost amount\r\n * @param markupAmount Calculated markup dollar amount\r\n * @returns Subtotal for FOB\r\n */\r\nexport const calculateSubtotalFob = (landedCost: number, markupAmount: number): number => landedCost + markupAmount;\r\n\r\n/**\r\n * Calculates the subtotal for retail\r\n * @param casePrice Amount entered into the price per case input\r\n * @param outgoingFreight Outgoing freight fee from site builder config\r\n * @param specialOrderFee Special order fee from site builder config\r\n * @param exciseTax Calculated excise tax\r\n * @returns Subtotal amount for retail\r\n */\r\nexport const calculateSubtotalRetail = (casePrice: number, outgoingFreight: number, specialOrderFee: number, exciseTax: number): number =>\r\n casePrice - (exciseTax + outgoingFreight + specialOrderFee);\r\n\r\n/**\r\n * Calculates the case price for FOB\r\n * @param subTotal Calculated subtotal\r\n * @param outgoingFreight Outgoing freight fee from site builder config\r\n * @param specialOrderFee Special order fee from site builder config\r\n * @param exciseTax Calculated excise tax\r\n * @returns Case price amount for FOB\r\n */\r\nexport const calculateCasePriceFob = (subTotal: number, outgoingFreight: number, specialOrderFee: number, exciseTax: number): number =>\r\n subTotal + exciseTax + outgoingFreight + specialOrderFee;\r\n\r\n/**\r\n * Calculates the price per case for retail\r\n * @param landedCost Calculated landed cost amount\r\n * @param incomingFreight Incoming freight fee from data action based on chosen zone\r\n * @returns Price per case amount for retail\r\n */\r\nexport const calculatePricePerCaseRetail = (landedCost: number, incomingFreight: number): number => landedCost - incomingFreight;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { format } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { IEvePriceCalculatorData } from './eve-price-calculator.data';\r\nimport { IEvePriceCalculatorProps, IZonePriceTypeData } from './eve-price-calculator.props.autogenerated';\r\nimport { EvePriceCalculatorInput } from './components/EvePriceCalculatorInput';\r\nimport { EvePriceCalculatorSelect } from './components/EvePriceCalculatorSelect';\r\nimport { EvePriceCalculatorButton } from './components/EvePriceCalculatorButton';\r\nimport { EvePriceCalculatorCheckbox } from './components/EvePriceCalculatorCheckbox';\r\nimport { EvePriceCalculatorResultsRow } from './components/EvePriceCalculatorResultsRow';\r\nimport { IZonePricingEntity } from '../../actions/DataServiceEntities.g';\r\nimport { validateSelect, validateAllInputs } from './utils/Validations';\r\nimport {\r\n calculateCasePriceFob,\r\n calculateExciseTax,\r\n calculateLandedCostFob,\r\n calculateLandedCostRetail,\r\n calculateMarkup,\r\n calculatePricePerCaseRetail,\r\n calculateSubtotalFob,\r\n calculateSubtotalRetail,\r\n ouncesToMilliliters,\r\n litersToMilliliters\r\n} from './utils/Calculations';\r\n\r\nexport interface IEvePriceCalculatorViewProps extends IEvePriceCalculatorProps {\r\n className: string;\r\n form: React.ReactNode;\r\n results: React.ReactNode;\r\n heading: React.ReactNode;\r\n helpText: React.ReactNode;\r\n}\r\n\r\ninterface IEvePriceCalculatorState {\r\n pricePerCaseInput: string;\r\n isFobOrRetailCalculation: string;\r\n taxType: string;\r\n zone: string;\r\n bottlesPerCase: string;\r\n sizeOfBottles: string;\r\n bottleUnitOfMeasure: string;\r\n isSpecialOrder: boolean;\r\n containsInputError: boolean;\r\n containsSelectError: boolean;\r\n pricePerCaseAmount: number;\r\n incomingFreight: number;\r\n landedCost: number;\r\n markupAmount: number;\r\n subTotal: number;\r\n exciseTax: number;\r\n outgoingFreightAmount: number;\r\n specialAmount: number;\r\n casePrice: number;\r\n zoneData: IZonePriceTypeData[];\r\n}\r\n\r\n/**\r\n *\r\n * EvePriceCalculator component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass EvePriceCalculator extends React.PureComponent, IEvePriceCalculatorState> {\r\n // Base class name\r\n private readonly _className = 'eve-price-calculator';\r\n\r\n // State variable names for form entry\r\n private readonly _pricePerCaseInputName = 'pricePerCaseInput';\r\n private readonly _isFobOrRetailCalculationName = 'isFobOrRetailCalculation';\r\n private readonly _taxTypeName = 'taxType';\r\n private readonly _zoneName = 'zone';\r\n private readonly _bottlesPerCaseName = 'bottlesPerCase';\r\n private readonly _sizeOfBottlesName = 'sizeOfBottles';\r\n private readonly _bottleUnitOfMeasureName = 'bottleUnitOfMeasure';\r\n private readonly _isSpecialOrderName = 'isSpecialOrder';\r\n\r\n // Button class names\r\n private readonly _computeButtonName = 'compute';\r\n private readonly _resetButtonName = 'reset';\r\n\r\n // Default state form input and results values\r\n private _defaultFormValues = {\r\n isFobOrRetailCalculation: this.props.resources.fobOrRetailDefaultOptionText,\r\n taxType: this.props.resources.taxTypeDefaultOptionText,\r\n zone: this.props.resources.zoneDefaultOptionText,\r\n bottleUnitOfMeasure: this.props.resources.uomDefaultOptionText,\r\n pricePerCaseInput: '',\r\n bottlesPerCase: '',\r\n sizeOfBottles: '',\r\n isSpecialOrder: false,\r\n containsInputError: true,\r\n containsSelectError: true,\r\n pricePerCaseAmount: 0,\r\n incomingFreight: 0,\r\n landedCost: 0,\r\n markupAmount: 0,\r\n subTotal: 0,\r\n exciseTax: 0,\r\n outgoingFreightAmount: 0,\r\n specialAmount: 0,\r\n casePrice: 0\r\n };\r\n\r\n constructor(props: IEvePriceCalculatorProps) {\r\n super(props);\r\n\r\n this.state = {\r\n ...this._defaultFormValues,\r\n zoneData: []\r\n };\r\n this._onChange = this._onChange.bind(this);\r\n this._getOptions = this._getOptions.bind(this);\r\n this._handleOnSubmit = this._handleOnSubmit.bind(this);\r\n this._handleOnReset = this._handleOnReset.bind(this);\r\n this._getZonePricesList = this._getZonePricesList.bind(this);\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n this.setState({ zoneData: this._getZonePricesList() || [] });\r\n }\r\n\r\n /**\r\n * To handle paragraph change.\r\n * @param event - To handle text change event.\r\n * @public\r\n */\r\n public handleGuideTextChange = (event: Msdyn365.ContentEditableEvent): void => {\r\n this.props.config.helpText = event.target.value;\r\n };\r\n\r\n /**\r\n * Method to be called on heading change.\r\n * @param event - Content Edit Event.\r\n * @public\r\n */\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\r\n this.props.config.heading!.text = event.target.value;\r\n };\r\n\r\n /**\r\n * Handles changes to the checkbox, input or select fields and sets state accordingly.\r\n * @param name State variable name to be changed\r\n * @param value Value that will be set to the state variable passed in\r\n */\r\n private _onChange(name: string, value: string): void {\r\n const stateValue = name === this._isSpecialOrderName ? !this.state[`${name}`] : value;\r\n this.setState({ ...this.state, [name]: stateValue });\r\n }\r\n\r\n /**\r\n * Handles the form submission and calculates the results\r\n */\r\n private _handleOnSubmit = (): void => {\r\n this._calculatesResultsValues();\r\n };\r\n\r\n /**\r\n * Handles the form reset\r\n */\r\n private _handleOnReset = (): void => {\r\n this._resetFormValues();\r\n };\r\n\r\n /**\r\n * Calculates the results\r\n */\r\n private _calculatesResultsValues = (): void => {\r\n const {\r\n zone,\r\n isSpecialOrder,\r\n pricePerCaseInput,\r\n isFobOrRetailCalculation,\r\n taxType,\r\n sizeOfBottles,\r\n bottlesPerCase,\r\n bottleUnitOfMeasure\r\n } = this.state;\r\n\r\n const taxTypeRate = this._getTaxTypeRate(taxType);\r\n const convertedSizeOfBottles = this._getSizeOfBottlesInMilliliters(sizeOfBottles, bottleUnitOfMeasure);\r\n const exciseTaxAmount = calculateExciseTax(convertedSizeOfBottles, taxTypeRate, bottlesPerCase);\r\n const incomingFreightAmount = this._getIncomingFreightAmount(zone);\r\n const specialAmount = isSpecialOrder ? this.props.config.specialOrderFee || 0 : 0;\r\n const outgoingFreightAmount = this.props.config.outgoingFreightFee || 0;\r\n let pricePerCaseAmount = 0;\r\n let landedCostAmount = 0;\r\n let markupAmount = 0;\r\n let subTotalAmount = 0;\r\n let casePriceAmount = 0;\r\n\r\n if (isFobOrRetailCalculation === this.props.resources.fobOptionText) {\r\n pricePerCaseAmount = parseFloat(pricePerCaseInput);\r\n landedCostAmount = calculateLandedCostFob(pricePerCaseAmount, incomingFreightAmount);\r\n markupAmount = calculateMarkup(this.props.config.markupPercentage || 0, landedCostAmount);\r\n subTotalAmount = calculateSubtotalFob(landedCostAmount, markupAmount);\r\n casePriceAmount = calculateCasePriceFob(subTotalAmount, outgoingFreightAmount, specialAmount, exciseTaxAmount);\r\n } else {\r\n casePriceAmount = parseFloat(pricePerCaseInput);\r\n subTotalAmount = calculateSubtotalRetail(casePriceAmount, outgoingFreightAmount, specialAmount, exciseTaxAmount);\r\n landedCostAmount = calculateLandedCostRetail(subTotalAmount, this.props.config.markupPercentage || 0);\r\n pricePerCaseAmount = calculatePricePerCaseRetail(landedCostAmount, incomingFreightAmount);\r\n markupAmount = calculateMarkup(this.props.config.markupPercentage || 0, landedCostAmount);\r\n }\r\n\r\n this.setState({\r\n pricePerCaseAmount: pricePerCaseAmount,\r\n incomingFreight: incomingFreightAmount,\r\n landedCost: landedCostAmount,\r\n markupAmount: markupAmount,\r\n subTotal: subTotalAmount,\r\n exciseTax: exciseTaxAmount,\r\n outgoingFreightAmount: outgoingFreightAmount,\r\n specialAmount: specialAmount,\r\n casePrice: casePriceAmount\r\n });\r\n };\r\n\r\n /**\r\n * Gets the incoming freight fee for the chosen zone\r\n * @param zone Zone chosen in the form\r\n * @returns Incoming freight fee\r\n */\r\n private _getIncomingFreightAmount = (zone: string): number => {\r\n // const selectedZone = this.state.zoneData.find(z => z.Zone === zone);\r\n // return selectedZone && selectedZone.Value ? selectedZone.Value : 0;\r\n const selectedZone = this.state.zoneData.find(z => z.zoneName === zone);\r\n return selectedZone && selectedZone.fee ? selectedZone.fee : 0;\r\n };\r\n\r\n /**\r\n * Gets the tax type rate for the chosen tax type\r\n * @param taxType Tax type chosen in the form\r\n * @returns Tax type rate\r\n */\r\n private _getTaxTypeRate = (taxType: string): number => {\r\n // May be able to combine with the getIncomingFreightAmount method depending on how the zone data comes from the api call\r\n const selectedTaxType = this.props.config.taxTypes && this.props.config.taxTypes?.find(type => type.name === taxType);\r\n return selectedTaxType && selectedTaxType.rate ? selectedTaxType.rate : 0;\r\n };\r\n\r\n /**\r\n * Resets the state variables to default values\r\n */\r\n private _resetFormValues = (): void => {\r\n this.setState({\r\n ...this._defaultFormValues\r\n });\r\n };\r\n\r\n /**\r\n * Converts the bottle size entered to milliliters\r\n * @param bottleSize Bottle size as string entered from form\r\n * @param unitOfMeasure Bottle unit of measure from form\r\n * @returns Bottle size in milliliters as a number\r\n */\r\n private _getSizeOfBottlesInMilliliters = (bottleSize: string, unitOfMeasure: string): number => {\r\n const {\r\n resources: { ounceUomOptionText, literUomOptionText }\r\n } = this.props;\r\n\r\n if (unitOfMeasure === ounceUomOptionText) {\r\n return ouncesToMilliliters(bottleSize);\r\n }\r\n if (unitOfMeasure === literUomOptionText) {\r\n return litersToMilliliters(bottleSize);\r\n }\r\n return parseFloat(bottleSize);\r\n };\r\n\r\n /**\r\n * Gets the options for the chosen select element\r\n * @param optionType Select element that needs to populate options\r\n * @returns Array of options to be displayed in the select element\r\n */\r\n private _getOptions = (optionType: string): string[] => {\r\n const {\r\n resources: {\r\n fobOrRetailLabel,\r\n taxTypeLabel,\r\n zoneLabel,\r\n bottleUnitOfMeasureLabel,\r\n fobOptionText,\r\n retailOptionText,\r\n milliliterUomOptionText,\r\n literUomOptionText,\r\n ounceUomOptionText,\r\n uomDefaultOptionText,\r\n zoneDefaultOptionText,\r\n taxTypeDefaultOptionText,\r\n fobOrRetailDefaultOptionText\r\n },\r\n config: { taxTypes /*, zonePriceTypes*/ }\r\n } = this.props;\r\n\r\n let options: string[] = [];\r\n switch (optionType) {\r\n case fobOrRetailLabel:\r\n options = [fobOrRetailDefaultOptionText, fobOptionText, retailOptionText];\r\n return options;\r\n\r\n case bottleUnitOfMeasureLabel:\r\n options = [uomDefaultOptionText, milliliterUomOptionText, literUomOptionText, ounceUomOptionText];\r\n return options;\r\n\r\n case taxTypeLabel:\r\n options = [taxTypeDefaultOptionText];\r\n // Add tax type names to list if they exist in the array from Site Builder and name is not empty\r\n const taxTypesList =\r\n taxTypes && taxTypes.length > 0\r\n ? taxTypes.flatMap(taxType => {\r\n if (!taxType.name) {\r\n return [];\r\n }\r\n return taxType.name;\r\n })\r\n : [];\r\n options = options.concat(taxTypesList);\r\n return options;\r\n\r\n case zoneLabel:\r\n options = [zoneDefaultOptionText];\r\n const zones = this.state.zoneData;\r\n const zonePriceTypesList = zones && zones.length > 0 ? zones.flatMap(zonePriceType => zonePriceType.zoneName || '') : [];\r\n options = options.concat(zonePriceTypesList);\r\n return options;\r\n\r\n default:\r\n return [];\r\n }\r\n };\r\n\r\n /**\r\n * Gets zone prices from data\r\n */\r\n private _getZonePricesList = (): IZonePriceTypeData[] => {\r\n //@ts-ignore\r\n const zonesResults: IZonePricingEntity[] = this.props.data.zones.result ? this.props.data.zones.result.zones : [];\r\n const zonesConfig: IZonePriceTypeData[] = this.props.config.zonePriceTypes || [];\r\n const zones =\r\n zonesResults && zonesResults.length > 0\r\n ? zonesResults.flatMap(zoneResult => {\r\n // Check that the Zone name exists and that the value exists while also being greater than $0.00\r\n if (!zoneResult.Zone || (!!zoneResult.Value && zoneResult.Value < 0)) {\r\n return [];\r\n }\r\n const zone: IZonePriceTypeData = {\r\n zoneName: zoneResult.Zone,\r\n fee: zoneResult.Value\r\n };\r\n return zone;\r\n })\r\n : [];\r\n const zonesConfigResults: IZonePriceTypeData[] =\r\n zonesConfig &&\r\n zonesConfig.flatMap(zone => {\r\n if (!zone.zoneName || (!!zone.fee && zone.fee < 0)) {\r\n return [];\r\n }\r\n const zoneEntity: IZonePriceTypeData = {\r\n zoneName: zone.zoneName,\r\n fee: zone.fee\r\n };\r\n return zoneEntity;\r\n });\r\n const zoneData = [...zones, ...zonesConfigResults];\r\n return zoneData;\r\n };\r\n\r\n /**\r\n * Renders the heading text that's added to the module in Site Builder\r\n * @returns React.ReactElement with the heading text\r\n */\r\n private readonly _renderHeading = (): React.ReactElement => {\r\n const {\r\n config: { heading },\r\n context: { request }\r\n } = this.props;\r\n\r\n if (!heading || !heading.text) {\r\n return <>;\r\n }\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n /**\r\n * Renders the helper text that's added to the module in Site Builder\r\n * @returns React.ReactElement with the heading text\r\n */\r\n private readonly _renderHelpText = (): React.ReactElement => {\r\n const {\r\n config: { helpText },\r\n context: { request }\r\n } = this.props;\r\n\r\n if (!helpText) {\r\n return <>;\r\n }\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n /**\r\n * Renders the form that will allow the user to input data to calculate the landed cost\r\n * @returns ReactNode that displays the form\r\n */\r\n private _renderForm = (): React.ReactNode => {\r\n const {\r\n resources: {\r\n pricePerCaseLabel,\r\n bottlesPerCaseLabel,\r\n sizeOfBottlesLabel,\r\n fobOrRetailLabel,\r\n taxTypeLabel,\r\n zoneLabel,\r\n bottleUnitOfMeasureLabel,\r\n specialLabel,\r\n computeButtonText,\r\n resetButtonText,\r\n invalidNumberErrorText,\r\n fobOrRetailDefaultOptionText,\r\n uomDefaultOptionText,\r\n zoneDefaultOptionText,\r\n taxTypeDefaultOptionText\r\n }\r\n } = this.props;\r\n\r\n const {\r\n pricePerCaseInput,\r\n isFobOrRetailCalculation,\r\n bottlesPerCase,\r\n sizeOfBottles,\r\n bottleUnitOfMeasure,\r\n isSpecialOrder,\r\n taxType,\r\n zone,\r\n containsInputError,\r\n containsSelectError\r\n } = this.state;\r\n const stateSelectVarList = [isFobOrRetailCalculation, taxType, zone, bottleUnitOfMeasure];\r\n const optionDefaultsList = [fobOrRetailDefaultOptionText, uomDefaultOptionText, zoneDefaultOptionText, taxTypeDefaultOptionText];\r\n const stateInputVarList = [pricePerCaseInput, bottlesPerCase, sizeOfBottles];\r\n this.setState({\r\n containsSelectError: !validateSelect(stateSelectVarList, optionDefaultsList),\r\n containsInputError: !validateAllInputs(stateInputVarList)\r\n });\r\n return (\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n {this.props.slots.help}\r\n
\r\n
\r\n );\r\n };\r\n\r\n /**\r\n * Renders the results from the calculation or the default values\r\n * @returns ReactNode that displays the results\r\n */\r\n private _renderResults = (): React.ReactNode => {\r\n const {\r\n resources: {\r\n fobPricePerCaseText,\r\n incomingFreightText,\r\n landedCostText,\r\n markupText,\r\n subTotalText,\r\n exciseTaxText,\r\n outgoingFreightText,\r\n plusSpecialText,\r\n casePriceText\r\n },\r\n config: { markupPercentage },\r\n context: {\r\n cultureFormatter: { formatCurrency }\r\n }\r\n } = this.props;\r\n\r\n const {\r\n pricePerCaseAmount,\r\n landedCost,\r\n exciseTax,\r\n casePrice,\r\n subTotal,\r\n incomingFreight,\r\n markupAmount,\r\n outgoingFreightAmount,\r\n specialAmount\r\n } = this.state;\r\n const className = `${this._className}-display__results`;\r\n const formattedMarkupText = format(markupText, markupPercentage ? markupPercentage : 0);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n public render(): JSX.Element | null {\r\n const viewProps: IEvePriceCalculatorViewProps = {\r\n ...this.props,\r\n className: this._className,\r\n form: this._renderForm(),\r\n results: this._renderResults(),\r\n heading: this._renderHeading(),\r\n helpText: this._renderHelpText()\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n}\r\n\r\nexport default EvePriceCalculator;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { IEvePriceCalculatorViewProps } from './eve-price-calculator';\r\n\r\nexport default (props: IEvePriceCalculatorViewProps) => {\r\n const { className, form, results, heading, helpText } = props;\r\n return (\r\n
\r\n {heading}\r\n {helpText}\r\n
\r\n {form}\r\n {results}\r\n
\r\n
\r\n );\r\n};\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['eve-price-calculator'] = {\n c: () => require('partner/modules/eve-price-calculator/eve-price-calculator.tsx'),\n $type: 'containerModule',\n da: [{name:'zones', path:'actions/get-zone-prices.action', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'eve-price-calculator',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/eve-price-calculator'\n });\n \n\n {\n const sanitizedActionPath = 'actions/get-zone-prices.action';\n let dataAction = require('partner/actions/get-zone-prices.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__|modules|eve-price-calculator|eve-price-calculator'] = {\n c: () => require('partner/modules/eve-price-calculator/eve-price-calculator.view.tsx'),\n cn: '__local__-__local__-eve-price-calculator'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;","'use strict';\nvar $TypeError = TypeError;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991\n\nmodule.exports = function (it) {\n if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');\n return it;\n};\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg) : false;\n var element, elementLen;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n elementLen = lengthOfArrayLike(element);\n targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;\n } else {\n doesNotExceedSafeInteger(targetIndex + 1);\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $RangeError = RangeError;\n\n// `String.prototype.repeat` method implementation\n// https://tc39.es/ecma262/#sec-string.prototype.repeat\nmodule.exports = function repeat(count) {\n var str = toString(requireObjectCoercible(this));\n var result = '';\n var n = toIntegerOrInfinity(count);\n if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions');\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n return result;\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\n// `thisNumberValue` abstract operation\n// https://tc39.es/ecma262/#sec-thisnumbervalue\nmodule.exports = uncurryThis(1.0.valueOf);\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flatMap` method\n// https://tc39.es/ecma262/#sec-array.prototype.flatmap\n$({ target: 'Array', proto: true }, {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen = lengthOfArrayLike(O);\n var A;\n aCallable(callbackfn);\n A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return A;\n }\n});\n","'use strict';\n// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flatMap');\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar thisNumberValue = require('../internals/this-number-value');\nvar $repeat = require('../internals/string-repeat');\nvar fails = require('../internals/fails');\n\nvar $RangeError = RangeError;\nvar $String = String;\nvar floor = Math.floor;\nvar repeat = uncurryThis($repeat);\nvar stringSlice = uncurryThis(''.slice);\nvar nativeToFixed = uncurryThis(1.0.toFixed);\n\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\n\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\nvar multiply = function (data, n, c) {\n var index = -1;\n var c2 = c;\n while (++index < 6) {\n c2 += n * data[index];\n data[index] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n};\n\nvar divide = function (data, n) {\n var index = 6;\n var c = 0;\n while (--index >= 0) {\n c += data[index];\n data[index] = floor(c / n);\n c = (c % n) * 1e7;\n }\n};\n\nvar dataToString = function (data) {\n var index = 6;\n var s = '';\n while (--index >= 0) {\n if (s !== '' || index === 0 || data[index] !== 0) {\n var t = $String(data[index]);\n s = s === '' ? t : s + repeat('0', 7 - t.length) + t;\n }\n } return s;\n};\n\nvar FORCED = fails(function () {\n return nativeToFixed(0.00008, 3) !== '0.000' ||\n nativeToFixed(0.9, 0) !== '1' ||\n nativeToFixed(1.255, 2) !== '1.25' ||\n nativeToFixed(1000000000000000128.0, 0) !== '1000000000000000128';\n}) || !fails(function () {\n // V8 ~ Android 4.3-\n nativeToFixed({});\n});\n\n// `Number.prototype.toFixed` method\n// https://tc39.es/ecma262/#sec-number.prototype.tofixed\n$({ target: 'Number', proto: true, forced: FORCED }, {\n toFixed: function toFixed(fractionDigits) {\n var number = thisNumberValue(this);\n var fractDigits = toIntegerOrInfinity(fractionDigits);\n var data = [0, 0, 0, 0, 0, 0];\n var sign = '';\n var result = '0';\n var e, z, j, k;\n\n // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation\n if (fractDigits < 0 || fractDigits > 20) throw new $RangeError('Incorrect fraction digits');\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number !== number) return 'NaN';\n if (number <= -1e21 || number >= 1e21) return $String(number);\n if (number < 0) {\n sign = '-';\n number = -number;\n }\n if (number > 1e-21) {\n e = log(number * pow(2, 69, 1)) - 69;\n z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(data, 0, z);\n j = fractDigits;\n while (j >= 7) {\n multiply(data, 1e7, 0);\n j -= 7;\n }\n multiply(data, pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(data, 1 << 23);\n j -= 23;\n }\n divide(data, 1 << j);\n multiply(data, 1, 1);\n divide(data, 2);\n result = dataToString(data);\n } else {\n multiply(data, 0, z);\n multiply(data, 1 << -e, 0);\n result = dataToString(data) + repeat('0', fractDigits);\n }\n }\n if (fractDigits > 0) {\n k = result.length;\n result = sign + (k <= fractDigits\n ? '0.' + repeat('0', fractDigits - k) + result\n : stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits));\n } else {\n result = sign + result;\n } return result;\n }\n});\n"],"names":["GetZonePricesInput","constructor","shouldGetZonePrices","getCacheKey","getCacheObjectType","dataCacheType","this","Msdyn365","action","async","input","ctx","zones","getZonePricesAsync","callerContext","id","args","_args$config","config","EvePriceCalculatorInput","props","label","inputName","value","errorText","onChange","className","React","htmlFor","type","name","defaultValue","e","target","valueToValidate","isNaN","parseFloat","EvePriceCalculatorSelect","selectName","getOptions","options","map","option","index","key","selected","EvePriceCalculatorButton","buttonName","isDisabled","onClick","disabled","EvePriceCalculatorCheckbox","checkboxName","checked","roundUpNumber","valueToRound","Math","ceil","EvePriceCalculatorResultsRow","formatCurrency","formatAmountToString","valueToFormat","toFixed","calculateMarkup","markupPercent","landedCost","EvePriceCalculator","super","_className","_pricePerCaseInputName","_isFobOrRetailCalculationName","_taxTypeName","_zoneName","_bottlesPerCaseName","_sizeOfBottlesName","_bottleUnitOfMeasureName","_isSpecialOrderName","_computeButtonName","_resetButtonName","_defaultFormValues","isFobOrRetailCalculation","resources","fobOrRetailDefaultOptionText","taxType","taxTypeDefaultOptionText","zone","zoneDefaultOptionText","bottleUnitOfMeasure","uomDefaultOptionText","pricePerCaseInput","bottlesPerCase","sizeOfBottles","isSpecialOrder","containsInputError","containsSelectError","pricePerCaseAmount","incomingFreight","markupAmount","subTotal","exciseTax","outgoingFreightAmount","specialAmount","casePrice","handleGuideTextChange","event","helpText","handleHeadingChange","heading","text","_handleOnSubmit","_calculatesResultsValues","_handleOnReset","_resetFormValues","state","taxTypeRate","_getTaxTypeRate","exciseTaxAmount","calculateExciseTax","sizeOfBottle","numOfBottles","_getSizeOfBottlesInMilliliters","incomingFreightAmount","_getIncomingFreightAmount","specialOrderFee","outgoingFreightFee","landedCostAmount","subTotalAmount","casePriceAmount","fobOptionText","markupPercentage","calculateSubtotalFob","calculateSubtotalRetail","outgoingFreight","calculateLandedCostRetail","calculatePricePerCaseRetail","setState","selectedZone","zoneData","find","z","zoneName","fee","_this$props$config$ta","selectedTaxType","taxTypes","rate","_objectSpread","bottleSize","unitOfMeasure","ounceUomOptionText","literUomOptionText","valueToConvert","litersToMilliliters","_getOptions","optionType","fobOrRetailLabel","taxTypeLabel","zoneLabel","bottleUnitOfMeasureLabel","retailOptionText","milliliterUomOptionText","taxTypesList","length","flatMap","concat","zonePriceTypesList","zonePriceType","_getZonePricesList","zonesResults","data","result","zonesConfig","zonePriceTypes","zoneResult","Zone","Value","_renderHeading","context","request","tag","editProps","onEdit","requestContext","_renderHelpText","_renderForm","pricePerCaseLabel","bottlesPerCaseLabel","sizeOfBottlesLabel","specialLabel","computeButtonText","resetButtonText","invalidNumberErrorText","stateSelectVarList","optionDefaultsList","stateInputVarList","valuesToValidate","stateVarList","defaultOptionsList","some","item","includes","_onChange","slots","help","_renderResults","fobPricePerCaseText","incomingFreightText","landedCostText","markupText","subTotalText","exciseTaxText","outgoingFreightText","plusSpecialText","casePriceText","cultureFormatter","formattedMarkupText","format","bind","stateValue","render","viewProps","form","results","renderView","binding","modules","dataActions","c","require","$type","da","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM","$TypeError","TypeError","it","isArray","lengthOfArrayLike","doesNotExceedSafeInteger","flattenIntoArray","original","source","sourceLen","start","depth","mapper","thisArg","element","elementLen","targetIndex","sourceIndex","mapFn","toIntegerOrInfinity","toString","requireObjectCoercible","$RangeError","RangeError","count","str","Infinity","uncurryThis","valueOf","$","aCallable","toObject","arraySpeciesCreate","proto","callbackfn","A","O","arguments","undefined","addToUnscopables","thisNumberValue","$repeat","fails","$String","String","floor","repeat","stringSlice","slice","nativeToFixed","pow","x","acc","multiply","c2","divide","dataToString","s","t","forced","fractionDigits","j","k","number","fractDigits","sign","x2","log"],"sourceRoot":""}