/* Minification failed. Returning unminified contents.
(4004,18-26): run-time error JS1100: Expected ',': function
(4004,46-47): run-time error JS1004: Expected ';': {
(4017,31-36): run-time error JS1004: Expected ';': fetch
(4019,26-35): run-time error JS1004: Expected ';': _response
(4027,3-4): run-time error JS1002: Syntax error: }
(4029,10-11): run-time error JS1004: Expected ';': :
(4029,47-48): run-time error JS1004: Expected ';': {
(4036,26-30): run-time error JS1004: Expected ';': this
(4037,27-31): run-time error JS1004: Expected ';': this
(4038,29-33): run-time error JS1004: Expected ';': this
(4039,31-35): run-time error JS1004: Expected ';': this
(4040,33-37): run-time error JS1004: Expected ';': this
(4052,3-4): run-time error JS1002: Syntax error: }
(4054,10-11): run-time error JS1004: Expected ';': :
(4054,49-50): run-time error JS1004: Expected ';': {
(4055,13-17): run-time error JS1004: Expected ';': this
(4062,3-4): run-time error JS1002: Syntax error: }
(4064,10-11): run-time error JS1004: Expected ';': :
(4064,39-40): run-time error JS1004: Expected ';': {
(4070,3-4): run-time error JS1002: Syntax error: }
(4072,10-11): run-time error JS1004: Expected ';': :
(4072,39-40): run-time error JS1004: Expected ';': {
(4078,3-4): run-time error JS1002: Syntax error: }
(4080,10-11): run-time error JS1004: Expected ';': :
(4080,39-40): run-time error JS1004: Expected ';': {
(4083,3-4): run-time error JS1002: Syntax error: }
(4085,10-11): run-time error JS1004: Expected ';': :
(4085,30-31): run-time error JS1004: Expected ';': {
(4114,3-4): run-time error JS1002: Syntax error: }
(4169,18-26): run-time error JS1100: Expected ',': function
(4169,51-52): run-time error JS1004: Expected ';': {
(4196,3-4): run-time error JS1002: Syntax error: }
(4198,10-11): run-time error JS1004: Expected ';': :
(4198,62-63): run-time error JS1004: Expected ';': {
(4203,3-4): run-time error JS1002: Syntax error: }
(4205,10-11): run-time error JS1004: Expected ';': :
(4205,55-56): run-time error JS1004: Expected ';': {
(4221,31-35): run-time error JS1004: Expected ';': this
(4224,27-32): run-time error JS1004: Expected ';': fetch
(4226,29-32): run-time error JS1004: Expected ';': res
(4250,3-4): run-time error JS1002: Syntax error: }
(4252,10-11): run-time error JS1004: Expected ';': :
(4252,46-47): run-time error JS1004: Expected ';': {
(4265,3-4): run-time error JS1002: Syntax error: }
(4267,10-11): run-time error JS1004: Expected ';': :
(4267,54-55): run-time error JS1004: Expected ';': {
(4279,3-4): run-time error JS1002: Syntax error: }
(4281,10-11): run-time error JS1004: Expected ';': :
(4281,12-20): run-time error JS1197: Too many errors. The file might not be a JavaScript file: function
(4227,15-25): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: Affiliates
(4228,15-20): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: Total
(4229,15-21): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: Errors
(4194,7-23): run-time error JS1018: 'return' statement outside of function: return httpProps
(4089,7,4112,10): run-time error JS1018: 'return' statement outside of function: return React.createElement(KcaFormWrapper, null, React.createElement(KcaFormInputs, {
        handleInput: this.props.handleInput,
        receivePayload: this.props.receivePayload,
        getCurrentLocationUrl: this.props.getCurrentLocationUrl,
        ref: this.child
      }), React.createElement(KcaControls, {
        openModal: this.handleShowModal.bind(this)
      }), React.createElement(KcaSelectedFilters, {
        removeSelectedFilter: this.props.removeSelectedFilter,
        selectedItems: this.props.selectedItems,
        clearSearchResults: this.props.clearSearchResults,
        postResults: this.props.postResults
      }), isShowModal && React.createElement(KcaMultiSearchMain, {
        removeAllFilters: this.props.removeAllFilters,
        filterItems: this.props.filterItems,
        getCheckedFilters: this.props.getCheckedFilters,
        filters: filters,
        receivePayload: this.props.receivePayload,
        receiveFilters: this.props.receiveFilters,
        closeModal: this.handleHideModal.bind(this),
        getItems: this.getItems,
        applyFilters: this.props.applyFilters,
        ref: this.modalRef
      }))
(4020,9-20): run-time error JS1018: 'return' statement outside of function: return data
 */
"use strict";

function _extends() { _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; }; return _extends.apply(this, arguments); }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }

function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return !!right[Symbol.hasInstance](left); } else { return left instanceof right; } }

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }

function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }

function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

var AffiliateMain =
/*#__PURE__*/
function (_React$Component) {
  _inherits(AffiliateMain, _React$Component);

  function AffiliateMain(props) {
    var _this;

    _classCallCheck(this, AffiliateMain);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(AffiliateMain).call(this, props));
    _this._searchForm = React.createRef();
    _this._results = React.createRef();
    _this.state = {
      payload: {
        firstname: '',
        lastname: '',
        city: '',
        specialty: '',
        physicianGroup: '',
        providerType: ''
      },
      itemsPerPage: 25,
      startPage: 0,
      pages: [],
      hasNoResults: false
    };
    _this.handleSubmit = _this.handleSubmit.bind(_assertThisInitialized(_this));
    _this.handleClearForm = _this.handleClearForm.bind(_assertThisInitialized(_this));
    _this.handleChangePage = _this.handleChangePage.bind(_assertThisInitialized(_this));
    _this.handleSetSearchParams = _this.handleSetSearchParams.bind(_assertThisInitialized(_this));
    return _this;
  }

  _createClass(AffiliateMain, [{
    key: "handleSetSearchParams",
    value: function handleSetSearchParams(fields) {
      var _this2 = this;

      this.setState({
        startPage: 0,
        payload: {
          firstname: fields.firstname,
          lastname: fields.lastname,
          city: fields.city,
          specialty: fields.specialty,
          physicianGroup: fields.physicianGroup,
          providerType: this.props.data.providerType
        }
      }, function () {
        _this2.handleSubmit();
      });
    }
  }, {
    key: "handleSubmit",
    value: function handleSubmit() {
      var updatePages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
      jQuery.post("".concat(this.props.data.apiUrl, "?start=").concat(this.state.startPage, "&rows=").concat(this.state.itemsPerPage), this.state.payload, function (res) {
        if (res.Affiliates.length > 0) {
          this._results.current.loadAffiliates(res.Affiliates);

          if (updatePages) {
            this.setState({
              hasNoResults: false,
              pages: _toConsumableArray(Array(res.Total).keys()).map(function (i) {
                return {
                  id: i + 1
                };
              })
            });
          }

          var element = document.getElementById('search-results');
          var headerOffset = 160;
          var elementPosition = element.getBoundingClientRect().top;
          var offsetPosition = elementPosition + window.pageYOffset - headerOffset;
          window.scrollTo({
            top: offsetPosition,
            behavior: "smooth"
          });
        } else {
          this.setState({
            hasNoResults: true,
            pages: []
          });
        }
      }.bind(this));
    }
  }, {
    key: "handleClearForm",
    value: function handleClearForm() {
      this._results.current.loadAffiliates([]);

      this.setState({
        pages: [],
        hasNoResults: false
      });
    }
  }, {
    key: "handleChangePage",
    value: function handleChangePage(pageData) {
      var _this3 = this;

      this.setState({
        startPage: (pageData[0].id - 1) / this.state.itemsPerPage
      }, function () {
        _this3.handleSubmit(false);
      });
    }
  }, {
    key: "render",
    value: function render() {
      return React.createElement("div", {
        className: "affiliate-search"
      }, React.createElement(AffiliateSearchForm, {
        ref: this._searchForm,
        submitSearchCallback: this.handleSetSearchParams,
        clearFormCallback: this.handleClearForm,
        data: this.props.data
      }), React.createElement(AffiliateSearchResults, {
        ref: this._results,
        settings: this.props.data.Settings,
        hasNoResults: this.state.hasNoResults
      }), React.createElement(Pagination, {
        items: this.state.pages,
        onChangePage: this.handleChangePage,
        itemsPerPage: this.state.itemsPerPage
      }));
    }
  }]);

  return AffiliateMain;
}(React.Component);

;

var AffiliateSearchForm =
/*#__PURE__*/
function (_React$Component2) {
  _inherits(AffiliateSearchForm, _React$Component2);

  function AffiliateSearchForm(props) {
    var _this4;

    _classCallCheck(this, AffiliateSearchForm);

    _this4 = _possibleConstructorReturn(this, _getPrototypeOf(AffiliateSearchForm).call(this, props));
    _this4._firstname = React.createRef();
    _this4._lastname = React.createRef();
    _this4._cities = React.createRef();
    _this4._specialties = React.createRef();
    _this4._physicianGroups = React.createRef();
    _this4.handleSubmit = _this4.handleSubmit.bind(_assertThisInitialized(_this4));
    _this4.handleClearForm = _this4.handleClearForm.bind(_assertThisInitialized(_this4));
    return _this4;
  }

  _createClass(AffiliateSearchForm, [{
    key: "handleSubmit",
    value: function handleSubmit(event) {
      event.preventDefault();
      this.props.submitSearchCallback({
        firstname: this._firstname.current.value,
        lastname: this._lastname.current.value,
        specialty: this._specialties.value,
        city: this._cities.value,
        physicianGroup: this._physicianGroups.value
      });
    }
  }, {
    key: "handleClearForm",
    value: function handleClearForm(event) {
      event.preventDefault();
      this.props.clearFormCallback();
      this._firstname.current.value = '';
      this._lastname.current.value = '';
      this._specialties.value = '';
      this._cities.value = '';
      this._physicianGroups.value = '';
    }
  }, {
    key: "render",
    value: function render() {
      var _this5 = this;

      return React.createElement("div", {
        className: "affiliate-search-form"
      }, React.createElement("form", {
        onSubmit: this.handleSubmit
      }, React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label"
      }, React.createElement("span", {
        className: "input-label-text"
      }, "First Name:"), React.createElement("input", {
        ref: this._firstname,
        id: "input-firstname",
        className: "input-text",
        type: "text",
        name: "firstName"
      }))), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label"
      }, React.createElement("span", {
        className: "input-label-text"
      }, "Last Name:"), React.createElement("input", {
        ref: this._lastname,
        id: "input-lastname",
        className: "input-text",
        type: "text",
        name: "lastname"
      }))), React.createElement(Dropdown, {
        select: function select(input) {
          return _this5._specialties = input;
        },
        label: 'Specialty',
        optionsUrl: this.props.data.apiSpecialtiesUrl,
        payloadTitle: 'ProviderType',
        providerType: this.props.data.providerType,
        defaultOptionText: 'All Specialties'
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this5._cities = input;
        },
        label: 'City',
        optionsUrl: this.props.data.apiCitiesUrl,
        payloadTitle: 'ProviderType',
        providerType: this.props.data.providerType,
        defaultOptionText: 'All Cities'
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this5._physicianGroups = input;
        },
        label: 'Physician Group',
        optionsUrl: this.props.data.apiPhysicianGroupsUrl,
        payloadTitle: 'ProviderType',
        providerType: this.props.data.providerType,
        defaultOptionText: 'All Physician Groups'
      }), React.createElement("div", {
        className: "submit-button d-flex gap-3"
      }, React.createElement("button", {
        className: "cta-primary",
        onClick: this.handleSubmit
      }, "Search"), React.createElement("button", {
        className: "btn btn-primary default-primary-button-white",
        onClick: this.handleClearForm
      }, "Clear All"))));
    }
  }]);

  return AffiliateSearchForm;
}(React.Component);

;

var AffiliateSearchResults =
/*#__PURE__*/
function (_React$Component3) {
  _inherits(AffiliateSearchResults, _React$Component3);

  function AffiliateSearchResults(props) {
    var _this6;

    _classCallCheck(this, AffiliateSearchResults);

    _this6 = _possibleConstructorReturn(this, _getPrototypeOf(AffiliateSearchResults).call(this, props));
    _this6.state = {
      affiliates: []
    };
    _this6.loadAffiliates = _this6.loadAffiliates.bind(_assertThisInitialized(_this6));
    return _this6;
  }

  _createClass(AffiliateSearchResults, [{
    key: "loadAffiliates",
    value: function loadAffiliates(affiliates) {
      this.setState({
        affiliates: affiliates
      });
    }
  }, {
    key: "render",
    value: function render() {
      if (this.props.hasNoResults) {
        return React.createElement(NoResults, null);
      } else {
        return React.createElement("div", {
          id: "search-results",
          className: "results-section"
        }, React.createElement("div", null, this.state.affiliates.map(function (affiliate) {
          return React.createElement("div", null, React.createElement("hr", null), React.createElement("div", null, React.createElement("p", {
            className: "body-regular",
            style: {
              marginBottom: '1.5rem',
              fontWeight: 'bold'
            }
          }, "Specialty: ", affiliate.AffiliateSpecialty), React.createElement("p", {
            className: "body-regular",
            style: {
              marginBottom: '0'
            }
          }, affiliate.AffiliateCounty, " County"), React.createElement("p", {
            className: "body-regular",
            style: {
              marginBottom: '1.5rem'
            }
          }, "City of ", affiliate.AffiliateCity), React.createElement("h4", {
            className: "h4",
            style: {
              marginBottom: '1.5rem'
            }
          }, affiliate.AffiliatePhysicianGroup), React.createElement("span", {
            className: "body-regular",
            "aria-label": "Address",
            style: {
              marginBottom: '0',
              display: 'block'
            }
          }, React.createElement("div", null, React.createElement("p", {
            style: {
              marginBottom: '0'
            }
          }, affiliate.AffiliateAddress), React.createElement("p", {
            style: {
              marginBottom: '0'
            }
          }, affiliate.AffiliateCity, ", ", affiliate.AffiliateState, " ", affiliate.AffiliateZipCode))), React.createElement("a", {
            href: "tel:+".concat(affiliate.AffiliatePhoneNumber),
            className: "body-regular",
            style: {
              marginBottom: '1.5rem',
              display: 'block',
              fontSize: '20px',
              textDecoration: 'none',
              color: "#1d5f6d",
              fontWeight: '700',
              outlineOffset: "unset",
              outline: '0'
            }
          }, affiliate.AffiliatePhoneNumber), React.createElement("h3", {
            className: "h3",
            style: {
              marginBottom: '1.5rem'
            }
          }, affiliate.AffiliateFirstName, " ", affiliate.AffiliateLastName, ", ", affiliate.AffiliateDegree), React.createElement("p", {
            className: "body-regular",
            style: {
              marginBottom: '.5rem'
            }
          }, "Accepting New Patients: ", affiliate.AffiliateAcceptingNewPatients ? 'Yes' : 'No')));
        }, this)));
      }
    }
  }]);

  return AffiliateSearchResults;
}(React.Component);

;

var CoverageQuestionMembership =
/*#__PURE__*/
function (_React$Component4) {
  _inherits(CoverageQuestionMembership, _React$Component4);

  function CoverageQuestionMembership(props) {
    var _this7;

    _classCallCheck(this, CoverageQuestionMembership);

    _this7 = _possibleConstructorReturn(this, _getPrototypeOf(CoverageQuestionMembership).call(this, props));
    _this7.state = {
      name: {
        type: 'field',
        label: 'Member Name',
        ref: React.createRef(),
        id: 'memberName',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return true;
        }
      },
      phone: {
        type: 'field',
        label: 'Member Phone',
        ref: React.createRef(),
        id: 'memberPhone',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return true;
        }
      },
      dob: {
        type: 'field',
        label: 'Member Date of Birth',
        ref: React.createRef(),
        id: 'memberDob',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return true;
        }
      },
      memberId: {
        type: 'field',
        label: 'Member ID (KelseyCare Advantage #)',
        ref: React.createRef(),
        id: 'memberId',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return true;
        }
      }
    };
    return _this7;
  }

  _createClass(CoverageQuestionMembership, [{
    key: "render",
    value: function render() {
      var name = this.state.name;
      var phone = this.state.phone;
      var dob = this.state.dob;
      var memberId = this.state.memberId;
      return React.createElement("div", {
        className: "section-member-info"
      }, React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!name.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, name.label, "*"), React.createElement("input", {
        ref: name.ref,
        id: name.id,
        className: "input-text",
        type: "text",
        name: "name",
        "aria-required": "true",
        "aria-describedby": name.isValid ? null : "".concat(name.id, "_error"),
        "aria-invalid": !name.isValid
      })), name.isValid ? null : React.createElement("span", {
        id: "".concat(name.id, "_error"),
        className: "validation-error-message"
      }, name.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!phone.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, phone.label, "*"), React.createElement("input", {
        ref: phone.ref,
        id: phone.id,
        className: "input-text",
        type: "tel",
        name: "phone",
        maxLength: "10",
        minLength: "10",
        "aria-required": "true",
        "aria-describedby": phone.isValid ? null : "".concat(phone.id, "_error"),
        "aria-invalid": !phone.isValid
      })), phone.isValid ? null : React.createElement("span", {
        id: "".concat(phone.id, "_error"),
        className: "validation-error-message"
      }, phone.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!dob.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, dob.label, "*"), React.createElement("input", {
        ref: dob.ref,
        id: dob.id,
        className: "input-text",
        type: "date",
        name: "dob",
        "aria-required": "true",
        "aria-describedby": dob.isValid ? null : "".concat(dob.id, "_error"),
        "aria-invalid": !dob.isValid
      })), dob.isValid ? null : React.createElement("span", {
        id: "".concat(dob.id, "_error"),
        className: "validation-error-message"
      }, dob.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!memberId.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, memberId.label, "*"), React.createElement("input", {
        ref: memberId.ref,
        id: memberId.id,
        className: "input-text",
        type: "text",
        name: "memberId",
        "aria-required": "true",
        "aria-describedby": memberId.isValid ? null : "".concat(memberId.id, "_error"),
        "aria-invalid": !memberId.isValid
      })), memberId.isValid ? null : React.createElement("span", {
        id: "".concat(memberId.id, "_error"),
        className: "validation-error-message"
      }, memberId.label, " is required")));
    }
  }]);

  return CoverageQuestionMembership;
}(React.Component);

;

var CoverageQuestionnaireMain =
/*#__PURE__*/
function (_React$Component5) {
  _inherits(CoverageQuestionnaireMain, _React$Component5);

  function CoverageQuestionnaireMain(props) {
    var _this8;

    _classCallCheck(this, CoverageQuestionnaireMain);

    _this8 = _possibleConstructorReturn(this, _getPrototypeOf(CoverageQuestionnaireMain).call(this, props));

    _defineProperty(_assertThisInitialized(_this8), "states", [{
      text: 'ALABAMA',
      value: 'AL'
    }, {
      text: 'ALASKA',
      value: 'AK'
    }, {
      text: 'ARIZONA',
      value: 'AZ'
    }, {
      text: 'ARKANSAS',
      value: 'AR'
    }, {
      text: 'CALIFORNIA',
      value: 'CA'
    }, {
      text: 'COLORADO',
      value: 'CO'
    }, {
      text: 'CONNECTICUT',
      value: 'CT'
    }, {
      text: 'DELAWARE',
      value: 'DE'
    }, {
      text: 'DISTRICT OF COLUMBIA',
      value: 'DC'
    }, {
      text: 'FLORIDA',
      value: 'FL'
    }, {
      text: 'GEORGIA',
      value: 'GA'
    }, {
      text: 'GUAM',
      value: 'GU'
    }, {
      text: 'HAWAII',
      value: 'HI'
    }, {
      text: 'IDAHO',
      value: 'ID'
    }, {
      text: 'ILLINOIS',
      value: 'IL'
    }, {
      text: 'INDIANA',
      value: 'IN'
    }, {
      text: 'IOWA',
      value: 'IA'
    }, {
      text: 'KANSAS',
      value: 'KS'
    }, {
      text: 'KENTUCKY',
      value: 'KY'
    }, {
      text: 'LOUISIANA',
      value: 'LA'
    }, {
      text: 'MAINE',
      value: 'ME'
    }, {
      text: 'MARYLAND',
      value: 'MD'
    }, {
      text: 'MASSACHUSETTS',
      value: 'MA'
    }, {
      text: 'MICHIGAN',
      value: 'MI'
    }, {
      text: 'MINNESOTA',
      value: 'MN'
    }, {
      text: 'MISSISSIPPI',
      value: 'MS'
    }, {
      text: 'MISSOURI',
      value: 'MO'
    }, {
      text: 'MONTANA',
      value: 'MT'
    }, {
      text: 'NEBRASKA',
      value: 'NE'
    }, {
      text: 'NEVADA',
      value: 'NV'
    }, {
      text: 'NEW HAMPSHIRE',
      value: 'NH'
    }, {
      text: 'NEW JERSEY',
      value: 'NJ'
    }, {
      text: 'NEW MEXICO',
      value: 'NM'
    }, {
      text: 'NEW YORK',
      value: 'NY'
    }, {
      text: 'NORTH CAROLINA',
      value: 'NC'
    }, {
      text: 'NORTH DAKOTA',
      value: 'ND'
    }, {
      text: 'OHIO',
      value: 'OH'
    }, {
      text: 'OKLAHOMA',
      value: 'OK'
    }, {
      text: 'OREGON',
      value: 'OR'
    }, {
      text: 'PENNSYLVANIA',
      value: 'PA'
    }, {
      text: 'RHODE ISLAND',
      value: 'RI'
    }, {
      text: 'SOUTH CAROLINA',
      value: 'SC'
    }, {
      text: 'SOUTH DAKOTA',
      value: 'SD'
    }, {
      text: 'TENNESSEE',
      value: 'TN'
    }, {
      text: 'TEXAS',
      value: 'TX'
    }, {
      text: 'UTAH',
      value: 'UT'
    }, {
      text: 'VERMONT',
      value: 'VT'
    }, {
      text: 'VIRGINIA',
      value: 'VA'
    }, {
      text: 'WASHINGTON',
      value: 'WA'
    }, {
      text: 'WEST VIRGINIA',
      value: 'WV'
    }, {
      text: 'WISCONSIN',
      value: 'WI'
    }, {
      text: 'WYOMING',
      value: 'WY'
    }]);

    _this8.state = {
      validationErrors: [],
      isAcknowledged: false,
      submissionSuccessful: false,
      submissionFailure: false,
      isSubmitting: false
    };
    _this8._questionMembership = React.createRef();
    _this8._questionOne = React.createRef();
    _this8._questionTwo = React.createRef();
    _this8._questionThree = React.createRef();
    _this8._acknowledgement = React.createRef();
    _this8.handleSubmit = _this8.handleSubmit.bind(_assertThisInitialized(_this8));
    _this8.postSubmission = _this8.postSubmission.bind(_assertThisInitialized(_this8));
    return _this8;
  }

  _createClass(CoverageQuestionnaireMain, [{
    key: "handleSubmit",
    value: function handleSubmit(e) {
      e.preventDefault();

      var fields = _objectSpread({}, this._questionMembership.current.state, {}, this._questionOne.current.state, {}, this._questionTwo.current.state, {}, this._questionThree.current.state, {}, this.state);

      var validationErrors = [];
      Object.keys(fields).forEach(function (item) {
        var field = fields[item];

        if (field.type === 'field' && field.shouldValidate()) {
          if (field.ref.current && field.ref.current.value === "" || !field.ref.current && field.ref.value === "") {
            field.isValid = false;
            validationErrors.push(field);
          } else {
            field.isValid = true;
          }
        }
      });

      if (validationErrors.length > 0) {
        this.setState({
          validationErrors: validationErrors
        });
      } else {
        this.setState({
          validationErrors: []
        });
        this.postSubmission(fields);
      }
    }
  }, {
    key: "postSubmission",
    value: function postSubmission(payload) {
      var _this9 = this;

      this.setState({
        isSubmitting: true
      }, function () {
        var data = {
          MemberName: payload.name.ref.current.value,
          MemberPhone: payload.phone.ref.current.value,
          MemberDateOfBirth: payload.dob.ref.current.value,
          MemberID: payload.memberId.ref.current.value,
          Q01IsPersonsWorking: payload.q1.value,
          Q01WorkingPersonsName: payload.memberId.ref.current.value,
          Q01IsSpouseCeasedWorking: payload.q1SpouseCeasedWorking.value,
          Q01IsYouCeasedWorking: payload.q1YouCeasedWorking.value,
          Q01YouDateOfTermination: payload.q1YourTerminationDate.ref.current ? payload.q1YourTerminationDate.ref.current.value : null,
          Q01SpouseDateOfTermination: payload.q1SpouseTerminationDate.ref.current ? payload.q1SpouseTerminationDate.ref.current.value : null,
          Q02IsCoverageThroughEmployer: payload.q2.value,
          Q02EmployerSize: payload.q2EmployeeCount.value ? payload.q2EmployeeCount.value : null,
          Q02EmployerName: payload.q2EmployerName.ref.current ? payload.q2EmployerName.ref.current.value : null,
          Q02EmployerAddress: payload.q2Address.ref.current ? payload.q2Address.ref.current.value : null,
          Q02EmployerCity: payload.q2City.ref.current ? payload.q2City.ref.current.value : null,
          Q02EmployerState: payload.q2State.ref.value ? payload.q2State.ref.value : null,
          Q02EmployerZipCode: payload.q2Zip.ref.current ? payload.q2Zip.ref.current.value : null,
          Q02GroupHealthPlanID: payload.q2GroupPlanId.ref.current ? payload.q2GroupPlanId.ref.current.value : null,
          Q02GroupHealthPlanName: payload.q2GroupHealthName.ref.current ? payload.q2GroupHealthName.ref.current.value : null,
          Q02GroupHealthPlanAddress: payload.q2GroupHealthAddress.ref.current ? payload.q2GroupHealthAddress.ref.current.value : null,
          Q02GroupHealthPlanCity: payload.q2GroupHealthCity.ref.current ? payload.q2GroupHealthCity.ref.current.value : null,
          Q02GroupHealthPlanState: payload.q2GroupHealthState.ref.value ? payload.q2GroupHealthState.ref.value : null,
          Q02GroupHealthPlanZipCode: payload.q2GroupHealthZipCode.ref.current ? payload.q2GroupHealthZipCode.ref.current.value : null,
          Q03IsCoverageThroughFamilyMember: payload.q3.value,
          Q03Relationship: payload.q3Relationship.ref.current ? payload.q3Relationship.ref.current.value : null,
          Q03IsFamilyMemberEmployed: payload.q3FamilyMemberEmployed.value,
          Q03EmployerSize: payload.q3FamilyMemberEmployeeCount.value,
          Q03EmployerName: payload.q3EmployerName.ref.current ? payload.q3EmployerName.ref.current.value : null,
          Q03EmployerAddress: payload.q3Address.ref.current ? payload.q3Address.ref.current.value : null,
          Q03EmployerCity: payload.q3City.ref.current ? payload.q3City.ref.current.value : null,
          Q03EmployerState: payload.q3State.ref.value ? payload.q3State.ref.value : null,
          Q03EmployerZipCode: payload.q3Zip.ref.current ? payload.q3Zip.ref.current.value : null,
          Q03GroupHealthPlanID: payload.q3GroupPlanId.ref.current ? payload.q3GroupPlanId.ref.current.value : null,
          Q03GroupHealthPlanName: payload.q3GroupHealthName.ref.current ? payload.q3GroupHealthName.ref.current.value : null,
          Q03GroupHealthPlanAddress: payload.q3GroupHealthAddress.ref.current ? payload.q3GroupHealthAddress.ref.current.value : null,
          Q03GroupHealthPlanCity: payload.q3GroupHealthCity.ref.current ? payload.q3GroupHealthCity.ref.current.value : null,
          Q03GroupHealthPlanState: payload.q3GroupHealthState.ref.value ? payload.q3GroupHealthState.ref.value : null,
          Q03GroupHealthPlanZipCode: payload.q3GroupHealthZipCode.ref.current ? payload.q3GroupHealthZipCode.ref.current.value : null,
          Acknowledgement: payload.isAcknowledged ? 'yes' : 'no'
        };
        jQuery.post(_this9.props.data.submitQuestionnaireUrl, data, function (res) {
          if (res !== 1) {
            _this9.setState({
              submissionFailure: true,
              isSubmitting: false
            });
          } else {
            _this9.setState({
              submissionSuccessful: true,
              isSubmitting: false
            });
          }
        }.bind(_this9)).fail(function () {
          _this9.setState({
            submissionFailure: true,
            isSubmitting: false
          });
        });
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this10 = this;

      if (this.state.submissionFailure) {
        return React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.failureMessage
          }
        });
      } else if (this.state.submissionSuccessful) {
        return React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.successMessage
          }
        });
      } else {
        return React.createElement("div", {
          className: "coverage-form"
        }, React.createElement("form", {
          onSubmit: this.handleSubmit
        }, React.createElement(CoverageQuestionMembership, {
          ref: this._questionMembership
        }), React.createElement(CoverageQuestionOne, {
          ref: this._questionOne
        }), React.createElement(CoverageQuestionTwo, {
          ref: this._questionTwo,
          states: this.states
        }), React.createElement(CoverageQuestionThree, {
          ref: this._questionThree,
          states: this.states
        }), React.createElement("div", {
          className: "section-acknowledgement"
        }, React.createElement("p", {
          className: "heading-five acknowledgement"
        }, "Acknowledgement *"), React.createElement(Checkbox, {
          ref: this._acknowledgement,
          label: 'By submitting this questionnaire, I acknowledge that I am the member or member representative and that the information completed on this form is accurate to the best of my knowledge',
          handleRadioChange: function handleRadioChange(isAcknowledged) {
            return _this10.setState({
              isAcknowledged: isAcknowledged
            });
          },
          value: 'acknowledgement'
        })), React.createElement("div", {
          className: "submit-button"
        }, React.createElement("button", {
          className: "cta-primary",
          type: "submit",
          disabled: !this.state.isAcknowledged || this.state.isSubmitting,
          "aria-disabled": !this.state.isAcknowledged || this.state.isSubmitting
        }, "Submit"))));
      }
    }
  }]);

  return CoverageQuestionnaireMain;
}(React.Component);

;

var CoverageQuestionOne =
/*#__PURE__*/
function (_React$Component6) {
  _inherits(CoverageQuestionOne, _React$Component6);

  function CoverageQuestionOne(props) {
    var _this11;

    _classCallCheck(this, CoverageQuestionOne);

    _this11 = _possibleConstructorReturn(this, _getPrototypeOf(CoverageQuestionOne).call(this, props));
    _this11.state = {
      q1: {
        type: 'field',
        label: 'Q1. At the present time are you (the member) or your spouse working?*',
        value: 'yes',
        shouldValidate: function shouldValidate() {
          return false;
        },
        options: [{
          label: 'Yes',
          value: 'yes'
        }, {
          label: 'No',
          value: 'no'
        }]
      },
      q1WorkingPersons: {
        type: 'field',
        label: 'Name of working person(s)',
        ref: React.createRef(),
        id: 'q1WorkingPersons',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this11.state.q1.value === 'yes';
        }
      },
      q1YourTerminationDate: {
        type: 'field',
        label: 'Date of Retirement/Date of Employment Termination',
        ref: React.createRef(),
        id: 'q1YourTerminationDate',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this11.state.q1.value === 'no' && _this11.state.q1YouCeasedWorking.value;
        }
      },
      q1SpouseTerminationDate: {
        type: 'field',
        label: 'Date of Retirement/Date of Employment Termination',
        ref: React.createRef(),
        id: 'q1SpouseTerminationDate',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this11.state.q1.value === 'no' && _this11.state.q1SpouseCeasedWorking.value;
        }
      },
      q1YouCeasedWorking: {
        type: 'field',
        label: 'You',
        ref: React.createRef(),
        id: 'q1YouCeasedWorking',
        isValid: true,
        value: false,
        shouldValidate: function shouldValidate() {
          return false;
        }
      },
      q1SpouseCeasedWorking: {
        type: 'field',
        label: 'Spouse',
        ref: React.createRef(),
        id: 'q1SpouseCeasedWorking',
        isValid: true,
        value: false,
        shouldValidate: function shouldValidate() {
          return false;
        }
      }
    };
    return _this11;
  }

  _createClass(CoverageQuestionOne, [{
    key: "render",
    value: function render() {
      var _this12 = this;

      var q1 = this.state.q1;
      var q1WorkingPersons = this.state.q1WorkingPersons;
      var q1YourTerminationDate = this.state.q1YourTerminationDate;
      var q1SpouseTerminationDate = this.state.q1SpouseTerminationDate;
      var q1YouCeasedWorking = this.state.q1YouCeasedWorking;
      var q1SpouseCeasedWorking = this.state.q1SpouseCeasedWorking;
      return React.createElement("div", {
        className: "section-q1"
      }, React.createElement(RadioCollection, {
        name: 'q1',
        handleRadioChange: function handleRadioChange(value) {
          var tempQ1 = _objectSpread({}, q1);

          tempQ1.value = value;
          return _this12.setState({
            q1: tempQ1
          });
        },
        selectedCategory: q1.value,
        title: q1.label,
        options: q1.options
      }), q1.value === 'yes' ? React.createElement("div", {
        className: "sub-questions"
      }, React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q1WorkingPersons.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q1WorkingPersons.label), React.createElement("input", {
        ref: q1WorkingPersons.ref,
        id: q1WorkingPersons.id,
        className: "input-text",
        type: "text",
        name: "workingPersons",
        "aria-required": "true",
        "aria-describedby": q1WorkingPersons.isValid ? null : "".concat(q1WorkingPersons.id, "_error"),
        "aria-invalid": !q1WorkingPersons.isValid
      })), q1WorkingPersons.isValid ? null : React.createElement("span", {
        id: "".concat(q1WorkingPersons.id, "_error"),
        className: "validation-error-message"
      }, q1WorkingPersons.label, " is required"))) : React.createElement("div", {
        className: "sub-questions"
      }, React.createElement("p", {
        class: "heading-five"
      }, "If not working, please supply the date that you and/or your spouse ceased working (i.e., date of retirement or date of employment termination)*"), React.createElement(Checkbox, {
        ref: q1YouCeasedWorking.ref,
        label: q1YouCeasedWorking.label,
        handleRadioChange: function handleRadioChange(isChecked) {
          var tempQ1YouCeasedWorking = _objectSpread({}, q1YouCeasedWorking);

          tempQ1YouCeasedWorking.value = isChecked;
          return _this12.setState({
            q1YouCeasedWorking: tempQ1YouCeasedWorking
          });
        },
        value: false
      }), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q1YourTerminationDate.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q1YourTerminationDate.label, "*"), React.createElement("input", {
        ref: q1YourTerminationDate.ref,
        id: q1YourTerminationDate.id,
        className: "input-text",
        type: "date",
        "aria-describedby": q1YourTerminationDate.isValid ? null : "".concat(q1YourTerminationDate.id, "_error"),
        disabled: !q1YouCeasedWorking.value
      })), q1YourTerminationDate.isValid ? null : React.createElement("span", {
        id: "".concat(q1YourTerminationDate.id, "_error"),
        className: "validation-error-message"
      }, "Your ", q1YourTerminationDate.label, " is required")), React.createElement(Checkbox, {
        ref: q1SpouseCeasedWorking.ref,
        label: q1SpouseCeasedWorking.label,
        handleRadioChange: function handleRadioChange(isChecked) {
          var tempQ1SpouseCeasedWorking = _objectSpread({}, q1SpouseCeasedWorking);

          tempQ1SpouseCeasedWorking.value = isChecked;
          return _this12.setState({
            q1SpouseCeasedWorking: tempQ1SpouseCeasedWorking
          });
        },
        value: false
      }), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q1SpouseTerminationDate.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q1SpouseTerminationDate.label, "*"), React.createElement("input", {
        ref: q1SpouseTerminationDate.ref,
        id: q1SpouseTerminationDate.id,
        className: "input-text",
        type: "date",
        "aria-describedby": q1SpouseTerminationDate.isValid ? null : "".concat(q1SpouseTerminationDate.id, "_error"),
        disabled: !q1SpouseCeasedWorking.value
      })), q1SpouseTerminationDate.isValid ? null : React.createElement("span", {
        id: "".concat(q1SpouseTerminationDate.id, "_error"),
        className: "validation-error-message"
      }, "Spouse's ", q1SpouseTerminationDate.label, " is required"))));
    }
  }]);

  return CoverageQuestionOne;
}(React.Component);

;

var CoverageQuestionThree =
/*#__PURE__*/
function (_React$Component7) {
  _inherits(CoverageQuestionThree, _React$Component7);

  function CoverageQuestionThree(props) {
    var _this13;

    _classCallCheck(this, CoverageQuestionThree);

    _this13 = _possibleConstructorReturn(this, _getPrototypeOf(CoverageQuestionThree).call(this, props));
    _this13.state = {
      q3: {
        type: 'field',
        label: 'Q3. Do you have group health plan coverage through a family member other than your spouse?*',
        value: 'no',
        shouldValidate: function shouldValidate() {
          return false;
        },
        options: [{
          label: 'No',
          value: 'no'
        }, {
          label: 'Yes',
          value: 'yes'
        }]
      },
      q3Relationship: {
        type: 'field',
        label: 'What is the Relatioship?',
        ref: React.createRef(),
        id: 'q3Relationship',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3FamilyMemberEmployed: {
        type: 'field',
        label: 'Is the family member currently employed?*',
        value: 'yes',
        shouldValidate: function shouldValidate() {
          return false;
        },
        options: [{
          label: 'Yes',
          value: 'yes'
        }, {
          label: 'No',
          value: 'no'
        }]
      },
      q3FamilyMemberEmployeeCount: {
        type: 'field',
        label: "How many employees does the family member's employer have?*",
        value: '1-99',
        shouldValidate: function shouldValidate() {
          return false;
        },
        options: [{
          label: '1-99 Employees',
          value: '1-99'
        }, {
          label: '100 or more Employees',
          value: '100+'
        }]
      },
      q3EmployerName: {
        type: 'field',
        label: 'Employer Name',
        ref: React.createRef(),
        id: 'q3EmployerName',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3Address: {
        type: 'field',
        label: 'Address',
        ref: React.createRef(),
        id: 'q3Address',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3City: {
        type: 'field',
        label: 'City',
        ref: React.createRef(),
        id: 'q3City',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3State: {
        type: 'field',
        id: 'employerState',
        label: 'Employer state',
        ref: React.createRef(),
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3Zip: {
        type: 'field',
        label: 'ZIP Code',
        ref: React.createRef(),
        id: 'q3Zip',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3GroupPlanId: {
        type: 'field',
        label: 'Group Health Plan Id',
        ref: React.createRef(),
        id: 'q3GroupPlanId',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3GroupHealthName: {
        type: 'field',
        label: 'Group Health Plan Name',
        ref: React.createRef(),
        id: 'q3GroupHealthName',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3GroupHealthAddress: {
        type: 'field',
        label: 'Address',
        ref: React.createRef(),
        id: 'q3GroupHealthAddress',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3GroupHealthCity: {
        type: 'field',
        label: 'City',
        ref: React.createRef(),
        id: 'q3GroupHealthCity',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3GroupHealthState: {
        type: 'field',
        id: 'q3GroupHealthState',
        label: 'Group health state',
        ref: React.createRef(),
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      },
      q3GroupHealthZipCode: {
        type: 'field',
        label: 'ZIP Code',
        ref: React.createRef(),
        id: 'q3GroupHealthZipCode',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this13.state.q3.value === 'yes';
        }
      }
    };
    return _this13;
  }

  _createClass(CoverageQuestionThree, [{
    key: "render",
    value: function render() {
      var _this14 = this;

      var q3 = this.state.q3;
      var q3Relationship = this.state.q3Relationship;
      var q3FamilyMemberEmployed = this.state.q3FamilyMemberEmployed;
      var q3FamilyMemberEmployeeCount = this.state.q3FamilyMemberEmployeeCount;
      var q3EmployerName = this.state.q3EmployerName;
      var q3Address = this.state.q3Address;
      var q3City = this.state.q3City;
      var q3State = this.state.q3State;
      var q3Zip = this.state.q3Zip;
      var q3GroupPlanId = this.state.q3GroupPlanId;
      var q3GroupHealthName = this.state.q3GroupHealthName;
      var q3GroupHealthAddress = this.state.q3GroupHealthAddress;
      var q3GroupHealthCity = this.state.q3GroupHealthCity;
      var q3GroupHealthState = this.state.q3GroupHealthState;
      var q3GroupHealthZipCode = this.state.q3GroupHealthZipCode;
      return React.createElement("div", {
        className: "section-q3"
      }, React.createElement(RadioCollection, {
        name: 'q3',
        handleRadioChange: function handleRadioChange(value) {
          var tempQ3 = _objectSpread({}, q3);

          tempQ3.value = value;
          return _this14.setState({
            q3: tempQ3
          });
        },
        selectedCategory: q3.value,
        title: q3.label,
        options: q3.options
      }), q3.value === 'no' ? null : React.createElement("div", {
        className: "sub-questions"
      }, React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q3Relationship.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q3Relationship.label, "*"), React.createElement("input", {
        ref: q3Relationship.ref,
        id: q3Relationship.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q3Relationship.isValid ? null : "".concat(q3Relationship.id, "_error"),
        "aria-invalid": !q3Relationship.isValid
      })), q3Relationship.isValid ? null : React.createElement("span", {
        id: "".concat(q3Relationship.id, "_error"),
        className: "validation-error-message"
      }, q3Relationship.label, " is required")), React.createElement(RadioCollection, {
        name: 'q3FamilyMemberEmployed',
        handleRadioChange: function handleRadioChange(value) {
          var tempQ3FamilyMemberEmployed = _objectSpread({}, q3FamilyMemberEmployed);

          tempQ3FamilyMemberEmployed.value = value;
          return _this14.setState({
            q3FamilyMemberEmployed: tempQ3FamilyMemberEmployed
          });
        },
        selectedCategory: q3FamilyMemberEmployed.value,
        title: q3FamilyMemberEmployed.label,
        options: q3FamilyMemberEmployed.options
      }), React.createElement(RadioCollection, {
        name: 'q3FamilyMemberEmployeeCount',
        handleRadioChange: function handleRadioChange(value) {
          var tempQ3FamilyMemberEmployeeCount = _objectSpread({}, q3FamilyMemberEmployeeCount);

          tempQ3FamilyMemberEmployeeCount.value = value;
          return _this14.setState({
            q3FamilyMemberEmployeeCount: tempQ3FamilyMemberEmployeeCount
          });
        },
        selectedCategory: q3FamilyMemberEmployeeCount.value,
        title: q3FamilyMemberEmployeeCount.label,
        options: q3FamilyMemberEmployeeCount.options
      }), React.createElement("p", {
        className: "heading-five"
      }, "Please supply the name and address of the family member's employer."), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q3EmployerName.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q3EmployerName.label, "*"), React.createElement("input", {
        ref: q3EmployerName.ref,
        id: q3EmployerName.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q3EmployerName.isValid ? null : "".concat(q3EmployerName.id, "_error"),
        "aria-invalid": !q3EmployerName.isValid
      })), q3EmployerName.isValid ? null : React.createElement("span", {
        id: "".concat(q3EmployerName.id, "_error"),
        className: "validation-error-message"
      }, q3EmployerName.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q3Address.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q3Address.label, "*"), React.createElement("input", {
        ref: q3Address.ref,
        id: q3Address.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q3Address.isValid ? null : "".concat(q3Address.id, "_error"),
        "aria-invalid": !q3Address.isValid
      })), q3Address.isValid ? null : React.createElement("span", {
        id: "".concat(q3Address.id, "_error"),
        className: "validation-error-message"
      }, q3Address.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q3City.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q3City.label, "*"), React.createElement("input", {
        ref: q3City.ref,
        id: q3City.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q3City.isValid ? null : "".concat(q3City.id, "_error"),
        "aria-invalid": !q3City.isValid
      })), q3City.isValid ? null : React.createElement("span", {
        id: "".concat(q3City.id, "_error"),
        className: "validation-error-message"
      }, q3City.label, " is required")), React.createElement(Dropdown, {
        select: function select(input) {
          return q3State.ref = input;
        },
        label: 'State*',
        defaultOptionText: '...',
        setSpecialOptions: function setSpecialOptions() {
          return _this14.props.states;
        },
        isValid: q3State.isValid,
        id: q3State.id
      }), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q3Zip.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q3Zip.label, "*"), React.createElement("input", {
        ref: q3Zip.ref,
        id: q3Zip.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q3Zip.isValid ? null : "".concat(q3Zip.id, "_error"),
        "aria-invalid": !q3Zip.isValid
      })), q3Zip.isValid ? null : React.createElement("span", {
        id: "".concat(q3Zip.id, "_error"),
        className: "validation-error-message"
      }, q3Zip.label, " is required")), React.createElement("p", {
        className: "heading-five"
      }, "Please supply the name and address of the group health plan, i.e., the insurance company."), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q3GroupPlanId.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q3GroupPlanId.label, "*"), React.createElement("input", {
        ref: q3GroupPlanId.ref,
        id: q3GroupPlanId.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q3GroupPlanId.isValid ? null : "".concat(q3GroupPlanId.id, "_error"),
        "aria-invalid": !q3GroupPlanId.isValid
      })), q3GroupPlanId.isValid ? null : React.createElement("span", {
        id: "".concat(q3GroupPlanId.id, "_error"),
        className: "validation-error-message"
      }, q3GroupPlanId.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q3GroupHealthName.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q3GroupHealthName.label, "*"), React.createElement("input", {
        ref: q3GroupHealthName.ref,
        id: q3GroupHealthName.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q3GroupHealthName.isValid ? null : "".concat(q3GroupHealthName.id, "_error"),
        "aria-invalid": !q3GroupHealthName.isValid
      })), q3GroupHealthName.isValid ? null : React.createElement("span", {
        id: "".concat(q3GroupHealthName.id, "_error"),
        className: "validation-error-message"
      }, q3GroupHealthName.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q3GroupHealthAddress.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q3GroupHealthAddress.label, "*"), React.createElement("input", {
        ref: q3GroupHealthAddress.ref,
        id: q3GroupHealthAddress.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q3GroupHealthAddress.isValid ? null : "".concat(q3GroupHealthAddress.id, "_error"),
        "aria-invalid": !q3GroupHealthAddress.isValid
      })), q3GroupHealthAddress.isValid ? null : React.createElement("span", {
        id: "".concat(q3GroupHealthAddress.id, "_error"),
        className: "validation-error-message"
      }, q3GroupHealthAddress.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q3GroupHealthCity.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q3GroupHealthCity.label, "*"), React.createElement("input", {
        ref: q3GroupHealthCity.ref,
        id: q3GroupHealthCity.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q3GroupHealthCity.isValid ? null : "".concat(q3GroupHealthCity.id, "_error"),
        "aria-invalid": !q3GroupHealthCity.isValid
      })), q3GroupHealthCity.isValid ? null : React.createElement("span", {
        id: "".concat(q3GroupHealthCity.id, "_error"),
        className: "validation-error-message"
      }, q3GroupHealthCity.label, " is required")), React.createElement(Dropdown, {
        select: function select(input) {
          return q3GroupHealthState.ref = input;
        },
        label: 'State*',
        defaultOptionText: '...',
        setSpecialOptions: function setSpecialOptions() {
          return _this14.props.states;
        },
        isValid: q3GroupHealthState.isValid,
        id: q3GroupHealthState.id
      }), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q3GroupHealthZipCode.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q3GroupHealthZipCode.label, "*"), React.createElement("input", {
        ref: q3GroupHealthZipCode.ref,
        id: q3GroupHealthZipCode.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q3GroupHealthZipCode.isValid ? null : "".concat(q3GroupHealthZipCode.id, "_error"),
        "aria-invalid": !q3GroupHealthZipCode.isValid
      })), q3GroupHealthZipCode.isValid ? null : React.createElement("span", {
        id: "".concat(q3GroupHealthZipCode.id, "_error"),
        className: "validation-error-message"
      }, q3GroupHealthZipCode.label, " is required"))));
    }
  }]);

  return CoverageQuestionThree;
}(React.Component);

;

var CoverageQuestionTwo =
/*#__PURE__*/
function (_React$Component8) {
  _inherits(CoverageQuestionTwo, _React$Component8);

  function CoverageQuestionTwo(props) {
    var _this15;

    _classCallCheck(this, CoverageQuestionTwo);

    _this15 = _possibleConstructorReturn(this, _getPrototypeOf(CoverageQuestionTwo).call(this, props));
    _this15.state = {
      q2: {
        type: 'field',
        label: 'Q2. Do you or your spouse have group health plan coverage through an employer?*',
        value: 'no',
        shouldValidate: function shouldValidate() {
          return false;
        },
        options: [{
          label: 'No',
          value: 'no'
        }, {
          label: 'Yes',
          value: 'yes'
        }]
      },
      q2EmployeeCount: {
        type: 'field',
        label: 'How many employees work for the employer that offers the group health plan coverage?*',
        value: '1-19',
        shouldValidate: function shouldValidate() {
          return false;
        },
        options: [{
          label: '1-19 Employees',
          value: '1-19'
        }, {
          label: '20-99 Employees',
          value: '20-99'
        }, {
          label: '100 or more Employees',
          value: '100+'
        }]
      },
      q2EmployerName: {
        type: 'field',
        label: 'Employer Name',
        ref: React.createRef(),
        id: 'q2EmployerName',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      },
      q2Address: {
        type: 'field',
        label: 'Address',
        ref: React.createRef(),
        id: 'q2Address',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      },
      q2City: {
        type: 'field',
        label: 'City',
        ref: React.createRef(),
        id: 'q2City',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      },
      q2State: {
        type: 'field',
        id: 'employerState',
        label: 'Employer state',
        ref: React.createRef(),
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      },
      q2Zip: {
        type: 'field',
        label: 'ZIP Code',
        ref: React.createRef(),
        id: 'q2Zip',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      },
      q2GroupPlanId: {
        type: 'field',
        label: 'Group Health Plan Id',
        ref: React.createRef(),
        id: 'q2GroupPlanId',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      },
      q2GroupHealthName: {
        type: 'field',
        label: 'Group Health Plan Name',
        ref: React.createRef(),
        id: 'q2GroupHealthName',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      },
      q2GroupHealthAddress: {
        type: 'field',
        label: 'Address',
        ref: React.createRef(),
        id: 'q2GroupHealthAddress',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      },
      q2GroupHealthCity: {
        type: 'field',
        label: 'City',
        ref: React.createRef(),
        id: 'q2GroupHealthCity',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      },
      q2GroupHealthState: {
        type: 'field',
        id: 'q2GroupHealthState',
        label: 'Group health state',
        ref: React.createRef(),
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      },
      q2GroupHealthZipCode: {
        type: 'field',
        label: 'ZIP Code',
        ref: React.createRef(),
        id: 'q2GroupHealthZipCode',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return _this15.state.q2.value === 'yes';
        }
      }
    };
    return _this15;
  }

  _createClass(CoverageQuestionTwo, [{
    key: "render",
    value: function render() {
      var _this16 = this;

      var q2 = this.state.q2;
      var q2EmployeeCount = this.state.q2EmployeeCount;
      var q2EmployerName = this.state.q2EmployerName;
      var q2Address = this.state.q2Address;
      var q2City = this.state.q2City;
      var q2State = this.state.q2State;
      var q2Zip = this.state.q2Zip;
      var q2GroupPlanId = this.state.q2GroupPlanId;
      var q2GroupHealthName = this.state.q2GroupHealthName;
      var q2GroupHealthAddress = this.state.q2GroupHealthAddress;
      var q2GroupHealthCity = this.state.q2GroupHealthCity;
      var q2GroupHealthState = this.state.q2GroupHealthState;
      var q2GroupHealthZipCode = this.state.q2GroupHealthZipCode;
      return React.createElement("div", {
        className: "section-q2"
      }, React.createElement(RadioCollection, {
        name: 'q2',
        handleRadioChange: function handleRadioChange(value) {
          var tempQ2 = _objectSpread({}, q2);

          tempQ2.value = value;
          return _this16.setState({
            q2: tempQ2
          });
        },
        selectedCategory: q2.value,
        title: q2.label,
        options: q2.options
      }), q2.value === 'no' ? null : React.createElement("div", {
        className: "sub-questions"
      }, React.createElement(RadioCollection, {
        name: 'q2EmployeeCount',
        handleRadioChange: function handleRadioChange(value) {
          var tempQ2EmployeeCount = _objectSpread({}, q2EmployeeCount);

          tempQ2EmployeeCount.value = value;
          return _this16.setState({
            q2EmployeeCount: tempQ2EmployeeCount
          });
        },
        selectedCategory: q2EmployeeCount.value,
        title: q2EmployeeCount.label,
        options: q2EmployeeCount.options
      }), React.createElement("p", {
        className: "heading-five"
      }, "Please supply the name and address of the employer that offers the group health plan coverage."), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q2EmployerName.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q2EmployerName.label, "*"), React.createElement("input", {
        ref: q2EmployerName.ref,
        id: q2EmployerName.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q2EmployerName.isValid ? null : "".concat(q2EmployerName.id, "_error"),
        "aria-invalid": !q2EmployerName.isValid
      })), q2EmployerName.isValid ? null : React.createElement("span", {
        id: "".concat(q2EmployerName.id, "_error"),
        className: "validation-error-message"
      }, q2EmployerName.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q2Address.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q2Address.label, "*"), React.createElement("input", {
        ref: q2Address.ref,
        id: q2Address.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q2Address.isValid ? null : "".concat(q2Address.id, "_error"),
        "aria-invalid": !q2Address.isValid
      })), q2Address.isValid ? null : React.createElement("span", {
        id: "".concat(q2Address.id, "_error"),
        className: "validation-error-message"
      }, q2Address.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q2City.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q2City.label, "*"), React.createElement("input", {
        ref: q2City.ref,
        id: q2City.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q2City.isValid ? null : "".concat(q2City.id, "_error"),
        "aria-invalid": !q2City.isValid
      })), q2City.isValid ? null : React.createElement("span", {
        id: "".concat(q2City.id, "_error"),
        className: "validation-error-message"
      }, q2City.label, " is required")), React.createElement(Dropdown, {
        select: function select(input) {
          return q2State.ref = input;
        },
        label: 'State*',
        defaultOptionText: '...',
        setSpecialOptions: function setSpecialOptions() {
          return _this16.props.states;
        },
        isValid: q2State.isValid,
        id: q2State.id
      }), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q2Zip.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q2Zip.label, "*"), React.createElement("input", {
        ref: q2Zip.ref,
        id: q2Zip.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q2Zip.isValid ? null : "".concat(q2Zip.id, "_error"),
        "aria-invalid": !q2Zip.isValid
      })), q2Zip.isValid ? null : React.createElement("span", {
        id: "".concat(q2Zip.id, "_error"),
        className: "validation-error-message"
      }, q2Zip.label, " is required")), React.createElement("p", {
        className: "heading-five"
      }, "Please supply the id, name and address of the group health plan, i.e., the insurance company."), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q2GroupPlanId.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q2GroupPlanId.label, "*"), React.createElement("input", {
        ref: q2GroupPlanId.ref,
        id: q2GroupPlanId.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q2GroupPlanId.isValid ? null : "".concat(q2GroupPlanId.id, "_error"),
        "aria-invalid": !q2GroupPlanId.isValid
      })), q2GroupPlanId.isValid ? null : React.createElement("span", {
        id: "".concat(q2GroupPlanId.id, "_error"),
        className: "validation-error-message"
      }, q2GroupPlanId.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q2GroupHealthName.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q2GroupHealthName.label, "*"), React.createElement("input", {
        ref: q2GroupHealthName.ref,
        id: q2GroupHealthName.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q2GroupHealthName.isValid ? null : "".concat(q2GroupHealthName.id, "_error"),
        "aria-invalid": !q2GroupHealthName.isValid
      })), q2GroupHealthName.isValid ? null : React.createElement("span", {
        id: "".concat(q2GroupHealthName.id, "_error"),
        className: "validation-error-message"
      }, q2GroupHealthName.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q2GroupHealthAddress.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q2GroupHealthAddress.label, "*"), React.createElement("input", {
        ref: q2GroupHealthAddress.ref,
        id: q2GroupHealthAddress.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q2GroupHealthAddress.isValid ? null : "".concat(q2GroupHealthAddress.id, "_error"),
        "aria-invalid": !q2GroupHealthAddress.isValid
      })), q2GroupHealthAddress.isValid ? null : React.createElement("span", {
        id: "".concat(q2GroupHealthAddress.id, "_error"),
        className: "validation-error-message"
      }, q2GroupHealthAddress.label, " is required")), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q2GroupHealthCity.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q2GroupHealthCity.label, "*"), React.createElement("input", {
        ref: q2GroupHealthCity.ref,
        id: q2GroupHealthCity.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q2GroupHealthCity.isValid ? null : "".concat(q2GroupHealthCity.id, "_error"),
        "aria-invalid": !q2GroupHealthCity.isValid
      })), q2GroupHealthCity.isValid ? null : React.createElement("span", {
        id: "".concat(q2GroupHealthCity.id, "_error"),
        className: "validation-error-message"
      }, q2GroupHealthCity.label, " is required")), React.createElement(Dropdown, {
        select: function select(input) {
          return q2GroupHealthState.ref = input;
        },
        label: 'State*',
        defaultOptionText: '...',
        setSpecialOptions: function setSpecialOptions() {
          return _this16.props.states;
        },
        isValid: q2GroupHealthState.isValid,
        id: q2GroupHealthState.id
      }), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label ".concat(!q2GroupHealthZipCode.isValid ? 'input-label--invalid' : '')
      }, React.createElement("span", {
        className: "input-label-text"
      }, q2GroupHealthZipCode.label, "*"), React.createElement("input", {
        ref: q2GroupHealthZipCode.ref,
        id: q2GroupHealthZipCode.id,
        className: "input-text",
        type: "text",
        "aria-required": "true",
        "aria-describedby": q2GroupHealthZipCode.isValid ? null : "".concat(q2GroupHealthZipCode.id, "_error"),
        "aria-invalid": !q2GroupHealthZipCode.isValid
      })), q2GroupHealthZipCode.isValid ? null : React.createElement("span", {
        id: "".concat(q2GroupHealthZipCode.id, "_error"),
        className: "validation-error-message"
      }, q2GroupHealthZipCode.label, " is required"))));
    }
  }]);

  return CoverageQuestionTwo;
}(React.Component);

;

var NewEventRSVP =
/*#__PURE__*/
function (_React$Component9) {
  _inherits(NewEventRSVP, _React$Component9);

  function NewEventRSVP(props) {
    var _this17;

    _classCallCheck(this, NewEventRSVP);

    _this17 = _possibleConstructorReturn(this, _getPrototypeOf(NewEventRSVP).call(this, props));

    _defineProperty(_assertThisInitialized(_this17), "states", [{
      text: 'ALABAMA',
      value: 'AL'
    }, {
      text: 'ALASKA',
      value: 'AK'
    }, {
      text: 'ARIZONA',
      value: 'AZ'
    }, {
      text: 'ARKANSAS',
      value: 'AR'
    }, {
      text: 'CALIFORNIA',
      value: 'CA'
    }, {
      text: 'COLORADO',
      value: 'CO'
    }, {
      text: 'CONNECTICUT',
      value: 'CT'
    }, {
      text: 'DELAWARE',
      value: 'DE'
    }, {
      text: 'DISTRICT OF COLUMBIA',
      value: 'DC'
    }, {
      text: 'FLORIDA',
      value: 'FL'
    }, {
      text: 'GEORGIA',
      value: 'GA'
    }, {
      text: 'GUAM',
      value: 'GU'
    }, {
      text: 'HAWAII',
      value: 'HI'
    }, {
      text: 'IDAHO',
      value: 'ID'
    }, {
      text: 'ILLINOIS',
      value: 'IL'
    }, {
      text: 'INDIANA',
      value: 'IN'
    }, {
      text: 'IOWA',
      value: 'IA'
    }, {
      text: 'KANSAS',
      value: 'KS'
    }, {
      text: 'KENTUCKY',
      value: 'KY'
    }, {
      text: 'LOUISIANA',
      value: 'LA'
    }, {
      text: 'MAINE',
      value: 'ME'
    }, {
      text: 'MARYLAND',
      value: 'MD'
    }, {
      text: 'MASSACHUSETTS',
      value: 'MA'
    }, {
      text: 'MICHIGAN',
      value: 'MI'
    }, {
      text: 'MINNESOTA',
      value: 'MN'
    }, {
      text: 'MISSISSIPPI',
      value: 'MS'
    }, {
      text: 'MISSOURI',
      value: 'MO'
    }, {
      text: 'MONTANA',
      value: 'MT'
    }, {
      text: 'NEBRASKA',
      value: 'NE'
    }, {
      text: 'NEVADA',
      value: 'NV'
    }, {
      text: 'NEW HAMPSHIRE',
      value: 'NH'
    }, {
      text: 'NEW JERSEY',
      value: 'NJ'
    }, {
      text: 'NEW MEXICO',
      value: 'NM'
    }, {
      text: 'NEW YORK',
      value: 'NY'
    }, {
      text: 'NORTH CAROLINA',
      value: 'NC'
    }, {
      text: 'NORTH DAKOTA',
      value: 'ND'
    }, {
      text: 'OHIO',
      value: 'OH'
    }, {
      text: 'OKLAHOMA',
      value: 'OK'
    }, {
      text: 'OREGON',
      value: 'OR'
    }, {
      text: 'PENNSYLVANIA',
      value: 'PA'
    }, {
      text: 'RHODE ISLAND',
      value: 'RI'
    }, {
      text: 'SOUTH CAROLINA',
      value: 'SC'
    }, {
      text: 'SOUTH DAKOTA',
      value: 'SD'
    }, {
      text: 'TENNESSEE',
      value: 'TN'
    }, {
      text: 'TEXAS',
      value: 'TX'
    }, {
      text: 'UTAH',
      value: 'UT'
    }, {
      text: 'VERMONT',
      value: 'VT'
    }, {
      text: 'VIRGINIA',
      value: 'VA'
    }, {
      text: 'WASHINGTON',
      value: 'WA'
    }, {
      text: 'WEST VIRGINIA',
      value: 'WV'
    }, {
      text: 'WISCONSIN',
      value: 'WI'
    }, {
      text: 'WYOMING',
      value: 'WY'
    }]);

    _this17.state = {
      validationErrors: [],
      isLoading: true,
      submissionSuccessful: false,
      submissionFailure: false,
      isSubmitting: false,
      event: {},
      hasNoResult: false,
      firstName: {
        type: 'field',
        label: 'First Name',
        ref: React.createRef(),
        id: 'firstName',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return true;
        }
      },
      lastName: {
        type: 'field',
        label: 'Last Name',
        ref: React.createRef(),
        id: 'lastName',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return true;
        }
      },
      address: {
        type: 'field',
        label: 'Address',
        ref: React.createRef(),
        id: 'address',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return false;
        }
      },
      city: {
        type: 'field',
        label: 'City',
        ref: React.createRef(),
        id: 'city',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return false;
        }
      },
      state: {
        type: 'field',
        id: 'state',
        label: 'State',
        ref: React.createRef(),
        shouldValidate: function shouldValidate() {
          return false;
        }
      },
      zip: {
        type: 'field',
        label: 'Zip',
        ref: React.createRef(),
        id: 'zip',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return true;
        }
      },
      phone: {
        type: 'field',
        label: 'Phone',
        ref: React.createRef(),
        id: 'phone',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return false;
        }
      },
      email: {
        type: 'field',
        label: 'Email',
        ref: React.createRef(),
        id: 'email',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return false;
        }
      },
      numberOfRegistrants: {
        type: 'field',
        label: 'Number of Registrants',
        ref: React.createRef(),
        id: 'numberOfRegistrants',
        isValid: true,
        shouldValidate: function shouldValidate() {
          return false;
        }
      },
      currentCustomer: {
        type: 'field',
        label: 'Are you currently a KelseyCare Advantage Member?*',
        value: 'yes',
        shouldValidate: function shouldValidate() {
          return false;
        },
        options: [{
          label: 'Yes',
          value: 'yes'
        }, {
          label: 'No',
          value: 'no'
        }]
      },
      requestType: false,
      meetingID: false
    };
    _this17.handleSubmit = _this17.handleSubmit.bind(_assertThisInitialized(_this17));
    _this17.postSubmission = _this17.postSubmission.bind(_assertThisInitialized(_this17));
    return _this17;
  }

  _createClass(NewEventRSVP, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this18 = this;

      var eventId = window.location.search.split('=')[1];
      jQuery.get(this.props.data.getEventByIdUrl, {
        id: eventId
      }, function (res) {
        if (res) {
          _this18.setState({
            event: res,
            isLoading: false,
            requestType: res.RequestType,
            meetingID: res.MeetingID
          });
        } else {
          _this18.setState({
            hasNoResult: true,
            isLoading: false
          });
        }
      }.bind(this)).fail(function () {
        _this18.setState({
          hasNoResult: true,
          isLoading: false
        });
      });
    }
  }, {
    key: "handleSubmit",
    value: function handleSubmit(e) {
      var _this19 = this;

      e.preventDefault();
      var validationErrors = [];
      Object.keys(this.state).forEach(function (item) {
        var field = _this19.state[item];

        if (field.type === 'field' && field.shouldValidate()) {
          if (field.ref.current.value === "") {
            field.isValid = false;
            validationErrors.push(field);
          } else {
            field.isValid = true;
          }
        }
      });

      if (validationErrors.length > 0) {
        this.setState({
          validationErrors: validationErrors
        });
      } else {
        this.setState({
          validationErrors: []
        });
        this.postSubmission();
      }
    }
  }, {
    key: "postSubmission",
    value: function postSubmission() {
      var _this20 = this;

      this.setState({
        isSubmitting: true
      }, function () {
        var data = {
          FirstName: _this20.state.firstName.ref.current.value,
          LastName: _this20.state.lastName.ref.current.value,
          Address: _this20.state.address.ref.current.value ? _this20.state.address.ref.current.value : null,
          City: _this20.state.city.ref.current.value ? _this20.state.city.ref.current.value : null,
          State: _this20.state.state.ref.value ? _this20.state.state.ref.value : null,
          ZipCode: _this20.state.zip.ref.current.value,
          PhoneNumber: _this20.state.phone.ref.current.value ? _this20.state.phone.ref.current.value : null,
          NumberOfGuests: _this20.state.numberOfRegistrants.ref.current.value ? _this20.state.numberOfRegistrants.ref.current.value : null,
          CurrentCustomer: _this20.state.currentCustomer.value,
          EmailAddress: _this20.state.email.ref.current.value,
          Processed: 0,
          RequestType: _this20.state.requestType,
          MeetingID: _this20.state.meetingID
        };
        jQuery.post(_this20.props.data.submitEventRsvpUrl, data, function (res) {
          if (res !== 1) {
            _this20.setState({
              submissionFailure: true,
              isSubmitting: false
            });
          } else {
            _this20.setState({
              submissionSuccessful: true,
              isSubmitting: false
            });
          }
        }.bind(_this20)).fail(function () {
          _this20.setState({
            submissionFailure: true,
            isSubmitting: false
          });
        });
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this21 = this;

      var event = this.state.event;
      var firstName = this.state.firstName;
      var lastName = this.state.lastName;
      var address = this.state.address;
      var city = this.state.city;
      var state = this.state.state;
      var zip = this.state.zip;
      var phone = this.state.phone;
      var email = this.state.email;
      var numberOfRegistrants = this.state.numberOfRegistrants;
      var currentCustomer = this.state.currentCustomer;

      if (this.state.isLoading) {
        return React.createElement("p", {
          className: "body-regular"
        }, "Loading...");
      } else if (this.state.hasNoResult) {
        return React.createElement("h1", {
          className: "heading-one"
        }, "Event Not Found");
      } else if (this.state.submissionSuccessful) {
        return React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.successMessage
          }
        });
      } else if (this.state.submissionFailure) {
        return React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.failureMessage
          }
        });
      } else {
        return React.createElement("div", null, React.createElement("div", {
          style: {
            paddingBottom: '1.2rem'
          }
        }, React.createElement("h1", {
          className: "heading-one"
        }, event.Title), React.createElement("p", {
          class: "heading-four"
        }, "Time & Date"), React.createElement("p", {
          className: "body-regular"
        }, event.StartDate), React.createElement("p", {
          class: "heading-four"
        }, "Location"), React.createElement("p", {
          className: "body-regular"
        }, event.AddressForLink === "" || event.AddressForLink === null ? React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: event.LocationDescription
          }
        }) : React.createElement("a", {
          href: "https://www.google.com/maps/search/?api=1&query=".concat(event.AddressForLink),
          className: "link-inline",
          target: "_blank",
          "aria-label": "Open directions in new tab"
        }, React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: event.LocationDescription
          }
        })))), React.createElement("form", {
          onSubmit: this.handleSubmit
        }, React.createElement("div", {
          className: "input-section"
        }, React.createElement("label", {
          className: "input-label ".concat(!firstName.isValid ? 'input-label--invalid' : '')
        }, React.createElement("span", {
          className: "input-label-text"
        }, firstName.label, "*"), React.createElement("input", {
          ref: firstName.ref,
          id: firstName.id,
          className: "input-text",
          type: "text",
          name: firstName.id,
          "aria-required": "true",
          "aria-describedby": firstName.isValid ? null : "".concat(firstName.id, "_error"),
          "aria-invalid": !firstName.isValid
        })), firstName.isValid ? null : React.createElement("span", {
          id: "".concat(firstName.id, "_error"),
          className: "validation-error-message"
        }, firstName.label, " is required")), React.createElement("div", {
          className: "input-section"
        }, React.createElement("label", {
          className: "input-label ".concat(!lastName.isValid ? 'input-label--invalid' : '')
        }, React.createElement("span", {
          className: "input-label-text"
        }, lastName.label, "*"), React.createElement("input", {
          ref: lastName.ref,
          id: lastName.id,
          className: "input-text",
          type: "text",
          name: lastName.id,
          "aria-required": "true",
          "aria-describedby": lastName.isValid ? null : "".concat(lastName.id, "_error"),
          "aria-invalid": !lastName.isValid
        })), lastName.isValid ? null : React.createElement("span", {
          id: "".concat(lastName.id, "_error"),
          className: "validation-error-message"
        }, lastName.label, " is required")), React.createElement("div", {
          className: "input-section"
        }, React.createElement("label", {
          className: "input-label ".concat(!address.isValid ? 'input-label--invalid' : '')
        }, React.createElement("span", {
          className: "input-label-text"
        }, address.label), React.createElement("input", {
          ref: address.ref,
          id: address.id,
          className: "input-text",
          type: "text",
          name: address.id,
          "aria-describedby": address.isValid ? null : "".concat(address.id, "_error")
        }))), React.createElement("div", {
          className: "input-section"
        }, React.createElement("label", {
          className: "input-label ".concat(!city.isValid ? 'input-label--invalid' : '')
        }, React.createElement("span", {
          className: "input-label-text"
        }, city.label), React.createElement("input", {
          ref: city.ref,
          id: city.id,
          className: "input-text",
          type: "text",
          name: city.id,
          "aria-describedby": city.isValid ? null : "".concat(city.id, "_error")
        }))), React.createElement(Dropdown, {
          select: function select(input) {
            return state.ref = input;
          },
          label: state.label,
          defaultOptionText: 'Select a state',
          setSpecialOptions: function setSpecialOptions() {
            return _this21.states;
          }
        }), React.createElement("div", {
          className: "input-section"
        }, React.createElement("label", {
          className: "input-label ".concat(!zip.isValid ? 'input-label--invalid' : '')
        }, React.createElement("span", {
          className: "input-label-text"
        }, zip.label, "*"), React.createElement("input", {
          ref: zip.ref,
          id: zip.id,
          className: "input-text",
          type: "text",
          name: zip.id,
          "aria-required": "true",
          "aria-describedby": zip.isValid ? null : "".concat(zip.id, "_error"),
          "aria-invalid": !zip.isValid
        })), zip.isValid ? null : React.createElement("span", {
          id: "".concat(zip.id, "_error"),
          className: "validation-error-message"
        }, zip.label, " is required")), React.createElement("div", {
          className: "input-section"
        }, React.createElement("label", {
          className: "input-label ".concat(!phone.isValid ? 'input-label--invalid' : '')
        }, React.createElement("span", {
          className: "input-label-text"
        }, phone.label), React.createElement("input", {
          ref: phone.ref,
          id: phone.id,
          className: "input-text",
          type: "text",
          maxLength: "10",
          name: phone.id,
          "aria-describedby": phone.isValid ? null : "".concat(phone.id, "_error")
        }))), React.createElement("div", {
          className: "input-section"
        }, React.createElement("label", {
          className: "input-label ".concat(!email.isValid ? 'input-label--invalid' : '')
        }, React.createElement("span", {
          className: "input-label-text"
        }, email.label), React.createElement("input", {
          ref: email.ref,
          id: email.id,
          className: "input-text",
          type: "text",
          name: email.id,
          "aria-describedby": email.isValid ? null : "".concat(email.id, "_error")
        }))), React.createElement("div", {
          className: "input-section"
        }, React.createElement("label", {
          className: "input-label ".concat(!numberOfRegistrants.isValid ? 'input-label--invalid' : '')
        }, React.createElement("span", {
          className: "input-label-text"
        }, numberOfRegistrants.label), React.createElement("input", {
          ref: numberOfRegistrants.ref,
          id: numberOfRegistrants.id,
          className: "input-text",
          type: "text",
          name: numberOfRegistrants.id,
          "aria-describedby": numberOfRegistrants.isValid ? null : "".concat(numberOfRegistrants.id, "_error")
        }))), React.createElement(RadioCollection, {
          name: currentCustomer.id,
          handleRadioChange: function handleRadioChange(value) {
            var currentCustomerTemp = _objectSpread({}, currentCustomer);

            currentCustomerTemp.value = value;
            return _this21.setState({
              currentCustomer: currentCustomerTemp
            });
          },
          selectedCategory: currentCustomer.value,
          title: currentCustomer.label,
          options: currentCustomer.options
        }), React.createElement("div", {
          className: "submit-button"
        }, React.createElement("button", {
          className: "cta-primary",
          type: "submit",
          disabled: this.state.isSubmitting,
          "aria-disabled": this.state.isSubmitting
        }, "Submit"))));
      }
    }
  }]);

  return NewEventRSVP;
}(React.Component);

;

var FacilityMain =
/*#__PURE__*/
function (_React$Component10) {
  _inherits(FacilityMain, _React$Component10);

  function FacilityMain(props) {
    var _this22;

    _classCallCheck(this, FacilityMain);

    _this22 = _possibleConstructorReturn(this, _getPrototypeOf(FacilityMain).call(this, props));
    _this22.state = {
      payload: {},
      startPage: 0,
      pages: [],
      itemsPerPage: 25,
      hasNoResults: false
    };
    _this22._searchForm = React.createRef();
    _this22._results = React.createRef();
    _this22.handleSetSearchParams = _this22.handleSetSearchParams.bind(_assertThisInitialized(_this22));
    _this22.handleClearForm = _this22.handleClearForm.bind(_assertThisInitialized(_this22));
    _this22.handleSubmit = _this22.handleSubmit.bind(_assertThisInitialized(_this22));
    _this22.handleChangePage = _this22.handleChangePage.bind(_assertThisInitialized(_this22));
    return _this22;
  }

  _createClass(FacilityMain, [{
    key: "handleSetSearchParams",
    value: function handleSetSearchParams(formData) {
      var _this23 = this;

      this.setState({
        startPage: 0,
        payload: {
          City: formData.city,
          County: formData.county,
          FacilityName: formData.facilityName,
          ServiceType: formData.serviceType,
          ZipCode: formData.zipCode
        }
      }, function () {
        _this23.handleSubmit();
      });
    }
  }, {
    key: "handleSubmit",
    value: function handleSubmit() {
      var _this24 = this;

      var updatePages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
      jQuery.post("".concat(this.props.data.getFacilitiesApiUrl, "?start=").concat(this.state.startPage, "&rows=").concat(this.state.itemsPerPage), this.state.payload, function (res) {
        if (res.Facilities.length > 0) {
          _this24._results.current.loadFacilityResults(res.Facilities);

          if (updatePages) {
            _this24.setState({
              hasNoResults: false,
              pages: _toConsumableArray(Array(res.Total).keys()).map(function (i) {
                return {
                  id: i + 1
                };
              })
            });
          }

          var element = document.getElementById('search-results');
          var headerOffset = 160;
          var elementPosition = element.getBoundingClientRect().top;
          var offsetPosition = elementPosition + window.pageYOffset - headerOffset;
          window.scrollTo({
            top: offsetPosition,
            behavior: "smooth"
          });
        } else {
          _this24.setState({
            hasNoResults: true,
            pages: []
          });
        }
      }.bind(this));
    }
  }, {
    key: "handleClearForm",
    value: function handleClearForm() {
      this._results.current.loadFacilityResults([]);

      this.setState({
        pages: [],
        hasNoResults: false
      });
    }
  }, {
    key: "handleChangePage",
    value: function handleChangePage(pageData) {
      var _this25 = this;

      this.setState({
        startPage: (pageData[0].id - 1) / this.state.itemsPerPage
      }, function () {
        _this25.handleSubmit(false);
      });
    }
  }, {
    key: "render",
    value: function render() {
      return React.createElement("div", null, React.createElement(FacilitySearchForm, {
        ref: this._searchForm,
        submitSearchCallback: this.handleSetSearchParams,
        clearFormCallback: this.handleClearForm,
        data: this.props.data
      }), React.createElement(FacilitySearchResults, {
        ref: this._results,
        data: this.props.data,
        hasNoResults: this.state.hasNoResults
      }), React.createElement(Pagination, {
        items: this.state.pages,
        onChangePage: this.handleChangePage,
        itemsPerPage: this.state.itemsPerPage
      }));
    }
  }]);

  return FacilityMain;
}(React.Component);

;

var FacilitySearchForm =
/*#__PURE__*/
function (_React$Component11) {
  _inherits(FacilitySearchForm, _React$Component11);

  function FacilitySearchForm(props) {
    var _this26;

    _classCallCheck(this, FacilitySearchForm);

    _this26 = _possibleConstructorReturn(this, _getPrototypeOf(FacilitySearchForm).call(this, props));
    _this26._serviceType = React.createRef();
    _this26._county = React.createRef();
    _this26._city = React.createRef();
    _this26._facilityName = React.createRef();
    _this26._zipCode = React.createRef();
    _this26.handleSubmit = _this26.handleSubmit.bind(_assertThisInitialized(_this26));
    _this26.handleClear = _this26.handleClear.bind(_assertThisInitialized(_this26));
    return _this26;
  }

  _createClass(FacilitySearchForm, [{
    key: "handleSubmit",
    value: function handleSubmit(e) {
      e.preventDefault();
      this.props.submitSearchCallback({
        serviceType: this._serviceType.value,
        county: this._county.value,
        city: this._city.value,
        facilityName: this._facilityName.value,
        zipCode: this._zipCode.value
      });
    }
  }, {
    key: "handleClear",
    value: function handleClear(e) {
      e.preventDefault();
      this.props.clearFormCallback();
      this._serviceType.value = '';
      this._county.value = '';
      this._city.value = '';
      this._facilityName.value = '';
      this._zipCode.value = '';
    }
  }, {
    key: "render",
    value: function render() {
      var _this27 = this;

      return React.createElement("div", null, React.createElement("form", {
        onSubmit: this.handleSubmit
      }, React.createElement(Dropdown, {
        select: function select(input) {
          return _this27._serviceType = input;
        },
        label: 'Service Type',
        optionsUrl: this.props.data.serviceTypeApiUrl,
        defaultOptionText: 'All Service Types'
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this27._county = input;
        },
        label: 'County',
        optionsUrl: this.props.data.countyApiUrl,
        defaultOptionText: 'All Counties'
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this27._city = input;
        },
        label: 'City',
        optionsUrl: this.props.data.cityApiUrl,
        defaultOptionText: 'All Cities'
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this27._facilityName = input;
        },
        label: 'Facility Name',
        optionsUrl: this.props.data.facilityNameApiUrl,
        defaultOptionText: 'All Facility Names'
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this27._zipCode = input;
        },
        label: 'ZIP Code',
        optionsUrl: this.props.data.zipcodeApiUrl,
        defaultOptionText: 'All ZIP Codes'
      }), React.createElement("div", {
        className: "submit-button d-flex gap-3 "
      }, React.createElement("button", {
        className: "cta-primary",
        onClick: this.handleSubmit
      }, "Search"), React.createElement("button", {
        className: "cta-secondary",
        onClick: this.handleClear
      }, "Clear All"))));
    }
  }]);

  return FacilitySearchForm;
}(React.Component);

;

var FacilitySearchResults =
/*#__PURE__*/
function (_React$Component12) {
  _inherits(FacilitySearchResults, _React$Component12);

  function FacilitySearchResults(props) {
    var _this28;

    _classCallCheck(this, FacilitySearchResults);

    _this28 = _possibleConstructorReturn(this, _getPrototypeOf(FacilitySearchResults).call(this, props));
    _this28.state = {
      results: []
    };
    _this28.groupBy = _this28.groupBy.bind(_assertThisInitialized(_this28));
    return _this28;
  }

  _createClass(FacilitySearchResults, [{
    key: "loadFacilityResults",
    value: function loadFacilityResults(results) {
      var _this29 = this;

      var groupedResults = [];
      var countyResults = this.groupBy(results, 'FacilityCounty');
      Object.keys(countyResults).forEach(function (i) {
        groupedResults.push({
          county: countyResults[i][0].FacilityCounty,
          cities: _this29.groupBy(countyResults[i], 'FacilityCity')
        });
      });
      this.setState({
        results: groupedResults
      });
    }
  }, {
    key: "groupBy",
    value: function groupBy(arr, key) {
      return arr.reduce(function (acc, cur) {
        (acc[cur[key]] = acc[cur[key]] || []).push(cur);
        return acc;
      }, {});
    }
  }, {
    key: "render",
    value: function render() {
      if (this.props.hasNoResults) {
        return React.createElement(NoResults, null);
      } else {
        return React.createElement("div", {
          id: "search-results",
          className: "results-section facility-search-results"
        }, this.state.results.map(function (result) {
          return React.createElement("div", {
            className: "results-section-container"
          }, React.createElement("hr", null), React.createElement("h3", null, result.county, " County"), Object.keys(result.cities).map(function (city) {
            return React.createElement("div", {
              className: "results-section-content"
            }, React.createElement("h4", null, "City of ", city, ":"), result.cities[city].map(function (location) {
              return React.createElement("div", {
                className: "results-section-details"
              }, React.createElement("h5", null, location.FacilityName), React.createElement("address", null, location.FacilityAddress, React.createElement("br", null), location.FacilityCity, ", ", location.FacilityState, " ", location.FacilityZipCode, React.createElement("br", null), React.createElement("a", {
                href: "tel:+".concat(location.FacilityPhoneNumber)
              }, location.FacilityPhoneNumber)));
            }));
          }));
        }));
      }
    }
  }]);

  return FacilitySearchResults;
}(React.Component);

;

var Checkbox =
/*#__PURE__*/
function (_React$Component13) {
  _inherits(Checkbox, _React$Component13);

  function Checkbox(props) {
    _classCallCheck(this, Checkbox);

    return _possibleConstructorReturn(this, _getPrototypeOf(Checkbox).call(this, props));
  }

  _createClass(Checkbox, [{
    key: "render",
    value: function render() {
      var _this30 = this;

      return React.createElement("label", {
        className: "checkbox"
      }, React.createElement("input", {
        className: "checkbox-input",
        type: "checkbox",
        onChange: function onChange(e) {
          return _this30.props.handleRadioChange(e.target.checked);
        },
        value: this.props.value
      }), React.createElement("span", {
        className: "body-regular checkbox-label"
      }, this.props.label), React.createElement("span", {
        className: "checkbox-checkmark"
      }));
    }
  }]);

  return Checkbox;
}(React.Component);

;

var Dropdown =
/*#__PURE__*/
function (_React$Component14) {
  _inherits(Dropdown, _React$Component14);

  function Dropdown(props) {
    var _this31;

    _classCallCheck(this, Dropdown);

    _this31 = _possibleConstructorReturn(this, _getPrototypeOf(Dropdown).call(this, props));
    _this31.state = {
      options: []
    };
    _this31.bindCities = _this31.bindOptions.bind(_assertThisInitialized(_this31));
    return _this31;
  }

  _createClass(Dropdown, [{
    key: "bindOptions",
    value: function bindOptions() {
      var payload = {};

      if (this.props.payloadTitle) {
        payload[this.props.payloadTitle] = this.props.providerType;
      }

      jQuery.post("".concat(this.props.optionsUrl), payload, function (data) {
        if (this.props.setSpecialOptions) {
          this.setState({
            options: this.props.setSpecialOptions(data)
          });
        } else {
          this.setState({
            options: data.map(function (x) {
              return {
                value: x,
                text: x
              };
            })
          });
        }
      }.bind(this));
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      this.bindCities();
    }
  }, {
    key: "render",
    value: function render() {
      return React.createElement("div", {
        className: "input-section provider-inputs"
      }, React.createElement("label", {
        className: "input-label input-label--select ".concat(this.props.isValid === true || this.props.isValid === undefined ? '' : 'input-label--invalid')
      }, React.createElement("span", {
        className: "input-label-text"
      }, this.props.label), React.createElement("select", {
        ref: this.props.select,
        name: "county",
        className: "input-select chevron-background"
      }, React.createElement("option", {
        value: ""
      }, this.props.defaultOptionText), this.state.options.map(function (option) {
        return React.createElement("option", {
          value: option.value
        }, option.text);
      }))), this.props.isValid === true || this.props.isValid === undefined ? null : React.createElement("span", {
        id: "".concat(this.props.id, "_error"),
        className: "validation-error-message"
      }, this.props.label.replace('*', ''), " is required"));
    }
  }]);

  return Dropdown;
}(React.Component);

;

var GoogleMap =
/*#__PURE__*/
function (_React$Component15) {
  _inherits(GoogleMap, _React$Component15);

  function GoogleMap(props) {
    var _this32;

    _classCallCheck(this, GoogleMap);

    _this32 = _possibleConstructorReturn(this, _getPrototypeOf(GoogleMap).call(this, props));

    _defineProperty(_assertThisInitialized(_this32), "_mapRef", React.createRef());

    _defineProperty(_assertThisInitialized(_this32), "googleMap", null);

    _defineProperty(_assertThisInitialized(_this32), "marker", null);

    _defineProperty(_assertThisInitialized(_this32), "position", null);

    _this32.createMap = _this32.createMap.bind(_assertThisInitialized(_this32));
    _this32.createMarker = _this32.createMarker.bind(_assertThisInitialized(_this32));
    _this32.createInfoWindow = _this32.createInfoWindow.bind(_assertThisInitialized(_this32));
    _this32.initMap = _this32.initMap.bind(_assertThisInitialized(_this32));
    return _this32;
  }

  _createClass(GoogleMap, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this33 = this;

      var existingScript = document.getElementById('#googleScript');
      var apiKey = this.props.apiKey;

      if (!existingScript) {
        var googleScript = document.createElement('script');
        googleScript.src = "https://maps.googleapis.com/maps/api/js?key=".concat(apiKey, "&libraries=places");
        googleScript.id = 'googleScript';
        window.document.body.appendChild(googleScript);
        googleScript.addEventListener('load', function () {
          _this33.initMap();
        });
      } else {
        this.initMap();
      }

      this.position = {
        lat: parseFloat(this.props.location.Latitude),
        lng: parseFloat(this.props.location.Longitude)
      };
    }
  }, {
    key: "initMap",
    value: function initMap() {
      this.googleMap = this.createMap();
      this.marker = this.createMarker();
      this.infoWindow = this.createInfoWindow();
    }
  }, {
    key: "createMap",
    value: function createMap() {
      return new window.google.maps.Map(this._mapRef.current, {
        zoom: 16,
        center: this.position
      });
    }
  }, {
    key: "createMarker",
    value: function createMarker() {
      return new window.google.maps.Marker({
        position: this.position,
        icon: {
          url: this.props.data.mapPinUrl ? this.props.data.mapPinUrl : null,
          scaledSize: new window.google.maps.Size(48, 48)
        },
        map: this.googleMap
      });
    }
  }, {
    key: "createInfoWindow",
    value: function createInfoWindow() {
      var _this34 = this;

      var location = this.props.location;
      var infoWindow = new window.google.maps.InfoWindow({
        maxWidth: 500,
        content: "\n        <div class=\"info-window kca-refresh-map\">\n          <h3 class=\"heading-five kca-refresh-h3\" style=\"margin-bottom: 1.2rem\">".concat(location.LocationName, "</h3>\n          <img\n            class=\"info-window-image\"\n            style=\"width:100%; height: auto;\"\n            src=\"").concat(location.BannerImage, "\"\n          />\n          <a\n            href=\"").concat(location.GetDirectionsUrl, "\"\n            class=\"link-inline body-regular\"\n            target=\"_blank\"\n            aria-label=\"Open directions in new tab\"\n            style=\"margin-bottom: 1.2rem; display: inline-block;\"\n          >\n            <p>").concat(location.AddressLine1).concat(location.AddressLine2 ? "<br/>" + location.AddressLine2 : "", "</p>\n            <p>").concat(location.City, ", ").concat(location.State, " ").concat(location.ZipCode, "</p>\n          </a>\n          <p class=\"body-regular\" style=\"margin-bottom: 0\">\n            <a href=\"tel:").concat(location.PhoneNumber, "\" class=\"link-inline\">\n              ").concat(location.PhoneNumber, "\n            </a>\n          </p>\n        </div>\n      ")
      });
      this.marker.addListener('click', function () {
        infoWindow.open(_this34.googleMap, _this34.marker);
      });
      return infoWindow;
    }
  }, {
    key: "render",
    value: function render() {
      return React.createElement("div", {
        className: "google-map"
      }, React.createElement("h2", {
        className: "heading-two google-map-title kca-refresh-h2"
      }, "Map & Directions"), React.createElement("div", {
        ref: this._mapRef,
        className: "google-map-map"
      }));
    }
  }]);

  return GoogleMap;
}(React.Component);

;

var GoogleMapMultiple =
/*#__PURE__*/
function (_React$Component16) {
  _inherits(GoogleMapMultiple, _React$Component16);

  function GoogleMapMultiple(props) {
    var _this35;

    _classCallCheck(this, GoogleMapMultiple);

    _this35 = _possibleConstructorReturn(this, _getPrototypeOf(GoogleMapMultiple).call(this, props));

    _defineProperty(_assertThisInitialized(_this35), "_mapRef", React.createRef());

    _defineProperty(_assertThisInitialized(_this35), "googleMap", null);

    _defineProperty(_assertThisInitialized(_this35), "markers", []);

    _defineProperty(_assertThisInitialized(_this35), "positions", []);

    _this35.createMap = _this35.createMap.bind(_assertThisInitialized(_this35));
    _this35.createMarkers = _this35.createMarkers.bind(_assertThisInitialized(_this35));
    _this35.createInfoWindow = _this35.createInfoWindow.bind(_assertThisInitialized(_this35));
    _this35.initMap = _this35.initMap.bind(_assertThisInitialized(_this35));
    return _this35;
  }

  _createClass(GoogleMapMultiple, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this36 = this;

      var existingScript = document.getElementById("#googleScript");
      var apiKey = this.props.apiKey;

      if (!existingScript) {
        var googleScript = document.createElement("script");
        googleScript.src = "https://maps.googleapis.com/maps/api/js?key=".concat(apiKey, "&libraries=places");
        googleScript.id = "googleScript";
        window.document.body.appendChild(googleScript);
        googleScript.addEventListener("load", function () {
          _this36.initMap();
        });
      } else {
        this.initMap();
      }

      this.props.locations.forEach(function (location, index) {
        _this36.positions[index] = {
          lat: parseFloat(location.Latitude),
          lng: parseFloat(location.Longitude)
        };
      });
    }
  }, {
    key: "initMap",
    value: function initMap() {
      this.googleMap = this.createMap();
      this.markers = this.createMarkers();
      this.infoWindow = this.createInfoWindow();
    }
  }, {
    key: "createMap",
    value: function createMap() {
      return new window.google.maps.Map(this._mapRef.current, {
        zoom: 9,
        center: new google.maps.LatLng(29.7051741, -95.421722)
      });
    }
  }, {
    key: "createMarkers",
    value: function createMarkers() {
      var _this37 = this;

      var holder = [];
      this.positions.forEach(function (positiony, index) {
        holder[index] = new window.google.maps.Marker({
          position: positiony,
          icon: {
            url: _this37.props.data.mapPinUrl ? _this37.props.data.mapPinUrl : null,
            scaledSize: new window.google.maps.Size(48, 48)
          },
          map: _this37.googleMap
        });
      });
      return holder;
    }
  }, {
    key: "createInfoWindow",
    value: function createInfoWindow() {
      var _this38 = this;

      this.props.locations.forEach(function (location, index) {
        var Address1 = "";
        var Address2 = "";

        if (location.AddressLine1 != null) {
          Address1 += location.AddressLine1;
        }

        if (location.AddressLine2 != null) {
          Address1 += "," + " " + location.AddressLine2;
        }

        if (location.City != null) {
          Address2 = location.City + "," + " ";
        }

        if (location.State != null) {
          Address2 += location.State + " ";
        }

        if (location.ZipCode != null) {
          Address2 += location.ZipCode + " ";
        }

        var GetDirectionsUrl = location.GetDirectionsUrl;
        var GetDirectionsTarget = location.GetDirectionsTarget ? location.GetDirectionsTarget : "";
        var locationNameElement = _this38.props.disableClickAction ? "<h3 class=\"heading-five\" style=\"margin-bottom: 1.2rem\">".concat(location.LocationName, "</h3>") : "<a href=\"".concat(_this38.props.baseUrl, "/").concat(location.Url, "\"><h3 class=\"heading-five\" style=\"margin-bottom: 1.2rem\">").concat(location.LocationName, "</h3></a>");
        var infoWindow = new window.google.maps.InfoWindow({
          maxWidth: 500,
          content: "\n          <div class=\"info-window\">\n                ".concat(locationNameElement, "\n                <p>").concat(Address1, "</p>\n                <p>").concat(Address2, "</p>\n                <a\n                    ").concat(GetDirectionsUrl && GetDirectionsUrl !== "" ? "href=\"".concat(GetDirectionsUrl, "\" target=\"").concat(GetDirectionsTarget, "\"") : "href=\"https://www.google.com/maps/search/?api=1&query=".concat(Address1, " ").concat(Address2, "\" target=\"_blank\""), "\n                class=\"link-inline body-regular\"\n                aria-label=\"Open directions in new tab\"\n                style=\"margin-bottom: 1.2rem; display: inline-block;\"\n              >\n              Get Directions\n              </a>\n            <p class=\"body-regular\" style=\"margin-bottom: 0\">\n              <a href=\"tel:").concat(location.PhoneNumber, "\" class=\"link-inline\">\n                ").concat(location.PhoneNumber, "\n              </a>\n            </p>\n          </div>\n        ")
        });

        _this38.markers[index].addListener("click", function () {
          infoWindow.open(_this38.googleMap, _this38.markers[index]);
        });

        return infoWindow;
      });
    }
  }, {
    key: "render",
    value: function render() {
      return React.createElement("div", {
        className: "google-map"
      }, React.createElement("div", {
        ref: this._mapRef,
        className: "google-map-map"
      }));
    }
  }]);

  return GoogleMapMultiple;
}(React.Component);

;

var NoResults =
/*#__PURE__*/
function (_React$Component17) {
  _inherits(NoResults, _React$Component17);

  function NoResults(props) {
    var _this39;

    _classCallCheck(this, NoResults);

    _this39 = _possibleConstructorReturn(this, _getPrototypeOf(NoResults).call(this, props));
    _this39.handleRefresh = _this39.handleRefresh.bind(_assertThisInitialized(_this39));
    return _this39;
  }

  _createClass(NoResults, [{
    key: "handleRefresh",
    value: function handleRefresh() {
      location.reload();
    }
  }, {
    key: "render",
    value: function render() {
      return React.createElement("div", null, React.createElement("p", {
        className: "heading-four",
        style: {
          marginBottom: '1.2rem'
        }
      }, "Sorry - No results Found"), React.createElement("button", {
        className: "cta-primary",
        "aria-label": "click to reload page and search again",
        onClick: this.handleRefresh
      }, "Search Again"));
    }
  }]);

  return NoResults;
}(React.Component);

;

var Pagination =
/*#__PURE__*/
function (_React$Component18) {
  _inherits(Pagination, _React$Component18);

  function Pagination(props) {
    var _this40;

    _classCallCheck(this, Pagination);

    _this40 = _possibleConstructorReturn(this, _getPrototypeOf(Pagination).call(this, props));
    _this40.state = {
      pager: {}
    };
    _this40.setPage = _this40.setPage.bind(_assertThisInitialized(_this40));
    _this40.getPager = _this40.getPager.bind(_assertThisInitialized(_this40));
    _this40.arrayPagination = _this40.arrayPagination.bind(_assertThisInitialized(_this40));
    _this40.getRange = _this40.getRange.bind(_assertThisInitialized(_this40));
    _this40.getItemClassName = _this40.getItemClassName.bind(_assertThisInitialized(_this40));
    return _this40;
  }

  _createClass(Pagination, [{
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps) {
      if (this.props.items !== prevProps.items) {
        this.setPage(1);
      }
    }
  }, {
    key: "setPage",
    value: function setPage(page) {
      var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

      if (page < 1 || page > this.state.pager || isNaN(page)) {
        return;
      }

      var items = this.props.items;
      var pager = this.getPager(items.length, page, this.props.itemsPerPage);
      var pageOfItems = items.slice(pager.startIndex, pager.endIndex + 1);
      this.setState({
        pager: pager
      });

      if (e) {
        this.props.onChangePage(pageOfItems);
      }
    }
  }, {
    key: "getRange",
    value: function getRange(start, end) {
      return Array(end - start + 1).fill().map(function (v, i) {
        return i + start;
      });
    }
  }, {
    key: "arrayPagination",
    value: function arrayPagination(currentPage, pageCount) {
      var delta;

      if (pageCount <= 7) {
        delta = 7;
      } else {
        delta = currentPage > 3 && currentPage < pageCount - 2 ? 2 : 3;
      }

      var range = {
        start: Math.round(currentPage - delta / 2),
        end: Math.round(currentPage + delta / 2)
      };

      if (range.start - 1 === 1 || range.end + 1 === pageCount) {
        range.start += 1;
        range.end += 1;
      }

      var pages = currentPage > delta ? this.getRange(Math.min(range.start, pageCount - delta), Math.min(range.end, pageCount)) : this.getRange(1, Math.min(pageCount, delta + 1));

      var withDots = function withDots(value, pair) {
        return pages.length + 1 !== pageCount ? pair : [value];
      };

      if (pages[0] !== 1) {
        pages = withDots(1, [1, '...']).concat(pages);
      }

      if (pages[pages.length - 1] < pageCount) {
        pages = pages.concat(withDots(pageCount, ['...', pageCount]));
      }

      return pages;
    }
  }, {
    key: "getPager",
    value: function getPager(totalItems, currentPage, pageSize) {
      currentPage = currentPage || 1;
      pageSize = pageSize || 10;
      var totalPages = Math.ceil(totalItems / pageSize);
      var startPage;
      var endPage;

      if (totalPages <= 10) {
        startPage = 1;
        endPage = totalPages;
      } else {
        if (currentPage <= 6) {
          startPage = 1;
          endPage = 10;
        } else if (currentPage + 4 >= totalPages) {
          startPage = totalPages - 9;
          endPage = totalPages;
        } else {
          startPage = currentPage - 5;
          endPage = currentPage + 4;
        }
      }

      var startIndex = (currentPage - 1) * pageSize;
      var endIndex = Math.min(startIndex + pageSize - 1, totalItems - 1);
      var pages = totalPages === 0 ? [] : this.arrayPagination(currentPage, totalPages);
      return {
        totalItems: totalItems,
        currentPage: currentPage,
        pageSize: pageSize,
        totalPages: totalPages,
        startPage: startPage,
        endPage: endPage,
        startIndex: startIndex,
        endIndex: endIndex,
        pages: pages
      };
    }
  }, {
    key: "getItemClassName",
    value: function getItemClassName(page) {
      if (this.state.pager.currentPage === page) {
        return 'active';
      } else if (isNaN(page)) {
        return 'disabled';
      } else {
        return null;
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this41 = this;

      var pager = this.state.pager;

      if (!pager.pages || pager.pages.length <= 1) {
        return null;
      }

      return React.createElement("nav", {
        role: "navigation",
        "aria-label": "Results Pagination Navigation"
      }, React.createElement("ul", {
        className: "pagination"
      }, pager.pages.map(function (page, index) {
        return React.createElement("li", {
          key: index,
          className: _this41.getItemClassName(page)
        }, React.createElement("a", {
          href: _this41.page ? "/page-".concat(_this41.page) : null,
          "aria-label": "Go to page ".concat(page),
          "aria-current": pager.currentPage === page ? 'true' : null,
          "aria-disabled": isNaN(page),
          "tab-index": isNaN(page) ? -1 : 0,
          onClick: function onClick(e) {
            e.preventDefault();

            _this41.setPage(page, e);
          }
        }, page));
      })));
    }
  }]);

  return Pagination;
}(React.Component);

;

var ProviderLocationPagination =
/*#__PURE__*/
function (_React$Component19) {
  _inherits(ProviderLocationPagination, _React$Component19);

  function ProviderLocationPagination(props) {
    var _this42;

    _classCallCheck(this, ProviderLocationPagination);

    _this42 = _possibleConstructorReturn(this, _getPrototypeOf(ProviderLocationPagination).call(this, props));
    _this42.state = {
      pager: {}
    };
    _this42.setPage = _this42.setPage.bind(_assertThisInitialized(_this42));
    _this42.getPager = _this42.getPager.bind(_assertThisInitialized(_this42));
    _this42.arrayPagination = _this42.arrayPagination.bind(_assertThisInitialized(_this42));
    _this42.getRange = _this42.getRange.bind(_assertThisInitialized(_this42));
    _this42.getItemClassName = _this42.getItemClassName.bind(_assertThisInitialized(_this42));
    _this42.goToPreviousPage = _this42.goToPreviousPage.bind(_assertThisInitialized(_this42));
    _this42.goToNextPage = _this42.goToNextPage.bind(_assertThisInitialized(_this42));
    return _this42;
  }

  _createClass(ProviderLocationPagination, [{
    key: "setActivePagerLink",
    value: function setActivePagerLink() {
      var startParam = new URLSearchParams(window.location.search).get("start");

      if (startParam && startParam > 0) {
        var pagerLink = document.querySelector("#pager-page-" + startParam);

        if (pagerLink) {
          var pagerLinks = document.querySelectorAll("#provider-location-pagination-links > li");
          pagerLinks.forEach(function (link) {
            link.classList.remove("active");
          });
          pagerLink.classList.add("active");
        }
      }
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps) {
      if (this.props.items !== prevProps.items) {
        var startParam = Number(new URLSearchParams(window.location.search).get("start"));

        if (startParam && startParam > 0) {
          this.setPage(startParam, new Event("refresh"));
        } else {
          this.setPage(1);
        }
      }
    } //previous page

  }, {
    key: "goToPreviousPage",
    value: function goToPreviousPage() {
      var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;

      if (this.state.pager.currentPage === 1) {} else {
        var items = this.props.items;
        var pager = this.getPager(items.length, this.state.pager.currentPage - 1, this.props.itemsPerPage);
        var pageOfItems = items.slice(pager.startIndex, pager.endIndex + 1);
        this.setState({
          pager: pager
        });

        if (e) {
          this.props.onChangePage(pageOfItems, this.state.pager.currentPage - 1);
        }
      }
    } //Next Page

  }, {
    key: "goToNextPage",
    value: function goToNextPage() {
      var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;

      if (this.state.pager.currentPage >= this.state.pager.endPage) {} else {
        var items = this.props.items;
        var pager = this.getPager(items.length, this.state.pager.currentPage + 1, this.props.itemsPerPage);
        var pageOfItems = items.slice(pager.startIndex, pager.endIndex + 1);
        this.setState({
          pager: pager
        });

        if (e) {
          this.props.onChangePage(pageOfItems, this.state.pager.currentPage + 1);
        }
      }
    }
  }, {
    key: "setPage",
    value: function setPage(page) {
      var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

      if (page < 1 || page > this.state.pager || isNaN(page)) {
        return;
      }

      var items = this.props.items;
      var pager = this.getPager(items.length, page, this.props.itemsPerPage);
      var pageOfItems = items.slice(pager.startIndex, pager.endIndex + 1);
      this.setState({
        pager: pager
      });

      if (e) {
        this.props.onChangePage(pageOfItems, page);
      }
    }
  }, {
    key: "getRange",
    value: function getRange(start, end) {
      return Array(end - start + 1).fill().map(function (v, i) {
        return i + start;
      });
    }
  }, {
    key: "arrayPagination",
    value: function arrayPagination(currentPage, pageCount) {
      var delta;

      if (pageCount <= 7) {
        delta = 7;
      } else {
        delta = currentPage > 4 && currentPage < pageCount - 3 ? 2 : 4;
      }

      var range = {
        start: Math.round(currentPage - delta / 2),
        end: Math.round(currentPage + delta / 2)
      };

      if (range.start - 1 === 1 || range.end + 1 === pageCount) {
        range.start += 1;
        range.end += 1;
      }

      var pages = currentPage > delta ? this.getRange(Math.min(range.start, pageCount - delta), Math.min(range.end, pageCount)) : this.getRange(1, Math.min(pageCount, delta + 1));

      var withDots = function withDots(value, pair) {
        return pages.length + 1 !== pageCount ? pair : [value];
      };

      if (pages[0] !== 1) {
        pages = withDots(1, [1, "..."]).concat(pages);
      }

      if (pages[pages.length - 1] < pageCount) {
        pages = pages.concat(withDots(pageCount, ["...", pageCount]));
      }

      return pages;
    }
  }, {
    key: "getPager",
    value: function getPager(totalItems, currentPage, pageSize) {
      currentPage = currentPage || 1;
      pageSize = pageSize || 10;
      var totalPages = Math.ceil(totalItems / pageSize);
      var startPage;
      var endPage;

      if (totalPages <= 10) {
        startPage = 1;
        endPage = totalPages;
      } else {
        if (currentPage <= 6) {
          startPage = 1;
          endPage = 10;
        } else if (currentPage + 4 >= totalPages) {
          startPage = totalPages - 9;
          endPage = totalPages;
        } else {
          startPage = currentPage - 5;
          endPage = currentPage + 4;
        }
      }

      var startIndex = (currentPage - 1) * pageSize;
      var endIndex = Math.min(startIndex + pageSize - 1, totalItems - 1);

      if (currentPage >= 1) {} else {}

      var pages = totalPages === 0 ? [] : this.arrayPagination(currentPage, totalPages);
      return {
        totalItems: totalItems,
        currentPage: currentPage,
        pageSize: pageSize,
        totalPages: totalPages,
        startPage: startPage,
        endPage: endPage,
        startIndex: startIndex,
        endIndex: endIndex,
        pages: pages
      };
    }
  }, {
    key: "getItemClassName",
    value: function getItemClassName(page) {
      if (this.state.pager.currentPage === page) {
        return "active";
      } else if (isNaN(page)) {
        return "disabled";
      } else {
        return null;
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this43 = this;

      var pager = this.state.pager;

      if (!pager.pages || pager.pages.length <= 1) {
        return null;
      }

      return React.createElement("nav", {
        role: "navigation",
        "aria-label": "Results Pagination Navigation"
      }, React.createElement("ul", {
        id: "provider-location-pagination-links",
        className: "pagination page-selector-list location-pagination"
      }, React.createElement("li", {
        className: "page-selector-item-previous ".concat(this.state.pager.currentPage === 1 ? "disabled" : "")
      }, React.createElement("a", {
        onClick: this.goToPreviousPage
      }, React.createElement("i", {
        class: "fa fa-arrow-left"
      }), "Previous")), pager.pages.map(function (page, index) {
        return React.createElement("li", {
          id: "pager-page-".concat(page),
          key: index,
          className: _this43.getItemClassName(page)
        }, React.createElement("a", {
          href: page ? "/page-".concat(page) : null,
          "aria-label": "Go to page ".concat(page),
          "aria-current": pager.currentPage === page ? "true" : null,
          "aria-disabled": isNaN(page),
          "tab-index": isNaN(page) ? -1 : 0,
          onClick: function onClick(e) {
            e.preventDefault();

            _this43.setPage(page, e);
          }
        }, page));
      }), React.createElement("li", {
        className: "page-selector-item-next ".concat(this.state.pager.currentPage === this.state.pager.endPage ? "disabled" : "")
      }, React.createElement("a", {
        onClick: this.goToNextPage
      }, "Next", React.createElement("i", {
        class: "fa fa-arrow-right"
      })))));
    }
  }]);

  return ProviderLocationPagination;
}(React.Component);

;

var RadioCollection =
/*#__PURE__*/
function (_React$Component20) {
  _inherits(RadioCollection, _React$Component20);

  function RadioCollection(props) {
    var _this44;

    _classCallCheck(this, RadioCollection);

    _this44 = _possibleConstructorReturn(this, _getPrototypeOf(RadioCollection).call(this, props));
    _this44.state = {
      categories: []
    };
    _this44.bindData = _this44.bindData.bind(_assertThisInitialized(_this44));
    _this44.onRadioChange = _this44.onRadioChange.bind(_assertThisInitialized(_this44));
    return _this44;
  }

  _createClass(RadioCollection, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      this.bindData();
    }
  }, {
    key: "bindData",
    value: function bindData() {
      if (this.props.optionsUrl) {
        var arr = [{
          label: 'All',
          value: 'all'
        }];
        jQuery.post("".concat(this.props.optionsUrl), function (data) {
          data.forEach(function (value, i) {
            arr.push({
              label: value,
              value: value
            });
          });
          this.setState(function () {
            return {
              categories: arr
            };
          });
        }.bind(this));
      } else {
        this.setState({
          categories: this.props.options
        });
      }
    }
  }, {
    key: "onRadioChange",
    value: function onRadioChange(e) {
      this.props.handleRadioChange(e.target.value);
    }
  }, {
    key: "render",
    value: function render() {
      var _this45 = this;

      return React.createElement("div", {
        className: "radio-section"
      }, React.createElement("p", {
        className: "radio-title"
      }, this.props.title), this.state.categories.map(function (category) {
        return React.createElement("label", {
          className: "radio"
        }, category.label, React.createElement("input", {
          className: "radio-input",
          type: "radio",
          name: _this45.props.category,
          value: category.value,
          checked: _this45.props.selectedCategory === category.value,
          onChange: _this45.onRadioChange
        }), React.createElement("span", {
          class: "radio-checkmark"
        }));
      }));
    }
  }]);

  return RadioCollection;
}(React.Component);

;

var Tab =
/*#__PURE__*/
function (_React$Component21) {
  _inherits(Tab, _React$Component21);

  function Tab(props) {
    _classCallCheck(this, Tab);

    return _possibleConstructorReturn(this, _getPrototypeOf(Tab).call(this, props));
  }

  _createClass(Tab, [{
    key: "render",
    value: function render() {
      return React.createElement("div", {
        className: "body-regular"
      }, this.props.children);
    }
  }]);

  return Tab;
}(React.Component);

;

var Tabs =
/*#__PURE__*/
function (_React$Component22) {
  _inherits(Tabs, _React$Component22);

  function Tabs(props) {
    var _this46;

    _classCallCheck(this, Tabs);

    _this46 = _possibleConstructorReturn(this, _getPrototypeOf(Tabs).call(this, props));
    _this46.state = {
      activeIndex: 0,
      uid: Math.floor((1 + Math.random()) * 0x100000).toString(16).substring(1)
    };
    _this46.handleTabKeyboard = _this46.handleTabKeyboard.bind(_assertThisInitialized(_this46));
    _this46.updateActiveIndex = _this46.updateActiveIndex.bind(_assertThisInitialized(_this46));
    _this46.getTabClassList = _this46.getTabClassList.bind(_assertThisInitialized(_this46));
    _this46.getIsActive = _this46.getIsActive.bind(_assertThisInitialized(_this46));
    return _this46;
  }

  _createClass(Tabs, [{
    key: "handleTabKeyboard",
    value: function handleTabKeyboard(e, i) {
      var tabs = document.querySelectorAll('.search-tabs-tab');
      var key = e.which;
      var keyMap = {
        END: 35,
        HOME: 36,
        LEFT: 37,
        RIGHT: 39
      };

      if (key === keyMap.RIGHT) {
        var nextTab = i < this.props.children.length - 1 ? i + 1 : 0;
        tabs[nextTab].focus();
      }

      if (key === keyMap.LEFT) {
        var prevTab = i > 0 ? i - 1 : this.props.children.length - 1;
        tabs[prevTab].focus();
      }

      if (key === keyMap.HOME) {
        e.preventDefault();
        tabs[0].focus();
      }

      if (key === keyMap.END) {
        e.preventDefault();
        tabs[this.props.children.length - 1].focus();
      }
    }
  }, {
    key: "updateActiveIndex",
    value: function updateActiveIndex(activeIndex) {
      this.setState({
        activeIndex: activeIndex
      });
    }
  }, {
    key: "getIsActive",
    value: function getIsActive(i) {
      return i === this.state.activeIndex;
    }
  }, {
    key: "getTabClassList",
    value: function getTabClassList(i) {
      return "\n      search-tabs-tab\n      search-tabs-tab--".concat(this.getIsActive(i) ? 'active' : 'inactive', "\n    ");
    }
  }, {
    key: "render",
    value: function render() {
      var _this47 = this;

      return React.createElement("div", {
        className: "search-tabs"
      }, React.createElement("div", {
        role: "tablist",
        "aria-label": this.props.tabsLabel
      }, this.props.children.map(function (elm, i) {
        return React.createElement("button", {
          id: "tab-".concat(_this47.state.uid, "-").concat(i),
          role: "tab",
          className: _this47.getTabClassList(i),
          "aria-selected": _this47.getIsActive(i).toString(),
          "aria-controls": "tab-panel-".concat(_this47.state.uid, "-").concat(i),
          tabindex: _this47.getIsActive(i) ? '0' : '-1',
          onClick: function onClick() {
            return _this47.updateActiveIndex(i);
          },
          onKeyDown: function onKeyDown(e) {
            return _this47.handleTabKeyboard(e, i);
          }
        }, elm.props.name);
      })), this.props.children.map(function (elm, i) {
        return React.createElement("div", {
          id: "tab-panel-".concat(_this47.state.uid, "-").concat(i),
          className: "search-tabs-tab-panel",
          tabindex: "0",
          role: "tabpanel",
          "aria-labelledby": "tab-".concat(_this47.state.uid, "-").concat(i),
          hidden: !_this47.getIsActive(i),
          style: {
            display: "".concat(i === _this47.state.activeIndex ? 'block' : 'none')
          }
        }, elm);
      }));
    }
  }]);

  return Tabs;
}(React.Component);

;

var KcaCombinedSearchForm =
/*#__PURE__*/
function (_React$Component23) {
  _inherits(KcaCombinedSearchForm, _React$Component23);

  function KcaCombinedSearchForm(props) {
    var _this48;

    _classCallCheck(this, KcaCombinedSearchForm);

    _this48 = _possibleConstructorReturn(this, _getPrototypeOf(KcaCombinedSearchForm).call(this, props));
    _this48.state = {
      isShowModal: false,
      filters: {},
      showItems: false
    };
    _this48.child = React.createRef();
    _this48.handleFilters = _this48.handleFilters.bind(_assertThisInitialized(_this48));
    _this48.getItems = _this48.getItems.bind(_assertThisInitialized(_this48));
    _this48.handleClearForm = _this48.handleClearForm.bind(_assertThisInitialized(_this48));
    _this48.modalRef = React.createRef();
    return _this48;
  }

  _createClass(KcaCombinedSearchForm, [{
    key: "handleFilters",
    value: async function handleFilters(url) {
      var providerType = this.props.providerType;
      var httpProperties = {
        method: "POST",
        headers: {
          "Content-type": "application/json"
        },
        body: JSON.stringify({
          providerType: providerType
        })
      };

      try {
        var _response = await fetch(url, httpProperties);

        var data = await _response.json();
        return data;
      } catch (error) {
        if (!response.ok) {
          throw Error;
        }
      }
    }
  }, {
    key: "componentDidMount",
    value: async function componentDidMount() {
      var _this$props = this.props,
          genderItems = _this$props.genderItems,
          cityItems = _this$props.cityItems,
          specialtyItems = _this$props.specialtyItems,
          languageItems = _this$props.languageItems,
          groupItems = _this$props.groupItems;
      var cities = await this.handleFilters(cityItems);
      var genders = await this.handleFilters(genderItems);
      var languages = await this.handleFilters(languageItems);
      var specialties = await this.handleFilters(specialtyItems);
      var medicalGroups = await this.handleFilters(groupItems);
      var filters = {
        cities: cities,
        genders: genders,
        languages: languages,
        specialties: specialties,
        medicalGroups: medicalGroups
      };
      this.setState({
        filters: filters
      });
    }
  }, {
    key: "handleShowModal",
    value: async function handleShowModal(name) {
      await this.componentDidMount();
      this.setState({
        isShowModal: true
      });
      window.scrollTo(0, 0);
      this.modalRef.current.scrollToSelectedFilterGroup(name);
    }
  }, {
    key: "handleHideModal",
    value: function handleHideModal() {
      this.setState({
        isShowModal: false,
        filters: {}
      });
    }
  }, {
    key: "getItems",
    value: function getItems(payload) {
      this.setState({
        isShowModal: false
      });
      this.props.getItems(payload);
    }
  }, {
    key: "handleClearForm",
    value: function handleClearForm() {
      this.child.current.clearInputs();
    }
  }, {
    key: "render",
    value: function render() {
      var _this$state = this.state,
          isShowModal = _this$state.isShowModal,
          filters = _this$state.filters;
      return React.createElement(KcaFormWrapper, null, React.createElement(KcaFormInputs, {
        handleInput: this.props.handleInput,
        receivePayload: this.props.receivePayload,
        getCurrentLocationUrl: this.props.getCurrentLocationUrl,
        ref: this.child
      }), React.createElement(KcaControls, {
        openModal: this.handleShowModal.bind(this)
      }), React.createElement(KcaSelectedFilters, {
        removeSelectedFilter: this.props.removeSelectedFilter,
        selectedItems: this.props.selectedItems,
        clearSearchResults: this.props.clearSearchResults,
        postResults: this.props.postResults
      }), isShowModal && React.createElement(KcaMultiSearchMain, {
        removeAllFilters: this.props.removeAllFilters,
        filterItems: this.props.filterItems,
        getCheckedFilters: this.props.getCheckedFilters,
        filters: filters,
        receivePayload: this.props.receivePayload,
        receiveFilters: this.props.receiveFilters,
        closeModal: this.handleHideModal.bind(this),
        getItems: this.getItems,
        applyFilters: this.props.applyFilters,
        ref: this.modalRef
      }));
    }
  }]);

  return KcaCombinedSearchForm;
}(React.Component);

;

var KcaCombinedSearchMain =
/*#__PURE__*/
function (_React$Component24) {
  _inherits(KcaCombinedSearchMain, _React$Component24);

  function KcaCombinedSearchMain(props) {
    var _this49;

    _classCallCheck(this, KcaCombinedSearchMain);

    _this49 = _possibleConstructorReturn(this, _getPrototypeOf(KcaCombinedSearchMain).call(this, props));
    _this49.state = {
      payload: {
        zip: "",
        query: "",
        sortField: "",
        sortOrder: "",
        items: {}
      },
      postResults: [],
      totalItems: 0,
      currentPage: 0,
      pageStart: 0,
      pageEnd: 0,
      rows: 25,
      pages: [],
      hasNoResults: _this49.props.data.noResultsMessage,
      filterItems: new Map(),
      searched: false,
      selectedItems: []
    };
    _this49.sibling = React.createRef();
    _this49.clearChildState = React.createRef();
    _this49.handleChangePage = _this49.handleChangePage.bind(_assertThisInitialized(_this49));
    _this49.handleSearchProps = _this49.handleSearchProps.bind(_assertThisInitialized(_this49));
    _this49.handleClearFormInputs = _this49.handleClearFormInputs.bind(_assertThisInitialized(_this49));
    return _this49;
  }

  _createClass(KcaCombinedSearchMain, [{
    key: "handleChangePage",
    value: function handleChangePage(pageData) {
      this.setState({
        currentPage: (pageData[0].id - 1) / this.state.rows
      });
    }
  }, {
    key: "handleSearchProps",
    value: async function handleSearchProps(_ref) {
      var zip = _ref.zip,
          query = _ref.query,
          sortField = _ref.sortField,
          sortOrder = _ref.sortOrder,
          items = _ref.items;
      var providerType = this.props.data.providerType;
      var httpProps = {
        method: "POST",
        headers: {
          "Content-type": "application/json"
        },
        body: JSON.stringify({
          providerType: providerType,
          searchString: query,
          city: items.cities,
          specialty: items.specialties,
          physicianGroup: items.physicianGroups,
          languages: items.languages,
          gender: items.gender,
          zipCodeInput: zip,
          sortField: sortField,
          sortOrder: sortOrder
        })
      };
      return httpProps;
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps, prevState) {
      if (prevState.payload !== this.state.payload || prevState.currentPage !== this.state.currentPage) {
        this.fetchSearchResults(this.state.payload);
      }
    }
  }, {
    key: "fetchSearchResults",
    value: async function fetchSearchResults(payload) {
      var _this50 = this;

      this.state.searched = true;

      if ((!payload.query || payload.query.length < 2) && !payload.zip && !payload.items.cities && !payload.items.gender && !payload.items.languages && !payload.items.physicianGroups && !payload.items.specialties) {
        this.setState({
          postResults: [],
          pages: []
        });
      } else {
        var _this$state2 = this.state,
            currentPage = _this$state2.currentPage,
            rows = _this$state2.rows;
        var apiUrl = this.props.data.apiUrl;
        var url = "".concat(apiUrl, "?start=").concat(currentPage, "&rows=").concat(rows);
        var httpProps = await this.handleSearchProps(payload);

        try {
          var res = await fetch(url, httpProps);

          var _ref2 = await res.json(),
              Affiliates = _ref2.Affiliates,
              Total = _ref2.Total,
              Errors = _ref2.Errors;

          this.setState(function () {
            return {
              postResults: Affiliates,
              totalItems: Total,
              pages: _toConsumableArray(Array(Total).keys()).map(function (i) {
                return {
                  id: i + 1
                };
              }),
              pageStart: _this50.state.currentPage == 0 ? 1 : _this50.state.currentPage * 25 + 1,
              pageEnd: _this50.state.currentPage == 0 ? Total > 25 ? _this50.state.pageEnd = 25 : Total : Total > (_this50.state.currentPage + 1) * 25 ? (_this50.state.currentPage + 1) * 25 : Total,
              hasNoResults: Errors.length > 0 ? Errors : _this50.props.data.noResultsMessage
            };
          });
        } catch (err) {
          console.err(err);
        }
      }
    }
  }, {
    key: "handleSearchInput",
    value: function handleSearchInput(_ref3) {
      var terms = _ref3.terms,
          zip = _ref3.zip;
      var payload = this.state.payload;
      this.setState({
        payload: {
          zip: zip,
          query: terms,
          items: payload.items
        },
        currentPage: 0
      });
    }
  }, {
    key: "handleSort",
    value: function handleSort(sortField, sortOrder) {
      var payload = this.state.payload;
      this.setState({
        payload: {
          sortField: sortField,
          sortOrder: sortOrder,
          zip: payload.zip,
          query: payload.query,
          items: payload.items
        }
      });
    }
  }, {
    key: "handlePayload",
    value: function handlePayload(items) {
      var payload = this.state.payload;
      this.setState({
        payload: {
          items: items,
          zip: payload.zip,
          query: payload.query
        }
      });
    }
  }, {
    key: "handleFilters",
    value: function handleFilters(key, filters) {
      var updatedFilters = this.state.filterItems;

      if (!filters) {
        updatedFilters.delete(key);
      } else {
        updatedFilters.set(key, filters);
      }

      this.setState({
        filterItems: updatedFilters,
        currentPage: 0
      });
    }
  }, {
    key: "getCheckedFilters",
    value: function getCheckedFilters(filterName) {
      var filters = this.state.filterItems.get(filterName);
      return filters ? filters : "";
    }
  }, {
    key: "removeAllFilters",
    value: function removeAllFilters() {
      var updatedPayload = this.state.payload;
      var updatedFilterItems = this.state.filterItems;
      updatedPayload.items = {
        cities: '',
        gender: '',
        languages: '',
        physicianGroups: '',
        specialties: ''
      };
      updatedFilterItems.set('city', '');
      updatedFilterItems.set('gender', '');
      updatedFilterItems.set('languages', '');
      updatedFilterItems.set('medicalReferralGroups', '');
      updatedFilterItems.set('specialty', '');
      this.setState({
        filterItems: updatedFilterItems,
        payload: updatedPayload
      });
      this.handleSelectedFilters();
      this.fetchSearchResults(updatedPayload);
      return updatedPayload;
    }
  }, {
    key: "removeSelectedFilter",
    value: function removeSelectedFilter(filter) {
      var updated = false;
      var filters = this.state.filterItems;
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;

      try {
        for (var _iterator = filters[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var _step$value = _slicedToArray(_step.value, 2),
              key = _step$value[0],
              value = _step$value[1];

          if (value !== undefined && value !== null && value.includes(filter)) {
            var updatedFilters = value.replace(filter + ',', '');
            filters.set(key, updatedFilters);
            updated = true;
          }
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return != null) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }

      if (updated) {
        var updatedPayload = this.state.payload;
        var updatedItems = {
          cities: '',
          gender: '',
          languages: '',
          physicianGroups: '',
          specialties: ''
        };
        updatedItems.cities = filters.get('city') ? filters.get('city') : '';
        updatedItems.gender = filters.get('gender') ? filters.get('gender') : '';
        updatedItems.languages = filters.get('languages') ? filters.get('languages') : '';
        updatedItems.physicianGroups = filters.get('medicalReferralGroups') ? filters.get('medicalReferralGroups') : '';
        updatedItems.specialties = filters.get('specialty') ? filters.get('specialty') : '';
        updatedPayload.items = updatedItems;
        this.setState({
          filterItems: filters,
          payload: updatedPayload
        });
        this.handleSelectedFilters();
        this.fetchSearchResults(updatedPayload);
      }
    }
  }, {
    key: "handleSelectedFilters",
    value: function handleSelectedFilters() {
      var array = this.state.filterItems;
      array = Array.from(array, function (_ref4) {
        var _ref5 = _slicedToArray(_ref4, 2),
            name = _ref5[0],
            value = _ref5[1];

        return {
          name: name,
          value: value
        };
      });
      var filters = array.map(function (_ref6) {
        var value = _ref6.value;
        return value;
      });
      var values = filters.toString().split(",").filter(function (item) {
        return item !== "";
      });
      this.setState({
        selectedItems: values
      });
    }
  }, {
    key: "handleScroll",
    value: function handleScroll() {
      this.sibling.current.executeScrollTo();
    }
  }, {
    key: "handleClearFormInputs",
    value: function handleClearFormInputs() {
      this.clearChildState.current.handleClearForm();
    }
  }, {
    key: "handleResetResults",
    value: function handleResetResults() {
      this.handleClearFormInputs();
      this.setState({
        payload: {
          zip: "",
          query: "",
          sortField: "",
          sortOrder: "",
          items: {}
        },
        postResults: [],
        pages: [],
        selectedItems: [],
        filterItems: new Map(),
        isFilter: false,
        hasNoResults: "",
        totalItems: 0
      });
      sessionStorage.removeItem("zipCode");
    }
  }, {
    key: "render",
    value: function render() {
      var _this$state3 = this.state,
          hasNoResults = _this$state3.hasNoResults,
          searched = _this$state3.searched,
          postResults = _this$state3.postResults,
          totalItems = _this$state3.totalItems,
          pageStart = _this$state3.pageStart,
          pageEnd = _this$state3.pageEnd,
          query = _this$state3.query,
          payload = _this$state3.payload,
          filterItems = _this$state3.filterItems,
          currentPage = _this$state3.currentPage,
          rows = _this$state3.rows,
          selectedItems = _this$state3.selectedItems;
      return React.createElement("div", {
        className: "kca-combined-search"
      }, React.createElement(KcaCombinedSearchForm, {
        removeAllFilters: this.removeAllFilters.bind(this),
        removeSelectedFilter: this.removeSelectedFilter.bind(this),
        getCheckedFilters: this.getCheckedFilters.bind(this),
        receiveFilters: this.handleFilters.bind(this),
        query: query,
        payload: payload,
        filterItems: filterItems,
        selectedItems: selectedItems,
        postResults: postResults,
        cityItems: this.props.data.apiCitiesUrl,
        genderItems: this.props.data.apiGendersUrl,
        groupItems: this.props.data.apiPhysicianGroupsUrl,
        specialtyItems: this.props.data.apiSpecialtiesUrl,
        languageItems: this.props.data.apiLanguagesUrl,
        providerType: this.props.data.providerType,
        getItems: this.handlePayload.bind(this),
        handleInput: this.handleSearchInput.bind(this),
        receivePayload: this.fetchSearchResults.bind(this),
        getCurrentLocationUrl: this.props.data.apiLocateCurrentLocationUrl,
        applyFilters: this.handleSelectedFilters.bind(this),
        clearSearchResults: this.handleResetResults.bind(this),
        ref: this.clearChildState
      }), React.createElement(KcaCombinedSearchResults, {
        hasNoResults: hasNoResults,
        searched: searched,
        zipCode: payload.zip,
        femaleSilhouette: this.props.data.femaleSilhouetteImageUrl,
        maleSilhouette: this.props.data.maleSilhouetteImageUrl,
        results: postResults,
        totalItems: totalItems,
        pageStart: pageStart,
        pageEnd: pageEnd,
        sortedItem: this.handleSort.bind(this),
        receivePayload: this.fetchSearchResults.bind(this),
        ref: this.sibling
      }), React.createElement(KcaPagination, {
        items: this.state.pages,
        onChangePage: this.handleChangePage,
        itemsPerPage: rows,
        currentPage: currentPage,
        scrollToTheTop: this.handleScroll.bind(this)
      }));
    }
  }]);

  return KcaCombinedSearchMain;
}(React.Component);

;

var KcaCombinedSearchResults =
/*#__PURE__*/
function (_React$Component25) {
  _inherits(KcaCombinedSearchResults, _React$Component25);

  function KcaCombinedSearchResults(props) {
    _classCallCheck(this, KcaCombinedSearchResults);

    return _possibleConstructorReturn(this, _getPrototypeOf(KcaCombinedSearchResults).call(this, props));
  }

  _createClass(KcaCombinedSearchResults, [{
    key: "executeScrollTo",
    value: function executeScrollTo() {
      window.scrollTo({
        top: 180,
        left: 0,
        behavior: "smooth"
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this51 = this;

      var _this$props2 = this.props,
          results = _this$props2.results,
          totalItems = _this$props2.totalItems,
          pageStart = _this$props2.pageStart,
          pageEnd = _this$props2.pageEnd,
          sortedItem = _this$props2.sortedItem,
          recievePayload = _this$props2.recievePayload,
          hasNoResults = _this$props2.hasNoResults,
          searched = _this$props2.searched,
          zipCode = _this$props2.zipCode;
      return React.createElement(React.Fragment, null, React.createElement("div", {
        class: "search-content"
      }, React.createElement(KcaSortBy, {
        availableResults: results,
        totalItems: totalItems,
        pageStart: pageStart,
        pageEnd: pageEnd,
        sortedItem: sortedItem,
        recievePayload: recievePayload,
        zipCode: zipCode
      }), results.length === 0 && searched ? React.createElement("div", {
        class: "row combined-search-no-results"
      }, React.createElement("div", {
        class: "col-12 text-center"
      }, React.createElement("b", null, hasNoResults))) : results.map(function (affiliate) {
        return React.createElement("div", {
          class: "row search-result-item"
        }, React.createElement("div", {
          class: "col-12 col-sm-2"
        }, React.createElement("div", {
          class: "image-container"
        }, affiliate.ProviderImage != null ? React.createElement("img", {
          src: affiliate.ProviderImage,
          alt: affiliate.ProviderImageAltText
        }) : affiliate.Gender === "Female" ? React.createElement("img", {
          src: _this51.props.femaleSilhouette,
          alt: affiliate.ProviderImageAltText
        }) : React.createElement("img", {
          src: _this51.props.maleSilhouette,
          alt: affiliate.ProviderImageAltText
        }))), React.createElement("div", {
          class: "col-12 col-sm-10"
        }, React.createElement("div", {
          class: "row mobile-name-padding"
        }, React.createElement("div", {
          class: "col-12 col-sm-8 header padding-left-0"
        }, affiliate.ProviderType === "KSA" && affiliate.BioPageUrl ? React.createElement("a", {
          class: "ksa-provider",
          href: affiliate.BioPageUrl
        }, affiliate.FirstName, " ", affiliate.LastName, ", ", affiliate.Degree) : React.createElement("a", {
          class: "non-ksa-provider"
        }, affiliate.FirstName, " ", affiliate.LastName, ", ", affiliate.Degree), affiliate.ProviderType == "KSA" && React.createElement("img", {
          class: "ksa-image",
          src: "/-/media/Themes/KelseySeybold/KelseyCareAdvantage/KelseyCareAdvantage/images/doctor-icon.png"
        })), React.createElement("div", {
          class: "col-12 col-sm-4 padding-left-0"
        }, _this51.props.zipCode !== null && _this51.props.zipCode !== "" && _this51.props.zipCode !== undefined ? React.createElement("p", null, React.createElement("b", null, affiliate.Distance), " miles from ", _this51.props.zipCode) : React.createElement("p", {
          class: "spacer"
        }))), React.createElement("div", {
          class: "row mobile-row-padding"
        }, React.createElement("div", {
          class: "col-12 col-sm-4 header padding-top-5"
        }, React.createElement("div", {
          class: "row margin-right-1"
        }, React.createElement("b", {
          class: "mobile-regular"
        }, affiliate.PhysicianGroup)), React.createElement("div", {
          class: "row margin-right-1"
        }, React.createElement("p", null, affiliate.Address)), React.createElement("div", {
          class: "row margin-right-1"
        }, React.createElement("p", null, affiliate.City, ", ", affiliate.State, ", ", affiliate.ZipCode)), React.createElement("div", {
          class: "row"
        }, React.createElement("p", {
          class: "link"
        }, React.createElement("i", {
          class: "fa fa-arrow-circle-right"
        }), React.createElement("a", {
          href: affiliate.DirectionsUrl,
          target: "_blank"
        }, "Directions"))), React.createElement("div", {
          class: "row padding-top-5"
        }, React.createElement("p", {
          class: "link"
        }, React.createElement("i", {
          class: "fa fa-phone"
        }), React.createElement("a", {
          href: "tel:".concat(affiliate.PhoneNumber.replace(/[-()\s+]/g, ""))
        }, affiliate.PhoneNumber)))), React.createElement("div", {
          class: "col-12 col-sm-4 padding-top-5"
        }, React.createElement("div", {
          class: "row margin-right-1"
        }, React.createElement("p", null, React.createElement("b", null, "Specialties:"), " ", affiliate.Specialty)), React.createElement("div", {
          class: "row"
        }, React.createElement("p", null, React.createElement("b", null, "Gender:"), " ", affiliate.Gender)), React.createElement("div", {
          class: "row margin-right-1"
        }, React.createElement("p", null, React.createElement("b", null, "Languages:"), " ", affiliate.Languages))), React.createElement("div", {
          class: "col-12 col-sm-4 padding-top-5"
        }, React.createElement("div", {
          class: "row"
        }, affiliate.AcceptingNewPatients && React.createElement("p", {
          class: "new-patients"
        }, React.createElement("i", {
          class: "fa fa-check-circle"
        }), " Accepting New Patients")), React.createElement("div", {
          class: "row"
        }, React.createElement("p", null, React.createElement("b", null, "NPI:"), " ", affiliate.NationalProviderId)), React.createElement("div", {
          class: "row"
        }, React.createElement("p", {
          class: "close-margin"
        }, React.createElement("b", null, "Referral Group:"))), React.createElement("div", {
          class: "row margin-right-1"
        }, React.createElement("p", null, affiliate.MedicalReferralGroups))))));
      }, this)));
    }
  }]);

  return KcaCombinedSearchResults;
}(React.Component);

;

var KcaMultiSearchMain =
/*#__PURE__*/
function (_React$Component26) {
  _inherits(KcaMultiSearchMain, _React$Component26);

  function KcaMultiSearchMain(props) {
    var _this52;

    _classCallCheck(this, KcaMultiSearchMain);

    _this52 = _possibleConstructorReturn(this, _getPrototypeOf(KcaMultiSearchMain).call(this, props));
    _this52.state = {
      cities: "",
      specialties: "",
      physicianGroups: "",
      gender: "",
      languages: "",
      payload: {},
      isShowModal: false,
      isFilter: false,
      loaded: false
    };
    _this52.cityChild = React.createRef();
    _this52.genderChild = React.createRef();
    _this52.specialtyChild = React.createRef();
    _this52.groupChild = React.createRef();
    _this52.languageChild = React.createRef();
    _this52.scroller = React.createRef();
    return _this52;
  }

  _createClass(KcaMultiSearchMain, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var persistedCityFilters = this.props.getCheckedFilters('city');
      var persistedGenderFilters = this.props.getCheckedFilters('gender');
      var persistedLanguageFilters = this.props.getCheckedFilters('languages');
      var persistedMedicalReferralGroupFilters = this.props.getCheckedFilters('medicalReferralGroups');
      var persistedSpecialtyFilters = this.props.getCheckedFilters('specialty');
      this.setState({
        cities: persistedCityFilters,
        gender: persistedGenderFilters,
        languages: persistedLanguageFilters,
        physicianGroups: persistedMedicalReferralGroupFilters,
        specialties: persistedSpecialtyFilters,
        loaded: true
      });
    }
  }, {
    key: "handleCitySearch",
    value: function handleCitySearch() {
      var _this$props3;

      for (var _len = arguments.length, cities = new Array(_len), _key = 0; _key < _len; _key++) {
        cities[_key] = arguments[_key];
      }

      var cityStrings = cities.join(",");
      this.setState({
        cities: cityStrings
      });

      (_this$props3 = this.props).receiveFilters.apply(_this$props3, ['city'].concat(cities));
    }
  }, {
    key: "handleGenderSearch",
    value: function handleGenderSearch() {
      var _this$props4;

      for (var _len2 = arguments.length, gender = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        gender[_key2] = arguments[_key2];
      }

      var genderString = gender.join(",");
      this.setState({
        gender: genderString
      });

      (_this$props4 = this.props).receiveFilters.apply(_this$props4, ['gender'].concat(gender));
    }
  }, {
    key: "handleLanguageSearch",
    value: function handleLanguageSearch() {
      var _this$props5;

      for (var _len3 = arguments.length, languages = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
        languages[_key3] = arguments[_key3];
      }

      var languageStrings = languages.join(",");
      this.setState({
        languages: languageStrings
      });

      (_this$props5 = this.props).receiveFilters.apply(_this$props5, ['languages'].concat(languages));
    }
  }, {
    key: "handlePhysicianGroupSearch",
    value: function handlePhysicianGroupSearch() {
      var _this$props6;

      for (var _len4 = arguments.length, physicianGroups = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
        physicianGroups[_key4] = arguments[_key4];
      }

      var physicianGroupStrings = physicianGroups.join(",");
      this.setState({
        physicianGroups: physicianGroupStrings
      });

      (_this$props6 = this.props).receiveFilters.apply(_this$props6, ['medicalReferralGroups'].concat(physicianGroups));
    }
  }, {
    key: "handleSpecialtySearch",
    value: function handleSpecialtySearch() {
      var _this$props7;

      for (var _len5 = arguments.length, specialties = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
        specialties[_key5] = arguments[_key5];
      }

      var specialtyStrings = specialties.join(",");
      this.setState({
        specialties: specialtyStrings
      });

      (_this$props7 = this.props).receiveFilters.apply(_this$props7, ['specialty'].concat(specialties));
    }
  }, {
    key: "handleSearch",
    value: function handleSearch() {
      var _this$state4 = this.state,
          cities = _this$state4.cities,
          specialties = _this$state4.specialties,
          physicianGroups = _this$state4.physicianGroups,
          gender = _this$state4.gender,
          languages = _this$state4.languages;
      var payload = {
        cities: cities,
        specialties: specialties,
        physicianGroups: physicianGroups,
        gender: gender,
        languages: languages
      };
      this.setState({
        payload: payload,
        isFilter: true
      });
      this.props.applyFilters();
      this.props.getItems(payload);
    }
  }, {
    key: "clearFilters",
    value: function clearFilters() {
      this.setState({
        cities: '',
        gender: '',
        languages: '',
        physicianGroups: '',
        specialties: ''
      });
      this.cityChild.current.clearCheckedFilters();
      this.genderChild.current.clearCheckedFilters();
      this.specialtyChild.current.clearCheckedFilters();
      this.groupChild.current.clearCheckedFilters();
      this.languageChild.current.clearCheckedFilters();
      this.props.removeAllFilters();
    }
  }, {
    key: "handleFilterModal",
    value: function handleFilterModal() {
      this.setState({
        isShowModal: true
      });
    }
  }, {
    key: "scrollToSelectedFilterGroup",
    value: function scrollToSelectedFilterGroup(name) {
      var id = name === 'Groups' ? 'Affiliate Medical Groups' : name;

      if (id !== null && id !== undefined && id !== '') {
        var ele = document.getElementById(id);
        this.scroller.current.scrollTo(0, ele.offsetTop - 80);
      }
    }
  }, {
    key: "render",
    value: function render() {
      if (!this.state.loaded) {
        return React.createElement(React.Fragment, null);
      }

      return React.createElement(KcaOverlayWrapper, null, React.createElement(KcaCloseButton, {
        closeModal: this.props.closeModal
      }), React.createElement("div", {
        ref: this.scroller,
        className: "filter-overlay-controls-content"
      }, React.createElement(KcaSpecialtyItems, {
        ref: this.specialtyChild,
        checkedFilters: this.state.specialties,
        specialtyItems: this.props.filters.specialties,
        receiveSpecialties: this.handleSpecialtySearch.bind(this)
      }), React.createElement(KcaGenderItems, {
        ref: this.genderChild,
        checkedFilters: this.state.gender,
        genderItems: this.props.filters.genders,
        receiveGender: this.handleGenderSearch.bind(this)
      }), React.createElement(KcaCityItems, {
        ref: this.cityChild,
        checkedFilters: this.state.cities,
        cityItems: this.props.filters.cities,
        receiveCities: this.handleCitySearch.bind(this)
      }), React.createElement(KcaGroupItems, {
        ref: this.groupChild,
        checkedFilters: this.state.physicianGroups,
        groupItems: this.props.filters.medicalGroups,
        receivePhysicianGroups: this.handlePhysicianGroupSearch.bind(this)
      }), React.createElement(KcaLanguageItems, {
        ref: this.languageChild,
        checkedFilters: this.state.languages,
        languageItems: this.props.filters.languages,
        receiveLanguages: this.handleLanguageSearch.bind(this)
      })), React.createElement(KcaFilterButtons, {
        applyFilters: this.handleSearch.bind(this),
        clearFilters: this.clearFilters.bind(this)
      }));
    }
  }]);

  return KcaMultiSearchMain;
}(React.Component);

;

var KcaPagination =
/*#__PURE__*/
function (_React$Component27) {
  _inherits(KcaPagination, _React$Component27);

  function KcaPagination(props) {
    var _this53;

    _classCallCheck(this, KcaPagination);

    _this53 = _possibleConstructorReturn(this, _getPrototypeOf(KcaPagination).call(this, props));
    _this53.state = {
      pager: {}
    };
    _this53.setPage = _this53.setPage.bind(_assertThisInitialized(_this53));
    _this53.getPager = _this53.getPager.bind(_assertThisInitialized(_this53));
    _this53.arrayPagination = _this53.arrayPagination.bind(_assertThisInitialized(_this53));
    _this53.getRange = _this53.getRange.bind(_assertThisInitialized(_this53));
    _this53.getItemClassName = _this53.getItemClassName.bind(_assertThisInitialized(_this53));
    return _this53;
  }

  _createClass(KcaPagination, [{
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps, prevState) {
      if (this.props.items !== prevProps.items) {
        this.setPage(this.props.currentPage + 1);
      }
    }
  }, {
    key: "setPage",
    value: function setPage(page) {
      var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

      if (page < 1 || page > this.state.pager || isNaN(page)) {
        return;
      }

      var items = this.props.items;
      var pager = this.getPager(items.length, page, this.props.itemsPerPage);
      var pageOfItems = items.slice(pager.startIndex, pager.endIndex + 1);
      this.setState({
        pager: pager
      });

      if (e) {
        this.props.onChangePage(pageOfItems);
      }
    }
  }, {
    key: "getRange",
    value: function getRange(start, end) {
      return Array(end - start + 1).fill().map(function (v, i) {
        return i + start;
      });
    }
  }, {
    key: "arrayPagination",
    value: function arrayPagination(currentPage, pageCount) {
      var delta;

      if (pageCount <= 7) {
        delta = 7;
      } else {
        delta = currentPage > 4 && currentPage < pageCount - 3 ? 2 : 4;
      }

      var range = {
        start: Math.round(currentPage - delta / 2),
        end: Math.round(currentPage + delta / 2)
      };

      if (range.start - 1 === 1 || range.end + 1 === pageCount) {
        range.start += 1;
        range.end += 1;
      }

      var pages = currentPage > delta ? this.getRange(Math.min(range.start, pageCount - delta), Math.min(range.end, pageCount)) : this.getRange(1, Math.min(pageCount, delta + 1));

      var withDots = function withDots(value, pair) {
        return pages.length + 1 !== pageCount ? pair : [value];
      };

      if (pages[0] !== 1) {
        pages = withDots(1, [1, "..."]).concat(pages);
      }

      if (pages[pages.length - 1] < pageCount) {
        pages = pages.concat(withDots(pageCount, ["...", pageCount]));
      }

      return pages;
    }
  }, {
    key: "getPager",
    value: function getPager(totalItems, currentPage, pageSize) {
      currentPage = currentPage || 1;
      pageSize = pageSize || 25;
      var totalPages = Math.ceil(totalItems / pageSize);
      var startPage;
      var endPage;

      if (totalPages <= 10) {
        startPage = 1;
        endPage = totalPages;
      } else {
        if (currentPage <= 6) {
          startPage = 1;
          endPage = 10;
        } else if (currentPage + 4 >= totalPages) {
          startPage = totalPages - 9;
          endPage = totalPages;
        } else {
          startPage = currentPage - 5;
          endPage = currentPage + 4;
        }
      }

      var startIndex = (currentPage - 1) * pageSize;
      var endIndex = Math.min(startIndex + pageSize - 1, totalItems - 1);
      var pages = totalPages === 0 ? [] : this.arrayPagination(currentPage, totalPages);
      return {
        totalItems: totalItems,
        currentPage: currentPage,
        pageSize: pageSize,
        totalPages: totalPages,
        startPage: startPage,
        endPage: endPage,
        startIndex: startIndex,
        endIndex: endIndex,
        pages: pages
      };
    }
  }, {
    key: "getItemClassName",
    value: function getItemClassName(page) {
      if (this.state.pager.currentPage === page) {
        return "active";
      } else if (isNaN(page)) {
        return "disabled";
      } else {
        return null;
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this54 = this;

      var pager = this.state.pager;

      if (!pager.pages || pager.pages.length <= 1) {
        return null;
      }

      return React.createElement("nav", {
        role: "navigation",
        "aria-label": "Results Pagination Navigation",
        style: {
          margin: "auto",
          width: "50%",
          paddingBottom: "30px",
          textAlign: "center"
        }
      }, React.createElement("ul", {
        className: "kca-pagination"
      }, pager.pages.map(function (page, index) {
        return React.createElement("li", {
          key: index,
          className: _this54.getItemClassName(page)
        }, React.createElement("a", {
          href: _this54.page ? "/page-".concat(_this54.page) : null,
          "aria-label": "Go to page ".concat(page),
          "aria-current": pager.currentPage === page ? "true" : null,
          "aria-disabled": isNaN(page),
          "tab-index": isNaN(page) ? -1 : 0,
          onClick: function onClick(e) {
            e.preventDefault();

            _this54.setPage(page, e);

            _this54.props.scrollToTheTop();
          }
        }, page));
      })));
    }
  }]);

  return KcaPagination;
}(React.Component);

;

var KcaCloseButton = function KcaCloseButton(_ref7) {
  var closeModal = _ref7.closeModal;
  return React.createElement("div", {
    className: "filter-overlay-controls-header"
  }, React.createElement("div", {
    className: "close-button",
    onClick: closeModal
  }, React.createElement("i", {
    className: "fa fa-times"
  }), React.createElement("label", null, "Close")));
};

;

var KcaFilterButtons = function KcaFilterButtons(_ref8) {
  var clearFilters = _ref8.clearFilters,
      applyFilters = _ref8.applyFilters;
  return React.createElement(React.Fragment, null, React.createElement("div", {
    className: "filter-overlay-controls-footer"
  }, React.createElement("div", {
    class: "row"
  }, React.createElement("div", {
    className: "col-12 col-md-4 filter-control-button",
    onClick: applyFilters
  }, React.createElement("label", null, "APPLY FILTERS")), React.createElement("div", {
    className: "col-12 col-md-4 filter-control-button",
    onClick: clearFilters
  }, React.createElement("label", null, "CLEAR FILTERS")))));
};

;

var KcaViewMoreButton =
/*#__PURE__*/
function (_React$Component28) {
  _inherits(KcaViewMoreButton, _React$Component28);

  function KcaViewMoreButton() {
    _classCallCheck(this, KcaViewMoreButton);

    return _possibleConstructorReturn(this, _getPrototypeOf(KcaViewMoreButton).apply(this, arguments));
  }

  _createClass(KcaViewMoreButton, [{
    key: "render",
    value: function render() {
      return React.createElement("div", null, React.createElement("button", {
        type: "button",
        onClick: this.props.loadMoreResults
      }, "VIEW MORE RESULTS"));
    }
  }]);

  return KcaViewMoreButton;
}(React.Component);

;

var ShowLessButton = function ShowLessButton(_ref9) {
  var label = _ref9.label,
      otherProps = _objectWithoutProperties(_ref9, ["label"]);

  return React.createElement("div", _extends({
    className: "filter-overlay-controls-additional-button"
  }, otherProps), React.createElement("label", null, label), React.createElement("i", {
    className: "fa fa-chevron-up"
  }));
};

;

var ShowMoreButton = function ShowMoreButton(_ref10) {
  var label = _ref10.label,
      otherProps = _objectWithoutProperties(_ref10, ["label"]);

  return React.createElement("div", _extends({
    className: "filter-overlay-controls-additional-button"
  }, otherProps), React.createElement("label", null, label), React.createElement("i", {
    className: "fa fa-chevron-down"
  }));
};

;
var filters = ["Cities", "Gender", "Groups", "Languages", "Specialties"];

var KcaControls = function KcaControls(_ref11) {
  var openModal = _ref11.openModal;
  return React.createElement("div", {
    className: "filter-controls"
  }, React.createElement("div", {
    class: "row padding-top-40 align-items-center"
  }, React.createElement("div", {
    class: "col-lg-2 padding-left-90 moblie-padding"
  }, React.createElement("lable", {
    class: "filter-label mx-auto"
  }, "Filter By:")), filters.map(function (name) {
    return React.createElement("div", {
      className: "col-sm-6 col-lg-2 moblie-padding"
    }, React.createElement("div", {
      className: "filter-button",
      onClick: function onClick() {
        return openModal(name);
      }
    }, name));
  })));
};

;

var KcaFormInputs =
/*#__PURE__*/
function (_React$Component29) {
  _inherits(KcaFormInputs, _React$Component29);

  function KcaFormInputs(props) {
    var _this55;

    _classCallCheck(this, KcaFormInputs);

    _this55 = _possibleConstructorReturn(this, _getPrototypeOf(KcaFormInputs).call(this, props));
    _this55.state = {
      searchInputContents: "",
      searchTerms: "",
      zipInputContents: ""
    };
    _this55.handleKeywordSearchInput = _this55.handleKeywordSearchInput.bind(_assertThisInitialized(_this55));
    _this55.handleZipCodeSearch = _this55.handleZipCodeSearch.bind(_assertThisInitialized(_this55));
    _this55.handleUseMyLocation = _this55.handleUseMyLocation.bind(_assertThisInitialized(_this55));
    _this55.clearInputs = _this55.clearInputs.bind(_assertThisInitialized(_this55));
    return _this55;
  }

  _createClass(KcaFormInputs, [{
    key: "handleKeywordSearchInput",
    value: function handleKeywordSearchInput(e) {
      var searchValue = e.target.value.toLowerCase();
      this.setState({
        searchInputContents: searchValue
      });
      var searchTerms = searchValue.trim().replace(/\s+/g, ",");
      this.setState({
        searchTerms: searchTerms
      });

      if (!isNaN(this.state.zipInputContents) && this.state.zipInputContents.length === 5) {
        var searchCriteria = {
          terms: searchTerms,
          zip: this.state.zipInputContents
        };
        this.props.handleInput(searchCriteria);
      } else {
        var _searchCriteria = {
          terms: searchTerms,
          zip: ""
        };
        this.props.handleInput(_searchCriteria);
      }
    }
  }, {
    key: "filterZipCodeInput",
    value: function filterZipCodeInput(inputContents) {
      return inputContents.replace(/[^0-9]+/g, '');
    }
  }, {
    key: "handleZipCodeSearch",
    value: function handleZipCodeSearch(e) {
      var zipInputContents = this.filterZipCodeInput(e.target.value.trim());
      this.setState({
        zipInputContents: zipInputContents
      });

      if (!isNaN(zipInputContents) && zipInputContents.length === 5) {
        sessionStorage.setItem("zipCode", zipInputContents);
        var searchCriteria = {
          terms: this.state.searchTerms,
          zip: zipInputContents
        };
        this.props.handleInput(searchCriteria);
      } else {
        if (this.state.searchTerms.length > 1) {
          var _searchCriteria2 = {
            terms: this.state.searchTerms,
            zip: ""
          };
          this.props.handleInput(_searchCriteria2);
        } else {
          var _searchCriteria3 = {
            terms: "",
            zip: ""
          };
          this.props.handleInput(_searchCriteria3);
        }
      }
    }
  }, {
    key: "handleUseMyLocation",
    value: async function handleUseMyLocation() {
      var _this56 = this;

      if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(async function (position) {
          var response = await fetch("/api/search/consolidated-providers/LocateCurrentLocation", {
            method: "POST",
            headers: {
              Accept: "application/json",
              "Content-Type": "application/json"
            },
            body: JSON.stringify({
              lat: position.coords.latitude,
              lng: position.coords.longitude
            })
          });

          var _ref12 = await response.json(),
              Zip = _ref12.Zip;

          if (Zip !== undefined && Zip !== null && Zip !== "") {
            _this56.setState({
              zipInputContents: Zip
            });

            sessionStorage.setItem("zipCode", Zip);
            var searchCriteria = {
              terms: _this56.state.searchTerms,
              zip: Zip
            };

            _this56.props.handleInput(searchCriteria);
          }
        }, function () {
          alert("Could not get your position");
        });
      }
    }
  }, {
    key: "clearInputs",
    value: function clearInputs() {
      this.setState({
        searchInputContents: "",
        searchTerms: "",
        zipInputContents: ""
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this57 = this;

      var _this$state5 = this.state,
          searchInputContents = _this$state5.searchInputContents,
          zipInputContents = _this$state5.zipInputContents;
      return React.createElement(React.Fragment, null, React.createElement("div", {
        class: "row padding-top-60"
      }, React.createElement("div", {
        class: "col-12 col-lg-9 col-xl-6  padding-left-90 control search moblie-padding"
      }, React.createElement("label", {
        class: "padding-right-10"
      }, "Search:"), React.createElement("input", {
        class: "search-box",
        id: "keyword",
        type: "text",
        name: "keyword",
        value: searchInputContents,
        placeholder: "Search by first name, last name, specialty",
        onChange: function onChange(e) {
          return _this57.handleKeywordSearchInput(e);
        }
      })), React.createElement("div", {
        class: "col-12 col-sm-6 col-lg-5 col-xl-3 control moblie-padding"
      }, React.createElement("label", {
        class: "padding-right-10"
      }, "Zip Code:"), React.createElement("input", {
        class: "zip-width",
        maxLength: "5",
        type: "text",
        id: "zip",
        name: "zip",
        onChange: function onChange(e) {
          return _this57.handleZipCodeSearch(e);
        },
        value: zipInputContents
      })), React.createElement("div", {
        class: "col-12 col-sm-6 col-lg-4 col-xl-3 moblie-padding mobile-padding-left"
      }, React.createElement("div", {
        className: "location-button padding-left-10",
        onClick: this.handleUseMyLocation
      }, React.createElement("i", {
        className: "fa fa-location-arrow"
      }), React.createElement("span", null, "Use My Location")))));
    }
  }]);

  return KcaFormInputs;
}(React.Component);

;

var KcaFormWrapper = function KcaFormWrapper(props) {
  return React.createElement("div", {
    className: "search-controls"
  }, React.createElement("div", {
    class: "row"
  }, React.createElement("div", {
    class: "col-12 search-controls-title"
  }, "Find a Doctor")), React.createElement("div", {
    className: "search-and-filter-controls"
  }, props.children));
};

;

var KcaSelectedFilters =
/*#__PURE__*/
function (_React$Component30) {
  _inherits(KcaSelectedFilters, _React$Component30);

  function KcaSelectedFilters(props) {
    var _this58;

    _classCallCheck(this, KcaSelectedFilters);

    _this58 = _possibleConstructorReturn(this, _getPrototypeOf(KcaSelectedFilters).call(this, props));
    _this58.handleFilterRemoval = _this58.handleFilterRemoval.bind(_assertThisInitialized(_this58));
    return _this58;
  }

  _createClass(KcaSelectedFilters, [{
    key: "handleFilterRemoval",
    value: function handleFilterRemoval(filter) {
      this.props.removeSelectedFilter(filter);
    }
  }, {
    key: "render",
    value: function render() {
      var _this59 = this;

      if (this.props.selectedItems.length === 0 && this.props.postResults.length === 0) {
        return React.createElement(React.Fragment, null);
      }

      return React.createElement(React.Fragment, null, React.createElement("div", {
        className: "selected-filter-controls"
      }, this.props.postResults.length > 0 || this.props.selectedItems.length > 0 ? React.createElement("div", {
        className: " row selected-filter-buttons"
      }, this.props.selectedItems.map(function (item, i) {
        return React.createElement("div", {
          className: "selected-filter-button",
          key: i,
          onClick: function onClick() {
            return _this59.handleFilterRemoval(item);
          }
        }, item, React.createElement("i", {
          className: "fa fa-times"
        }));
      })) : null, this.props.postResults.length > 0 || this.props.selectedItems.length > 0 ? React.createElement("div", {
        className: "row reset-filters-button",
        onClick: this.props.clearSearchResults
      }, React.createElement("i", {
        className: "fa fa-refresh"
      }), React.createElement("span", null, "Reset Results")) : null));
    }
  }]);

  return KcaSelectedFilters;
}(React.Component);

;

var KcaCheckbox =
/*#__PURE__*/
function (_React$Component31) {
  _inherits(KcaCheckbox, _React$Component31);

  function KcaCheckbox(props) {
    var _this60;

    _classCallCheck(this, KcaCheckbox);

    _this60 = _possibleConstructorReturn(this, _getPrototypeOf(KcaCheckbox).call(this, props));
    _this60.state = {
      isChecked: _this60.props.checked,
      name: _this60.props.name
    };
    _this60.handleClick = _this60.handleClick.bind(_assertThisInitialized(_this60));
    _this60.clearCheck = _this60.clearCheck.bind(_assertThisInitialized(_this60));
    return _this60;
  }

  _createClass(KcaCheckbox, [{
    key: "handleClick",
    value: function handleClick(e) {
      this.setState({
        isChecked: e.target.checked
      });
      this.props.handleChange(e);
    }
  }, {
    key: "clearCheck",
    value: function clearCheck() {
      this.setState({
        isChecked: false
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this61 = this;

      return React.createElement(React.Fragment, null, React.createElement("label", null, React.createElement("input", {
        checked: this.state.isChecked,
        className: this.state.isChecked ? 'checked' : '',
        onClick: function onClick(e) {
          _this61.handleClick(e);
        },
        type: "checkbox",
        value: this.state.name
      }), this.state.name));
    }
  }]);

  return KcaCheckbox;
}(React.Component);

;

var KcaCheckboxWrapper = function KcaCheckboxWrapper(_ref13) {
  var title = _ref13.title,
      children = _ref13.children;
  return React.createElement("div", {
    className: "filter-overlay-controls-section",
    id: title
  }, React.createElement("h2", null, title), React.createElement("div", {
    className: "filter-overlay-controls-initial"
  }, children));
};

;

var KcaCityItems =
/*#__PURE__*/
function (_React$Component32) {
  _inherits(KcaCityItems, _React$Component32);

  function KcaCityItems(props) {
    var _this62;

    _classCallCheck(this, KcaCityItems);

    _this62 = _possibleConstructorReturn(this, _getPrototypeOf(KcaCityItems).call(this, props));
    _this62.state = {
      checkedFilters: _this62.props.checkedFilters,
      cities: _this62.props.cityItems.slice(0, 5),
      seeAll: false
    };
    _this62.handleCheckbox = _this62.handleCheckbox.bind(_assertThisInitialized(_this62));
    _this62.setCheckBoxStatus = _this62.setCheckBoxStatus.bind(_assertThisInitialized(_this62));
    _this62.checkboxRefs = [];
    return _this62;
  }

  _createClass(KcaCityItems, [{
    key: "handleSeeAllCities",
    value: function handleSeeAllCities() {
      var cityItems = this.props.cityItems;
      this.setState(function (prevState) {
        return {
          cities: _toConsumableArray(new Set([].concat(_toConsumableArray(prevState.cities), _toConsumableArray(cityItems)))),
          seeAll: true
        };
      });
    }
  }, {
    key: "handleLessCities",
    value: function handleLessCities() {
      var cities = this.state.cities;
      this.setState({
        cities: _toConsumableArray(cities.slice(0, 5)),
        seeAll: false
      });
    }
  }, {
    key: "handleCheckbox",
    value: function handleCheckbox(e) {
      var _e$target = e.target,
          value = _e$target.value,
          checked = _e$target.checked;

      if (checked) {
        var updatedFilters = this.state.checkedFilters + value + ',';
        this.setState({
          checkedFilters: updatedFilters
        });
        this.props.receiveCities(updatedFilters);
      } else {
        var _updatedFilters = this.state.checkedFilters.replace(value + ',', '');

        this.setState({
          checkedFilters: _updatedFilters
        });
        this.props.receiveCities(_updatedFilters);
      }
    }
  }, {
    key: "setCheckBoxStatus",
    value: function setCheckBoxStatus(city) {
      var found = false;
      var checkedCities = this.state.checkedFilters.split(',');

      for (var i = 0; i < checkedCities.length; i++) {
        if (checkedCities[i] === city) {
          found = true;
          break;
        }
      }

      return found;
    }
  }, {
    key: "clearCheckedFilters",
    value: function clearCheckedFilters() {
      for (var i = 0; i < this.checkboxRefs.length; i++) {
        this.checkboxRefs[i].clearCheck();
      }

      this.setState({
        checkedFilters: ""
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this63 = this;

      var _this$state6 = this.state,
          cities = _this$state6.cities,
          seeAll = _this$state6.seeAll;
      return React.createElement(KcaCheckboxWrapper, {
        title: "Cities"
      }, cities.map(function (city) {
        return React.createElement(KcaCheckbox, {
          ref: function ref(kcb) {
            return kcb && _this63.checkboxRefs.push(kcb);
          },
          checked: _this63.setCheckBoxStatus(city),
          handleChange: _this63.handleCheckbox.bind(_this63),
          name: city
        });
      }), React.createElement("div", {
        className: "filter-overlay-controls-additional"
      }, !seeAll && React.createElement(ShowMoreButton, {
        label: "See All Cities",
        onClick: this.handleSeeAllCities.bind(this)
      }), seeAll && React.createElement(ShowLessButton, {
        label: "See Less Cities",
        onClick: this.handleLessCities.bind(this)
      })));
    }
  }]);

  return KcaCityItems;
}(React.Component);

;

var KcaGenderItems =
/*#__PURE__*/
function (_React$Component33) {
  _inherits(KcaGenderItems, _React$Component33);

  function KcaGenderItems(props) {
    var _this64;

    _classCallCheck(this, KcaGenderItems);

    _this64 = _possibleConstructorReturn(this, _getPrototypeOf(KcaGenderItems).call(this, props));
    _this64.state = {
      checkedFilters: _this64.props.checkedFilters,
      genders: _this64.props.genderItems
    };
    _this64.handleCheckbox = _this64.handleCheckbox.bind(_assertThisInitialized(_this64));
    _this64.setCheckBoxStatus = _this64.setCheckBoxStatus.bind(_assertThisInitialized(_this64));
    _this64.checkboxRefs = [];
    return _this64;
  }

  _createClass(KcaGenderItems, [{
    key: "handleCheckbox",
    value: function handleCheckbox(e) {
      var _e$target2 = e.target,
          value = _e$target2.value,
          checked = _e$target2.checked;

      if (checked) {
        var updatedFilters = this.state.checkedFilters + value + ',';
        this.setState({
          checkedFilters: updatedFilters
        });
        this.props.receiveGender(updatedFilters);
      } else {
        var _updatedFilters2 = this.state.checkedFilters.replace(value + ',', '');

        this.setState({
          checkedFilters: _updatedFilters2
        });
        this.props.receiveGender(_updatedFilters2);
      }
    }
  }, {
    key: "setCheckBoxStatus",
    value: function setCheckBoxStatus(gender) {
      var found = false;
      var checkedGenders = this.state.checkedFilters.split(',');

      for (var i = 0; i < checkedGenders.length; i++) {
        if (checkedGenders[i] === gender) {
          found = true;
          break;
        }
      }

      return found;
    }
  }, {
    key: "clearCheckedFilters",
    value: function clearCheckedFilters() {
      for (var i = 0; i < this.checkboxRefs.length; i++) {
        this.checkboxRefs[i].clearCheck();
      }

      this.setState({
        checkedFilters: ""
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this65 = this;

      var genders = this.state.genders;
      return React.createElement(KcaCheckboxWrapper, {
        title: "Gender"
      }, genders.map(function (gender) {
        return React.createElement(KcaCheckbox, {
          ref: function ref(kcb) {
            return kcb && _this65.checkboxRefs.push(kcb);
          },
          checked: _this65.setCheckBoxStatus(gender),
          handleChange: _this65.handleCheckbox.bind(_this65),
          name: gender
        });
      }));
    }
  }]);

  return KcaGenderItems;
}(React.Component);

;

var KcaGroupItems =
/*#__PURE__*/
function (_React$Component34) {
  _inherits(KcaGroupItems, _React$Component34);

  function KcaGroupItems(props) {
    var _this66;

    _classCallCheck(this, KcaGroupItems);

    _this66 = _possibleConstructorReturn(this, _getPrototypeOf(KcaGroupItems).call(this, props));
    _this66.state = {
      checkedFilters: _this66.props.checkedFilters,
      groups: _this66.props.groupItems.slice(0, 5)
    };
    _this66.handleCheckbox = _this66.handleCheckbox.bind(_assertThisInitialized(_this66));
    _this66.setCheckBoxStatus = _this66.setCheckBoxStatus.bind(_assertThisInitialized(_this66));
    _this66.checkboxRefs = [];
    return _this66;
  }

  _createClass(KcaGroupItems, [{
    key: "handleCheckbox",
    value: function handleCheckbox(e) {
      var _e$target3 = e.target,
          value = _e$target3.value,
          checked = _e$target3.checked;

      if (checked) {
        var updatedFilters = this.state.checkedFilters + value + ',';
        this.setState({
          checkedFilters: updatedFilters
        });
        this.props.receivePhysicianGroups(updatedFilters);
      } else {
        var _updatedFilters3 = this.state.checkedFilters.replace(value + ',', '');

        this.setState({
          checkedFilters: _updatedFilters3
        });
        this.props.receivePhysicianGroups(_updatedFilters3);
      }
    }
  }, {
    key: "setCheckBoxStatus",
    value: function setCheckBoxStatus(group) {
      var found = false;
      var checkedGroups = this.state.checkedFilters.split(',');

      for (var i = 0; i < checkedGroups.length; i++) {
        if (checkedGroups[i] === group) {
          found = true;
          break;
        }
      }

      return found;
    }
  }, {
    key: "clearCheckedFilters",
    value: function clearCheckedFilters() {
      for (var i = 0; i < this.checkboxRefs.length; i++) {
        this.checkboxRefs[i].clearCheck();
      }

      this.setState({
        checkedFilters: ""
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this67 = this;

      var groups = this.state.groups;
      return React.createElement(KcaCheckboxWrapper, {
        title: "Affiliate Medical Groups"
      }, groups.map(function (group) {
        return React.createElement(KcaCheckbox, {
          ref: function ref(kcb) {
            return kcb && _this67.checkboxRefs.push(kcb);
          },
          checked: _this67.setCheckBoxStatus(group),
          handleChange: _this67.handleCheckbox.bind(_this67),
          name: group
        });
      }));
    }
  }]);

  return KcaGroupItems;
}(React.Component);

;

var KcaLanguageItems =
/*#__PURE__*/
function (_React$Component35) {
  _inherits(KcaLanguageItems, _React$Component35);

  function KcaLanguageItems(props) {
    var _this68;

    _classCallCheck(this, KcaLanguageItems);

    _this68 = _possibleConstructorReturn(this, _getPrototypeOf(KcaLanguageItems).call(this, props));
    _this68.state = {
      checkedFilters: _this68.props.checkedFilters,
      languages: _this68.props.languageItems.slice(0, 5),
      seeAll: false
    };
    _this68.handleCheckbox = _this68.handleCheckbox.bind(_assertThisInitialized(_this68));
    _this68.setCheckBoxStatus = _this68.setCheckBoxStatus.bind(_assertThisInitialized(_this68));
    _this68.checkboxRefs = [];
    return _this68;
  }

  _createClass(KcaLanguageItems, [{
    key: "handleSeeAllLanguages",
    value: function handleSeeAllLanguages() {
      var languageItems = this.props.languageItems;
      this.setState(function (prevState) {
        return {
          languages: _toConsumableArray(new Set([].concat(_toConsumableArray(prevState.languages), _toConsumableArray(languageItems)))),
          seeAll: true
        };
      });
    }
  }, {
    key: "handleLessLanguages",
    value: function handleLessLanguages() {
      var languages = this.state.languages;
      this.setState({
        languages: _toConsumableArray(languages.slice(0, 5)),
        seeAll: false
      });
    }
  }, {
    key: "handleCheckbox",
    value: function handleCheckbox(e) {
      var _e$target4 = e.target,
          value = _e$target4.value,
          checked = _e$target4.checked;

      if (checked) {
        var updatedFilters = this.state.checkedFilters + value + ',';
        this.setState({
          checkedFilters: updatedFilters
        });
        this.props.receiveLanguages(updatedFilters);
      } else {
        var _updatedFilters4 = this.state.checkedFilters.replace(value + ',', '');

        this.setState({
          checkedFilters: _updatedFilters4
        });
        this.props.receiveLanguages(_updatedFilters4);
      }
    }
  }, {
    key: "setCheckBoxStatus",
    value: function setCheckBoxStatus(language) {
      var found = false;
      var checkedLanguages = this.state.checkedFilters.split(',');

      for (var i = 0; i < checkedLanguages.length; i++) {
        if (checkedLanguages[i] === language) {
          found = true;
          break;
        }
      }

      return found;
    }
  }, {
    key: "clearCheckedFilters",
    value: function clearCheckedFilters() {
      for (var i = 0; i < this.checkboxRefs.length; i++) {
        this.checkboxRefs[i].clearCheck();
      }

      this.setState({
        checkedFilters: ""
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this69 = this;

      var _this$state7 = this.state,
          languages = _this$state7.languages,
          seeAll = _this$state7.seeAll;
      return React.createElement(KcaCheckboxWrapper, {
        title: "Languages"
      }, languages.map(function (language) {
        return React.createElement(KcaCheckbox, {
          ref: function ref(kcb) {
            return kcb && _this69.checkboxRefs.push(kcb);
          },
          checked: _this69.setCheckBoxStatus(language),
          handleChange: _this69.handleCheckbox.bind(_this69),
          name: language
        });
      }), React.createElement("div", {
        className: "filter-overlay-controls-additional"
      }, !seeAll && React.createElement(ShowMoreButton, {
        label: "See All Languages",
        onClick: this.handleSeeAllLanguages.bind(this)
      }), seeAll && React.createElement(ShowLessButton, {
        label: "See Less Languages",
        onClick: this.handleLessLanguages.bind(this)
      })));
    }
  }]);

  return KcaLanguageItems;
}(React.Component);

;

var KcaOverlayWrapper = function KcaOverlayWrapper(props) {
  return React.createElement("div", {
    className: "filter-overlay"
  }, React.createElement("div", {
    className: "filter-overlay-shadow"
  }), React.createElement("div", {
    className: "filter-overlay-controls"
  }, props.children));
};

;

var KcaSpecialtyItems =
/*#__PURE__*/
function (_React$Component36) {
  _inherits(KcaSpecialtyItems, _React$Component36);

  function KcaSpecialtyItems(props) {
    var _this70;

    _classCallCheck(this, KcaSpecialtyItems);

    _this70 = _possibleConstructorReturn(this, _getPrototypeOf(KcaSpecialtyItems).call(this, props));
    _this70.state = {
      checkedFilters: _this70.props.checkedFilters,
      seeAll: false,
      specialties: _this70.props.specialtyItems.slice(0, 5)
    };
    _this70.handleCheckbox = _this70.handleCheckbox.bind(_assertThisInitialized(_this70));
    _this70.setCheckBoxStatus = _this70.setCheckBoxStatus.bind(_assertThisInitialized(_this70));
    _this70.checkboxRefs = [];
    return _this70;
  }

  _createClass(KcaSpecialtyItems, [{
    key: "handleSeeAllSpecialties",
    value: function handleSeeAllSpecialties() {
      var specialtyItems = this.props.specialtyItems;
      this.setState(function (prevState) {
        return {
          specialties: _toConsumableArray(new Set([].concat(_toConsumableArray(prevState.specialties), _toConsumableArray(specialtyItems)))),
          seeAll: true
        };
      });
    }
  }, {
    key: "handleLessSpecialties",
    value: function handleLessSpecialties() {
      var specialties = this.state.specialties;
      this.setState({
        specialties: _toConsumableArray(specialties.slice(0, 5)),
        seeAll: false
      });
    }
  }, {
    key: "handleCheckbox",
    value: function handleCheckbox(e) {
      var _e$target5 = e.target,
          value = _e$target5.value,
          checked = _e$target5.checked;

      if (checked) {
        var updatedFilters = this.state.checkedFilters + value + ',';
        this.setState({
          checkedFilters: updatedFilters
        });
        this.props.receiveSpecialties(updatedFilters);
      } else {
        var _updatedFilters5 = this.state.checkedFilters.replace(value + ',', '');

        this.setState({
          checkedFilters: _updatedFilters5
        });
        this.props.receiveSpecialties(_updatedFilters5);
      }
    }
  }, {
    key: "setCheckBoxStatus",
    value: function setCheckBoxStatus(specialty) {
      var found = false;
      var checkedSpecialties = this.state.checkedFilters.split(',');

      for (var i = 0; i < checkedSpecialties.length; i++) {
        if (checkedSpecialties[i] === specialty) {
          found = true;
          break;
        }
      }

      return found;
    }
  }, {
    key: "clearCheckedFilters",
    value: function clearCheckedFilters() {
      for (var i = 0; i < this.checkboxRefs.length; i++) {
        this.checkboxRefs[i].clearCheck();
      }

      this.setState({
        checkedFilters: ""
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this71 = this;

      var _this$state8 = this.state,
          specialties = _this$state8.specialties,
          seeAll = _this$state8.seeAll;
      return React.createElement(KcaCheckboxWrapper, {
        title: "Specialties"
      }, specialties.map(function (specialty) {
        return React.createElement(KcaCheckbox, {
          ref: function ref(kcb) {
            return kcb && _this71.checkboxRefs.push(kcb);
          },
          checked: _this71.setCheckBoxStatus(specialty),
          handleChange: _this71.handleCheckbox.bind(_this71),
          name: specialty
        });
      }), React.createElement("div", {
        className: "filter-overlay-controls-additional"
      }, !seeAll && React.createElement(ShowMoreButton, {
        label: "See All Specialties",
        onClick: this.handleSeeAllSpecialties.bind(this)
      }), seeAll && React.createElement(ShowLessButton, {
        label: "See Less Specialties",
        onClick: this.handleLessSpecialties.bind(this)
      })));
    }
  }]);

  return KcaSpecialtyItems;
}(React.Component);

;

var KcaProviderBio = function KcaProviderBio(_ref14) {
  var affiliate = _ref14.affiliate;
  return React.createElement(React.Fragment, null, React.createElement("div", {
    class: "header"
  }, affiliate.ProviderType === "KSA" ? React.createElement("a", {
    class: "ksa-provider",
    href: affiliate.BioPageUrl
  }, affiliate.FirstName, " ", affiliate.LastName, ", ", affiliate.Degree) : React.createElement("a", {
    class: "non-ksa-provider"
  }, affiliate.FirstName, " ", affiliate.LastName, ", ", affiliate.Degree), affiliate.ProviderType == "KSA" && React.createElement("img", {
    src: "/-/media/Themes/KelseySeybold/KelseyCareAdvantage/KelseyCareAdvantage/images/doctor-icon.png"
  })), React.createElement("div", {
    class: "sub-columns"
  }, React.createElement("div", {
    class: "column-1"
  }, React.createElement("p", null, React.createElement("strong", {
    class: "mobile-regular"
  }, affiliate.PhysicianGroup)), React.createElement("p", null, affiliate.Address), React.createElement("p", null, affiliate.City, ", ", affiliate.State, ", ", affiliate.ZipCode), React.createElement("p", {
    class: "link"
  }, React.createElement("i", {
    class: "fa fa-arrow-circle-right"
  }), React.createElement("a", {
    href: affiliate.DirectionsUrl,
    target: "_blank"
  }, "Directions")), React.createElement("p", {
    class: "link"
  }, React.createElement("i", {
    class: "fa fa-phone"
  }), React.createElement("a", {
    href: "tel:".concat(affiliate.PhoneNumber.replace(/[-()\s+]/g, ""))
  }, affiliate.PhoneNumber))), React.createElement("div", {
    class: "column-2"
  }, React.createElement("p", null, React.createElement("strong", null, "Specialties:"), " ", affiliate.Specialty), React.createElement("p", null, React.createElement("strong", null, "Gender:"), " ", affiliate.Gender), React.createElement("p", null, React.createElement("strong", null, "Languages:"), " ", affiliate.Languages))));
};

;

var KcaProviderBioImage = function KcaProviderBioImage(_ref15) {
  var affiliate = _ref15.affiliate,
      maleSilhouette = _ref15.maleSilhouette,
      femaleSilhouette = _ref15.femaleSilhouette;
  return React.createElement(React.Fragment, null, React.createElement("div", {
    class: "image-container"
  }, affiliate.ProviderImage != null ? React.createElement("img", {
    src: affiliate.ProviderImage,
    alt: affiliate.ProviderImageAltText
  }) : affiliate.Gender === "Female" ? React.createElement("img", {
    src: femaleSilhouette,
    alt: affiliate.ProviderImageAltText
  }) : React.createElement("img", {
    src: maleSilhouette,
    alt: affiliate.ProviderImageAltText
  })));
};

;

var KcaProviderExtraInfo = function KcaProviderExtraInfo(_ref16) {
  var affiliate = _ref16.affiliate,
      zipCode = _ref16.zipCode;
  return React.createElement("div", {
    class: "column-3"
  }, zipCode && React.createElement("p", null, React.createElement("strong", null, affiliate.Distance), " miles from ", affiliate.ZipCode), React.createElement("p", {
    class: "spacer"
  }, "\xA0"), affiliate.AcceptingNewPatients ? React.createElement("p", {
    class: "new-patients"
  }, React.createElement("i", {
    class: "fa fa-check-circle"
  }), " Accepting New Patients") : React.createElement("p", {
    class: "new-patients"
  }, React.createElement("i", {
    class: "fa fa-check-circle"
  }), " Not Accepting New Patients"), React.createElement("p", null, React.createElement("strong", null, "NPI:"), " ", affiliate.NationalProviderId), React.createElement("p", {
    class: "close-margin"
  }, React.createElement("strong", null, "Referral Group:")), React.createElement("p", null, affiliate.MedicalReferralGroups));
};

;
var sortByDropdown = ["Last Name Ascending", "Last Name Descending", "City Ascending", "City Descending", "Referral Group Ascending", "Referral Group Descending", "Gender Ascending", "Gender Descending", "Distance"];

var KcaSortBy =
/*#__PURE__*/
function (_React$Component37) {
  _inherits(KcaSortBy, _React$Component37);

  function KcaSortBy(props) {
    var _this72;

    _classCallCheck(this, KcaSortBy);

    _this72 = _possibleConstructorReturn(this, _getPrototypeOf(KcaSortBy).call(this, props));
    _this72.state = {
      sortByDropdown: sortByDropdown,
      item: ""
    };
    return _this72;
  }

  _createClass(KcaSortBy, [{
    key: "handleDropdown",
    value: function handleDropdown(e) {
      var value = e.target.value;
      this.setState({
        item: value
      });

      switch (value) {
        case "Last Name Ascending":
          this.props.sortedItem("LastName", "ASC");
          break;

        case "Last Name Descending":
          this.props.sortedItem("LastName", "DESC");
          break;

        case "City Ascending":
          this.props.sortedItem("City", "ASC");
          break;

        case "City Descending":
          this.props.sortedItem("City", "DESC");
          break;

        case "Referral Group Ascending":
          this.props.sortedItem("MedicalReferralGroups", "ASC");
          break;

        case "Referral Group Descending":
          this.props.sortedItem("MedicalReferralGroups", "DESC");
          break;

        case "Gender Ascending":
          this.props.sortedItem("Gender", "ASC");
          break;

        case "Gender Descending":
          this.props.sortedItem("Gender", "DESC");
          break;

        case "Distance":
          this.props.sortedItem("Distance", "ASC");
          break;
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this73 = this;

      var _this$props8 = this.props,
          totalItems = _this$props8.totalItems,
          availableResults = _this$props8.availableResults,
          zipCode = _this$props8.zipCode,
          pageStart = _this$props8.pageStart,
          pageEnd = _this$props8.pageEnd;

      if (availableResults.length === 0) {
        return false;
      } else {
        return React.createElement(React.Fragment, null, totalItems > 0 && React.createElement("div", {
          class: "row padding-bottom-20"
        }, React.createElement("div", {
          class: "col-12 col-sm-5 col-lg-3 text-center padding-bottom-5"
        }, React.createElement("p", null, React.createElement("b", null, " ", pageStart, "-", pageEnd, " of ", totalItems, "  Results"))), React.createElement("div", {
          class: "col-12 col-sm-7  col-lg-5 offset-lg-4 text-center padding-bottom-5 control"
        }, React.createElement("b", {
          class: "padding-right-10"
        }, "Sort by:"), React.createElement("select", {
          class: "select-style",
          value: this.state.value,
          defaultValue: "Please Choose",
          onChange: function onChange(e) {
            return _this73.handleDropdown(e);
          }
        }, React.createElement("option", {
          value: "Please Choose",
          disabled: true
        }, "Please Choose"), sortByDropdown.map(function (item, i) {
          return (item === "Distance" && zipCode || item !== "Distance") && React.createElement("option", {
            key: i
          }, item);
        })))));
      }
    }
  }]);

  return KcaSortBy;
}(React.Component);

;

var LocationDetailSearch =
/*#__PURE__*/
function (_React$Component38) {
  _inherits(LocationDetailSearch, _React$Component38);

  function LocationDetailSearch(props) {
    var _this74;

    _classCallCheck(this, LocationDetailSearch);

    _this74 = _possibleConstructorReturn(this, _getPrototypeOf(LocationDetailSearch).call(this, props));
    _this74.state = {
      locationDetailResults: _this74.props.data.LocationDetails,
      totalResults: _this74.props.data.Total,
      sortedResults: _this74.props.data.LocationDetails,
      pageResults: [],
      itemsPerPage: 12,
      locationStartPage: 0,
      sortBy: "name",
      payload: {},
      locationPages: [],
      apiKey: _this74.props.data.GoogleAPIKey,
      zipCode: _this74.props.data.zipCode,
      medicalSpecialty: _this74.props.data.specialty,
      medicalSpecialtiesEndpoint: _this74.props.data.MedicalSpecialtiesEndpoint,
      medicalLocation: _this74.props.data.location,
      medicalLocationsEndpoint: _this74.props.data.MedicalLocationsEndpoint
    };
    _this74.handleSort = _this74.handleSort.bind(_assertThisInitialized(_this74));
    _this74.handleChangeLocationPage = _this74.handleChangeLocationPage.bind(_assertThisInitialized(_this74));
    _this74.handleSetSearchParamsLocation = _this74.handleSetSearchParamsLocation.bind(_assertThisInitialized(_this74));
    _this74.handleClearForm = _this74.handleClearForm.bind(_assertThisInitialized(_this74));
    _this74.setDisplayPage = _this74.setDisplayPage.bind(_assertThisInitialized(_this74));
    _this74.handleSubmit = _this74.handleSubmit.bind(_assertThisInitialized(_this74));
    _this74.paginationRef = React.createRef();
    return _this74;
  }

  _createClass(LocationDetailSearch, [{
    key: "handleSort",
    value: function handleSort(event) {
      event.preventDefault();
      var target;
      target = this.GetDocumentUrl(event.target.value, "sort");
      window.location.href = target;
    }
  }, {
    key: "GetDocumentUrl",
    value: function GetDocumentUrl(selectedValue, quertPart) {
      var target = "";

      if (quertPart == "sort") {
        switch (selectedValue) {
          case "name":
            selectedValue = "ASC";
            break;

          case "reverse":
            selectedValue = "DESC";
            break;

          case "distance":
            selectedValue = "DIST";
            break;
        }

        this.setState({
          sortBy: selectedValue
        });
      }

      if (window.location.href.includes(quertPart)) {
        var locationHref = window.location.href.substr(window.location.href.indexOf("?") + 1, window.location.href.length).split("&");
        locationHref.map(function (value, idx) {
          if (value.indexOf(quertPart) > -1) {
            if (selectedValue != "" || selectedValue != null) {
              locationHref[idx] = quertPart + "=" + selectedValue;
            }
          }
        });
        target = window.location.href.slice(0, window.location.href.indexOf("?")).concat("?" + locationHref.join("&"));
      } else {
        if (window.location.href.indexOf("?") == -1) target = window.location.href + "?";else target = window.location.href + "&";

        if (quertPart != "" || quertPart != null) {
          target = target.concat(quertPart + "=" + selectedValue);
        }
      }

      return target;
    }
  }, {
    key: "handleSubmit",
    value: function handleSubmit(payload) {
      var target;

      if (window.location.href.substr(0, window.location.href.indexOf("?"))) {
        target = window.location.href.substr(0, window.location.href.indexOf("?") + 1);
      } else {
        target = window.location.href + "?";
      }

      if (payload.url != undefined) {
        target = target.concat("".concat(payload.url)).replace("?", "/");
      } else {
        if (payload.zip) {
          this.state.sortBy = "distance";
          target = target.concat("zipCode=" + payload.zip + "&");
        }

        if (payload.specialty != undefined) {
          target = target.concat("medicalSpecialty=" + payload.specialty + "&");
        }

        switch (this.state.sortBy) {
          case "name":
            target = target.concat("sort=ASC");
            break;

          case "reverse":
            target = target.concat("sort=DESC");
            break;

          case "distance":
            target = target.concat("sort=DIST");
            break;
        }
      }

      window.location.href = target;
    }
  }, {
    key: "setDisplayPage",
    value: function setDisplayPage() {
      var startPage = this.state.locationStartPage;
      var itemsPP = this.state.itemsPerPage;
      var holder = this.state.sortedResults.slice(startPage * itemsPP, (startPage + 1) * itemsPP);
      this.setState({
        pageResults: _toConsumableArray(holder)
      });
      this.paginationRef.current.setActivePagerLink();
    } //For Form

  }, {
    key: "handleSetSearchParamsLocation",
    value: function handleSetSearchParamsLocation(payload) {
      var _this75 = this;

      this.setState({
        payload: payload
      }, function () {
        _this75.handleSubmit(payload);
      });
    }
  }, {
    key: "handleClearForm",
    value: function handleClearForm() {
      window.location.href = window.location.href.substr(0, window.location.href.indexOf("?"));
    } //For Pagination

  }, {
    key: "handleChangeLocationPage",
    value: function handleChangeLocationPage(pageData, currentPage) {
      var _this76 = this;

      var zipParam = new URLSearchParams(window.location.search).get("zipCode");
      var specialtyParam = new URLSearchParams(window.location.search).get("medicalSpecialty");
      var sortParam = new URLSearchParams(window.location.search).get("sort");
      this.setState({
        locationStartPage: (pageData[0].id - 1) / this.state.itemsPerPage
      }, function () {
        _this76.setDisplayPage();
      });
      var updatedUrl = "/find-a-location?start=".concat(currentPage);

      if (zipParam) {
        updatedUrl = updatedUrl.concat("&zipCode=".concat(zipParam));
      }

      if (specialtyParam) {
        updatedUrl = updatedUrl.concat("&medicalSpecialty=".concat(specialtyParam));
      }

      if (sortParam) {
        updatedUrl = updatedUrl.concat("&sort=".concat(sortParam));
      }

      window.history.replaceState(null, _, updatedUrl);
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this77 = this;

      var locationHref = window.location.href.substr(window.location.href.indexOf("?") + 1, window.location.href.length).split("&");
      locationHref.map(function (locTerms) {
        var terms = locTerms.split("=");

        if (terms.length == 2) {
          if (terms[0] == "zipCode") {
            _this77.setState({
              zipCode: terms[1]
            });
          } else if (terms[0] == "Term") {
            _this77.setState({
              searchTerm: terms[1]
            });
          } else if (terms[0] == "sort") {
            _this77.setState({
              sortBy: terms[1] == "DESC" ? "reverse" : terms[1] == "DIST" ? "distance" : "name"
            });
          } else if (terms[0] == 'medicalLocation') {
            _this77.setState({
              medicalLocation: terms[1]
            });
          }
        }
      });
      this.setState({
        locationPages: _toConsumableArray(Array(this.props.data.Total).keys()).map(function (i) {
          return {
            id: i + 1
          };
        })
      });
      this.setDisplayPage();
    }
  }, {
    key: "render",
    value: function render() {
      if (this.props.isEditing) {
        return React.createElement("div", null, React.createElement("h1", null, "Location Detail Search"), React.createElement("p", null, "Location Detail Search is not available in Editing or Preview mode."));
      } else {
        return React.createElement("div", {
          className: "location-detail-search"
        }, this.props.data.AlertBanner && React.createElement("div", {
          className: "location-search-alert-banner",
          dangerouslySetInnerHTML: {
            __html: this.props.data.AlertBanner
          }
        }), React.createElement("div", {
          className: "location-detail-top"
        }, React.createElement("div", {
          className: "location-detail-top-cta col-md-4 col-lg-3"
        }, React.createElement("h1", null, this.props.data.LocationSearchLabelContent['Our-Locations']), React.createElement(LocationDetailSearchForm, {
          submitSearchCallback: this.handleSetSearchParamsLocation,
          clearFormCallback: this.handleClearForm,
          zipCode: this.state.zipCode,
          medicalSpecialtiesEndpoint: this.state.medicalSpecialtiesEndpoint,
          medicalLocationsEndpoint: this.state.medicalLocationsEndpoint,
          medicalSpecialty: this.state.medicalSpecialty,
          medicalLocation: this.state.medicalLocation,
          apiKey: this.state.apiKey,
          LocationSearchLabelContent: this.props.data.LocationSearchLabelContent,
          locations: this.props.data.LocationDetails
        })), React.createElement("div", {
          className: "location-detail-top-map col-md-8 col-lg-9"
        }, React.createElement("div", {
          className: "location-detail-top-map-map"
        }, React.createElement(GoogleMapMultiple, {
          apiKey: this.state.apiKey,
          data: {
            mapPinUrl: "/-/media/Project/KelseySeybold/KelseyCareAdvantage/ksc-mapmarker.svg"
          },
          locations: this.state.sortedResults,
          baseUrl: this.props.data.LocationSearchPage
        })))), this.props.data.AlertBox && React.createElement("div", {
          className: "row location-search-alert-box col-md-4 col-lg-3",
          dangerouslySetInnerHTML: {
            __html: this.props.data.AlertBox
          }
        }), React.createElement("div", {
          className: "location-detail-bottom"
        }, React.createElement("div", {
          className: "location-detail-bottom-buttons col-md-4 col-lg-3"
        }, React.createElement("h2", null, this.props.data.LocationSearchLabelContent['Schedule-an-Appointment']), React.createElement("div", {
          className: "buttons-wrapper link button white"
        }, this.props.data.AppointmentUrlText && this.props.data.AppointmentUrl ? React.createElement("button", null, React.createElement("a", {
          href: this.props.data.AppointmentUrl
        }, this.props.data.AppointmentUrlText)) : "", this.props.data.MyKelseyOnlineUrlText && this.props.data.MyKelseyOnlineUrl ? React.createElement("button", null, React.createElement("a", {
          href: this.props.data.MyKelseyOnlineUrl
        }, this.props.data.MyKelseyOnlineUrlText)) : "", this.props.data.ByPhoneUrlText && this.props.data.ByPhoneUrl ? React.createElement("button", null, React.createElement("a", {
          href: this.props.data.ByPhoneUrl
        }, this.props.data.ByPhoneUrlText)) : "")), React.createElement("div", {
          className: "location-detail-bottom-main col-md-8 col-lg-9"
        }, React.createElement("div", {
          className: "location-detail-bottom-main-head"
        }, React.createElement("div", {
          className: "location-detail-bottom-main-head-title search-results-count"
        }, this.props.data.LocationSearchLabelContent['Displaying-All-Locations'], " ", this.state.totalResults), React.createElement("div", {
          class: "location-detail-bottom-main-head-container"
        }, React.createElement("p", {
          className: "location-detail-bottom-main-head-label"
        }, this.props.data.LocationSearchLabelContent['Sort-By']), React.createElement("div", {
          className: "location-detail-bottom-main-head-filter"
        }, React.createElement("select", {
          class: "input-select",
          onChange: this.handleSort,
          value: this.state.sortBy
        }, React.createElement("option", {
          value: "name"
        }, this.props.data.LocationSearchLabelContent['Location-Asc']), React.createElement("option", {
          value: "reverse"
        }, " ", this.props.data.LocationSearchLabelContent['Location-Desc']), this.state.zipCode ? React.createElement("option", {
          value: "distance"
        }, this.props.data.LocationSearchLabelContent['Distance-Sort']) : null), React.createElement("i", {
          class: "fa fa-chevron-down"
        })))), this.state.totalResults && this.props.data.LocationNoResultsContent ? "" : React.createElement("div", {
          class: "no-results"
        }, this.props.data.LocationNoResultsContent), React.createElement("div", {
          className: "location-detail-bottom-main-results"
        }, React.createElement(LocationDetailSearchResults, {
          data: this.state.pageResults,
          LocationSearchLabelContent: this.props.data.LocationSearchLabelContent,
          LocationSearchPage: this.props.data.LocationSearchPage
        }), React.createElement(ProviderLocationPagination, {
          ref: this.paginationRef,
          items: this.state.locationPages,
          onChangePage: this.handleChangeLocationPage,
          itemsPerPage: this.state.itemsPerPage
        })))));
      }
    }
  }]);

  return LocationDetailSearch;
}(React.Component);

;

var LocationDetailSearchForm =
/*#__PURE__*/
function (_React$Component39) {
  _inherits(LocationDetailSearchForm, _React$Component39);

  function LocationDetailSearchForm(props) {
    var _this78;

    _classCallCheck(this, LocationDetailSearchForm);

    _this78 = _possibleConstructorReturn(this, _getPrototypeOf(LocationDetailSearchForm).call(this, props));
    var zip = "";

    if (_this78.props.zipCode != null) {
      zip = _this78.props.zipCode;
    }

    _this78.state = {
      locations: [],
      specialty: [],
      zipCode: zip,
      medicalLocation: _this78.props.medicalLocation,
      medicalSpecialty: ''
    };
    _this78._address = React.createRef();
    _this78.handleSubmit = _this78.handleSubmit.bind(_assertThisInitialized(_this78));
    _this78.handleClear = _this78.handleClear.bind(_assertThisInitialized(_this78));
    _this78.handleLocationButton = _this78.handleLocationButton.bind(_assertThisInitialized(_this78));
    _this78.getZipcode = _this78.getZipcode.bind(_assertThisInitialized(_this78));
    _this78.getJson = _this78.getJson.bind(_assertThisInitialized(_this78));
    _this78.changeZipValue = _this78.changeZipValue.bind(_assertThisInitialized(_this78));
    _this78.handleMedicalSpecialty = _this78.handleMedicalSpecialty.bind(_assertThisInitialized(_this78));
    _this78.handleLocationsDropdownInput = _this78.handleLocationsDropdownInput.bind(_assertThisInitialized(_this78));
    _this78.handleLocationSearch = _this78.handleLocationSearch.bind(_assertThisInitialized(_this78));
    _this78.getDropdownListSelection = _this78.getDropdownListSelection.bind(_assertThisInitialized(_this78));
    return _this78;
  }

  _createClass(LocationDetailSearchForm, [{
    key: "handleDropdownInput",
    value: function handleDropdownInput() {
      var _this79 = this;

      var url = window.location.origin;
      var target = url + "/" + this.props.medicalSpecialtiesEndpoint;
      fetch(target).then(function (response) {
        return response.json();
      }).then(function (data) {
        _this79.setState({
          specialty: data
        });
      });
    }
  }, {
    key: "handleLocationsDropdownInput",
    value: function handleLocationsDropdownInput() {
      var _this80 = this;

      var url = window.location.origin;
      var target = url + "/" + this.props.medicalLocationsEndpoint;
      fetch(target).then(function (response) {
        return response.json();
      }).then(function (data) {
        _this80.setState({
          locations: data
        });
      });
    }
  }, {
    key: "handleSubmit",
    value: function handleSubmit(e) {
      e.preventDefault();
      var address = this._address.current.value;
      var payload = {
        specialty: this.state.medicalSpecialty,
        zip: address,
        location: this.state.medicalLocation
      };
      this.props.submitSearchCallback(payload);
    }
  }, {
    key: "handleLocationButton",
    value: function handleLocationButton() {
      var _this81 = this;

      if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function (position) {
          var latlng = position.coords.latitude + "," + position.coords.longitude;
          var Url = "https://maps.googleapis.com/maps/api/geocode/json?latlng=" + latlng + "&key=" + _this81.props.apiKey;

          _this81.getJson(Url);
        });
      } else {
        alert("Geolocation is not supported by this browser.");
      }
    }
  }, {
    key: "getZipcode",
    value: function getZipcode(results) {
      var result = results.results[0].address_components;

      for (var i = 0; i < result.length; ++i) {
        if (result[i].types[0] == "postal_code") {
          var postal = result[i].long_name;
          this.setState({
            zipCode: postal
          });
          localStorage.setItem("StoredZip", postal);
        }
      }
    }
  }, {
    key: "getJson",
    value: function getJson(url) {
      var _this82 = this;

      fetch(url).then(function (resp) {
        return resp.json();
      }).then(function (data) {
        _this82.setState({
          Jsondata: data
        });

        _this82.getZipcode(data);
      });
    }
  }, {
    key: "handleClear",
    value: function handleClear(e) {
      localStorage.removeItem('StoredZip');
      e.preventDefault();
      this._specialty.value = "";
      this._address.current.value = "";
      this.props.clearFormCallback();
    }
  }, {
    key: "handleMedicalSpecialty",
    value: function handleMedicalSpecialty(e) {
      this.setState({
        medicalSpecialty: e.target.value
      });
      e.preventDefault();
      var address = this._address.current.value;
      var payload = {
        specialty: e.target.value,
        zip: address
      };
      this.props.submitSearchCallback(payload);
    }
  }, {
    key: "handleLocationSearch",
    value: function handleLocationSearch(e) {
      this.setState({
        medicalLocation: e.target.value
      });
      e.preventDefault();
      var locations = this.state.locations;
      var location = locations.find(function (location) {
        return location.LocationName == e.target.value;
      });
      var address = this._address.current.value;
      var payload = {
        Location: e.target.value,
        zip: address,
        url: location.Url
      };
      this.props.submitSearchCallback(payload);
    }
  }, {
    key: "changeZipValue",
    value: function changeZipValue(e) {
      this.setState({
        zipCode: e.target.value
      });
    } //

  }, {
    key: "getDropdownListSelection",
    value: function getDropdownListSelection(term) {
      var locationFromUrlArr = term.split("%20");
      var match = "";

      for (var i = 0; i < locationFromUrlArr.length; i++) {
        match += locationFromUrlArr[i] + " ";
      }

      return decodeURI(match.trim());
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this83 = this;

      this.handleDropdownInput();
      this.handleLocationsDropdownInput();
      var locationHref = window.location.href.substr(window.location.href.indexOf("?") + 1, window.location.href.length).split("&"); //

      locationHref.map(function (locTerms) {
        var terms = locTerms.split("=");

        if (terms.length == 2) {
          if (terms[0] == "medicalSpecialty") {
            _this83.setState({
              medicalSpecialty: _this83.getDropdownListSelection(terms[1])
            });
          }

          if (terms[0] == "medicalLocation") {
            _this83.setState({
              medicalLocation: _this83.getDropdownListSelection(terms[1])
            });
          }
        }
      });

      if (localStorage.StoredZip != null || localStorage.StoredZip != undefined) {
        document.getElementsByClassName('zip-search-box')[0].value = localStorage.StoredZip;
      }
    } // TODO: make specialties dynamic

  }, {
    key: "render",
    value: function render() {
      return React.createElement("form", {
        onSubmit: this.handleSubmit,
        className: "tab-content"
      }, React.createElement("div", {
        className: "input-section"
      }, React.createElement("span", {
        className: "input-label-text"
      }, this.props.LocationSearchLabelContent['Filter-by-Location']), React.createElement("div", {
        className: "input-dropdown"
      }, React.createElement("select", {
        value: this.state.medicalLocation,
        onChange: this.handleLocationSearch
      }, React.createElement("option", {
        value: "",
        disabled: true,
        selected: true
      }, this.props.LocationSearchLabelContent['Select-an-Option']), this.state.locations.map(function (location) {
        return React.createElement("option", null, location.LocationName);
      })), React.createElement("i", {
        class: "fa fa-chevron-down"
      }))), React.createElement("div", {
        className: "input-section"
      }, React.createElement("span", {
        className: "input-label-text"
      }, this.props.LocationSearchLabelContent['Filter-by']), React.createElement("div", {
        className: "input-dropdown"
      }, React.createElement("select", {
        value: this.state.medicalSpecialty,
        onChange: this.handleMedicalSpecialty
      }, React.createElement("option", {
        value: "",
        disabled: true,
        selected: true
      }, this.props.LocationSearchLabelContent['Select-an-Option']), this.state.specialty.map(function (Specialtyitem) {
        return React.createElement("option", null, Specialtyitem.Specialty);
      })), React.createElement("i", {
        class: "fa fa-chevron-down"
      }))), React.createElement("div", {
        className: "input-section"
      }, React.createElement("span", {
        className: "input-label-text"
      }, " ", this.props.LocationSearchLabelContent['Search-by']), React.createElement("input", {
        ref: this._address,
        className: "input-text zip-search-box",
        type: "number",
        name: "closestTerm",
        id: "closestTerm",
        placeholder: "Enter ZIP Code",
        onChange: this.changeZipValue,
        value: this.state.zipCode ? this.state.zipCode : null
      })), React.createElement("div", {
        className: "locations-button",
        onClick: this.handleLocationButton
      }, this.props.LocationSearchLabelContent['Current-Location']), React.createElement("div", {
        className: "submit-button link button white"
      }, React.createElement("button", {
        onClick: this.handleSubmit
      }, " ", this.props.LocationSearchLabelContent['Location-Near-Me']), React.createElement("p", {
        className: "clear-button",
        style: {
          marginLeft: "1.9rem",
          color: "white"
        },
        onClick: this.handleClear
      }, this.props.LocationSearchLabelContent['Clear-All'])));
    }
  }]);

  return LocationDetailSearchForm;
}(React.Component);

;

var LocationDetailSearchResults =
/*#__PURE__*/
function (_React$Component40) {
  _inherits(LocationDetailSearchResults, _React$Component40);

  function LocationDetailSearchResults(props) {
    _classCallCheck(this, LocationDetailSearchResults);

    return _possibleConstructorReturn(this, _getPrototypeOf(LocationDetailSearchResults).call(this, props));
  }

  _createClass(LocationDetailSearchResults, [{
    key: "render",
    value: function render() {
      var _this84 = this;

      return React.createElement("div", {
        className: "row location-results-provider"
      }, this.props.data.map(function (locationDetail) {
        return React.createElement("div", {
          className: "col-12 col-sm-6 col-lg-4"
        }, React.createElement("div", {
          class: "location-search-result"
        }, React.createElement("div", {
          className: "location-search-result-image"
        }, React.createElement("a", {
          href: _this84.props.LocationSearchPage + "/" + locationDetail.UrlWithGoalQueryString
        }, React.createElement("img", {
          src: locationDetail.ThumbnailImage != null && locationDetail.ThumbnailImage != "" ? locationDetail.ThumbnailImage : locationDetail.BannerImage,
          alt: locationDetail.DefaultAlternateText,
          title: locationDetail.DefaultAlternateText
        }), locationDetail.ClinicStatusOverlay ? React.createElement("div", {
          className: "clinic-status-overlay-container"
        }, React.createElement("div", {
          className: "clinic-status-overlay"
        }, locationDetail.ClinicStatusOverlay)) : null)), React.createElement("div", {
          className: "location-search-result-bottom"
        }, React.createElement("a", {
          className: "location-search-result-bottom-title ",
          href: _this84.props.LocationSearchPage + "/" + locationDetail.UrlWithGoalQueryString
        }, React.createElement("span", null, locationDetail.LocationName, React.createElement("i", {
          className: "location-search-result-link-icon fa fa-arrow-right"
        }))), React.createElement("div", {
          className: "location-search-result-bottom-container"
        }, locationDetail.PhoneNumber ? React.createElement("a", {
          className: "location-search-result-bottom-info",
          href: "tel: ".concat(locationDetail.PhoneNumber)
        }, React.createElement("i", {
          className: "location-search-result-bottom-info-icon fa fa-phone"
        }), React.createElement("p", null, locationDetail.PhoneNumber)) : null, React.createElement("a", {
          className: "location-search-result-bottom-info",
          href: locationDetail.GoalNameForLocation ? _this84.props.LocationSearchPage + "/" + locationDetail.Url + "?sc_trk=" + locationDetail.GoalNameForLocation + "#directions" : _this84.props.LocationSearchPage + "/" + locationDetail.Url + "#directions"
        }, React.createElement("img", {
          src: "/-/media/Project/KelseySeybold/KelseySeyboldClinic/Icons/map-marker-alt-solid.svg",
          class: "location-search-result-bottom-info-icon"
        }), React.createElement("p", null, locationDetail.AddressLine1, " ", locationDetail.AddressLine2, " ", locationDetail.City, ",", " ", locationDetail.State, " ", locationDetail.ZipCode)), locationDetail.Distance ? React.createElement("div", {
          className: "miles-away"
        }, React.createElement("i", null, locationDetail.Distance, " ", _this84.props.LocationSearchLabelContent['Miles-Away'])) : ""))));
      }));
    }
  }]);

  return LocationDetailSearchResults;
}(React.Component);

;

var LocationMap =
/*#__PURE__*/
function (_React$Component41) {
  _inherits(LocationMap, _React$Component41);

  function LocationMap(props) {
    var _this85;

    _classCallCheck(this, LocationMap);

    _this85 = _possibleConstructorReturn(this, _getPrototypeOf(LocationMap).call(this, props));
    _this85.state = {
      sortedResults: _this85.props.data.LocationDetails,
      apiKey: _this85.props.data.GoogleAPIKey
    };
    return _this85;
  }

  _createClass(LocationMap, [{
    key: "render",
    value: function render() {
      if (this.props.isEditing) {
        return React.createElement("div", null, React.createElement("h1", null, "Location Detail Search"), React.createElement("p", null, "Location Detail Search is not available in Editing or Preview mode."));
      } else {
        return React.createElement("div", {
          className: "location-detail-search"
        }, React.createElement("div", {
          className: "location-detail-top"
        }, React.createElement("div", {
          className: "location-detail-top-map col-md-8 col-lg-9",
          style: {
            height: "650px"
          }
        }, React.createElement("div", {
          className: "location-detail-top-map-map"
        }, React.createElement(GoogleMapMultiple, {
          apiKey: this.state.apiKey,
          data: {
            mapPinUrl: "/-/media/Project/KelseySeybold/KelseyCareAdvantage/ksc-mapmarker.svg"
          },
          locations: this.state.sortedResults,
          baseUrl: this.props.data.LocationSearchPage,
          disableClickAction: this.props.data.DisableClickAction
        })))));
      }
    }
  }]);

  return LocationMap;
}(React.Component);

;

var PharmacyMain =
/*#__PURE__*/
function (_React$Component42) {
  _inherits(PharmacyMain, _React$Component42);

  function PharmacyMain(props) {
    var _this86;

    _classCallCheck(this, PharmacyMain);

    _this86 = _possibleConstructorReturn(this, _getPrototypeOf(PharmacyMain).call(this, props));
    _this86.state = {
      payload: {
        PharmacyCategory: '',
        PharmacyType: '',
        PharmacyName: '',
        City: '',
        ZipCode: '',
        County: ''
      },
      startPage: 0,
      itemsPerPage: 25,
      pages: [],
      hasNoResults: false
    };
    _this86._searchForm = React.createRef();
    _this86._results = React.createRef();
    _this86.handleSetSearchParams = _this86.handleSetSearchParams.bind(_assertThisInitialized(_this86));
    _this86.handleClearForm = _this86.handleClearForm.bind(_assertThisInitialized(_this86));
    _this86.handleSubmit = _this86.handleSubmit.bind(_assertThisInitialized(_this86));
    _this86.handleChangePage = _this86.handleChangePage.bind(_assertThisInitialized(_this86));
    return _this86;
  }

  _createClass(PharmacyMain, [{
    key: "handleSetSearchParams",
    value: function handleSetSearchParams(formData) {
      var _this87 = this;

      this.setState({
        startPage: 0,
        payload: {
          PharmacyCategory: formData.category,
          PharmacyType: formData.type,
          PharmacyName: formData.pharmaName,
          City: formData.city,
          County: formData.county,
          ZipCode: formData.zipcode
        }
      }, function () {
        _this87.handleSubmit();
      });
    }
  }, {
    key: "handleSubmit",
    value: function handleSubmit() {
      var updatePages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
      jQuery.post("".concat(this.props.data.apiUrl, "?start=").concat(this.state.startPage, "&rows=").concat(this.state.itemsPerPage), this.state.payload, function (res) {
        if (res.Pharmacies.length > 0) {
          this._results.current.loadPharmacyResults(res.Pharmacies);

          if (updatePages) {
            this.setState({
              hasNoResults: false,
              pages: _toConsumableArray(Array(res.Total).keys()).map(function (i) {
                return {
                  id: i + 1
                };
              })
            });
          }
        } else {
          this.setState({
            hasNoResults: true,
            pages: []
          });
        }
      }.bind(this));
    }
  }, {
    key: "handleClearForm",
    value: function handleClearForm() {
      this._results.current.loadPharmacyResults([]);

      this.setState({
        pages: [],
        hasNoResults: false
      });
    }
  }, {
    key: "handleChangePage",
    value: function handleChangePage(pageData) {
      var _this88 = this;

      this.setState({
        startPage: (pageData[0].id - 1) / this.state.itemsPerPage
      }, function () {
        _this88.handleSubmit(false);
      });
    }
  }, {
    key: "render",
    value: function render() {
      return React.createElement("div", null, React.createElement(PharmacySearchForm, {
        ref: this._searchForm,
        submitSearchCallback: this.handleSetSearchParams,
        clearFormCallback: this.handleClearForm,
        data: this.props.data
      }), React.createElement(PharmacySearchResults, {
        ref: this._results,
        data: this.props.data,
        hasNoResults: this.state.hasNoResults
      }), React.createElement(Pagination, {
        items: this.state.pages,
        onChangePage: this.handleChangePage,
        itemsPerPage: this.state.itemsPerPage
      }));
    }
  }]);

  return PharmacyMain;
}(React.Component);

;

var PharmacySearchForm =
/*#__PURE__*/
function (_React$Component43) {
  _inherits(PharmacySearchForm, _React$Component43);

  function PharmacySearchForm(props) {
    var _this89;

    _classCallCheck(this, PharmacySearchForm);

    _this89 = _possibleConstructorReturn(this, _getPrototypeOf(PharmacySearchForm).call(this, props));
    _this89.state = {
      selectedCategory: 'all'
    };
    _this89._category = React.createRef();
    _this89._type = React.createRef();
    _this89._zipCode = React.createRef();
    _this89._city = React.createRef();
    _this89._county = React.createRef();
    _this89._pharmaName = React.createRef();
    _this89.handleSubmit = _this89.handleSubmit.bind(_assertThisInitialized(_this89));
    _this89.handleClear = _this89.handleClear.bind(_assertThisInitialized(_this89));
    _this89.handleRadioChange = _this89.handleRadioChange.bind(_assertThisInitialized(_this89));
    return _this89;
  }

  _createClass(PharmacySearchForm, [{
    key: "handleSubmit",
    value: function handleSubmit(e) {
      e.preventDefault();
      this.props.submitSearchCallback({
        category: this.state.selectedCategory === 'all' ? null : this.state.selectedCategory,
        type: this._type.value,
        zipcode: this._zipCode.current.value,
        city: this._city.value,
        county: this._county.value,
        pharmaName: this._pharmaName.value
      });
    }
  }, {
    key: "handleClear",
    value: function handleClear(e) {
      e.preventDefault();
      this.props.clearFormCallback();
      this._type.value = '';
      this._zipCode.current.value = '';
      this._city.value = '';
      this._county.value = '';
      this._pharmaName.value = '';
      this.setState({
        selectedCategory: 'all'
      });
    }
  }, {
    key: "handleRadioChange",
    value: function handleRadioChange(value) {
      this.setState({
        selectedCategory: value
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this90 = this;

      return React.createElement("div", {
        className: "pharmacy-search-form",
        style: {
          marginBottom: '3.8rem'
        }
      }, React.createElement("form", {
        onSubmit: this.handleSubmit
      }, React.createElement(RadioCollection, {
        data: this.props.data,
        name: 'category',
        handleRadioChange: this.handleRadioChange,
        selectedCategory: this.state.selectedCategory,
        optionsUrl: this.props.data.apiCategoryUrl,
        title: 'Pharmacy Category'
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this90._type = input;
        },
        label: 'Pharmacy Type',
        optionsUrl: this.props.data.apiTypeUrl,
        defaultOptionText: 'All Network Types'
      }), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label"
      }, React.createElement("span", {
        className: "input-label-text"
      }, "ZIP Code"), React.createElement("input", {
        ref: this._zipCode,
        className: "input-text",
        type: "number",
        name: "zipCode"
      }))), React.createElement(Dropdown, {
        select: function select(input) {
          return _this90._city = input;
        },
        label: 'City',
        optionsUrl: this.props.data.apiCitiesUrl,
        defaultOptionText: 'All Cities'
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this90._county = input;
        },
        label: 'County',
        optionsUrl: this.props.data.apiCountiesUrl,
        defaultOptionText: 'All Counties'
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this90._pharmaName = input;
        },
        label: 'Pharmacy Name',
        optionsUrl: this.props.data.apiPharmacyName,
        defaultOptionText: 'All Pharmacies'
      }), React.createElement("div", {
        className: "submit-button"
      }, React.createElement("button", {
        className: "cta-primary",
        onClick: this.handleSubmit
      }, "Search"), React.createElement("button", {
        className: "cta-secondary",
        style: {
          marginLeft: '1.9rem'
        },
        onClick: this.handleClear
      }, "Clear All"))));
    }
  }]);

  return PharmacySearchForm;
}(React.Component);

;

var PharmacySearchResults =
/*#__PURE__*/
function (_React$Component44) {
  _inherits(PharmacySearchResults, _React$Component44);

  function PharmacySearchResults(props) {
    var _this91;

    _classCallCheck(this, PharmacySearchResults);

    _this91 = _possibleConstructorReturn(this, _getPrototypeOf(PharmacySearchResults).call(this, props));
    _this91.state = {
      results: []
    };
    _this91.loadPharmacyResults = _this91.loadPharmacyResults.bind(_assertThisInitialized(_this91));
    return _this91;
  }

  _createClass(PharmacySearchResults, [{
    key: "loadPharmacyResults",
    value: function loadPharmacyResults(results) {
      this.setState({
        results: results
      });
    }
  }, {
    key: "render",
    value: function render() {
      if (this.props.hasNoResults) {
        return React.createElement(NoResults, null);
      } else {
        return React.createElement("div", {
          className: "results-section"
        }, React.createElement("div", null, this.state.results.map(function (result) {
          return React.createElement("div", {
            className: "results-section-container"
          }, React.createElement("hr", null), React.createElement("h3", {
            class: "heading-three"
          }, result.PharmacyName), React.createElement("div", {
            className: "results-section-details"
          }, React.createElement("span", {
            className: "body-regular",
            "aria-label": "Address",
            style: {
              marginBottom: '1.2rem',
              display: 'block'
            }
          }, React.createElement("p", null, result.PharmacyAddress), React.createElement("p", null, result.PharmacyCity, ", ", result.PharmacyState, " ", result.PharmacyZipCode))), React.createElement("div", {
            class: "table-wrapper",
            style: {
              marginBottom: '1.6rem'
            }
          }, React.createElement("table", null, React.createElement("tbody", null, React.createElement("tr", null, React.createElement("td", null, "Pharmacy Category"), React.createElement("td", null, "90-Day Supply"), React.createElement("td", null, "Pharmacy Type"), React.createElement("td", null, "Compound Credentialed")), React.createElement("tr", null, React.createElement("td", null, result.PharmacyCategory), React.createElement("td", null, result.PharmacyNinetyDay ? 'Yes' : 'No'), React.createElement("td", null, result.PharmacyType), React.createElement("td", null, result.PharmacyCompoundCredentialed ? 'Yes' : 'No'))))), React.createElement("a", {
            href: "tel:+".concat(result.PharmacyPhone),
            className: "cta-secondary"
          }, result.PharmacyPhone));
        })));
      }
    }
  }]);

  return PharmacySearchResults;
}(React.Component);

;

var Location =
/*#__PURE__*/
function (_React$Component45) {
  _inherits(Location, _React$Component45);

  function Location(props) {
    var _this92;

    _classCallCheck(this, Location);

    _this92 = _possibleConstructorReturn(this, _getPrototypeOf(Location).call(this, props));
    _this92.state = {
      location: null,
      isLoading: true,
      hasNoResult: false
    };
    return _this92;
  }

  _createClass(Location, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this93 = this;

      var locationId = document.location.href.split("/").pop();
      jQuery.post(this.props.data.getLocationApiUrl, {
        locationIdentifier: locationId
      }, function (res) {
        if (res) {
          _this93.setState({
            location: res,
            isLoading: false
          });
        } else {
          _this93.setState({
            hasNoResult: true,
            isLoading: false
          });
        }
      }.bind(this)).fail(function () {
        _this93.setState({
          hasNoResult: true,
          isLoading: false
        });
      });
    }
  }, {
    key: "render",
    value: function render() {
      if (this.state.isLoading) {
        return React.createElement("div", {
          className: "provider-location"
        }, React.createElement("p", {
          className: "body-regular"
        }, "Loading..."));
      } else if (this.state.hasNoResult) {
        return React.createElement("div", {
          className: "provider-location"
        }, React.createElement("h1", null, "Not Found"));
      } else {
        var _location = this.state.location;
        return React.createElement("div", {
          className: "provider-location"
        }, React.createElement("div", {
          className: "d-lg-flex d-block"
        }, React.createElement("div", {
          className: "provider-location-img col-lg-8"
        }, React.createElement("h1", {
          className: "provider-location-name"
        }, _location.LocationName), React.createElement("img", {
          src: "".concat(_location.BannerImage)
        })), React.createElement("div", {
          className: "provider-location-content col-lg-4"
        }, React.createElement("h2", null, "Contact Information"), React.createElement("div", {
          className: "provider-location-content-container"
        }, React.createElement("p", null, "Address"), React.createElement("a", {
          href: _location.GetDirectionsUrl,
          className: "address-and-phone",
          target: "_blank",
          "aria-label": "Open directions in new tab",
          style: {
            display: 'block'
          }
        }, React.createElement("p", {
          className: "address-and-phone"
        }, _location.AddressLine1, _location.AddressLine2 ? "<br/>" + _location.AddressLine2 : ""), React.createElement("p", {
          className: "address-and-phone"
        }, _location.City, ", ", _location.State, " ", _location.ZipCode))), React.createElement("div", {
          className: "provider-location-content-container"
        }, React.createElement("p", null, "Phone Number"), React.createElement("p", null, React.createElement("a", {
          href: "tel:".concat(_location.PhoneNumber),
          className: "address-and-phone"
        }, _location.PhoneNumber))))), React.createElement("div", null, React.createElement(GoogleMap, {
          apiKey: this.props.data.apiKey,
          location: _location,
          data: this.props.data
        })));
      }
    }
  }]);

  return Location;
}(React.Component);

;

var LocationSearchForm =
/*#__PURE__*/
function (_React$Component46) {
  _inherits(LocationSearchForm, _React$Component46);

  function LocationSearchForm(props) {
    var _this94;

    _classCallCheck(this, LocationSearchForm);

    _this94 = _possibleConstructorReturn(this, _getPrototypeOf(LocationSearchForm).call(this, props));
    _this94._location = React.createRef();
    _this94._address = React.createRef();
    _this94.handleSubmit = _this94.handleSubmit.bind(_assertThisInitialized(_this94));
    _this94.handleClear = _this94.handleClear.bind(_assertThisInitialized(_this94));
    return _this94;
  }

  _createClass(LocationSearchForm, [{
    key: "handleSubmit",
    value: function handleSubmit(e) {
      e.preventDefault();
      var address = this._address.current.value;
      var location = this._location.value;
      var payload = location ? {
        locationIdentifier: location
      } : {
        address: address
      };
      this.props.submitSearchCallback(payload);
    }
  }, {
    key: "handleClear",
    value: function handleClear(e) {
      e.preventDefault();
      this.props.clearFormCallback();
      this._location.value = '';
      this._address.current.value = '';
    }
  }, {
    key: "render",
    value: function render() {
      var _this95 = this;

      return React.createElement("form", {
        onSubmit: this.handleSubmit,
        className: "tab-content"
      }, this.props.data.alertBanner && React.createElement("div", {
        className: "location-search-alert-banner",
        dangerouslySetInnerHTML: {
          __html: this.props.data.alertBanner
        }
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this95._location = input;
        },
        label: 'Locations',
        optionsUrl: this.props.data.locationsApiUrl,
        defaultOptionText: 'All Locations',
        setSpecialOptions: function setSpecialOptions(data) {
          return data.map(function (x) {
            return {
              text: x.LocationName,
              value: x.Name
            };
          });
        }
      }), React.createElement("div", {
        className: "input-section"
      }, React.createElement("label", {
        className: "input-label"
      }, React.createElement("span", {
        className: "input-label-text"
      }, "Type an address or zip code to display closest locations"), React.createElement("input", {
        ref: this._address,
        className: "input-text",
        type: "text",
        name: "closestTerm"
      }))), React.createElement("div", {
        className: "submit-button d-flex"
      }, React.createElement("button", {
        className: "cta-primary",
        onClick: this.handleSubmit
      }, "Search"), React.createElement("button", {
        className: "btn btn-primary default-primary-button-white",
        style: {
          marginLeft: '1.9rem'
        },
        onClick: this.handleClear
      }, "Clear All")));
    }
  }]);

  return LocationSearchForm;
}(React.Component);

;

var LocationSearchResults =
/*#__PURE__*/
function (_React$Component47) {
  _inherits(LocationSearchResults, _React$Component47);

  function LocationSearchResults(props) {
    var _this96;

    _classCallCheck(this, LocationSearchResults);

    _this96 = _possibleConstructorReturn(this, _getPrototypeOf(LocationSearchResults).call(this, props));
    _this96.state = {
      results: []
    };
    _this96.loadLocationResults = _this96.loadLocationResults.bind(_assertThisInitialized(_this96));
    return _this96;
  }

  _createClass(LocationSearchResults, [{
    key: "loadLocationResults",
    value: function loadLocationResults(results) {
      this.setState({
        results: results
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this97 = this;

      if (this.props.hasNoResults) {
        return React.createElement(NoResults, null);
      } else {
        return React.createElement("div", {
          className: "results-provider"
        }, this.state.results.map(function (result) {
          return React.createElement("div", {
            className: "provider-search-result"
          }, React.createElement("div", {
            className: "provider-search-result-img"
          }, React.createElement("img", {
            src: "".concat(result.BannerImage),
            alt: "".concat(result.LocationName),
            title: "".concat(result.LocationName)
          })), React.createElement("div", {
            className: "provider-search-result-content"
          }, React.createElement("a", {
            href: "".concat(_this97.props.data.locationPageUrl, "/").concat(result.Name),
            className: "link-inline heading-four content-title"
          }, result.LocationName), React.createElement("p", null, React.createElement("span", {
            "aria-label": "Address"
          }, React.createElement("p", {
            className: "content-paragraph"
          }, result.AddressLine1), React.createElement("p", {
            className: "content-paragraph"
          }, result.AddressLine2), React.createElement("p", null, result.City, ", ", result.State, " ", result.ZipCode)))));
        }));
      }
    }
  }]);

  return LocationSearchResults;
}(React.Component);

;

var ProviderMain =
/*#__PURE__*/
function (_React$Component48) {
  _inherits(ProviderMain, _React$Component48);

  function ProviderMain(props) {
    var _this98;

    _classCallCheck(this, ProviderMain);

    _this98 = _possibleConstructorReturn(this, _getPrototypeOf(ProviderMain).call(this, props));
    _this98.state = {
      payload: {},
      // provider
      providerPages: [],
      itemsPerPage: 25,
      providerStartPage: 0,
      providerHasNoResults: false,
      // locations
      hasNoResults: false
    }; // Providers

    _this98._providerForm = React.createRef();
    _this98._providerResults = React.createRef();
    _this98.handleSetSearchParamsProvider = _this98.handleSetSearchParamsProvider.bind(_assertThisInitialized(_this98));
    _this98.handleSubmitProviders = _this98.handleSubmitProviders.bind(_assertThisInitialized(_this98));
    _this98.handleClearProviders = _this98.handleClearProviders.bind(_assertThisInitialized(_this98));
    _this98.handleChangeProviderPage = _this98.handleChangeProviderPage.bind(_assertThisInitialized(_this98)); // Locations

    _this98._locationForm = React.createRef();
    _this98._locationResults = React.createRef();
    _this98.handleSetSearchParamsLocation = _this98.handleSetSearchParamsLocation.bind(_assertThisInitialized(_this98));
    _this98.handleSubmitLocations = _this98.handleSubmitLocations.bind(_assertThisInitialized(_this98));
    _this98.handleClearLocations = _this98.handleClearLocations.bind(_assertThisInitialized(_this98));
    return _this98;
  } // Providers


  _createClass(ProviderMain, [{
    key: "handleSetSearchParamsProvider",
    value: function handleSetSearchParamsProvider(payload) {
      var _this99 = this;

      this.setState({
        providerStartPage: 0,
        payload: payload
      }, function () {
        _this99.handleSubmitProviders();
      });
    }
  }, {
    key: "handleSubmitProviders",
    value: function handleSubmitProviders() {
      var _this100 = this;

      var updatePages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
      jQuery.post("".concat(this.props.data.getProvidersApi, "?start=").concat(this.state.providerStartPage, "&rows=").concat(this.state.itemsPerPage), this.state.payload, function (res) {
        if (res.Providers != null && res.Providers.length > 0) {
          _this100._providerResults.current.loadProviderResults(res.Providers);

          if (updatePages) {
            _this100.setState({
              providerHasNoResults: false,
              providerPages: _toConsumableArray(Array(res.Total).keys()).map(function (i) {
                return {
                  id: i + 1
                };
              })
            });
          }

          var element = document.getElementById('search-results');
          var headerOffset = 150;
          var elementPosition = element.getBoundingClientRect().top;
          var offsetPosition = elementPosition + window.pageYOffset - headerOffset;
          window.scrollTo({
            top: offsetPosition,
            behavior: "smooth"
          });
        } else {
          _this100.setState({
            providerPages: [],
            providerHasNoResults: true
          });
        }
      }.bind(this));
    }
  }, {
    key: "handleClearProviders",
    value: function handleClearProviders() {
      this._providerResults.current.loadProviderResults([]);

      this.setState({
        providerPages: [],
        providerHasNoResults: false
      });
    }
  }, {
    key: "handleChangeProviderPage",
    value: function handleChangeProviderPage(pageData) {
      var _this101 = this;

      this.setState({
        providerStartPage: (pageData[0].id - 1) / this.state.itemsPerPage
      }, function () {
        _this101.handleSubmitProviders(false);
      });
    } // Locations

  }, {
    key: "handleSetSearchParamsLocation",
    value: function handleSetSearchParamsLocation(payload) {
      var _this102 = this;

      this.setState({
        payload: payload
      }, function () {
        _this102.handleSubmitLocations();
      });
    }
  }, {
    key: "handleSubmitLocations",
    value: function handleSubmitLocations() {
      var _this103 = this;

      var url = !!this.state.payload.locationIdentifier ? this.props.data.locationApiUrl : this.props.data.locationsApiUrl;
      jQuery.post(url, this.state.payload, function (res) {
        var locations = res && res.length ? res : [res];

        if (locations.length > 0) {
          _this103._locationResults.current.loadLocationResults(locations);

          _this103.setState({
            hasNoResults: false
          });
        } else {
          _this103.setState({
            hasNoResults: true
          });
        }
      }.bind(this)).fail(function () {
        _this103.setState({
          hasNoResults: true
        });
      });
    }
  }, {
    key: "handleClearLocations",
    value: function handleClearLocations() {
      this._locationResults.current.loadLocationResults([]);

      this.setState({
        hasNoResults: false
      });
    }
  }, {
    key: "render",
    value: function render() {
      return React.createElement("div", null, React.createElement(Tabs, {
        tabsLabel: "Add label here"
      }, React.createElement(Tab, {
        name: "Provider Search"
      }, React.createElement(ProviderSearchForm, {
        ref: this._providerForm,
        submitSearchCallback: this.handleSetSearchParamsProvider,
        clearFormCallback: this.handleClearProviders,
        data: this.props.data
      }), React.createElement(ProviderSearchResults, {
        ref: this._providerResults,
        data: this.props.data,
        hasNoResults: this.state.providerHasNoResults
      }), React.createElement(Pagination, {
        items: this.state.providerPages,
        onChangePage: this.handleChangeProviderPage,
        itemsPerPage: this.state.itemsPerPage
      })), React.createElement(Tab, {
        name: "Location Search"
      }, React.createElement(LocationSearchForm, {
        ref: this._locationForm,
        submitSearchCallback: this.handleSetSearchParamsLocation,
        clearFormCallback: this.handleClearLocations,
        data: this.props.data
      }), React.createElement(LocationSearchResults, {
        ref: this._locationResults,
        data: this.props.data,
        hasNoResults: this.state.hasNoResults
      }))));
    }
  }]);

  return ProviderMain;
}(React.Component);

;

var ProviderProfile =
/*#__PURE__*/
function (_React$Component49) {
  _inherits(ProviderProfile, _React$Component49);

  function ProviderProfile(props) {
    var _this104;

    _classCallCheck(this, ProviderProfile);

    _this104 = _possibleConstructorReturn(this, _getPrototypeOf(ProviderProfile).call(this, props));
    _this104.state = {
      provider: null,
      isLoading: true,
      hasNoResult: false
    };
    _this104.formatDelimiter = _this104.formatDelimiter.bind(_assertThisInitialized(_this104));
    return _this104;
  }

  _createClass(ProviderProfile, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this105 = this;

      var providerId = document.location.href.split("/").pop();
      jQuery.post(this.props.data.getProviderApiUrl, {
        providerIdentifier: providerId
      }, function (res) {
        if (res) {
          _this105.setState({
            provider: res,
            isLoading: false
          });
        } else {
          _this105.setState({
            hasNoResult: true,
            isLoading: false
          });
        }
      }.bind(this)).fail(function () {
        _this105.setState({
          hasNoResult: true,
          isLoading: false
        });
      });
    }
  }, {
    key: "formatDelimiter",
    value: function formatDelimiter(arr, i) {
      return i < arr.length - 1 ? ', ' : null;
    }
  }, {
    key: "render",
    value: function render() {
      var _this106 = this;

      if (this.state.isLoading) {
        return React.createElement("p", null, "Loading...");
      } else if (this.state.hasNoResult) {
        return React.createElement("h1", null, "Not Found");
      } else {
        var provider = this.state.provider;
        return React.createElement("div", null, React.createElement("div", {
          className: "provider-profile d-lg-flex d-block"
        }, React.createElement("div", {
          className: "provider-profile-image"
        }, React.createElement("img", {
          src: "".concat(provider.ProviderImage),
          alt: "".concat(provider.ProviderFirstName, " ").concat(provider.ProviderLastName, ", ").concat(provider.ProviderDegree, " profile photograph")
        })), React.createElement("div", {
          className: "provider-profile-content"
        }, React.createElement("div", {
          className: "provider-profile-content-title"
        }, React.createElement("h1", null, provider.ProviderFirstName, " ", provider.ProviderLastName, ", ", provider.ProviderDegree), React.createElement("p", null, provider.AcceptingNewPatients && React.createElement("strong", null, provider.AcceptedNewPatientLabel ? provider.AcceptedNewPatientLabel : 'Accepting new patients'), !provider.AcceptingNewPatients && React.createElement("strong", null, provider.AcceptedNewPatientLabel ? provider.AcceptedNewPatientLabel : 'Current patients only'))), React.createElement("div", {
          className: "provider-profile-content-body column-container d-block"
        }, React.createElement("div", {
          className: "column-half w-auto"
        }, React.createElement("div", {
          className: "provider-profile-content-section"
        }, React.createElement("h2", null, "Specialty"), provider.ProviderMedicalSpecialties != null ? provider.ProviderMedicalSpecialties.split(',').map(function (key, i) {
          return React.createElement("p", null, key);
        }) : ""), React.createElement("div", {
          className: "provider-profile-content-section"
        }, React.createElement("h2", null, "Languages Spoken"), React.createElement("p", null, provider.ProviderLanguages != null ? provider.ProviderLanguages.split(',').map(function (key, i) {
          return React.createElement("span", null, key, _this106.formatDelimiter(provider.ProviderLanguages.split(','), i));
        }) : "")), React.createElement("div", {
          className: "provider-profile-content-section"
        }, React.createElement("h2", null, "Joined Kelsey-Seybold"), React.createElement("p", null, provider.ProviderYearHired))), React.createElement("div", {
          className: "column-half w-auto"
        }, React.createElement("div", {
          className: "provider-profile-content-section"
        }, React.createElement("h2", null, "Board Certification"), React.createElement("p", null, provider.BoardCertifications != null ? provider.BoardCertifications.split('|').map(function (key, i) {
          return React.createElement("span", null, key, _this106.formatDelimiter(provider.BoardCertifications.split('|'), i));
        }) : "")), React.createElement("div", {
          className: "provider-profile-content-section"
        }, React.createElement("h2", null, "Medical School"), React.createElement("p", null, provider.MedicalSchool)))))), provider.ProviderVidyardVideoId && React.createElement("div", {
          className: "provider-video"
        }, React.createElement("img", {
          class: "vidyard-player-embed",
          src: "https://play.vidyard.com/".concat(provider.ProviderVidyardVideoId, ".jpg"),
          "data-uuid": provider.ProviderVidyardVideoId,
          "data-v": "4",
          "data-type": "inline",
          "data-autoplay": "0"
        })));
      }
    }
  }]);

  return ProviderProfile;
}(React.Component);

;

var ProviderSearchForm =
/*#__PURE__*/
function (_React$Component50) {
  _inherits(ProviderSearchForm, _React$Component50);

  function ProviderSearchForm(props) {
    var _this107;

    _classCallCheck(this, ProviderSearchForm);

    _this107 = _possibleConstructorReturn(this, _getPrototypeOf(ProviderSearchForm).call(this, props));
    _this107._firstName = React.createRef();
    _this107._lastName = React.createRef();
    _this107._languages = React.createRef();
    _this107._gender = React.createRef();
    _this107._specialty = React.createRef();
    _this107._location = React.createRef();
    _this107.handleSubmit = _this107.handleSubmit.bind(_assertThisInitialized(_this107));
    _this107.handleClear = _this107.handleClear.bind(_assertThisInitialized(_this107));
    return _this107;
  }

  _createClass(ProviderSearchForm, [{
    key: "handleSubmit",
    value: function handleSubmit(e) {
      e.preventDefault();
      this.props.submitSearchCallback({
        firstName: this._firstName.current.value,
        lastName: this._lastName.current.value,
        language: this._languages.value,
        gender: this._gender.value,
        location: this._location.value,
        term: this._specialty.value,
        showOnKca: true
      });
    }
  }, {
    key: "handleClear",
    value: function handleClear(e) {
      e.preventDefault();
      this.props.clearFormCallback();
      this._firstName.current.value = '';
      this._lastName.current.value = '';
      this._languages.value = '';
      this._gender.value = '';
      this._specialty.value = '';
      this._location.value = '';
      this._certification.value = '';
    }
  }, {
    key: "render",
    value: function render() {
      var _this108 = this;

      return React.createElement("form", {
        onSubmit: this.handleSubmit,
        className: "tab-content"
      }, React.createElement("div", {
        className: "provider-search-form"
      }, React.createElement("div", {
        className: "provider-search-form-section"
      }, React.createElement("div", {
        className: "input-section provider-inputs"
      }, React.createElement("label", {
        className: "input-label"
      }, React.createElement("span", {
        className: "input-label-text"
      }, "First Name"), React.createElement("input", {
        ref: this._firstName,
        className: "input-text",
        type: "text",
        name: "firstName"
      }))), React.createElement("div", {
        className: "input-section provider-inputs"
      }, React.createElement("label", {
        className: "input-label"
      }, React.createElement("span", {
        className: "input-label-text"
      }, "Last Name"), React.createElement("input", {
        ref: this._lastName,
        className: "input-text",
        type: "text",
        name: "lastName"
      }))), React.createElement(Dropdown, {
        select: function select(input) {
          return _this108._languages = input;
        },
        label: 'Languages spoken',
        optionsUrl: this.props.data.languageApiUrl,
        defaultOptionText: 'All Languages'
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this108._gender = input;
        },
        label: 'Doctor gender',
        optionsUrl: this.props.data.genderApiUrl,
        defaultOptionText: 'No Preference'
      })), React.createElement("div", {
        className: "provider-search-form-section"
      }, React.createElement(Dropdown, {
        select: function select(input) {
          return _this108._specialty = input;
        },
        label: 'Specialty',
        defaultOptionText: 'All Specialties',
        optionsUrl: this.props.data.specialtyApiUrl,
        setSpecialOptions: function setSpecialOptions(data) {
          return data.map(function (x) {
            return {
              text: x,
              value: x
            };
          });
        }
      }), React.createElement(Dropdown, {
        select: function select(input) {
          return _this108._location = input;
        },
        label: 'Locations',
        defaultOptionText: 'All Locations',
        optionsUrl: this.props.data.locationsApiUrl,
        setSpecialOptions: function setSpecialOptions(data) {
          return data.map(function (x) {
            return {
              text: x.LocationName,
              value: x.LocationName
            };
          });
        }
      }))), React.createElement("div", {
        className: "submit-button d-flex gap-3"
      }, React.createElement("button", {
        className: "cta-primary",
        onClick: this.handleSubmit
      }, "Search"), React.createElement("button", {
        className: "btn btn-primary default-primary-button-white",
        onClick: this.handleClear
      }, "Clear All")));
    }
  }]);

  return ProviderSearchForm;
}(React.Component);

;

var ProviderSearchResults =
/*#__PURE__*/
function (_React$Component51) {
  _inherits(ProviderSearchResults, _React$Component51);

  function ProviderSearchResults(props) {
    var _this109;

    _classCallCheck(this, ProviderSearchResults);

    _this109 = _possibleConstructorReturn(this, _getPrototypeOf(ProviderSearchResults).call(this, props));
    _this109.state = {
      results: []
    };
    _this109.loadProviderResults = _this109.loadProviderResults.bind(_assertThisInitialized(_this109));
    _this109.addSeparator = _this109.addSeparator.bind(_assertThisInitialized(_this109));
    return _this109;
  }

  _createClass(ProviderSearchResults, [{
    key: "loadProviderResults",
    value: function loadProviderResults(results) {
      this.setState({
        results: results
      });
    }
  }, {
    key: "addSeparator",
    value: function addSeparator(arr, i) {
      return arr.length > 1 && i < arr.length - 1 ? ', ' : null;
    }
  }, {
    key: "render",
    value: function render() {
      var _this110 = this;

      if (this.props.hasNoResults) {
        return React.createElement(NoResults, null);
      } else {
        return React.createElement("div", {
          id: "search-results",
          className: "results-provider"
        }, this.state.results.map(function (result) {
          return React.createElement("div", {
            className: "provider-search-result"
          }, React.createElement("div", {
            className: "provider-search-result-img"
          }, React.createElement("img", {
            src: "".concat(result.ProviderImage),
            alt: "".concat(result.ProviderFirstName, " ").concat(result.ProviderLastName, ", ").concat(result.ProviderDegree, " profile photograph"),
            title: "".concat(result.ProviderFirstName, " ").concat(result.ProviderLastName, ", ").concat(result.ProviderDegree)
          })), React.createElement("div", {
            className: "provider-search-result-content"
          }, React.createElement("a", {
            href: "".concat(_this110.props.data.bioPageUrl, "/").concat(result.Name),
            className: "link-inline heading-four content-title"
          }, result.ProviderFirstName, " ", result.ProviderLastName, ", ", result.ProviderDegree), React.createElement("p", {
            className: "content-paragraph"
          }, "Specialties"), React.createElement("p", {
            className: "content-specialties"
          }, result.ProviderMedicalSpecialties), React.createElement("p", {
            className: "content-paragraph"
          }, "Locations"), React.createElement("ul", {
            className: "content-locations"
          }, result.Locations != null ? result.Locations.map(function (location, i) {
            return React.createElement("li", null, React.createElement("a", {
              href: "".concat(_this110.props.data.locationPageUrl, "/").concat(location.Name),
              className: "link-inline"
            }, location.LocationName));
          }) : "")));
        }));
      }
    }
  }]);

  return ProviderSearchResults;
}(React.Component);

;
var consoleMessage = "Something went wrong";

var ProviderDetailSearch =
/*#__PURE__*/
function (_React$Component52) {
  _inherits(ProviderDetailSearch, _React$Component52);

  function ProviderDetailSearch(props) {
    var _this111;

    _classCallCheck(this, ProviderDetailSearch);

    _this111 = _possibleConstructorReturn(this, _getPrototypeOf(ProviderDetailSearch).call(this, props));

    _defineProperty(_assertThisInitialized(_this111), "handleSort", function (event) {
      event.preventDefault();
      document.getElementById("customSpinner").style.display = "flex";
      document.getElementsByTagName("body")[0].style.overflow = "hidden";
      var sortValue = {
        text: "",
        value: ""
      };

      switch (event.target.value) {
        case "name":
          sortValue.text = "ASC";
          break;

        case "reverse":
          sortValue.text = "DESC";
          break;

        case "distance":
          sortValue.text = "DIST";
          break;
      }

      _this111.setState({
        sortBy: sortValue.text
      });

      sortValue.value = sortValue.text;
      window.location.href = _this111.GetDocumentUrl(sortValue, "sort=");
    });

    _defineProperty(_assertThisInitialized(_this111), "handleSubmit", function (payload) {
      var target;

      if (window.location.href.substr(0, window.location.href.indexOf("?"))) {
        target = window.location.href.substr(0, window.location.href.indexOf("?") + 1);
      } else {
        target = window.location.href + "?";
      }

      if (payload.zip) {
        _this111.state.sortBy = "distance";
        target = target.concat("zipCode=" + payload.zip + "&");
      }

      if (payload.searchTerm != "" || payload.searchTerm != null) {
        target = target.concat("Term=" + payload.searchTerm + "&");
      }

      switch (_this111.state.sortBy) {
        case "name":
          target = target.concat("sort=ASC");
          break;

        case "reverse":
          target = target.concat("sort=DESC");
          break;

        case "distance":
          target = target.concat("sort=DIST");
          break;
      }

      window.location.href = target;
    });

    _defineProperty(_assertThisInitialized(_this111), "setDisplayPage", function () {
      var startPage = _this111.state.providerStartPage;
      var itemsPP = _this111.state.itemsPerPage;

      var holder = _this111.state.sortedResults.slice(startPage * itemsPP, (startPage + 1) * itemsPP);

      _this111.setState({
        pageResults: _toConsumableArray(holder)
      });
    });

    _defineProperty(_assertThisInitialized(_this111), "handleSetSearchParamsProvider", function (payload) {
      _this111.setState({
        payload: payload
      }, function () {
        _this111.handleSubmit(payload);
      });
    });

    _defineProperty(_assertThisInitialized(_this111), "handleClearForm", function () {
      if (window.location.href.indexOf("/specialty/") > -1) {
        window.location.href = window.location.href.substr(0, window.location.href.indexOf("/specialty/"));
      } else {
        window.location.href = window.location.href.substr(0, window.location.href.indexOf("?"));
      }
    });

    _defineProperty(_assertThisInitialized(_this111), "handleChangeProviderPage", function (pageData) {
      _this111.setState({
        providerStartPage: (pageData[0].id - 1) / _this111.state.itemsPerPage
      }, function () {
        _this111.setDisplayPage();
      });
    });

    _defineProperty(_assertThisInitialized(_this111), "refineResults", function () {
      _this111.setState({
        refinesResult: !_this111.state.refinesResult
      });
    });

    _defineProperty(_assertThisInitialized(_this111), "handleLanguage", function (e) {
      var query = "";

      if (e.target.value == "Any") {
        query = _this111.GetQueryOnAny(_this111.state.planguage, "language");
      } else {
        query = _this111.GetDocumentUrl(e.target.selectedOptions[0], "language=");
      }

      _this111.setState({
        planguage: e.target.value
      });

      _this111.GetData(query);
    });

    _defineProperty(_assertThisInitialized(_this111), "handleGender", function (e) {
      var query = "";

      if (e.target.value == "Any") {
        query = _this111.GetQueryOnAny(_this111.state.pgender, "gender");
      } else {
        query = _this111.GetDocumentUrl(e.target.selectedOptions[0], "gender=");
      }

      _this111.setState({
        pgender: e.target.value
      });

      _this111.GetData(query);
    });

    _defineProperty(_assertThisInitialized(_this111), "handleLocation", function (e) {
      var query = "";

      if (e.target.value == "Any") {
        query = _this111.GetQueryOnAny(_this111.state.plocation, "location");
      } else {
        query = _this111.GetDocumentUrl(e.target.selectedOptions[0], "location=");
      }

      _this111.setState({
        plocation: e.target.value
      });

      _this111.GetData(query);
    });

    _defineProperty(_assertThisInitialized(_this111), "handleSpecialty", function (e) {
      var query = "";

      if (e.target.value === "Any") {
        query = _this111.GetQueryOnAny("Any", "Specialty");
      } else {
        query = _this111.GetDocumentUrl(e.target.selectedOptions[0], "Specialty=");
      }

      _this111.setState({
        pSpecialty: e.target.value
      });

      _this111.GetData(query);
    });

    _defineProperty(_assertThisInitialized(_this111), "handleClear", function (e) {
      document.getElementById("customSpinner").style.display = "flex";
      document.getElementsByTagName("body")[0].style.overflow = "hidden";
      e.preventDefault();

      _this111.handleClearForm();
    });

    _this111.onPageLoadViewRef = React.createRef();
    var api = '';

    if (_this111.props.data.ApiKey != null) {
      api = _this111.props.data.ApiKey;
    }

    _this111.state = {
      providerDetailResults: _this111.props.data.Providers,
      totalResults: _this111.props.data.Total,
      sortedResults: _this111.props.data.Providers,
      commonSearches: _this111.props.data.ProviderCommonSearches,
      pageResults: [],
      itemsPerPage: 12,
      providerStartPage: 0,
      sortBy: "name",
      payload: {},
      providerPages: [],
      apiKey: api,
      zipCode: _this111.props.data.zipCode,
      searchTerm: _this111.props.data.term,
      language: [],
      gender: [],
      location: [],
      specialty: [],
      refinesResult: false,
      planguage: "",
      pgender: "",
      plocation: "",
      pSpecialty: "",
      isLoading: false,
      timeoutErrorMessage: "",
      isError: false,
      specialtyPageFilters: []
    };
    return _this111;
  }

  _createClass(ProviderDetailSearch, [{
    key: "GetQueryOnAny",
    value: function GetQueryOnAny(selectedValue, quertPart) {
      var query = "";
      var qpart = "";
      var replaceString = "";
      qpart = window.location.href.slice(window.location.href.indexOf(quertPart + "=") - 1, window.location.href.indexOf(quertPart + "="));

      if (qpart == "&") {
        replaceString = qpart + quertPart + "=" + selectedValue;
      } else {
        replaceString = quertPart + "=" + selectedValue;
      }

      query = decodeURI(window.location.href).replace(replaceString, "");

      if (query.indexOf("?") == query.length - 1) {
        query = query.replace("?", "");
      }

      if (query.includes("?&")) {
        query = query.replace("?&", "?");
      }

      return query;
    }
  }, {
    key: "GetData",
    value: function GetData(query) {
      document.getElementById("customSpinner").style.display = "flex";
      document.getElementsByTagName("body")[0].style.overflow = "hidden";
      window.history.pushState("Providers", "Title", query);
      var searchParams = new URLSearchParams(window.location.search);

      if (searchParams.get("start")) {
        searchParams.set("start", 0);
      }

      window.location.href = "".concat(window.location.pathname, "?").concat(searchParams.toString().replace('+', ' '));
    }
  }, {
    key: "GetLanguageData",
    value: function GetLanguageData() {
      var _this112 = this;

      fetch(window.location.origin + "/api/search/providers/GetLanguageFilters").then(function (response) {
        return response.json();
      }).then(function (data) {
        _this112.setState({
          language: data
        });
      }).catch(function (e) {
        consoleMessage = e;
      });
    }
  }, {
    key: "GetGenderData",
    value: function GetGenderData() {
      var _this113 = this;

      fetch(window.location.origin + "/api/search/providers/GetGenderFilters").then(function (response) {
        return response.json();
      }).then(function (data) {
        _this113.setState({
          gender: data
        });
      }).catch(function (e) {
        consoleMessage = e;
      });
    }
  }, {
    key: "GetLocationData",
    value: function GetLocationData() {
      var _this114 = this;

      fetch(window.location.origin + "/api/search/providers/GetLocations").then(function (response) {
        return response.json();
      }).then(function (data) {
        var arr = [];
        data.map(function (location) {
          arr.push(location.LocationName);
        });

        _this114.setState({
          location: arr
        });
      }).catch(function (e) {
        consoleMessage = e;
      });
    }
  }, {
    key: "GetSpecialtyPageData",
    value: function GetSpecialtyPageData() {
      var _this115 = this;

      fetch(window.location.origin + "/api/search/providers/GetSpecialtyPageFilters").then(function (response) {
        return response.json();
      }).then(function (data) {
        var arr = [];
        data.map(function (spec) {
          arr.push(spec);
        });

        _this115.setState({
          specialtyPageFilters: arr
        });
      }).finally(function () {
        _this115.setSpecialtyFromUrl();
      }).catch(function (e) {
        consoleMessage = e;
      });
    }
  }, {
    key: "GetDocumentUrl",
    value: function GetDocumentUrl(selectedValue, quertPart) {
      var target = "";

      if (window.location.href.includes(quertPart)) {
        var locationHref = window.location.href.substr(window.location.href.indexOf("?") + 1, window.location.href.length).split("&");
        locationHref.map(function (value, idx) {
          if (value.indexOf(quertPart) > -1) {
            if (selectedValue.value !== "" || selectedValue.value !== null) {
              locationHref[idx] = quertPart + selectedValue.value;
            }
          }
        });
        target = window.location.href.slice(0, window.location.href.indexOf("?")).concat("?" + locationHref.join("&"));
      } else {
        if (window.location.href.indexOf("?") == -1) target = window.location.href + "?";else target = window.location.href + "&";

        if (quertPart != "" || quertPart != null) {
          target = target.concat(quertPart + selectedValue.text);
        }
      }

      if (quertPart === "Specialty=") {
        target = selectedValue.dataset.specialtyurl ? target.replace(window.location.pathname, selectedValue.dataset.specialtyurl) : target.replace(window.location.pathname, "/find-a-houston-doctor");
      }

      return target;
    } //Clear all filters

  }, {
    key: "setSpecialtyFromUrl",

    /* 
    * if the page is an FAD specialty page (denoted by the "/specialty/" in the pathname) we need to set the specialty
    * state variable to the matching specialty filter's Specialty field value so we can correctly prepopulate the 
    * specialty dropdown in the event that a user directly browses to a specialty page URL, this needs to happen after 
    * the API call to fetch the specialty page filters has completed
    */
    value: function setSpecialtyFromUrl() {
      var pathName = window.location.pathname.toLocaleLowerCase();

      if (pathName.indexOf("/find-a-houston-doctor/specialty/") > -1 && !this.state.pSpecialty) {
        var specialtyPageFilters = _toConsumableArray(this.state.specialtyPageFilters);

        for (var i = 0; i < specialtyPageFilters.length; i++) {
          if (specialtyPageFilters[i].SpecialtyPageUrl === pathName) {
            this.setState({
              pSpecialty: specialtyPageFilters[i].Specialty
            });
            break;
          }
        }
        /* 
        * kickoff the event chain to set the specialty and appropriate dropdown option
        */


        document.getElementById("specialty-dropdown").dispatchEvent(new Event("change", {
          bubbles: true
        }));
      }
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this116 = this;

      this.GetLanguageData();
      this.GetGenderData();
      this.GetLocationData();
      this.GetSpecialtyPageData();
      var locationHref = window.location.href.substr(window.location.href.indexOf("?") + 1, window.location.href.length).split("&");
      locationHref.map(function (locTerms) {
        var terms = locTerms.split("=");

        if (terms.length == 2) {
          if (terms[0] == "zipCode") {
            _this116.setState({
              zipCode: terms[1]
            });
          } else if (terms[0] == "Term" || terms[0] == "term") {
            _this116.setState({
              searchTerm: terms[1]
            });
          } else if (terms[0] == "sort") {
            _this116.setState({
              sortBy: terms[1] == "DESC" ? "reverse" : terms[1] == "DIST" ? "distance" : "name"
            });
          } else if (terms[0] == "language") {
            _this116.setState({
              planguage: terms[1]
            });
          } else if (terms[0] == "gender") {
            _this116.setState({
              pgender: terms[1]
            });
          } else if (terms[0] == "location") {
            var params = new URLSearchParams(window.location.search);
            var myLocation = params.get("location");

            _this116.setState({
              plocation: myLocation
            });
          } else if (terms[0] == "Specialty" || terms[0] == "specialty") {
            var _params = new URLSearchParams(window.location.search);

            var mySpecialty = _params.get("Specialty");

            _this116.setState({
              pSpecialty: mySpecialty
            });
          }
        }
      });
      this.setState({
        providerPages: _toConsumableArray(Array(this.props.data.Providers.length).keys()).map(function (i) {
          return {
            id: i + 1
          };
        })
      });
      this.setDisplayPage();
      var queryString = window.location.search;

      if (queryString) {
        this.onPageLoadViewRef.current.scrollIntoView(true);
        document.querySelector("header").classList.add("hidden");
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this117 = this;

      if (this.props.isEditing) {
        return React.createElement("div", null, React.createElement("h1", null, "Provider Detail Search"), React.createElement("p", null, "Provider Detail Search is not available in Editing or Preview mode."));
      } else {
        return React.createElement("div", null, React.createElement("div", {
          className: "tab-content"
        }, React.createElement("div", {
          className: "provider-search"
        }, React.createElement("h1", null, this.props.data.DictionaryData['Find-a-Doctor-Heading']), React.createElement(ProviderDetailSearchForm, {
          submitSearchCallback: this.handleSetSearchParamsProvider,
          clearFormCallback: this.handleClearForm,
          zipCode: this.state.zipCode,
          searchTerm: this.state.searchTerm,
          sortBy: this.state.sortBy,
          apikey: this.state.apiKey,
          commonSearches: this.state.commonSearches,
          dictionary: this.props.data.DictionaryData
        })), React.createElement("div", {
          className: "row component column-splitter"
        }, React.createElement("div", {
          className: "col-12 col-md-4 col-lg-3 "
        }, React.createElement("div", {
          className: "row refine-wrapper"
        }, React.createElement("div", {
          className: "doctor-refine-result"
        }, React.createElement("div", null, React.createElement("h3", {
          className: "refine-result-title"
        }, this.props.data.DictionaryData['Refine-Results-Desktop-Text']), React.createElement("h3", {
          onClick: this.refineResults,
          className: "mobile-heading-refine " + (this.state.refinesResult ? "active" : "")
        }, this.props.data.DictionaryData['Refine-Results-Mobile-Text']), React.createElement("div", {
          className: "results-wrapper " + (this.state.refinesResult ? "active" : "")
        }, React.createElement("div", {
          className: "dropdown-block"
        }, React.createElement("div", {
          className: "provider-facet-dropdown"
        }, React.createElement("div", {
          className: "facet-heading"
        }, React.createElement("h4", {
          className: "facet-title"
        }, this.props.data.DictionaryData['Specialty-Field-Label'])), React.createElement("div", {
          class: "refine-filter-wrapper"
        }, React.createElement("select", {
          id: "specialty-dropdown",
          className: "provider-facet-dropdown-select",
          onChange: this.handleSpecialty,
          value: this.state.pSpecialty
        }, React.createElement("option", {
          value: ""
        }, "Any"), this.state.specialtyPageFilters.map(function (spec) {
          var specialtyPageUrl = spec.SpecialtyPageUrl ? spec.SpecialtyPageUrl : "";
          var specialtyName = spec.Specialty ? spec.Specialty : " ";
          return React.createElement("option", {
            "data-specialtyUrl": specialtyPageUrl,
            value: specialtyName
          }, specialtyName);
        }), ";"), React.createElement("i", {
          class: "fa fa-chevron-down"
        })))), React.createElement("div", {
          className: "dropdown-block"
        }, React.createElement("div", {
          className: "provider-facet-dropdown"
        }, React.createElement("div", {
          className: "facet-heading"
        }, React.createElement("h4", {
          className: "facet-title"
        }, this.props.data.DictionaryData['Location-Name-Field-Label'])), React.createElement("div", {
          class: "refine-filter-wrapper"
        }, React.createElement("select", {
          className: "provider-facet-dropdown-select",
          onChange: this.handleLocation,
          value: this.state.plocation
        }, React.createElement("option", {
          value: ""
        }, "Any"), this.state.location.map(function (location) {
          var locationValue = location ? location.trim() : " ";
          return React.createElement("option", {
            value: locationValue,
            selected: locationValue === _this117.state.plocation ? "selected" : null
          }, locationValue);
        }), ";"), React.createElement("i", {
          class: "fa fa-chevron-down"
        })))), React.createElement("div", {
          className: "dropdown-block"
        }, React.createElement("div", {
          className: "provider-facet-dropdown"
        }, React.createElement("div", {
          className: "facet-heading"
        }, React.createElement("h4", {
          className: "facet-title"
        }, this.props.data.DictionaryData['Language-Field-Label'])), React.createElement("div", {
          class: "refine-filter-wrapper"
        }, React.createElement("select", {
          className: "provider-facet-dropdown-select",
          onChange: this.handleLanguage,
          value: this.state.planguage
        }, React.createElement("option", {
          value: ""
        }, "Any"), this.state.language.map(function (language) {
          var languageValue = language ? language.trim() : " ";
          return React.createElement("option", {
            value: languageValue,
            selected: languageValue === _this117.state.planguage ? "selected" : null
          }, languageValue);
        }), ";"), React.createElement("i", {
          class: "fa fa-chevron-down"
        })))), React.createElement("div", {
          className: "dropdown-block"
        }, React.createElement("div", {
          className: "provider-facet-dropdown"
        }, React.createElement("div", {
          className: "facet-heading"
        }, React.createElement("h4", {
          className: "facet-title"
        }, this.props.data.DictionaryData['Gender-Field-Label'])), React.createElement("div", {
          class: "refine-filter-wrapper"
        }, React.createElement("select", {
          className: "provider-facet-dropdown-select",
          onChange: this.handleGender,
          value: this.state.pgender
        }, React.createElement("option", {
          value: ""
        }, "Any"), this.state.gender.map(function (gender) {
          var genderValue = gender ? gender.trim() : " ";
          return React.createElement("option", {
            value: genderValue,
            selected: genderValue === _this117.state.pgender ? "selected" : null
          }, genderValue);
        }), ";"), React.createElement("i", {
          class: "fa fa-chevron-down"
        })))), React.createElement("div", {
          className: "clear-filters-wrapper"
        }, React.createElement("a", {
          class: "reset-button",
          onClick: this.handleClear
        }, this.props.data.DictionaryData["Clear-All-Filters-link-text"]))))))), React.createElement("div", {
          className: "col-12 col-md-8 col-lg-9"
        }, this.state.isError ? React.createElement("div", {
          className: "row"
        }, React.createElement("div", {
          class: "display-doctor-heading search-results-count"
        }, " ", this.state.timeoutErrorMessage)) : React.createElement("div", {
          className: "row",
          ref: this.onPageLoadViewRef
        }, React.createElement("div", {
          className: "display-doctor-heading search-results-count col-12 col-md-7"
        }, this.props.data.DictionaryData['Displaying-All-Doctors-Text'], " ", this.state.totalResults), React.createElement("div", {
          className: "sort-wrapper col-12 col-md-5"
        }, React.createElement("div", {
          className: "sort"
        }, React.createElement("label", null, this.props.data.DictionaryData['Sort-By-Field-Label'])), React.createElement("select", {
          onChange: this.handleSort,
          value: this.state.sortBy
        }, React.createElement("option", {
          value: "name"
        }, this.props.data.DictionaryData['Find-a-Doctor-Sorting-Ascending']), React.createElement("option", {
          value: "reverse"
        }, this.props.data.DictionaryData['Find-a-Doctor-Sorting-Descending']), this.state.zipCode ? React.createElement("option", {
          value: "distance"
        }, this.props.data.DictionaryData['Find-a-Doctor-Sorting-Distance']) : null), React.createElement("i", {
          class: "fa fa-chevron-down"
        }))), this.state.totalResults && this.props.data.ProviderNoresultsContent ? "" : React.createElement("div", {
          class: "no-results"
        }, this.props.data.ProviderNoresultsContent), React.createElement("div", {
          className: "row"
        }, React.createElement(ProviderDetailSearchResults, {
          data: this.state.pageResults,
          LoadingclassName: this.state.isLoading,
          dictionary: this.props.data.DictionaryData,
          locationSearchPage: this.props.data.LocationSearchPage,
          providerTooltipContent: this.props.data.ProviderTooltipContent,
          providerTooltipLink: this.props.data.ProviderTooltipLink
        })), React.createElement("div", {
          className: "row provider-pagination"
        }, React.createElement(ProviderPagination, {
          items: this.state.providerPages,
          totalResults: this.state.totalResults,
          onChangePage: this.handleChangeProviderPage,
          itemsPerPage: this.state.itemsPerPage
        }))))), React.createElement("div", {
          id: "customSpinner",
          className: "custom-spinner-container"
        }, React.createElement("div", null, React.createElement("svg", {
          id: "spinner",
          xmlns: "http://www.w3.org/2000/svg",
          viewBox: "0 0 512 512"
        }, React.createElement("path", {
          d: "M256 116a52 52 0 1 1 0-104 52 52 0 1 1 0 104zm0 364a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM448 288a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm399.4-96.2A56 56 0 1 1 352.2 80.6a56 56 0 1 1 79.2 79.2zM97.6 414.4a32 32 0 1 1 45.3-45.3A32 32 0 1 1 97.6 414.4zm271.5 0a32 32 0 1 1 45.3-45.3 32 32 0 1 1 -45.3 45.3zM86.3 86.3a48 48 0 1 1 67.9 67.9A48 48 0 1 1 86.3 86.3z"
        })))));
      }
    }
  }]);

  return ProviderDetailSearch;
}(React.Component);

;

var ProviderDetailSearchForm =
/*#__PURE__*/
function (_React$Component53) {
  _inherits(ProviderDetailSearchForm, _React$Component53);

  function ProviderDetailSearchForm(props) {
    var _this118;

    _classCallCheck(this, ProviderDetailSearchForm);

    _this118 = _possibleConstructorReturn(this, _getPrototypeOf(ProviderDetailSearchForm).call(this, props));
    var zip = "";
    var term = "";
    var api = "";
    var common = "";

    if (_this118.props.apikey !== null && _this118.props.apikey !== undefined) {
      api = _this118.props.apikey;
    }

    if (_this118.props.zipCode && _this118.validateZipCode(_this118.props.zipCode)) {
      zip = _this118.props.zipCode;
    }

    if (_this118.props.searchTerm !== null && _this118.props.searchTerm !== undefined) {
      term = _this118.props.searchTerm;
    }

    if (_this118.props.commonSearches !== null && _this118.props.commonSearches !== undefined) {
      common = _this118.props.commonSearches;
    }

    _this118.state = {
      showProviders: false,
      searchTerm: term,
      Jsondata: [],
      zipCode: zip,
      apiKey: api,
      commonSearch: common,
      providerdata: {},
      specialtydata: {},
      conditiondata: {},
      suggestionLength: 0,
      validZip: true
    };
    _this118._searchTerm = React.createRef();
    _this118._address = React.createRef();
    _this118._inputbox = React.createRef();
    _this118.handleSubmit = _this118.handleSubmit.bind(_assertThisInitialized(_this118));
    _this118.handleClear = _this118.handleClear.bind(_assertThisInitialized(_this118));
    _this118.handleLocationButton = _this118.handleLocationButton.bind(_assertThisInitialized(_this118));
    _this118.handleInput = _this118.handleInput.bind(_assertThisInitialized(_this118));
    _this118.getJson = _this118.getJson.bind(_assertThisInitialized(_this118));
    _this118.getZipcode = _this118.getZipcode.bind(_assertThisInitialized(_this118));
    _this118.handleSuggestion = _this118.handleSuggestion.bind(_assertThisInitialized(_this118));
    _this118.changeZipValue = _this118.changeZipValue.bind(_assertThisInitialized(_this118));
    _this118.preventInvalidInput = _this118.preventInvalidInput.bind(_assertThisInitialized(_this118));
    _this118.validateZipCode = _this118.validateZipCode.bind(_assertThisInitialized(_this118));
    _this118.checkEnter = _this118.checkEnter.bind(_assertThisInitialized(_this118));
    return _this118;
  }

  _createClass(ProviderDetailSearchForm, [{
    key: "handleInput",
    value: function handleInput(e) {
      var _this119 = this;

      this.setState({
        searchTerm: e.target.value
      });

      if (e.target.value.length >= 3) {
        var searchTerm = e.target.value;
        this.setState({
          showProviders: true,
          searchTerm: searchTerm
        });
        var url = window.location.origin;
        var target = url + "/api/search/providers/SearchAhead?";

        if (searchTerm != "" || searchTerm != null) {
          target = target.concat("Term=" + searchTerm + "&");
        }

        var zipInput = document.getElementById('zip-code-input').value;

        if (zipInput && this.validateZipCode(zipInput)) {
          target = target.concat("zipCode=" + zipInput + "&");
        }

        fetch(target).then(function (response) {
          return response.json();
        }).then(function (data) {
          _this119.setState({
            providerdata: data.Providers,
            specialtydata: data.Specialties,
            conditiondata: data.Conditions,
            suggestionLength: data.Providers.length + data.Specialties.length + data.Conditions.length
          });
        });
      } else {
        this.setState({
          showProviders: false
        });
      }
    }
  }, {
    key: "checkEnter",
    value: function checkEnter(e) {
      if (e.key === 'Enter') {
        e.preventDefault();

        if (this.state.validZip) {
          this.handleSubmit();
        }
      }
    }
  }, {
    key: "handleSubmit",
    value: function handleSubmit() {
      document.getElementById("customSpinner").style.display = "flex";
      document.getElementsByTagName("body")[0].style.overflow = "hidden";
      var address = "";

      if (this._address.current.value && this.validateZipCode(this._address.current.value)) {
        address = this._address.current.value;
        localStorage.setItem("StoredZip", address);
      }

      var searchTerm = this._inputbox.current.value;
      var payload = {
        searchTerm: searchTerm,
        zip: address
      };
      this.props.submitSearchCallback(payload);
    }
  }, {
    key: "handleLocationButton",
    value: function handleLocationButton() {
      var _this120 = this;

      if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function (position) {
          var latlng = position.coords.latitude + "," + position.coords.longitude;
          var Url = "https://maps.googleapis.com/maps/api/geocode/json?latlng=" + latlng + "&key=" + _this120.state.apiKey;

          _this120.getJson(Url);
        });
      } else {
        alert("Geolocation is not supported by this browser.");
      }
    }
  }, {
    key: "getZipcode",
    value: function getZipcode(results) {
      var result = results.results[0].address_components;

      for (var i = 0; i < result.length; ++i) {
        if (result[i].types[0] == "postal_code") {
          var postal = result[i].long_name;

          if (this.validateZipCode(postal)) {
            this.setState({
              zipCode: postal
            });
            localStorage.setItem("StoredZip", postal);
          }
        }
      }
    }
  }, {
    key: "getJson",
    value: function getJson(url) {
      var _this121 = this;

      fetch(url).then(function (resp) {
        return resp.json();
      }).then(function (data) {
        _this121.setState({
          Jsondata: data
        });

        _this121.getZipcode(data);
      });
    }
  }, {
    key: "handleClear",
    value: function handleClear(e) {
      document.getElementById("customSpinner").style.display = "flex";
      document.getElementsByTagName("body")[0].style.overflow = "hidden";
      e.preventDefault();
      localStorage.removeItem('StoredZip');
      this.props.clearFormCallback();
      this._inputbox.current.value = "";
      this._address.current.value = "";
    }
  }, {
    key: "handleSuggestion",
    value: function handleSuggestion(e) {
      this._inputbox.current.value = e.target.text.trim();
    }
  }, {
    key: "validateZipCode",
    value: function validateZipCode(zip) {
      if (zip === null || zip === undefined) return false;
      return /^[0-9]{5}$/.test(zip) || zip === '';
    }
  }, {
    key: "preventInvalidInput",
    value: function preventInvalidInput(e) {
      /* The following keys are valid "number" values but cannot be used for ZIP codes */
      if (e.key === '+' || e.key === 'e' || e.key === 'E' || e.key === '-') {
        e.preventDefault();
      }
    }
  }, {
    key: "changeZipValue",
    value: function changeZipValue(e) {
      this.setState({
        validZip: this.validateZipCode(e.target.value),
        zipCode: e.target.value
      });
      document.getElementsByClassName('search-box-input')[0].value = e.target.value;
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      this.setState({
        zipCode: ''
      });
      document.getElementsByClassName('search-box-input')[0].value = '';
      var searchParams = new URLSearchParams(window.location.search);
      var zipFromUrl = searchParams.get("zipCode");

      if (zipFromUrl && this.validateZipCode(zipFromUrl)) {
        this.setState({
          zipCode: zipFromUrl
        });
        document.getElementsByClassName('search-box-input')[0].value = zipFromUrl;
        localStorage.setItem("StoredZip", zipFromUrl);
      } else if (localStorage.StoredZip && this.validateZipCode(localStorage.StoredZip)) {
        this.setState({
          zipCode: localStorage.StoredZip
        });
        document.getElementsByClassName('search-box-input')[0].value = localStorage.StoredZip;
      }

      if (searchParams.get("Term")) {
        document.getElementById('inputbox').value = searchParams.get("Term");
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this122 = this;

      return React.createElement("div", {
        className: "tab-content"
      }, React.createElement("div", {
        className: "provider-search-block"
      }, React.createElement("div", {
        className: "conditions-wrapper"
      }, React.createElement("label", {
        htmlFor: "inputbox",
        className: "condition-label"
      }, this.props.dictionary["Find-a-Doctor-Search-Input-Label"]), React.createElement("input", {
        autoComplete: "off",
        className: this.state.showProviders ? "remove-radius" : "",
        id: "inputbox",
        name: "textBoxSearch",
        onChange: this.handleInput,
        onKeyPress: this.checkEnter,
        placeholder: this.props.dictionary["Search-Input-Hint-Text"],
        ref: this._inputbox,
        tabIndex: 0,
        title: "Enter three characters or more to perform a key word search.",
        type: "text",
        value: this.state.searchTerm ? this.state.searchTerm : null
      }), React.createElement("div", {
        className: "provider-suggestions " + (this.state.showProviders ? "active" : "")
      }, React.createElement("div", {
        className: "results-condition"
      }, this.state.providerdata.length > 0 ? React.createElement("div", {
        className: "providers"
      }, React.createElement("h5", null, "Providers"), React.createElement("ul", null, this.state.providerdata.slice(0, 5).map(function (provider) {
        return React.createElement("li", null, React.createElement("a", {
          onClick: _this122.handleSuggestion,
          href: provider.URL
        }, provider.Label));
      }))) : "", React.createElement("div", {
        className: "speciality-condition"
      }, this.state.specialtydata.length > 0 ? React.createElement("div", {
        className: "specialty"
      }, React.createElement("h5", null, "Specialty"), React.createElement("ul", null, this.state.specialtydata.slice(0, 5).map(function (specialty) {
        return React.createElement("li", null, React.createElement("a", {
          onClick: _this122.handleSuggestion,
          href: specialty.URL
        }, specialty.Label));
      }))) : "", this.state.conditiondata.length > 0 ? React.createElement("div", {
        className: "conditions"
      }, React.createElement("h5", null, "Conditions"), React.createElement("ul", null, this.state.conditiondata.slice(0, 5).map(function (condition) {
        return React.createElement("li", null, React.createElement("a", {
          onClick: _this122.handleSuggestion,
          href: condition.URL
        }, condition.Label));
      }))) : "")), this.state.providerdata.length > 5 || this.state.specialtydata.length > 5 || this.state.conditiondata.length > 5 ? React.createElement("div", {
        className: "all-results"
      }, React.createElement("a", {
        onClick: this.handleSubmit
      }, "View All ", this.state.suggestionLength, " Results")) : ""), React.createElement("div", {
        className: "common-searches"
      }, React.createElement("p", null, "Common Searches: "), React.createElement("div", {
        className: "rich-text",
        dangerouslySetInnerHTML: {
          __html: this.state.commonSearch
        }
      }))), React.createElement("div", {
        className: "conjuction"
      }, React.createElement("p", null, this.props.dictionary["And/Or-divider-text"])), React.createElement("div", {
        className: "location-search-wrapper"
      }, React.createElement("label", {
        htmlFor: "zip-code-input",
        className: "location-label"
      }, this.props.dictionary["Your-Location-Field-Label"]), React.createElement("input", {
        autoComplete: "off",
        className: "search-box-input" + (this.state.validZip ? "" : " invalid-zip"),
        id: "zip-code-input",
        name: "closestTerm",
        onKeyDown: this.preventInvalidInput,
        onKeyPress: this.checkEnter,
        onChange: this.changeZipValue,
        placeholder: this.props.dictionary["Enter-Zip-Code-Hint-Text"],
        ref: this._address,
        tabIndex: 0,
        title: "Enter a valid ZIP code to search by location (optional).",
        type: "number",
        value: this.state.zipCode ? this.state.zipCode : null
      }), React.createElement("div", {
        className: "current-location"
      }, React.createElement("a", {
        "data-toggle": "tooltip",
        title: "Use my current location.",
        onClick: this.handleLocationButton
      }, this.props.dictionary["Use-My-Current-Location-link-text"]))), React.createElement("div", {
        className: "link button specialty-button"
      }, React.createElement("button", {
        tabIndex: 0,
        className: "search-box-button" + (this.state.validZip ? "" : " invalid-zip"),
        type: "submit",
        onClick: this.handleSubmit
      }, React.createElement("span", null, this.props.dictionary['Search-button-text'])), React.createElement("div", {
        className: "clear-filters-wrapper"
      }, React.createElement("a", {
        tabIndex: 0,
        className: "reset-button",
        onClick: this.handleClear
      }, this.props.dictionary["Clear-All-Filters-link-text"])))));
    }
  }]);

  return ProviderDetailSearchForm;
}(React.Component);

;

var ProviderDetailSearchResults =
/*#__PURE__*/
function (_React$Component54) {
  _inherits(ProviderDetailSearchResults, _React$Component54);

  function ProviderDetailSearchResults(props) {
    var _this123;

    _classCallCheck(this, ProviderDetailSearchResults);

    _this123 = _possibleConstructorReturn(this, _getPrototypeOf(ProviderDetailSearchResults).call(this, props));
    _this123.state = {
      tooltipState: false,
      tooltipIndex: 0
    };
    _this123.toggleTooltip = _this123.toggleTooltip.bind(_assertThisInitialized(_this123));
    return _this123;
  }

  _createClass(ProviderDetailSearchResults, [{
    key: "toggleTooltip",
    value: function toggleTooltip(index) {
      this.setState({
        tooltipIndex: index,
        tooltipState: !this.state.tooltipState
      }, function () {
        if (this.state.tooltipState) {
          this.tooltipPosition(index);
        }
      });
    }
  }, {
    key: "tooltipPosition",
    value: function tooltipPosition(index) {
      var tooltipComponent = document.querySelectorAll(".tooltip.open");
      var tooltipPointer = document.querySelectorAll(".tooltip-pointer");
      var seesIconWrapper = document.querySelectorAll(".sees-icon-wrapper.active");
      var tooltipPointerPosition = 0; // let seesIconWrapperPosition = 0;

      var seesIconPosition = 0;
      var tooltipComponentLeft = "auto";
      var tooltipPointerItem = "";
      tooltipComponent.forEach(function (tooltipItem) {
        tooltipPointer.forEach(function (item) {
          tooltipPointerPosition = item.offsetLeft;
          tooltipPointerItem = item;
        });
        seesIconWrapper.forEach(function (icon) {
          seesIconPosition = icon.querySelector(".sees-icon").offsetLeft;
        });

        if (tooltipPointerPosition !== seesIconPosition) {
          var cardNumber = index + 1;

          if (window.screen.width > 767) {
            tooltipComponentLeft = seesIconPosition - tooltipItem.clientWidth / 2;
            tooltipItem.style.left = tooltipComponentLeft + "px";
          } else {
            tooltipItem.style.left = "auto";
          }

          if (window.screen.width > 991) {
            if (cardNumber % 3 == 0) {
              tooltipPointerItem.style.right = "10px";
              tooltipPointerItem.style.left = "auto";
              tooltipItem.style.left = "auto";
              tooltipItem.style.right = 0;
            }
          } else {
            if (window.screen.width < 992 && window.screen.width > 767) {
              if (cardNumber % 2 == 0) {
                tooltipPointerItem.style.right = tooltipComponentLeft + 6 + "px";
                tooltipPointerItem.style.left = "auto";
                tooltipItem.style.left = "auto";
                tooltipItem.style.right = 0;
              }
            }
          }
        }
      });
    }
  }, {
    key: "closeTooltip",
    value: function closeTooltip() {
      var tooltipComponent = document.querySelectorAll(".tooltip.open");
      tooltipComponent.forEach(function (tooltipItem) {
        tooltipItem.classList.remove("open");
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this124 = this;

      var isLoading = this.props.LoadingclassName;
      return React.createElement("div", {
        className: "provider-search-results"
      }, React.createElement("ul", {
        className: "provider-result-card"
      }, this.props.data.map(function (provider, index) {
        var spanstyle = "";
        var locLen = 0;
        var speLen = 0;

        if (provider.ProviderRatingID && provider.Rating) {
          spanstyle = {
            width: "".concat(provider.Rating.percentage_rating, "%")
          };
        }

        var locations = provider.Locations;

        if (locations != null) {
          if (locations.length > 0) {
            locLen = locations.length;
          }
        }

        if (provider.MedicalSpecialties != null) {
          if (Object.keys(provider.MedicalSpecialties).length > 0) {
            speLen = Object.keys(provider.MedicalSpecialties).length;
          }
        }

        return React.createElement("li", {
          className: "provider-card"
        }, React.createElement("div", {
          className: "row card-wrapper"
        }, React.createElement("div", {
          className: "profile-wrapper"
        }, provider.ProviderImage ? React.createElement("a", {
          className: "provider-img-url",
          href: provider.ProviderURL
        }, React.createElement("img", {
          className: "provider-img",
          src: provider.ProviderImage,
          alt: provider.DefaultAlternateText
        })) : "", React.createElement("div", {
          className: "main-profile"
        }, React.createElement("span", {
          className: "sees-icon-wrapper " + (provider.KSMedicalGroup ? "active" : "")
        }, provider.KSMedicalGroup ? React.createElement("div", {
          className: "icon-wrapper"
        }, React.createElement("img", {
          src: "../../Images/favicon.png",
          class: "sees-icon",
          onClick: function onClick() {
            return _this124.toggleTooltip(index);
          }
        }), index === _this124.state.tooltipIndex ? React.createElement("div", {
          className: "tooltip " + (_this124.state.tooltipState ? "open" : "")
        }, React.createElement("span", {
          className: "fas fa-times cross-icon",
          onClick: _this124.closeTooltip
        }), React.createElement("p", null, _this124.props.providerTooltipContent), React.createElement("a", {
          href: _this124.props.providerTooltipLink
        }, " ", "Learn More", " "), React.createElement("span", {
          className: "tooltip-pointer"
        }, "Pointer")) : "") : ""), React.createElement("div", {
          className: "provider-name"
        }, React.createElement("h5", null, React.createElement("a", {
          href: provider.ProviderURL
        }, provider.ProviderFirstName, provider.ProviderLastName ? React.createElement("text", null, " ", provider.ProviderLastName) : "", provider.ProviderDegree ? React.createElement("text", null, ", ", provider.ProviderDegree) : ""))), provider.ProviderRatingID && provider.Rating ? React.createElement("p", {
          className: "provider-overall-rating",
          title: "5 stars"
        }, React.createElement("span", {
          className: "rating-value"
        }, provider.Rating.avg_rating), React.createElement("span", {
          className: "stars-outer"
        }, React.createElement("span", {
          className: "stars-inner",
          style: spanstyle
        }))) : "", provider.SearchResultsPageCurrentStatusLabel ? React.createElement("div", {
          className: "align-self-end"
        }, React.createElement("div", {
          className: "current-status-label",
          dangerouslySetInnerHTML: {
            __html: provider.SearchResultsPageCurrentStatusLabel
          }
        })) : "", provider.Distance ? React.createElement("i", {
          className: "miles"
        }, "Closest location ", provider.Distance, " miles away") : "")), React.createElement("div", {
          className: "provider-other-details"
        }, speLen > 0 ? React.createElement("div", {
          className: "full-width"
        }, React.createElement("div", {
          className: "provider-specialty"
        }, speLen > 0 ? Object.keys(provider.MedicalSpecialties).map(function (key, i) {
          if (speLen === i + 1) {
            return React.createElement("a", {
              href: provider.MedicalSpecialties[key]
            }, key);
          } else {
            return React.createElement("a", {
              href: provider.MedicalSpecialties[key]
            }, key, React.createElement("text", null, ", "));
          }
        }) : ""), React.createElement("hr", null)) : "", locations.length > 0 ? React.createElement("div", {
          className: "full-width"
        }, React.createElement("div", {
          className: "provider-location"
        }, React.createElement("p", {
          className: "location-wrapper"
        }, locations.map(function (location, index) {
          if (locLen === index + 1) {
            return React.createElement("a", {
              href: _this124.props.locationSearchPage + "/" + location.Name
            }, location.LocationName);
          } else {
            return React.createElement("a", {
              href: _this124.props.locationSearchPage + "/" + location.Name
            }, location.LocationName, React.createElement("text", null, ", "));
          }
        }))), React.createElement("hr", null)) : React.createElement("div", {
          className: "full-width"
        }, React.createElement("div", {
          className: "provider-location virtual-visits-only"
        }, React.createElement("span", null, "Virtual Visits Only"), React.createElement("hr", null))), React.createElement("div", {
          className: "align-self-end"
        }, React.createElement("div", {
          class: "link button redirect-schedule"
        }, React.createElement("button", null, React.createElement("a", {
          href: "".concat(provider.ProviderURL, "#appointments")
        }, _this124.props.dictionary["Schedule-An-Appointment-Button-Text"]))), React.createElement("div", {
          className: "redirect-profile"
        }, React.createElement("a", {
          href: provider.ProviderURL
        }, _this124.props.dictionary["View-Profile-Text"], " ", React.createElement("i", {
          class: "fa fa-arrow-right"
        })))))));
      })));
    }
  }]);

  return ProviderDetailSearchResults;
}(React.Component);

;

var ProviderPagination =
/*#__PURE__*/
function (_React$Component55) {
  _inherits(ProviderPagination, _React$Component55);

  function ProviderPagination(props) {
    var _this125;

    _classCallCheck(this, ProviderPagination);

    _this125 = _possibleConstructorReturn(this, _getPrototypeOf(ProviderPagination).call(this, props));

    _defineProperty(_assertThisInitialized(_this125), "goToPreviousPage", function (e) {
      e.preventDefault();
      var searchParams = new URLSearchParams(window.location.search);

      if (+searchParams.get("start") < 1) {
        return;
      }

      var updatedPage = +searchParams.get("start") - 1;
      searchParams.set("start", updatedPage);
      window.location.href = "".concat(window.location.pathname, "?").concat(searchParams.toString());
    });

    _defineProperty(_assertThisInitialized(_this125), "goToPage", function (page, e) {
      e.preventDefault();
      var searchParams = new URLSearchParams(window.location.search);

      if (+searchParams.get("start") === page - 1 || isNaN(page)) {
        return;
      }

      searchParams.set("start", page - 1);
      window.location.href = "".concat(window.location.pathname, "?").concat(searchParams.toString());
    });

    _defineProperty(_assertThisInitialized(_this125), "goToNextPage", function (e) {
      e.preventDefault();
      var searchParams = new URLSearchParams(window.location.search);

      if (+searchParams.get("start") > _this125.state.pager.totalPages - 2) {
        return;
      }

      var updatedPage = +searchParams.get("start") + 1;
      searchParams.set("start", updatedPage);
      window.location.href = "".concat(window.location.pathname, "?").concat(searchParams.toString());
    });

    _defineProperty(_assertThisInitialized(_this125), "setPage", function (e) {
      var items = _this125.props.items;

      var pager = _this125.getPager(_this125.props.itemsPerPage);

      var pageOfItems = items.slice(pager.startIndex, pager.endIndex + 1);

      _this125.setState({
        pager: pager
      });

      if (e) {
        _this125.props.onChangePage(pageOfItems);
      }
    });

    _defineProperty(_assertThisInitialized(_this125), "getRange", function (start, end) {
      return Array(end - start + 1).fill().map(function (v, i) {
        return i + start;
      });
    });

    _defineProperty(_assertThisInitialized(_this125), "arrayPagination", function (pageCount) {
      var currentPage = _this125.state.currentPage;
      var currentPageNum = +currentPage + 1;
      var delta;

      if (pageCount <= 7) {
        delta = 7;
      } else {
        delta = currentPageNum > 4 && currentPageNum < pageCount - 3 ? 2 : 4;
      }

      var range = {
        start: Math.round(currentPageNum - delta / 2),
        end: Math.round(currentPageNum + delta / 2)
      };

      if (range.start - 1 === 1 || range.end + 1 === pageCount) {
        range.start += 1;
        range.end += 1;
      }

      var pages = currentPageNum > delta ? _this125.getRange(Math.min(range.start, pageCount - delta), Math.min(range.end, pageCount)) : _this125.getRange(1, Math.min(pageCount, delta + 1));

      var withDots = function withDots(value, pair) {
        return pages.length + 1 !== pageCount ? pair : [value];
      };

      if (pages[0] !== 1) {
        pages = withDots(1, [1, "..."]).concat(pages);
      }

      if (pages[pages.length - 1] < pageCount) {
        pages = pages.concat(withDots(pageCount, ["...", pageCount]));
      }

      return pages;
    });

    _defineProperty(_assertThisInitialized(_this125), "getPager", function (pageSize) {
      var currentPage = _this125.state.currentPage;
      var currentPageNum = +currentPage + 1;
      pageSize = pageSize || 10;
      var totalResults = _this125.props.totalResults;
      var totalPages = Math.ceil(totalResults / pageSize);
      var startPage;
      var endPage;

      if (totalPages <= 10) {
        startPage = 1;
        endPage = totalPages;
      } else {
        if (currentPageNum <= 6) {
          startPage = 1;
          endPage = 10;
        } else if (currentPageNum + 4 >= totalPages) {
          startPage = totalPages - 9;
          endPage = totalPages;
        } else {
          startPage = currentPageNum - 5;
          endPage = currentPageNum + 4;
        }
      }

      var startIndex = (currentPageNum - 1) * pageSize;
      var endIndex = Math.min(startIndex + pageSize - 1, totalResults - 1);
      var pages = totalPages === 0 ? [] : _this125.arrayPagination(totalPages);
      return {
        totalResults: totalResults,
        currentPageNum: currentPageNum,
        pageSize: pageSize,
        totalPages: totalPages,
        startPage: startPage,
        endPage: endPage,
        startIndex: startIndex,
        endIndex: endIndex,
        pages: pages
      };
    });

    _defineProperty(_assertThisInitialized(_this125), "getItemClassName", function (page) {
      if (_this125.state.pager.currentPage === page) {
        return "active";
      } else if (isNaN(page)) {
        return "disabled";
      } else {
        return null;
      }
    });

    _this125.state = {
      pager: {},
      currentPage: 0
    };
    return _this125;
  }

  _createClass(ProviderPagination, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var queryString = window.location.search;

      if (queryString) {
        var searchParams = new URLSearchParams(queryString);
        this.setState({
          currentPage: searchParams.get("start") || 0
        });
      }
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps) {
      if (this.props.items !== prevProps.items) {
        this.setPage();
      }
    } //previous page

  }, {
    key: "render",
    value: function render() {
      var _this126 = this;

      var pager = this.state.pager;

      if (!pager.pages || pager.pages.length <= 1) {
        return null;
      }

      return React.createElement("nav", {
        role: "navigation",
        "aria-label": "Results Pagination Navigation"
      }, React.createElement("ul", {
        className: "pagination"
      }, React.createElement("li", {
        className: "page-selector-item-previous ".concat(+this.state.currentPage <= 0 ? "disabled" : "")
      }, React.createElement("a", {
        onClick: this.goToPreviousPage
      }, React.createElement("i", {
        class: "fa fa-arrow-left"
      }), "Previous")), pager.pages.map(function (page, index) {
        return React.createElement("li", {
          key: index,
          className: "page-selector-item ".concat(pager.currentPageNum === page || isNaN(page) ? "disabled" : "")
        }, React.createElement("a", {
          onClick: function onClick(e) {
            return _this126.goToPage(page, e);
          },
          "aria-label": "Go to page ".concat(page),
          "aria-current": pager.currentPageNum === page ? "true" : null,
          "tab-index": pager.currentPageNum === page ? 0 : -1
        }, page));
      }), React.createElement("li", {
        className: "page-selector-item-next ".concat(+this.state.currentPage >= this.state.pager.totalPages - 1 ? "disabled" : "")
      }, React.createElement("a", {
        onClick: this.goToNextPage
      }, "Next", React.createElement("i", {
        class: "fa fa-arrow-right"
      })))));
    }
  }]);

  return ProviderPagination;
}(React.Component);

;

var ProviderSearchHero =
/*#__PURE__*/
function (_React$Component56) {
  _inherits(ProviderSearchHero, _React$Component56);

  function ProviderSearchHero(props) {
    var _this127;

    _classCallCheck(this, ProviderSearchHero);

    _this127 = _possibleConstructorReturn(this, _getPrototypeOf(ProviderSearchHero).call(this, props));

    _defineProperty(_assertThisInitialized(_this127), "handleSetSearchParamsProvider", function (payload) {
      var target = window.location.origin + "/find-a-houston-doctor?";

      if (payload.zip) {
        target = target.concat("zipCode=" + payload.zip + "&sort=DIST&");
      }

      if (payload.searchTerm != null && payload.searchTerm.trim().length > 0) {
        target = target.concat("Term=" + payload.searchTerm + "&");
      }

      window.location.href = target;
    });

    return _this127;
  }

  _createClass(ProviderSearchHero, [{
    key: "render",
    value: function render() {
      return React.createElement("div", {
        id: "provider-search-hero",
        style: {
          margin: this.props.isEditing ? "120px 0 0 0" : "15px 0 0 0"
        }
      }, React.createElement("div", {
        className: "row outer-container"
      }, React.createElement("div", {
        id: "image-container",
        className: "d-none d-sm-flex col-lg-4"
      }, this.props.data.DictionaryData["DesktopImage"] ? React.createElement("img", {
        src: this.props.data.DictionaryData["DesktopImage"],
        alt: this.props.data.DictionaryData["DesktopImageAlt"]
      }) : React.createElement("h3", {
        style: {
          textAlign: "center"
        }
      }, "Please choose an image.")), React.createElement("div", {
        id: "fad-container",
        className: "col-12 col-lg-8"
      }, React.createElement("div", {
        id: "heading-container",
        dangerouslySetInnerHTML: {
          __html: this.props.data.DictionaryData["Find-a-Doctor-Heading"]
        }
      }), React.createElement("div", {
        id: "provider-detail-search-form-container"
      }, React.createElement(ProviderDetailSearchForm, {
        submitSearchCallback: this.handleSetSearchParamsProvider,
        clearFormCallback: "",
        zipCode: "",
        searchTerm: "",
        sortBy: "",
        apikey: this.props.data.ApiKey,
        commonSearches: this.props.data.ProviderCommonSearches,
        dictionary: this.props.data.DictionaryData
      })), React.createElement("div", {
        id: "extra-content-container",
        className: "d-none d-lg-block",
        dangerouslySetInnerHTML: {
          __html: this.props.data.DictionaryData["Extra-Rich-Text-Content"]
        }
      })), React.createElement("div", {
        id: "customSpinner",
        className: "custom-spinner-container"
      }, React.createElement("div", null, React.createElement("svg", {
        id: "spinner",
        xmlns: "http://www.w3.org/2000/svg",
        viewBox: "0 0 512 512"
      }, React.createElement("path", {
        d: "M256 116a52 52 0 1 1 0-104 52 52 0 1 1 0 104zm0 364a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM448 288a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm399.4-96.2A56 56 0 1 1 352.2 80.6a56 56 0 1 1 79.2 79.2zM97.6 414.4a32 32 0 1 1 45.3-45.3A32 32 0 1 1 97.6 414.4zm271.5 0a32 32 0 1 1 45.3-45.3 32 32 0 1 1 -45.3 45.3zM86.3 86.3a48 48 0 1 1 67.9 67.9A48 48 0 1 1 86.3 86.3z"
      }))))), React.createElement("div", {
        id: "extra-content-container-mobile",
        className: "d-block d-lg-none",
        dangerouslySetInnerHTML: {
          __html: this.props.data.DictionaryData["Extra-Rich-Text-Content"]
        }
      }));
    }
  }]);

  return ProviderSearchHero;
}(React.Component);

;

var CovidAppointment =
/*#__PURE__*/
function (_React$Component57) {
  _inherits(CovidAppointment, _React$Component57);

  function CovidAppointment(props) {
    var _this128;

    _classCallCheck(this, CovidAppointment);

    _this128 = _possibleConstructorReturn(this, _getPrototypeOf(CovidAppointment).call(this, props));
    _this128.state = {
      inputDate: "",
      showModalMyChart: false,
      showModalCovidMessage: false,
      payload: {}
    };
    _this128._address = React.createRef();
    _this128.changeDateValue = _this128.changeDateValue.bind(_assertThisInitialized(_this128));
    _this128.checkEnter = _this128.checkEnter.bind(_assertThisInitialized(_this128));
    _this128.handleButton = _this128.handleButton.bind(_assertThisInitialized(_this128));
    _this128.handleSetSearchParamsLocation = _this128.handleSetSearchParamsLocation.bind(_assertThisInitialized(_this128));
    _this128.handleModalResult = _this128.handleModalResult.bind(_assertThisInitialized(_this128));
    _this128.handleClose = _this128.handleClose.bind(_assertThisInitialized(_this128));
    return _this128;
  }

  _createClass(CovidAppointment, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var params = new URLSearchParams(window.location.search);
      var date = params.get("date");
      this.setState({
        inputDate: date
      });

      if (this.props.data.ShowPopup) {
        if (this.props.data.DeptID.trim()) {
          if (this.props.data.CovidMessageCheckbox) {
            this.setState({
              showModalCovidMessage: true
            });
          } else {
            this.setState({
              showModalMyChart: true,
              showModalCovidMessage: false
            });
          }
        }
      }
    }
  }, {
    key: "changeDateValue",
    value: function changeDateValue(e) {
      this.setState({
        inputDate: e.target.value
      });
    }
  }, {
    key: "checkEnter",
    value: function checkEnter(e) {
      if (e.key === "Enter") {
        this.handleButton();
      }
    }
  }, {
    key: "handleButton",
    value: function handleButton() {
      var date = this._address.current.value;
      var payload = {
        Date: date
      };
      this.handleSetSearchParamsLocation(payload);
    }
  }, {
    key: "handleSetSearchParamsLocation",
    value: function handleSetSearchParamsLocation(payload) {
      var target = "";
      this.setState({
        payload: payload
      }, function () {
        if (window.location.href.substr(0, window.location.href.indexOf("?"))) {
          target = window.location.href.substr(0, window.location.href.indexOf("?") + 1);
        } else {
          target = window.location.href + "?";
        }

        if (payload.Date) {
          target = target.concat("date=" + payload.Date + "&");
        }

        window.location.href = target;
      });
    }
  }, {
    key: "handleClose",
    value: function handleClose() {
      this.setState({
        showModalMyChart: false,
        showModalCovidMessage: false
      });
    }
  }, {
    key: "handleModalResult",
    value: function handleModalResult() {
      this.setState({
        showModalMyChart: true,
        showModalCovidMessage: false
      });
    }
  }, {
    key: "render",
    value: function render() {
      if (this.props.isEditing) {
        return React.createElement("div", null, React.createElement("p", null, "Key Task Zipcode Search is not available in Editing or Preview mode."));
      } else {
        return React.createElement("div", {
          class: "block-wrapper covid-appointment-wrapper"
        }, React.createElement("div", {
          class: "radio-and-appointment-section"
        }, React.createElement("div", {
          class: "radio-wrapper"
        }, React.createElement("input", {
          type: "radio",
          id: "r-inperson",
          checked: true
        }), React.createElement("label", {
          for: "r-covid",
          class: "radio-label"
        }, this.props.data.RadioButtonLabel)), React.createElement("div", {
          class: "appointment-section"
        }, React.createElement("div", {
          class: "zipcode-wrapper"
        }, React.createElement("input", {
          ref: this._address,
          type: "text",
          class: "search-box-input",
          name: "date",
          id: "keyzipcode",
          placeholder: this.props.data.DictionaryData["covid-appointment-field-hint-text"],
          onChange: this.changeDateValue,
          onKeyUp: this.checkEnter,
          value: this.state.inputDate ? this.state.inputDate : null
        })), React.createElement("div", {
          class: "link button zipcode-button"
        }, React.createElement("button", {
          class: "search-box-button",
          onClick: this.handleButton
        }, React.createElement("a", null, this.props.data.DictionaryData["physical-search-button-label"]))))), this.props.data.ShowMsg && this.props.data.AgeRestrictionMessage && React.createElement("span", {
          class: "error-msg"
        }, this.props.data.AgeRestrictionMessage), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalCovidMessage ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "modal-body"
        }, React.createElement("div", {
          id: "modal-question",
          class: "modal-question"
        }, React.createElement("h4", {
          class: "modal-heading"
        }, this.props.data.DictionaryData["vaccination-popup-heading"]), React.createElement("div", {
          class: "modal-description-wrapper rich-text",
          dangerouslySetInnerHTML: {
            __html: this.props.data.CovidMessage
          }
        }), React.createElement("div", {
          class: "modal-button-container"
        }, React.createElement("input", {
          type: "button",
          value: this.props.data.DictionaryData["popup-button-label"],
          onClick: this.handleModalResult
        }))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalMyChart ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "result-modal-body"
        }, React.createElement("h4", {
          class: "result-modal-heading"
        }, React.createElement("span", null, this.props.data.DictionaryData["vaccination-result-modal-heading"]), React.createElement("input", {
          type: "button",
          value: "X",
          onClick: this.handleClose
        })), React.createElement("div", {
          class: "results-modal-iframe-container"
        }, React.createElement("iframe", {
          id: "epicproviders",
          class: "results-modal-iframe",
          scrolling: "yes",
          src: "".concat(this.props.data.MyChart, "/mychart/openscheduling/embedded?apikey=").concat(this.props.data.ApiKey, "&widgetid=MyChartIframe0&dept=").concat(this.props.data.DeptID, "&vt=").concat(this.props.data.VisitType),
          style: {
            width: "100%",
            height: "500px"
          }
        })))));
      }
    }
  }]);

  return CovidAppointment;
}(React.Component);

;

var PhysicalAppointment =
/*#__PURE__*/
function (_React$Component58) {
  _inherits(PhysicalAppointment, _React$Component58);

  function PhysicalAppointment(props) {
    var _this129;

    _classCallCheck(this, PhysicalAppointment);

    _this129 = _possibleConstructorReturn(this, _getPrototypeOf(PhysicalAppointment).call(this, props));
    var zip = "";
    var dropdown = "";

    if (_this129.props.data.ZipCode != null) {
      zip = _this129.props.data.ZipCode;
    }

    if (_this129.props.data.DropdownOption != null) {
      dropdown = _this129.props.data.DropdownOption;
    }

    if (_this129.props.data.Physical.length > 0 && _this129.props.data.DropdownOption == null) {
      dropdown = _this129.props.data.Physical[0].VisitTypeId;
    }

    _this129.state = {
      Zipcode: zip,
      dropdownOption: dropdown,
      payload: {},
      showModalQuestionPhysical: false,
      showModalDisclaimerPhysical: false,
      showModalResultPhysical: false
    };
    _this129._address = React.createRef();
    _this129.changeZipValue = _this129.changeZipValue.bind(_assertThisInitialized(_this129));
    _this129.checkEnter = _this129.checkEnter.bind(_assertThisInitialized(_this129));
    _this129.handleSetSearchParamsLocation = _this129.handleSetSearchParamsLocation.bind(_assertThisInitialized(_this129));
    _this129.handleButton = _this129.handleButton.bind(_assertThisInitialized(_this129));
    _this129.handleModelDisclaimer = _this129.handleModelDisclaimer.bind(_assertThisInitialized(_this129));
    _this129.handleClose = _this129.handleClose.bind(_assertThisInitialized(_this129));
    _this129.handleModalResult = _this129.handleModalResult.bind(_assertThisInitialized(_this129));
    _this129.handleChange = _this129.handleChange.bind(_assertThisInitialized(_this129));
    return _this129;
  }

  _createClass(PhysicalAppointment, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this130 = this;

      var locationHref = window.location.href.substr(window.location.href.indexOf("?") + 1, window.location.href.length).split("&");
      locationHref.map(function (locTerms) {
        var terms = locTerms.split("=");

        if (terms.length == 2) {
          if (terms[0] == "dropdownoption") {
            _this130.setState({
              dropdownOption: terms[1]
            });
          }
        }
      });

      if (this.props.data.DeptID.trim()) {
        if (this.props.data.Physical.length > 0) {
          if (this.props.data.CovidPhysical) {
            this.setState({
              showModalQuestionPhysical: true
            });
          } else {
            this.setState({
              showModalResultPhysical: true,
              showModalQuestionPhysical: false
            });
          }
        }
      }

      var HereClick = document.getElementById("hereclickphysical");

      if (HereClick != null) {
        HereClick.addEventListener("click", function () {
          this.handleModalResult();
        }.bind(this));
      }

      if (localStorage.StoredZip != null || localStorage.StoredZip != undefined) document.getElementsById("keyzipcode").value = localStorage.StoredZip;
    }
  }, {
    key: "handleChange",
    value: function handleChange(e) {
      this.setState({
        dropdownOption: e.target.value
      });
    }
  }, {
    key: "changeZipValue",
    value: function changeZipValue(e) {
      this.setState({
        Zipcode: e.target.value
      });
    }
  }, {
    key: "checkEnter",
    value: function checkEnter(e) {
      if (e.key === "Enter") {
        this.handleButton();
      }
    }
  }, {
    key: "handleButton",
    value: function handleButton() {
      var address = this._address.current.value;
      var payload = {
        zip: address,
        dropdownoption: this.state.dropdownOption
      };
      this.handleSetSearchParamsLocation(payload);
    }
  }, {
    key: "handleSetSearchParamsLocation",
    value: function handleSetSearchParamsLocation(payload) {
      var target = "";
      this.setState({
        payload: payload
      }, function () {
        if (window.location.href.substr(0, window.location.href.indexOf("?"))) {
          target = window.location.href.substr(0, window.location.href.indexOf("?") + 1);
        } else {
          target = window.location.href + "?";
        }

        if (payload.zip) {
          target = target.concat("zipcode=" + payload.zip + "&");
        }

        if (payload.dropdownoption) {
          target = target.concat("dropdownoption=" + payload.dropdownoption + "&");
        }

        window.location.href = target;
      });
    }
  }, {
    key: "handleModelDisclaimer",
    value: function handleModelDisclaimer() {
      this.setState({
        showModalQuestionPhysical: false,
        showModalDisclaimerPhysical: true
      });
    }
  }, {
    key: "handleClose",
    value: function handleClose() {
      this.setState({
        showModalDisclaimerPhysical: false,
        showModalResultPhysical: false
      });
    }
  }, {
    key: "handleModalResult",
    value: function handleModalResult() {
      this.setState({
        showModalQuestionPhysical: false,
        showModalResultPhysical: true
      });
    }
  }, {
    key: "render",
    value: function render() {
      if (this.props.isEditing) {
        return React.createElement("div", null, React.createElement("p", null, "Key Task Zipcode Search is not available in Editing or Preview mode."));
      } else {
        var PhysicalDropdown = this.props.data.Physical;
        return React.createElement("div", {
          class: "block-wrapper"
        }, React.createElement("div", {
          class: "radio-and-appointment-section"
        }, React.createElement("div", {
          class: "radio-wrapper"
        }, React.createElement("input", {
          type: "radio",
          id: "r-inperson",
          checked: true
        }), React.createElement("label", {
          for: "r-inperson",
          class: "radio-label"
        }, this.props.data.RadioButtonLabel)), React.createElement("div", {
          class: "appointment-section"
        }, React.createElement("div", {
          class: "zipcode-wrapper"
        }, React.createElement("span", {
          class: "select-type",
          value: this.state.dropdownOption
        }, PhysicalDropdown ? React.createElement("select", {
          onChange: this.handleChange
        }, PhysicalDropdown.map(function (Inpersons) {
          return React.createElement("option", {
            value: Inpersons.VisitTypeId
          }, Inpersons.VisitTypeValue);
        })) : "", React.createElement("i", {
          class: "fa fa-chevron-down"
        })), React.createElement("input", {
          ref: this._address,
          type: "text",
          class: "search-box-input",
          name: "zipcode",
          id: "keyzipcode",
          placeholder: this.props.data.DictionaryData["Enter-Zip-Code-field-hint-text"],
          onChange: this.changeZipValue,
          onKeyUp: this.checkEnter,
          value: this.state.Zipcode ? this.state.Zipcode : null
        })), React.createElement("div", {
          class: "link button zipcode-button"
        }, React.createElement("button", {
          class: "search-box-button",
          onClick: this.handleButton
        }, React.createElement("a", null, this.props.data.DictionaryData["physical-search-button-label"]))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalQuestionPhysical ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "modal-body"
        }, React.createElement("div", {
          id: "modal-question",
          class: "modal-question"
        }, React.createElement("h4", {
          class: "modal-heading"
        }, this.props.data.DictionaryData["Covid-19-popup-Heading"]), React.createElement("div", {
          className: "rich-text",
          dangerouslySetInnerHTML: {
            __html: this.props.data.CovidMessage
          }
        }), React.createElement("div", {
          class: "modal-button-container"
        }, React.createElement("input", {
          type: "button",
          value: "Yes",
          onClick: this.handleModelDisclaimer
        }), React.createElement("input", {
          type: "button",
          value: "No",
          onClick: this.handleModalResult
        }))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalDisclaimerPhysical ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "modal-body"
        }, React.createElement("div", {
          class: "modal-disclaimer"
        }, React.createElement("h4", {
          class: "modal-heading"
        }, this.props.data.DictionaryData["Additional-Message-Popup-Heading"]), React.createElement("div", {
          className: "rich-text",
          dangerouslySetInnerHTML: {
            __html: this.props.data.AdditionalMessage
          }
        }), React.createElement("div", {
          class: "modal-button-container"
        }, React.createElement("input", {
          type: "button",
          value: "Close",
          onClick: this.handleClose
        }))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalResultPhysical ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "result-modal-body"
        }, React.createElement("h4", {
          class: "result-modal-heading"
        }, React.createElement("span", null, this.props.data.DictionaryData["Result-Modal-Heading"]), React.createElement("input", {
          type: "button",
          value: "X",
          onClick: this.handleClose
        })), React.createElement("div", {
          class: "results-modal-iframe-container"
        }, React.createElement("iframe", {
          id: "epicproviders",
          class: "results-modal-iframe",
          scrolling: "yes",
          src: "".concat(this.props.data.MyChart, "/mychart/openscheduling/embedded?apikey=").concat(this.props.data.ApiKey, "&widgetid=MyChartIframe0&dept=").concat(this.props.data.DeptID, "&vt=").concat(this.state.dropdownOption),
          style: {
            width: "100%",
            height: "500px"
          }
        })))));
      }
    }
  }]);

  return PhysicalAppointment;
}(React.Component);

;

var ScheduleAppointment =
/*#__PURE__*/
function (_React$Component59) {
  _inherits(ScheduleAppointment, _React$Component59);

  function ScheduleAppointment(props) {
    var _this131;

    _classCallCheck(this, ScheduleAppointment);

    _this131 = _possibleConstructorReturn(this, _getPrototypeOf(ScheduleAppointment).call(this, props));
    var visitTypeDropdown = [];
    _this131.state = {
      visitTypeDropdown: visitTypeDropdown,
      languagesDropdown: _this131.props.data.providerLanguages,
      showModalQuestion: false,
      showModalDisclaimer: false,
      showModalResult: false,
      showModalSpecialityInfo: false,
      showModalVisittypeInfo: false,
      validSpeciality: true,
      validVisitType: true,
      optionSpeciality: "0",
      valueSpeciality: "",
      optionVisitType: "0",
      valueVisitType: "0",
      optionLocation: "",
      valueLocation: "0",
      optionLanguage: "0",
      myChartUrl: ""
    };
    _this131._address = React.createRef();
    _this131._model = React.createRef();
    _this131.handleChangeSpecialities = _this131.handleChangeSpecialities.bind(_assertThisInitialized(_this131));
    _this131.handleChangeVisitTypes = _this131.handleChangeVisitTypes.bind(_assertThisInitialized(_this131));
    _this131.handleChangeLocations = _this131.handleChangeLocations.bind(_assertThisInitialized(_this131));
    _this131.handleChangeLanguages = _this131.handleChangeLanguages.bind(_assertThisInitialized(_this131));
    _this131.handleButton = _this131.handleButton.bind(_assertThisInitialized(_this131));
    _this131.handleVisitTypeInfo = _this131.handleVisitTypeInfo.bind(_assertThisInitialized(_this131));
    _this131.handleSpecialityInfo = _this131.handleSpecialityInfo.bind(_assertThisInitialized(_this131));
    _this131.handleModelDisclaimer = _this131.handleModelDisclaimer.bind(_assertThisInitialized(_this131));
    _this131.handleClose = _this131.handleClose.bind(_assertThisInitialized(_this131));
    _this131.handleModalResult = _this131.handleModalResult.bind(_assertThisInitialized(_this131));
    _this131.handleSetSearchParamsLocation = _this131.handleSetSearchParamsLocation.bind(_assertThisInitialized(_this131));
    _this131.checkEnter = _this131.checkEnter.bind(_assertThisInitialized(_this131));
    _this131.onErrorShowDivRef = React.createRef();
    return _this131;
  }

  _createClass(ScheduleAppointment, [{
    key: "handleChangeSpecialities",
    value: function handleChangeSpecialities(e) {
      this.setState({
        visitTypeDropdown: e.target.value != "0" ? this.props.data.specialities[e.target.options[e.target.selectedIndex].dataset.target - 1].visitTypes : null,
        optionSpeciality: e.target.value,
        valueSpeciality: e.target.options[e.target.selectedIndex].dataset.target,
        optionVisitType: "0"
      });
    }
  }, {
    key: "handleChangeVisitTypes",
    value: function handleChangeVisitTypes(e) {
      localStorage.setItem("optionVisitType", e.target.value);
      this.setState({
        optionVisitType: e.target.value,
        valueVisitType: e.target.options[e.target.selectedIndex].dataset.target
      });
    }
  }, {
    key: "handleChangeLocations",
    value: function handleChangeLocations(e) {
      localStorage.setItem("optionLocation", e.target.options[e.target.selectedIndex].dataset.target);
      this.setState({
        optionLocation: e.target.options[e.target.selectedIndex].dataset.target,
        valueLocation: e.target.value
      });
    }
  }, {
    key: "handleChangeLanguages",
    value: function handleChangeLanguages(e) {
      this.setState({
        optionLanguage: e.target.value
      });
    }
  }, {
    key: "handleButton",
    value: function handleButton() {
      this.setState({
        validSpeciality: true,
        validVisitType: true
      });

      if (this.state.optionSpeciality == "0") {
        this.setState({
          validSpeciality: false,
          validVisitType: true
        });
        this.onErrorShowDivRef.current.scrollIntoView({
          behavior: "smooth",
          block: "center"
        });
      } else if (this.state.optionVisitType == "0") {
        this.setState({
          validSpeciality: true,
          validVisitType: false
        });
        this.onErrorShowDivRef.current.scrollIntoView({
          behavior: "smooth",
          block: "center"
        });
      } else if (this.props.data.showCovidMessage) {
        this.setState({
          showModalQuestion: true
        });
      } else {
        this.handleSetSearchParamsLocation();
      }
    }
  }, {
    key: "checkEnter",
    value: function checkEnter(e) {
      if (e.key === "Enter") {
        this.handleButton();
      }
    }
  }, {
    key: "handleVisitTypeInfo",
    value: function handleVisitTypeInfo() {
      this.setState({
        showModalSpecialityInfo: false,
        showModalVisittypeInfo: true
      });
    }
  }, {
    key: "handleSpecialityInfo",
    value: function handleSpecialityInfo() {
      this.setState({
        showModalVisittypeInfo: false,
        showModalSpecialityInfo: true
      });
    }
  }, {
    key: "handleModelDisclaimer",
    value: function handleModelDisclaimer(e) {
      this.setState({
        showModalQuestion: false,
        showModalDisclaimer: true
      });
    }
  }, {
    key: "handleClose",
    value: function handleClose() {
      this.setState({
        showModalDisclaimer: false,
        showModalResult: false,
        showModalSpecialityInfo: false,
        showModalVisittypeInfo: false
      });
    }
  }, {
    key: "handleModalResult",
    value: function handleModalResult() {
      this.setState({
        showModalQuestion: false
      });
      this.handleSetSearchParamsLocation();
    }
  }, {
    key: "handleSetSearchParamsLocation",
    value: function handleSetSearchParamsLocation() {
      var target = "";

      if (window.location.href.substr(0, window.location.href.indexOf("?"))) {
        target = window.location.href.substr(0, window.location.href.indexOf("?") + 1);
      } else {
        target = window.location.href + "?";
      }

      if (this.state.valueLocation != "0" && this.state.optionLanguage == "0") {
        //....code for location
        this.setState({
          showModalResult: true,
          myChartUrl: "".concat(this.props.data.myChartUrl, "/mychart/openscheduling/embedded?apikey=").concat(this.props.data.ApiKey, "&widgetid=MyChartIframe0&dept=").concat(this.state.optionLocation, "&vt=").concat(this.state.valueVisitType)
        });
      } else if (this.state.optionLanguage != "0") {
        //....code for language
        target = target.concat("speciality=".concat(this.state.optionSpeciality, "&visittype=").concat(this.state.valueVisitType, "&location=").concat(this.state.valueLocation == "0" ? "" : this.state.valueLocation, "&language=").concat(this.state.optionLanguage));
        window.location.href = target;
      } else {
        target = target.concat("speciality=".concat(this.state.optionSpeciality, "&visittype=").concat(this.state.valueVisitType));
        window.location.href = target;
      }
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      document.addEventListener("keydown", this.checkEnter);
      var params = new URLSearchParams(window.location.search);

      if (params.get("language") != null) {
        this.setState({
          optionVisitType: localStorage.getItem("optionVisitType"),
          optionSpeciality: params.get("speciality"),
          valueLocation: params.get("location"),
          optionLanguage: params.get("language"),
          optionLocation: localStorage.getItem("optionLocation"),
          valueVisitType: params.get("visittype"),
          myChartUrl: "".concat(this.props.data.myChartUrl, "/mychart/openscheduling/embedded?apikey=").concat(this.props.data.ApiKey, "&widgetid=MyChartIframe0&id=").concat(this.props.data.providerIds, "&vt=").concat(params.get("visittype")),
          showModalResult: true
        });

        for (var i = 0; i < this.props.data.specialities.length; i++) {
          if (this.props.data.specialities[i].Specialty == params.get("speciality")) {
            this.setState({
              visitTypeDropdown: this.props.data.specialities[i].visitTypes
            });
          }
        }
      } else if (params.get("visittype") != null) {
        this.setState({
          optionVisitType: localStorage.getItem("optionVisitType"),
          optionSpeciality: params.get("speciality"),
          optionLocation: localStorage.getItem("optionLocation"),
          valueVisitType: params.get("visittype"),
          myChartUrl: "".concat(this.props.data.myChartUrl, "/mychart/openscheduling/embedded?apikey=").concat(this.props.data.ApiKey, "&widgetid=MyChartIframe0&dept=").concat(this.props.data.deptIds, "&vt=").concat(params.get("visittype")),
          showModalResult: true
        });

        for (var i = 0; i < this.props.data.specialities.length; i++) {
          if (this.props.data.specialities[i].Specialty == params.get("speciality")) {
            this.setState({
              visitTypeDropdown: this.props.data.specialities[i].visitTypes
            });
          }
        }
      }

      var HereClick = document.getElementById("hereclick");

      if (HereClick != null) {
        HereClick.addEventListener("click", function () {
          this.handleSetSearchParamsLocation();
        }.bind(this));
      }
    }
  }, {
    key: "render",
    value: function render() {
      if (this.props.isEditing) {
        return React.createElement("div", null, React.createElement("p", null, "Schedule appointment component is not available in Editing or Preview mode."));
      } else {
        var specialitiesDropdown = this.props.data.specialities;
        var locationsDropdown = this.props.data.locations;
        var providerLanguagesDropdown = this.props.data.providerLanguages;
        var i = 0;
        return React.createElement(React.Fragment, null, React.createElement("div", {
          class: "block-wrapper schedule-appointment-now",
          ref: this.onErrorShowDivRef
        }, React.createElement("div", {
          class: "appointment-section"
        }, React.createElement("div", {
          class: "search-options",
          id: "searchRequired"
        }, React.createElement("div", {
          class: "search-option-heading",
          dangerouslySetInnerHTML: {
            __html: this.props.data.searchOptionsHeader
          }
        }), React.createElement("div", {
          class: "row"
        }, React.createElement("div", {
          class: "search-section-wrapper col-md-6 row"
        }, React.createElement("div", {
          className: "col-md-5 label-wrapper"
        }, React.createElement("div", null, React.createElement("label", null, this.props.data.dictionaryData["Select-a-Specialty-Label"], ":"), React.createElement("span", {
          className: "help"
        }, React.createElement("i", {
          onClick: this.handleSpecialityInfo,
          class: "fa fa-question-circle",
          "aria-hidden": "true"
        })))), React.createElement("span", {
          class: "dropdown col-md-7",
          value: "Specialities"
        }, React.createElement("select", {
          onChange: this.handleChangeSpecialities,
          value: this.state.optionSpeciality
        }, React.createElement("option", {
          value: "0"
        }), specialitiesDropdown ? specialitiesDropdown.map(function (specialities) {
          i = i + 1;
          return React.createElement("option", {
            "data-target": i,
            value: specialities.Specialty
          }, specialities.Specialty);
        }) : ""), React.createElement("i", {
          class: "fa fa-chevron-down"
        }), React.createElement("span", {
          id: "validation",
          className: "validation-error-mobile"
        }, this.state.validSpeciality ? "" : this.props.data.dictionaryData["Specialty-Field-Required-Message"]))), React.createElement("div", {
          class: "search-section-wrapper wrapper2 col-md-6 row"
        }, React.createElement("div", {
          className: "col-md-5 label-wrapper"
        }, React.createElement("div", null, React.createElement("label", null, this.props.data.dictionaryData["Visit-Type-Label"], ":"), React.createElement("span", {
          className: "help"
        }, React.createElement("i", {
          onClick: this.handleVisitTypeInfo,
          class: "fa fa-question-circle",
          "aria-hidden": "true"
        })))), React.createElement("span", {
          class: "dropdown col-md-7",
          value: "visit"
        }, React.createElement("select", {
          onChange: this.handleChangeVisitTypes,
          value: this.state.optionVisitType
        }, React.createElement("option", {
          value: "0"
        }), this.state.visitTypeDropdown ? this.state.visitTypeDropdown.map(function (visitTypes) {
          return React.createElement("option", {
            "data-target": visitTypes.VisitTypeId,
            value: visitTypes.VisitTypeValue
          }, visitTypes.VisitTypeValue);
        }) : ""), React.createElement("i", {
          class: "fa fa-chevron-down"
        }), React.createElement("span", {
          id: "validation",
          className: "validation-error-mobile"
        }, this.state.validVisitType ? "" : this.props.data.dictionaryData["Visit-Type-Field-Required-Message"])))), React.createElement("div", {
          className: "row validation-error-desktop"
        }, React.createElement("div", {
          className: "col-md-6 row"
        }, React.createElement("div", {
          className: "col-md-5 empty"
        }), React.createElement("div", {
          className: "col-md-7 error"
        }, React.createElement("span", {
          id: "validation"
        }, this.state.validSpeciality ? "" : this.props.data.dictionaryData["Specialty-Field-Required-Message"]))), React.createElement("div", {
          className: "col-md-6 row visit-type"
        }, React.createElement("div", {
          className: "col-md-5 empty"
        }), React.createElement("div", {
          className: "col-md-7 error"
        }, React.createElement("span", {
          id: "validation"
        }, this.state.validVisitType ? "" : this.props.data.dictionaryData["Visit-Type-Field-Required-Message"]))))), React.createElement("div", {
          class: "advance-search"
        }, React.createElement("div", {
          class: "advance-search-heading",
          dangerouslySetInnerHTML: {
            __html: this.props.data.advanceSearchOptionsHeader
          }
        }), React.createElement("div", {
          class: "row"
        }, React.createElement("div", {
          class: "col-md-6 advance-search-wrapper row"
        }, React.createElement("label", {
          class: "col-md-5"
        }, this.props.data.dictionaryData["Select-a-Location-Label"], ":"), React.createElement("span", {
          class: "dropdown col-md-7",
          value: "location"
        }, React.createElement("select", {
          onChange: this.handleChangeLocations,
          value: this.state.valueLocation
        }, React.createElement("option", {
          value: "0"
        }), locationsDropdown ? locationsDropdown.map(function (locations) {
          return React.createElement("option", {
            "data-target": locations.ID,
            value: locations.Name
          }, locations.Name);
        }) : ""), React.createElement("i", {
          class: "fa fa-chevron-down"
        }))), React.createElement("div", {
          class: "dropdown advance-search-wrapper wrapper2 col-md-6 row"
        }, React.createElement("label", {
          class: "col-md-5"
        }, this.props.data.dictionaryData["Provider-Language-Label"], ":"), React.createElement("span", {
          class: "col-md-7 dropdown"
        }, React.createElement("select", {
          onChange: this.handleChangeLanguages,
          value: this.state.optionLanguage
        }, React.createElement("option", {
          value: "0"
        }), providerLanguagesDropdown ? providerLanguagesDropdown.map(function (languages) {
          return React.createElement("option", {
            value: languages
          }, languages);
        }) : ""), React.createElement("i", {
          class: "fa fa-chevron-down"
        }))))), React.createElement("div", {
          className: "desclaimer",
          dangerouslySetInnerHTML: {
            __html: this.props.data.disclaimer
          }
        }), React.createElement("div", {
          class: "link button"
        }, React.createElement("button", {
          class: "search-box-button",
          onKeyUp: this.checkEnter,
          onClick: this.handleButton
        }, React.createElement("a", null, this.props.data.dictionaryData["Search-Button-Label"])))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalQuestion ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "modal-body"
        }, React.createElement("div", {
          id: "modal-question",
          class: "modal-question"
        }, React.createElement("h4", {
          class: "modal-heading"
        }, this.props.data.dictionaryData["Covid-19-Popup-Heading"]), React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.covidMessage
          }
        }), React.createElement("div", {
          class: "modal-button-container"
        }, React.createElement("input", {
          type: "button",
          value: "Yes",
          onClick: this.handleModelDisclaimer
        }), React.createElement("input", {
          type: "button",
          value: "No",
          onClick: this.handleModalResult
        }))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalDisclaimer ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "modal-body"
        }, React.createElement("div", {
          class: "modal-disclaimer"
        }, React.createElement("h4", {
          class: "modal-heading"
        }, this.props.data.dictionaryData["Additional-Message-Popup-Heading"]), React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.additionalMessage
          }
        }), React.createElement("div", {
          class: "modal-button-container"
        }, React.createElement("input", {
          type: "button",
          value: "Close",
          onClick: this.handleClose
        }))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalResult ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "result-modal-body",
          style: {
            overflow: "hidden"
          }
        }, React.createElement("h4", {
          class: "result-modal-heading"
        }, React.createElement("span", null, this.props.data.dictionaryData["Result-Modal-Heading"]), React.createElement("input", {
          type: "button",
          value: "X",
          onClick: this.handleClose
        })), React.createElement("div", {
          class: "results-modal-iframe-container",
          style: {
            height: "100%"
          }
        }, React.createElement("iframe", {
          id: "epicproviders",
          class: "results-modal-iframe",
          scrolling: "yes",
          src: this.state.myChartUrl
        })))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalSpecialityInfo ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "modal-body speciality-info"
        }, React.createElement("div", {
          class: "modal-question"
        }, React.createElement("h4", {
          class: "modal-heading"
        }, React.createElement("span", null, this.props.data.dictionaryData["Speciality-Info-Heading"]), React.createElement("input", {
          class: "cross-block",
          type: "button",
          value: "X",
          onClick: this.handleClose
        })), React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.specialityInfo
          }
        }), React.createElement("div", {
          class: "modal-button-container"
        }, React.createElement("input", {
          type: "button",
          value: "OK",
          onClick: this.handleClose
        }))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalVisittypeInfo ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "modal-body visit-type-info"
        }, React.createElement("div", {
          class: "modal-question"
        }, React.createElement("h4", {
          class: "modal-heading"
        }, React.createElement("span", null, this.props.data.dictionaryData["Visit-Type-Info-Heading"]), React.createElement("input", {
          class: "cross-block",
          type: "button",
          value: "X",
          onClick: this.handleClose
        })), React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.visitTypeInfo
          }
        }), React.createElement("div", {
          class: "modal-button-container"
        }, React.createElement("input", {
          type: "button",
          value: "OK",
          onClick: this.handleClose
        })))))));
      }
    }
  }]);

  return ScheduleAppointment;
}(React.Component);

;

var KeyTaskBoxZip =
/*#__PURE__*/
function (_React$Component60) {
  _inherits(KeyTaskBoxZip, _React$Component60);

  function KeyTaskBoxZip(props) {
    var _this132;

    _classCallCheck(this, KeyTaskBoxZip);

    _this132 = _possibleConstructorReturn(this, _getPrototypeOf(KeyTaskBoxZip).call(this, props));
    var zip = "";
    var option = "InPerson";
    var dropdown = "";

    if (_this132.props.data.ZipCode != null) {
      zip = _this132.props.data.ZipCode;
    }

    if (_this132.props.data.SelectOption != null) {
      option = _this132.props.data.SelectOption;
    }

    if (_this132.props.data.InPerson.length > 0) {
      dropdown = _this132.props.data.InPerson[0].VisitTypeId;
    }

    _this132.state = {
      SADTIframe: "",
      selectedOption: option,
      dropdownOption: dropdown,
      payload: {},
      showModalQuestion: false,
      showModalDisclaimer: false,
      showModalResult: false,
      zipcode: zip,
      campaignValue: null,
      showZipcodeWarning: "",
      dataUrl: _this132.props.data.MyChart + "/mychart",
      dataApiKey: _this132.props.data.ApiKey,
      dataWidgetType: "OpenScheduling",
      dataAdditionalparamsDept: "",
      dataAdditionalparamsId: "",
      dataAdditionalparamsVt: "",
      dataAdditionalparamsPassthroughparamsLinksource: ""
    };
    _this132.selectedOptionValue = React.createRef();
    _this132.selectedOptionValue = _this132.props.data.SelectOption == "InPerson" ? 166 : 591;
    _this132._address = React.createRef();
    _this132._model = React.createRef();
    _this132.onValueChange = _this132.onValueChange.bind(_assertThisInitialized(_this132));
    _this132.handleChange = _this132.handleChange.bind(_assertThisInitialized(_this132));
    _this132.handleButton = _this132.handleButton.bind(_assertThisInitialized(_this132));
    _this132.handleModelDisclaimer = _this132.handleModelDisclaimer.bind(_assertThisInitialized(_this132));
    _this132.handleClose = _this132.handleClose.bind(_assertThisInitialized(_this132));
    _this132.handleModalResult = _this132.handleModalResult.bind(_assertThisInitialized(_this132));
    _this132.handleSetSearchParamsLocation = _this132.handleSetSearchParamsLocation.bind(_assertThisInitialized(_this132));
    _this132.handleValidateZipCode = _this132.handleValidateZipCode.bind(_assertThisInitialized(_this132));
    _this132.checkEnter = _this132.checkEnter.bind(_assertThisInitialized(_this132));
    _this132.setIframeUrlDepartments = _this132.setIframeUrlDepartments.bind(_assertThisInitialized(_this132));
    _this132.handleViewAllLocations = _this132.handleViewAllLocations.bind(_assertThisInitialized(_this132));
    _this132.setSADTIframeUrl = _this132.setSADTIframeUrl.bind(_assertThisInitialized(_this132));
    _this132.setCampaignValue = _this132.setCampaignValue.bind(_assertThisInitialized(_this132));
    _this132.handleUsaZipCode = _this132.handleUsaZipCode.bind(_assertThisInitialized(_this132));
    return _this132;
  } //end contructor
  //handles radio buttons onchange event


  _createClass(KeyTaskBoxZip, [{
    key: "onValueChange",
    value: function onValueChange(event) {
      this.setState({
        selectedOption: event.target.value
      });

      if (event.target.value === "InPerson") {
        if (this.props.data.InPerson.length > 0) {
          this.setState({
            dropdownOption: this.props.data.InPerson[0].VisitTypeId
          });
        } //end if

      } else if (event.target.value === "VideoVisit") {
        if (this.props.data.VideoVisit.length > 0) {
          this.setState({
            dropdownOption: this.props.data.VideoVisit[0].VisitTypeId
          });
        } //end if

      } //end if

    } //end function
    //handles ddl onchange event

  }, {
    key: "handleChange",
    value: function handleChange(e) {
      this.setState({
        dropdownOption: e.target.value
      });
      var value = e.target.value == "0150" ? "0150" : "0110,0120";
      this.setSADTIframeUrl(value);
    } //end function      
    //

  }, {
    key: "handleValidateZipCode",
    value: function handleValidateZipCode(zipcode) {
      var text = "Please enter a valid 5-digit ZIP code";
      var isUsaZipCode = this.handleUsaZipCode(zipcode);

      if (isNaN(zipcode) || !isUsaZipCode || zipcode.length > 5 || zipcode.length < 5) {
        this.setState({
          showZipcodeWarning: text
        });
      }

      if (zipcode.length == 5 && isNaN(zipcode) === false) {
        this.setState({
          zipcode: zipcode,
          showZipcodeWarning: ""
        });
        return true;
      }
    } //end function

  }, {
    key: "handleUsaZipCode",
    value: function handleUsaZipCode(zip) {
      var zipCodeRegex = /^\d{5}(-\d{4})?$/;
      if (!zip) return false;
      var isValidZipCode = zipCodeRegex.test(zip);
      if (!isValidZipCode) return false;

      if (isValidZipCode) {
        this.setState({
          zipcode: zip,
          showZipcodeWarning: ""
        });
        return true;
      }
    } //

  }, {
    key: "handleButton",
    value: function handleButton(e) {
      var _this$state9 = this.state,
          selectedOption = _this$state9.selectedOption,
          dropdownOption = _this$state9.dropdownOption,
          campaignValue = _this$state9.campaignValue;
      var zip = this._address.current.value;

      if (this.handleValidateZipCode(zip)) {
        var payload = {
          zipcode: zip,
          selectoption: selectedOption,
          dropdownoption: dropdownOption
        };
        this.setSADTIframeUrl(dropdownOption, campaignValue);
        this.handleSetSearchParamsLocation(payload);
      }
    } //end function
    //

  }, {
    key: "handleSetSearchParamsLocation",
    value: function handleSetSearchParamsLocation(payload) {
      var campaignValue = this.state.campaignValue;
      var zipcode = payload.zipcode,
          dropdownoption = payload.dropdownoption,
          selectoption = payload.selectoption;
      var target = "";

      if (payload) {
        this.setState({
          payload: payload,
          zipcode: ""
        });
      }

      if (window.location.href.substr(0, window.location.href.indexOf("?"))) {
        target = window.location.href.substr(0, window.location.href.indexOf("?") + 1);
      } else {
        target = window.location.href + "?";
      } //end if


      if (payload) {
        target = target.concat("zipcode=".concat(zipcode, "&dropdownoption=").concat(dropdownoption, "&selectoption=").concat(selectoption, "&"));
      } //end if


      if (campaignValue != null && campaignValue != "null" && campaignValue != '' && campaignValue != undefined) {
        target = target.concat("eid=".concat(campaignValue));
      } //end if
      //page refreshes here


      window.location.href = target;
    } //end function
    //

  }, {
    key: "handleViewAllLocations",
    value: function handleViewAllLocations() {
      var _this$state10 = this.state,
          dataUrl = _this$state10.dataUrl,
          dataApiKey = _this$state10.dataApiKey,
          campaignValue = _this$state10.campaignValue;
      var departments = this.props.data.DeptID.split(',');
      var url = "".concat(dataUrl, "/openscheduling/embedded?apikey=").concat(dataApiKey, "&widgetid=MyChartIframe0&dept=").concat(departments, "&vt=").concat(this.selectedOptionValue);

      if (!campaignValue) {
        url += "&linksource=".concat(campaignValue);
        this.setState({
          SADTIframeUrl: url
        });
      }

      var element = document.getElementById("MyChartIframe0");
      element.setAttribute("src", url);
      element.contentWindow.location.reload();
    } //end function
    //

  }, {
    key: "setSADTIframeUrl",
    value: function setSADTIframeUrl(specialtyValue, campaignVal) {
      var amount = specialtyValue == "0150" ? 3 : 6;
      this.setState({
        dataAdditionalparamsDept: this.setIframeUrlDepartments(amount),
        dataAdditionalparamsId: "",
        dataAdditionalparamsVt: this.selectedOptionValue
      });

      if (campaignVal != null && campaignVal != undefined && campaignVal != '') {
        this.setState({
          campaignValue: campaignVal,
          dataAdditionalparamsPassthroughparamsLinksource: campaignVal
        });
      }
    } //end function
    //

  }, {
    key: "checkEnter",
    value: function checkEnter(e) {
      if (e.key === "Enter") {
        this.handleButton();
      }
    } //end function
    //

  }, {
    key: "handleModelDisclaimer",
    value: function handleModelDisclaimer() {
      this.setState({
        showModalQuestion: false,
        showModalDisclaimer: true
      });
    } //end function
    //

  }, {
    key: "handleClose",
    value: function handleClose() {
      this.setState({
        showModalDisclaimer: false,
        showModalResult: false
      });
    } //end function
    //

  }, {
    key: "handleModalResult",
    value: function handleModalResult() {
      this.setState({
        showModalQuestion: false,
        showModalResult: true,
        zipcode: ""
      });
    } //end function
    //

  }, {
    key: "setIframeUrlDepartments",
    value: function setIframeUrlDepartments(prop) {
      var deptArr = this.props.data.DeptID.split(',');
      return deptArr.slice(0, prop);
    } //end function
    //

  }, {
    key: "setCampaignValue",
    value: function setCampaignValue() {
      var campaignValue = "";

      if (window.sessionStorage.getItem("eid") != null) {
        var sessionValue = window.sessionStorage.getItem("eid");
        this.setState({
          campaignValue: sessionValue
        });
        campaignValue = sessionValue;
      } //end if


      return campaignValue;
    } //end function
    //

  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this133 = this;

      var selectedOption = this.state.selectedOption;
      var locationHref = window.location.href.substr(window.location.href.indexOf("?") + 1, window.location.href.length).split("&");
      var specialtyValue = null;
      var campaignValue = this.setCampaignValue();
      locationHref.map(function (locTerms) {
        var terms = locTerms.split("=");

        if (terms[0] == "dropdownoption") {
          _this133.setState({
            dropdownOption: terms[1]
          });

          specialtyValue = terms[1];
        } //end if

      }); //end lambda

      this.setSADTIframeUrl(specialtyValue, campaignValue);

      if (this.props.data.DeptID.trim()) {
        if (selectedOption === "InPerson") {
          if (this.props.data.InPerson.length > 0) {
            if (this.props.data.CovidInperson) {
              this.setState({
                showModalQuestion: true
              });
            } else {
              this.setState({
                showModalResult: true,
                showModalQuestion: false,
                zipcode: ""
              });
            } //end if

          } //end if

        } else if (selectedOption === "VideoVisit") {
          if (this.props.data.VideoVisit.length > 0) {
            if (this.props.data.CovidVideoVisit) {
              this.setState({
                showModalQuestion: true
              });
            } else {
              this.setState({
                showModalResult: true,
                showModalQuestion: false,
                zipcode: ""
              });
            } //end if

          } //end if

        } //end if

      } //end if


      if (localStorage.StoredZip !== null && localStorage.StoredZip !== undefined) {
        this._address.current.value = localStorage.StoredZip;
      }
    } //end function

  }, {
    key: "render",
    value: function render() {
      var _this$state11 = this.state,
          selectedOption = _this$state11.selectedOption,
          zipcode = _this$state11.zipcode,
          dropdownOption = _this$state11.dropdownOption,
          showModalQuestion = _this$state11.showModalQuestion,
          showModalResult = _this$state11.showModalResult,
          dataUrl = _this$state11.dataUrl,
          dataApiKey = _this$state11.dataApiKey,
          dataWidgetType = _this$state11.dataWidgetType,
          dataAdditionalparamsDept = _this$state11.dataAdditionalparamsDept,
          dataAdditionalparamsId = _this$state11.dataAdditionalparamsId,
          dataAdditionalparamsVt = _this$state11.dataAdditionalparamsVt,
          dataAdditionalparamsPassthroughparamsLinksource = _this$state11.dataAdditionalparamsPassthroughparamsLinksource,
          showZipcodeWarning = _this$state11.showZipcodeWarning;

      if (this.props.isEditing) {
        return React.createElement("div", null, React.createElement("p", null, "Key Task Zipcode Search is not available in Editing or Preview mode."));
      } else {
        var InpersonDropdown = this.props.data.InPerson;
        var VideoVisitDropdown = this.props.data.VideoVisit;
        return React.createElement(React.Fragment, null, React.createElement("div", {
          class: "block-wrapper"
        }, React.createElement("div", {
          class: "radio-wrapper"
        }, React.createElement("input", {
          type: "radio",
          value: "InPerson",
          id: "r-inperson",
          checked: selectedOption === "InPerson",
          onChange: this.onValueChange
        }), React.createElement("label", {
          for: "r-inperson",
          class: "radio-label"
        }, this.props.data.DictionaryData["In-Person-Label"]), React.createElement("input", {
          type: "radio",
          value: "VideoVisit",
          id: "r-videovisit",
          checked: selectedOption === "VideoVisit",
          onChange: this.onValueChange
        }), React.createElement("label", {
          for: "r-videovisit",
          class: "radio-label"
        }, this.props.data.DictionaryData["Video-Visit-label"])), React.createElement("div", {
          class: "appointment-section"
        }, React.createElement("div", {
          class: "zipcode-wrapper"
        }, React.createElement("input", {
          ref: this._address,
          type: "text",
          class: "search-box-input",
          name: "zipcode",
          id: "keyzipcode",
          placeholder: this.props.data.DictionaryData["Enter-Zip-Code-field-hint-text"],
          onKeyUp: this.checkEnter,
          value: zipcode ? zipcode : null
        }), selectedOption == "InPerson" ? React.createElement("span", {
          class: "select-type",
          value: dropdownOption
        }, InpersonDropdown ? React.createElement("select", {
          id: "specialtyDDL",
          onChange: this.handleChange
        }, InpersonDropdown.map(function (Inpersons) {
          return React.createElement("option", {
            value: Inpersons.VisitTypeId,
            selected: dropdownOption == "0150" ? "selected" : ""
          }, " ", " ", " ", Inpersons.VisitTypeValue, " ");
        })) : "", React.createElement("svg", {
          className: "down-chevron",
          xmlns: "http://www.w3.org/2000/svg",
          viewBox: "0 0 512 512"
        }, React.createElement("path", {
          fill: "#2E7E94",
          d: "M239 401c9.4 9.4 24.6 9.4 33.9 0L465 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-175 175L81 175c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9L239 401z"
        }))) : React.createElement("span", {
          class: "select-type",
          value: dropdownOption
        }, VideoVisitDropdown ? React.createElement("select", {
          id: "specialtyDDL",
          onChange: this.handleChange
        }, VideoVisitDropdown.map(function (VideoVisits) {
          return React.createElement("option", {
            value: VideoVisits.VisitTypeId,
            selected: dropdownOption == "0150" ? "selected" : ""
          }, " ", " ", " ", VideoVisits.VisitTypeValue);
        })) : "", React.createElement("svg", {
          className: "down-chevron",
          xmlns: "http://www.w3.org/2000/svg",
          viewBox: "0 0 512 512"
        }, React.createElement("path", {
          fill: "#2E7E94",
          d: "M239 401c9.4 9.4 24.6 9.4 33.9 0L465 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-175 175L81 175c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9L239 401z"
        })))), React.createElement(React.Fragment, null, React.createElement("div", {
          class: "link button zipcode-button"
        }, React.createElement("button", {
          class: "search-box-button",
          onClick: this.handleButton
        }, React.createElement("a", null, this.props.data.DictionaryData["Find-Next-Available-button-text"]))), !zipcode && React.createElement("h6", {
          style: {
            paddingTop: "5px"
          }
        }, showZipcodeWarning))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: showModalQuestion ? "block" : "none",
            height: "100vh",
            borderRadius: "6px"
          }
        }, React.createElement("div", {
          class: "modal-body"
        }, React.createElement("div", {
          id: "modal-question",
          class: "modal-question"
        }, React.createElement("h4", {
          class: "modal-heading"
        }, this.props.data.DictionaryData["Covid-19-popup-Heading"]), React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.CovidMessage
          }
        }), React.createElement("div", {
          class: "modal-button-container"
        }, React.createElement("input", {
          type: "button",
          value: "Okay",
          onClick: this.handleModalResult
        }))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: showModalResult ? "block" : "none"
          }
        }, zipcode && React.createElement("script", {
          src: dataUrl + "/scripts/lib/Widget/widget_sdk.js"
        }), React.createElement("div", {
          class: "result-modal-body"
        }, React.createElement("h4", {
          class: "result-modal-heading"
        }, React.createElement("span", null, "Search Results"), React.createElement("input", {
          type: "button",
          value: "X",
          onClick: this.handleClose
        })), React.createElement("div", {
          id: "viewAllLocationsButton",
          class: "link button zipcode-button",
          style: {
            textAlign: "center!impotant"
          }
        }, React.createElement("button", {
          class: "search-box-button",
          onClick: this.handleViewAllLocations,
          style: {
            margin: "30px",
            background: "rgb(248, 217, 75)",
            border: "none",
            top: 0,
            borderRadius: "5px",
            //boxShadow: "rgba(0, 0, 0, 0.35) 0px 5px 15px"
            boxShadow: "rgba(0, 0, 0, 0.2) 0px 12px 28px 0px, rgba(0, 0, 0, 0.1) 0px 2px 4px 0px, rgba(255, 255, 255, 0.05) 0px 0px 0px 1px inset"
          }
        }, React.createElement("a", {
          style: {
            color: "rgb(0,0,0)",
            fontSize: "1.6rem"
          }
        }, "View All Locations"))), React.createElement("div", {
          class: "results-modal-iframe-container",
          style: {
            paddingLeft: "20px",
            paddingRight: "8px"
          }
        }, React.createElement("div", {
          id: "epicproviders",
          "data-url": dataUrl,
          "data-apikey": dataApiKey,
          "data-widget-type": dataWidgetType,
          "data-additionalparams-dept": dataAdditionalparamsDept,
          "data-additionalparams-id": dataAdditionalparamsId,
          "data-additionalparams-vt": dataAdditionalparamsVt,
          "data-additionalparams-linksource": dataAdditionalparamsPassthroughparamsLinksource
        })))))); //end
      } //end if

    } //end render

  }]);

  return KeyTaskBoxZip;
}(React.Component); //end class


;

var SeeDoctorPediatrics =
/*#__PURE__*/
function (_React$Component61) {
  _inherits(SeeDoctorPediatrics, _React$Component61);

  /*
   *  SeeDoctorPediatrics.jsx is rendered in the JSX Rendering: 
   *  /sitecore/layout/Renderings/Feature/PageContent/PediatricsPhysicalVisit
   * 
   *  The purpose of this component is to provide a zipcode search for in-person, pediatric, physicals.
   *  
   */
  function SeeDoctorPediatrics(props) {
    var _this134;

    _classCallCheck(this, SeeDoctorPediatrics);

    _this134 = _possibleConstructorReturn(this, _getPrototypeOf(SeeDoctorPediatrics).call(this, props));
    var zip = "";
    var option = "InPerson";
    var dropdown = "0150"; // amount of pediatrics departments shown in results

    var amount = 5; // desired visit type id for physical

    var physicalVisitType = "167";

    if (_this134.props.data.ZipCode != null) {
      zip = _this134.props.data.ZipCode;
    }

    _this134.state = {
      SADTIframe: "",
      selectedOption: option,
      dropdownOption: dropdown,
      payload: {},
      showModalQuestion: false,
      showModalDisclaimer: false,
      showModalResult: false,
      zipcode: zip,
      showZipcodeWarning: "",
      campaignValue: null,
      specialtyAmount: amount,
      visitType: physicalVisitType,
      dataUrl: _this134.props.data.MyChart + "/mychart",
      dataApiKey: _this134.props.data.ApiKey,
      dataWidgetType: "OpenScheduling",
      dataAdditionalparamsDept: "",
      dataAdditionalparamsId: "",
      dataAdditionalparamsVt: "",
      dataAdditionalparamsPassthroughparamsLinksource: ""
    };
    _this134._address = React.createRef();
    _this134._model = React.createRef();
    _this134.handleButton = _this134.handleButton.bind(_assertThisInitialized(_this134));
    _this134.handleModelDisclaimer = _this134.handleModelDisclaimer.bind(_assertThisInitialized(_this134));
    _this134.handleClose = _this134.handleClose.bind(_assertThisInitialized(_this134));
    _this134.handleModalResult = _this134.handleModalResult.bind(_assertThisInitialized(_this134));
    _this134.handleSetSearchParamsLocation = _this134.handleSetSearchParamsLocation.bind(_assertThisInitialized(_this134));
    _this134.changeZipValue = _this134.changeZipValue.bind(_assertThisInitialized(_this134));
    _this134.checkEnter = _this134.checkEnter.bind(_assertThisInitialized(_this134));
    _this134.setIframeUrlDepartments = _this134.setIframeUrlDepartments.bind(_assertThisInitialized(_this134));
    _this134.handleViewAllLocations = _this134.handleViewAllLocations.bind(_assertThisInitialized(_this134));
    _this134.setSADTIframeUrl = _this134.setSADTIframeUrl.bind(_assertThisInitialized(_this134));
    _this134.setCampaignValue = _this134.setCampaignValue.bind(_assertThisInitialized(_this134));
    return _this134;
  } //end contructor
  //


  _createClass(SeeDoctorPediatrics, [{
    key: "handleValidateZipCode",
    value: function handleValidateZipCode(zipcode) {
      var text = "Please enter a valid 5-digit ZIP code";
      var isUsaZipCode = this.handleUsaZipCode(zipcode);

      if (isNaN(zipcode) || !isUsaZipCode || zipcode.length > 5 || zipcode.length < 5) {
        this.setState({
          showZipcodeWarning: text
        });
      }

      if (zipcode.length === 5 && isNaN(zipcode) === false) {
        this.setState({
          zipcode: zipcode,
          showZipcodeWarning: ""
        });
        return true;
      }
    } //end function

  }, {
    key: "handleUsaZipCode",
    value: function handleUsaZipCode(zip) {
      var zipCodeRegex = /^\d{5}(-\d{4})?$/;
      if (!zip) return false;
      var isValidZipCode = zipCodeRegex.test(zip);
      if (!isValidZipCode) return false;

      if (isValidZipCode) {
        this.setState({
          zipcode: zip,
          showZipcodeWarning: ""
        });
        return true;
      }
    }
  }, {
    key: "handleButton",
    value: function handleButton() {
      var _this$state12 = this.state,
          selectedOption = _this$state12.selectedOption,
          dropdownOption = _this$state12.dropdownOption,
          campaignValue = _this$state12.campaignValue;
      var zip = this._address.current.value;

      if (this.handleValidateZipCode(zip)) {
        var payload = {
          zipcode: zip,
          selectoption: selectedOption,
          dropdownoption: dropdownOption
        };
        this.setSADTIframeUrl(campaignValue);
        this.handleSetSearchParamsLocation(payload);
      }
    } //end function

  }, {
    key: "handleSetSearchParamsLocation",
    value: function handleSetSearchParamsLocation(payload) {
      var campaignValue = this.state.campaignValue;
      var zipcode = payload.zipcode,
          dropdownoption = payload.dropdownoption,
          selectoption = payload.selectoption;
      var target = "";

      if (payload) {
        this.setState({
          payload: payload
        });
      }

      if (window.location.href.substr(0, window.location.href.indexOf("?"))) {
        target = window.location.href.substr(0, window.location.href.indexOf("?") + 1);
      } else {
        target = window.location.href + "?";
      } //end if


      if (payload) {
        target = target.concat("zipcode=".concat(zipcode, "&dropdownoption=").concat(dropdownoption, "&selectoption=").concat(selectoption, "&"));
      } //end if


      if (campaignValue != null && campaignValue != undefined && campaignValue != '') {
        target = target.concat("eid=".concat(campaignValue));
      } //end if
      //page refreshes here


      window.location.href = target;
    } //end function

  }, {
    key: "handleViewAllLocations",
    value: function handleViewAllLocations() {
      var _this$state13 = this.state,
          dataUrl = _this$state13.dataUrl,
          dataApiKey = _this$state13.dataApiKey,
          campaignValue = _this$state13.campaignValue,
          visitType = _this$state13.visitType;
      var departments = this.props.data.DeptID.split(",");
      var url = "".concat(dataUrl, "/openscheduling/embedded?apikey=").concat(dataApiKey, "&widgetid=MyChartIframe0&dept=").concat(departments, "&vt=").concat(visitType);

      if (campaignValue != null && campaignValue != undefined && campaignValue != '') {
        url += "&linksource=".concat(campaignValue);
        this.setState({
          SADTIframeUrl: url
        });
      }

      var element = document.getElementById("MyChartIframe0");
      element.setAttribute("src", url);
      element.contentWindow.location.reload();
    } //end function

  }, {
    key: "checkEnter",
    value: function checkEnter(e) {
      if (e.key === "Enter") {
        this.handleButton();
      }
    } //end function

  }, {
    key: "handleModelDisclaimer",
    value: function handleModelDisclaimer() {
      this.setState({
        showModalQuestion: false,
        showModalDisclaimer: true
      });
    } //end function

  }, {
    key: "handleClose",
    value: function handleClose() {
      this.setState({
        showModalDisclaimer: false,
        showModalResult: false
      });
    } //end function

  }, {
    key: "handleModalResult",
    value: function handleModalResult() {
      this.setState({
        showModalQuestion: false,
        showModalResult: true,
        zipcode: ""
      });
    } //end function   

  }, {
    key: "changeZipValue",
    value: function changeZipValue(e) {
      this.setState({
        Zipcode: e.target.value
      });
    } //end function

  }, {
    key: "setSADTIframeUrl",
    value: function setSADTIframeUrl(campaignVal) {
      this.setState({
        dataAdditionalparamsDept: this.setIframeUrlDepartments(this.state.specialtyAmount),
        dataAdditionalparamsId: "",
        dataAdditionalparamsVt: this.state.visitType
      });

      if (campaignVal != null && campaignVal != undefined && campaignVal != '') {
        this.setState({
          campaignValue: campaignVal,
          dataAdditionalparamsPassthroughparamsLinksource: campaignVal
        });
      }
    } //end function

  }, {
    key: "setIframeUrlDepartments",
    value: function setIframeUrlDepartments(prop) {
      var deptArr = this.props.data.DeptID.split(',');
      return deptArr.slice(0, prop);
    } //end function
    //

  }, {
    key: "setCampaignValue",
    value: function setCampaignValue() {
      var campaignValue = "";

      if (window.sessionStorage.getItem("eid") != null) {
        var sessionValue = window.sessionStorage.getItem("eid");
        this.setState({
          campaignValue: sessionValue
        });
        campaignValue = sessionValue;
      } //end if


      return campaignValue;
    } //end function

  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this135 = this;

      var locationHref = window.location.href.substr(window.location.href.indexOf("?") + 1, window.location.href.length).split("&");
      var campaignValue = this.setCampaignValue();
      locationHref.map(function (locTerms) {
        var terms = locTerms.split("=");

        if (terms[0].toLowerCase() == "eid") {
          _this135.setState({
            campaignValue: terms[1]
          });

          campaignValue = terms[1];
        } //end if

      }); //end lambda

      this.setSADTIframeUrl(campaignValue);

      if (this.props.data.DeptID.trim()) {
        if (this.props.data.CovidInperson) {
          this.setState({
            showModalQuestion: true
          });
        } else {
          this.setState({
            showModalResult: true,
            showModalQuestion: false
          });
        } //end if

      } //end if


      if (localStorage.StoredZip != null && localStorage.StoredZip != undefined) {
        document.getElementById("pedi-phys-zipcode-search-input").value = localStorage.StoredZip;
      } //end if

    } //end function

  }, {
    key: "render",
    value: function render() {
      var _this$state14 = this.state,
          selectedOption = _this$state14.selectedOption,
          zipcode = _this$state14.zipcode,
          dropdownOption = _this$state14.dropdownOption,
          showModalQuestion = _this$state14.showModalQuestion,
          showModalResult = _this$state14.showModalResult,
          dataUrl = _this$state14.dataUrl,
          dataApiKey = _this$state14.dataApiKey,
          dataWidgetType = _this$state14.dataWidgetType,
          dataAdditionalparamsDept = _this$state14.dataAdditionalparamsDept,
          dataAdditionalparamsId = _this$state14.dataAdditionalparamsId,
          dataAdditionalparamsVt = _this$state14.dataAdditionalparamsVt,
          dataAdditionalparamsPassthroughparamsLinksource = _this$state14.dataAdditionalparamsPassthroughparamsLinksource,
          showZipcodeWarning = _this$state14.showZipcodeWarning,
          SADTIframeUrl = _this$state14.SADTIframeUrl;

      if (this.props.isEditing) {
        return React.createElement("div", null, React.createElement("p", null, "Pediatrics Physical Zipcode Search is not available in Editing or Preview mode."));
      } else {
        return React.createElement(React.Fragment, null, React.createElement("div", {
          class: "block-wrapper"
        }, React.createElement("div", {
          class: "appointment-section pediatrics-appointment-section"
        }, React.createElement("div", {
          class: "zipcode-wrapper pediatrics-zipcode-wrapper"
        }, React.createElement("input", {
          ref: this._address,
          type: "text",
          class: "search-box-input",
          name: "zipcode",
          id: "pedi-phys-zipcode-search-input",
          placeholder: this.props.data.DictionaryData["Enter-Zip-Code-field-hint-text"],
          onChange: this.changeZipValue,
          onKeyUp: this.checkEnter,
          value: this.state.Zipcode ? this.state.Zipcode : null
        })), React.createElement("div", {
          class: "link button zipcode-button",
          id: "pedi-phys-zipcode-search-button"
        }, React.createElement("button", {
          class: "search-box-button",
          onClick: this.handleButton
        }, React.createElement("a", null, this.props.data.DictionaryData["Find-Next-Available-button-text"])))), !zipcode && React.createElement("h6", {
          style: {
            paddingTop: "5px"
          }
        }, showZipcodeWarning), React.createElement("section", {
          class: "modal-container",
          style: {
            display: this.state.showModalQuestion ? "block" : "none"
          }
        }, React.createElement("div", {
          class: "modal-body"
        }, React.createElement("div", {
          id: "modal-question",
          class: "modal-question"
        }, React.createElement("h4", {
          class: "modal-heading"
        }, this.props.data.DictionaryData["Covid-19-popup-Heading"]), React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.CovidMessage
          }
        }), React.createElement("div", {
          class: "modal-button-container"
        }, React.createElement("input", {
          type: "button",
          value: "Okay",
          onClick: this.handleModalResult
        }))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: showModalResult ? "block" : "none"
          }
        }, zipcode && React.createElement("script", {
          src: dataUrl + "/scripts/lib/Widget/widget_sdk.js"
        }), React.createElement("div", {
          class: "result-modal-body"
        }, React.createElement("h4", {
          class: "result-modal-heading"
        }, React.createElement("span", null, "Search Results"), React.createElement("input", {
          type: "button",
          value: "X",
          onClick: this.handleClose
        })), React.createElement("div", {
          id: "viewAllLocationsButton",
          class: "link button zipcode-button",
          style: {
            textAlign: "center!important",
            top: 0
          }
        }, React.createElement("button", {
          class: "search-box-button",
          onClick: this.handleViewAllLocations,
          style: {
            margin: "30px",
            background: "rgb(248, 217, 75)",
            border: "none",
            top: 0,
            borderRadius: "5px",
            //boxShadow: "rgba(0, 0, 0, 0.35) 0px 5px 15px"
            boxShadow: "rgba(0, 0, 0, 0.2) 0px 12px 28px 0px, rgba(0, 0, 0, 0.1) 0px 2px 4px 0px, rgba(255, 255, 255, 0.05) 0px 0px 0px 1px inset"
          }
        }, React.createElement("a", {
          style: {
            color: "rgb(0,0,0)",
            fontSize: "1.6rem"
          }
        }, "View All Locations"))), React.createElement("div", {
          class: "results-modal-iframe-container",
          style: {
            paddingLeft: "20px",
            paddingRight: "8px"
          }
        }, React.createElement("div", {
          id: "epicproviders",
          "data-url": dataUrl,
          "data-apikey": dataApiKey,
          "data-widget-type": dataWidgetType,
          "data-additionalparams-dept": dataAdditionalparamsDept,
          "data-additionalparams-id": dataAdditionalparamsId,
          "data-additionalparams-vt": dataAdditionalparamsVt,
          "data-additionalparams-linksource": dataAdditionalparamsPassthroughparamsLinksource
        })))))); //end
      } //end if

    } //end render

  }]);

  return SeeDoctorPediatrics;
}(React.Component); //end class


;

var SeeDoctorVideoVisit =
/*#__PURE__*/
function (_React$Component62) {
  _inherits(SeeDoctorVideoVisit, _React$Component62);

  function SeeDoctorVideoVisit(props) {
    var _this136;

    _classCallCheck(this, SeeDoctorVideoVisit);

    _this136 = _possibleConstructorReturn(this, _getPrototypeOf(SeeDoctorVideoVisit).call(this, props));
    var zip = "";
    var option = "VideoVisit";
    var dropdown = "";

    if (_this136.props.data.ZipCode != null) {
      zip = _this136.props.data.ZipCode;
    }

    if (_this136.props.data.SelectOption != null) {
      option = _this136.props.data.SelectOption;
    }

    if (_this136.props.data.InPerson.length > 0) {
      dropdown = _this136.props.data.InPerson[0].VisitTypeId;
    }

    _this136.state = {
      SADTIframe: "",
      selectedOption: option,
      dropdownOption: dropdown,
      payload: {},
      showModalQuestion: false,
      showModalDisclaimer: false,
      showModalResult: false,
      zipcode: zip,
      showZipcodeWarning: "",
      campaignValue: null,
      dataUrl: _this136.props.data.MyChart + "/mychart",
      dataApiKey: _this136.props.data.ApiKey,
      dataWidgetType: "OpenScheduling",
      dataAdditionalparamsDept: "",
      dataAdditionalparamsId: "",
      dataAdditionalparamsVt: "",
      dataAdditionalparamsPassthroughparamsLinksource: ""
    };
    _this136.selectedOptionValue = React.createRef();
    _this136.selectedOptionValue = _this136.props.data.SelectOption == "InPerson" ? 166 : 591;
    _this136._address = React.createRef();
    _this136._model = React.createRef();
    _this136.onValueChange = _this136.onValueChange.bind(_assertThisInitialized(_this136));
    _this136.handleChange = _this136.handleChange.bind(_assertThisInitialized(_this136));
    _this136.handleButton = _this136.handleButton.bind(_assertThisInitialized(_this136));
    _this136.handleModelDisclaimer = _this136.handleModelDisclaimer.bind(_assertThisInitialized(_this136));
    _this136.handleClose = _this136.handleClose.bind(_assertThisInitialized(_this136));
    _this136.handleModalResult = _this136.handleModalResult.bind(_assertThisInitialized(_this136));
    _this136.handleSetSearchParamsLocation = _this136.handleSetSearchParamsLocation.bind(_assertThisInitialized(_this136));
    _this136.checkEnter = _this136.checkEnter.bind(_assertThisInitialized(_this136));
    _this136.setIframeUrlDepartments = _this136.setIframeUrlDepartments.bind(_assertThisInitialized(_this136));
    _this136.handleViewAllLocations = _this136.handleViewAllLocations.bind(_assertThisInitialized(_this136));
    _this136.setSADTIframeUrl = _this136.setSADTIframeUrl.bind(_assertThisInitialized(_this136));
    _this136.handleVideoButton = _this136.handleVideoButton.bind(_assertThisInitialized(_this136));
    _this136.setCampaignValue = _this136.setCampaignValue.bind(_assertThisInitialized(_this136));
    return _this136;
  } //end contructor
  //handles radio buttons onchange event


  _createClass(SeeDoctorVideoVisit, [{
    key: "onValueChange",
    value: function onValueChange(event) {
      this.setState({
        selectedOption: event.target.value
      });

      if (event.target.value === "InPerson") {
        if (this.props.data.InPerson.length > 0) {
          this.setState({
            dropdownOption: this.props.data.InPerson[0].VisitTypeId
          });
        } //end if

      } else if (event.target.value === "VideoVisit") {
        if (this.props.data.VideoVisit.length > 0) {
          this.setState({
            dropdownOption: this.props.data.VideoVisit[0].VisitTypeId
          });
        } //end if

      } //end if

    } //end function
    //handles ddl onchange event

  }, {
    key: "handleChange",
    value: function handleChange(e) {
      this.setState({
        dropdownOption: e.target.value
      });
      var value = e.target.value == "0150" ? "0150" : "0110,0120";
      this.setSADTIframeUrl(value);
    } //end function
    //

  }, {
    key: "handleValidateZipCode",
    value: function handleValidateZipCode(zipcode) {
      var text = "Please enter a valid 5-digit ZIP code";
      var isUsaZipCode = this.handleUsaZipCode(zipcode);

      if (isNaN(zipcode) || !isUsaZipCode || zipcode.length > 5 || zipcode.length < 5) {
        this.setState({
          showZipcodeWarning: text
        });
      }

      if (zipcode.length === 5 && isNaN(zipcode) === false) {
        this.setState({
          zipcode: zipcode,
          showZipcodeWarning: ""
        });
        return true;
      }
    } //end function

  }, {
    key: "handleUsaZipCode",
    value: function handleUsaZipCode(zip) {
      var zipCodeRegex = /^\d{5}(-\d{4})?$/;
      if (!zip) return false;
      var isValidZipCode = zipCodeRegex.test(zip);
      if (!isValidZipCode) return false;

      if (isValidZipCode) {
        this.setState({
          zipcode: zip,
          showZipcodeWarning: ""
        });
        return true;
      }
    } //

  }, {
    key: "handleButton",
    value: function handleButton(e) {
      var _this$state15 = this.state,
          selectedOption = _this$state15.selectedOption,
          dropdownOption = _this$state15.dropdownOption;
      var zip = this._address.current.value;

      if (this.handleValidateZipCode(zip)) {
        var payload = {
          zipcode: zip,
          selectoption: selectedOption,
          dropdownoption: dropdownOption
        };
        this.setSADTIframeUrl(dropdownOption);
        this.handleSetSearchParamsLocation(payload);
      }
    } //end function
    //

  }, {
    key: "handleVideoButton",
    value: function handleVideoButton() {
      var _this$state16 = this.state,
          selectedOption = _this$state16.selectedOption,
          dropdownOption = _this$state16.dropdownOption;
      var zip = 77025;
      var payload = {
        zipcode: zip,
        selectoption: selectedOption,
        dropdownoption: dropdownOption
      };
      this.setSADTIframeUrl(dropdownOption);
      this.handleSetSearchParamsLocation(payload);
    } //

  }, {
    key: "handleSetSearchParamsLocation",
    value: function handleSetSearchParamsLocation(payload) {
      var campaignValue = this.state.campaignValue;
      var zipcode = payload.zipcode,
          dropdownoption = payload.dropdownoption,
          selectoption = payload.selectoption;
      var target = "";

      if (payload) {
        this.setState({
          payload: payload
        });
      }

      if (window.location.href.substr(0, window.location.href.indexOf("?"))) {
        target = window.location.href.substr(0, window.location.href.indexOf("?") + 1);
      } else {
        target = window.location.href + "?";
      } //end if


      if (payload) {
        target = target.concat("zipcode=".concat(zipcode, "&dropdownoption=").concat(dropdownoption, "&selectoption=").concat(selectoption, "&"));
      } //end if


      if (!campaignValue) {
        target = target.concat("eid=".concat(campaignValue));
      } //end if
      //page refreshes here


      window.location.href = target;
    } //end function
    //

  }, {
    key: "handleViewAllLocations",
    value: function handleViewAllLocations() {
      var _this$state17 = this.state,
          dataUrl = _this$state17.dataUrl,
          dataApiKey = _this$state17.dataApiKey,
          campaignValue = _this$state17.campaignValue;
      var departments = this.props.data.DeptID.split(",");
      var url = "".concat(dataUrl, "/openscheduling/embedded?apikey=").concat(dataApiKey, "&widgetid=MyChartIframe0&dept=").concat(departments, "&vt=").concat(this.selectedOptionValue);

      if (!campaignValue) {
        url += "&linksource=".concat(campaignValue);
        this.setState({
          SADTIframeUrl: url
        });
      }

      var element = document.getElementById("MyChartIframe0");
      element.setAttribute("src", url);
      element.contentWindow.location.reload();
    } //end function
    //

  }, {
    key: "checkEnter",
    value: function checkEnter(e) {
      if (e.key === "Enter") {
        this.handleButton();
      }
    } //end function
    //

  }, {
    key: "handleModelDisclaimer",
    value: function handleModelDisclaimer() {
      this.setState({
        showModalQuestion: false,
        showModalDisclaimer: true
      });
    } //end function
    //

  }, {
    key: "handleClose",
    value: function handleClose() {
      this.setState({
        showModalDisclaimer: false,
        showModalResult: false
      });
    } //end function
    //

  }, {
    key: "handleModalResult",
    value: function handleModalResult() {
      this.setState({
        showModalQuestion: false,
        showModalResult: true,
        zipcode: ""
      });
    } //end function
    //

  }, {
    key: "setSADTIframeUrl",
    value: function setSADTIframeUrl(specialtyValue, campaignVal) {
      var amount = specialtyValue == "0150" ? 5 : 10;
      this.setState({
        dataAdditionalparamsDept: this.setIframeUrlDepartments(amount),
        dataAdditionalparamsId: "",
        dataAdditionalparamsVt: this.selectedOptionValue
      });

      if (campaignVal != null && campaignVal != undefined && campaignVal != '') {
        this.setState({
          campaignValue: campaignVal,
          dataAdditionalparamsPassthroughparamsLinksource: campaignVal
        });
      }
    } //end function
    //

  }, {
    key: "setIframeUrlDepartments",
    value: function setIframeUrlDepartments(prop) {
      var deptArr = this.props.data.DeptID.split(",");
      return deptArr.slice(0, prop);
    } //end function
    //

  }, {
    key: "setCampaignValue",
    value: function setCampaignValue() {
      var campaignValue = "";

      if (window.sessionStorage.getItem("eid") != null) {
        var sessionValue = window.sessionStorage.getItem("eid");
        this.setState({
          campaignValue: sessionValue
        });
        campaignValue = sessionValue;
      } //end if


      return campaignValue;
    } //end function
    //

  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this137 = this;

      var selectedOption = this.state.selectedOption;
      var locationHref = window.location.href.substr(window.location.href.indexOf("?") + 1, window.location.href.length).split("&");
      var specialtyValue = null;
      var campaignValue = this.setCampaignValue();
      locationHref.map(function (locTerms) {
        var terms = locTerms.split("=");

        if (terms.length === 2) {
          if (terms[0] === "dropdownoption") {
            _this137.setState({
              dropdownOption: terms[1]
            });

            specialtyValue = terms[1];
          } //end if

        } //end if

      }); //end lambda

      this.setSADTIframeUrl(specialtyValue, campaignValue);

      if (this.props.data.DeptID.trim()) {
        if (selectedOption === "InPerson") {
          if (this.props.data.InPerson.length > 0) {
            if (this.props.data.CovidInperson) {
              this.setState({
                showModalQuestion: true
              });
            } else {
              this.setState({
                showModalResult: true,
                showModalQuestion: false,
                zipcode: ""
              });
            } //end if

          } //end if

        } else if (selectedOption === "VideoVisit") {
          if (this.props.data.VideoVisit.length > 0) {
            if (this.props.data.CovidVideoVisit) {
              this.setState({
                showModalQuestion: true
              });
            } else {
              this.setState({
                showModalResult: true,
                showModalQuestion: false,
                zipcode: ""
              });
            } //end if

          } //end if

        } //end if

      } //end if

    } //end function

  }, {
    key: "render",
    value: function render() {
      var _this$state18 = this.state,
          selectedOption = _this$state18.selectedOption,
          zipcode = _this$state18.zipcode,
          dropdownOption = _this$state18.dropdownOption,
          showModalQuestion = _this$state18.showModalQuestion,
          showModalResult = _this$state18.showModalResult,
          dataUrl = _this$state18.dataUrl,
          dataApiKey = _this$state18.dataApiKey,
          dataWidgetType = _this$state18.dataWidgetType,
          dataAdditionalparamsDept = _this$state18.dataAdditionalparamsDept,
          dataAdditionalparamsId = _this$state18.dataAdditionalparamsId,
          dataAdditionalparamsVt = _this$state18.dataAdditionalparamsVt,
          dataAdditionalparamsPassthroughparamsLinksource = _this$state18.dataAdditionalparamsPassthroughparamsLinksource,
          showZipcodeWarning = _this$state18.showZipcodeWarning,
          SADTIframeUrl = _this$state18.SADTIframeUrl;

      if (this.props.isEditing) {
        return React.createElement("div", null, React.createElement("p", null, "Key Task Zipcode Search is not available in Editing or Preview mode."));
      } else {
        var InpersonDropdown = this.props.data.InPerson;
        var VideoVisitDropdown = this.props.data.VideoVisit;
        return React.createElement("div", {
          class: "block-wrapper"
        }, React.createElement("div", {
          class: "radio-wrapper"
        }, React.createElement("input", {
          type: "radio",
          value: "VideoVisit",
          id: "r-videovisit",
          checked: selectedOption === "VideoVisit",
          onChange: this.onValueChange
        }), React.createElement("label", {
          for: "r-videovisit",
          class: "radio-label"
        }, this.props.data.DictionaryData["Video-Visit-label"]), React.createElement("input", {
          type: "radio",
          value: "InPerson",
          id: "r-inperson",
          checked: selectedOption === "InPerson",
          onChange: this.onValueChange
        }), React.createElement("label", {
          for: "r-inperson",
          class: "radio-label"
        }, this.props.data.DictionaryData["In-Person-Label"])), React.createElement("div", {
          class: "appointment-section"
        }, selectedOption == "InPerson" && React.createElement(React.Fragment, null, React.createElement("div", {
          class: "zipcode-wrapper"
        }, React.createElement("input", {
          ref: this._address,
          type: "text",
          class: "search-box-input",
          name: "zipcode",
          id: "keyzipcode",
          placeholder: this.props.data.DictionaryData["Enter-Zip-Code-field-hint-text"],
          onKeyUp: this.checkEnter,
          value: zipcode ? zipcode : null
        }), React.createElement("span", {
          class: "select-type",
          value: dropdownOption
        }, InpersonDropdown ? React.createElement("select", {
          id: "specialtyDDL",
          onChange: this.handleChange
        }, InpersonDropdown.map(function (Inpersons) {
          return React.createElement("option", {
            value: Inpersons.VisitTypeId,
            selected: dropdownOption == "0150" ? "selected" : ""
          }, " ", " ", " ", Inpersons.VisitTypeValue, " ");
        })) : "", React.createElement("i", {
          class: "fa fa-chevron-down"
        }))), React.createElement("div", {
          class: "link button zipcode-button"
        }, React.createElement("button", {
          class: "search-box-button",
          onClick: this.handleButton
        }, React.createElement("a", null, this.props.data.DictionaryData["Find-Next-Available-button-text"]))), !zipcode && React.createElement("h6", {
          style: {
            paddingTop: "5px"
          }
        }, showZipcodeWarning)), selectedOption === "VideoVisit" && React.createElement(React.Fragment, null, React.createElement("div", {
          class: "zipcode-wrapper"
        }, React.createElement("span", {
          class: "select-type",
          value: dropdownOption
        }, VideoVisitDropdown ? React.createElement("select", {
          id: "specialtyDDL",
          onChange: this.handleChange
        }, VideoVisitDropdown.map(function (VideoVisits) {
          return React.createElement("option", {
            value: VideoVisits.VisitTypeId,
            selected: dropdownOption == "0150" ? "selected" : ""
          }, " ", " ", " ", VideoVisits.VisitTypeValue);
        })) : "", React.createElement("i", {
          class: "fa fa-chevron-down"
        }))), React.createElement("div", {
          class: "link button zipcode-button"
        }, React.createElement("button", {
          class: "search-box-button",
          onClick: this.handleVideoButton
        }, React.createElement("a", null, this.props.data.DictionaryData["Find-Next-Available-button-text"]))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: showModalQuestion ? "block" : "none",
            height: "100vh",
            borderRadius: "6px"
          }
        }, React.createElement("div", {
          class: "modal-body"
        }, React.createElement("div", {
          id: "modal-question",
          class: "modal-question"
        }, React.createElement("h4", {
          class: "modal-heading"
        }, this.props.data.DictionaryData["Covid-19-popup-Heading"]), React.createElement("div", {
          dangerouslySetInnerHTML: {
            __html: this.props.data.CovidMessage
          }
        }), React.createElement("div", {
          class: "modal-button-container"
        }, React.createElement("input", {
          type: "button",
          value: "Okay",
          onClick: this.handleModalResult
        }))))), React.createElement("section", {
          class: "modal-container",
          style: {
            display: showModalResult ? "block" : "none"
          }
        }, zipcode && React.createElement("script", {
          src: dataUrl + "/scripts/lib/Widget/widget_sdk.js"
        }), React.createElement("div", {
          class: "result-modal-body"
        }, React.createElement("h4", {
          class: "result-modal-heading"
        }, React.createElement("span", null, "Search Results"), React.createElement("input", {
          type: "button",
          value: "X",
          onClick: this.handleClose
        })), React.createElement("div", {
          id: "viewAllLocationsButton",
          class: "link button zipcode-button",
          style: _defineProperty({
            top: 0,
            position: "sticky"
          }, "position", " -webkit - sticky")
        }, React.createElement("button", {
          class: "search-box-button",
          onClick: this.handleViewAllLocations,
          style: {
            margin: "30px",
            background: "rgb(248, 217, 75)",
            border: "none",
            top: 0,
            borderRadius: "5px",
            boxShadow: "rgba(0, 0, 0, 0.2) 0px 12px 28px 0px, rgba(0, 0, 0, 0.1) 0px 2px 4px 0px, rgba(255, 255, 255, 0.05) 0px 0px 0px 1px inset"
          }
        }, React.createElement("a", {
          style: {
            color: "rgb(0,0,0)",
            fontSize: "1.6rem"
          }
        }, "View All Locations"))), React.createElement("div", {
          class: "results-modal-iframe-container",
          style: {
            paddingLeft: "20px",
            paddingRight: "8px"
          }
        }, React.createElement("div", {
          id: "epicproviders",
          "data-url": dataUrl,
          "data-apikey": dataApiKey,
          "data-widget-type": dataWidgetType,
          "data-additionalparams-dept": dataAdditionalparamsDept,
          "data-additionalparams-id": dataAdditionalparamsId,
          "data-additionalparams-vt": dataAdditionalparamsVt,
          "data-additionalparams-linksource": dataAdditionalparamsPassthroughparamsLinksource
        }))))); //end
      } //end if

    } //end render

  }]);

  return SeeDoctorVideoVisit;
}(React.Component); //end class


;

var SlickSliderOptions =
/*#__PURE__*/
function (_React$Component63) {
  _inherits(SlickSliderOptions, _React$Component63);

  function SlickSliderOptions(props) {
    var _this138;

    _classCallCheck(this, SlickSliderOptions);

    _this138 = _possibleConstructorReturn(this, _getPrototypeOf(SlickSliderOptions).call(this, props));
    _this138.state = {
      data: JSON.parse(_this138.props.data),
      valueDropDown1: "",
      valueDropDown2: [],
      firstDropDown: false,
      secondDropDown: false
    };
    _this138.handleChange = _this138.handleChange.bind(_assertThisInitialized(_this138));
    _this138.navigationPage = _this138.navigationPage.bind(_assertThisInitialized(_this138));
    _this138.changeFirstDropdownArrow = _this138.changeFirstDropdownArrow.bind(_assertThisInitialized(_this138));
    _this138.changeSecondDropdownArrow = _this138.changeSecondDropdownArrow.bind(_assertThisInitialized(_this138));
    return _this138;
  }

  _createClass(SlickSliderOptions, [{
    key: "handleChange",
    value: function handleChange(e) {
      var _this139 = this;

      this.setState({
        valueDropDown1: e.target.value
      });
      var options = this.state.data.options;
      {
        options.map(function (option) {
          if (option.option == e.target.value) {
            _this139.setState({
              valueDropDown2: option.results
            });
          }
        });
      }
    }
  }, {
    key: "navigationPage",
    value: function navigationPage(e) {
      var openInNewTab = e.target.options[e.target.selectedIndex].dataset.target; //add selection to GA

      window.dataLayer = window.dataLayer || [];
      window.dataLayer.push({
        'event': 'home_slider_dropdown',
        'user_is': this.state.valueDropDown1,
        'user_needs_to': e.target.options[e.target.selectedIndex].dataset.tracking,
        'destination_url': e.target.value
      });

      if (openInNewTab.toLowerCase() == 'true') {
        window.open(e.target.value, '_blank');
      } else {
        window.location.href = e.target.value;
      }
    }
  }, {
    key: "changeFirstDropdownArrow",
    value: function changeFirstDropdownArrow() {
      this.setState({
        firstDropDown: !this.state.firstDropDown
      });
    }
  }, {
    key: "changeSecondDropdownArrow",
    value: function changeSecondDropdownArrow() {
      this.setState({
        secondDropDown: !this.state.secondDropDown
      });
    }
  }, {
    key: "render",
    value: function render() {
      var options = this.state.data.options;
      var results = this.state.valueDropDown2;
      return React.createElement("div", {
        className: "silder-option-hero"
      }, React.createElement("label", null, this.state.data.labelOne), React.createElement("div", {
        className: "first-dropdown-wrapper"
      }, React.createElement("select", {
        onChange: this.handleChange,
        onClick: this.changeFirstDropdownArrow
      }, React.createElement("option", {
        hidden: true
      }, this.state.data.hintTextOne), options.map(function (option) {
        return React.createElement("option", {
          value: option.option
        }, option.option);
      })), this.state.firstDropDown ? React.createElement("svg", {
        className: "up-chevron",
        xmlns: "http://www.w3.org/2000/svg",
        viewBox: "0 0 512 512"
      }, React.createElement("path", {
        fill: "#FFFFFF",
        d: "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"
      })) : React.createElement("svg", {
        className: "down-chevron",
        xmlns: "http://www.w3.org/2000/svg",
        viewBox: "0 0 512 512"
      }, React.createElement("path", {
        fill: "#FFFFFF",
        d: "M239 401c9.4 9.4 24.6 9.4 33.9 0L465 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-175 175L81 175c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9L239 401z"
      }))), this.state.valueDropDown1 ? React.createElement("div", {
        className: "second-dropdown-wrapper"
      }, React.createElement("label", null, this.state.data.labelTwo), React.createElement("div", {
        className: "second-dropdown-select"
      }, React.createElement("select", {
        onChange: this.navigationPage,
        onClick: this.changeSecondDropdownArrow
      }, React.createElement("option", {
        hidden: true
      }, this.state.data.hintTextTwo), results.map(function (result) {
        return React.createElement("option", {
          "data-target": result.openInNewWindow,
          "data-tracking": result.trackingValue,
          value: result.link
        }, result.result);
      })), this.state.secondDropDown ? React.createElement("svg", {
        className: "up-chevron",
        xmlns: "http://www.w3.org/2000/svg",
        viewBox: "0 0 512 512"
      }, React.createElement("path", {
        fill: "#FFFFFF",
        d: "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"
      })) : React.createElement("svg", {
        className: "down-chevron",
        xmlns: "http://www.w3.org/2000/svg",
        viewBox: "0 0 512 512"
      }, React.createElement("path", {
        fill: "#FFFFFF",
        d: "M239 401c9.4 9.4 24.6 9.4 33.9 0L465 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-175 175L81 175c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9L239 401z"
      })))) : "");
    }
  }]);

  return SlickSliderOptions;
}(React.Component);

;

var SpecialtySearchPage =
/*#__PURE__*/
function (_React$Component64) {
  _inherits(SpecialtySearchPage, _React$Component64);

  function SpecialtySearchPage(props) {
    var _this140;

    _classCallCheck(this, SpecialtySearchPage);

    _this140 = _possibleConstructorReturn(this, _getPrototypeOf(SpecialtySearchPage).call(this, props));
    var term = '';

    if (_this140.props.data.term != null) {
      term = _this140.props.data.term;
    }

    _this140.state = {
      searchTerm: term,
      payload: {},
      data: {},
      SuggestionData: {},
      showSpecialty: false
    };
    _this140._datalist = React.createRef();
    _this140._inputbox = React.createRef();
    _this140.handleInput = _this140.handleInput.bind(_assertThisInitialized(_this140));
    _this140.clearInput = _this140.clearInput.bind(_assertThisInitialized(_this140));
    _this140.handleSubmit = _this140.handleSubmit.bind(_assertThisInitialized(_this140));
    _this140.handleSuggestion = _this140.handleSuggestion.bind(_assertThisInitialized(_this140));
    _this140.checkEnter = _this140.checkEnter.bind(_assertThisInitialized(_this140));
    return _this140;
  }

  _createClass(SpecialtySearchPage, [{
    key: "handleInput",
    value: function handleInput(e) {
      var _this141 = this;

      this.setState({
        searchTerm: e.target.value
      });

      if (e.target.value.length >= 3) {
        var searchTerm = e.target.value;
        this.setState({
          showSpecialty: true,
          searchTerm: searchTerm
        });
        var url = window.location.origin;
        var target = url + '/api/search/providers/SearchAhead?';

        if (searchTerm != "" || searchTerm != null) {
          target = target.concat("Term=" + searchTerm + "&");
        }

        fetch(target).then(function (response) {
          return response.json();
        }).then(function (data) {
          _this141.setState({
            SuggestionData: data.Specialties
          });
        });
      } else {
        this.setState({
          showSpecialty: false
        });
      }
    }
  }, {
    key: "handleSuggestion",
    value: function handleSuggestion(e) {
      this._inputbox.current.value = e.target.text.trim();
      this.handleSubmit(e);
    }
  }, {
    key: "checkEnter",
    value: function checkEnter(e) {
      if (e.charCode === 13) {
        e.preventDefault();
        this.handleSubmit();
      }
    }
  }, {
    key: "handleSubmit",
    value: function handleSubmit(e) {
      e.preventDefault();
      var searchTerm = this._inputbox.current.value;
      var payload = {
        searchTerm: searchTerm
      };
      var target;

      if (window.location.href.substr(0, window.location.href.indexOf('?'))) {
        target = window.location.href.substr(0, window.location.href.indexOf('?') + 1);
      } else {
        target = window.location.href + "?";
      }

      if (payload.searchTerm != "" || payload.searchTerm != null) {
        target = target.concat("Term=" + payload.searchTerm + "&");
      }

      window.location.href = target;
    }
  }, {
    key: "clearInput",
    value: function clearInput() {
      this._inputbox.current.value = "";
      window.location.href = window.location.href.substr(0, window.location.href.indexOf("?"));
    }
  }, {
    key: "render",
    value: function render() {
      var _this142 = this;

      var specialties = this.props.data.Specialty;

      if (this.props.isEditing) {
        return React.createElement("div", null, React.createElement("h1", null, "Specialty Search"), React.createElement("p", null, "Specialty Search is not available in Editing or Preview mode."));
      } else {
        return React.createElement(React.Fragment, null, React.createElement("form", {
          onSubmit: this.handleSubmit,
          className: "specialty-tab-content"
        }, React.createElement("div", {
          class: "specialty"
        }, React.createElement("div", {
          class: "search-box"
        }, React.createElement("div", {
          class: "specialty-search-box"
        }, React.createElement("h2", {
          class: "specialty-heading"
        }, this.props.data.DictionaryData['All-Specialties-A-Z-heading']), React.createElement("div", {
          class: "specialty-search"
        }, React.createElement("div", {
          className: "input-wrapper"
        }, React.createElement("label", {
          for: "textBoxSearch",
          class: "specialty-label"
        }, this.props.data.DictionaryData['Refine-the-Specialty-Label-Text']), React.createElement("div", {
          class: "specialty-block"
        }, React.createElement("input", {
          type: "text",
          class: "search-box-input",
          autocomplete: "off",
          placeholder: this.props.data.DictionaryData['Field-hint text-Enter-Keywords'],
          onChange: this.handleInput,
          onKeyPress: this.checkEnter,
          ref: this._inputbox,
          value: this.state.searchTerm ? this.state.searchTerm : null
        })), React.createElement("div", {
          className: "specialty-suggestions " + (this.state.showSpecialty ? "active" : "")
        }, this.state.SuggestionData.length > 0 ? React.createElement("ul", null, this.state.SuggestionData.map(function (specialty) {
          return React.createElement("li", null, React.createElement("a", {
            onClick: _this142.handleSuggestion
          }, specialty.Label));
        })) : "")), React.createElement("div", {
          className: "button-wrapper"
        }, React.createElement("div", {
          class: "link button specialty-button"
        }, React.createElement("button", {
          class: "search-box-button",
          type: "submit",
          onClick: this.handleSubmit
        }, React.createElement("a", null, this.props.data.DictionaryData['Apply-button-label-text']))), React.createElement("div", {
          className: "clear-filters-wrapper"
        }, React.createElement("a", {
          class: "reset-button",
          onClick: this.clearInput
        }, this.props.data.DictionaryData['Reset-Results-link-text'])))), React.createElement("div", {
          className: "specialty-grid"
        }, specialties.map(function (specialty) {
          return React.createElement("div", {
            className: "specialty-common"
          }, React.createElement("a", {
            href: specialty.URL
          }, specialty.SpecialtyName));
        })))))));
      }
    }
  }]);

  return SpecialtySearchPage;
}(React.Component);

;