Conditional Fields for Contact Form 7 - Version 1.7.9

Version Description

(01-22-20) = * PRO (01-02-20) Added quick fix for problem with [_format_date "d m Y"] inside repeater. (see: https://github.com/pwkip/contact-form-7-conditional-fields/issues/38) * (01-22-20) Fixed Ajax by adding global wpcf7cf variable to window. * Changed min PHP version to 5.6 (might still be compatible with 5.4, but I suspect some edge case errors with older versions of PHP)

Download this release

Release Info

Developer Jules Colle
Plugin Icon 128x128 Conditional Fields for Contact Form 7
Version 1.7.9
Comparing to
See all releases

Code changes from version 1.7.8 to 1.7.9

Wpcf7cfMailParser.php CHANGED
@@ -53,7 +53,8 @@ class Wpcf7cfMailParser {
53
 
54
  for ($i=1; $i<=$num_subs; $i++) {
55
  $str = preg_replace(["/\[{$original_name}\:index[^\]]*?\]/"],$i,$inner_template);
56
- echo str_replace(']','__'.$i.']',$str);
 
57
  }
58
 
59
  $underscored_content = ob_get_clean();
53
 
54
  for ($i=1; $i<=$num_subs; $i++) {
55
  $str = preg_replace(["/\[{$original_name}\:index[^\]]*?\]/"],$i,$inner_template);
56
+ //echo str_replace(']','__'.$i.']',$str);
57
+ echo preg_replace("/\[([^\s^\]]*?)([\s\]]+)([^\]]*?)/", "[$1__{$i}$2",$str);
58
  }
59
 
60
  $underscored_content = ob_get_clean();
contact-form-7-conditional-fields.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Form 7 Conditional Fields
4
  Plugin URI: http://bdwm.be/
5
  Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
6
  Author: Jules Colle
7
- Version: 1.7.8
8
  Author URI: http://bdwm.be/
9
  */
10
 
4
  Plugin URI: http://bdwm.be/
5
  Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
6
  Author: Jules Colle
7
+ Version: 1.7.9
8
  Author URI: http://bdwm.be/
9
  */
10
 
init.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '1.7.8' );
4
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
5
  if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
6
  if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) );
1
  <?php
2
 
3
+ if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '1.7.9' );
4
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
5
  if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
6
  if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) );
js/scripts.js CHANGED
@@ -97,9 +97,6 @@
97
  __webpack_require__.r(__webpack_exports__);
98
  /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
99
  /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
100
- /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js");
101
- /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);
102
-
103
 
104
 
105
 
@@ -205,14 +202,14 @@ var Wpcf7cfForm = function Wpcf7cfForm($form) {
205
  var $multistep = jQuery('.wpcf7cf_multistep', $form);
206
 
207
  if ($multistep.length) {
208
- form.multistep = new Wpcf7cfMultistep($multistep, form); // wpcf7cf.updateMultistepState(form.multistep);
209
  } // END PRO ONLY
210
 
211
  };
212
 
213
  Wpcf7cfForm.prototype.displayFields = function () {
214
  var form = this;
215
- wpcf7cf.get_simplified_dom_model(form.$form);
216
  var unit_tag = this.unit_tag;
217
  var wpcf7cf_conditions = this.conditions;
218
  var wpcf7cf_settings = this.settings; //for compatibility with contact-form-7-signature-addon
@@ -233,7 +230,7 @@ Wpcf7cfForm.prototype.displayFields = function () {
233
 
234
  for (var i = 0; i < wpcf7cf_conditions.length; i++) {
235
  var condition = wpcf7cf_conditions[i];
236
- var show_group = wpcf7cf.should_group_be_shown(condition, form.$form);
237
 
238
  if (show_group) {
239
  jQuery('[data-id=' + condition.then_field + ']', form.$form).eq(0).removeClass('wpcf7cf-hidden');
@@ -302,7 +299,7 @@ Wpcf7cfForm.prototype.updateHiddenFields = function () {
302
  Wpcf7cfForm.prototype.updateGroups = function () {
303
  var form = this;
304
  form.$groups = form.$form.find('[data-class="wpcf7cf_group"]');
305
- form.conditions = wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);
306
  };
307
 
308
  Wpcf7cfForm.prototype.updateEventListeners = function () {
@@ -486,7 +483,7 @@ Wpcf7cfRepeater.prototype.addSubs = function (subs_to_add) {
486
  return item.params.$repeater.id;
487
  })));
488
  $repeater.num_subs += subs_to_add;
489
- wpcf7cf.updateMultistepState(form.multistep);
490
  form.updateGroups();
491
  form.updateEventListeners();
492
  form.displayFields(); // Exclusive Checkbox
@@ -515,7 +512,7 @@ Wpcf7cfRepeater.prototype.removeSubs = function (num_subs) {
515
 
516
  $this.remove();
517
  params.$repeater.trigger('wpcf7cf_repeater_removed');
518
- wpcf7cf.updateMultistepState(form.multistep);
519
  form.updateGroups();
520
  form.updateEventListeners();
521
  form.displayFields();
@@ -540,18 +537,14 @@ function Wpcf7cfMultistep($multistep, form) {
540
  multistep.$dots.append("\n <div class=\"dot\" data-step=\"".concat(i, "\">\n <div class=\"step-index\">").concat(i, "</div>\n <div class=\"step-title\">").concat(multistep.$steps.eq(i - 1).data('title'), "</div>\n </div>\n "));
541
  }
542
 
543
- multistep.$btn_next.on('click.wpcf7cf_step',
544
- /*#__PURE__*/
545
- _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(
546
- /*#__PURE__*/
547
- _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {
548
  var result;
549
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
550
  while (1) {
551
  switch (_context.prev = _context.next) {
552
  case 0:
553
  _context.next = 2;
554
- return multistep.validateStep(multistep.current_step);
555
 
556
  case 2:
557
  result = _context.sent;
@@ -566,8 +559,8 @@ function Wpcf7cfMultistep($multistep, form) {
566
  return _context.stop();
567
  }
568
  }
569
- }, _callee);
570
- })));
571
  multistep.$btn_prev.click(function () {
572
  multistep.moveToStep(multistep.current_step - 1);
573
  });
@@ -649,11 +642,11 @@ Wpcf7cfMultistep.prototype.moveToStep = function (step_index) {
649
  multistep.$steps.hide();
650
  multistep.$steps.eq(multistep.current_step - 1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.current_step]); // change step;
651
 
652
- wpcf7cf.updateMultistepState(multistep);
653
  };
654
 
655
  Wpcf7cfMultistep.prototype.getFieldsInStep = function (step_index) {
656
- var simpleDom = wpcf7cf.get_simplified_dom_model(this.form.$form);
657
  var inStep = false;
658
  return simpleDom.filter(function (item, i) {
659
  if (item.type == 'step') {
@@ -667,14 +660,14 @@ Wpcf7cfMultistep.prototype.getFieldsInStep = function (step_index) {
667
  }; // END PRO ONLY
668
 
669
 
670
- var wpcf7cf = {
671
  // keep this for backwards compatibility
672
  initForm: function initForm($form) {
673
  wpcf7cf_forms.push(new Wpcf7cfForm($form));
674
  },
675
  get_nested_conditions: function get_nested_conditions(conditions, $current_form) {
676
  //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index
677
- var simplified_dom = wpcf7cf.get_simplified_dom_model($current_form);
678
  var groups = simplified_dom.filter(function (item, i) {
679
  return item.type === 'group';
680
  });
@@ -934,53 +927,6 @@ jQuery.fn.wpcf7ExclusiveCheckbox = function () {
934
 
935
  /***/ }),
936
 
937
- /***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js":
938
- /*!*****************************************************************!*\
939
- !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
940
- \*****************************************************************/
941
- /*! no static exports found */
942
- /***/ (function(module, exports) {
943
-
944
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
945
- try {
946
- var info = gen[key](arg);
947
- var value = info.value;
948
- } catch (error) {
949
- reject(error);
950
- return;
951
- }
952
-
953
- if (info.done) {
954
- resolve(value);
955
- } else {
956
- Promise.resolve(value).then(_next, _throw);
957
- }
958
- }
959
-
960
- function _asyncToGenerator(fn) {
961
- return function () {
962
- var self = this,
963
- args = arguments;
964
- return new Promise(function (resolve, reject) {
965
- var gen = fn.apply(self, args);
966
-
967
- function _next(value) {
968
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
969
- }
970
-
971
- function _throw(err) {
972
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
973
- }
974
-
975
- _next(undefined);
976
- });
977
- };
978
- }
979
-
980
- module.exports = _asyncToGenerator;
981
-
982
- /***/ }),
983
-
984
  /***/ "./node_modules/@babel/runtime/regenerator/index.js":
985
  /*!**********************************************************!*\
986
  !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
97
  __webpack_require__.r(__webpack_exports__);
98
  /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
99
  /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
 
 
 
100
 
101
 
102
 
202
  var $multistep = jQuery('.wpcf7cf_multistep', $form);
203
 
204
  if ($multistep.length) {
205
+ form.multistep = new Wpcf7cfMultistep($multistep, form); // window.wpcf7cf.updateMultistepState(form.multistep);
206
  } // END PRO ONLY
207
 
208
  };
209
 
210
  Wpcf7cfForm.prototype.displayFields = function () {
211
  var form = this;
212
+ window.wpcf7cf.get_simplified_dom_model(form.$form);
213
  var unit_tag = this.unit_tag;
214
  var wpcf7cf_conditions = this.conditions;
215
  var wpcf7cf_settings = this.settings; //for compatibility with contact-form-7-signature-addon
230
 
231
  for (var i = 0; i < wpcf7cf_conditions.length; i++) {
232
  var condition = wpcf7cf_conditions[i];
233
+ var show_group = window.wpcf7cf.should_group_be_shown(condition, form.$form);
234
 
235
  if (show_group) {
236
  jQuery('[data-id=' + condition.then_field + ']', form.$form).eq(0).removeClass('wpcf7cf-hidden');
299
  Wpcf7cfForm.prototype.updateGroups = function () {
300
  var form = this;
301
  form.$groups = form.$form.find('[data-class="wpcf7cf_group"]');
302
+ form.conditions = window.wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);
303
  };
304
 
305
  Wpcf7cfForm.prototype.updateEventListeners = function () {
483
  return item.params.$repeater.id;
484
  })));
485
  $repeater.num_subs += subs_to_add;
486
+ window.wpcf7cf.updateMultistepState(form.multistep);
487
  form.updateGroups();
488
  form.updateEventListeners();
489
  form.displayFields(); // Exclusive Checkbox
512
 
513
  $this.remove();
514
  params.$repeater.trigger('wpcf7cf_repeater_removed');
515
+ window.wpcf7cf.updateMultistepState(form.multistep);
516
  form.updateGroups();
517
  form.updateEventListeners();
518
  form.displayFields();
537
  multistep.$dots.append("\n <div class=\"dot\" data-step=\"".concat(i, "\">\n <div class=\"step-index\">").concat(i, "</div>\n <div class=\"step-title\">").concat(multistep.$steps.eq(i - 1).data('title'), "</div>\n </div>\n "));
538
  }
539
 
540
+ multistep.$btn_next.on('click.wpcf7cf_step', function _callee() {
 
 
 
 
541
  var result;
542
+ return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.async(function _callee$(_context) {
543
  while (1) {
544
  switch (_context.prev = _context.next) {
545
  case 0:
546
  _context.next = 2;
547
+ return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.awrap(multistep.validateStep(multistep.current_step));
548
 
549
  case 2:
550
  result = _context.sent;
559
  return _context.stop();
560
  }
561
  }
562
+ });
563
+ });
564
  multistep.$btn_prev.click(function () {
565
  multistep.moveToStep(multistep.current_step - 1);
566
  });
642
  multistep.$steps.hide();
643
  multistep.$steps.eq(multistep.current_step - 1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.current_step]); // change step;
644
 
645
+ window.wpcf7cf.updateMultistepState(multistep);
646
  };
647
 
648
  Wpcf7cfMultistep.prototype.getFieldsInStep = function (step_index) {
649
+ var simpleDom = window.wpcf7cf.get_simplified_dom_model(this.form.$form);
650
  var inStep = false;
651
  return simpleDom.filter(function (item, i) {
652
  if (item.type == 'step') {
660
  }; // END PRO ONLY
661
 
662
 
663
+ window.wpcf7cf = {
664
  // keep this for backwards compatibility
665
  initForm: function initForm($form) {
666
  wpcf7cf_forms.push(new Wpcf7cfForm($form));
667
  },
668
  get_nested_conditions: function get_nested_conditions(conditions, $current_form) {
669
  //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index
670
+ var simplified_dom = window.wpcf7cf.get_simplified_dom_model($current_form);
671
  var groups = simplified_dom.filter(function (item, i) {
672
  return item.type === 'group';
673
  });
927
 
928
  /***/ }),
929
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
930
  /***/ "./node_modules/@babel/runtime/regenerator/index.js":
931
  /*!**********************************************************!*\
932
  !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
js/scripts.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/scripts_es6.js","webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///(webpack)/buildin/module.js"],"names":["cf7signature_resized","wpcf7cf_timeout","wpcf7cf_show_animation","wpcf7cf_hide_animation","wpcf7cf_show_step_animation","wpcf7cf_hide_step_animation","wpcf7cf_change_events","wpcf7cf_forms","String","prototype","endsWith","search","this_len","undefined","length","substring","Wpcf7cfForm","$form","options_element","find","eq","val","form","form_options","JSON","parse","$input_hidden_group_fields","$input_hidden_groups","$input_visible_groups","$input_repeaters","$input_steps","unit_tag","closest","attr","conditions","i","condition","and_rules","if_field","if_value","operator","initial_conditions","settings","$groups","jQuery","repeaters","multistep","fields","animation_intime","parseInt","animation_outtime","animation","updateGroups","updateEventListeners","displayFields","on","e","data","setTimeout","each","push","Wpcf7cfRepeater","stringify","map","item","params","$repeater","id","$multistep","Wpcf7cfMultistep","wpcf7cf","get_simplified_dom_model","wpcf7cf_conditions","wpcf7cf_settings","signatures","constructor","Array","canvas","width","$sig_canvas","$sig_wrap","height","addClass","show_group","should_group_be_shown","then_field","removeClass","index","$group","is","finish","css","hasClass","prop","show","trigger","animate","$inputs","not","$this","defaultValue","defaultChecked","change","hide","updateHiddenFields","hidden_fields","hidden_groups","visible_groups","get_nested_conditions","off","clearTimeout","text","$","repeater","num_subs","orig_id","min","max","initial_subs","$repeater_sub","children","$repeater_controls","$repeater_sub_clone","clone","addBack","prev_suffix","new_suffix","prev_name","orig_name","new_name","replace","prev_data_id","orig_data_id","new_data_id","prev_id","new_id","prev_for","orig_for","new_for","repeater_sub_html","outerHTML","$repeater_count_field","$button_add","$button_remove","click","updateSubs","remove","subs_to_show","subs_to_add","removeSubs","addSubs","showButtonRemove","showButtonAdd","html_str","sub_suffix","RegExp","$html","insertBefore","updateMultistepState","name","window","cf7mdInit","slice","duration","done","$steps","$btn_next","$btn_prev","$dots","current_step","numSteps","html","append","validateStep","result","console","log","moveToStep","step_index","Promise","resolve","fd","FormData","formdata","serializeArray","key","input","value","ajax","url","wpcf7cf_global_settings","ajaxurl","type","processData","contentType","dataType","json","_cf7mls_db_form_data_id","success","checkError","invalid_fields","el","controlWrap","reason","message","fail","always","previousStep","getFieldsInStep","simpleDom","inStep","filter","step","initForm","$current_form","simplified_dom","groups","sub_conditions","g","relevant_conditions","original_name","and_rule","suffix","concat","currentNode","ni","document","createNodeIterator","NodeFilter","SHOW_ELEMENT","nextNode","classList","contains","dataset","className","hasAttribute","getAttribute","original_name_length","stepsData","currentStep","fieldsInCurrentStep","$submit_button","$submit_clone","parent","and_rule_i","condition_ok","condition_and_rule","$field","if_val","if_val_as_number","isFinite","parseFloat","regex_patt","isValidRegex","$option","option_val","test","field_val","field_val_as_number","field_is_checked","all_values","checked_values","checked_value_index","inArray","value_index","ind","checked_val","checked_val_as_number","ready","forEach","f","old_wpcf7ExclusiveCheckbox","fn","wpcf7ExclusiveCheckbox","asyncGeneratorStep","gen","reject","_next","_throw","arg","info","error","then","_asyncToGenerator","self","args","arguments","apply","err","module","exports","require","runtime","Op","Object","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","obj","call","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","displayName","defineIteratorMethods","method","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","__await","AsyncIterator","invoke","record","unwrapped","previousPromise","enqueue","callInvokeWithMethodAndArg","async","iter","next","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","nextLoc","toString","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","keys","object","reverse","pop","iterable","iteratorMethod","isNaN","skipTempReset","prev","charAt","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","webpackPolyfill","deprecate","paths","defineProperty","enumerable","get","l"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAAA;AAAa;;;;AAEb,IAAIA,oBAAoB,GAAG,CAA3B,C,CAA8B;;AAE9B,IAAIC,eAAJ;AAEA,IAAIC,sBAAsB,GAAG;AAAE,YAAU,MAAZ;AAAoB,eAAa,MAAjC;AAAyC,kBAAgB,MAAzD;AAAiE,gBAAc,MAA/E;AAAuF,mBAAiB;AAAxG,CAA7B;AACA,IAAIC,sBAAsB,GAAG;AAAE,YAAU,MAAZ;AAAoB,eAAa,MAAjC;AAAyC,kBAAgB,MAAzD;AAAiE,gBA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4B,CAG5B;;AACA,QAAI,CAACvH,MAAM,CAACzK,QAAZ,EAAsByK,MAAM,CAACzK,QAAP,GAAkB,EAAlB;AACtB8K,UAAM,CAACmH,cAAP,CAAsBxH,MAAtB,EAA8B,QAA9B,EAAwC;AACvCyH,gBAAU,EAAE,IAD2B;AAEvCC,SAAG,EAAE,eAAW;AACf,eAAO1H,MAAM,CAAC2H,CAAd;AACA;AAJsC,KAAxC;AAMAtH,UAAM,CAACmH,cAAP,CAAsBxH,MAAtB,EAA8B,IAA9B,EAAoC;AACnCyH,gBAAU,EAAE,IADuB;AAEnCC,SAAG,EAAE,eAAW;AACf,eAAO1H,MAAM,CAAC9P,CAAd;AACA;AAJkC,KAApC;AAMA8P,UAAM,CAACqH,eAAP,GAAyB,CAAzB;AACA;;AACD,SAAOrH,MAAP;AACA,CArBD,C","file":"scripts.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./js/scripts_es6.js\");\n","\"use strict\";\n\nvar cf7signature_resized = 0; // for compatibility with contact-form-7-signature-addon\n\nvar wpcf7cf_timeout;\n\nvar wpcf7cf_show_animation = { \"height\": \"show\", \"marginTop\": \"show\", \"marginBottom\": \"show\", \"paddingTop\": \"show\", \"paddingBottom\": \"show\" };\nvar wpcf7cf_hide_animation = { \"height\": \"hide\", \"marginTop\": \"hide\", \"marginBottom\": \"hide\", \"paddingTop\": \"hide\", \"paddingBottom\": \"hide\" };\n\nvar wpcf7cf_show_step_animation = { \"opacity\": \"show\" };\nvar wpcf7cf_hide_step_animation = { \"opacity\": \"hide\" };\n\nvar wpcf7cf_change_events = 'input.wpcf7cf paste.wpcf7cf change.wpcf7cf click.wpcf7cf propertychange.wpcf7cf';\n\nvar wpcf7cf_forms = [];\n\n// endswith polyfill\nif (!String.prototype.endsWith) {\n\tString.prototype.endsWith = function(search, this_len) {\n\t\tif (this_len === undefined || this_len > this.length) {\n\t\t\tthis_len = this.length;\n\t\t}\n\t\treturn this.substring(this_len - search.length, this_len) === search;\n\t};\n}\n\nvar Wpcf7cfForm = function($form) {\n\n var options_element = $form.find('input[name=\"_wpcf7cf_options\"]').eq(0);\n if (!options_element.length || !options_element.val()) {\n // doesn't look like a CF7 form created with conditional fields plugin enabled.\n return false;\n }\n\n var form = this;\n\n var form_options = JSON.parse(options_element.val());\n\n form.$form = $form;\n form.$input_hidden_group_fields = $form.find('[name=\"_wpcf7cf_hidden_group_fields\"]');\n form.$input_hidden_groups = $form.find('[name=\"_wpcf7cf_hidden_groups\"]');\n form.$input_visible_groups = $form.find('[name=\"_wpcf7cf_visible_groups\"]');\n form.$input_repeaters = $form.find('[name=\"_wpcf7cf_repeaters\"]');\n form.$input_steps = $form.find('[name=\"_wpcf7cf_steps\"]');\n\n form.unit_tag = $form.closest('.wpcf7').attr('id');\n form.conditions = form_options['conditions'];\n\n // compatibility with conditional forms created with older versions of the plugin ( < 1.4 )\n for (var i=0; i < form.conditions.length; i++) {\n var condition = form.conditions[i];\n if (!('and_rules' in condition)) {\n condition.and_rules = [{'if_field':condition.if_field,'if_value':condition.if_value,'operator':condition.operator}];\n }\n }\n\n form.initial_conditions = form.conditions;\n form.settings = form_options['settings'];\n\n form.$groups = jQuery(); // empty jQuery set\n form.repeaters = [];\n form.multistep = null;\n form.fields = [];\n\n form.settings.animation_intime = parseInt(form.settings.animation_intime);\n form.settings.animation_outtime = parseInt(form.settings.animation_outtime);\n\n if (form.settings.animation === 'no') {\n form.settings.animation_intime = 0;\n form.settings.animation_outtime = 0;\n }\n\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n // bring form in initial state if the reset event is fired on it.\n form.$form.on('reset', form, function(e) {\n var form = e.data;\n setTimeout(function(){\n form.displayFields();\n },200);\n });\n\n // PRO ONLY\n\n jQuery('.wpcf7cf_repeater:not(.wpcf7cf_repeater .wpcf7cf_repeater)', $form).each(function(){\n form.repeaters.push(new Wpcf7cfRepeater(jQuery(this),form));\n });\n\n form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));\n\n var $multistep = jQuery('.wpcf7cf_multistep', $form);\n\n if ($multistep.length) {\n form.multistep = new Wpcf7cfMultistep($multistep, form);\n // wpcf7cf.updateMultistepState(form.multistep);\n }\n\n // END PRO ONLY\n\n}\nWpcf7cfForm.prototype.displayFields = function() {\n\n var form = this;\n\n wpcf7cf.get_simplified_dom_model(form.$form);\n\n var unit_tag = this.unit_tag;\n var wpcf7cf_conditions = this.conditions;\n var wpcf7cf_settings = this.settings;\n\n //for compatibility with contact-form-7-signature-addon\n if (cf7signature_resized === 0 && typeof signatures !== 'undefined' && signatures.constructor === Array && signatures.length > 0 ) {\n for (var i = 0; i < signatures.length; i++) {\n if (signatures[i].canvas.width === 0) {\n\n var $sig_canvas = jQuery(\".wpcf7-form-control-signature-body>canvas\");\n var $sig_wrap = jQuery(\".wpcf7-form-control-signature-wrap\");\n $sig_canvas.eq(i).attr('width', $sig_wrap.width());\n $sig_canvas.eq(i).attr('height', $sig_wrap.height());\n\n cf7signature_resized = 1;\n }\n }\n }\n\n form.$groups.addClass('wpcf7cf-hidden');\n\n for (var i=0; i < wpcf7cf_conditions.length; i++) {\n\n var condition = wpcf7cf_conditions[i];\n\n var show_group = wpcf7cf.should_group_be_shown(condition, form.$form);\n\n if (show_group) {\n jQuery('[data-id='+condition.then_field+']',form.$form).eq(0).removeClass('wpcf7cf-hidden');\n }\n }\n\n var animation_intime = wpcf7cf_settings.animation_intime;\n var animation_outtime = wpcf7cf_settings.animation_outtime;\n\n form.$groups.each(function (index) {\n var $group = jQuery(this);\n if ($group.is(':animated')) $group.finish(); // stop any current animations on the group\n if ($group.css('display') === 'none' && !$group.hasClass('wpcf7cf-hidden')) {\n if ($group.prop('tagName') === 'SPAN') {\n $group.show().trigger('wpcf7cf_show_group');\n } else {\n $group.animate(wpcf7cf_show_animation, animation_intime).trigger('wpcf7cf_show_group'); // show\n }\n } else if ($group.css('display') !== 'none' && $group.hasClass('wpcf7cf-hidden')) {\n\n if ($group.attr('data-clear_on_hide') !== undefined) {\n var $inputs = jQuery(':input', $group).not(':button, :submit, :reset, :hidden');\n\n $inputs.each(function(){\n var $this = jQuery(this);\n $this.val(this.defaultValue);\n $this.prop('checked', this.defaultChecked);\n });\n\n $inputs.change();\n //display_fields();\n }\n\n if ($group.prop('tagName') === 'SPAN') {\n $group.hide().trigger('wpcf7cf_hide_group');\n } else {\n $group.animate(wpcf7cf_hide_animation, animation_outtime).trigger('wpcf7cf_hide_group'); // hide\n }\n\n }\n });\n\n form.updateHiddenFields();\n};\nWpcf7cfForm.prototype.updateHiddenFields = function() {\n\n var form = this;\n\n var hidden_fields = [];\n var hidden_groups = [];\n var visible_groups = [];\n\n form.$groups.each(function () {\n var $this = jQuery(this);\n if ($this.hasClass('wpcf7cf-hidden')) {\n hidden_groups.push($this.data('id'));\n $this.find('input,select,textarea').each(function () {\n hidden_fields.push(jQuery(this).attr('name'));\n });\n } else {\n visible_groups.push($this.data('id'));\n }\n });\n\n form.hidden_fields = hidden_fields;\n form.hidden_groups = hidden_groups;\n form.visible_groups = visible_groups;\n\n form.$input_hidden_group_fields.val(JSON.stringify(hidden_fields));\n form.$input_hidden_groups.val(JSON.stringify(hidden_groups));\n form.$input_visible_groups.val(JSON.stringify(visible_groups));\n\n return true;\n};\nWpcf7cfForm.prototype.updateGroups = function() {\n var form = this;\n form.$groups = form.$form.find('[data-class=\"wpcf7cf_group\"]');\n\n form.conditions = wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);\n\n};\nWpcf7cfForm.prototype.updateEventListeners = function() {\n\n var form = this;\n\n // monitor input changes, and call display_fields() if something has changed\n jQuery('input, select, textarea, button',form.$form).not('.wpcf7cf_add, .wpcf7cf_remove').off(wpcf7cf_change_events).on(wpcf7cf_change_events,form, function(e) {\n var form = e.data;\n clearTimeout(wpcf7cf_timeout);\n wpcf7cf_timeout = setTimeout(function() {\n form.displayFields();\n }, 100);\n });\n\n // PRO ONLY\n jQuery('.wpcf7cf-togglebutton', form.$form).off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf',function() {\n var $this = jQuery(this);\n if ($this.text() === $this.data('val-1')) {\n $this.text($this.data('val-2'));\n $this.val($this.data('val-2'));\n } else {\n $this.text($this.data('val-1'));\n $this.val($this.data('val-1'));\n }\n });\n // END PRO ONLY\n};\n\n// PRO ONLY\nfunction Wpcf7cfRepeater($repeater, form) {\n var $ = jQuery;\n\n var repeater = this;\n\n var wpcf7cf_settings = form.settings;\n\n repeater.form = form;\n\n $repeater.num_subs = 0;\n $repeater.id = $repeater.data('id');\n $repeater.orig_id = $repeater.data('orig_data_id');\n $repeater.min = typeof( $repeater.data('min')) !== 'undefined' ? parseInt($repeater.data('min')) : 1;\n $repeater.max = typeof( $repeater.data('max')) !== 'undefined' ? parseInt($repeater.data('max')) : 200;\n $repeater.initial_subs = typeof( $repeater.data('initial')) !== 'undefined' ? parseInt($repeater.data('initial')) : $repeater.min;\n if ($repeater.initial_subs > $repeater.max) $repeater.initial_subs = $repeater.max;\n var $repeater_sub = $repeater.children('.wpcf7cf_repeater_sub').eq(0);\n var $repeater_controls = $repeater.children('.wpcf7cf_repeater_controls').eq(0);\n\n var $repeater_sub_clone = $repeater_sub.clone();\n\n $repeater_sub_clone.find('.wpcf7cf_repeater_sub').addBack('.wpcf7cf_repeater_sub').each(function() {\n var $this = jQuery(this);\n var prev_suffix = $this.attr('data-repeater_sub_suffix');\n var new_suffix = prev_suffix+'__{{repeater_sub_suffix}}';\n $this.attr('data-repeater_sub_suffix', new_suffix);\n });\n\n $repeater_sub_clone.find('[name]').each(function() {\n var $this = jQuery(this);\n var prev_name = $this.attr('name');\n var orig_name = $this.attr('data-orig_name') != null ? $this.attr('data-orig_name') : prev_name;\n var new_name = prev_name+'__{{repeater_sub_suffix}}';\n\n if(prev_name.endsWith('_count')) {\n new_name = prev_name.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n $this.attr('name', new_name);\n $this.attr('data-orig_name', orig_name);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_name);\n });\n\n $repeater_sub_clone.find('.wpcf7cf_repeater,[data-class=\"wpcf7cf_group\"]').each(function() {\n var $this = jQuery(this);\n var prev_data_id = $this.attr('data-id');\n var orig_data_id = $this.attr('data-orig_data_id') != null ? $this.attr('data-orig_data_id') : prev_data_id;\n var new_data_id = prev_data_id+'__{{repeater_sub_suffix}}';\n\n if(prev_data_id.endsWith('_count')) {\n new_data_id = prev_data_id.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n $this.attr('data-id', new_data_id);\n $this.attr('data-orig_data_id', orig_data_id);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_data_id);\n });\n\n $repeater_sub_clone.find('[id]').each(function() {\n var $this = jQuery(this);\n var prev_id = $this.attr('id');\n var orig_id = $this.attr('data-orig_id') != null ? $this.attr('data-orig_id') : prev_id;\n var new_id = prev_id+'__{{repeater_sub_suffix}}';\n\n $this.attr('id', new_id);\n $this.attr('data-orig_id', orig_id);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_id);\n });\n\n $repeater_sub_clone.find('[for]').each(function() {\n var $this = jQuery(this);\n var prev_for = $this.attr('for');\n var orig_for = $this.attr('data-orig_for') != null ? $this.attr('data-orig_for') : prev_for;\n var new_for = prev_for+'__{{repeater_sub_suffix}}';\n\n $this.attr('for', new_for);\n $this.attr('data-orig_for', orig_for);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_for);\n });\n\n var repeater_sub_html = $repeater_sub_clone[0].outerHTML;\n\n var $repeater_count_field = $repeater.find('[name='+$repeater.id+'_count]').eq(0);\n var $button_add = $repeater_controls.find('.wpcf7cf_add').eq(0);\n var $button_remove = $repeater_controls.find('.wpcf7cf_remove').eq(0);\n\n var params = {\n $repeater: $repeater,\n $repeater_count_field: $repeater_count_field,\n repeater_sub_html: repeater_sub_html,\n $repeater_controls: $repeater_controls,\n $button_add: $button_add,\n $button_remove: $button_remove,\n wpcf7cf_settings: wpcf7cf_settings\n };\n \n this.params = params;\n\n $button_add.click( repeater, function(e) {\n var repeater = e.data;\n repeater.updateSubs(params.$repeater.num_subs+1);\n });\n\n $button_remove.click( repeater,function(e) {\n var repeater = e.data;\n repeater.updateSubs(params.$repeater.num_subs-1);\n });\n\n jQuery('> .wpcf7cf_repeater_sub',params.$repeater).eq(0).remove(); // remove the first sub, it's just a template.\n\n repeater.updateSubs($repeater.initial_subs); \n\n}\n\n\n\nWpcf7cfRepeater.prototype.updateSubs = function(subs_to_show) {\n var repeater = this;\n var params = repeater.params;\n var subs_to_add = subs_to_show - params.$repeater.num_subs;\n\n if (subs_to_add < 0) {\n repeater.removeSubs(-subs_to_add);\n } else if (subs_to_add > 0) {\n repeater.addSubs(subs_to_add);\n }\n\n var showButtonRemove = false;\n var showButtonAdd = false;\n\n if (params.$repeater.num_subs < params.$repeater.max) {\n showButtonAdd = true;\n }\n if (params.$repeater.num_subs > params.$repeater.min) {\n showButtonRemove = true;\n }\n\n if (showButtonAdd) {\n params.$button_add.show();\n } else {\n params.$button_add.hide();\n\n }\n\n if (showButtonRemove) {\n params.$button_remove.show();\n } else {\n params.$button_remove.hide();\n }\n\n params.$repeater_count_field.val(subs_to_show);\n\n};\nWpcf7cfRepeater.prototype.addSubs = function(subs_to_add) {\n var $ = jQuery;\n var params = this.params;\n var repeater = this;\n var form = repeater.form;\n\n\n var $repeater = params.$repeater; \n var $repeater_controls = params.$repeater_controls;\n\n //jQuery(params.repeater_sub_html.replace(/name=\"(.*?)\"/g,'name=\"wpcf7cf_repeater['+$repeater.id+']['+$repeater.num_subs+'][$1]\" data-original-name=\"$1\"')).hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime);\n\n var html_str = '';\n\n for(var i=1; i<=subs_to_add; i++) {\n var sub_suffix = $repeater.num_subs+i;\n html_str += params.repeater_sub_html.replace(/\\{\\{repeater_sub_suffix\\}\\}/g,sub_suffix)\n .replace(new RegExp('\\{\\{'+$repeater.orig_id+'_index\\}\\}','g'),sub_suffix);\n }\n\n\n var $html = jQuery(html_str);\n\n // Add the newly created fields to the form\n $html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');\n\n jQuery('.wpcf7cf_repeater', $html).each(function(){\n form.repeaters.push(new Wpcf7cfRepeater(jQuery(this),form));\n });\n form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));\n\n $repeater.num_subs+= subs_to_add;\n\n wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n // Exclusive Checkbox\n $html.on( 'click', '.wpcf7-exclusive-checkbox input:checkbox', function() {\n var name = $( this ).attr( 'name' );\n $html.find( 'input:checkbox[name=\"' + name + '\"]' ).not( this ).prop( 'checked', false );\n } );\n\n //basic compatibility with material-design-for-contact-form-7\n if (typeof window.cf7mdInit === \"function\") {\n window.cf7mdInit();\n }\n\n return false;\n};\nWpcf7cfRepeater.prototype.removeSubs = function(num_subs) {\n var $ = jQuery;\n var params = this.params;\n var form = this.form;\n\n params.$repeater.num_subs-= num_subs;\n\n jQuery('> .wpcf7cf_repeater_sub',params.$repeater).slice(-num_subs).animate(wpcf7cf_hide_animation, {duration:params.wpcf7cf_settings.animation_intime, done:function() {\n var $this = jQuery(this);\n //remove the actual fields from the form\n $this.remove();\n params.$repeater.trigger('wpcf7cf_repeater_removed');\n wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n }});\n\n return false;\n};\n\nfunction Wpcf7cfMultistep($multistep, form) {\n var multistep = this;\n multistep.$multistep = $multistep;\n multistep.form = form;\n multistep.$steps = $multistep.find('.wpcf7cf_step');\n multistep.$btn_next = $multistep.find('.wpcf7cf_next');\n multistep.$btn_prev = $multistep.find('.wpcf7cf_prev');\n multistep.$dots = $multistep.find('.wpcf7cf_steps-dots');\n multistep.current_step = 0;\n multistep.numSteps = multistep.$steps.length;\n\n\n multistep.$dots.html('');\n for (var i = 1; i <= multistep.numSteps; i++) {\n multistep.$dots.append(`\n <div class=\"dot\" data-step=\"${i}\">\n <div class=\"step-index\">${i}</div>\n <div class=\"step-title\">${multistep.$steps.eq(i-1).data('title')}</div>\n </div>\n `);\n }\n\n multistep.$btn_next.on('click.wpcf7cf_step', async function() {\n \n var result = await multistep.validateStep(multistep.current_step);\n console.log('got this result: ' + result);\n if (result === 'success') {\n multistep.moveToStep(multistep.current_step+1);\n }\n });\n\n multistep.$btn_prev.click(function() {\n multistep.moveToStep(multistep.current_step-1);\n });\n\n multistep.moveToStep(1);\n}\n\nWpcf7cfMultistep.prototype.validateStep = function(step_index) {\n\n return new Promise(resolve => {\n var multistep = this;\n var $multistep = multistep.$multistep;\n\n //validation\n var $form = multistep.form.$form;\n\n var fd = new FormData();\n\n // TEST IF FILES UPLOADS WORK? THEN REMOVE THIS\n // jQuery.each($form.find('[data-id=\"step'+step_index+'\"] input[type=\"file\"]'), function(index, el) {\n // fd.append(jQuery(el).attr('name'), jQuery(el)[0].files[0]);\n // });\n\n var formdata = $form.serializeArray();\n jQuery.each(formdata,function(key, input){\n fd.append(input.name, input.value);\n });\n\n jQuery.ajax({\n url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_validate_step',\n type: 'POST',\n data: fd,\n processData: false,\n contentType: false,\n dataType: 'json',\n }).done(function(json) {\n\n /*\n * Insert _form_data_id if 'json variable' has\n */\n if (typeof json._cf7mls_db_form_data_id != 'undefined') {\n if (!form.find('input[name=\"_cf7mls_db_form_data_id\"]').length) {\n form.append('<input type=\"hidden\" name=\"_cf7mls_db_form_data_id\" value=\"'+json._cf7mls_db_form_data_id+'\" />');\n }\n }\n\n //reset error messages\n $multistep.find('.wpcf7-form-control-wrap').removeClass('cf7mls-invalid');\n $multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();\n $multistep.find('.wpcf7-response-output').remove();\n $multistep.find('.wpcf7-response-output.wpcf7-validation-errors').removeClass('wpcf7-validation-errors');\n\n if (!json.success) {\n var checkError = 0;\n\n jQuery.each(json.invalid_fields, function(index, el) {\n if ($multistep.find('input[name=\"'+index+'\"]').length ||\n $multistep.find('input[name=\"'+index+'[]\"]').length ||\n $multistep.find('select[name=\"'+index+'\"]').length ||\n $multistep.find('select[name=\"'+index+'[]\"]').length ||\n $multistep.find('textarea[name=\"'+index+'\"]').length ||\n $multistep.find('textarea[name=\"'+index+'[]\"]').length\n ) {\n checkError = checkError + 1;\n\n var controlWrap = jQuery('.wpcf7-form-control-wrap.' + index, $form);\n controlWrap.addClass('cf7mls-invalid');\n controlWrap.find('span.wpcf7-not-valid-tip').remove();\n controlWrap.append('<span role=\"alert\" class=\"wpcf7-not-valid-tip\">' + el.reason + '</span>');\n\n //return false;\n }\n });\n\n resolve('failed');\n $multistep.append('<div class=\"wpcf7-response-output wpcf7-display-none wpcf7-validation-errors\" style=\"display: block;\" role=\"alert\">' + json.message + '</div>');\n\n } else if (json.success) {\n resolve('success');\n return false;\n }\n\n }).fail(function() {\n resolve('error');\n }).always(function() {\n // do nothing\n });\n });\n\n};\nWpcf7cfMultistep.prototype.moveToStep = function(step_index) {\n var multistep = this;\n var previousStep = multistep.current_step;\n\n multistep.current_step = step_index > multistep.numSteps ? multistep.numSteps\n : step_index < 1 ? 1\n : step_index;\n\n // ANIMATION DISABLED FOR NOW cause it's ugly\n // multistep.$steps.animate(wpcf7cf_hide_step_animation, multistep.form.settings.animation_outtime);\n // multistep.$steps.eq(multistep.current_step-1).animate(wpcf7cf_show_step_animation, multistep.form.settings.animation_intime);\n\n multistep.$multistep.attr('data-current_step', multistep.current_step);\n multistep.$steps.hide();\n multistep.$steps.eq(multistep.current_step-1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.current_step]); // change step;\n\n wpcf7cf.updateMultistepState(multistep);\n};\n\nWpcf7cfMultistep.prototype.getFieldsInStep = function(step_index) {\n var simpleDom = wpcf7cf.get_simplified_dom_model(this.form.$form);\n var inStep = false;\n return simpleDom.filter(function(item, i) {\n if(item.type == 'step') {\n inStep = item.step == step_index+'';\n }\n return inStep && item.type == 'input';\n }).map(function(item) {\n return item.name;\n });\n};\n\n// END PRO ONLY\n\nvar wpcf7cf = {\n\n // keep this for backwards compatibility\n initForm : function($form) {\n wpcf7cf_forms.push(new Wpcf7cfForm($form));\n },\n\n get_nested_conditions : function(conditions, $current_form) {\n //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index\n var simplified_dom = wpcf7cf.get_simplified_dom_model($current_form);\n var groups = simplified_dom.filter(function(item, i) {\n return item.type==='group';\n });\n\n var sub_conditions = [];\n\n for(var i = 0; i < groups.length; i++) {\n var g = groups[i];\n var relevant_conditions = conditions.filter(function(condition, i) {\n return condition.then_field === g.original_name;\n });\n \n var relevant_conditions = relevant_conditions.map(function(item,i) {\n return {\n then_field : g.name,\n and_rules : item.and_rules.map(function(and_rule, i) {\n return {\n if_field : and_rule.if_field+g.suffix,\n if_value : and_rule.if_value,\n operator : and_rule.operator\n };\n })\n }\n });\n\n sub_conditions = sub_conditions.concat(relevant_conditions);\n }\n return conditions.concat(sub_conditions);\n },\n\n get_simplified_dom_model : function($current_form) {\n // if the dom is something like:\n // <form>\n // <repeater ra>\n // <group ga__1>\n // <repeater rb__1>\n // <input txta__1__1 />\n // <input txta__1__2 />\n // </repeater>\n // <group gb__1>\n // <input txtb__1 />\n // </group>\n // </group>\n // <group ga__2>\n // <repeater rb__2>\n // <input txta__2__1 />\n // </repeater>\n // <group gb__2>\n // <input txtb__2 />\n // </group>\n // </group>\n // </repeater>\n // </form>\n // \n // return something like:\n // [{type:repeater, name:'ra', suffix: '__1'}, {type: group, name:'ga', suffix: '__1'}, ...]\n\n var currentNode;\n var ni = document.createNodeIterator($current_form[0], NodeFilter.SHOW_ELEMENT, null, false); //, NodeFilter.SHOW_ELEMENT, function(){ return NodeFilter.FILTER_ACCEPT; }\n\n var simplified_dom = [];\n\n while(currentNode = ni.nextNode()) {\n if (currentNode.classList.contains('wpcf7cf_repeater')) {\n simplified_dom.push({type:'repeater', name:currentNode.dataset.id, original_name:currentNode.dataset.orig_data_id})\n } else if (currentNode.dataset.class == 'wpcf7cf_group') {\n simplified_dom.push({type:'group', name:currentNode.dataset.id, original_name:currentNode.dataset.orig_data_id})\n } else if (currentNode.className == 'wpcf7cf_step') {\n simplified_dom.push({type:'step', name:currentNode.dataset.id, original_name:currentNode.dataset.id, step: currentNode.dataset.id.substring(5)})\n } else if (currentNode.hasAttribute('name')) {\n simplified_dom.push({type:'input', name:currentNode.getAttribute('name'), original_name:currentNode.getAttribute('data-orig_name')})\n }\n }\n\n simplified_dom = simplified_dom.map(function(item, i){\n var original_name_length = item.original_name == null ? item.name.length : item.original_name.length;\n item.suffix = item.name.substring(original_name_length);\n return item;\n });\n\n //console.table(simplified_dom);\n return simplified_dom;\n\n },\n\n updateMultistepState: function (multistep) {\n if (multistep == null) return;\n\n // update hidden input field\n\n var stepsData = {\n currentStep : multistep.current_step,\n numSteps : multistep.numSteps,\n fieldsInCurrentStep : multistep.getFieldsInStep(multistep.current_step)\n };\n multistep.form.$input_steps.val(JSON.stringify(stepsData));\n\n // update Buttons\n multistep.$btn_prev.removeClass('disabled');\n multistep.$btn_next.removeClass('disabled');\n if (multistep.current_step == multistep.numSteps) {\n multistep.$btn_next.addClass('disabled');\n }\n if (multistep.current_step == 1) {\n multistep.$btn_prev.addClass('disabled');\n }\n\n // replace next button with submit button on last step.\n // TODO: make this depend on a setting\n var $submit_button = multistep.form.$form.find('input[type=\"submit\"]').eq(0);\n if (multistep.current_step == multistep.numSteps) {\n var $submit_clone = $submit_button.clone();\n $submit_button.hide();\n multistep.$btn_next.hide();\n multistep.$btn_next.parent().append($submit_clone);\n } else {\n multistep.$btn_next.parent().find('input[type=submit]').remove();\n $submit_button.show();\n multistep.$btn_next.show();\n }\n\n // update dots\n var $dots = multistep.$dots.find('.dot');\n $dots.removeClass('active').removeClass('completed');\n for(var step = 1; step <= multistep.numSteps; step++) {\n if (step < multistep.current_step) {\n $dots.eq(step-1).addClass('completed');\n } else if (step == multistep.current_step) {\n $dots.eq(step-1).addClass('active');\n }\n }\n\n },\n\n should_group_be_shown : function(condition, $current_form) {\n\n var $ = jQuery;\n\n var show_group = true;\n\n for (var and_rule_i = 0; and_rule_i < condition.and_rules.length; and_rule_i++) {\n\n var condition_ok = false;\n\n var condition_and_rule = condition.and_rules[and_rule_i];\n\n var $field = jQuery('[name=\"' + condition_and_rule.if_field + '\"], [name=\"' + condition_and_rule.if_field + '[]\"], [data-original-name=\"' + condition_and_rule.if_field + '\"], [data-original-name=\"' + condition_and_rule.if_field + '[]\"]',$current_form);\n\n var if_val = condition_and_rule.if_value;\n var if_val_as_number = isFinite(parseFloat(if_val)) ? parseFloat(if_val):0;\n var operator = condition_and_rule.operator;\n \n var regex_patt = /.*/i; // fallback regex pattern\n var isValidRegex = true;\n try {\n regex_patt = new RegExp(if_val, 'i');\n } catch(e) {\n isValidRegex = false;\n }\n\n\n //backwards compat\n operator = operator === '≤' ? 'less than or equals' : operator;\n operator = operator === '≥' ? 'greater than or equals' : operator;\n operator = operator === '>' ? 'greater than' : operator;\n operator = operator === '<' ? 'less than' : operator;\n\n\n if ($field.length === 1) {\n\n // single field (tested with text field, single checkbox, select with single value (dropdown), select with multiple values)\n\n if ($field.is('select')) {\n\n if (operator === 'not equals') {\n condition_ok = true;\n }\n\n $field.find('option:selected').each(function () {\n var $option = jQuery(this);\n var option_val = $option.val()\n if (\n operator === 'equals' && option_val === if_val ||\n operator === 'equals (regex)' && regex_patt.test($option.val())\n ) {\n condition_ok = true;\n } else if (\n operator === 'not equals' && option_val === if_val ||\n operator === 'not equals (regex)' && !regex_patt.test($option.val())\n ) {\n condition_ok = false;\n return false; // break out of the loop\n }\n });\n\n show_group = show_group && condition_ok;\n }\n\n var field_val = $field.val();\n var field_val_as_number = isFinite(parseFloat(field_val)) ? parseFloat(field_val):0;\n\n if ($field.attr('type') === 'checkbox') {\n var field_is_checked = $field.is(':checked');\n if (\n operator === 'equals' && field_is_checked && field_val === if_val ||\n operator === 'not equals' && !field_is_checked ||\n operator === 'is empty' && !field_is_checked ||\n operator === 'not empty' && field_is_checked ||\n operator === 'greater than' && field_is_checked && field_val_as_number > if_val_as_number ||\n operator === 'less than' && field_is_checked && field_val_as_number < if_val_as_number ||\n operator === 'greater than or equals' && field_is_checked && field_val_as_number >= if_val_as_number ||\n operator === 'less than or equals' && field_is_checked && field_val_as_number <= if_val_as_number ||\n operator === 'equals (regex)' && field_is_checked && regex_patt.test(field_val) ||\n operator === 'not equals (regex)' && !field_is_checked\n\n ) {\n condition_ok = true;\n }\n } else if (\n operator === 'equals' && field_val === if_val ||\n operator === 'not equals' && field_val !== if_val ||\n operator === 'equals (regex)' && regex_patt.test(field_val) ||\n operator === 'not equals (regex)' && !regex_patt.test(field_val) ||\n operator === 'greater than' && field_val_as_number > if_val_as_number ||\n operator === 'less than' && field_val_as_number < if_val_as_number ||\n operator === 'greater than or equals' && field_val_as_number >= if_val_as_number ||\n operator === 'less than or equals' && field_val_as_number <= if_val_as_number ||\n operator === 'is empty' && field_val === '' ||\n operator === 'not empty' && field_val !== '' ||\n (\n operator === 'function'\n && typeof window[if_val] == 'function'\n && window[if_val]($field)\n )\n ) {\n condition_ok = true;\n }\n\n\n } else if ($field.length > 1) {\n\n // multiple fields (tested with checkboxes, exclusive checkboxes, dropdown with multiple values)\n\n var all_values = [];\n var checked_values = [];\n $field.each(function () {\n all_values.push(jQuery(this).val());\n if (jQuery(this).is(':checked')) {\n checked_values.push(jQuery(this).val());\n }\n });\n\n var checked_value_index = jQuery.inArray(if_val, checked_values);\n var value_index = jQuery.inArray(if_val, all_values);\n\n if (\n ( operator === 'is empty' && checked_values.length === 0 ) ||\n ( operator === 'not empty' && checked_values.length > 0 )\n ) {\n condition_ok = true;\n }\n\n\n for (var ind = 0; ind < checked_values.length; ind++) {\n var checked_val = checked_values[ind];\n var checked_val_as_number = isFinite(parseFloat(checked_val)) ? parseFloat(checked_val):0;\n if (\n ( operator === 'equals' && checked_val === if_val ) ||\n ( operator === 'not equals' && checked_val !== if_val ) ||\n ( operator === 'equals (regex)' && regex_patt.test(checked_val) ) ||\n ( operator === 'not equals (regex)' && !regex_patt.test(checked_val) ) ||\n ( operator === 'greater than' && checked_val_as_number > if_val_as_number ) ||\n ( operator === 'less than' && checked_val_as_number < if_val_as_number ) ||\n ( operator === 'greater than or equals' && checked_val_as_number >= if_val_as_number ) ||\n ( operator === 'less than or equals' && checked_val_as_number <= if_val_as_number )\n ) {\n condition_ok = true;\n }\n }\n }\n\n show_group = show_group && condition_ok;\n }\n\n return show_group;\n\n }\n\n};\n\n\njQuery('.wpcf7-form').each(function(){\n wpcf7cf_forms.push(new Wpcf7cfForm(jQuery(this)));\n});\n\n// Call displayFields again on all forms\n// Necessary in case some theme or plugin changed a form value by the time the entire page is fully loaded.\njQuery('document').ready(function() {\n wpcf7cf_forms.forEach(function(f){\n f.displayFields();\n });\n});\n\n// fix for exclusive checkboxes in IE (this will call the change-event again after all other checkboxes are unchecked, triggering the display_fields() function)\nvar old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;\njQuery.fn.wpcf7ExclusiveCheckbox = function() {\n return this.find('input:checkbox').click(function() {\n var name = jQuery(this).attr('name');\n jQuery(this).closest('form').find('input:checkbox[name=\"' + name + '\"]').not(this).prop('checked', false).eq(0).change();\n });\n};\n\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/scripts_es6.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///(webpack)/buildin/module.js"],"names":["cf7signature_resized","wpcf7cf_timeout","wpcf7cf_show_animation","wpcf7cf_hide_animation","wpcf7cf_show_step_animation","wpcf7cf_hide_step_animation","wpcf7cf_change_events","wpcf7cf_forms","String","prototype","endsWith","search","this_len","undefined","length","substring","Wpcf7cfForm","$form","options_element","find","eq","val","form","form_options","JSON","parse","$input_hidden_group_fields","$input_hidden_groups","$input_visible_groups","$input_repeaters","$input_steps","unit_tag","closest","attr","conditions","i","condition","and_rules","if_field","if_value","operator","initial_conditions","settings","$groups","jQuery","repeaters","multistep","fields","animation_intime","parseInt","animation_outtime","animation","updateGroups","updateEventListeners","displayFields","on","e","data","setTimeout","each","push","Wpcf7cfRepeater","stringify","map","item","params","$repeater","id","$multistep","Wpcf7cfMultistep","window","wpcf7cf","get_simplified_dom_model","wpcf7cf_conditions","wpcf7cf_settings","signatures","constructor","Array","canvas","width","$sig_canvas","$sig_wrap","height","addClass","show_group","should_group_be_shown","then_field","removeClass","index","$group","is","finish","css","hasClass","prop","show","trigger","animate","$inputs","not","$this","defaultValue","defaultChecked","change","hide","updateHiddenFields","hidden_fields","hidden_groups","visible_groups","get_nested_conditions","off","clearTimeout","text","$","repeater","num_subs","orig_id","min","max","initial_subs","$repeater_sub","children","$repeater_controls","$repeater_sub_clone","clone","addBack","prev_suffix","new_suffix","prev_name","orig_name","new_name","replace","prev_data_id","orig_data_id","new_data_id","prev_id","new_id","prev_for","orig_for","new_for","repeater_sub_html","outerHTML","$repeater_count_field","$button_add","$button_remove","click","updateSubs","remove","subs_to_show","subs_to_add","removeSubs","addSubs","showButtonRemove","showButtonAdd","html_str","sub_suffix","RegExp","$html","insertBefore","updateMultistepState","name","cf7mdInit","slice","duration","done","$steps","$btn_next","$btn_prev","$dots","current_step","numSteps","html","append","validateStep","result","console","log","moveToStep","step_index","Promise","resolve","fd","FormData","formdata","serializeArray","key","input","value","ajax","url","wpcf7cf_global_settings","ajaxurl","type","processData","contentType","dataType","json","_cf7mls_db_form_data_id","success","checkError","invalid_fields","el","controlWrap","reason","message","fail","always","previousStep","getFieldsInStep","simpleDom","inStep","filter","step","initForm","$current_form","simplified_dom","groups","sub_conditions","g","relevant_conditions","original_name","and_rule","suffix","concat","currentNode","ni","document","createNodeIterator","NodeFilter","SHOW_ELEMENT","nextNode","classList","contains","dataset","className","hasAttribute","getAttribute","original_name_length","stepsData","currentStep","fieldsInCurrentStep","$submit_button","$submit_clone","parent","and_rule_i","condition_ok","condition_and_rule","$field","if_val","if_val_as_number","isFinite","parseFloat","regex_patt","isValidRegex","$option","option_val","test","field_val","field_val_as_number","field_is_checked","all_values","checked_values","checked_value_index","inArray","value_index","ind","checked_val","checked_val_as_number","ready","forEach","f","old_wpcf7ExclusiveCheckbox","fn","wpcf7ExclusiveCheckbox","module","exports","require","runtime","Op","Object","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","obj","arg","call","err","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","displayName","defineIteratorMethods","method","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","__await","AsyncIterator","invoke","reject","record","then","unwrapped","error","previousPromise","enqueue","callInvokeWithMethodAndArg","async","iter","next","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","info","resultName","nextLoc","toString","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","keys","object","reverse","pop","iterable","iteratorMethod","isNaN","skipTempReset","prev","charAt","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","webpackPolyfill","deprecate","paths","defineProperty","enumerable","get","l"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;A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H,oBAAP,EAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAC,UAAQ,CAAC,GAAD,EAAM,wBAAN,CAAR,CAAwCxH,OAAxC;AACD,C;;;;;;;;;;;;ACrtBDH,MAAM,CAACC,OAAP,GAAiB,UAASD,MAAT,EAAiB;AACjC,MAAI,CAACA,MAAM,CAAC4H,eAAZ,EAA6B;AAC5B5H,UAAM,CAAC6H,SAAP,GAAmB,YAAW,CAAE,CAAhC;;AACA7H,UAAM,CAAC8H,KAAP,GAAe,EAAf,CAF4B,CAG5B;;AACA,QAAI,CAAC9H,MAAM,CAACzJ,QAAZ,EAAsByJ,MAAM,CAACzJ,QAAP,GAAkB,EAAlB;AACtB8J,UAAM,CAAC0H,cAAP,CAAsB/H,MAAtB,EAA8B,QAA9B,EAAwC;AACvCgI,gBAAU,EAAE,IAD2B;AAEvCC,SAAG,EAAE,eAAW;AACf,eAAOjI,MAAM,CAACkI,CAAd;AACA;AAJsC,KAAxC;AAMA7H,UAAM,CAAC0H,cAAP,CAAsB/H,MAAtB,EAA8B,IAA9B,EAAoC;AACnCgI,gBAAU,EAAE,IADuB;AAEnCC,SAAG,EAAE,eAAW;AACf,eAAOjI,MAAM,CAAC/O,CAAd;AACA;AAJkC,KAApC;AAMA+O,UAAM,CAAC4H,eAAP,GAAyB,CAAzB;AACA;;AACD,SAAO5H,MAAP;AACA,CArBD,C","file":"scripts.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./js/scripts_es6.js\");\n","\"use strict\";\n\nvar cf7signature_resized = 0; // for compatibility with contact-form-7-signature-addon\n\nvar wpcf7cf_timeout;\n\nvar wpcf7cf_show_animation = { \"height\": \"show\", \"marginTop\": \"show\", \"marginBottom\": \"show\", \"paddingTop\": \"show\", \"paddingBottom\": \"show\" };\nvar wpcf7cf_hide_animation = { \"height\": \"hide\", \"marginTop\": \"hide\", \"marginBottom\": \"hide\", \"paddingTop\": \"hide\", \"paddingBottom\": \"hide\" };\n\nvar wpcf7cf_show_step_animation = { \"opacity\": \"show\" };\nvar wpcf7cf_hide_step_animation = { \"opacity\": \"hide\" };\n\nvar wpcf7cf_change_events = 'input.wpcf7cf paste.wpcf7cf change.wpcf7cf click.wpcf7cf propertychange.wpcf7cf';\n\nvar wpcf7cf_forms = [];\n\n// endswith polyfill\nif (!String.prototype.endsWith) {\n\tString.prototype.endsWith = function(search, this_len) {\n\t\tif (this_len === undefined || this_len > this.length) {\n\t\t\tthis_len = this.length;\n\t\t}\n\t\treturn this.substring(this_len - search.length, this_len) === search;\n\t};\n}\n\nvar Wpcf7cfForm = function($form) {\n\n var options_element = $form.find('input[name=\"_wpcf7cf_options\"]').eq(0);\n if (!options_element.length || !options_element.val()) {\n // doesn't look like a CF7 form created with conditional fields plugin enabled.\n return false;\n }\n\n var form = this;\n\n var form_options = JSON.parse(options_element.val());\n\n form.$form = $form;\n form.$input_hidden_group_fields = $form.find('[name=\"_wpcf7cf_hidden_group_fields\"]');\n form.$input_hidden_groups = $form.find('[name=\"_wpcf7cf_hidden_groups\"]');\n form.$input_visible_groups = $form.find('[name=\"_wpcf7cf_visible_groups\"]');\n form.$input_repeaters = $form.find('[name=\"_wpcf7cf_repeaters\"]');\n form.$input_steps = $form.find('[name=\"_wpcf7cf_steps\"]');\n\n form.unit_tag = $form.closest('.wpcf7').attr('id');\n form.conditions = form_options['conditions'];\n\n // compatibility with conditional forms created with older versions of the plugin ( < 1.4 )\n for (var i=0; i < form.conditions.length; i++) {\n var condition = form.conditions[i];\n if (!('and_rules' in condition)) {\n condition.and_rules = [{'if_field':condition.if_field,'if_value':condition.if_value,'operator':condition.operator}];\n }\n }\n\n form.initial_conditions = form.conditions;\n form.settings = form_options['settings'];\n\n form.$groups = jQuery(); // empty jQuery set\n form.repeaters = [];\n form.multistep = null;\n form.fields = [];\n\n form.settings.animation_intime = parseInt(form.settings.animation_intime);\n form.settings.animation_outtime = parseInt(form.settings.animation_outtime);\n\n if (form.settings.animation === 'no') {\n form.settings.animation_intime = 0;\n form.settings.animation_outtime = 0;\n }\n\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n // bring form in initial state if the reset event is fired on it.\n form.$form.on('reset', form, function(e) {\n var form = e.data;\n setTimeout(function(){\n form.displayFields();\n },200);\n });\n\n // PRO ONLY\n\n jQuery('.wpcf7cf_repeater:not(.wpcf7cf_repeater .wpcf7cf_repeater)', $form).each(function(){\n form.repeaters.push(new Wpcf7cfRepeater(jQuery(this),form));\n });\n\n form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));\n\n var $multistep = jQuery('.wpcf7cf_multistep', $form);\n\n if ($multistep.length) {\n form.multistep = new Wpcf7cfMultistep($multistep, form);\n // window.wpcf7cf.updateMultistepState(form.multistep);\n }\n\n // END PRO ONLY\n\n}\nWpcf7cfForm.prototype.displayFields = function() {\n\n var form = this;\n\n window.wpcf7cf.get_simplified_dom_model(form.$form);\n\n var unit_tag = this.unit_tag;\n var wpcf7cf_conditions = this.conditions;\n var wpcf7cf_settings = this.settings;\n\n //for compatibility with contact-form-7-signature-addon\n if (cf7signature_resized === 0 && typeof signatures !== 'undefined' && signatures.constructor === Array && signatures.length > 0 ) {\n for (var i = 0; i < signatures.length; i++) {\n if (signatures[i].canvas.width === 0) {\n\n var $sig_canvas = jQuery(\".wpcf7-form-control-signature-body>canvas\");\n var $sig_wrap = jQuery(\".wpcf7-form-control-signature-wrap\");\n $sig_canvas.eq(i).attr('width', $sig_wrap.width());\n $sig_canvas.eq(i).attr('height', $sig_wrap.height());\n\n cf7signature_resized = 1;\n }\n }\n }\n\n form.$groups.addClass('wpcf7cf-hidden');\n\n for (var i=0; i < wpcf7cf_conditions.length; i++) {\n\n var condition = wpcf7cf_conditions[i];\n\n var show_group = window.wpcf7cf.should_group_be_shown(condition, form.$form);\n\n if (show_group) {\n jQuery('[data-id='+condition.then_field+']',form.$form).eq(0).removeClass('wpcf7cf-hidden');\n }\n }\n\n var animation_intime = wpcf7cf_settings.animation_intime;\n var animation_outtime = wpcf7cf_settings.animation_outtime;\n\n form.$groups.each(function (index) {\n var $group = jQuery(this);\n if ($group.is(':animated')) $group.finish(); // stop any current animations on the group\n if ($group.css('display') === 'none' && !$group.hasClass('wpcf7cf-hidden')) {\n if ($group.prop('tagName') === 'SPAN') {\n $group.show().trigger('wpcf7cf_show_group');\n } else {\n $group.animate(wpcf7cf_show_animation, animation_intime).trigger('wpcf7cf_show_group'); // show\n }\n } else if ($group.css('display') !== 'none' && $group.hasClass('wpcf7cf-hidden')) {\n\n if ($group.attr('data-clear_on_hide') !== undefined) {\n var $inputs = jQuery(':input', $group).not(':button, :submit, :reset, :hidden');\n\n $inputs.each(function(){\n var $this = jQuery(this);\n $this.val(this.defaultValue);\n $this.prop('checked', this.defaultChecked);\n });\n\n $inputs.change();\n //display_fields();\n }\n\n if ($group.prop('tagName') === 'SPAN') {\n $group.hide().trigger('wpcf7cf_hide_group');\n } else {\n $group.animate(wpcf7cf_hide_animation, animation_outtime).trigger('wpcf7cf_hide_group'); // hide\n }\n\n }\n });\n\n form.updateHiddenFields();\n};\nWpcf7cfForm.prototype.updateHiddenFields = function() {\n\n var form = this;\n\n var hidden_fields = [];\n var hidden_groups = [];\n var visible_groups = [];\n\n form.$groups.each(function () {\n var $this = jQuery(this);\n if ($this.hasClass('wpcf7cf-hidden')) {\n hidden_groups.push($this.data('id'));\n $this.find('input,select,textarea').each(function () {\n hidden_fields.push(jQuery(this).attr('name'));\n });\n } else {\n visible_groups.push($this.data('id'));\n }\n });\n\n form.hidden_fields = hidden_fields;\n form.hidden_groups = hidden_groups;\n form.visible_groups = visible_groups;\n\n form.$input_hidden_group_fields.val(JSON.stringify(hidden_fields));\n form.$input_hidden_groups.val(JSON.stringify(hidden_groups));\n form.$input_visible_groups.val(JSON.stringify(visible_groups));\n\n return true;\n};\nWpcf7cfForm.prototype.updateGroups = function() {\n var form = this;\n form.$groups = form.$form.find('[data-class=\"wpcf7cf_group\"]');\n\n form.conditions = window.wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);\n\n};\nWpcf7cfForm.prototype.updateEventListeners = function() {\n\n var form = this;\n\n // monitor input changes, and call display_fields() if something has changed\n jQuery('input, select, textarea, button',form.$form).not('.wpcf7cf_add, .wpcf7cf_remove').off(wpcf7cf_change_events).on(wpcf7cf_change_events,form, function(e) {\n var form = e.data;\n clearTimeout(wpcf7cf_timeout);\n wpcf7cf_timeout = setTimeout(function() {\n form.displayFields();\n }, 100);\n });\n\n // PRO ONLY\n jQuery('.wpcf7cf-togglebutton', form.$form).off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf',function() {\n var $this = jQuery(this);\n if ($this.text() === $this.data('val-1')) {\n $this.text($this.data('val-2'));\n $this.val($this.data('val-2'));\n } else {\n $this.text($this.data('val-1'));\n $this.val($this.data('val-1'));\n }\n });\n // END PRO ONLY\n};\n\n// PRO ONLY\nfunction Wpcf7cfRepeater($repeater, form) {\n var $ = jQuery;\n\n var repeater = this;\n\n var wpcf7cf_settings = form.settings;\n\n repeater.form = form;\n\n $repeater.num_subs = 0;\n $repeater.id = $repeater.data('id');\n $repeater.orig_id = $repeater.data('orig_data_id');\n $repeater.min = typeof( $repeater.data('min')) !== 'undefined' ? parseInt($repeater.data('min')) : 1;\n $repeater.max = typeof( $repeater.data('max')) !== 'undefined' ? parseInt($repeater.data('max')) : 200;\n $repeater.initial_subs = typeof( $repeater.data('initial')) !== 'undefined' ? parseInt($repeater.data('initial')) : $repeater.min;\n if ($repeater.initial_subs > $repeater.max) $repeater.initial_subs = $repeater.max;\n var $repeater_sub = $repeater.children('.wpcf7cf_repeater_sub').eq(0);\n var $repeater_controls = $repeater.children('.wpcf7cf_repeater_controls').eq(0);\n\n var $repeater_sub_clone = $repeater_sub.clone();\n\n $repeater_sub_clone.find('.wpcf7cf_repeater_sub').addBack('.wpcf7cf_repeater_sub').each(function() {\n var $this = jQuery(this);\n var prev_suffix = $this.attr('data-repeater_sub_suffix');\n var new_suffix = prev_suffix+'__{{repeater_sub_suffix}}';\n $this.attr('data-repeater_sub_suffix', new_suffix);\n });\n\n $repeater_sub_clone.find('[name]').each(function() {\n var $this = jQuery(this);\n var prev_name = $this.attr('name');\n var orig_name = $this.attr('data-orig_name') != null ? $this.attr('data-orig_name') : prev_name;\n var new_name = prev_name+'__{{repeater_sub_suffix}}';\n\n if(prev_name.endsWith('_count')) {\n new_name = prev_name.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n $this.attr('name', new_name);\n $this.attr('data-orig_name', orig_name);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_name);\n });\n\n $repeater_sub_clone.find('.wpcf7cf_repeater,[data-class=\"wpcf7cf_group\"]').each(function() {\n var $this = jQuery(this);\n var prev_data_id = $this.attr('data-id');\n var orig_data_id = $this.attr('data-orig_data_id') != null ? $this.attr('data-orig_data_id') : prev_data_id;\n var new_data_id = prev_data_id+'__{{repeater_sub_suffix}}';\n\n if(prev_data_id.endsWith('_count')) {\n new_data_id = prev_data_id.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n $this.attr('data-id', new_data_id);\n $this.attr('data-orig_data_id', orig_data_id);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_data_id);\n });\n\n $repeater_sub_clone.find('[id]').each(function() {\n var $this = jQuery(this);\n var prev_id = $this.attr('id');\n var orig_id = $this.attr('data-orig_id') != null ? $this.attr('data-orig_id') : prev_id;\n var new_id = prev_id+'__{{repeater_sub_suffix}}';\n\n $this.attr('id', new_id);\n $this.attr('data-orig_id', orig_id);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_id);\n });\n\n $repeater_sub_clone.find('[for]').each(function() {\n var $this = jQuery(this);\n var prev_for = $this.attr('for');\n var orig_for = $this.attr('data-orig_for') != null ? $this.attr('data-orig_for') : prev_for;\n var new_for = prev_for+'__{{repeater_sub_suffix}}';\n\n $this.attr('for', new_for);\n $this.attr('data-orig_for', orig_for);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_for);\n });\n\n var repeater_sub_html = $repeater_sub_clone[0].outerHTML;\n\n var $repeater_count_field = $repeater.find('[name='+$repeater.id+'_count]').eq(0);\n var $button_add = $repeater_controls.find('.wpcf7cf_add').eq(0);\n var $button_remove = $repeater_controls.find('.wpcf7cf_remove').eq(0);\n\n var params = {\n $repeater: $repeater,\n $repeater_count_field: $repeater_count_field,\n repeater_sub_html: repeater_sub_html,\n $repeater_controls: $repeater_controls,\n $button_add: $button_add,\n $button_remove: $button_remove,\n wpcf7cf_settings: wpcf7cf_settings\n };\n \n this.params = params;\n\n $button_add.click( repeater, function(e) {\n var repeater = e.data;\n repeater.updateSubs(params.$repeater.num_subs+1);\n });\n\n $button_remove.click( repeater,function(e) {\n var repeater = e.data;\n repeater.updateSubs(params.$repeater.num_subs-1);\n });\n\n jQuery('> .wpcf7cf_repeater_sub',params.$repeater).eq(0).remove(); // remove the first sub, it's just a template.\n\n repeater.updateSubs($repeater.initial_subs); \n\n}\n\n\n\nWpcf7cfRepeater.prototype.updateSubs = function(subs_to_show) {\n var repeater = this;\n var params = repeater.params;\n var subs_to_add = subs_to_show - params.$repeater.num_subs;\n\n if (subs_to_add < 0) {\n repeater.removeSubs(-subs_to_add);\n } else if (subs_to_add > 0) {\n repeater.addSubs(subs_to_add);\n }\n\n var showButtonRemove = false;\n var showButtonAdd = false;\n\n if (params.$repeater.num_subs < params.$repeater.max) {\n showButtonAdd = true;\n }\n if (params.$repeater.num_subs > params.$repeater.min) {\n showButtonRemove = true;\n }\n\n if (showButtonAdd) {\n params.$button_add.show();\n } else {\n params.$button_add.hide();\n\n }\n\n if (showButtonRemove) {\n params.$button_remove.show();\n } else {\n params.$button_remove.hide();\n }\n\n params.$repeater_count_field.val(subs_to_show);\n\n};\nWpcf7cfRepeater.prototype.addSubs = function(subs_to_add) {\n var $ = jQuery;\n var params = this.params;\n var repeater = this;\n var form = repeater.form;\n\n\n var $repeater = params.$repeater; \n var $repeater_controls = params.$repeater_controls;\n\n //jQuery(params.repeater_sub_html.replace(/name=\"(.*?)\"/g,'name=\"wpcf7cf_repeater['+$repeater.id+']['+$repeater.num_subs+'][$1]\" data-original-name=\"$1\"')).hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime);\n\n var html_str = '';\n\n for(var i=1; i<=subs_to_add; i++) {\n var sub_suffix = $repeater.num_subs+i;\n html_str += params.repeater_sub_html.replace(/\\{\\{repeater_sub_suffix\\}\\}/g,sub_suffix)\n .replace(new RegExp('\\{\\{'+$repeater.orig_id+'_index\\}\\}','g'),sub_suffix);\n }\n\n\n var $html = jQuery(html_str);\n\n // Add the newly created fields to the form\n $html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');\n\n jQuery('.wpcf7cf_repeater', $html).each(function(){\n form.repeaters.push(new Wpcf7cfRepeater(jQuery(this),form));\n });\n form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));\n\n $repeater.num_subs+= subs_to_add;\n\n window.wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n // Exclusive Checkbox\n $html.on( 'click', '.wpcf7-exclusive-checkbox input:checkbox', function() {\n var name = $( this ).attr( 'name' );\n $html.find( 'input:checkbox[name=\"' + name + '\"]' ).not( this ).prop( 'checked', false );\n } );\n\n //basic compatibility with material-design-for-contact-form-7\n if (typeof window.cf7mdInit === \"function\") {\n window.cf7mdInit();\n }\n\n return false;\n};\nWpcf7cfRepeater.prototype.removeSubs = function(num_subs) {\n var $ = jQuery;\n var params = this.params;\n var form = this.form;\n\n params.$repeater.num_subs-= num_subs;\n\n jQuery('> .wpcf7cf_repeater_sub',params.$repeater).slice(-num_subs).animate(wpcf7cf_hide_animation, {duration:params.wpcf7cf_settings.animation_intime, done:function() {\n var $this = jQuery(this);\n //remove the actual fields from the form\n $this.remove();\n params.$repeater.trigger('wpcf7cf_repeater_removed');\n window.wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n }});\n\n return false;\n};\n\nfunction Wpcf7cfMultistep($multistep, form) {\n var multistep = this;\n multistep.$multistep = $multistep;\n multistep.form = form;\n multistep.$steps = $multistep.find('.wpcf7cf_step');\n multistep.$btn_next = $multistep.find('.wpcf7cf_next');\n multistep.$btn_prev = $multistep.find('.wpcf7cf_prev');\n multistep.$dots = $multistep.find('.wpcf7cf_steps-dots');\n multistep.current_step = 0;\n multistep.numSteps = multistep.$steps.length;\n\n\n multistep.$dots.html('');\n for (var i = 1; i <= multistep.numSteps; i++) {\n multistep.$dots.append(`\n <div class=\"dot\" data-step=\"${i}\">\n <div class=\"step-index\">${i}</div>\n <div class=\"step-title\">${multistep.$steps.eq(i-1).data('title')}</div>\n </div>\n `);\n }\n\n multistep.$btn_next.on('click.wpcf7cf_step', async function() {\n \n var result = await multistep.validateStep(multistep.current_step);\n console.log('got this result: ' + result);\n if (result === 'success') {\n multistep.moveToStep(multistep.current_step+1);\n }\n });\n\n multistep.$btn_prev.click(function() {\n multistep.moveToStep(multistep.current_step-1);\n });\n\n multistep.moveToStep(1);\n}\n\nWpcf7cfMultistep.prototype.validateStep = function(step_index) {\n\n return new Promise(resolve => {\n var multistep = this;\n var $multistep = multistep.$multistep;\n\n //validation\n var $form = multistep.form.$form;\n\n var fd = new FormData();\n\n // TEST IF FILES UPLOADS WORK? THEN REMOVE THIS\n // jQuery.each($form.find('[data-id=\"step'+step_index+'\"] input[type=\"file\"]'), function(index, el) {\n // fd.append(jQuery(el).attr('name'), jQuery(el)[0].files[0]);\n // });\n\n var formdata = $form.serializeArray();\n jQuery.each(formdata,function(key, input){\n fd.append(input.name, input.value);\n });\n\n jQuery.ajax({\n url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_validate_step',\n type: 'POST',\n data: fd,\n processData: false,\n contentType: false,\n dataType: 'json',\n }).done(function(json) {\n\n /*\n * Insert _form_data_id if 'json variable' has\n */\n if (typeof json._cf7mls_db_form_data_id != 'undefined') {\n if (!form.find('input[name=\"_cf7mls_db_form_data_id\"]').length) {\n form.append('<input type=\"hidden\" name=\"_cf7mls_db_form_data_id\" value=\"'+json._cf7mls_db_form_data_id+'\" />');\n }\n }\n\n //reset error messages\n $multistep.find('.wpcf7-form-control-wrap').removeClass('cf7mls-invalid');\n $multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();\n $multistep.find('.wpcf7-response-output').remove();\n $multistep.find('.wpcf7-response-output.wpcf7-validation-errors').removeClass('wpcf7-validation-errors');\n\n if (!json.success) {\n var checkError = 0;\n\n jQuery.each(json.invalid_fields, function(index, el) {\n if ($multistep.find('input[name=\"'+index+'\"]').length ||\n $multistep.find('input[name=\"'+index+'[]\"]').length ||\n $multistep.find('select[name=\"'+index+'\"]').length ||\n $multistep.find('select[name=\"'+index+'[]\"]').length ||\n $multistep.find('textarea[name=\"'+index+'\"]').length ||\n $multistep.find('textarea[name=\"'+index+'[]\"]').length\n ) {\n checkError = checkError + 1;\n\n var controlWrap = jQuery('.wpcf7-form-control-wrap.' + index, $form);\n controlWrap.addClass('cf7mls-invalid');\n controlWrap.find('span.wpcf7-not-valid-tip').remove();\n controlWrap.append('<span role=\"alert\" class=\"wpcf7-not-valid-tip\">' + el.reason + '</span>');\n\n //return false;\n }\n });\n\n resolve('failed');\n $multistep.append('<div class=\"wpcf7-response-output wpcf7-display-none wpcf7-validation-errors\" style=\"display: block;\" role=\"alert\">' + json.message + '</div>');\n\n } else if (json.success) {\n resolve('success');\n return false;\n }\n\n }).fail(function() {\n resolve('error');\n }).always(function() {\n // do nothing\n });\n });\n\n};\nWpcf7cfMultistep.prototype.moveToStep = function(step_index) {\n var multistep = this;\n var previousStep = multistep.current_step;\n\n multistep.current_step = step_index > multistep.numSteps ? multistep.numSteps\n : step_index < 1 ? 1\n : step_index;\n\n // ANIMATION DISABLED FOR NOW cause it's ugly\n // multistep.$steps.animate(wpcf7cf_hide_step_animation, multistep.form.settings.animation_outtime);\n // multistep.$steps.eq(multistep.current_step-1).animate(wpcf7cf_show_step_animation, multistep.form.settings.animation_intime);\n\n multistep.$multistep.attr('data-current_step', multistep.current_step);\n multistep.$steps.hide();\n multistep.$steps.eq(multistep.current_step-1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.current_step]); // change step;\n\n window.wpcf7cf.updateMultistepState(multistep);\n};\n\nWpcf7cfMultistep.prototype.getFieldsInStep = function(step_index) {\n var simpleDom = window.wpcf7cf.get_simplified_dom_model(this.form.$form);\n var inStep = false;\n return simpleDom.filter(function(item, i) {\n if(item.type == 'step') {\n inStep = item.step == step_index+'';\n }\n return inStep && item.type == 'input';\n }).map(function(item) {\n return item.name;\n });\n};\n\n// END PRO ONLY\n\nwindow.wpcf7cf = {\n\n // keep this for backwards compatibility\n initForm : function($form) {\n wpcf7cf_forms.push(new Wpcf7cfForm($form));\n },\n\n get_nested_conditions : function(conditions, $current_form) {\n //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index\n var simplified_dom = window.wpcf7cf.get_simplified_dom_model($current_form);\n var groups = simplified_dom.filter(function(item, i) {\n return item.type==='group';\n });\n\n var sub_conditions = [];\n\n for(var i = 0; i < groups.length; i++) {\n var g = groups[i];\n var relevant_conditions = conditions.filter(function(condition, i) {\n return condition.then_field === g.original_name;\n });\n \n var relevant_conditions = relevant_conditions.map(function(item,i) {\n return {\n then_field : g.name,\n and_rules : item.and_rules.map(function(and_rule, i) {\n return {\n if_field : and_rule.if_field+g.suffix,\n if_value : and_rule.if_value,\n operator : and_rule.operator\n };\n })\n }\n });\n\n sub_conditions = sub_conditions.concat(relevant_conditions);\n }\n return conditions.concat(sub_conditions);\n },\n\n get_simplified_dom_model : function($current_form) {\n // if the dom is something like:\n // <form>\n // <repeater ra>\n // <group ga__1>\n // <repeater rb__1>\n // <input txta__1__1 />\n // <input txta__1__2 />\n // </repeater>\n // <group gb__1>\n // <input txtb__1 />\n // </group>\n // </group>\n // <group ga__2>\n // <repeater rb__2>\n // <input txta__2__1 />\n // </repeater>\n // <group gb__2>\n // <input txtb__2 />\n // </group>\n // </group>\n // </repeater>\n // </form>\n // \n // return something like:\n // [{type:repeater, name:'ra', suffix: '__1'}, {type: group, name:'ga', suffix: '__1'}, ...]\n\n var currentNode;\n var ni = document.createNodeIterator($current_form[0], NodeFilter.SHOW_ELEMENT, null, false); //, NodeFilter.SHOW_ELEMENT, function(){ return NodeFilter.FILTER_ACCEPT; }\n\n var simplified_dom = [];\n\n while(currentNode = ni.nextNode()) {\n if (currentNode.classList.contains('wpcf7cf_repeater')) {\n simplified_dom.push({type:'repeater', name:currentNode.dataset.id, original_name:currentNode.dataset.orig_data_id})\n } else if (currentNode.dataset.class == 'wpcf7cf_group') {\n simplified_dom.push({type:'group', name:currentNode.dataset.id, original_name:currentNode.dataset.orig_data_id})\n } else if (currentNode.className == 'wpcf7cf_step') {\n simplified_dom.push({type:'step', name:currentNode.dataset.id, original_name:currentNode.dataset.id, step: currentNode.dataset.id.substring(5)})\n } else if (currentNode.hasAttribute('name')) {\n simplified_dom.push({type:'input', name:currentNode.getAttribute('name'), original_name:currentNode.getAttribute('data-orig_name')})\n }\n }\n\n simplified_dom = simplified_dom.map(function(item, i){\n var original_name_length = item.original_name == null ? item.name.length : item.original_name.length;\n item.suffix = item.name.substring(original_name_length);\n return item;\n });\n\n //console.table(simplified_dom);\n return simplified_dom;\n\n },\n\n updateMultistepState: function (multistep) {\n if (multistep == null) return;\n\n // update hidden input field\n\n var stepsData = {\n currentStep : multistep.current_step,\n numSteps : multistep.numSteps,\n fieldsInCurrentStep : multistep.getFieldsInStep(multistep.current_step)\n };\n multistep.form.$input_steps.val(JSON.stringify(stepsData));\n\n // update Buttons\n multistep.$btn_prev.removeClass('disabled');\n multistep.$btn_next.removeClass('disabled');\n if (multistep.current_step == multistep.numSteps) {\n multistep.$btn_next.addClass('disabled');\n }\n if (multistep.current_step == 1) {\n multistep.$btn_prev.addClass('disabled');\n }\n\n // replace next button with submit button on last step.\n // TODO: make this depend on a setting\n var $submit_button = multistep.form.$form.find('input[type=\"submit\"]').eq(0);\n if (multistep.current_step == multistep.numSteps) {\n var $submit_clone = $submit_button.clone();\n $submit_button.hide();\n multistep.$btn_next.hide();\n multistep.$btn_next.parent().append($submit_clone);\n } else {\n multistep.$btn_next.parent().find('input[type=submit]').remove();\n $submit_button.show();\n multistep.$btn_next.show();\n }\n\n // update dots\n var $dots = multistep.$dots.find('.dot');\n $dots.removeClass('active').removeClass('completed');\n for(var step = 1; step <= multistep.numSteps; step++) {\n if (step < multistep.current_step) {\n $dots.eq(step-1).addClass('completed');\n } else if (step == multistep.current_step) {\n $dots.eq(step-1).addClass('active');\n }\n }\n\n },\n\n should_group_be_shown : function(condition, $current_form) {\n\n var $ = jQuery;\n\n var show_group = true;\n\n for (var and_rule_i = 0; and_rule_i < condition.and_rules.length; and_rule_i++) {\n\n var condition_ok = false;\n\n var condition_and_rule = condition.and_rules[and_rule_i];\n\n var $field = jQuery('[name=\"' + condition_and_rule.if_field + '\"], [name=\"' + condition_and_rule.if_field + '[]\"], [data-original-name=\"' + condition_and_rule.if_field + '\"], [data-original-name=\"' + condition_and_rule.if_field + '[]\"]',$current_form);\n\n var if_val = condition_and_rule.if_value;\n var if_val_as_number = isFinite(parseFloat(if_val)) ? parseFloat(if_val):0;\n var operator = condition_and_rule.operator;\n \n var regex_patt = /.*/i; // fallback regex pattern\n var isValidRegex = true;\n try {\n regex_patt = new RegExp(if_val, 'i');\n } catch(e) {\n isValidRegex = false;\n }\n\n\n //backwards compat\n operator = operator === '≤' ? 'less than or equals' : operator;\n operator = operator === '≥' ? 'greater than or equals' : operator;\n operator = operator === '>' ? 'greater than' : operator;\n operator = operator === '<' ? 'less than' : operator;\n\n\n if ($field.length === 1) {\n\n // single field (tested with text field, single checkbox, select with single value (dropdown), select with multiple values)\n\n if ($field.is('select')) {\n\n if (operator === 'not equals') {\n condition_ok = true;\n }\n\n $field.find('option:selected').each(function () {\n var $option = jQuery(this);\n var option_val = $option.val()\n if (\n operator === 'equals' && option_val === if_val ||\n operator === 'equals (regex)' && regex_patt.test($option.val())\n ) {\n condition_ok = true;\n } else if (\n operator === 'not equals' && option_val === if_val ||\n operator === 'not equals (regex)' && !regex_patt.test($option.val())\n ) {\n condition_ok = false;\n return false; // break out of the loop\n }\n });\n\n show_group = show_group && condition_ok;\n }\n\n var field_val = $field.val();\n var field_val_as_number = isFinite(parseFloat(field_val)) ? parseFloat(field_val):0;\n\n if ($field.attr('type') === 'checkbox') {\n var field_is_checked = $field.is(':checked');\n if (\n operator === 'equals' && field_is_checked && field_val === if_val ||\n operator === 'not equals' && !field_is_checked ||\n operator === 'is empty' && !field_is_checked ||\n operator === 'not empty' && field_is_checked ||\n operator === 'greater than' && field_is_checked && field_val_as_number > if_val_as_number ||\n operator === 'less than' && field_is_checked && field_val_as_number < if_val_as_number ||\n operator === 'greater than or equals' && field_is_checked && field_val_as_number >= if_val_as_number ||\n operator === 'less than or equals' && field_is_checked && field_val_as_number <= if_val_as_number ||\n operator === 'equals (regex)' && field_is_checked && regex_patt.test(field_val) ||\n operator === 'not equals (regex)' && !field_is_checked\n\n ) {\n condition_ok = true;\n }\n } else if (\n operator === 'equals' && field_val === if_val ||\n operator === 'not equals' && field_val !== if_val ||\n operator === 'equals (regex)' && regex_patt.test(field_val) ||\n operator === 'not equals (regex)' && !regex_patt.test(field_val) ||\n operator === 'greater than' && field_val_as_number > if_val_as_number ||\n operator === 'less than' && field_val_as_number < if_val_as_number ||\n operator === 'greater than or equals' && field_val_as_number >= if_val_as_number ||\n operator === 'less than or equals' && field_val_as_number <= if_val_as_number ||\n operator === 'is empty' && field_val === '' ||\n operator === 'not empty' && field_val !== '' ||\n (\n operator === 'function'\n && typeof window[if_val] == 'function'\n && window[if_val]($field)\n )\n ) {\n condition_ok = true;\n }\n\n\n } else if ($field.length > 1) {\n\n // multiple fields (tested with checkboxes, exclusive checkboxes, dropdown with multiple values)\n\n var all_values = [];\n var checked_values = [];\n $field.each(function () {\n all_values.push(jQuery(this).val());\n if (jQuery(this).is(':checked')) {\n checked_values.push(jQuery(this).val());\n }\n });\n\n var checked_value_index = jQuery.inArray(if_val, checked_values);\n var value_index = jQuery.inArray(if_val, all_values);\n\n if (\n ( operator === 'is empty' && checked_values.length === 0 ) ||\n ( operator === 'not empty' && checked_values.length > 0 )\n ) {\n condition_ok = true;\n }\n\n\n for (var ind = 0; ind < checked_values.length; ind++) {\n var checked_val = checked_values[ind];\n var checked_val_as_number = isFinite(parseFloat(checked_val)) ? parseFloat(checked_val):0;\n if (\n ( operator === 'equals' && checked_val === if_val ) ||\n ( operator === 'not equals' && checked_val !== if_val ) ||\n ( operator === 'equals (regex)' && regex_patt.test(checked_val) ) ||\n ( operator === 'not equals (regex)' && !regex_patt.test(checked_val) ) ||\n ( operator === 'greater than' && checked_val_as_number > if_val_as_number ) ||\n ( operator === 'less than' && checked_val_as_number < if_val_as_number ) ||\n ( operator === 'greater than or equals' && checked_val_as_number >= if_val_as_number ) ||\n ( operator === 'less than or equals' && checked_val_as_number <= if_val_as_number )\n ) {\n condition_ok = true;\n }\n }\n }\n\n show_group = show_group && condition_ok;\n }\n\n return show_group;\n\n }\n\n};\n\n\njQuery('.wpcf7-form').each(function(){\n wpcf7cf_forms.push(new Wpcf7cfForm(jQuery(this)));\n});\n\n// Call displayFields again on all forms\n// Necessary in case some theme or plugin changed a form value by the time the entire page is fully loaded.\njQuery('document').ready(function() {\n wpcf7cf_forms.forEach(function(f){\n f.displayFields();\n });\n});\n\n// fix for exclusive checkboxes in IE (this will call the change-event again after all other checkboxes are unchecked, triggering the display_fields() function)\nvar old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;\njQuery.fn.wpcf7ExclusiveCheckbox = function() {\n return this.find('input:checkbox').click(function() {\n var name = jQuery(this).attr('name');\n jQuery(this).closest('form').find('input:checkbox[name=\"' + name + '\"]').not(this).prop('checked', false).eq(0).change();\n });\n};\n\n","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n"],"sourceRoot":""}
js/scripts_es6.js CHANGED
@@ -94,7 +94,7 @@ var Wpcf7cfForm = function($form) {
94
 
95
  if ($multistep.length) {
96
  form.multistep = new Wpcf7cfMultistep($multistep, form);
97
- // wpcf7cf.updateMultistepState(form.multistep);
98
  }
99
 
100
  // END PRO ONLY
@@ -104,7 +104,7 @@ Wpcf7cfForm.prototype.displayFields = function() {
104
 
105
  var form = this;
106
 
107
- wpcf7cf.get_simplified_dom_model(form.$form);
108
 
109
  var unit_tag = this.unit_tag;
110
  var wpcf7cf_conditions = this.conditions;
@@ -131,7 +131,7 @@ Wpcf7cfForm.prototype.displayFields = function() {
131
 
132
  var condition = wpcf7cf_conditions[i];
133
 
134
- var show_group = wpcf7cf.should_group_be_shown(condition, form.$form);
135
 
136
  if (show_group) {
137
  jQuery('[data-id='+condition.then_field+']',form.$form).eq(0).removeClass('wpcf7cf-hidden');
@@ -210,7 +210,7 @@ Wpcf7cfForm.prototype.updateGroups = function() {
210
  var form = this;
211
  form.$groups = form.$form.find('[data-class="wpcf7cf_group"]');
212
 
213
- form.conditions = wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);
214
 
215
  };
216
  Wpcf7cfForm.prototype.updateEventListeners = function() {
@@ -427,7 +427,7 @@ Wpcf7cfRepeater.prototype.addSubs = function(subs_to_add) {
427
 
428
  $repeater.num_subs+= subs_to_add;
429
 
430
- wpcf7cf.updateMultistepState(form.multistep);
431
  form.updateGroups();
432
  form.updateEventListeners();
433
  form.displayFields();
@@ -457,7 +457,7 @@ Wpcf7cfRepeater.prototype.removeSubs = function(num_subs) {
457
  //remove the actual fields from the form
458
  $this.remove();
459
  params.$repeater.trigger('wpcf7cf_repeater_removed');
460
- wpcf7cf.updateMultistepState(form.multistep);
461
  form.updateGroups();
462
  form.updateEventListeners();
463
  form.displayFields();
@@ -603,11 +603,11 @@ Wpcf7cfMultistep.prototype.moveToStep = function(step_index) {
603
  multistep.$steps.hide();
604
  multistep.$steps.eq(multistep.current_step-1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.current_step]); // change step;
605
 
606
- wpcf7cf.updateMultistepState(multistep);
607
  };
608
 
609
  Wpcf7cfMultistep.prototype.getFieldsInStep = function(step_index) {
610
- var simpleDom = wpcf7cf.get_simplified_dom_model(this.form.$form);
611
  var inStep = false;
612
  return simpleDom.filter(function(item, i) {
613
  if(item.type == 'step') {
@@ -621,7 +621,7 @@ Wpcf7cfMultistep.prototype.getFieldsInStep = function(step_index) {
621
 
622
  // END PRO ONLY
623
 
624
- var wpcf7cf = {
625
 
626
  // keep this for backwards compatibility
627
  initForm : function($form) {
@@ -630,7 +630,7 @@ var wpcf7cf = {
630
 
631
  get_nested_conditions : function(conditions, $current_form) {
632
  //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index
633
- var simplified_dom = wpcf7cf.get_simplified_dom_model($current_form);
634
  var groups = simplified_dom.filter(function(item, i) {
635
  return item.type==='group';
636
  });
94
 
95
  if ($multistep.length) {
96
  form.multistep = new Wpcf7cfMultistep($multistep, form);
97
+ // window.wpcf7cf.updateMultistepState(form.multistep);
98
  }
99
 
100
  // END PRO ONLY
104
 
105
  var form = this;
106
 
107
+ window.wpcf7cf.get_simplified_dom_model(form.$form);
108
 
109
  var unit_tag = this.unit_tag;
110
  var wpcf7cf_conditions = this.conditions;
131
 
132
  var condition = wpcf7cf_conditions[i];
133
 
134
+ var show_group = window.wpcf7cf.should_group_be_shown(condition, form.$form);
135
 
136
  if (show_group) {
137
  jQuery('[data-id='+condition.then_field+']',form.$form).eq(0).removeClass('wpcf7cf-hidden');
210
  var form = this;
211
  form.$groups = form.$form.find('[data-class="wpcf7cf_group"]');
212
 
213
+ form.conditions = window.wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);
214
 
215
  };
216
  Wpcf7cfForm.prototype.updateEventListeners = function() {
427
 
428
  $repeater.num_subs+= subs_to_add;
429
 
430
+ window.wpcf7cf.updateMultistepState(form.multistep);
431
  form.updateGroups();
432
  form.updateEventListeners();
433
  form.displayFields();
457
  //remove the actual fields from the form
458
  $this.remove();
459
  params.$repeater.trigger('wpcf7cf_repeater_removed');
460
+ window.wpcf7cf.updateMultistepState(form.multistep);
461
  form.updateGroups();
462
  form.updateEventListeners();
463
  form.displayFields();
603
  multistep.$steps.hide();
604
  multistep.$steps.eq(multistep.current_step-1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.current_step]); // change step;
605
 
606
+ window.wpcf7cf.updateMultistepState(multistep);
607
  };
608
 
609
  Wpcf7cfMultistep.prototype.getFieldsInStep = function(step_index) {
610
+ var simpleDom = window.wpcf7cf.get_simplified_dom_model(this.form.$form);
611
  var inStep = false;
612
  return simpleDom.filter(function(item, i) {
613
  if(item.type == 'step') {
621
 
622
  // END PRO ONLY
623
 
624
+ window.wpcf7cf = {
625
 
626
  // keep this for backwards compatibility
627
  initForm : function($form) {
630
 
631
  get_nested_conditions : function(conditions, $current_form) {
632
  //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index
633
+ var simplified_dom = window.wpcf7cf.get_simplified_dom_model($current_form);
634
  var groups = simplified_dom.filter(function(item, i) {
635
  return item.type==='group';
636
  });
readme.txt CHANGED
@@ -6,8 +6,8 @@ Website: http://bdwm.be
6
  Tags: wordpress, contact form 7, forms, conditional fields
7
  Requires at least: 4.1
8
  Tested up to: 5.3
9
- Stable tag: 1.7.8
10
- Requires PHP: 5.4
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -102,6 +102,11 @@ The conditional fields javascript code is loaded during wp_footer, so a call to
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
105
  = 1.7.8 (11-26-19) =
106
  * Updated/added Javascript events for groups, repeaters and multistep + added documentation at https://conditional-fields-cf7.bdwm.be/docs/examples/javascript-events/
107
  * Fixed bug where using invalid regex as a value would give a JS error (https://wordpress.org/support/topic/star-ratings-6/)
6
  Tags: wordpress, contact form 7, forms, conditional fields
7
  Requires at least: 4.1
8
  Tested up to: 5.3
9
+ Stable tag: 1.7.9
10
+ Requires PHP: 5.6
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
102
 
103
  == Changelog ==
104
 
105
+ = 1.7.9 (01-22-20) =
106
+ * PRO (01-02-20) Added quick fix for problem with [_format_date "d m Y"] inside repeater. (see: https://github.com/pwkip/contact-form-7-conditional-fields/issues/38)
107
+ * (01-22-20) Fixed Ajax by adding global wpcf7cf variable to window.
108
+ * Changed min PHP version to 5.6 (might still be compatible with 5.4, but I suspect some edge case errors with older versions of PHP)
109
+
110
  = 1.7.8 (11-26-19) =
111
  * Updated/added Javascript events for groups, repeaters and multistep + added documentation at https://conditional-fields-cf7.bdwm.be/docs/examples/javascript-events/
112
  * Fixed bug where using invalid regex as a value would give a JS error (https://wordpress.org/support/topic/star-ratings-6/)