\r\n { this.getLabelValue(input) }\r\n { this.renderValueDivider(input) }\r\n
\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n isZipCodeField = (input) => {\r\n return input.Name.toLowerCase().indexOf('zipcode') > -1 ;\r\n }\r\n\r\n renderValueDivider = (input) => {\r\n if(input.Name.toLowerCase().indexOf('zipcode') > -1) {\r\n return (\r\n {\r\n\t\t\t\t\tthis.props.handleFieldChange(e.target, this.props.step, option, this.props.stepIndex)\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\t//rs 11-29-22 - pass legend\r\n\trenderRadioField = ({ input, legend, meta: props, items }) => {\r\n\t\tif (!this.props.activeStep) {\r\n\t\t\tinput.tabIndex = '-1';\r\n\t\t}\r\n\t\tlet requiredMessage = this.getRadioRequiredMessage(input);\r\n\t\t//rs 11-29-22 - test for pavedDriveway & legend prop\r\n\t\tvar classType = (input.name == \"pavedDriveway\") ? input.name + \" d-none\" : input.name;\r\n\t\tvar legendItem = (legend != null) ? {legend} : \"\";\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t{requiredMessage}\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\tgetRadioRequiredMessage = (input) => {\r\n\t\tif (this.props.manualErrors[input.name] && !input.value) {\r\n\t\t\t//RS: 2022-05-30 - ADO 6865 - Translate Error\r\n\t\t\treturn {i18n.t('RequiredField')}
;\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\trenderTextOption = (option, index) => {\r\n\t\tlet inValidator = () => { return undefined };\r\n\t\tlet onChange = () => { };\r\n\t\tif (option.Name.toLowerCase().indexOf('zipcode') > -1) {\r\n\t\t\tinValidator = this.zipValidator;\r\n\t\t} else if (option.Name.toLowerCase().indexOf('email') > -1) {\r\n\t\t\tinValidator = this.emailValidator;\r\n\t\t} else if (option.Name.toLowerCase() === \"phone\") {\r\n\t\t\tinValidator = this.telephoneValidator;\r\n\t\t} else if (option.Required) {\r\n\t\t\tinValidator = this.requiredValidator;\r\n\t\t}\r\n\t\tlet FField = this.props.Field;\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t {\r\n\t\t\t\t\t\tthis.props.handleFieldChange(e.target, this.props.step, option, this.props.stepIndex)\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tkey={index}\r\n\t\t\t\t/>\r\n\t\t\t
\r\n\t\t)\r\n\t}\r\n\r\n\trenderEmailOption = (option, index) => {\r\n\t\tlet inValidator = () => { return undefined };\r\n\t\tlet onChange = () => { };\r\n\t\tif (option.Name.toLowerCase().indexOf('zipcode') > -1) {\r\n\t\t\tinValidator = this.zipValidator;\r\n\t\t} else if (option.Name.toLowerCase().indexOf('email') > -1) {\r\n\t\t\tinValidator = this.emailValidator;\r\n\t\t} else if (option.Name.toLowerCase() === \"phone\") {\r\n\t\t\tinValidator = this.telephoneValidator;\r\n\t\t} else if (option.Required) {\r\n\t\t\tinValidator = this.requiredValidator;\r\n\t\t}\r\n\t\tlet FField = this.props.Field;\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t {\r\n\t\t\t\t\t\tthis.props.handleFieldChange(e.target, this.props.step, option, this.props.stepIndex)\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tkey={index}\r\n\t\t\t\t/>\r\n\t\t\t
\r\n\t\t)\r\n\t}\r\n\r\n\trenderTextField = ({ input, label, placeholder, type, classType, meta: props }) => {\r\n\t\tif (!this.props.activeStep) {\r\n\t\t\tinput.tabIndex = '-1';\r\n\t\t}\r\n\t\tvar maxLength = '';\r\n\t\tif (input.name === 'promotionCode') {\r\n\t\t\ttype = 'collapsible';\r\n\t\t\tmaxLength = \"25\";\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t
+ - {label}\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\r\n\t\t\t\t\t{(this.props.manualErrors[input.name] && !input.value) || ((props.touched || props.submitting) && props.error) ?
{props.error}
: ''}\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t)\r\n\t}\r\n\r\n\tgetCollapseFieldClass = (input) => {\r\n\t\treturn this.state.showcollapsibleinput[input.name] || (input.name == \"promotionCode\" && input.value != \"\") ? 'uncollapse' : ''\r\n\t}\r\n\r\n\tgetTextLabelProps = (input, type, label) => {\r\n\t\tlet labelProps = {};\r\n\t\tif ((type && type.toLowerCase() === 'collapsible' && !input.value || input.value && input.value.length === 0) || input.name === 'promotionCode') {\r\n\t\t\tlabelProps = {\r\n\t\t\t\tonClick: () => {\r\n\t\t\t\t\tlet showCollapseItem = { ...this.state.showcollapsibleinput };\r\n\t\t\t\t\tif (showCollapseItem[input.name]) {\r\n\t\t\t\t\t\tshowCollapseItem[input.name] = false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tshowCollapseItem[input.name] = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.setState({ showcollapsibleinput: showCollapseItem });\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn labelProps;\r\n\t}\r\n\r\n\trenderHiddenOption = (option, index) => {\r\n\t\tlet FField = this.props.Field;\r\n\t\treturn (\r\n\t\t\t \r\n\t\t)\r\n\t}\r\n\r\n\trenderSelectOption = (option, index) => {\r\n\t\tlet FField = this.props.Field;\r\n\r\n\t\tlet onChange = (e) => { this.props.handleFieldChange(e.target, this.props.step, option, this.props.stepIndex) };\r\n\t\tlet selectDisabled = false;\r\n\t\tif (option.Value.length < 2) {\r\n\t\t\tselectDisabled = true;\r\n\t\t}\r\n\t\tlet validator = this.requiredValidator;\r\n\t\tif (option.Name.toLowerCase() === 'duration') {\r\n\t\t\tvalidator = this.durationValidator;\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{this.renderSelectOptions(option.Value)}\r\n\t\t\t\t \r\n\t\t\t
\r\n\t\t)\r\n\t}\r\n\r\n\trenderSelectOptions = (options) => {\r\n\t\tif (options.length === 0 || options.length === 1 && options[0].Value === null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn options.map((option, index) => {\r\n\t\t\treturn {option.Label} \r\n\t\t})\r\n\t}\r\n\r\n\trenderSelectField = ({ input, meta: props, children, label, disabled, loadingText }) => {\r\n\t\tif (!this.props.activeStep) {\r\n\t\t\tinput.tabIndex = '-1';\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{children}\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t
\r\n\t\t\t\t\t{(this.props.manualErrors[input.name] && (!input.value || input.value === 0)) || ((props.touched || props.submitting) && props.error) ?\r\n\t\t\t\t\t\t
{props.error}
: ''}\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t)\r\n\t}\r\n\r\n\tchangeDate = (date) => {\r\n\t\tlet utcDate = moment(date).startOf('day').utc(); // convert the selected date to UTC, which is sometimes the day before or after the date chosen because of timezone differences\r\n\t\tconst timeZoneOffset = moment(date).utcOffset(); // how many minutes difference between local time and utcDate\r\n\t\tlet localDate = timeZoneOffset > 0 ? moment(utcDate).add(timeZoneOffset, 'minutes') : moment(utcDate).subtract(timeZoneOffset + 1, 'minutes');\r\n\t\tthis.props.setQuoteFlowFormFieldValue('selectedDate', localDate.valueOf());\r\n\t}\r\n\r\n\trenderCalendarOption = (option, index) => {\r\n\t\tlet FField = this.props.Field;\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t { this.changeDate(date); this.props.handleFieldChange(null, this.props.step, option, this.props.stepIndex); }}\r\n\t\t\t\t/>\r\n\t\t\t\t \r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderCalendarField = ({ input, meta: props, excludeDates, label, hiddenFieldName }) => {\r\n\t\t//RS: 2022-05-30 - ADO 6865 - Update Language & Time Format\r\n\t\tif (window.location.href.indexOf(\"/fr/\") > -1) {\r\n\t\t\tvar lang = 'fr'\r\n\t\t\tvar localeDate = 'dddd DD MMMM, YYYY'\r\n\t\t}\r\n\t\telse {\r\n\t\t\tvar lang = 'en'\r\n\t\t\tvar localeDate = 'dddd MMMM DD, YYYY'\r\n\t\t};\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t
{label} \r\n\t\t\t\t
\r\n\t\t\t\t\t }\r\n\t\t\t\t\t\tdateForm=\"MM/DD/YYYY\"\r\n\t\t\t\t\t\tvalue={input.value ? moment(input.value).format(localeDate) : null}\r\n\t\t\t\t\t\tminDate={moment().add(1, 'day')}\r\n\t\t\t\t\t\tmaxDate={moment().add(1, 'year')}\r\n\t\t\t\t\t\texcludeDates={this.props.availabilityDates}\r\n\t\t\t\t\t\tonMonthChange={(val) => { this.props.handleMonthChange(val, this.props.step) }}\r\n\t\t\t\t\t/>\r\n\t\t\t\t
\r\n\t\t\t\t{props.touched && props.error ?
{props.error}
: ''}\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\tzipValidator = (value) => {\r\n\t\tif (!this.props.zipCodeValidator(value)) {\r\n\t\t\t//RS: 2022-05-30 - ADO 6865 - Translate Error\r\n\t\t\treturn i18n.t('InvalidZip');\r\n\t\t} else {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t}\r\n\r\n\temailValidator = (value) => {\r\n\t\tif (!value || value.length === 0 || !/^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/i.test(value)) {\r\n\t\t\t//RS: 2022-05-30 - ADO 6865 - Translate Error\r\n\t\t\treturn i18n.t('InvalidEmail');\r\n\t\t} else {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t}\r\n\r\n\ttelephoneValidator = (value) => {\r\n\t\tif (!value || value.length === 0 || !/^(?:(?:\\+?1\\s*(?:[.-]\\s*)?)?(?:\\(\\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\\s*\\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\\s*(?:[.-]\\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\\s*(?:[.-]\\s*)?([0-9]{4})(?:\\s*(?:#|x\\.?|ext\\.?|extension)\\s*(\\d+))?$/g.test(value)) {\r\n\t\t\t//RS: 2022-05-30 - ADO 6865 - Translate Error\r\n\t\t\treturn i18n.t('InvalidPhone')\r\n\t\t} else {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t}\r\n\r\n\trequiredValidator = (value) => {\r\n\t\tvalue=$.trim(value);\r\n\t\tif (!value || value.length === 0) {\r\n\t\t\t//RS: 2022-05-30 - ADO 6865 - Translate Error\r\n\t\t\treturn i18n.t('RequiredField');\r\n\t\t}\r\n\t}\r\n\r\n\tdurationValidator = (value) => {\r\n\t\tif (!value || value == 0) {\r\n\t\t\t//RS: 2022-05-30 - ADO 6865 - Translate Error\r\n\t\t\treturn i18n.t('RequiredField');\r\n\t\t}\r\n\t}\r\n\r\n\tneedsRadioOptionsClassName = (option) => {\r\n\t\t//rs 11-29-22 - if this is used, pass the same info\r\n\t\tif (option && option.InputType && (option.InputType === \"radio\" || option.InputType === \"radioLink\" || option.InputType === \"radioPaved\")) {\r\n\t\t\treturn \" quoteFlowStep__radio-button-holder\";\r\n\t\t}\r\n\t\treturn '';\r\n\t}\r\n\r\n\r\n}\r\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/keys\"), __esModule: true };","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport redux from '../redux';\r\nimport axios from 'axios';\r\nimport { Field, reduxForm, formValueSelector, change } from 'redux-form';\r\nimport * as helpers from '../../helpers';\r\nimport Step from './components/Step';\r\nimport Summary from './components/Summary';\r\nimport QuoteFlowFormLoader from './components/QuoteFlowFormLoader';\r\nimport moment from 'moment';\r\n// RS 2022-06-01 ADO ADO 6865 - Add Date picker content\r\nimport 'moment/locale/fr';\r\nimport i18n from './i18n';\r\nimport { useTranslation } from 'react-i18next';\r\n //RS: 2022-05-30 - ADO 6865 - Use the language\r\ni18n.on('initialized', function(options) {\r\n const { t, i18n } = useTranslation();\r\n})\r\n\r\n// hack to get FF to rerun JavaScript when the back button is pressed. Otherwise the loading screen is still visible when the back button is pressed.\r\nwindow.onunload = function () { };\r\n\r\nclass QuoteFlowForm extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n busy: false,\r\n inError: false,\r\n loading: false,\r\n servicabilityParamChanged: null,\r\n manualErrors: {},\r\n startAnimating: false,\r\n startOfMonth: moment()\r\n }\r\n\r\n this.userInteractionInitiated = false;\r\n this.completedSteps = [];\r\n this.activeSteps = [0];\r\n\r\n this.setOnScroll();\r\n this.setOnWindowResize();\r\n }\r\n\r\n getWindowSize = () => {\r\n const w = window,\r\n d = document,\r\n e = d.documentElement,\r\n g = d.getElementsByTagName('body')[0],\r\n windowSize = {\r\n height: w.innerHeight || e.clientHeight || g.clientHeight,\r\n width: w.innerWidth || e.clientWidth || g.clientWidth\r\n };\r\n\r\n return windowSize;\r\n }\r\n\r\n setOnScroll = () => {\r\n window.addEventListener(\"scroll\", () => {\r\n var targetElement = document.querySelector('.quoteFlowStep5');\r\n if (this.getWindowSize().width > 767) {\r\n this.adjustSummaryBoxState();\r\n }\r\n // Show or hide live person banner\r\n var bounding = targetElement.getBoundingClientRect();\r\n var banner = document.querySelector('.LPMcontainer.LPMtoaster');\r\n if (banner && targetElement) {\r\n if (bounding.top <= (window.innerHeight || document.documentElement.clientHeight)) {\r\n banner.classList.add('hide');\r\n } else {\r\n banner.classList.remove('hide');\r\n }\r\n }\r\n });\r\n }\r\n\r\n setOnWindowResize = () => {\r\n window.addEventListener(\"resize\", () => {\r\n this.adjustSummaryBoxState();\r\n })\r\n }\r\n\r\n adjustSummaryBoxState = () => {\r\n const summaryBox = document.querySelector('.quote-flow__summary-box');\r\n if (this.getWindowSize().width <= 767) {\r\n summaryBox.style.top = 'calc(100% - 64px)';\r\n return\r\n }\r\n const firstFormStep = document.querySelector('.quoteFlowStep0'),\r\n summaryBoxPosition = (summaryBox ? summaryBox.getBoundingClientRect() : { bottom: 0, height: 0, left: 0, right: 0, top: 0, width: 0, x: 0, y: 0 }),\r\n scrollTop = Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop),\r\n mainContainer = document.querySelector('main'),\r\n min = 80,\r\n max = mainContainer.getBoundingClientRect().height - summaryBoxPosition.height;\r\n summaryBox.style.top = Math.max(min, Math.min(40 + scrollTop, max)) + 'px';\r\n document.body.classList.remove('quote-flow__summary-box-open');\r\n }\r\n\r\n componentDidMount() {\r\n\t this.setLoadingOnOff(false);\r\n\t\r\n document.querySelector('body').classList.remove('quoteflow-form__fixed-footer');\r\n\r\n\t\tthis.props\r\n\t\t\t.setQuoteFlowData(window.quoteFlowContent)\r\n\t\t\t.then(() => {\r\n\t\t\t\tconst initialStepSetup = true;\r\n\t\t\t\tconst servicabilityStatus = sessionStorage.getItem('pods-quoteflow-status');\r\n\t\t\t\tconst servicabilityStatusCode = sessionStorage.getItem('pods-quoteflow-status-code');\r\n\t\t\t\t\r\n\t\t\t\tconsole.log('SERVICEABILITY STATUS', servicabilityStatus);\r\n\r\n\t\t\t\tif (servicabilityStatus && servicabilityStatusCode && !(servicabilityStatusCode >= 200 && servicabilityStatusCode < 300) && (servicabilityStatus != \"CityServiceQualifier\" || servicabilityStatus != \"IFCityServiceQualifier\")) {\r\n\t\t\t\t\tthis.setState({ inError: true });\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.setActiveCompletedSteps(initialStepSetup);\r\n\t\t\t\r\n\t\t\t\tthis.checkForCookiedAvailableDates();\r\n\t\t\t\tthis.adjustSummaryBoxState();\r\n\t\t\t\tthis.LoadLegacyLoading();\r\n\t\t\t}\r\n\t\t);\r\n }\r\n\r\n setActiveCompletedSteps = (initialSet = false) => {\r\n const steps = this.props.getQuoteFlowData.Steps;\r\n steps.map((step, stepIndex) => {\r\n this.setCompletedStep(step, stepIndex, initialSet);\r\n });\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n this.checkForInitialServicabilityValues();\r\n this.removeReduxFieldValuesHidddenByRules(prevProps);\r\n this.checkForServiceTypeChange(prevProps, prevState);\r\n this.setFormCookie();\r\n }\r\n\r\n checkForServiceTypeChange = (prevProps, prevState) => {\r\n const previousServiceType = prevProps.getQuoteFormValues.serviceType,\r\n currentServiceType = this.props.getQuoteFormValues.serviceType;\r\n\r\n if (typeof previousServiceType != \"undefined\" && previousServiceType != currentServiceType) {\r\n const steps = this.props.getQuoteFlowData.Steps,\r\n dateStepIsActive = this.activeSteps.indexOf(steps.findIndex(step => step.ID === \"datestep\")),\r\n contactInformationStepIsActive = this.activeSteps.indexOf(steps.findIndex(step => step.ID === \"contactinformationstep\"));\r\n let tempObj = {};\r\n\r\n switch (currentServiceType.toString()) {\r\n case \"1\":\r\n // if user changes to moving and Destination Zip isn't populated, put it in error state\r\n if (dateStepIsActive > -1 && !this.props.getQuoteFormValues.destinationZipCode) {\r\n this.setState({ manualErrors: { ...this.state.ManualErrors, destinationZipCode: true } })\r\n }\r\n this.props.getQuoteFormValues.originZipCode = this.props.getQuoteFormValues.destinationZipCode = null;\r\n break;\r\n case \"2\":\r\n // if user changes to storage and when step is active and Duration isn't populated, put it in error state.\r\n // if storage location step is active and location isn't populated, put it in error state\r\n if (dateStepIsActive > -1 && !this.props.getQuoteFormValues.duration) {\r\n tempObj.duration = true;\r\n }\r\n if (contactInformationStepIsActive > -1 && !this.props.getQuoteFormValues.storingLocation) {\r\n tempObj.storingLocation = true;\r\n }\r\n this.setState({ manualErrors: { ...this.state.ManualErrors, ...tempObj } });\r\n this.updateWarehouseStorageStatus();\r\n this.props.getQuoteFormValues.originZipCode = null;\r\n break;\r\n case \"3\":\r\n // if user changes to movingandstorage and Destination Zip isn't populated, put it in error state\r\n // if when step is active and Duration isn't populated, put it in error state.\r\n // if storage location step is active and location isn't populated, put it in error state\r\n if (dateStepIsActive > -1 && !this.props.getQuoteFormValues.destinationZipCode) {\r\n tempObj.destinationZipCode = true;\r\n }\r\n if (dateStepIsActive > -1 && !this.props.getQuoteFormValues.duration) {\r\n tempObj.duration = true;\r\n }\r\n if (contactInformationStepIsActive > -1 && !this.props.getQuoteFormValues.storingLocation) {\r\n tempObj.storingLocation = true;\r\n }\r\n this.setState({ manualErrors: { ...this.state.ManualErrors, ...tempObj } });\r\n this.updateWarehouseStorageStatus();\r\n this.props.getQuoteFormValues.originZipCode = this.props.getQuoteFormValues.destinationZipCode = null;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n checkForCookiedAvailableDates = () => {\r\n let cookiedAvailableDates = sessionStorage.getItem('pods-generalAvailabilityDates');\r\n if (cookiedAvailableDates) {\r\n this.props.setAvailabilityDates(JSON.parse(cookiedAvailableDates));\r\n }\r\n }\r\n\r\n checkForInitialServicabilityValues = () => {\r\n this.props.getServicabilityParams.map((key) => {\r\n if (this.props.getQuoteFormValues[key] && (this.props.getQuoteFormRegisteredFields[key] || key.toLowerCase().indexOf('city') > -1)) {\r\n if (this.props.getQuoteFormValues[key] !== null && typeof this.props.getQuoteFormValues[key] === 'object') {\r\n this.props.addAddressOptions(key, [{ \"Label\": `${this.props.getQuoteFormValues[key].City}, ${this.props.getQuoteFormValues[key].State}`, \"Value\": JSON.stringify(this.props.getQuoteFormValues[key]), \"Selected\": true }]);\r\n }\r\n }\r\n })\r\n }\r\n\r\n render() {\r\n if (Object.keys(this.props.getQuoteFlowData).length === 0) {\r\n return null;\r\n }\r\n\r\n let formProps = {};\r\n\r\n if (this.props.getQuoteFlowData.PostFormToUrl) {\r\n formProps = {\r\n action: this.props.getQuoteFlowData.FormSubmissionUrl,\r\n method: \"post\",\r\n onSubmit: this.handleFormSubmit\r\n };\r\n }\r\n\r\n const steps = this.props.getQuoteFlowData.Steps;\r\n\r\n return (\r\n \r\n
\r\n
\r\n
\r\n
\r\n {(this.state.busy) &&\r\n
\r\n
\r\n }\r\n
\r\n
\r\n )\r\n }\r\n\r\n renderSummary = (steps) => {\r\n const numberOfFieldsInError = Object.keys(this.props.getQuoteFormErrors).length;\r\n return (\r\n \r\n
\r\n
{this.props.getQuoteFlowData.SidebarHeader} \r\n \r\n \r\n
\r\n
\r\n
{this.props.getQuoteFlowData.SidebarHeader} \r\n
\r\n
\r\n
{this.props.getQuoteFlowData.GetQuote} \r\n
\r\n
\r\n )\r\n }\r\n\r\n renderSteps = (steps) => {\r\n return steps.map((step, index) => {\r\n let stepKey = step.Title ? step.Title.replace(/[^a-z0-9+]+/gi, '').toLowerCase() : `step${index}`;\r\n if (this.stepHasNoValidFields(step)) {\r\n return null;\r\n }\r\n return (\r\n \r\n );\r\n });\r\n }\r\n\r\n getQuoteFlowPercentageFinished = () => {\r\n if (Object.keys(this.props.getQuoteFormErrors).length === 0) {\r\n return '100%';\r\n }\r\n return `${Math.ceil(this.completedSteps.length / this.props.getQuoteFlowData.Steps.length * 100)}%`;\r\n }\r\n\r\n toggleSummaryBoxOpenState = () => {\r\n document.body.classList.toggle('quote-flow__summary-box-open');\r\n }\r\n\r\n setQuoteFlowFormFieldValue = (fieldName, value) => {\r\n this.props.setQuoteFlowFormFieldValue(fieldName, value);\r\n }\r\n\r\n zipCodeValidator = (zipCode) => {\r\n let zipRegex = new RegExp(this.props.getQuoteFlowData.ZipcodeValidationRegex);\r\n return (zipRegex.test(zipCode) && zipCode.length > 0);\r\n }\r\n\r\n emailValidator = (email) => {\r\n var emailRegex = /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\r\n if ($(\"input[name='emailAddress']\").hasClass(\"emailValidation\")){\r\n emailRegex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n }\r\n return (emailRegex.test(email) && email.length > 0);\r\n }\r\n\r\n handleFieldChange = (field, step, input, stepIndex) => {\r\n console.log(step.ID);\r\n this.userInteractionInitiated = true;\r\n if (input && input.InputType === \"radioLink\") {\r\n this.handleRedirect(field.value);\r\n }\r\n //AV - The logic for emailAddress below was only written because we couldn't find a better way to change the Hidden Field values with this codebase. Putting this logic\r\n //on the form submit resulted in the values not being saved before the user was redirected to the City Service Check Page. If you can find a better way to do this, please\r\n //feel free to refactor this approach.\r\n if (field && field.name && field.name == \"emailAddress\" && this.emailValidator(field.value)) {\r\n if (this.props.getQuoteFormValues.selectedDate != sessionStorage.getItem('selectedDate')) {\r\n var sevenFootDates = JSON.parse(sessionStorage.getItem('pods-sevenFootAvailabilityDates'));\r\n var twelveFootDates = JSON.parse(sessionStorage.getItem('pods-twelveFootAvailabilityDates'));\r\n var sixteenFootDates = JSON.parse(sessionStorage.getItem('pods-sixteenFootAvailabilityDates'));\r\n\r\n var selectedDateUTCValue = new Date(Date.UTC(new Date(this.props.getQuoteFormValues.selectedDate).getUTCFullYear(), new Date(this.props.getQuoteFormValues.selectedDate).getUTCMonth(), new Date(this.props.getQuoteFormValues.selectedDate).getUTCDate()));\r\n for (var i in sevenFootDates) {\r\n var checkedDateUTCValue = new Date(Date.UTC(new Date(sevenFootDates[i].Date).getUTCFullYear(), new Date(sevenFootDates[i].Date).getUTCMonth(), new Date(sevenFootDates[i].Date).getUTCDate()));\r\n if (checkedDateUTCValue.getTime() == selectedDateUTCValue.getTime()) {\r\n this.props.change(\"hdnSevenFootIsAvailable\", sevenFootDates[i].IsAvailable);\r\n break; //Exit the loop, we're done.\r\n }\r\n };\r\n for (var i in twelveFootDates) {\r\n var checkedDateUTCValue = new Date(Date.UTC(new Date(twelveFootDates[i].Date).getUTCFullYear(), new Date(twelveFootDates[i].Date).getUTCMonth(), new Date(twelveFootDates[i].Date).getUTCDate()));\r\n if (checkedDateUTCValue.getTime() == selectedDateUTCValue.getTime()) {\r\n this.props.change(\"hdnTwelveFootIsAvailable\", twelveFootDates[i].IsAvailable);\r\n break; //Exit the loop, we're done.\r\n }\r\n };\r\n for (var i in sixteenFootDates) {\r\n var checkedDateUTCValue = new Date(Date.UTC(new Date(sixteenFootDates[i].Date).getUTCFullYear(), new Date(sixteenFootDates[i].Date).getUTCMonth(), new Date(sixteenFootDates[i].Date).getUTCDate()));\r\n if (checkedDateUTCValue.getTime() == selectedDateUTCValue.getTime()) {\r\n this.props.change(\"hdnSixteenFootIsAvailable\", sixteenFootDates[i].IsAvailable);\r\n break; //Exit the loop, we're done.\r\n }\r\n };\r\n sessionStorage.setItem('selectedDate', this.props.getQuoteFormValues.selectedDate);\r\n }\r\n }\r\n\r\n if (field && field.name && field.name === \"serviceType\" && field.value == 2) {\r\n this.props.change('moveType', \"Basic\");\r\n }\r\n if (field && this.props.getServicabilityParams.indexOf(field.name) > -1) {\r\n this.handleServicabilityFieldChange(field, step);\r\n }\r\n if (field && field.name && field.name === \"pavedDriveway\") {\r\n this.setCityServiceRedirect();\r\n }\r\n if (step.ID !== \"locationstep\") {\r\n window.setTimeout(() => { this.setCompletedStep(step, stepIndex) }, 350);\r\n }\r\n\r\n if(step.ID == \"datestep\") {\r\n // JW:2021-06-02 - ADO:4706 - this code needed to be moved out to handleServicabilityResponse\r\n setTimeout(() => {\r\n var generalDates = JSON.parse(sessionStorage.getItem('pods-generalAvailabilityDates'));\r\n var selectedDateUTCValue = new Date(Date.UTC(new Date(this.props.getQuoteFormValues.selectedDate).getUTCFullYear(), new Date(this.props.getQuoteFormValues.selectedDate).getUTCMonth(), new Date(this.props.getQuoteFormValues.selectedDate).getUTCDate()));\r\n sessionStorage.setItem('pods-selectedDate', this.props.getQuoteFormValues.selectedDate);\r\n\r\n if (window.location.href.indexOf(\"/fr\") > -1 && (this.props.getQuoteFormValues.selectedDate_display != null)) {\r\n moment.locale('en');\r\n const selectedDate = moment(new Date(this.props.getQuoteFormValues.selectedDate));\r\n this.props.change('selectedDate', selectedDate.format('LL'));\r\n this.props.change('selectedDate_display', selectedDate.format('LL'));\r\n moment.locale('fr');\r\n }\r\n else if (this.props.getQuoteFormValues.selectedDate_display != null) {\r\n this.props.change('selectedDate', moment(new Date(this.props.getQuoteFormValues.selectedDate)).format('LL'));\r\n this.props.change('selectedDate_display', moment(new Date(this.props.getQuoteFormValues.selectedDate)).format('LL'));\r\n }\r\n\r\n for (var i in generalDates) {\r\n var checkedDateUTCValue = new Date(Date.UTC(new Date(generalDates[i].Date).getUTCFullYear(), new Date(generalDates[i].Date).getUTCMonth(), new Date(generalDates[i].Date).getUTCDate()));\r\n //RS: 2023-03-08 - Check for previous storage status, don't change it if the value was set by the postal code exception\r\n let warehouseStorageStatus = sessionStorage.getItem('pods-warehouseStorageStatus');\r\n if (checkedDateUTCValue.getTime() == selectedDateUTCValue.getTime()) {\r\n if ((generalDates[i].LocalSalesBlocked) || (warehouseStorageStatus == 1)) {\r\n sessionStorage.setItem('pods-warehouseStorageStatus', 1);\r\n }\r\n else if (warehouseStorageStatus == 2) {\r\n sessionStorage.setItem('pods-warehouseStorageStatus', 2);\r\n }\r\n else if ((warehouseStorageStatus == 3)) {\r\n sessionStorage.setItem('pods-warehouseStorageStatus', 3);\r\n }\r\n else {\r\n sessionStorage.setItem('pods-warehouseStorageStatus', 0);\r\n }\r\n this.updateWarehouseStorageStatus();\r\n break; //Exit the loop, we're done.\r\n }\r\n };\r\n }, 200);\r\n }\r\n }\r\n\r\n updateWarehouseStorageStatus = () => {\r\n const sessionStorageStatus = sessionStorage.getItem('pods-warehouseStorageStatus');\r\n const sessionStorageLabel = sessionStorage.getItem('NoStorageAvailableLabel');\r\n const warehouseStorageStatus = parseInt(sessionStorageStatus ? sessionStorageStatus : 0);\r\n const noStorageAvailableLabel = sessionStorageLabel ? sessionStorageLabel : \"\";\r\n const serviceType = parseInt(this.props.getQuoteFormValues.serviceType);\r\n\r\n /* JW:2021-06-02 - ADO:4706 - WarehouseStorageAvailable enum reference\r\n WarehouseStorageAvailable = 0,\r\n WarehouseStorageNotAvailableAtAll = 1,\r\n WarehouseStorageNotAvailableForStorageOnly = 2,\r\n WarehouseStorageNotAvailableForMovingAndStorageOnly = 3\r\n */\r\n switch (warehouseStorageStatus) {\r\n case 1:\r\n // JW:2021-06-02 - ADO:4706 - Disable storagecenter radio/label regardless of service type selected when storage status is WarehouseStorageNotAvailableAtAll\r\n this.setStorageCenterAvailable(false);\r\n break;\r\n case 2:\r\n // JW:2021-06-02 - ADO:4706 - Disable storagecenter radio/label if service type 'Storage' is selected when storage status is WarehouseStorageNotAvailableForStorageOnly\r\n if (serviceType == 2) {\r\n this.setStorageCenterAvailable(false);\r\n } else {\r\n this.setStorageCenterAvailable(true);\r\n }\r\n break;\r\n case 3:\r\n // JW:2021-06-02 - ADO:4706 - Disable storagecenter radio/label if service type 'Moving & Storage' is selected when storage status is WarehouseStorageNotAvailableForMovingAndStorageOnly\r\n if (serviceType == 3) {\r\n this.setStorageCenterAvailable(false);\r\n } else {\r\n this.setStorageCenterAvailable(true);\r\n }\r\n break;\r\n default:\r\n this.setStorageCenterAvailable(true);\r\n break;\r\n }\r\n }\r\n\r\n setStorageCenterAvailable = (isWarehouseStorageAvailable) => {\r\n const sessionStorageLabel = sessionStorage.getItem('NoStorageAvailableLabel');\r\n const noStorageAvailableLabel = sessionStorageLabel ? sessionStorageLabel : \"\";\r\n const storageCenterInput = document.getElementById('storagecenter'); // outer, actual input\r\n const storageCenterRadio = document.getElementById(\"STORAGECENTER\"); // inner, checkbox svg\r\n\r\n if (storageCenterInput && storageCenterRadio) {\r\n storageCenterInput.disabled = !isWarehouseStorageAvailable;\r\n\r\n if (isWarehouseStorageAvailable) {\r\n storageCenterRadio.classList.remove(\"disabled\");\r\n if(noStorageAvailableLabel.length)\r\n {\r\n storageCenterRadio.innerHTML = storageCenterRadio.innerHTML.replace(noStorageAvailableLabel, '').trim();\r\n }\r\n } else {\r\n const storingLocation = this.props.getQuoteFormValues.storingLocation;\r\n if (storingLocation !== undefined && storingLocation !== 'onsite') {\r\n // JW:2021-06-02 - ADO:4706 - only change it if it's been set by the user, otherwise it opens early\r\n this.props.change('storingLocation', \"onsite\");\r\n document.getElementById('storagecenter').checked = false;\r\n }\r\n storageCenterRadio.classList.add(\"disabled\");\r\n\r\n if (noStorageAvailableLabel.length && storageCenterRadio.innerHTML.indexOf(noStorageAvailableLabel) == -1) {\r\n storageCenterRadio.innerHTML += ' ' + noStorageAvailableLabel;\r\n }\r\n }\r\n }\r\n }\r\n\r\n addStepIndexToArray = (stepID, arrayToAddItTo) => {\r\n const steps = this.props.getQuoteFlowData.Steps,\r\n stepIndex = steps.findIndex(step => step.ID === stepID);\r\n if (typeof stepIndex !== 'undefined' && arrayToAddItTo.indexOf(stepIndex) === -1) {\r\n arrayToAddItTo.push(stepIndex);\r\n }\r\n }\r\n\r\n removeStepIndexFromArray = (stepID, arrayToRemoveItFrom) => {\r\n const steps = this.props.getQuoteFlowData.Steps,\r\n stepIndex = steps.findIndex(step => step.ID === stepID),\r\n indexToRemove = arrayToRemoveItFrom.indexOf(stepIndex);\r\n if (typeof stepIndex !== 'undefined' && indexToRemove > -1) {\r\n arrayToRemoveItFrom.splice(indexToRemove, 1);\r\n }\r\n }\r\n\r\n setCompletedStep = (step, stepIndex, initialSet = false) => {\r\n const steps = this.props.getQuoteFlowData.Steps;\r\n const wasStepAlreadyCompleted = this.completedSteps.indexOf(stepIndex);\r\n const stepIsCompleted = this.stepIsCompleted(step);\r\n switch (step.ID) {\r\n case \"quotetypestep\":\r\n if (this.props.getQuoteFormValues.quoteTypeLink) {\r\n this.addStepIndexToArray(\"quotetypestep\", this.completedSteps);\r\n this.addStepIndexToArray(\"servicetypestep\", this.activeSteps);\r\n }\r\n break;\r\n case \"servicetypestep\":\r\n if (this.props.getQuoteFormValues.serviceType) {\r\n const dateStepIsActive = this.completedSteps.indexOf(steps.findIndex(step => step.ID === \"datestep\"));\r\n\r\n this.addStepIndexToArray(\"servicetypestep\", this.completedSteps);\r\n this.addStepIndexToArray(\"locationstep\", this.activeSteps);\r\n if ((this.props.getQuoteFormValues.serviceType !== 1 && dateStepIsActive > -1) ||\r\n this.props.getQuoteFormValues.storingLocation\r\n ) {\r\n this.addStepIndexToArray(\"storagelocationstep\", this.activeSteps);\r\n }\r\n if (wasStepAlreadyCompleted == -1 && !initialSet) {\r\n this.scrollToNextActiveStep(steps.findIndex(step => step.ID === \"locationstep\"))\r\n }\r\n }\r\n break;\r\n case \"locationstep\":\r\n if (stepIsCompleted) {\r\n this.addStepIndexToArray(\"locationstep\", this.completedSteps);\r\n if (!this.state.inError) {\r\n this.addStepIndexToArray(\"datestep\", this.activeSteps);\r\n if (wasStepAlreadyCompleted == -1 && !initialSet) {\r\n this.scrollToNextActiveStep(steps.findIndex(step => step.ID === \"datestep\"))\r\n }\r\n }\r\n } else {\r\n this.removeStepIndexFromArray(\"locationstep\", this.completedSteps);\r\n }\r\n break;\r\n case \"datestep\":\r\n if (stepIsCompleted && !this.state.inError) {\r\n ;\r\n this.addStepIndexToArray(\"datestep\", this.completedSteps);\r\n let nextStepID = \"contactinformationstep\";\r\n\r\n if (this.props.getQuoteFormValues.serviceType != 1) {\r\n nextStepID = \"storagelocationstep\";\r\n }\r\n\r\n if (wasStepAlreadyCompleted == -1 && !initialSet && this.activeSteps.indexOf(steps.findIndex(step => step.ID === nextStepID)) == -1) {\r\n this.scrollToNextActiveStep(steps.findIndex(step => step.ID === nextStepID))\r\n }\r\n\r\n this.addStepIndexToArray(nextStepID, this.activeSteps);\r\n } else {\r\n if (this.state.inError) {\r\n this.removeStepIndexFromArray(\"datestep\", this.activeSteps);\r\n }\r\n if (!stepIsCompleted) {\r\n this.removeStepIndexFromArray(\"datestep\", this.completedSteps);\r\n }\r\n }\r\n break;\r\n case \"storagelocationstep\":\r\n if (this.props.getQuoteFormValues.storingLocation && !this.state.inError) {\r\n this.addStepIndexToArray(\"storagelocationstep\", this.completedSteps);\r\n if (wasStepAlreadyCompleted == -1 && !initialSet && this.activeSteps.indexOf(steps.findIndex(step => step.ID === \"contactinformationstep\")) == -1) {\r\n this.scrollToNextActiveStep(steps.findIndex(step => step.ID === \"contactinformationstep\"))\r\n }\r\n this.addStepIndexToArray(\"contactinformationstep\", this.activeSteps);\r\n } else if (this.state.inError) {\r\n this.removeStepIndexFromArray(\"storagelocationstep\", this.activeSteps);\r\n }\r\n break;\r\n case \"contactinformationstep\":\r\n if (stepIsCompleted && !this.state.inError) {\r\n this.addStepIndexToArray(\"contactinformationstep\", this.completedSteps);\r\n } else if (this.state.inError) {\r\n this.removeStepIndexFromArray(\"contactinformationstep\", this.activeSteps);\r\n }\r\n break;\r\n }\r\n\r\n this.props.setCompletedSteps(this.completedSteps, this.activeSteps);\r\n }\r\n\r\n fieldIsVisiblePopulatedAndNotInError = (input) => {\r\n return typeof this.props.getQuoteFormValues[input.Name] !== 'undefined' && this.props.getQuoteFormValues[input.Name] !== null && this.fieldIsVisible(input) && (!this.props.getQuoteFormErrors[input.Name] || input.InputType === \"radio\");\r\n }\r\n\r\n stepIsCompleted = (step) => {\r\n let stepIsCompleted = false;\r\n const numberOfRequiredVisibleFieldsInStep = step.Input.filter(input => this.fieldIsVisible(input) && input.Required).length;\r\n const numberOfCompletedRequiredFieldsInStep = step.Input.filter(input => this.fieldIsVisiblePopulatedAndNotInError(input) && input.Required).length;\r\n\r\n const numberOfVisibleFieldsInStep = step.Input.filter(input => this.fieldIsVisible(input)).length;\r\n const numberOfCompletedVisibleFieldsInStep = step.Input.filter(input => this.fieldIsVisiblePopulatedAndNotInError(input)).length;\r\n\r\n if ((numberOfRequiredVisibleFieldsInStep && numberOfRequiredVisibleFieldsInStep - numberOfCompletedRequiredFieldsInStep === 0) || (numberOfCompletedVisibleFieldsInStep === numberOfVisibleFieldsInStep)) {\r\n stepIsCompleted = true;\r\n }\r\n return stepIsCompleted;\r\n }\r\n\r\n getStepIndex = (stepToFind) => {\r\n if (stepToFind) {\r\n let stepIndex = null;\r\n this.props.getQuoteFlowData.Steps.map((step, index) => {\r\n if (step.Title === stepToFind.Title) {\r\n stepIndex = index;\r\n }\r\n });\r\n return stepIndex;\r\n }\r\n }\r\n\r\n getNextActiveStepAfterThisStep = (stepIndex) => {\r\n const steps = this.getVisibleSteps();\r\n for (let x = 0; x < steps.length; x++) {\r\n let actualStepIndex = this.getStepIndex(steps[x]);\r\n if (this.getStepVisibleFieldCount(steps[x]) > 0 && this.activeSteps.indexOf(actualStepIndex) === -1 && this.completedSteps.indexOf(this.getStepIndex(steps[x - 1])) > -1) {\r\n return actualStepIndex;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n getVisibleSteps = () => {\r\n return this.props.getQuoteFlowData.Steps.filter(step => step.Input.filter(input => input.HideWhen !== this.getQuoteFlowPath()).length > 0);\r\n }\r\n\r\n\r\n removeReduxFieldValuesHidddenByRules = (prevProps) => {\r\n // Some fields on the form are hidden based on the service type. If you're moving, thern there is a destination and origin zipcode, as an example.\r\n // In Redux Form, if a field is present on the form and filled out, the value will remain in state, even though the field is no longer registered\r\n // The upshot is, if a user does the following\r\n // 1. Chooses moving\r\n // 2. Fills out Origin and Destination Zip ZipCode\r\n // 3. Changes their mind and switches to just storage\r\n // Then Redux Form and React will automatically remove the destination zip code and destination city from the form, but the value of those fields will renderModalActionButton\r\n // Which is the long way of saying that this function manually removes the orphan values\r\n const quoteFormValues = this.props.getQuoteFormValues,\r\n quoteFormValuesKeys = Object.keys(quoteFormValues),\r\n registeredFields = this.props.getQuoteFormRegisteredFields,\r\n initialValues = this.props.getQuoteFormInitialValues;\r\n if (Object.keys(registeredFields).length > 0) {\r\n for (let i = 0; i < quoteFormValuesKeys.length; i++) {\r\n if (!registeredFields[quoteFormValuesKeys[i]] && quoteFormValues[quoteFormValuesKeys[i]]) {\r\n this.props.setQuoteFlowFormFieldValue(quoteFormValuesKeys[i], null);\r\n if (typeof this.props.getServicabilityParams[quoteFormValuesKeys[i]] !== 'undefined' && quoteFormValuesKeys[i].toLowerCase().indexOf('city')) {\r\n this.props.addAddressOptions(quoteFormValuesKeys[i], []);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n setBusyState = (makeBusy = true, callback = () => { }) => {\r\n this.setState({ busy: makeBusy }, () => {\r\n this.turnKeysOffOn(makeBusy);\r\n callback();\r\n });\r\n }\r\n\r\n turnFormFieldsOffOn = (makeBusy) => {\r\n for (let i = 0; i < document.forms[0].length; i++) {\r\n if (document.forms[0].elements[i].type !== 'submit') {\r\n document.forms[0].elements[i].disabled = makeBusy;\r\n }\r\n }\r\n }\r\n\r\n preventDefaultBehavior = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n return false;\r\n };\r\n\r\n\r\n turnKeysOffOn = (makeBusy) => {\r\n if (makeBusy) {\r\n document.addEventListener('keydown', this.preventDefaultBehavior);\r\n } else {\r\n document.removeEventListener('keydown', this.preventDefaultBehavior);\r\n }\r\n }\r\n\r\n servicabilityCheck = (field, step) => {\r\n this.setChangedParam(field.name);\r\n this.setState({ inError: false }, () => {\r\n this.setState({ startOfMonth: moment() }, () => {\r\n window.focus();\r\n this.setBusyState(true);\r\n let paramValue = field.value;\r\n if ((typeof paramValue === \"object\") && (paramValue !== null)) {\r\n paramValue = JSON.parse(paramValue);\r\n }\r\n window.setTimeout(() => {\r\n this.props.postData(this.getServicabilityValues(), step.ServiceUrl, field.name).then((response) => {\r\n if (response.status === 200) {\r\n this.handleServicabilityResponse(response.data, step);\r\n } else {\r\n this.setBusyState(false, () => {\r\n console.log(response);\r\n // handle error response\r\n });\r\n }\r\n });\r\n }, 200);\r\n });\r\n });\r\n }\r\n\r\n getServicabilityValues = (ReferenceDate = null) => {\r\n let servicabilityValues = {\r\n serviceType: this.props.getQuoteFormValues.serviceType,\r\n QuoteFlowDatasourceId: this.props.getQuoteFormValues.quoteFlowDatasourceId\r\n };\r\n\r\n this.props.getServicabilityParams.forEach((paramName) => {\r\n if (paramName !== \"ReferenceDate\") {\r\n servicabilityValues[paramName] = this.props.getQuoteFormErrors[paramName] ? null : this.props.getQuoteFormValues[paramName];\r\n } else {\r\n if (ReferenceDate) {\r\n servicabilityValues[paramName] = ReferenceDate\r\n } else {\r\n let currentlySelectedDate = this.props.getQuoteFormValues.selectedDate;\r\n if (currentlySelectedDate) {\r\n servicabilityValues[paramName] = moment(currentlySelectedDate).startOf('month').format('YYYY-MM-DD');\r\n } else {\r\n servicabilityValues[paramName] = moment().add(1, 'days').format(\"YYYY-MM-DD\");\r\n }\r\n }\r\n }\r\n });\r\n if (servicabilityValues.destinationZipCode && !servicabilityValues.originZipCode) {\r\n servicabilityValues.originZipCode = servicabilityValues.destinationZipCode;\r\n }\r\n try { servicabilityValues.originCity = JSON.parse(servicabilityValues.originCity); } catch (e) { }\r\n try { servicabilityValues.destinationCity = JSON.parse(servicabilityValues.destinationCity); } catch (e) { }\r\n //RS: 2022-04-28 - ADO 6392 - Return Cloud API toggle\r\n var UseCloudAPI = $(\"input[name='UseCloudAPI']\").val();\r\n servicabilityValues.UseCloudAPI = UseCloudAPI;\r\n servicabilityValues.CustomerType = this.props.getQuoteFormValues.quoteType;\r\n return servicabilityValues;\r\n }\r\n\r\n\r\n setChangedParam = (param) => {\r\n this.setState({ servicabilityParamChanged: param });\r\n }\r\n\r\n handleServicabilityFieldChange = (field, step) => {\r\n if (this.isZipCodeField(field) && !this.zipCodeValidator(field.value)) {\r\n let correspondingCityField = `${this.getZipPrefix(field.name)}City`;\r\n this.clearCity(correspondingCityField);\r\n } else {\r\n var origionZip = this.props.getQuoteFormValues.originZipCode;\r\n var destinationZip = this.props.getQuoteFormValues.destinationZipCode;\r\n if(field.name == \"destinationZipCode\"){\r\n destinationZip = field.value;\r\n }\r\n else if(field.name == \"originZipCode\"){\r\n origionZip = field.value;\r\n }\r\n if(this.props.getQuoteFormValues.serviceType == \"2\" || ((this.props.getQuoteFormValues.serviceType == \"1\" || this.props.getQuoteFormValues.serviceType == \"3\") && this.zipCodeValidator(origionZip) && this.zipCodeValidator(destinationZip))) {\r\n this.servicabilityCheck(field, step);\r\n console.log(\"Serviceability field change\")\r\n }\r\n }\r\n sessionStorage.setItem('zip-code-trigger', field.value);\r\n }\r\n\r\n clearCity = (cityName) => {\r\n this.props.change(cityName, null);\r\n this.props.addAddressOptions(cityName, []);\r\n }\r\n\r\n getCityFieldBasedOnZipField = (zipField) => {\r\n return this.getZipPrefix(zipField) + \"City\";\r\n }\r\n\r\n handleMonthChange = (monthBeingViewed, step) => {\r\n window.focus();\r\n this.setChangedParam('ReferenceDate');\r\n this.setBusyState(true);\r\n this.setState({ startOfMonth: monthBeingViewed.startOf('month') }, () => {\r\n $('.react-datepicker__navigation').attr(\"disabled\", \"disabled\");\r\n $(\".react-datepicker__month\").hide();\r\n $('.react-datepicker__month').after(\"
Loading... \");\r\n this.props.postData(this.getServicabilityValues(this.state.startOfMonth.format('YYYY-MM-DD')), step.ServiceUrl, 'ReferenceDate').then((response) => {\r\n $(\"#loadingTBody\").remove();\r\n $(\".react-datepicker__month\").show();\r\n $('.react-datepicker__navigation').removeAttr(\"disabled\");\r\n if (response.status === 200) {\r\n this.handleServicabilityResponse(response.data);\r\n } else {\r\n this.setBusyState(false, () => {\r\n console.log(response);\r\n // handle error response\r\n });\r\n }\r\n });\r\n });\r\n }\r\n\r\n getReturnedErrorValue = (servicabilityResponse) => {\r\n let paramChanged = this.getZipPrefix(this.state.servicabilityParamChanged);\r\n paramChanged = paramChanged.charAt(0).toUpperCase() + paramChanged.slice(1);\r\n if (servicabilityResponse.Status != \"AreaOutage\") {\r\n if (servicabilityResponse.Status == \"BadZip\") {\r\n // RS 2022-06-01 ADO ADO 6865 - Translate invalid zip error\r\n return i18n.t('InvalidZip')\r\n }\r\n else {\r\n if (servicabilityResponse[paramChanged].Value && servicabilityResponse[paramChanged].Value.length) {\r\n return JSON.parse(servicabilityResponse[paramChanged].Value[0].Value);\r\n }\r\n }\r\n }\r\n }\r\n\r\n //This is where the servicability is handled when it comes back in\r\n handleServicabilityResponse = (servicabilityResponse, step = null) => {\r\n // Clear the redirectURL session value each time\r\n sessionStorage.removeItem('pods-quoteflow-redirectURL');\r\n console.log(servicabilityResponse);\r\n servicabilityResponse = this.setMoveType(servicabilityResponse);\r\n sessionStorage.setItem('pods-warehouse-storage-status', servicabilityResponse.WarehouseStorageStatus);\r\n sessionStorage.setItem('pods-quoteflow-status', servicabilityResponse.Status);\r\n sessionStorage.setItem('pods-quoteflow-status-code', servicabilityResponse.StatusCode);\r\n //RS: 2022-04-28 - ADO 6392 - Enabling the redirect option so the user isn't stuck\r\n var pavedDriveway = document.querySelector('.pavedDriveway');\r\n if (!pavedDriveway.classList.contains('d-none')){\r\n $('.pavedDriveway').addClass('d-none');\r\n }\r\n //RS: 2023-04-05 - Direct to french pages for get a quote\r\n if (servicabilityResponse.StatusCode == 200 && (window.location.href.indexOf(\"/fr\") > -1)) {\r\n document.forms[0].action = \"/fr/booking\";\r\n }\r\n else if (servicabilityResponse.StatusCode == 200 ) {\r\n document.forms[0].action = \"/booking\";\r\n }\r\n //RS: 2023-04-05 - Direct to french pages for get a quote\r\n var redirectURL = (window.location.href.indexOf(\"/fr\") > -1) && servicabilityResponse.RedirectURL != null ? \"/fr\" + servicabilityResponse.RedirectURL : servicabilityResponse.RedirectURL;\r\n\r\n if (redirectURL && servicabilityResponse.StatusCode == 201)\r\n {\r\n sessionStorage.setItem('pods-quoteflow-redirectURL', redirectURL);\r\n }\r\n\r\n if ((servicabilityResponse.StatusCode >= 200 && servicabilityResponse.StatusCode < 300)) {\r\n this.setState({ inError: false }, () => {\r\n if (servicabilityResponse.GeneralAvailabilityDates) {\r\n this.props.setAvailabilityDates(servicabilityResponse.GeneralAvailabilityDates).then(() => {\r\n this.checkForInvalidSelectedDate();\r\n });\r\n sessionStorage.setItem('pods-generalAvailabilityDates', JSON.stringify(servicabilityResponse.GeneralAvailabilityDates));\r\n sessionStorage.setItem('pods-sevenFootAvailabilityDates', JSON.stringify(servicabilityResponse.SevenFootContainerAvailabilityDates));\r\n sessionStorage.setItem('pods-twelveFootAvailabilityDates', JSON.stringify(servicabilityResponse.TwelveFootContainerAvailabilityDates));\r\n sessionStorage.setItem('pods-sixteenFootAvailabilityDates', JSON.stringify(servicabilityResponse.SixteenFootContainerAvailabilityDates));\r\n sessionStorage.setItem('pods-warehouseStorageStatus', JSON.stringify(servicabilityResponse.WarehouseStorageStatus));\r\n }\r\n this.updateCityFormValues(servicabilityResponse);\r\n this.setBusyState(false, () => {\r\n this.setChangedParam(null);\r\n if (step) {\r\n const stepIndex = this.getStepIndex(step);\r\n window.setTimeout(this.setActiveCompletedSteps, 1000);\r\n }\r\n });\r\n this.updateWarehouseStorageStatus();\r\n });\r\n }\r\n //City Service Qualifier\r\n else if ((servicabilityResponse.Status == \"CityServiceQualifier\" || servicabilityResponse.Status == \"IFCityServiceQualifier\")){\r\n sessionStorage.setItem('pods-quoteflow-redirectURL', redirectURL);\r\n $('.pavedDriveway.d-none').removeClass('d-none');\r\n\r\n var originZip = document.querySelector('.quote-flow__text-field-originZipCode label').innerText;\r\n $('.pavedDriveway legend').html($('.pavedDriveway legend').html().replace(\"{Zip}\",\"\"+originZip+\" \"));\r\n if (document.querySelector('.quote-flow__text-field-destinationZipCode input') != null && document.querySelector('.quote-flow__text-field-destinationZipCode input').value) {\r\n var destinationZip = originZip + \" & \" + document.querySelector('.quote-flow__text-field-destinationZipCode label').innerText;\r\n console.log('destinationZip', destinationZip);\r\n $('#zip').text(destinationZip);\r\n }\r\n if (servicabilityResponse.Status == \"IFCityServiceQualifier\"){\r\n //RS 2023-02-15 - Set Session Storage with after hours url\r\n if (servicabilityResponse.IFAfterHoursURL != null) {\r\n sessionStorage.setItem('IF_FallbackURL', servicabilityResponse.IFAfterHoursURL);\r\n }\r\n else {\r\n sessionStorage.setItem('IF_FallbackURL', '/quote/long-distance-moves');\r\n }\r\n console.log(sessionStorage.getItem('IF_FallbackURL'));\r\n sessionStorage.setItem('IF_PostURL', \"\");\r\n document.forms[0].action = redirectURL;\r\n }\r\n else {\r\n sessionStorage.removeItem('IF_PostURL');\r\n document.forms[0].action = redirectURL;\r\n }\r\n this.setCityServiceRedirect();\r\n this.setState({ inError: false }, () => {\r\n if (servicabilityResponse.GeneralAvailabilityDates) {\r\n this.props.setAvailabilityDates(servicabilityResponse.GeneralAvailabilityDates).then(() => {\r\n this.checkForInvalidSelectedDate();\r\n });\r\n sessionStorage.setItem('pods-generalAvailabilityDates', JSON.stringify(servicabilityResponse.GeneralAvailabilityDates));\r\n sessionStorage.setItem('pods-sevenFootAvailabilityDates', JSON.stringify(servicabilityResponse.SevenFootContainerAvailabilityDates));\r\n sessionStorage.setItem('pods-twelveFootAvailabilityDates', JSON.stringify(servicabilityResponse.TwelveFootContainerAvailabilityDates));\r\n sessionStorage.setItem('pods-sixteenFootAvailabilityDates', JSON.stringify(servicabilityResponse.SixteenFootContainerAvailabilityDates));\r\n sessionStorage.setItem('pods-warehouseStorageStatus', JSON.stringify(servicabilityResponse.WarehouseStorageStatus));\r\n }\r\n this.updateCityFormValues(servicabilityResponse);\r\n this.setBusyState(false, () => {\r\n this.setChangedParam(null);\r\n if (step) {\r\n const stepIndex = this.getStepIndex(step);\r\n window.setTimeout(this.setActiveCompletedSteps, 1000);\r\n }\r\n });\r\n this.updateWarehouseStorageStatus();\r\n });\r\n }\r\n else if (servicabilityResponse.StatusCode == 500) {\r\n if(servicabilityResponse.Status == \"Maintenance\"){\r\n window.location.href = servicabilityResponse.RedirectURL;\r\n }\r\n else{\r\n const returnedErrorValue = this.getReturnedErrorValue(servicabilityResponse);\r\n this.gaSubmissionTracking(servicabilityResponse.Status);\r\n this.setState({ inError: true }, () => {\r\n this.clearCity(this.getCityFieldBasedOnZipField(this.state.servicabilityParamChanged));\r\n this.setBusyState(false, () => {\r\n this.props.change(this.state.servicabilityParamChanged, null);\r\n this.setChangedParam(null);\r\n let errorModal = servicabilityResponse.ErrorModal;\r\n this.props.setErrorModal(errorModal).then(() => {\r\n this.updateErrorModal(true, returnedErrorValue);\r\n this.checkForInvalidSelectedDate(true);\r\n this.setActiveCompletedSteps();\r\n });\r\n });\r\n });\r\n }\r\n } else {\r\n const returnedErrorValue = this.getReturnedErrorValue(servicabilityResponse);\r\n this.setState({ inError: true }, () => {\r\n this.setBusyState(false, () => {\r\n this.props.change(this.state.servicabilityParamChanged, null);\r\n this.setChangedParam(null);\r\n this.props.setErrorModal(this.props.getQuoteFlowData.GeneralErrorModal).then(() => {\r\n this.updateErrorModal(true, returnedErrorValue);\r\n this.setActiveCompletedSteps();\r\n });\r\n });\r\n });\r\n }\r\n }\r\n\r\n checkForInvalidSelectedDate = (removeDate = false) => {\r\n if (this.props.getQuoteFormValues.selectedDate) {\r\n const selectedDateIsInvalid = this.props.getQuoteFlowData.availabilityDates.find(availabilityDate => moment(availabilityDate).format('YYYY-MM-DD') === moment(this.props.getQuoteFormValues.selectedDate).format('YYYY-MM-DD'));\r\n if (selectedDateIsInvalid || removeDate) {\r\n this.props.change('selectedDate', null);\r\n this.props.change('selectedDate_display', null);\r\n }\r\n }\r\n }\r\n\r\n setMoveType = (details) => {\r\n if (details.Status && details.Status.includes(\"IF\")) {\r\n this.props.change('moveType', \"IF\");\r\n sessionStorage.setItem('IF_PostURL', details.RedirectURL);\r\n details.RedirectURL = \"\";\r\n }\r\n switch (details.Status) {\r\n case \"IFMove\":\r\n break;\r\n case \"IFPriceDisplay\":\r\n case \"IFNoPrice\":\r\n case \"IFLP\":\r\n case \"IFNBF\":\r\n case \"IFCityServiceQualifier\":\r\n if (this.isThisaCommercialQuote()) {\r\n break;\r\n }\r\n this.props.change('moveType', \"IFNP\");\r\n break;\r\n case \"IFCommercialMove\":\r\n if (this.isThisaCommercialQuote()) {\r\n this.props.change('moveType', \"COMMIF\");\r\n\r\n this.props.getBookingFlowSettings().then((response) => {\r\n sessionStorage.setItem('IF_CommercialReloPostURL', response.data.CommercialReloIFPriceDisplay.ContainerSelectorURL);\r\n sessionStorage.setItem('IFPriceDisplay_CommercialReloCodes', response.data.CommercialReloIFPriceDisplay.ReloPromos);\r\n });\r\n break;\r\n }\r\n default:\r\n this.props.change('moveType', \"Basic\");\r\n }\r\n\r\n return details;\r\n }\r\n\r\n updateErrorModal = (isInError, returnedErrorValue) => {\r\n // Note that this is returning markup as a string and not as JSX. That's on purpose because it's using the non-react modal object\r\n if (this.props.getQuoteFlowData.errorModal) {\r\n const { errorModal } = this.props.getQuoteFlowData;\r\n const zipCodeTrigger = sessionStorage.getItem('zip-code-trigger');\r\n const responseStatus = sessionStorage.getItem('pods-quoteflow-status');\r\n\r\n const modalMarkup = ``;\r\n document.activeElement.blur();\r\n window.setTimeout(() => {\r\n if (window.podsPage === undefined) {\r\n console.log('window.podsPage is undefined');\r\n return;\r\n }\r\n\r\n // adding slight delay to allow dom to catch up and actually blur the active element, to remove annoying chrome issue where autocomplete option is higher z-index than modal\r\n window.podsPage.modal.populateContentModalWithMarkup(modalMarkup);\r\n }, 50);\r\n }\r\n }\r\n\r\n renderModalHeading = (errorModal, responseStatus, returnedErrorValue, modalZip) => {\r\n let headingString = '';\r\n if (responseStatus == \"AreaOutage\") {\r\n headingString = `${errorModal.Header} `;\r\n } else {\r\n headingString = `${errorModal.Header} `;\r\n //RS-2022-05-06-ADO:6542-Add Bad Zip response to only return the zip code\r\n if (responseStatus == \"BadZip\") {\r\n headingString += `${modalZip} `;\r\n }\r\n else if (returnedErrorValue) {\r\n headingString += `${returnedErrorValue.City + \", \" + returnedErrorValue.State + \" \" + modalZip} `;\r\n }\r\n else {\r\n headingString += `${modalZip} `;\r\n }\r\n }\r\n return headingString;\r\n }\r\n\r\n renderPhoneNumber = (errorModal) => {\r\n // Note that this is returning a string and NOT JSX. That's on purpose\r\n let phoneNumberString = '';\r\n if (errorModal.PhoneNumberText) {\r\n phoneNumberString = `${errorModal.PhoneNumberText}`;\r\n }\r\n if (errorModal.PhoneNumberValue) {\r\n phoneNumberString = `${phoneNumberString} `;\r\n }\r\n if (errorModal.Or && errorModal.PhoneNumberText && errorModal.ActionUrl) {\r\n phoneNumberString = `${errorModal.Or}
${phoneNumberString}`;\r\n }\r\n return phoneNumberString;\r\n }\r\n\r\n renderModalActionButton = (errorModal) => {\r\n // Note that this is returning a string and NOT JSX. That's on purpose\r\n if (errorModal.ActionUrl) {\r\n return `\r\n \r\n `;\r\n }\r\n return '';\r\n }\r\n\r\n renderCancelText = (errorModal) => {\r\n // Note that this is returning a string and NOT JSX. That's on purpose\r\n if (errorModal.CancelLabel) {\r\n return `\r\n \r\n ${errorModal.CancelLabel}\r\n
\r\n `;\r\n }\r\n return '';\r\n }\r\n // This is where the content changes to grab new information\r\n updateCityFormValues = (response) => {\r\n if (this.state.servicabilityParamChanged === \"originZipCode\" || this.props.getQuoteFormValues.serviceType == \"1\" || this.props.getQuoteFormValues.serviceType == \"3\") {\r\n if (response.Origin.Value && response.Origin.Value.length === 1) {\r\n const OriginCity = JSON.parse(response.Origin.Value[0].Value);\r\n if (this.shouldCityParamBeUpdated('originCity', OriginCity)) {\r\n this.props.change('originCity', OriginCity || {});\r\n }\r\n }\r\n }\r\n if (this.state.servicabilityParamChanged === \"destinationZipCode\"|| this.props.getQuoteFormValues.serviceType == \"1\" || this.props.getQuoteFormValues.serviceType == \"3\") {\r\n if (response.Destination.Value && response.Destination.Value.length === 1) {\r\n const DestinationCity = JSON.parse(response.Destination.Value[0].Value);\r\n if (this.shouldCityParamBeUpdated('destinationCity', DestinationCity)) {\r\n this.props.change('destinationCity', DestinationCity || {});\r\n }\r\n }\r\n }\r\n }\r\n\r\n shouldCityParamBeUpdated = (cityType, city) => {\r\n if (!this.props.getQuoteFormValues[cityType] ||\r\n Object.keys(this.props.getQuoteFormValues[cityType]).length === 0 ||\r\n (this.props.getQuoteFormValues[cityType].City && this.props.getQuoteFormValues[cityType].City !== city.City)\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n getZipPrefix = (zipString) => {\r\n return zipString.substr(0, zipString.indexOf('ZipCode'));\r\n }\r\n\r\n isZipCodeField = (field) => {\r\n return field.name.toLowerCase().indexOf('zipcode') > -1;\r\n }\r\n\r\n isDefaultPromoCodeSet = () => {\r\n if (this.props.getQuoteFlowData.DefaultPromoCode && this.props.getQuoteFlowData.DefaultPromoCode.length > 0) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n isSpecialIF = () => {\r\n if (this.props.getQuoteFormValues.moveType == \"IFPD\" || this.props.getQuoteFormValues.moveType == \"IFNP\") {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n isThisaCommercialQuote = () => {\r\n if (this.props.getQuoteFlowData.QuoteType && this.props.getQuoteFlowData.QuoteType.toLowerCase() === \"commercial\") {\r\n return true;\r\n }\r\n return false;\r\n }\r\n //RS 2022-12-7 - City Service redirect in case they choose YES\r\n setCityServiceRedirect = () => {\r\n var selectedValue = $('input[name=pavedDriveway]').is(\":checked\") ? document.querySelector('input[name=pavedDriveway]:checked').value : \"no\";\r\n var serviceType = sessionStorage.getItem('pods-quoteflow-status');\r\n if (selectedValue.toUpperCase() == \"YES\"){\r\n //RS 2023-02-15 - Update to use the fallback if it exists, if it doesn't, route to the long distance moves page\r\n if (serviceType == \"IFCityServiceQualifier\"){\r\n console.log(\"city service redirect\");\r\n sessionStorage.setItem('IF_PostURL', sessionStorage.getItem('IF_FallbackURL'));\r\n document.forms[0].action = sessionStorage.getItem('IF_PostURL');\r\n sessionStorage.removeItem('pods-quoteflow-redirectURL');\r\n }\r\n else\r\n {\r\n sessionStorage.removeItem('IF_PostURL');\r\n document.forms[0].action = '/booking';\r\n sessionStorage.removeItem('pods-quoteflow-redirectURL');\r\n }\r\n }\r\n else {\r\n sessionStorage.setItem('IF_PostURL', \"/city-service-moves\");\r\n sessionStorage.setItem('pods-quoteflow-redirectURL', \"/city-service-moves\");\r\n }\r\n }\r\n handleFormSubmit = (e) => {\r\n this.gaSubmissionTracking(this.getSubmissionType());\r\n\r\n // CALL SALESFORCE API HERE\r\n this.props.getQuoteFormValues.selectedDate_display = sessionStorage.getItem('pods-selectedDate');\r\n this.props.postSalesforceLeadData(this.props.getQuoteFormValues.quoteType, this.props.getQuoteFormValues);\r\n\r\n if (sessionStorage.getItem('pods-quoteflow-redirectURL')) {\r\n e.preventDefault();\r\n window.location.href = sessionStorage.getItem('pods-quoteflow-redirectURL');\r\n }\r\n sessionStorage.setItem('quoteInfo', JSON.stringify(this.props.getQuoteFormValues));\r\n\r\n var currentPromo = this.props.getQuoteFormValues.promotionCode;\r\n var storageDuration = this.props.getQuoteFormValues.duration;\r\n if ((currentPromo && currentPromo.length > 0 || storageDuration >= 3) && this.isSpecialIF()) {\r\n this.props.change('moveType', \"IF\");\r\n }\r\n if ((this.props.getQuoteFormValues.moveType == \"IFPD\" || this.props.getQuoteFormValues.moveType == \"IFNP\"\r\n || this.props.getQuoteFormValues.moveType == \"IF\" || this.props.getQuoteFormValues.moveType == \"COMMIF\")\r\n && (sessionStorage.getItem('IF_PostURL') != null)) {\r\n\r\n document.forms[0].action = sessionStorage.getItem('IF_PostURL');\r\n\r\n if (this.props.getQuoteFormValues.moveType == \"COMMIF\") {\r\n if (currentPromo && currentPromo.length > 0) {\r\n var reloArray = sessionStorage.getItem('IFPriceDisplay_CommercialReloCodes').toLowerCase().split('|');\r\n var postURL = sessionStorage.getItem('IF_CommercialReloPostURL');\r\n\r\n if (postURL != null) {\r\n if (reloArray.includes(currentPromo.toLowerCase())) {\r\n document.forms[0].action = postURL;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n var originCity = $(\"select[name='originCity']\").val();\r\n var origionObj = JSON.parse(originCity);\r\n\r\n var dataLayerObj = {\r\n 'event': 'checkout',\r\n 'ecommerce': {\r\n 'checkout': {\r\n 'actionField': {\r\n 'option': 'Quote',\r\n 'step': '1'\r\n },\r\n 'products': [{\r\n 'category': $(\"input[name='quoteTypeLink']:checked\").parent().find('.radio-input-inner').text() == \"Business\" ? \"Commercial\" : \"Residential\",\r\n 'subcategory': $(\"input[name='serviceType']:checked\").parent().find('.radio-input-inner').text().replace(\"&\", \"and\"),\r\n 'currency': 'USD',\r\n 'dimension9': origionObj.FranchiseeId,\r\n 'dimension10': $(\"select[name='duration']\").val(),\r\n 'id': 'placeholder', //required value\r\n 'name': 'placeholder', //required value\r\n 'promoCodeEntered': $(\"input[name='promotionCode']\").val(),\r\n 'promoCodeApplied': $(\"input[name='promotionCode']\").val(),\r\n 'storingLocation': $(\"input[name='storingLocation']:checked\").parent().find('.radio-input-inner').text(),\r\n 'originZip': $(\"input[name='originZipCode']\").val(),\r\n 'destinationZip': $(\"input[name='destinationZipCode']\").val(),\r\n 'url': window.location.href.split('?')[0],\r\n 'variant': 'Local'\r\n }]\r\n }\r\n }\r\n };\r\n dataLayer.push(dataLayerObj);\r\n localStorage.setItem(\"dataLayer\", JSON.stringify(dataLayerObj));\r\n\r\n return this.submitToBooking();\r\n }\r\n\r\n submitToBooking = () => {\r\n this.postToLivePerson(this.props.getQuoteFormInitialValues[\"moveType\"], this.props.getQuoteFormValues[\"emailAddress\"]);\r\n this.ajaxPostForm(this.props.getQuoteFormValues, false);\r\n return true;\r\n }\r\n\r\n postToLivePerson = (moveType, emailAddress) => {\r\n if (moveType == \"IF\") {\r\n lpTag.sdes.push(\r\n {\r\n type: \"personal\",\r\n personal: {\r\n firstname: \"N/A\",\r\n lastname: \"N/A\",\r\n age: { age: 0, year: 0, month: 0, day: 0 },\r\n contacts: [{ email: emailAddress, phone: \"N/A\" }],\r\n gender: \"\",\r\n language: \"\",\r\n company: \"\"\r\n }\r\n }\r\n )\r\n }\r\n else {\r\n //Do nothing with LivePerson\r\n };\r\n }\r\n\r\n setLoadingOnOff = (loading = true) => {\r\n let startAnimating = false;\r\n if (loading) {\r\n startAnimating = true;\r\n }\r\n this.setState({ loading, startAnimating });\r\n }\r\n\r\n LoadLegacyLoading = () => {\r\n if(this.props.getQuoteFlowData.LoadingValues.LoadingScreenScript != null && this.props.getQuoteFlowData.LoadingValues.LoadingScreenScript != ''){\r\n const script = document.createElement('script');\r\n script.src = this.props.getQuoteFlowData.LoadingValues.LoadingScreenScript;\r\n document.head.appendChild(script);\r\n }\r\n }\r\n\r\n ajaxPostForm = (formValues) => {\r\n let url = this.props.getQuoteFlowData.Steps[this.props.getQuoteFlowData.Steps.length - 1].ServiceUrl;\r\n let getPricePostParams = this.getPriceParams(formValues);\r\n let THIS = this;\r\n\r\n this.setState({ loading: true }, () => {\r\n window.scroll(0, 0);\r\n document.body.style.overflow = 'hidden';\r\n axios.post(url, getPricePostParams, {\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).then((response) => {\r\n //TODO: Are we going to do anything with positive responses from GetPrice?\r\n })\r\n .catch(function (error) {\r\n if (redirectAfter) {\r\n THIS.setState({ loading: false }, () => {\r\n document.body.removeAttribute('style');\r\n THIS.props.setErrorModal(THIS.props.getQuoteFlowData.GeneralErrorModal).then(() => {\r\n THIS.updateErrorModal(false);\r\n });\r\n });\r\n }\r\n });\r\n });\r\n }\r\n\r\n getPriceParams = (formValues) => {\r\n let params = {};\r\n Object.keys(formValues).map((key) => {\r\n params[key] = formValues[key];\r\n });\r\n\r\n // Manually adding key values until the form data matches the post data\r\n params.selectedDate = formValues.startDate || formValues.selectedDate;\r\n params.promotionCode = formValues.promoCode || formValues.promotionCode;\r\n params.duration = formValues.timeFrame || formValues.duration;\r\n params.queryStringValues = this.getGetPriceQueryStringValues();\r\n\r\n try { params.originCity = JSON.parse(params.originCity); } catch (e) { }\r\n try { params.destinationCity = JSON.parse(params.destinationCity); } catch (e) { }\r\n\r\n return params;\r\n }\r\n\r\n getGetPriceQueryStringValues = () => {\r\n //this.props.getQuoteFlowData.queryStringKeys are currently being hardcoded in the reducer but ideally these would come from the initial form endpoint\r\n let queryStringValues = [];\r\n this.props.getQuoteFlowData.queryStringKeys.map((key) => {\r\n if (getURLParam(key)) {\r\n queryStringValues.push({ [key]: getURLParam(key) });\r\n }\r\n });\r\n return queryStringValues;\r\n }\r\n\r\n getQuoteFlowPath = () => {\r\n return this.props.getQuoteFormValues.serviceType || '1';\r\n }\r\n\r\n isStepActive = (step) => {\r\n if (step.active) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n getActiveStepClass = (step) => {\r\n if (this.isStepActive(step)) {\r\n return 'active';\r\n } else {\r\n return '';\r\n }\r\n }\r\n\r\n getOffset = (el) => {\r\n el = el.getBoundingClientRect();\r\n return {\r\n left: el.left + window.scrollX,\r\n top: el.top + (window.scrollY || pageYOffset)\r\n }\r\n }\r\n\r\n scrollToNextActiveStep = (stepIndex, callback) => {\r\n const activeStep = document.querySelector(`.quoteFlowStep${stepIndex}`);\r\n this.scrollTo(document.documentElement, this.getOffset(activeStep).top - 100, 300, callback);\r\n }\r\n\r\n scrollTo = (element, to = 10000, duration = 1000, callback) => {\r\n const start = element.scrollTop;\r\n const change = to - start;\r\n const increment = 20;\r\n let currentTime = 0;\r\n\r\n const animateScroll = (() => {\r\n currentTime += increment;\r\n\r\n const val = this.easeInOutQuad(currentTime, start, change, duration);\r\n\r\n element.scrollTop = val;\r\n\r\n if (currentTime < duration) {\r\n setTimeout(animateScroll, increment);\r\n } else {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n });\r\n\r\n animateScroll();\r\n };\r\n\r\n easeInOutQuad = (t, b, c, d) => {\r\n t /= d / 2;\r\n if (t < 1) return c / 2 * t * t + b;\r\n t--;\r\n return -c / 2 * (t * (t - 2) - 1) + b;\r\n }\r\n\r\n fieldIsVisible = (option) => {\r\n if ((option.InputType && option.InputType.toLowerCase() !== \"hidden\") && option.HideWhen !== this.getQuoteFlowPath()) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n getStepVisibleFieldCount = (step) => {\r\n return step.Input.filter((stepInput) => stepInput.HideWhen !== this.getQuoteFlowPath()).length;\r\n }\r\n\r\n stepHasNoValidFields = (step) => {\r\n if (!step.Input || step.Input.length === 0 || step.Input.filter((input) => input.Name).length === 0) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n handleRedirect = (url) => {\r\n if (url !== window.location.href) {\r\n window.location = url;\r\n }\r\n }\r\n\r\n setFormCookie = () => {\r\n sessionStorage.setItem('pods-quote-flow-form', JSON.stringify(this.props.getQuoteFormValues));\r\n }\r\n\r\n gaSubmissionTracking = (moveType = this.props.getQuoteFormValues.moveType) => {\r\n window.dataLayer = window.dataLayer || [];\r\n window.dataLayer.push(\r\n {\r\n \"quoteType\": this.props.getQuoteFlowData.QuoteType,\r\n \"moveType\": moveType,\r\n \"originZipCode\": this.props.getQuoteFormValues.originZipCode,\r\n \"destinationZipCode\": this.props.getQuoteFormValues.destinationZipCode,\r\n \"storingLocation\": this.props.getQuoteFormValues.storingLocation,\r\n 'serviceType': this.props.getQuoteFlowData.Steps.find(step => step.ID === \"servicetypestep\").Input.find((input) => input.Name === \"serviceType\").Value.find(val => val.Value === this.props.getQuoteFormValues.serviceType).Label,\r\n \"event\": \"quote_submitted\"\r\n }\r\n );\r\n }\r\n\r\n getSubmissionType = () => {\r\n return `${this.props.getQuoteFlowData.QuoteType}_quote`;\r\n }\r\n}\r\n\r\n\r\nQuoteFlowForm = reduxForm({\r\n form: 'QuoteFlowForm'\r\n})(QuoteFlowForm);\r\n\r\n\r\nconst mapDispatchToProps = (dispatch) => {\r\n return {\r\n setQuoteFlowFormFieldValue: (fieldName, value) => dispatch(change('QuoteFlowForm', fieldName, value)),\r\n setQuoteFlowData: (quoteFlowData) => dispatch(redux.actions.setQuoteFlowData(quoteFlowData)),\r\n setCompletedSteps: (completedSteps, activeSteps) => dispatch(redux.actions.setCompletedSteps(completedSteps, activeSteps)),\r\n addAddressOptions: (key, value, skipAddressProcessing) => dispatch(redux.actions.addAddressOptions(key, value, skipAddressProcessing)),\r\n postData: (stepPostParams, url, paramThatChanged) => dispatch(redux.actions.postData(stepPostParams, url, paramThatChanged)),\r\n setAvailabilityDates: (availabilityDates) => dispatch(redux.actions.setAvailabilityDates(availabilityDates)),\r\n setErrorModal: (errorModal) => dispatch(redux.actions.setErrorModal(errorModal)),\r\n getBookingFlowSettings: () => dispatch(redux.actions.getBookingFlowSettings()),\r\n postSalesforceLeadData: (customerType, quoteData) => dispatch(redux.actions.postSalesforceLeadData(customerType, quoteData))\r\n }\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n initialValues: { undefined, ...getInitValues() },\r\n getQuoteFlowData: redux.selectors.getQuoteFlowData(state),\r\n getQuoteFormValues: redux.selectors.getQuoteFormValues(state),\r\n getQuoteFormErrors: redux.selectors.getQuoteFormErrors(state),\r\n getQuoteFormInitialValues: redux.selectors.getQuoteFormInitialValues(state),\r\n getQuoteFormRegisteredFields: redux.selectors.getQuoteFormRegisteredFields(state),\r\n getServicabilityParams: redux.selectors.getServicabilityParams(state)\r\n }\r\n}\r\n\r\nconst getURLParam = (param) => {\r\n const half = location.search.split(param + '=')[1];\r\n return half !== undefined ? decodeURIComponent(half.split('&')[0]) : null;\r\n}\r\n\r\nlet initValuesLoaded = false;\r\n\r\nconst getInitValues = () => {\r\n const initValues = {};\r\n if (!initValuesLoaded) {\r\n window.quoteFlowContent.Steps.map((step) => {\r\n step.Input.map((option) => {\r\n if (option.Name === \"selectedDate\") {\r\n initValues.selectedDate_display = option.Value;\r\n }\r\n if (!option.Value || option.Value.constructor !== Array) {\r\n initValues[option.Name] = option.Value;\r\n } else if (option.Value.constructor === Array) {\r\n option.Value.map((opt) => {\r\n if (opt.Selected) {\r\n initValues[option.Name] = opt.Value;\r\n }\r\n })\r\n }\r\n })\r\n });\r\n }\r\n\r\n initValuesLoaded = true;\r\n return initValues;\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(QuoteFlowForm);\r\n","/**\n * lodash 3.0.4 (Custom Build) \n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]',\n funcTag = '[object Function]';\n\n/** Used to detect host constructors (Safari > 5). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar fnToString = Function.prototype.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeIsArray = getNative(Array, 'isArray');\n\n/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return isNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(function() { return arguments; }());\n * // => false\n */\nvar isArray = nativeIsArray || function(value) {\n return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;\n};\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in older versions of Chrome and Safari which return 'function' for regexes\n // and Safari 8 equivalents which return 'object' for typed array constructors.\n return isObject(value) && objToString.call(value) == funcTag;\n}\n\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (value == null) {\n return false;\n }\n if (isFunction(value)) {\n return reIsNative.test(fnToString.call(value));\n }\n return isObjectLike(value) && reIsHostCtor.test(value);\n}\n\nmodule.exports = isArray;\n","/**\n * lodash 3.0.8 (Custom Build) \n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\nvar isArguments = require('lodash.isarguments'),\n isArray = require('lodash.isarray');\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^\\d+$/;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\n length = length == null ? MAX_SAFE_INTEGER : length;\n return value > -1 && value % 1 == 0 && value < length;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n if (object == null) {\n return [];\n }\n if (!isObject(object)) {\n object = Object(object);\n }\n var length = object.length;\n length = (length && isLength(length) &&\n (isArray(object) || isArguments(object)) && length) || 0;\n\n var Ctor = object.constructor,\n index = -1,\n isProto = typeof Ctor == 'function' && Ctor.prototype === object,\n result = Array(length),\n skipIndexes = length > 0;\n\n while (++index < length) {\n result[index] = (index + '');\n }\n for (var key in object) {\n if (!(skipIndexes && isIndex(key, length)) &&\n !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = keysIn;\n","/**\n * lodash 3.0.3 (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\n\n/**\n * The base implementation of `baseForIn` and `baseForOwn` which iterates\n * over `object` properties returned by `keysFunc` invoking `iteratee` for\n * each property. Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * Creates a base function for methods like `_.forIn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = baseFor;\n","/**\n * lodash 3.2.0 (Custom Build) \n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\nvar baseFor = require('lodash._basefor'),\n isArguments = require('lodash.isarguments'),\n keysIn = require('lodash.keysin');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * The base implementation of `_.forIn` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForIn(object, iteratee) {\n return baseFor(object, iteratee, keysIn);\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * **Note:** This method assumes objects created by the `Object` constructor\n * have no inherited enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n var Ctor;\n\n // Exit early for non `Object` objects.\n if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||\n (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {\n return false;\n }\n // IE < 9 iterates inherited properties before own properties. If the first\n // iterated property is an object's own property then there are no inherited\n // enumerable properties.\n var result;\n // In most environments an object's own properties are iterated before\n // its inherited properties. If the last iterated property is an object's\n // own property then there are no inherited enumerable properties.\n baseForIn(value, function(subValue, key) {\n result = key;\n });\n return result === undefined || hasOwnProperty.call(value, result);\n}\n\nmodule.exports = isPlainObject;\n","'use strict';\n\nexports.__esModule = true;\nexports.isFSA = isFSA;\nexports.isError = isError;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _lodashIsplainobject = require('lodash.isplainobject');\n\nvar _lodashIsplainobject2 = _interopRequireDefault(_lodashIsplainobject);\n\nvar validKeys = ['type', 'payload', 'error', 'meta'];\n\nfunction isValidKey(key) {\n return validKeys.indexOf(key) > -1;\n}\n\nfunction isFSA(action) {\n return _lodashIsplainobject2['default'](action) && typeof action.type !== 'undefined' && Object.keys(action).every(isValidKey);\n}\n\nfunction isError(action) {\n return action.error === true;\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports['default'] = promiseMiddleware;\n\nvar _fluxStandardAction = require('flux-standard-action');\n\nfunction isPromise(val) {\n return val && typeof val.then === 'function';\n}\n\nfunction promiseMiddleware(_ref) {\n var dispatch = _ref.dispatch;\n\n return function (next) {\n return function (action) {\n if (!_fluxStandardAction.isFSA(action)) {\n return isPromise(action) ? action.then(dispatch) : next(action);\n }\n\n return isPromise(action.payload) ? action.payload.then(function (result) {\n return dispatch(_extends({}, action, { payload: result }));\n }, function (error) {\n return dispatch(_extends({}, action, { payload: error, error: true }));\n }) : next(action);\n };\n };\n}\n\nmodule.exports = exports['default'];","/** A function that accepts a potential \"extra argument\" value to be injected later,\r\n * and returns an instance of the thunk middleware that uses that value\r\n */\nfunction createThunkMiddleware(extraArgument) {\n // Standard Redux middleware definition pattern:\n // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware\n var middleware = function middleware(_ref) {\n var dispatch = _ref.dispatch,\n getState = _ref.getState;\n return function (next) {\n return function (action) {\n // The thunk middleware looks for any functions that were passed to `store.dispatch`.\n // If this \"action\" is really a function, call it and return the result.\n if (typeof action === 'function') {\n // Inject the store's `dispatch` and `getState` methods, as well as any \"extra arg\"\n return action(dispatch, getState, extraArgument);\n } // Otherwise, pass the action down the middleware chain as usual\n\n\n return next(action);\n };\n };\n };\n\n return middleware;\n}\n\nvar thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version\n// with whatever \"extra arg\" they want to inject into their thunks\n\nthunk.withExtraArgument = createThunkMiddleware;\nexport default thunk;","import * as c from './constants';\r\n\r\nexport const getQuoteFlowData = (state) => state.QuoteFlowData || null;\r\nexport const getQuoteFormValues = (state) => state.form.QuoteFlowForm && state.form.QuoteFlowForm.values ? state.form.QuoteFlowForm.values : { };\r\nexport const getQuoteFormErrors = (state) => state.form.QuoteFlowForm && state.form.QuoteFlowForm.syncErrors ? state.form.QuoteFlowForm.syncErrors : { };\r\nexport const getQuoteFormRegisteredFields = (state) => state.form.QuoteFlowForm && state.form.QuoteFlowForm.registeredFields ? state.form.QuoteFlowForm.registeredFields : { };\r\nexport const getQuoteFormInitialValues = (state) => state.form.QuoteFlowForm && state.form.QuoteFlowForm.initial ? state.form.QuoteFlowForm.initial : { };\r\nexport const getServicabilityParams = (state) => state.QuoteFlowData.servicabilityParams ? state.QuoteFlowData.servicabilityParams : [];\r\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar DESCRIPTORS = require('./_descriptors');\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };","import * as c from './constants';\r\nimport { combineReducers } from 'redux';\r\nimport { reducer as form } from 'redux-form';\r\nimport moment from 'moment';\r\n\r\n//ReferenceDate: moment().add(1,'days').format(\"YYYY-MM-DD\")\r\n\r\nconst QuoteFlowData = ( state = {}, action) => {\r\n switch (action.type){\r\n case c.SET_QUOTEFLOW_DATA:\r\n return {\r\n ...action.payload,\r\n availabilityDates: [],\r\n servicabilityParams: [ \"originZipCode\", \"originCity\", \"destinationZipCode\", \"destinationCity\", \"ReferenceDate\" ],\r\n queryStringKeys: [\"ReturnUUID\", \"NSContactUUID\"],\r\n Steps: [\r\n { ...action.payload.Steps.slice(0,1)[0], active: true },\r\n ...action.payload.Steps.slice(1)\r\n ]\r\n }\r\n break;\r\n case c.SET_COMPLETE_STEPS:\r\n return {\r\n ...state,\r\n Steps: [ ...state.Steps.map( (step, index) => {\r\n return {\r\n ...step,\r\n completed: action.completedSteps.includes(index),\r\n active: action.activeSteps.includes(index)\r\n };\r\n })]\r\n }\r\n break;\r\n case c.SET_AVAILABILITY_DATES:\r\n let availabilityDates = [];\r\n action.availabilityDates.map( (availabilityDate) => {\r\n if(!availabilityDate.IsAvailable || moment(availabilityDate.Date).format('dddd') === \"Sunday\"){\r\n availabilityDates.push(moment(availabilityDate.Date));\r\n }\r\n });\r\n return {\r\n ...state,\r\n availabilityDates: availabilityDates\r\n }\r\n break;\r\n case c.SET_ADDRESS_OPTIONS:\r\n return {\r\n ...state,\r\n Steps: [ ...state.Steps.map( (step, index) => {\r\n let containsOriginZipCode = false;\r\n step.Input.map( (input) => {\r\n if( input.Name && input.Name.toLowerCase() === 'originzipcode' ) {\r\n containsOriginZipCode = true;\r\n }\r\n })\r\n if( containsOriginZipCode ){\r\n return {\r\n ...step,\r\n Input: [ ...step.Input.map( (input, index) => {\r\n if(input.Name === action.addressName){\r\n return {\r\n ...input,\r\n Value: populateAddressOptions(action.addressOptions, action.addressName, action.skipAddressProcessing)\r\n }\r\n } else {\r\n return input;\r\n }\r\n })]\r\n }\r\n } else {\r\n return step;\r\n }\r\n })]\r\n }\r\n return state;\r\n break;\r\n case c.SET_ERROR_MODAL:\r\n return {\r\n ...state,\r\n errorModal: action.errorModal\r\n }\r\n break;\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\n\r\nconst populateAddressOptions = (addresses, addressName, skipAddressProcessing) => {\r\n let addressOptions = [];\r\n if( skipAddressProcessing ) {\r\n addressOptions = addresses;\r\n } else {\r\n if (addresses.length > 1){\r\n addressOptions = [{ \"Label\": \"------\", \"Value\": null, \"Selected\": true }, ...addresses ]\r\n } else {\r\n addresses.map( (address, index) => {\r\n let cityObject = JSON.parse(address.Value);\r\n if(index === 0 && cityObject.City) {\r\n addressOptions.push({\r\n ...address,\r\n \"Selected\": true\r\n })\r\n }\r\n });\r\n }\r\n }\r\n return addressOptions;\r\n}\r\n\r\nexport default combineReducers({\r\n QuoteFlowData,\r\n form\r\n});\r\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\nmodule.exports = function isBuffer (obj) {\n return obj != null && obj.constructor != null &&\n typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","import * as c from './constants';\r\nimport axios from 'axios';\r\n\r\nexport const setQuoteFlowData = (quoteFlowData) => {\r\n return Promise.resolve({\r\n type: c.SET_QUOTEFLOW_DATA,\r\n payload: quoteFlowData\r\n });\r\n}\r\n\r\nexport const setCompletedSteps = (completedSteps, activeSteps) => {\r\n return Promise.resolve({\r\n type: c.SET_COMPLETE_STEPS,\r\n completedSteps,\r\n activeSteps\r\n });\r\n}\r\n\r\nexport const postData = (params, url, paramThatChanged) => {\r\n return (dispatch) => {\r\n return axios.post(url, params, {\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).then((response) => {\r\n if (paramThatChanged !== \"destinationCity\" && paramThatChanged !== \"originCity\") {\r\n if ((!params.destinationCity || paramThatChanged === 'destinationZipCode') && params.destinationZipCode) {\r\n dispatch(addAddressOptions(\"destinationCity\", response.data.Destination && response.data.Destination.Value ? response.data.Destination.Value : []));\r\n }\r\n if ((!params.originCity || paramThatChanged === 'originZipCode') && params.originZipCode) {\r\n dispatch(addAddressOptions(\"originCity\", response.data.Origin && response.data.Origin.Value ? response.data.Origin.Value : []));\r\n }\r\n }\r\n\r\n return response;\r\n });\r\n };\r\n}\r\n\r\nexport const getBookingFlowSettings = () => {\r\n return dispatch =>\r\n axios.get('/api/PODS/BookingFlowSettingsWebService')\r\n .then((response) => {\r\n dispatch({ type: c.GET_BOOKING_FLOW_SETTINGS, index: 1 });\r\n return response;\r\n });\r\n}\r\n\r\nexport const postSalesforceLeadData = (customerType, quoteData) => {\r\n if (quoteData.destinationZipCode == null) {\r\n quoteData.destinationZipCode = quoteData.originZipCode;\r\n quoteData.destinationCity = quoteData.originCity;\r\n }\r\n var endpoint = '';\r\n if (customerType == 'residential') {\r\n endpoint = '/api/PODS/Salesforce/SendResidentialQuote';\r\n }\r\n else {\r\n endpoint = '/api/PODS/Salesforce/SendCommercialQuote';\r\n }\r\n return dispatch =>\r\n axios.post(endpoint, quoteData)\r\n .then((response) => {\r\n dispatch({ type: c.POST_SALESFORCE_LEAD_DATA, index: 1 });\r\n return response;\r\n });\r\n}\r\n\r\nexport const addAddressOptions = (addressName, addressOptions, skipAddressProcessing = false) => {\r\n return {\r\n type: c.SET_ADDRESS_OPTIONS,\r\n addressName,\r\n addressOptions,\r\n skipAddressProcessing\r\n }\r\n}\r\n\r\nexport const setAvailabilityDates = (availabilityDates) => {\r\n return Promise.resolve({\r\n type: c.SET_AVAILABILITY_DATES,\r\n availabilityDates\r\n });\r\n}\r\n\r\nexport const setErrorModal = (errorModal) => {\r\n return Promise.resolve({\r\n type: c.SET_ERROR_MODAL,\r\n errorModal\r\n });\r\n}","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/** @license React v0.19.1\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var f,g,h,k,l;\nif(\"undefined\"===typeof window||\"function\"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date,\ny=window.setTimeout,z=window.clearTimeout;if(\"undefined\"!==typeof console){var A=window.cancelAnimationFrame;\"function\"!==typeof window.requestAnimationFrame&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\");\"function\"!==typeof A&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\")}if(\"object\"===\ntypeof w&&\"function\"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var B=x.now();exports.unstable_now=function(){return x.now()-B}}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;\nfunction V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}\nfunction X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}}\nfunction Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){T||S||(T=!0,f(X))};\nexports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=Z;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=R;R=a;try{return b()}finally{R=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if(\"object\"===typeof c&&null!==c){var e=c.delay;e=\"number\"===typeof e&&0d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};\nexports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTimeb}return!1}function v(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var C={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){C[a]=new v(a,0,!1,a,null,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];C[b]=new v(b,1,!1,a[1],null,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){C[a]=new v(a,2,!1,a.toLowerCase(),null,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){C[a]=new v(a,2,!1,a,null,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){C[a]=new v(a,3,!1,a.toLowerCase(),null,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){C[a]=new v(a,3,!0,a,null,!1)});[\"capture\",\"download\"].forEach(function(a){C[a]=new v(a,4,!1,a,null,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){C[a]=new v(a,6,!1,a,null,!1)});[\"rowSpan\",\"start\"].forEach(function(a){C[a]=new v(a,5,!1,a.toLowerCase(),null,!1)});var Ua=/[\\-:]([a-z])/g;function Va(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ua,\nVa);C[b]=new v(b,1,!1,a,null,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!1)});\nC.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!0)});var Wa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty(\"ReactCurrentDispatcher\")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty(\"ReactCurrentBatchConfig\")||(Wa.ReactCurrentBatchConfig={suspense:null});\nfunction Xa(a,b,c,d){var e=C.hasOwnProperty(b)?C[b]:null;var f=null!==e?0===e.type:d?!1:!(2=c.length))throw Error(u(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:rb(c)}}\nfunction Kb(a,b){var c=rb(b.value),d=rb(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function Lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var Mb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction Nb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ob(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?Nb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Pb,Qb=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Mb.svg||\"innerHTML\"in a)a.innerHTML=b;else{Pb=Pb||document.createElement(\"div\");Pb.innerHTML=\"\"+b.valueOf().toString()+\" \";for(b=Pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Sb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c[\"Webkit\"+a]=\"webkit\"+b;c[\"Moz\"+a]=\"moz\"+b;return c}var Tb={animationend:Sb(\"Animation\",\"AnimationEnd\"),animationiteration:Sb(\"Animation\",\"AnimationIteration\"),animationstart:Sb(\"Animation\",\"AnimationStart\"),transitionend:Sb(\"Transition\",\"TransitionEnd\")},Ub={},Vb={};\nya&&(Vb=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),\"TransitionEvent\"in window||delete Tb.transitionend.transition);function Wb(a){if(Ub[a])return Ub[a];if(!Tb[a])return a;var b=Tb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Vb)return Ub[a]=b[c];return a}\nvar Xb=Wb(\"animationend\"),Yb=Wb(\"animationiteration\"),Zb=Wb(\"animationstart\"),$b=Wb(\"transitionend\"),ac=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),bc=new (\"function\"===typeof WeakMap?WeakMap:Map);function cc(a){var b=bc.get(a);void 0===b&&(b=new Map,bc.set(a,b));return b}\nfunction dc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function ec(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function fc(a){if(dc(a)!==a)throw Error(u(188));}\nfunction gc(a){var b=a.alternate;if(!b){b=dc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return fc(e),a;if(f===d)return fc(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===\nc){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function hc(a){a=gc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}\nfunction ic(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function jc(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var kc=null;\nfunction lc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;dpc.length&&pc.push(a)}\nfunction rc(a,b,c,d){if(pc.length){var e=pc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}\nfunction sc(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=tc(d)}while(c);for(c=0;c=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ud(c)}}\nfunction wd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wd(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xd(){for(var a=window,b=td();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=td(a.document)}return b}\nfunction yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}var zd=\"$\",Ad=\"/$\",Bd=\"$?\",Cd=\"$!\",Dd=null,Ed=null;function Fd(a,b){switch(a){case \"button\":case \"input\":case \"select\":case \"textarea\":return!!b.autoFocus}return!1}\nfunction Gd(a,b){return\"textarea\"===a||\"option\"===a||\"noscript\"===a||\"string\"===typeof b.children||\"number\"===typeof b.children||\"object\"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Hd=\"function\"===typeof setTimeout?setTimeout:void 0,Id=\"function\"===typeof clearTimeout?clearTimeout:void 0;function Jd(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}\nfunction Kd(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===zd||c===Cd||c===Bd){if(0===b)return a;b--}else c===Ad&&b++}a=a.previousSibling}return null}var Ld=Math.random().toString(36).slice(2),Md=\"__reactInternalInstance$\"+Ld,Nd=\"__reactEventHandlers$\"+Ld,Od=\"__reactContainere$\"+Ld;\nfunction tc(a){var b=a[Md];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Od]||c[Md]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Kd(a);null!==a;){if(c=a[Md])return c;a=Kd(a)}return b}a=c;c=a.parentNode}return null}function Nc(a){a=a[Md]||a[Od];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pd(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function Qd(a){return a[Nd]||null}\nfunction Rd(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}\nfunction Sd(a,b){var c=a.stateNode;if(!c)return null;var d=la(c);if(!d)return null;c=d[b];a:switch(b){case \"onClick\":case \"onClickCapture\":case \"onDoubleClick\":case \"onDoubleClickCapture\":case \"onMouseDown\":case \"onMouseDownCapture\":case \"onMouseMove\":case \"onMouseMoveCapture\":case \"onMouseUp\":case \"onMouseUpCapture\":case \"onMouseEnter\":(d=!d.disabled)||(a=a.type,d=!(\"button\"===a||\"input\"===a||\"select\"===a||\"textarea\"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&\"function\"!==typeof c)throw Error(u(231,\nb,typeof c));return c}function Td(a,b,c){if(b=Sd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a)}function Ud(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Rd(b);for(b=c.length;0this.eventPool.length&&this.eventPool.push(a)}function de(a){a.eventPool=[];a.getPooled=ee;a.release=fe}var ge=G.extend({data:null}),he=G.extend({data:null}),ie=[9,13,27,32],je=ya&&\"CompositionEvent\"in window,ke=null;ya&&\"documentMode\"in document&&(ke=document.documentMode);\nvar le=ya&&\"TextEvent\"in window&&!ke,me=ya&&(!je||ke&&8=ke),ne=String.fromCharCode(32),oe={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},pe=!1;\nfunction qe(a,b){switch(a){case \"keyup\":return-1!==ie.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function re(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var se=!1;function te(a,b){switch(a){case \"compositionend\":return re(b);case \"keypress\":if(32!==b.which)return null;pe=!0;return ne;case \"textInput\":return a=b.data,a===ne&&pe?null:a;default:return null}}\nfunction ue(a,b){if(se)return\"compositionend\"===a||!je&&qe(a,b)?(a=ae(),$d=Zd=Yd=null,se=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},ef=null,ff=null,gf=null,hf=!1;\nfunction jf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(hf||null==ef||ef!==td(c))return null;c=ef;\"selectionStart\"in c&&yd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return gf&&bf(gf,c)?null:(gf=c,a=G.getPooled(df.select,ff,a,b),a.type=\"select\",a.target=ef,Xd(a),a)}\nvar kf={eventTypes:df,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=cc(e);f=wa.onSelect;for(var g=0;gzf||(a.current=yf[zf],yf[zf]=null,zf--)}\nfunction I(a,b){zf++;yf[zf]=a.current;a.current=b}var Af={},J={current:Af},K={current:!1},Bf=Af;function Cf(a,b){var c=a.type.contextTypes;if(!c)return Af;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a}\nfunction Df(){H(K);H(J)}function Ef(a,b,c){if(J.current!==Af)throw Error(u(168));I(J,b);I(K,c)}function Ff(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,pb(b)||\"Unknown\",e));return n({},c,{},d)}function Gf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Af;Bf=J.current;I(J,a);I(K,K.current);return!0}\nfunction Hf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(a=Ff(a,b,Bf),d.__reactInternalMemoizedMergedChildContext=a,H(K),H(J),I(J,a)):H(K);I(K,c)}\nvar If=r.unstable_runWithPriority,Jf=r.unstable_scheduleCallback,Kf=r.unstable_cancelCallback,Lf=r.unstable_requestPaint,Mf=r.unstable_now,Nf=r.unstable_getCurrentPriorityLevel,Of=r.unstable_ImmediatePriority,Pf=r.unstable_UserBlockingPriority,Qf=r.unstable_NormalPriority,Rf=r.unstable_LowPriority,Sf=r.unstable_IdlePriority,Tf={},Uf=r.unstable_shouldYield,Vf=void 0!==Lf?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1E4>Zf?Mf:function(){return Mf()-Zf};\nfunction ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u(332));}}function bg(a){switch(a){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u(332));}}function cg(a,b){a=bg(a);return If(a,b)}function dg(a,b,c){a=bg(a);return Jf(a,b,c)}function eg(a){null===Wf?(Wf=[a],Xf=Jf(Of,fg)):Wf.push(a);return Tf}function gg(){if(null!==Xf){var a=Xf;Xf=null;Kf(a)}fg()}\nfunction fg(){if(!Yf&&null!==Wf){Yf=!0;var a=0;try{var b=Wf;cg(99,function(){for(;a=b&&(rg=!0),a.firstContext=null)}\nfunction sg(a,b){if(mg!==a&&!1!==b&&0!==b){if(\"number\"!==typeof b||1073741823===b)mg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===lg){if(null===kg)throw Error(u(308));lg=b;kg.dependencies={expirationTime:0,firstContext:b,responders:null}}else lg=lg.next=b}return a._currentValue}var tg=!1;function ug(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}\nfunction vg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function wg(a,b){a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null};return a.next=a}function xg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}\nfunction yg(a,b){var c=a.alternate;null!==c&&vg(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}\nfunction zg(a,b,c,d){var e=a.updateQueue;tg=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var k=e.baseState,l=0,m=null,p=null,x=null;if(null!==h){var z=h;do{g=z.expirationTime;if(gl&&(l=g)}else{null!==x&&(x=x.next={expirationTime:1073741823,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null});Ag(g,z.suspenseConfig);a:{var D=a,t=z;g=b;ca=c;switch(t.tag){case 1:D=t.payload;if(\"function\"===typeof D){k=D.call(ca,k,g);break a}k=D;break a;case 3:D.effectTag=D.effectTag&-4097|64;case 0:D=t.payload;g=\"function\"===typeof D?D.call(ca,k,g):D;if(null===g||void 0===g)break a;k=n({},k,g);break a;case 2:tg=!0}}null!==z.callback&&\n(a.effectTag|=32,g=e.effects,null===g?e.effects=[z]:g.push(z))}z=z.next;if(null===z||z===h)if(g=e.shared.pending,null===g)break;else z=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===x?m=k:x.next=p;e.baseState=m;e.baseQueue=x;Bg(l);a.expirationTime=l;a.memoizedState=k}}\nfunction Cg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;by?(A=m,m=null):A=m.sibling;var q=x(e,m,h[y],k);if(null===q){null===m&&(m=A);break}a&&\nm&&null===q.alternate&&b(e,m);g=f(q,g,y);null===t?l=q:t.sibling=q;t=q;m=A}if(y===h.length)return c(e,m),l;if(null===m){for(;yy?(A=t,t=null):A=t.sibling;var D=x(e,t,q.value,l);if(null===D){null===t&&(t=A);break}a&&t&&null===D.alternate&&b(e,t);g=f(D,g,y);null===m?k=D:m.sibling=D;m=D;t=A}if(q.done)return c(e,t),k;if(null===t){for(;!q.done;y++,q=h.next())q=p(e,q.value,l),null!==q&&(g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);return k}for(t=d(e,t);!q.done;y++,q=h.next())q=z(t,e,y,q.value,l),null!==q&&(a&&null!==\nq.alternate&&t.delete(null===q.key?y:q.key),g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);a&&t.forEach(function(a){return b(e,a)});return k}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ab&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Za:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ab){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,\nk.sibling);d=e(k,f.props);d.ref=Pg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ab?(d=Wg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Ug(f.type,f.key,f.props,null,a.mode,h),h.ref=Pg(a,d,f),h.return=a,a=h)}return g(a);case $a:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=\nd.sibling}d=Vg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Tg(f,a.mode,h),d.return=a,a=d),g(a);if(Og(f))return ca(a,d,f,h);if(nb(f))return D(a,d,f,h);l&&Qg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||\"Component\"));}return c(a,d)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg};\nfunction ch(a){if(a===Zg)throw Error(u(174));return a}function dh(a,b){I(bh,b);I(ah,a);I($g,Zg);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ob(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Ob(b,a)}H($g);I($g,b)}function eh(){H($g);H(ah);H(bh)}function fh(a){ch(bh.current);var b=ch($g.current);var c=Ob(b,a.type);b!==c&&(I(ah,a),I($g,c))}function gh(a){ah.current===a&&(H($g),H(ah))}var M={current:0};\nfunction hh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===Bd||c.data===Cd))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function ih(a,b){return{responder:a,props:b}}\nvar jh=Wa.ReactCurrentDispatcher,kh=Wa.ReactCurrentBatchConfig,lh=0,N=null,O=null,P=null,mh=!1;function Q(){throw Error(u(321));}function nh(a,b){if(null===b)return!1;for(var c=0;cf))throw Error(u(301));f+=1;P=O=null;b.updateQueue=null;jh.current=rh;a=c(d,e)}while(b.expirationTime===lh)}jh.current=sh;b=null!==O&&null!==O.next;lh=0;P=O=N=null;mh=!1;if(b)throw Error(u(300));return a}\nfunction th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function uh(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else{if(null===a)throw Error(u(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a}return P}\nfunction vh(a,b){return\"function\"===typeof b?b(a):b}\nfunction wh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.expirationTime;if(lN.expirationTime&&\n(N.expirationTime=l,Bg(l))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),Ag(l,k.suspenseConfig),d=k.eagerReducer===a?k.eagerState:a(d,k.action);k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;$e(d,b.memoizedState)||(rg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction xh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(rg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction yh(a){var b=th();\"function\"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:a};a=a.dispatch=zh.bind(null,N,a);return[b.memoizedState,a]}function Ah(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}\nfunction Bh(){return uh().memoizedState}function Ch(a,b,c,d){var e=th();N.effectTag|=a;e.memoizedState=Ah(1|b,c,void 0,void 0===d?null:d)}function Dh(a,b,c,d){var e=uh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&nh(d,g.deps)){Ah(b,c,f,d);return}}N.effectTag|=a;e.memoizedState=Ah(1|b,c,f,d)}function Eh(a,b){return Ch(516,4,a,b)}function Fh(a,b){return Dh(516,4,a,b)}function Gh(a,b){return Dh(4,2,a,b)}\nfunction Hh(a,b){if(\"function\"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Ih(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Dh(4,2,Hh.bind(null,b,a),c)}function Jh(){}function Kh(a,b){th().memoizedState=[a,void 0===b?null:b];return a}function Lh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}\nfunction Mh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Nh(a,b,c){var d=ag();cg(98>d?98:d,function(){a(!0)});cg(97\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),\"select\"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Md]=b;a[Nd]=d;ni(a,b,!1,!1);b.stateNode=a;g=pd(e,d);switch(e){case \"iframe\":case \"object\":case \"embed\":F(\"load\",\na);h=d;break;case \"video\":case \"audio\":for(h=0;hd.tailExpiration&&1b)&&tj.set(a,b)))}}\nfunction xj(a,b){a.expirationTimea?c:a;return 2>=a&&b!==a?0:a}\nfunction Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=eg(yj.bind(null,a));else{var b=zj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Gg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Tf&&Kf(c)}a.callbackExpirationTime=\nb;a.callbackPriority=d;b=1073741823===b?eg(yj.bind(null,a)):dg(d,Bj.bind(null,a),{timeout:10*(1073741821-b)-$f()});a.callbackNode=b}}}\nfunction Bj(a,b){wj=0;if(b)return b=Gg(),Cj(a,b),Z(a),null;var c=zj(a);if(0!==c){b=a.callbackNode;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&c===U||Ej(a,c);if(null!==X){var d=W;W|=fj;var e=Fj();do try{Gj();break}catch(h){Hj(a,h)}while(1);ng();W=d;cj.current=e;if(S===hj)throw b=kj,Ej(a,c),xi(a,c),Z(a),b;if(null===X)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=S,T=null,d){case ti:case hj:throw Error(u(345));case ij:Cj(a,2=c){a.lastPingedTime=c;Ej(a,c);break}}f=zj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Hd(Jj.bind(null,a),e);break}Jj(a);break;case vi:xi(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ij(e));if(oj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Ej(a,c);break}e=zj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=\nd;break}1073741823!==mj?d=10*(1073741821-mj)-$f():1073741823===lj?d=0:(d=10*(1073741821-lj)-5E3,e=$f(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*bj(d/1960))-d,c=d?d=0:(e=g.busyDelayMs|0,f=$f()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10 component higher in the tree to provide a loading indicator or placeholder to display.\"+qb(g))}S!==\njj&&(S=ij);h=Ai(h,g);p=f;do{switch(p.tag){case 3:k=h;p.effectTag|=4096;p.expirationTime=b;var B=Xi(p,k,b);yg(p,B);break a;case 1:k=h;var w=p.type,ub=p.stateNode;if(0===(p.effectTag&64)&&(\"function\"===typeof w.getDerivedStateFromError||null!==ub&&\"function\"===typeof ub.componentDidCatch&&(null===aj||!aj.has(ub)))){p.effectTag|=4096;p.expirationTime=b;var vb=$i(p,k,b);yg(p,vb);break a}}p=p.return}while(null!==p)}X=Pj(X)}catch(Xc){b=Xc;continue}break}while(1)}\nfunction Fj(){var a=cj.current;cj.current=sh;return null===a?sh:a}function Ag(a,b){awi&&(wi=a)}function Kj(){for(;null!==X;)X=Qj(X)}function Gj(){for(;null!==X&&!Uf();)X=Qj(X)}function Qj(a){var b=Rj(a.alternate,a,U);a.memoizedProps=a.pendingProps;null===b&&(b=Pj(a));dj.current=null;return b}\nfunction Pj(a){X=a;do{var b=X.alternate;a=X.return;if(0===(X.effectTag&2048)){b=si(b,X,U);if(1===U||1!==X.childExpirationTime){for(var c=0,d=X.child;null!==d;){var e=d.expirationTime,f=d.childExpirationTime;e>c&&(c=e);f>c&&(c=f);d=d.sibling}X.childExpirationTime=c}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=X.firstEffect),null!==X.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=X.firstEffect),a.lastEffect=X.lastEffect),1a?b:a}function Jj(a){var b=ag();cg(99,Sj.bind(null,a,b));return null}\nfunction Sj(a,b){do Dj();while(null!==rj);if((W&(fj|gj))!==V)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Ij(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=\nd-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===T&&(X=T=null,U=0);1h&&(l=h,h=g,g=l),l=vd(q,g),m=vd(q,h),l&&m&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==m.node||w.focusOffset!==m.offset)&&(B=B.createRange(),B.setStart(l.node,l.offset),w.removeAllRanges(),g>h?(w.addRange(B),w.extend(m.node,m.offset)):(B.setEnd(m.node,m.offset),w.addRange(B))))));B=[];for(w=q;w=w.parentNode;)1===w.nodeType&&B.push({element:w,left:w.scrollLeft,\ntop:w.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;q=c)return ji(a,b,c);I(M,M.current&1);b=$h(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return mi(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current);if(!d)return null}return $h(a,b,c)}rg=!1}}else rg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Cf(b,J.current);qg(b,c);e=oh(null,\nb,d,a,e,c);b.effectTag|=1;if(\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(L(d)){var f=!0;Gf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;ug(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Fg(b,d,g,a);e.updater=Jg;b.stateNode=e;e._reactInternalFiber=b;Ng(b,d,a,c);b=gi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=\nnull,b.alternate=null,b.effectTag|=2);a=b.pendingProps;ob(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Xj(e);a=ig(e,a);switch(f){case 0:b=di(null,b,e,a,c);break a;case 1:b=fi(null,b,e,a,c);break a;case 11:b=Zh(null,b,e,a,c);break a;case 14:b=ai(null,b,e,ig(e.type,a),d,c);break a}throw Error(u(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),di(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),fi(a,b,d,e,c);\ncase 3:hi(b);d=b.updateQueue;if(null===a||null===d)throw Error(u(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;vg(a,b);zg(b,d,null,c);d=b.memoizedState.element;if(d===e)Xh(),b=$h(a,b,c);else{if(e=b.stateNode.hydrate)Ph=Jd(b.stateNode.containerInfo.firstChild),Oh=b,e=Qh=!0;if(e)for(c=Yg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),Xh();b=b.child}return b;case 5:return fh(b),null===a&&Uh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:\nnull,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),ei(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&Uh(b),null;case 13:return ji(a,b,c);case 4:return dh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Xg(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),Zh(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,\nb,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(jg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=$e(h,f)?0:(\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=$h(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==\nk){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=wg(c,null),l.tag=2,xg(h,l));h.expirationTime=b&&a<=b}function xi(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;cb||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}\nfunction yi(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Cj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}\nfunction bk(a,b,c,d){var e=b.current,f=Gg(),g=Dg.suspense;f=Hg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(dc(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=Ff(c,k,h);break a}}c=h}else c=Af;null===b.context?b.context=c:b.pendingContext=c;b=wg(f,g);b.payload={element:a};d=void 0===\nd?null:d;null!==d&&(b.callback=d);xg(e,b);Ig(e,f);return f}function ck(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function dk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default QuoteFlowApp;\r\n\r\nconst getCityLabel = (cookiedFormData, fieldName) => {\r\n let cityLabel = '';\r\n if (typeof cookiedFormData[fieldName] === \"string\" && cookiedFormData[fieldName].length > 0) {\r\n cookiedFormData[fieldName] = JSON.parse(cookiedFormData[fieldName]);\r\n }\r\n\r\n if (cookiedFormData[fieldName].City) {\r\n cityLabel += cookiedFormData[fieldName].City;\r\n }\r\n if (cookiedFormData[fieldName].State) {\r\n cityLabel += `, ${cookiedFormData[fieldName].State}`;\r\n }\r\n return cityLabel;\r\n}\r\n\r\nconst populateCookieData = () => {\r\n return new Promise((resolve, reject) => {\r\n var businessTypeQueryString = getURLParam(\"BusinessType\");\r\n let cookiedFormData = sessionStorage.getItem('pods-quote-flow-form');\r\n if (cookiedFormData) {\r\n cookiedFormData = JSON.parse(cookiedFormData);\r\n if (businessTypeQueryString) {\r\n cookiedFormData.serviceType = businessTypeQueryString;\r\n } \r\n }\r\n\r\n window.quoteFlowContent.Steps.map((step) => {\r\n step.Input.map((option) => {\r\n if ((cookiedFormData && (cookiedFormData[option.Name] && (!option.Value) || option.Name == \"moveType\"))) {\r\n option.Value = cookiedFormData[option.Name];\r\n } else if ((cookiedFormData && cookiedFormData[option.Name]) && option.Value.constructor === Array && option.Name !== 'quoteTypeLink') {\r\n if (option.Name.toLowerCase().indexOf('city') > -1) {\r\n option.Value = [{ Label: getCityLabel(cookiedFormData, option.Name), Value: cookiedFormData[option.Name], Selected: true }]\r\n } else {\r\n option.Value.map((opt) => {\r\n if (opt.Value === cookiedFormData[option.Name]) {\r\n opt.Selected = true;\r\n } else {\r\n opt.Selected = false;\r\n }\r\n })\r\n }\r\n }\r\n });\r\n });\r\n resolve();\r\n });\r\n}\r\n\r\nconst startRenderingReact = () => {\r\n if (quoteFlowAppDomElement) {\r\n ReactDOM.render( , quoteFlowAppDomElement);\r\n }\r\n}\r\n\r\nif (window.quoteFlowContent) {\r\n populateCookieData().then(startRenderingReact);\r\n}\r\n\r\nfunction getURLParam(param) {\r\n const half = location.search.split(param + '=')[1];\r\n return half !== undefined ? decodeURIComponent(half.split('&')[0]) : null;\r\n}","import QuoteFlowForm from './Code';\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", function(event) {\r\n window.podsQuoteFlow = new PodsQuoteFlow;\r\n});\r\n\r\nclass PodsQuoteFlow {\r\n constructor(){\r\n const quoteFlowForm = new QuoteFlowForm;\r\n }\r\n}","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n"],"sourceRoot":""}