/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "https://localhost:3000/wp-content/plugins/constant-contact-forms/assets/js/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 2);
/******/ })
/************************************************************************/
/******/ ({

/***/ "./assets/js/ctct-plugin-frontend/index.js":
/*!*************************************************!*\
  !*** ./assets/js/ctct-plugin-frontend/index.js ***!
  \*************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ \"./assets/js/ctct-plugin-frontend/util.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_util__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./validation */ \"./assets/js/ctct-plugin-frontend/validation.js\");\n/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_validation__WEBPACK_IMPORTED_MODULE_1__);\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZnJvbnRlbmQvaW5kZXguanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZnJvbnRlbmQvaW5kZXguanM/NzY1OCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJy4vdXRpbCc7XG5pbXBvcnQgJy4vdmFsaWRhdGlvbic7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./assets/js/ctct-plugin-frontend/index.js\n");

/***/ }),

/***/ "./assets/js/ctct-plugin-frontend/util.js":
/*!************************************************!*\
  !*** ./assets/js/ctct-plugin-frontend/util.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/**\n * General-purpose utility stuff for CC plugin.\n */\n(function (global, $) {\n  /**\n   * Temporarily prevent the submit button from being clicked.\n   */\n  $(document).ready(function () {\n    $('.ctct-submitted').on('click', function () {\n      setTimeout(function () {\n        disableSendButton();\n        setTimeout(enableSendButton, 3000);\n      }, 100);\n    });\n  });\n  /**\n   * Disable form submit button.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   *\n   * @return {mixed} jQuery if attribute is set, undefined if not.\n   */\n\n  function disableSendButton() {\n    return $('.ctct-submitted').attr('disabled', 'disabled');\n  }\n  /**\n   * Re-enable form submit buttons.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   *\n   * @return {mixed} jQuery if attribute is set, undefined if not.\n   */\n\n\n  function enableSendButton() {\n    return $('.ctct-submitted').attr('disabled', null);\n  }\n})(window, jQuery);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZnJvbnRlbmQvdXRpbC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IHN1Ym1pdCBidXR0b25zLlxuXHQgKlxuXHQgKiBAYXV0aG9yIENvbnN0YW50IENvbnRhY3Rcblx0ICogQHNpbmNlIDEuMC4wXG5cdCAqXG5cdCAqIEByZXR1cm4ge21peGVkfSBqUXVlcnkgaWYgYXR0cmlidXRlIGlzIHNldCwgdW5kZWZpbmVkIGlmIG5vdC5cblx0ICovXG5cdGZ1bmN0aW9uIGVuYWJsZVNlbmRCdXR0b24oKSB7XG5cdFx0cmV0dXJuICQoICcuY3RjdC1zdWJtaXR0ZWQnICkuYXR0ciggJ2Rpc2FibGVkJywgbnVsbCApO1xuXHR9XG5cbn0gKCB3aW5kb3csIGpRdWVyeSApICk7XG4iXSwibWFwcGluZ3MiOiJBQUFBOzs7QUFHQTtBQUVBOzs7QUFHQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7Ozs7Ozs7OztBQVFBO0FBQ0E7QUFDQTtBQUVBOzs7Ozs7Ozs7O0FBUUE7QUFDQTtBQUNBO0FBRUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./assets/js/ctct-plugin-frontend/util.js\n");

/***/ }),

/***/ "./assets/js/ctct-plugin-frontend/validation.js":
/*!******************************************************!*\
  !*** ./assets/js/ctct-plugin-frontend/validation.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/**\n * Front-end form validation.\n *\n * @since 1.0.0\n */\nwindow.CTCTSupport = {};\n\n(function (window, $, app) {\n  var _this = this;\n\n  /**\n   * @constructor\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   */\n  app.init = function () {\n    app.cache();\n    app.bindEvents();\n    app.removePlaceholder();\n  };\n  /**\n   * Remove placeholder text values.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   */\n\n\n  app.removePlaceholder = function () {\n    $('.ctct-form-field input, textarea').focus(function () {\n      $(_this).data('placeholder', $(_this).attr('placeholder')).attr('placeholder', '');\n    }).blur(function () {\n      $(_this).attr('placeholder', $(_this).data('placeholder'));\n    });\n  };\n  /**\n   * Cache DOM elements.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   */\n\n\n  app.cache = function () {\n    app.$c = {\n      $forms: []\n    }; // Cache each form on the page.\n\n    $('.ctct-form-wrapper').each(function (i, formWrapper) {\n      app.$c.$forms.push($(formWrapper).find('form'));\n    }); // For each form, cache its common elements.\n\n    $.each(app.$c.$forms, function (i, form) {\n      var $form = $(form);\n      app.$c.$forms[i].$honeypot = $form.find('.ctct_usage_field');\n      app.$c.$forms[i].$submitButton = $form.find('input[type=submit]');\n      app.$c.$forms[i].$recaptcha = $form.find('.g-recaptcha');\n    });\n    app.timeout = null;\n  };\n  /**\n   * Remove the ctct-invalid class from elements that have it.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   */\n\n\n  app.setAllInputsValid = function () {\n    $(app.$c.$form + ' .ctct-invalid').removeClass('ctct-invalid');\n  };\n  /**\n   * Adds .ctct-invalid HTML class to inputs whose values are invalid.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   *\n   * @param {object} error AJAX response error object.\n   */\n\n\n  app.processError = function (error) {\n    // If we have an id property set.\n    if ('undefined' !== typeof error.id) {\n      $('#' + error.id).addClass('ctct-invalid');\n    }\n  };\n  /**\n   * Check the value of the hidden honeypot field; disable form submission button if anything in it.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   *\n   * @param {object} e The change or keyup event triggering this callback.\n   * @param {object} $honeyPot The jQuery object for the actual input field being checked.\n   * @param {object} $submitButton The jQuery object for the submit button in the same form as the honeypot field.\n   */\n\n\n  app.checkHoneypot = function (e, $honeyPot, $submitButton) {\n    // If there is text in the honeypot, disable the submit button\n    if (0 < $honeyPot.val().length) {\n      $submitButton.attr('disabled', 'disabled');\n    } else {\n      $submitButton.attr('disabled', false);\n    }\n  };\n  /**\n   * Ensures that we should use AJAX to process the specified form, and that all required fields are not empty.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   *\n   * @param {object} $form jQuery object for the form being validated.\n   * @return {boolean} False if AJAX processing is disabled for this form or if a required field is empty.\n   */\n\n\n  app.validateSubmission = function ($form) {\n    if ('on' !== $form.attr('data-doajax')) {\n      return false;\n    } // Ensure all required fields in this form are valid.\n\n\n    $.each($form.find('[required]'), function (i, field) {\n      if (false === field.checkValidity()) {\n        return false;\n      }\n    });\n    return true;\n  };\n  /**\n   * Prepends form with a message that fades out in 5 seconds.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   *\n   * @param {object} $form jQuery object for the form a message is being displayed for.\n   * @param {string} message The message content.\n   * @param {string} classes Optional. HTML classes to add to the message wrapper.\n   */\n\n\n  app.showMessage = function ($form, message) {\n    var classes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n    var role = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'log';\n    var $wrapper = $form.parents('.ctct-form-wrapper');\n    $wrapper.find('p.ctct-message').remove();\n    var $p = $('<p />', {\n      'class': 'ctct-message ' + classes,\n      'text': message,\n      'role': role\n    }).prepend($('<button />', {\n      'class': 'button button-secondary ctct-dismiss ctct-dismiss-ajax-notice',\n      'html': '&#10005;',\n      'aria-label': 'Dismiss Notification'\n    }));\n    $p.insertBefore($form).fadeIn(200);\n    $wrapper.find('.ctct-dismiss-ajax-notice').on('click', function () {\n      $(this).parents('.ctct-message').remove();\n    });\n  };\n  /**\n   * Submits the actual form via AJAX.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   *\n   * @param {object} $form jQuery object for the form being submitted.\n   */\n\n\n  app.submitForm = function ($form) {\n    $form.find('.ctct-submitted').prop('disabled', true);\n    var ajaxData = {\n      'action': 'ctct_process_form',\n      'data': $form.serialize()\n    };\n    $.post(window.ajaxurl, ajaxData, function (response) {\n      $form.find('.ctct-submitted').prop('disabled', false);\n\n      if ('undefined' === typeof response.status) {\n        return false;\n      } // Here we'll want to disable the submit button and add some error classes.\n\n\n      if ('success' !== response.status) {\n        if ('undefined' !== typeof response.errors) {\n          app.setAllInputsValid();\n          response.errors.forEach(app.processError);\n        } else {\n          app.showMessage($form, response.message, 'ctct-error', 'alert');\n        }\n\n        return false;\n      } // If we're here, the submission was a success; show message and reset form fields.\n\n\n      app.showMessage($form, response.message, 'ctct-success', 'status');\n      $form[0].reset();\n    });\n  };\n  /**\n   * Handle the form submission.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   *\n   * @param {object} e The submit event.\n   * @param {object} $form jQuery object for the current form being handled.\n   * @return {boolean} False if unable to validate the form.\n   */\n\n\n  app.handleSubmission = function (e, $form) {\n    if (!app.validateSubmission($form)) {\n      return false;\n    }\n\n    e.preventDefault();\n    clearTimeout(app.timeout);\n    app.timeout = setTimeout(app.submitForm, 500, $form);\n  };\n  /**\n   * Set up event bindings and callbacks.\n   *\n   * @author Constant Contact\n   * @since 1.0.0\n   */\n\n\n  app.bindEvents = function () {\n    // eslint-disable-next-line no-unused-vars\n    $.each(app.$c.$forms, function (i, form) {\n      // Attach submission handler to each form's Submit button.\n      app.$c.$forms[i].on('click', 'input[type=submit]', function (e) {\n        app.handleSubmission(e, app.$c.$forms[i]);\n      }); // Ensure each form's honeypot is checked.\n\n      app.$c.$forms[i].$honeypot.on('change keyup', function (e) {\n        app.checkHoneypot(e, app.$c.$forms[i].$honeypot, app.$c.$forms[i].$submitButton);\n      }); // Disable the submit button by default until the captcha is passed (if captcha exists).\n\n      if (0 < app.$c.$forms[i].$recaptcha.length) {\n        app.$c.$forms[i].$submitButton.attr('disabled', 'disabled');\n      }\n    });\n  };\n\n  $(app.init);\n})(window, jQuery, window.CTCTSupport);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./assets/js/ctct-plugin-frontend/validation.js\n");

/***/ }),

/***/ 2:
/*!*******************************************************!*\
  !*** multi ./assets/js/ctct-plugin-frontend/index.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ./assets/js/ctct-plugin-frontend/index.js */"./assets/js/ctct-plugin-frontend/index.js");


/***/ })

/******/ });