PageSourceSearch

https://derco.com.co/wp-content/plugins/cf7-conditional-fields/js/scripts.js?ver=2.2.3

js derco.com.co collected 2026-10-09 05:14:42 UTC 139,273 bytes, 4,122 lines download raw bytes

vendor: 3,603 bytes, lines 1-89
1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ 		// Flag the module as loaded
23/******/ 		module.l = true;
24/******/
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28/******/
29/******/
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32/******/
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35/******/
36/******/ 	// define getter function for harmony exports
37/******/ 	__webpack_require__.d = function(exports, name, getter) {
38/******/ 		if(!__webpack_require__.o(exports, name)) {
39/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40/******/ 		}
41/******/ 	};
42/******/
43/******/ 	// define __esModule on exports
44/******/ 	__webpack_require__.r = function(exports) {
45/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47/******/ 		}
48/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49/******/ 	};
50/******/
51/******/ 	// create a fake namespace object
52/******/ 	// mode & 1: value is a module id, require it
53/******/ 	// mode & 2: merge all properties of value into the ns
54/******/ 	// mode & 4: return value when already ns object
55/******/ 	// mode & 8|1: behave like require
56/******/ 	__webpack_require__.t = function(value, mode) {
57/******/ 		if(mode & 1) value = __webpack_require__(value);
58/******/ 		if(mode & 8) return value;
59/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60/******/ 		var ns = Object.create(null);
61/******/ 		__webpack_require__.r(ns);
62/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64/******/ 		return ns;
65/******/ 	};
66/******/
67/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68/******/ 	__webpack_require__.n = function(module) {
69/******/ 		var getter = module && module.__esModule ?
70/******/ 			function getDefault() { return module['default']; } :
71/******/ 			function getModuleExports() { return module; };
72/******/ 		__webpack_require__.d(getter, 'a', getter);
73/******/ 		return getter;
74/******/ 	};
75/******/
76/******/ 	// Object.prototype.hasOwnProperty.call
77/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78/******/
79/******/ 	// __webpack_public_path__
80/******/ 	__webpack_require__.p = "";
81/******/
82/******/
83/******/ 	// Load entry module and return exports
84/******/ 	return __webpack_require__(__webpack_require__.s = 0);
85/******/ })
86/************************************************************************/
87/******/ ({
88
89/***/ "./
vendor: 3,281 bytes, lines 89-206
89js/polyfill.js":
90/*!************************!*\
91  !*** ./js/polyfill.js ***!
92  \************************/
93/*! no static exports found */
94/***/ (function(module, exports) {
95
96// endsWith polyfill
97if (!String.prototype.endsWith) {
98  String.prototype.endsWith = function (search, thisLength) {
99    if (thisLength === undefined || thisLength > this.length) {
100      thisLength = this.length;
101    }
102
103    return this.substring(thisLength - search.length, thisLength) === search;
104  };
105} // Object.values polyfill
106
107
108if (!Object.values) Object.values = function (o) {
109  return Object.keys(o).map(function (k) {
110    return o[k];
111  });
112}; // Array.from polyfill
113
114if (!Array.from) {
115  Array.from = function () {
116    var toStr = Object.prototype.toString;
117
118    var isCallable = function isCallable(fn) {
119      return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
120    };
121
122    var toInteger = function toInteger(value) {
123      var number = Number(value);
124
125      if (isNaN(number)) {
126        return 0;
127      }
128
129      if (number === 0 || !isFinite(number)) {
130        return number;
131      }
132
133      return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
134    };
135
136    var maxSafeInteger = Math.pow(2, 53) - 1;
137
138    var toLength = function toLength(value) {
139      var len = toInteger(value);
140      return Math.min(Math.max(len, 0), maxSafeInteger);
141    }; // The length property of the from method is 1.
142
143
144    return function from(arrayLike
145    /*, mapFn, thisArg */
146    ) {
147      // 1. Let C be the this value.
148      var C = this; // 2. Let items be ToObject(arrayLike).
149
150      var items = Object(arrayLike); // 3. ReturnIfAbrupt(items).
151
152      if (arrayLike == null) {
153        throw new TypeError("Array.from requires an array-like object - not null or undefined");
154      } // 4. If mapfn is undefined, then let mapping be false.
155
156
157      var mapFn = arguments.length > 1 ? arguments[1] : void undefined;
158      var T;
159
160      if (typeof mapFn !== 'undefined') {
161        // 5. else
162        // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
163        if (!isCallable(mapFn)) {
164          throw new TypeError('Array.from: when provided, the second argument must be a function');
165        } // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.
166
167
168        if (arguments.length > 2) {
169          T = arguments[2];
170        }
171      } // 10. Let lenValue be Get(items, "length").
172      // 11. Let len be ToLength(lenValue).
173
174
175      var len = toLength(items.length); // 13. If IsConstructor(C) is true, then
176      // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.
177      // 14. a. Else, Let A be ArrayCreate(len).
178
179      var A = isCallable(C) ? Object(new C(len)) : new Array(len); // 16. Let k be 0.
180
181      var k = 0; // 17. Repeat, while k < len… (also steps a - h)
182
183      var kValue;
184
185      while (k < len) {
186        kValue = items[k];
187
188        if (mapFn) {
189          A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
190        } else {
191          A[k] = kValue;
192        }
193
194        k += 1;
195      } // 18. Let putStatus be Put(A, "length", len, true).
196
197
198      A.length = len; // 20. Return A.
199
200      return A;
201    };
202  }();
203}
204
205/***/ }),
206
207/***/ "./js/scripts_es6.js":
208/*!***************************!*\
209  !*** ./js/scripts_es6.js ***!
210  \***************************/
211/*! no exports provided */
212/***/ (function(module, __webpack_exports__, __webpack_require__) {
213
214"use strict";
215__webpack_require__.r(__webpack_exports__);
216/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
217/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);
218/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
219/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);
220/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
221/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);
222/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js");
223/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__);
224/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js");
225/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__);
226 // disable client side validation introduced in CF7 5.6 for now
227
228
229
230
231
232
233
234function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
235
236function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
237
238if (typeof wpcf7 !== 'undefined') {
239  wpcf7.validate = function (a, b) {
240    return null;
241  };
242}
243
244var cf7signature_resized = 0; // for compatibility with contact-form-7-signature-addon
245
246var wpcf7cf_timeout;
247var wpcf7cf_change_time_ms = 100; // the timeout after a change in the form is detected
248
249if (window.wpcf7 && !wpcf7.setStatus) {
250  wpcf7.setStatus = function (form, status) {
251    form = form.length ? form[0] : form; // if form is a jQuery object, only grab te html-element
252
253    var defaultStatuses = new Map([// 0: Status in API response, 1: Status in HTML class
254    ['init', 'init'], ['validation_failed', 'invalid'], ['acceptance_missing', 'unaccepted'], ['spam', 'spam'], ['aborted', 'aborted'], ['mail_sent', 'sent'], ['mail_failed', 'failed'], ['submitting', 'submitting'], ['resetting', 'resetting']]);
255
256    if (defaultStatuses.has(status)) {
257      status = defaultStatuses.get(status);
258    }
259
260    if (!Array.from(defaultStatuses.values()).includes(status)) {
261      status = status.replace(/[^0-9a-z]+/i, ' ').trim();
262      status = status.replace(/\s+/, '-');
263      status = "custom-".concat(status);
264    }
265
266    var prevStatus = form.getAttribute('data-status');
267    form.wpcf7.status = status;
268    form.setAttribute('data-status', status);
269    form.classList.add(status);
270
271    if (prevStatus && prevStatus !== status) {
272      form.classList.remove(prevStatus);
273    }
274
275    return status;
276  };
277}
278
279if (window.wpcf7cf_running_tests) {
280  jQuery('input[name="_wpcf7cf_options"]').each(function (e) {
281    var $input = jQuery(this);
282    var opt = JSON.parse($input.val());
283    opt.settings.animation_intime = 0;
284    opt.settings.animation_outtime = 0;
285    $input.val(JSON.stringify(opt));
286  });
287  wpcf7cf_change_time_ms = 0;
288}
289
290var wpcf7cf_show_animation = {
291  "height": "show",
292  "marginTop": "show",
293  "marginBottom": "show",
294  "paddingTop": "show",
295  "paddingBottom": "show"
296};
297var wpcf7cf_hide_animation = {
298  "height": "hide",
299  "marginTop": "hide",
300  "marginBottom": "hide",
301  "paddingTop": "hide",
302  "paddingBottom": "hide"
303};
304var wpcf7cf_show_step_animation = {
305  "opacity": "show"
306};
307var wpcf7cf_hide_step_animation = {
308  "opacity": "hide"
309};
310var wpcf7cf_change_events = 'input.wpcf7cf paste.wpcf7cf change.wpcf7cf click.wpcf7cf propertychange.wpcf7cf changedisabledprop.wpcf7cf';
311var wpcf7cf_forms = [];
312
313var Wpcf7cfForm = function Wpcf7cfForm($form) {
314  var options_element = $form.find('input[name="_wpcf7cf_options"]').eq(0);
315
316  if (!options_element.length || !options_element.val()) {
317    // doesn't look like a CF7 form created with conditional fields plugin enabled.
318    return false;
319  }
320
321  var form = this;
322  var form_options = JSON.parse(options_element.val());
323  form.$form = $form;
324  form.$input_hidden_group_fields = $form.find('[name="_wpcf7cf_hidden_group_fields"]');
325  form.$input_hidden_groups = $form.find('[name="_wpcf7cf_hidden_groups"]');
326  form.$input_visible_groups = $form.find('[name="_wpcf7cf_visible_groups"]');
327  form.$input_repeaters = $form.find('[name="_wpcf7cf_repeaters"]');
328  form.$input_steps = $form.find('[name="_wpcf7cf_steps"]');
329  form.unit_tag = $form.closest('.wpcf7').attr('id');
330  form.conditions = form_options['conditions'];
331  form.simpleDom = null;
332
333  form.reloadSimpleDom = function () {
334    form.simpleDom = wpcf7cf.get_simplified_dom_model(form.$form[0]);
335  }; // quicker than reloading the simpleDom completely with reloadSimpleDom
336
337
338  form.updateSimpleDom = function () {
339    if (!form.simpleDom) {
340      form.reloadSimpleDom();
341    }
342
343    var inputs = Object.values(form.simpleDom).filter(function (item) {
344      return item.type === 'input';
345    });
346    var formdata = new FormData(form.$form[0]);
347
348    var formdataEntries = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4___default()(formdata.entries()).map(function (entry) {
349      var _entry$1$name;
350
351      return [entry[0], (_entry$1$name = entry[1].name) !== null && _entry$1$name !== void 0 ? _entry$1$name : entry[1]];
352    }); // const changedInputs = inputs.filter(item => !form.isDomMatch(item, formdataEntries));
353
354
355    inputs.forEach(function (simpleDomItem) {
356      var newValue = form.getNewDomValueIfChanged(simpleDomItem, formdataEntries);
357
358      if (newValue !== null) {
359        form.simpleDom[simpleDomItem.name].val = newValue;
360      }
361    });
362  };
363
364  form.isDomMatch = function (simpleDomItem, formDataEntries) {
365    var simpleDomItemName = simpleDomItem.name;
366    var simpleDomItemValues = simpleDomItem.val;
367    var currentValues = formDataEntries.filter(function (entry) {
368      return entry[0] === simpleDomItemName;
369    }).map(function (entry) {
370      return entry[1];
371    });
372    return currentValues.join('|') === simpleDomItemValues.join('|');
373  };
374  /**
375   * 
376   * @param {*} simpleDomItem 
377   * @param {*} formDataEntries 
378   * @returns the new value, or NULL if no change
379   */
380
381
382  form.getNewDomValueIfChanged = function (simpleDomItem, formDataEntries) {
383    var simpleDomItemName = simpleDomItem.name;
384    var simpleDomItemValues = simpleDomItem.val;
385    var currentValues = formDataEntries.filter(function (entry) {
386      return entry[0] === simpleDomItemName;
387    }).map(function (entry) {
388      return entry[1];
389    });
390    return currentValues.join('|') === simpleDomItemValues.join('|') ? null : currentValues;
391  }; // Wrapper around jQuery(selector, form.$form)
392
393
394  form.get = function (selector) {
395    // TODO: implement some caching here.
396    return jQuery(selector, form.$form);
397  };
398
399  form.getFieldByName = function (name) {
400    return form.simpleDom[name] || form.simpleDom[name + '[]'];
401  }; // compatibility with conditional forms created with older versions of the plugin ( < 1.4 )
402
403
404  for (var i = 0; i < form.conditions.length; i++) {
405    var condition = form.conditions[i];
406
407    if (!('and_rules' in condition)) {
408      condition.and_rules = [{
409        'if_field': condition.if_field,
410        'if_value': condition.if_value,
411        'operator': condition.operator
412      }];
413    }
414  }
415
416  form.initial_conditions = form.conditions;
417  form.settings = form_options['settings'];
418  form.$groups = jQuery(); // empty jQuery set
419
420  form.repeaters = [];
421  form.multistep = null;
422  form.fields = [];
423  form.settings.animation_intime = parseInt(form.settings.animation_intime);
424  form.settings.animation_outtime = parseInt(form.settings.animation_outtime);
425
426  if (form.settings.animation === 'no') {
427    form.settings.animation_intime = 0;
428    form.settings.animation_outtime = 0;
429  }
430
431  form.updateGroups();
432  form.updateEventListeners();
433  form.displayFields(); // bring form in initial state if the reset event is fired on it.
434  // (CF7 triggers the 'reset' event by default on each successfully submitted form)
435
436  form.$form.on('reset.wpcf7cf', form, function (e) {
437    var form = e.data;
438    setTimeout(function () {
439      form.reloadSimpleDom();
440      form.displayFields();
441      form.resetRepeaters();
442
443      if (form.multistep != null) {
444        form.multistep.moveToStep(1, false);
445      }
446
447      setTimeout(function () {
448        if (form.$form.hasClass('sent')) {
449          jQuery('.wpcf7-response-output', form.$form)[0].scrollIntoView({
450            behavior: "smooth",
451            block: "nearest",
452            inline: "nearest"
453          });
454        }
455      }, 400);
456    }, 200);
457  }); // PRO ONLY
458
459  form.get('.wpcf7cf_repeater:not(.wpcf7cf_repeater .wpcf7cf_repeater)').each(function () {
460    form.repeaters.push(new Wpcf7cfRepeater(jQuery(this), form));
461  });
462  form.$input_repeaters.val(JSON.stringify(form.repeaters.map(function (item) {
463    return item.params.$repeater.id;
464  })));
465  var $multistep = form.get('.wpcf7cf_multistep');
466
467  if ($multistep.length) {
468    form.multistep = new Wpcf7cfMultistep($multistep, form); // window.wpcf7cf.updateMultistepState(form.multistep);
469  } // END PRO ONLY
470
471};
472/**
473 * reset initial number of subs for each repeater.
474 * (does not clear values)
475 */
476
477
478Wpcf7cfForm.prototype.resetRepeaters = function () {
479  var form = this;
480  form.repeaters.forEach(function (repeater) {
481    repeater.updateSubs(repeater.params.$repeater.initial_subs);
482  });
483};
484
485Wpcf7cfForm.prototype.displayFields = function () {
486  var form = this;
487  var wpcf7cf_conditions = this.conditions;
488  var wpcf7cf_settings = this.settings; //for compatibility with contact-form-7-signature-addon
489
490  if (cf7signature_resized === 0 && typeof signatures !== 'undefined' && signatures.constructor === Array && signatures.length > 0) {
491    for (var i = 0; i < signatures.length; i++) {
492      if (signatures[i].canvas.width === 0) {
493        var $sig_canvas = jQuery(".wpcf7-form-control-signature-body>canvas");
494        var $sig_wrap = jQuery(".wpcf7-form-control-signature-wrap");
495        $sig_canvas.eq(i).attr('width', $sig_wrap.width());
496        $sig_canvas.eq(i).attr('height', $sig_wrap.height());
497        cf7signature_resized = 1;
498      }
499    }
500  }
501
502  form.$groups.addClass('wpcf7cf-hidden'); //form.reloadSimpleDom();
503
504  for (var i = 0; i < wpcf7cf_conditions.length; i++) {
505    var condition = wpcf7cf_conditions[i];
506    var show_group = window.wpcf7cf.should_group_be_shown(condition, form);
507
508    if (show_group) {
509      form.get('[data-id="' + condition.then_field + '"]').removeClass('wpcf7cf-hidden');
510    }
511  }
512
513  var animation_intime = wpcf7cf_settings.animation_intime;
514  var animation_outtime = wpcf7cf_settings.animation_outtime;
515  form.$groups.each(function (index) {
516    var $group = jQuery(this);
517
518    if ($group.is(':animated')) {
519      $group.finish(); // stop any current animations on the group
520    }
521
522    if ($group.css('display') === 'none' && !$group.hasClass('wpcf7cf-hidden')) {
523      if ($group.prop('tagName') === 'SPAN') {
524        $group.show().trigger('wpcf7cf_show_group'); // show instantly
525      } else {
526        $group.animate(wpcf7cf_show_animation, animation_intime).trigger('wpcf7cf_show_group'); // show with animation
527      }
528
529      if ($group.attr('data-disable_on_hide') !== undefined) {
530        $group.find(':input').prop('disabled', false).trigger('changedisabledprop.wpcf7cf');
531        $group.find('.wpcf7-form-control-wrap').removeClass('wpcf7cf-disabled');
532      }
533    } else if ($group.css('display') !== 'none' && $group.hasClass('wpcf7cf-hidden')) {
534      if ($group.attr('data-clear_on_hide') !== undefined) {
535        var $inputs = jQuery(':input', $group).not(':button, :submit, :reset, :hidden');
536        $inputs.each(function () {
537          var $this = jQuery(this);
538          $this.val(this.defaultValue);
539          $this.prop('checked', this.defaultChecked);
540        });
541        jQuery('option', $group).each(function () {
542          this.selected = this.defaultSelected;
543        });
544        jQuery('select', $group).each(function () {
545          var $select = jQuery(this);
546
547          if ($select.val() === null) {
548            $select.val(jQuery("option:first", $select).val());
549          }
550        });
551        $inputs.each(function () {
552          this.dispatchEvent(new Event("change", {
553            "bubbles": true
554          }));
555        });
556      }
557
558      if ($group.prop('tagName') === 'SPAN') {
559        $group.hide().trigger('wpcf7cf_hide_group');
560      } else {
561        $group.animate(wpcf7cf_hide_animation, animation_outtime).trigger('wpcf7cf_hide_group'); // hide
562      }
563    }
564  });
565  form.updateHiddenFields();
566  form.updateSummaryFields();
567};
568
569Wpcf7cfForm.prototype.updateSummaryFields = function () {
570  var form = this;
571  var $summary = form.get('.wpcf7cf-summary');
572  if ($summary.length == 0 || !$summary.is(':visible')) return;
573  var fd = new FormData();
574  var formdata = form.$form.serializeArray();
575  jQuery.each(formdata, function (key, input) {
576    fd.append(input.name, input.value);
577  }); // Make sure to add file fields to FormData
578
579  jQuery.each(form.$form.find('input[type="file"]'), function (index, el) {
580    if (!el.files.length) return true; // continue
581
582    var fieldName = el.name;
583    fd.append(fieldName, new Blob(), Array.from(el.files).map(function (file) {
584      return file.name;
585    }).join(', '));
586  }); // add file fields to form-data
587
588  jQuery.ajax({
589    url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_get_summary',
590    type: 'POST',
591    data: fd,
592    processData: false,
593    contentType: false,
594    dataType: 'json',
595    success: function success(json) {
596      $summary.html(json.summaryHtml);
597    }
598  });
599};
600
601Wpcf7cfForm.prototype.updateHiddenFields = function () {
602  var form = this;
603  var hidden_fields = [];
604  var hidden_groups = [];
605  var visible_groups = [];
606  var disabled_fields = [];
607  form.$groups.each(function () {
608    var $group = jQuery(this);
609
610    if ($group.hasClass('wpcf7cf-hidden')) {
611      hidden_groups.push($group.attr('data-id'));
612
613      if ($group.attr('data-disable_on_hide') !== undefined) {
614        // fields inside hidden disable_on_hide group
615        $group.find('input,select,textarea').each(function () {
616          var $this = jQuery(this);
617
618          if (!$this.prop('disabled')) {
619            $this.prop('disabled', true).trigger('changedisabledprop.wpcf7cf');
620          } // if there's no other field with the same name visible in the form
621          // then push this field to hidden_fields
622
623
624          if (form.$form.find("[data-class=\"wpcf7cf_group\"]:not(.wpcf7cf-hidden) [name='".concat($this.attr('name'), "']")).length === 0) {
625            hidden_fields.push($this.attr('name'));
626          }
627        });
628        $group.find('.wpcf7-form-control-wrap').addClass('wpcf7cf-disabled');
629      } else {
630        // fields inside regular hidden group are all pushed to hidden_fields
631        $group.find('input,select,textarea').each(function () {
632          hidden_fields.push(jQuery(this).attr('name'));
633        });
634      }
635    } else {
636      visible_groups.push($group.attr('data-id'));
637    }
638  });
639  form.hidden_fields = hidden_fields;
640  form.hidden_groups = hidden_groups;
641  form.visible_groups = visible_groups;
642  form.$input_hidden_group_fields.val(JSON.stringify(hidden_fields));
643  form.$input_hidden_groups.val(JSON.stringify(hidden_groups));
644  form.$input_visible_groups.val(JSON.stringify(visible_groups));
645  return true;
646};
647
648Wpcf7cfForm.prototype.updateGroups = function () {
649  var form = this;
650  form.$groups = form.$form.find('[data-class="wpcf7cf_group"]');
651  form.$groups.height('auto');
652  form.conditions = window.wpcf7cf.get_nested_conditions(form);
653};
654
655Wpcf7cfForm.prototype.updateEventListeners = function () {
656  var form = this; // monitor input changes, and call displayFields() if something has changed
657
658  form.get('input, select, textarea, button').not('.wpcf7cf_add, .wpcf7cf_remove').off(wpcf7cf_change_events).on(wpcf7cf_change_events, form, function (e) {
659    var form = e.data;
660    clearTimeout(wpcf7cf_timeout);
661    wpcf7cf_timeout = setTimeout(function () {
662      window.wpcf7cf.updateMultistepState(form.multistep);
663      form.updateSimpleDom();
664      form.displayFields();
665    }, wpcf7cf_change_time_ms);
666  }); // PRO ONLY
667
668  form.get('.wpcf7cf-togglebutton').off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf', function () {
669    var $this = jQuery(this);
670
671    if ($this.text() === $this.attr('data-val-1')) {
672      $this.text($this.attr('data-val-2'));
673      $this.val($this.attr('data-val-2'));
674    } else {
675      $this.text($this.attr('data-val-1'));
676      $this.val($this.attr('data-val-1'));
677    }
678  }); // END PRO ONLY
679}; // PRO ONLY
680
681
682function Wpcf7cfRepeater($repeater, form) {
683  var $ = jQuery;
684  var repeater = this;
685  var wpcf7cf_settings = form.settings;
686  repeater.form = form;
687  $repeater.parentRepeaters = Array.from($repeater.parents('.wpcf7cf_repeater').map(function () {
688    return this.getAttribute('data-id');
689  })).reverse();
690  $repeater.num_subs = 0;
691  $repeater.id = $repeater.attr('data-id');
692  $repeater.orig_id = $repeater.attr('data-orig_data_id');
693  $repeater.min = typeof $repeater.attr('data-min') !== 'undefined' ? parseInt($repeater.attr('data-min')) : 1;
694  $repeater.max = typeof $repeater.attr('data-max') !== 'undefined' ? parseInt($repeater.attr('data-max')) : 200;
695  $repeater.initial_subs = typeof $repeater.attr('data-initial') !== 'undefined' ? parseInt($repeater.attr('data-initial')) : $repeater.min;
696  if ($repeater.initial_subs > $repeater.max) $repeater.initial_subs = $repeater.max;
697  var $repeater_sub = $repeater.children('.wpcf7cf_repeater_sub').eq(0);
698  var $repeater_controls = $repeater.children('.wpcf7cf_repeater_controls').eq(0);
699  var $repeater_sub_clone = $repeater_sub.clone();
700  $repeater_sub_clone.find('.wpcf7cf_repeater_sub').addBack('.wpcf7cf_repeater_sub').each(function () {
701    var $this = jQuery(this);
702    var prev_suffix = $this.attr('data-repeater_sub_suffix');
703    var new_suffix = prev_suffix + '__{{repeater_sub_suffix}}';
704    $this.attr('data-repeater_sub_suffix', new_suffix);
705  });
706  $repeater_sub_clone.find('[name]').each(function () {
707    var $this = jQuery(this);
708    var prev_name = $this.attr('name');
709    var new_name = repeater.getNewName(prev_name);
710    var orig_name = $this.attr('data-orig_name') != null ? $this.attr('data-orig_name') : prev_name;
711    $this.attr('name', new_name);
712    $this.attr('data-orig_name', orig_name);
713    $this.closest('.wpcf7-form-control-wrap').attr('data-name', new_name.replace('[]', ''));
714  });
715  $repeater_sub_clone.find('.wpcf7cf_repeater,[data-class="wpcf7cf_group"]').each(function () {
716    var $this = jQuery(this);
717    var prev_data_id = $this.attr('data-id');
718    var orig_data_id = $this.attr('data-orig_data_id') != null ? $this.attr('data-orig_data_id') : prev_data_id;
719    var new_data_id = repeater.getNewName(prev_data_id);
720
721    if (prev_data_id.endsWith('_count')) {
722      new_data_id = prev_data_id.replace('_count', '__{{repeater_sub_suffix}}_count');
723    }
724
725    $this.attr('data-id', new_data_id);
726    $this.attr('data-orig_data_id', orig_data_id);
727  });
728  $repeater_sub_clone.find('[id]').each(function () {
729    var $this = jQuery(this);
730    var prev_id = $this.attr('id');
731    var orig_id = $this.attr('data-orig_id') != null ? $this.attr('data-orig_id') : prev_id;
732    var new_id = repeater.getNewName(prev_id);
733    $this.attr('id', new_id);
734    $this.attr('data-orig_id', orig_id);
735  });
736  $repeater_sub_clone.find('[for]').each(function () {
737    var $this = jQuery(this);
738    var prev_for = $this.attr('for');
739    var orig_for = $this.attr('data-orig_for') != null ? $this.attr('data-orig_for') : prev_for;
740    var new_for = repeater.getNewName(prev_for);
741    $this.attr('for', new_for);
742    $this.attr('data-orig_for', orig_for);
743  });
744  var repeater_sub_html = $repeater_sub_clone[0].outerHTML;
745  var $repeater_count_field = $repeater.find('[name=' + $repeater.id + '_count]').eq(0);
746  var $button_add = $repeater_controls.find('.wpcf7cf_add').eq(0);
747  var $button_remove = $repeater_controls.find('.wpcf7cf_remove').eq(0);
748  var params = {
749    $repeater: $repeater,
750    $repeater_count_field: $repeater_count_field,
751    repeater_sub_html: repeater_sub_html,
752    $repeater_controls: $repeater_controls,
753    $button_add: $button_add,
754    $button_remove: $button_remove,
755    wpcf7cf_settings: wpcf7cf_settings
756  };
757  this.params = params;
758  $button_add.on('click', null, repeater, function (e) {
759    var repeater = e.data;
760    repeater.updateSubs(params.$repeater.num_subs + 1);
761  });
762  $button_remove.on('click', null, repeater, function (e) {
763    var repeater = e.data;
764    repeater.updateSubs(params.$repeater.num_subs - 1);
765  });
766  jQuery('> .wpcf7cf_repeater_sub', params.$repeater).eq(0).remove(); // remove the first sub, it's just a template.
767
768  repeater.updateSubs($repeater.initial_subs);
769  repeater.updateButtons();
770}
771
772Wpcf7cfRepeater.prototype.getNewName = function (previousName) {
773  var prev_parts = previousName.split('[');
774  previousName = prev_parts[0];
775  var prev_suff = prev_parts.length > 1 ? '[' + prev_parts.splice(1).join('[') : '';
776  var newName = previousName + '__{{repeater_sub_suffix}}' + prev_suff;
777
778  if (previousName.endsWith('_count')) {
779    newName = previousName.replace('_count', '__{{repeater_sub_suffix}}_count');
780  }
781
782  return newName;
783};
784
785Wpcf7cfRepeater.prototype.updateButtons = function () {
786  var repeater = this;
787  var params = repeater.params;
788  var num_subs = params.$repeater.num_subs;
789  var showButtonRemove = false;
790  var showButtonAdd = false;
791
792  if (params.$repeater.num_subs < params.$repeater.max) {
793    showButtonAdd = true;
794  }
795
796  if (params.$repeater.num_subs > params.$repeater.min) {
797    showButtonRemove = true;
798  }
799
800  if (showButtonAdd) {
801    params.$button_add.show();
802  } else {
803    params.$button_add.hide();
804  }
805
806  if (showButtonRemove) {
807    params.$button_remove.show();
808  } else {
809    params.$button_remove.hide();
810  }
811
812  params.$repeater_count_field.val(num_subs);
813};
814
815Wpcf7cfRepeater.prototype.updateSubs = function (subs_to_show) {
816  var repeater = this;
817  var params = repeater.params; // make sure subs_to_show is a valid number
818
819  subs_to_show = subs_to_show < params.$repeater.min ? params.$repeater.min : subs_to_show;
820  subs_to_show = subs_to_show > params.$repeater.max ? params.$repeater.max : subs_to_show;
821  var subs_to_add = subs_to_show - params.$repeater.num_subs;
822
823  if (subs_to_add < 0) {
824    repeater.removeSubs(-subs_to_add);
825  } else if (subs_to_add > 0) {
826    repeater.addSubs(subs_to_add);
827  }
828};
829/**
830 * add Subs to repeater
831 * @param {Number} subs_to_add 
832 * @param {Number} index - zero-based. leave blank (or null) to append at the end
833 */
834
835
836Wpcf7cfRepeater.prototype.addSubs = function (subs_to_add) {
837  var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
838  var $ = jQuery;
839  var params = this.params;
840  var repeater = this;
841  var form = repeater.form;
842  var $repeater = params.$repeater;
843  var $repeater_controls = params.$repeater_controls;
844
845  if (subs_to_add + $repeater.num_subs > $repeater.max) {
846    subs_to_add = $repeater.max - $repeater.num_subs;
847  }
848
849  var html_str = '';
850
851  for (var i = 1; i <= subs_to_add; i++) {
852    var sub_suffix = $repeater.num_subs + i;
853    html_str += params.repeater_sub_html.replace(/\{\{repeater_sub_suffix\}\}/g, sub_suffix).replace(new RegExp('\{\{' + $repeater.orig_id + '_index\}\}', 'g'), '<span class="wpcf7cf-index wpcf7cf__' + $repeater.orig_id + '">' + sub_suffix + '</span>');
854  }
855
856  var $html = jQuery(html_str);
857  jQuery('> .wpcf7cf_repeater_sub', $repeater).finish(); // finish any currently running animations immediately.
858  // Add the newly created fields to the form
859
860  if (index === null) {
861    $html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');
862  } else {
863    $html.hide().insertBefore(jQuery('> .wpcf7cf_repeater_sub', $repeater).eq(index)).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');
864  } // enable all new fields
865
866
867  $html.find('.wpcf7cf-disabled :input').prop('disabled', false).trigger('changedisabledprop.wpcf7cf');
868  $html.find('.wpcf7-form-control-wrap').removeClass('wpcf7cf-disabled');
869  jQuery('.wpcf7cf_repeater', $html).each(function () {
870    form.repeaters.push(new Wpcf7cfRepeater(jQuery(this), form));
871  });
872  form.$input_repeaters.val(JSON.stringify(form.repeaters.map(function (item) {
873    return item.params.$repeater.id;
874  })));
875  $repeater.num_subs += subs_to_add;
876
877  if (index !== null) {
878    repeater.updateSuffixes();
879  }
880
881  window.wpcf7cf.updateMultistepState(form.multistep);
882  form.updateGroups();
883  form.updateEventListeners();
884  form.displayFields();
885  repeater.updateButtons(); // Exclusive Checkbox
886
887  $html.on('click', '.wpcf7-exclusive-checkbox input:checkbox', function () {
888    var name = $(this).attr('name');
889    $html.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false);
890  }); //basic compatibility with material-design-for-contact-form-7
891
892  if (typeof window.cf7mdInit === "function") {
893    window.cf7mdInit();
894  }
895
896  return false;
897};
898
899Wpcf7cfRepeater.prototype.updateSuffixes = function () {
900  // Loop trough all subs
901  //  -- 1. update all fields, groups and repeaters names, id's, for's, ...
902  //  -- 2. loop trough all repeaters
903  //        -- update sub_html template for nested repeater
904  //        -- call updateSuffixes() for nested repeater
905  var $repeater = this.params.$repeater;
906  var num_subs = this.params.$repeater.num_subs;
907  var form = this.form;
908  var orig_id = $repeater.attr('data-orig_data_id');
909  var repeater_id = $repeater.attr('data-id');
910  var repeater_suffix = repeater_id.replace(orig_id, '');
911  var simplifiedDomArray = Object.values(wpcf7cf.get_simplified_dom_model(form.$form[0]));
912
913  var _loop = function _loop(i) {
914    var $sub = jQuery('> .wpcf7cf_repeater_sub', $repeater).eq(i);
915    var newIndex = i + 1;
916    var currentSuffix = $sub.attr('data-repeater_sub_suffix');
917    var newSuffix = repeater_suffix + '__' + newIndex;
918    $sub.attr('data-repeater_sub_suffix', newSuffix); // update sub attr
919
920    $sub.find('.wpcf7cf__' + orig_id).html(newIndex); // update {{r_index}} parts
921
922    simplifiedDomArray.forEach(function (el) {
923      if (el.suffix !== currentSuffix) return; // TODO: may need an extra check to verify that the element is inside the current repeater
924      // (orig_id) . Otherwise problems may occur if there are repeaters on the same level.
925
926      var newName = el.name.replace(currentSuffix, newSuffix);
927      var pureElName = el.name.replace('[]', '');
928      var pureNewName = newName.replace('[]', '');
929      jQuery('[name="' + el.name + '"]', $sub).attr('name', newName);
930      jQuery('[id="' + el.name + '"]', $sub).attr('id', newName);
931      jQuery('label[for="' + el.name + '"]', $sub).attr('for', newName);
932      var $nested_repeater = jQuery('[data-id="' + el.name + '"]', $sub);
933      $nested_repeater.attr('data-id', newName);
934      jQuery(".wpcf7-form-control-wrap[data-name=\"".concat(pureElName, "\"]"), $sub).attr('data-name', pureNewName);
935
936      if (el.type === 'repeater') {
937        var nested_repeater = form.repeaters.find(function (repeater) {
938          return repeater.params.$repeater.get(0) === $nested_repeater.get(0);
939        });
940        if (!nested_repeater) return;
941        nested_repeater.params.repeater_sub_html = wpcf7cf.updateRepeaterSubHTML(nested_repeater.params.repeater_sub_html, currentSuffix, newSuffix, nested_repeater.params.$repeater.parentRepeaters);
942        nested_repeater.updateSuffixes();
943      }
944    });
945  };
946
947  for (var i = 0; i < num_subs; i++) {
948    _loop(i);
949  }
950};
951/**
952 * Return the parent repeaters, order is not guaranteed.
953 */
954
955
956Wpcf7cfRepeater.prototype.getParentRepeaters = function () {
957  var simplifiedDomArray = Object.values(wpcf7cf.get_simplified_dom_model(form.$form[0]));
958  form.repeaters.map(function (repeater) {});
959};
960
961Wpcf7cfRepeater.prototype.removeSubs = function (subs_to_remove) {
962  var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
963  var $ = jQuery;
964  var repeater = this;
965  var params = repeater.params;
966  var form = repeater.form;
967  var $repeater = params.$repeater;
968
969  if ($repeater.num_subs - subs_to_remove < $repeater.min) {
970    subs_to_remove = $repeater.num_subs - $repeater.min;
971  }
972
973  if (index === null) {
974    index = $repeater.num_subs - subs_to_remove;
975  }
976
977  $repeater.num_subs -= subs_to_remove;
978  jQuery('> .wpcf7cf_repeater_sub', $repeater).finish(); // finish any currently running animations immediately.
979
980  jQuery('> .wpcf7cf_repeater_sub', $repeater).slice(index, index + subs_to_remove).animate(wpcf7cf_hide_animation, {
981    duration: params.wpcf7cf_settings.animation_intime,
982    done: function done() {
983      var $this = jQuery(this); //remove the actual fields from the form
984
985      $this.remove();
986      params.$repeater.trigger('wpcf7cf_repeater_removed');
987      window.wpcf7cf.updateMultistepState(form.multistep);
988      form.updateGroups();
989      form.updateEventListeners();
990      form.displayFields();
991      repeater.updateButtons();
992
993      if (index !== null) {
994        repeater.updateSuffixes();
995      }
996    }
997  });
998  return false;
999};
1000
1001function Wpcf7cfMultistep($multistep, form) {
1002  var multistep = this;
1003  multistep.$multistep = $multistep;
1004  multistep.form = form;
1005  multistep.$steps = $multistep.find('.wpcf7cf_step');
1006  multistep.$btn_next = $multistep.find('.wpcf7cf_next');
1007  multistep.$btn_prev = $multistep.find('.wpcf7cf_prev');
1008  multistep.$dots = $multistep.find('.wpcf7cf_steps-dots');
1009  multistep.currentStep = 0;
1010  multistep.numSteps = multistep.$steps.length;
1011  multistep.$dots.html('');
1012
1013  for (var i = 1; i <= multistep.numSteps; i++) {
1014    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).attr('data-title'), "</div>\n            </div>\n        "));
1015  }
1016
1017  multistep.$btn_next.on('click.wpcf7cf_step', /*#__PURE__*/_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee() {
1018    var result;
1019    return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {
1020      while (1) {
1021        switch (_context.prev = _context.next) {
1022          case 0:
1023            multistep.$btn_next.addClass('disabled').attr('disabled', true);
1024            multistep.form.$form.addClass('submitting');
1025            _context.next = 4;
1026            return multistep.validateStep(multistep.currentStep);
1027
1028          case 4:
1029            result = _context.sent;
1030            multistep.form.$form.removeClass('submitting');
1031
1032            if (result === 'success') {
1033              multistep.moveToStep(multistep.currentStep + 1);
1034            }
1035
1036          case 7:
1037          case "end":
1038            return _context.stop();
1039        }
1040      }
1041    }, _callee);
1042  }))); // If form is submitted (by pressing Enter for example), and if we are not on the last step,
1043  // then trigger click event on the $btn_next button instead.
1044
1045  multistep.form.$form.on('submit.wpcf7cf_step', function (e) {
1046    if (multistep.currentStep !== multistep.numSteps) {
1047      multistep.$btn_next.trigger('click.wpcf7cf_step');
1048      e.stopImmediatePropagation();
1049      return false;
1050    }
1051  });
1052  multistep.$btn_prev.on('click', function () {
1053    multistep.moveToStep(multistep.currentStep - 1);
1054  });
1055  multistep.moveToStep(1);
1056}
1057
1058Wpcf7cfMultistep.prototype.validateStep = function (step_index) {
1059  var multistep = this;
1060  var $multistep = multistep.$multistep;
1061  var $form = multistep.form.$form;
1062  var form = multistep.form;
1063  $form.find('.wpcf7-response-output').addClass('wpcf7-display-none');
1064  return new Promise(function (resolve) {
1065    var fd = new FormData(); // Make sure to add file fields to FormData
1066
1067    jQuery.each($form.find('[data-id="step-' + step_index + '"] input[type="file"]'), function (index, el) {
1068      if (!el.files.length) return true; // = continue
1069
1070      var file = el.files[0];
1071      var fieldName = el.name;
1072      fd.append(fieldName, file);
1073    });
1074    var formdata = $form.serializeArray();
1075    jQuery.each(formdata, function (key, input) {
1076      fd.append(input.name, input.value);
1077    });
1078    jQuery.ajax({
1079      url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_validate_step',
1080      type: 'POST',
1081      data: fd,
1082      processData: false,
1083      contentType: false,
1084      dataType: 'json'
1085    }).done(function (json) {
1086      $multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();
1087      $multistep.find('.wpcf7-not-valid').removeClass('wpcf7-not-valid');
1088      $multistep.find('.wpcf7-response-output').remove();
1089      $multistep.find('.wpcf7-response-output.wpcf7-validation-errors').removeClass('wpcf7-validation-errors');
1090      multistep.$btn_next.removeClass('disabled').attr('disabled', false);
1091
1092      if (!json.success) {
1093        var checkError = 0;
1094        jQuery.each(json.invalid_fields, function (index, el) {
1095          if ($multistep.find('input[name="' + index + '"]').length || $multistep.find('input[name="' + index + '[]"]').length || $multistep.find('select[name="' + index + '"]').length || $multistep.find('select[name="' + index + '[]"]').length || $multistep.find('textarea[name="' + index + '"]').length || $multistep.find('textarea[name="' + index + '[]"]').length) {
1096            checkError = checkError + 1;
1097            var controlWrap = form.get(".wpcf7-form-control-wrap[data-name=\"".concat(index, "\"]"));
1098            controlWrap.find('.wpcf7-form-control').addClass('wpcf7-not-valid');
1099            controlWrap.find('span.wpcf7-not-valid-tip').remove();
1100            controlWrap.append('<span role="alert" class="wpcf7-not-valid-tip">' + el.reason + '</span>');
1101          }
1102        });
1103        resolve('failed');
1104        $multistep.parent().find('.wpcf7-response-output').removeClass('wpcf7-display-none').html(json.message);
1105        wpcf7.setStatus($form, 'invalid');
1106        multistep.$steps.trigger('wpcf7cf_step_invalid'); // wpcf7.triggerEvent( data.into, 'invalid', detail );
1107      } else if (json.success) {
1108        wpcf7.setStatus($form, 'init');
1109        resolve('success');
1110        return false;
1111      }
1112    }).fail(function () {
1113      resolve('error');
1114    }).always(function () {// do nothing
1115    });
1116  });
1117};
1118
1119Wpcf7cfMultistep.prototype.moveToStep = function (step_index) {
1120  var scrollToTop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1121  var multistep = this;
1122  var previousStep = multistep.currentStep;
1123  multistep.currentStep = step_index > multistep.numSteps ? multistep.numSteps : step_index < 1 ? 1 : step_index; // ANIMATION DISABLED FOR NOW cause it's ugly
1124  // multistep.$steps.animate(wpcf7cf_hide_step_animation, multistep.form.settings.animation_outtime);
1125  // multistep.$steps.eq(multistep.currentStep-1).animate(wpcf7cf_show_step_animation, multistep.form.settings.animation_intime);
1126
1127  multistep.$multistep.attr('data-current_step', multistep.currentStep);
1128  multistep.$steps.hide();
1129  multistep.$steps.eq(multistep.currentStep - 1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.currentStep]);
1130
1131  if (scrollToTop) {
1132    var formEl = multistep.form.$form[0];
1133    var topOffset = formEl.getBoundingClientRect().top;
1134
1135    if (topOffset < 0 && previousStep > 0) {
1136      formEl.scrollIntoView({
1137        behavior: "smooth"
1138      });
1139    }
1140  }
1141
1142  multistep.form.updateSummaryFields();
1143  window.wpcf7cf.updateMultistepState(multistep);
1144};
1145
1146Wpcf7cfMultistep.prototype.getFieldsInStep = function (step_index) {
1147  this.form.reloadSimpleDom();
1148  var inStep = false;
1149  return Object.values(this.form.simpleDom).filter(function (item, i) {
1150    if (item.type == 'step') {
1151      inStep = item.val == step_index + '';
1152    }
1153
1154    return inStep && item.type == 'input';
1155  }).map(function (item) {
1156    return item.name;
1157  });
1158}; // END PRO ONLY
1159
1160/**
1161 * @global
1162 * @namespace wpcf7cf
1163 */
1164
1165
1166window.wpcf7cf = {
1167  hideGroup: function hideGroup($group, animate) {},
1168  showGroup: function showGroup($group, animate) {},
1169  updateRepeaterSubHTML: function updateRepeaterSubHTML(html, oldSuffix, newSuffix, parentRepeaters) {
1170    var oldIndexes = oldSuffix.split('__');
1171    oldIndexes.shift(); // remove first empty element
1172
1173    var newIndexes = newSuffix.split('__');
1174    newIndexes.shift(); // remove first empty element
1175
1176    var returnHtml = html;
1177
1178    if (oldIndexes && newIndexes && oldIndexes.length === parentRepeaters.length && newIndexes.length === parentRepeaters.length) {
1179      var parentRepeatersInfo = parentRepeaters.map(function (repeaterId, i) {
1180        return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, repeaterId.split('__')[0], [oldIndexes[i], newIndexes[i]]);
1181      });
1182      var length = parentRepeatersInfo.length;
1183      var replacements = oldIndexes.map(function (oldIndex, i) {
1184        return ['__' + oldIndexes.slice(0, length - i).join('__'), '__' + newIndexes.slice(0, length - i).join('__')];
1185      });
1186
1187      for (var i = 0; i < length; i++) {
1188        var id = Object.keys(parentRepeatersInfo[i])[0];
1189        var find = parentRepeatersInfo[i][id][0];
1190        var repl = parentRepeatersInfo[i][id][1];
1191        replacements.push(["<span class=\"wpcf7cf-index wpcf7cf__".concat(id, "\">").concat(find, "<\\/span>"), "<span class=\"wpcf7cf-index wpcf7cf__".concat(id, "\">").concat(repl, "</span>")]);
1192      }
1193
1194      replacements.forEach(function (_ref3) {
1195        var _ref4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref3, 2),
1196            oldSuffix = _ref4[0],
1197            newSuffix = _ref4[1];
1198
1199        returnHtml = returnHtml.replace(new RegExp(oldSuffix, 'g'), newSuffix);
1200      });
1201    }
1202
1203    return returnHtml;
1204  },
1205  // keep this for backwards compatibility
1206  initForm: function initForm($forms) {
1207    $forms.each(function () {
1208      var $form = jQuery(this); // only add form is its class is "wpcf7-form" and if the form was not previously added
1209
1210      if ($form.hasClass('wpcf7-form') && !wpcf7cf_forms.some(function (form) {
1211        return form.$form.get(0) === $form.get(0);
1212      })) {
1213        wpcf7cf_forms.push(new Wpcf7cfForm($form));
1214      }
1215    });
1216  },
1217  getWpcf7cfForm: function getWpcf7cfForm($form) {
1218    var matched_forms = wpcf7cf_forms.filter(function (form) {
1219      return form.$form.get(0) === $form.get(0);
1220    });
1221
1222    if (matched_forms.length) {
1223      return matched_forms[0];
1224    }
1225
1226    return false;
1227  },
1228  get_nested_conditions: function get_nested_conditions(form) {
1229    var conditions = form.initial_conditions; //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index
1230
1231    form.reloadSimpleDom();
1232    var groups = Object.values(form.simpleDom).filter(function (item, i) {
1233      return item.type === 'group';
1234    });
1235    var sub_conditions = [];
1236
1237    for (var i = 0; i < groups.length; i++) {
1238      var g = groups[i];
1239      var relevant_conditions = conditions.filter(function (condition, i) {
1240        return condition.then_field === g.original_name;
1241      });
1242      var relevant_conditions = relevant_conditions.map(function (item, i) {
1243        return {
1244          then_field: g.name,
1245          and_rules: item.and_rules.map(function (and_rule, i) {
1246            return {
1247              if_field: and_rule.if_field + g.suffix,
1248              if_value: and_rule.if_value,
1249              operator: and_rule.operator
1250            };
1251          })
1252        };
1253      });
1254      sub_conditions = sub_conditions.concat(relevant_conditions);
1255    }
1256
1257    return sub_conditions;
1258  },
1259  get_simplified_dom_model: function get_simplified_dom_model(currentNode) {
1260    var simplified_dom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1261    var parentGroups = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
1262    var parentRepeaters = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
1263    var type = currentNode.classList && currentNode.classList.contains('wpcf7cf_repeater') ? 'repeater' : currentNode.dataset["class"] == 'wpcf7cf_group' ? 'group' : currentNode.className == 'wpcf7cf_step' ? 'step' : currentNode.hasAttribute('name') && !currentNode.disabled ? 'input' : false;
1264
1265    var newParentRepeaters = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4___default()(parentRepeaters);
1266
1267    var newParentGroups = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4___default()(parentGroups);
1268
1269    if (type) {
1270      var name = type === 'input' ? currentNode.getAttribute('name') : currentNode.dataset.id;
1271
1272      if (type === 'repeater') {
1273        newParentRepeaters.push(name);
1274      }
1275
1276      if (type === 'group') {
1277        newParentGroups.push(name);
1278      } // skip _wpcf7 hidden fields
1279
1280
1281      if (name.substring(0, 6) === '_wpcf7') return {};
1282      var original_name = type === 'repeater' || type === 'group' ? currentNode.dataset.orig_data_id : type === 'input' ? currentNode.getAttribute('data-orig_name') || name : name;
1283      var nameWithoutBrackets = name.replace('[]', '');
1284      var originalNameWithoutBrackets = original_name.replace('[]', '');
1285      var val = type === 'step' ? [currentNode.dataset.id.substring(5)] : [];
1286      var suffix = nameWithoutBrackets.replace(originalNameWithoutBrackets, '');
1287
1288      if (!simplified_dom[name]) {
1289        // init entry
1290        simplified_dom[name] = {
1291          name: name,
1292          type: type,
1293          original_name: original_name,
1294          suffix: suffix,
1295          val: val,
1296          parentGroups: parentGroups,
1297          parentRepeaters: parentRepeaters
1298        };
1299      }
1300
1301      if (type === 'input') {
1302        // skip unchecked checkboxes and radiobuttons
1303        if ((currentNode.type === 'checkbox' || currentNode.type === 'radio') && !currentNode.checked) return {}; // if multiselect, make sure to add all the values
1304
1305        if (currentNode.multiple && currentNode.options) {
1306          simplified_dom[name].val = Object.values(currentNode.options).filter(function (o) {
1307            return o.selected;
1308          }).map(function (o) {
1309            return o.value;
1310          });
1311        } else {
1312          simplified_dom[name].val.push(currentNode.value);
1313        }
1314      }
1315    } // can't use currentNode.children (because then field name cannot be "children")
1316
1317
1318    var getter = Object.getOwnPropertyDescriptor(Element.prototype, "children").get;
1319    var children = getter.call(currentNode);
1320    Array.from(children).forEach(function (childNode) {
1321      var dom = wpcf7cf.get_simplified_dom_model(childNode, simplified_dom, newParentGroups, newParentRepeaters);
1322      simplified_dom = _objectSpread(_objectSpread({}, dom), simplified_dom);
1323    });
1324    return simplified_dom;
1325  },
1326  updateMultistepState: function updateMultistepState(multistep) {
1327    if (multistep == null) return; // update hidden input field
1328
1329    var stepsData = {
1330      currentStep: multistep.currentStep,
1331      numSteps: multistep.numSteps,
1332      fieldsInCurrentStep: multistep.getFieldsInStep(multistep.currentStep)
1333    };
1334    multistep.form.$input_steps.val(JSON.stringify(stepsData)); // update Buttons
1335
1336    multistep.$btn_prev.removeClass('disabled').attr('disabled', false);
1337    multistep.$btn_next.removeClass('disabled').attr('disabled', false);
1338
1339    if (multistep.currentStep == multistep.numSteps) {
1340      multistep.$btn_next.addClass('disabled').attr('disabled', true);
1341    }
1342
1343    if (multistep.currentStep == 1) {
1344      multistep.$btn_prev.addClass('disabled').attr('disabled', true);
1345    } // replace next button with submit button on last step.
1346    // TODO: make this depend on a setting
1347
1348
1349    var $submit_button = multistep.form.$form.find('input[type="submit"]:last').eq(0);
1350    var $ajax_loader = multistep.form.$form.find('.wpcf7-spinner').eq(0);
1351    $submit_button.detach().prependTo(multistep.$btn_next.parent());
1352    $ajax_loader.detach().prependTo(multistep.$btn_next.parent());
1353
1354    if (multistep.currentStep == multistep.numSteps) {
1355      multistep.$btn_next.hide();
1356      $submit_button.show();
1357    } else {
1358      $submit_button.hide();
1359      multistep.$btn_next.show();
1360    } // update dots
1361
1362
1363    var $dots = multistep.$dots.find('.dot');
1364    $dots.removeClass('active').removeClass('completed');
1365
1366    for (var step = 1; step <= multistep.numSteps; step++) {
1367      if (step < multistep.currentStep) {
1368        $dots.eq(step - 1).addClass('completed');
1369      } else if (step == multistep.currentStep) {
1370        $dots.eq(step - 1).addClass('active');
1371      }
1372    }
1373  },
1374  should_group_be_shown: function should_group_be_shown(condition, form) {
1375    var show_group = true;
1376
1377    for (var and_rule_i = 0; and_rule_i < condition.and_rules.length; and_rule_i++) {
1378      var condition_ok = false;
1379      var condition_and_rule = condition.and_rules[and_rule_i];
1380      var inputField = form.getFieldByName(condition_and_rule.if_field);
1381      if (!inputField) continue; // field not found
1382
1383      var if_val = condition_and_rule.if_value;
1384      var operator = condition_and_rule.operator; //backwards compat
1385
1386      operator = operator === '≤' ? 'less than or equals' : operator;
1387      operator = operator === '≥' ? 'greater than or equals' : operator;
1388      operator = operator === '>' ? 'greater than' : operator;
1389      operator = operator === '<' ? 'less than' : operator;
1390      var $field = operator === 'function' && jQuery("[name=\"".concat(inputField.name, "\"]")).eq(0);
1391      condition_ok = this.isConditionTrue(inputField.val, operator, if_val, $field);
1392      show_group = show_group && condition_ok;
1393    }
1394
1395    return show_group;
1396  },
1397  isConditionTrue: function isConditionTrue(values, operator) {
1398    var testValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
1399    var $field = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : jQuery();
1400
1401    if (!Array.isArray(values)) {
1402      values = [values];
1403    }
1404
1405    var condition_ok = false; // start by assuming that the condition is not met
1406    // Considered EMPTY:       []     ['']          [null]        ['',null]    [,,'']
1407    // Considered NOT EMPTY:   [0]    ['ab','c']    ['',0,null]
1408
1409    var valuesAreEmpty = values.length === 0 || values.every(function (v) {
1410      return !v && v !== 0;
1411    }); // 0 is not considered empty
1412    // special cases: [] equals '' => TRUE; [] not equals '' => FALSE
1413
1414    if (operator === 'equals' && testValue === '' && valuesAreEmpty) {
1415      return true;
1416    }
1417
1418    if (operator === 'not equals' && testValue === '' && valuesAreEmpty) {
1419      return false;
1420    }
1421
1422    if (valuesAreEmpty) {
1423      if (operator === 'is empty') {
1424        condition_ok = true;
1425      }
1426    } else {
1427      if (operator === 'not empty') {
1428        condition_ok = true;
1429      }
1430    }
1431
1432    var testValueNumber = isFinite(parseFloat(testValue)) ? parseFloat(testValue) : NaN;
1433
1434    if (operator === 'not equals' || operator === 'not equals (regex)') {
1435      // start by assuming that the condition is met
1436      condition_ok = true;
1437    }
1438
1439    if (operator === 'function' && typeof window[testValue] == 'function' && window[testValue]($field) // here we call the actual user defined function
1440    ) {
1441        condition_ok = true;
1442      }
1443
1444    var regex_patt = /.*/i; // fallback regex pattern
1445
1446    var isValidRegex = true;
1447
1448    if (operator === 'equals (regex)' || operator === 'not equals (regex)') {
1449      try {
1450        regex_patt = new RegExp(testValue, 'i');
1451      } catch (e) {
1452        isValidRegex = false;
1453      }
1454    }
1455
1456    for (var i = 0; i < values.length; i++) {
1457      var value = values[i];
1458      var valueNumber = isFinite(parseFloat(value)) ? parseFloat(value) : NaN;
1459      var valsAreNumbers = !isNaN(valueNumber) && !isNaN(testValueNumber);
1460
1461      if (operator === 'equals' && value === testValue || operator === 'equals (regex)' && regex_patt.test(value) || operator === 'greater than' && valsAreNumbers && valueNumber > testValueNumber || operator === 'less than' && valsAreNumbers && valueNumber < testValueNumber || operator === 'greater than or equals' && valsAreNumbers && valueNumber >= testValueNumber || operator === 'less than or equals' && valsAreNumbers && valueNumber <= testValueNumber) {
1462        condition_ok = true;
1463        break;
1464      } else if (operator === 'not equals' && value === testValue || operator === 'not equals (regex)' && regex_patt.test(value)) {
1465        condition_ok = false;
1466        break;
1467      }
1468    }
1469
1470    return condition_ok;
1471  },
1472  getFormObj: function getFormObj($form) {
1473    if (typeof $form === 'string') {
1474      $form = jQuery($form).eq(0);
1475    }
1476
1477    return wpcf7cf.getWpcf7cfForm($form);
1478  },
1479  getRepeaterObj: function getRepeaterObj($form, repeaterDataId) {
1480    var form = wpcf7cf.getFormObj($form);
1481    var repeater = form.repeaters.find(function (repeater) {
1482      return repeater.params.$repeater.attr('data-id') === repeaterDataId;
1483    });
1484    return repeater;
1485  },
1486  getMultiStepObj: function getMultiStepObj($form) {
1487    var form = wpcf7cf.getFormObj($form);
1488    return form.multistep;
1489  },
1490
1491  /**
1492   * Append a new sub-entry to the repeater with the name `repeaterDataId` inside the form `$form`
1493   * @memberof wpcf7cf
1494   * @function wpcf7cf.repeaterAddSub
1495   * @link
1496   * @param {String|JQuery} $form - JQuery object or css-selector representing the form
1497   * @param {String} repeaterDataId - *data-id* attribute of the repeater. Normally this is simply the name of the repeater. However, in case of a nested repeater you need to append the name with the correct suffix. For example `my-nested-repeater__1__3`. Hint (check the `data-id` attribute in the HTML code to find the correct suffix)
1498   */
1499  repeaterAddSub: function repeaterAddSub($form, repeaterDataId) {
1500    var repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);
1501    repeater.updateSubs(repeater.params.$repeater.num_subs + 1);
1502  },
1503
1504  /**
1505   * Insert a new sub-entry at the given `index` of the repeater with the name `repeaterDataId` inside the form `$form`
1506   * @memberof wpcf7cf
1507   * @param {String|JQuery} $form - JQuery object or css-selector representing the form
1508   * @param {String} repeaterDataId - *data-id* attribute of the repeater.
1509   * @param {Number} index - position where to insert the new sub-entry within the repeater
1510   */
1511  repeaterAddSubAtIndex: function repeaterAddSubAtIndex($form, repeaterDataId, index) {
1512    var repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);
1513    repeater.addSubs(1, index);
1514  },
1515
1516  /**
1517   * Remove the sub-entry at the given `index` of the repeater with the *data-id* attribute of `repeaterDataId` inside the form `$form`
1518   * @memberof wpcf7cf
1519   * @param {String|JQuery} $form - JQuery object or css-selector representing the form
1520   * @param {String} repeaterDataId - *data-id* attribute of the repeater.
1521   * @param {Number} index - position where to insert the new sub-entry within the repeater
1522   */
1523  repeaterRemoveSubAtIndex: function repeaterRemoveSubAtIndex($form, repeaterDataId, index) {
1524    var repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);
1525    repeater.removeSubs(1, index);
1526  },
1527
1528  /**
1529   * Remove the last sub-entry from the repeater with the *data-id* attribute of `repeaterDataId` inside the form `$form`
1530   * @memberof wpcf7cf
1531   * @param {String|JQuery} $form - JQuery object or css-selector representing the form
1532   * @param {String} repeaterDataId - *data-id* attribute of the repeater.
1533   * @param {Number} index - position where to insert the new sub-entry within the repeater
1534   */
1535  repeaterRemoveSub: function repeaterRemoveSub($form, repeaterDataId) {
1536    var repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);
1537    repeater.updateSubs(repeater.params.$repeater.num_subs - 1);
1538  },
1539
1540  /**
1541   * Set the number of subs for the repeater with the *data-id* attribute of `repeaterDataId` inside the form `$form`.
1542   * Subs are either appended to or removed from the end of the repeater.
1543   * @memberof wpcf7cf
1544   * @param {String|JQuery} $form - JQuery object or css-selector representing the form
1545   * @param {String} repeaterDataId - *data-id* attribute of the repeater.
1546   * @param {Number} numberOfSubs - position where to insert the new sub-entry within the repeater
1547   */
1548  repeaterSetNumberOfSubs: function repeaterSetNumberOfSubs($form, repeaterDataId, numberOfSubs) {
1549    var repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);
1550    repeater.updateSubs(numberOfSubs);
1551  },
1552
1553  /**
1554   * Move to step number `step`, ignoring any validation.
1555   * @memberof wpcf7cf
1556   * @param {String|JQuery} $form - JQuery object or css-selector representing the form
1557   * @param {*} step 
1558   */
1559  multistepMoveToStep: function multistepMoveToStep($form, step) {
1560    var multistep = wpcf7cf.getMultiStepObj($form);
1561    multistep.moveToStep(step);
1562  },
1563
1564  /**
1565   * Validate the current step, and move to step number `step` if val
1565idation passes.
1566   * @memberof wpcf7cf
1567   * @param {String|JQuery} $form - JQuery object or css-selector representing the form
1568   * @param {Number} step 
1569   */
1570  multistepMoveToStepWithValidation: function multistepMoveToStepWithValidation($form, step) {
1571    return _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee2() {
1572      var multistep, result;
1573      return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee2$(_context2) {
1574        while (1) {
1575          switch (_context2.prev = _context2.next) {
1576            case 0:
1577              multistep = wpcf7cf.getMultiStepObj($form);
1578              _context2.next = 3;
1579              return multistep.validateStep(multistep.currentStep);
1580
1581            case 3:
1582              result = _context2.sent;
1583
1584              if (result === 'success') {
1585                multistep.moveToStep(step);
1586              }
1587
1588            case 5:
1589            case "end":
1590              return _context2.stop();
1591          }
1592        }
1593      }, _callee2);
1594    }))();
1595  }
1596};
1597jQuery('.wpcf7-form').each(function () {
1598  wpcf7cf_forms.push(new Wpcf7cfForm(jQuery(this)));
1599}); // Call displayFields again on all forms
1600// Necessary in case some theme or plugin changed a form value by the time the entire page is fully loaded.
1601
1602jQuery('document').on('ready', function () {
1603  wpcf7cf_forms.forEach(function (f) {
1604    f.displayFields();
1605  });
1606});
1606 // fix for exclusive checkboxes in IE (this will call the change-event again after all other checkboxes are unchecked, triggering the display_fields() function)
1607
1608var old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;
1609
1610jQuery.fn.wpcf7ExclusiveCheckbox = function () {
1611  return this.find('input:checkbox').on('click', function () {
1612    var name = jQuery(this).attr('name');
1613    jQuery(this).closest('form').find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false).eq(0).change();
1614  });
1615};
1616
1617/***/ }),
1618
vendor: 593 bytes, lines 1619-1639
1619/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
1620/*!*****************************************************************!*\
1621  !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
1622  \*****************************************************************/
1623/*! no static exports found */
1624/***/ (function(module, exports) {
1625
1626function _arrayLikeToArray(arr, len) {
1627  if (len == null || len > arr.length) len = arr.length;
1628
1629  for (var i = 0, arr2 = new Array(len); i < len; i++) {
1630    arr2[i] = arr[i];
1631  }
1632
1633  return arr2;
1634}
1635
1636module.exports = _arrayLikeToArray;
1637
1638/***/ }),
1639
vendor: 457 bytes, lines 1640-1654
1640/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
1641/*!***************************************************************!*\
1642  !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
1643  \***************************************************************/
1644/*! no static exports found */
1645/***/ (function(module, exports) {
1646
1647function _arrayWithHoles(arr) {
1648  if (Array.isArray(arr)) return arr;
1649}
1650
1651module.exports = _arrayWithHoles;
1652
1653/***/ }),
1654
vendor: 646 bytes, lines 1655-1671
1655/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
1656/*!******************************************************************!*\
1657  !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
1658  \******************************************************************/
1659/*! no static exports found */
1660/***/ (function(module, exports, __webpack_require__) {
1661
1662var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
1663
1664function _arrayWithoutHoles(arr) {
1665  if (Array.isArray(arr)) return arrayLikeToArray(arr);
1666}
1667
1668module.exports = _arrayWithoutHoles;
1669
1670/***/ }),
1671
vendor: 1,168 bytes, lines 1672-1718
1672/***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js":
1673/*!*****************************************************************!*\
1674  !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
1675  \*****************************************************************/
1676/*! no static exports found */
1677/***/ (function(module, exports) {
1678
1679function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1680  try {
1681    var info = gen[key](arg);
1682    var value = info.value;
1683  } catch (error) {
1684    reject(error);
1685    return;
1686  }
1687
1688  if (info.done) {
1689    resolve(value);
1690  } else {
1691    Promise.resolve(value).then(_next, _throw);
1692  }
1693}
1694
1695function _asyncToGenerator(fn) {
1696  return function () {
1697    var self = this,
1698        args = arguments;
1699    return new Promise(function (resolve, reject) {
1700      var gen = fn.apply(self, args);
1701
1702      function _next(value) {
1703        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1704      }
1705
1706      function _throw(err) {
1707        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1708      }
1709
1710      _next(undefined);
1711    });
1712  };
1713}
1714
1715module.exports = _asyncToGenerator;
1716
1717/***/ }),
1718
vendor: 640 bytes, lines 1719-1744
1719/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js":
1720/*!***************************************************************!*\
1721  !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
1722  \***************************************************************/
1723/*! no static exports found */
1724/***/ (function(module, exports) {
1725
1726function _defineProperty(obj, key, value) {
1727  if (key in obj) {
1728    Object.defineProperty(obj, key, {
1729      value: value,
1730      enumerable: true,
1731      configurable: true,
1732      writable: true
1733    });
1734  } else {
1735    obj[key] = value;
1736  }
1737
1738  return obj;
1739}
1740
1741module.exports = _defineProperty;
1742
1743/***/ }),
1744
vendor: 523 bytes, lines 1745-1759
1745/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js":
1746/*!****************************************************************!*\
1747  !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
1748  \****************************************************************/
1749/*! no static exports found */
1750/***/ (function(module, exports) {
1751
1752function _iterableToArray(iter) {
1753  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
1754}
1755
1756module.exports = _iterableToArray;
1757
1758/***/ }),
1759
vendor: 980 bytes, lines 1760-1797
1760/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
1761/*!*********************************************************************!*\
1762  !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
1763  \*********************************************************************/
1764/*! no static exports found */
1765/***/ (function(module, exports) {
1766
1767function _iterableToArrayLimit(arr, i) {
1768  if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
1769  var _arr = [];
1770  var _n = true;
1771  var _d = false;
1772  var _e = undefined;
1773
1774  try {
1775    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
1776      _arr.push(_s.value);
1777
1778      if (i && _arr.length === i) break;
1779    }
1780  } catch (err) {
1781    _d = true;
1782    _e = err;
1783  } finally {
1784    try {
1785      if (!_n && _i["return"] != null) _i["return"]();
1786    } finally {
1787      if (_d) throw _e;
1788    }
1789  }
1790
1791  return _arr;
1792}
1793
1794module.exports = _iterableToArrayLimit;
1795
1796/***/ }),
1797
vendor: 586 bytes, lines 1798-1812
1798/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js":
1799/*!****************************************************************!*\
1800  !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
1801  \****************************************************************/
1802/*! no static exports found */
1803/***/ (function(module, exports) {
1804
1805function _nonIterableRest() {
1806  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1807}
1808
1809module.exports = _nonIterableRest;
1810
1811/***/ }),
1812
vendor: 593 bytes, lines 1813-1827
1813/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js":
1814/*!******************************************************************!*\
1815  !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
1816  \******************************************************************/
1817/*! no static exports found */
1818/***/ (function(module, exports) {
1819
1820function _nonIterableSpread() {
1821  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1822}
1823
1824module.exports = _nonIterableSpread;
1825
1826/***/ }),
1827
vendor: 1,119 bytes, lines 1828-1850
1828/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js":
1829/*!**************************************************************!*\
1830  !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
1831  \**************************************************************/
1832/*! no static exports found */
1833/***/ (function(module, exports, __webpack_require__) {
1834
1835var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js");
1836
1837var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
1838
1839var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
1840
1841var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js");
1842
1843function _slicedToArray(arr, i) {
1844  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
1845}
1846
1847module.exports = _slicedToArray;
1848
1849/***/ }),
1850
vendor: 1,134 bytes, lines 1851-1873
1851/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js":
1852/*!******************************************************************!*\
1853  !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
1854  \******************************************************************/
1855/*! no static exports found */
1856/***/ (function(module, exports, __webpack_require__) {
1857
1858var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js");
1859
1860var iterableToArray = __webpack_require__(/*! ./iterableToArray */ "./node_modules/@babel/runtime/helpers/iterableToArray.js");
1861
1862var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
1863
1864var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js");
1865
1866function _toConsumableArray(arr) {
1867  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
1868}
1869
1870module.exports = _toConsumableArray;
1871
1872/***/ }),
1873
vendor: 1,025 bytes, lines 1874-1895
1874/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
1875/*!***************************************************************************!*\
1876  !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
1877  \***************************************************************************/
1878/*! no static exports found */
1879/***/ (function(module, exports, __webpack_require__) {
1880
1881var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
1882
1883function _unsupportedIterableToArray(o, minLen) {
1884  if (!o) return;
1885  if (typeof o === "string") return arrayLikeToArray(o, minLen);
1886  var n = Object.prototype.toString.call(o).slice(8, -1);
1887  if (n === "Object" && o.constructor) n = o.constructor.name;
1888  if (n === "Map" || n === "Set") return Array.from(o);
1889  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
1890}
1891
1892module.exports = _unsupportedIterableToArray;
1893
1894/***/ }),
1895
vendor: 465 bytes, lines 1896-1906
1896/***/ "./node_modules/@babel/runtime/regenerator/index.js":
1897/*!**********************************************************!*\
1898  !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
1899  \**********************************************************/
1900/*! no static exports found */
1901/***/ (function(module, exports, __webpack_require__) {
1902
1903module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");
1904
1905/***/ }),
1906
vendor: 438 bytes, lines 1907-1917
1907/***/ "./node_modules/es6-promise-promise/index.js":
1908/*!***************************************************!*\
1909  !*** ./node_modules/es6-promise-promise/index.js ***!
1910  \***************************************************/
1911/*! no static exports found */
1912/***/ (function(module, exports, __webpack_require__) {
1913
1914module.exports = __webpack_require__(/*! es6-promise */ "./node_modules/es6-promise/dist/es6-promise.js").Promise;
1915
1916/***/ }),
1917
vendor: 31,757 bytes, lines 1918-3094
1918/***/ "./node_modules/es6-promise/dist/es6-promise.js":
1919/*!******************************************************!*\
1920  !*** ./node_modules/es6-promise/dist/es6-promise.js ***!
1921  \******************************************************/
1922/*! no static exports found */
1923/***/ (function(module, exports, __webpack_require__) {
1924
1925/* WEBPACK VAR INJECTION */(function(process, global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var require;function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1926
1927/*!
1928 * @overview es6-promise - a tiny implementation of Promises/A+.
1929 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
1930 * @license   Licensed under MIT license
1931 *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
1932 * @version   3.3.1
1933 */
1934(function (global, factory) {
1935  ( false ? undefined : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() :  true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
1936				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1937				(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
1938				__WEBPACK_AMD_DEFINE_FACTORY__),
1939				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
1940})(this, function () {
1941  'use strict';
1942
1943  function objectOrFunction(x) {
1944    return typeof x === 'function' || _typeof(x) === 'object' && x !== null;
1945  }
1946
1947  function isFunction(x) {
1948    return typeof x === 'function';
1949  }
1950
1951  var _isArray = undefined;
1952
1953  if (!Array.isArray) {
1954    _isArray = function _isArray(x) {
1955      return Object.prototype.toString.call(x) === '[object Array]';
1956    };
1957  } else {
1958    _isArray = Array.isArray;
1959  }
1960
1961  var isArray = _isArray;
1962  var len = 0;
1963  var vertxNext = undefined;
1964  var customSchedulerFn = undefined;
1965
1966  var asap = function asap(callback, arg) {
1967    queue[len] = callback;
1968    queue[len + 1] = arg;
1969    len += 2;
1970
1971    if (len === 2) {
1972      // If len is 2, that means that we need to schedule an async flush.
1973      // If additional callbacks are queued before the queue is flushed, they
1974      // will be processed by this flush that we are scheduling.
1975      if (customSchedulerFn) {
1976        customSchedulerFn(flush);
1977      } else {
1978        scheduleFlush();
1979      }
1980    }
1981  };
1982
1983  function setScheduler(scheduleFn) {
1984    customSchedulerFn = scheduleFn;
1985  }
1986
1987  function setAsap(asapFn) {
1988    asap = asapFn;
1989  }
1990
1991  var browserWindow = typeof window !== 'undefined' ? window : undefined;
1992  var browserGlobal = browserWindow || {};
1993  var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
1994  var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; // test for web worker but not in IE10
1995
1996  var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; // node
1997
1998  function useNextTick() {
1999    // node version 0.10.x displays a deprecation warning when nextTick is used recursively
2000    // see https://github.com/cujojs/when/issues/410 for details
2001    return function () {
2002      return process.nextTick(flush);
2003    };
2004  } // vertx
2005
2006
2007  function useVertxTimer() {
2008    return function () {
2009      vertxNext(flush);
2010    };
2011  }
2012
2013  function useMutationObserver() {
2014    var iterations = 0;
2015    var observer = new BrowserMutationObserver(flush);
2016    var node = document.createTextNode('');
2017    observer.observe(node, {
2018      characterData: true
2019    });
2020    return function () {
2021      node.data = iterations = ++iterations % 2;
2022    };
2023  } // web worker
2024
2025
2026  function useMessageChannel() {
2027    var channel = new MessageChannel();
2028    channel.port1.onmessage = flush;
2029    return function () {
2030      return channel.port2.postMessage(0);
2031    };
2032  }
2033
2034  function useSetTimeout() {
2035    // Store setTimeout reference so es6-promise will be unaffected by
2036    // other code modifying setTimeout (like sinon.useFakeTimers())
2037    var globalSetTimeout = setTimeout;
2038    return function () {
2039      return globalSetTimeout(flush, 1);
2040    };
2041  }
2042
2043  var queue = new Array(1000);
2044
2045  function flush() {
2046    for (var i = 0; i < len; i += 2) {
2047      var callback = queue[i];
2048      var arg = queue[i + 1];
2049      callback(arg);
2050      queue[i] = undefined;
2051      queue[i + 1] = undefined;
2052    }
2053
2054    len = 0;
2055  }
2056
2057  function attemptVertx() {
2058    try {
2059      var r = require;
2060      var vertx = __webpack_require__(/*! vertx */ 1);
2061      vertxNext = vertx.runOnLoop || vertx.runOnContext;
2062      return useVertxTimer();
2063    } catch (e) {
2064      return useSetTimeout();
2065    }
2066  }
2067
2068  var scheduleFlush = undefined; // Decide what async method to use to triggering processing of queued callbacks:
2069
2070  if (isNode) {
2071    scheduleFlush = useNextTick();
2072  } else if (BrowserMutationObserver) {
2073    scheduleFlush = useMutationObserver();
2074  } else if (isWorker) {
2075    scheduleFlush = useMessageChannel();
2076  } else if (browserWindow === undefined && "function" === 'function') {
2077    scheduleFlush = attemptVertx();
2078  } else {
2079    scheduleFlush = useSetTimeout();
2080  }
2081
2082  function then(onFulfillment, onRejection) {
2083    var _arguments = arguments;
2084    var parent = this;
2085    var child = new this.constructor(noop);
2086
2087    if (child[PROMISE_ID] === undefined) {
2088      makePromise(child);
2089    }
2090
2091    var _state = parent._state;
2092
2093    if (_state) {
2094      (function () {
2095        var callback = _arguments[_state - 1];
2096        asap(function () {
2097          return invokeCallback(_state, child, callback, parent._result);
2098        });
2099      })();
2100    } else {
2101      subscribe(parent, child, onFulfillment, onRejection);
2102    }
2103
2104    return child;
2105  }
2106  /**
2107    `Promise.resolve` returns a promise that will become resolved with the
2108    passed `value`. It is shorthand for the following:
2109  
2110    ```javascript
2111    let promise = new Promise(function(resolve, reject){
2112      resolve(1);
2113    });
2114  
2115    promise.then(function(value){
2116      // value === 1
2117    });
2118    ```
2119  
2120    Instead of writing the above, your code now simply becomes the following:
2121  
2122    ```javascript
2123    let promise = Promise.resolve(1);
2124  
2125    promise.then(function(value){
2126      // value === 1
2127    });
2128    ```
2129  
2130    @method resolve
2131    @static
2132    @param {Any} value value that the returned promise will be resolved with
2133    Useful for tooling.
2134    @return {Promise} a promise that will become fulfilled with the given
2135    `value`
2136  */
2137
2138
2139  function resolve(object) {
2140    /*jshint validthis:true */
2141    var Constructor = this;
2142
2143    if (object && _typeof(object) === 'object' && object.constructor === Constructor) {
2144      return object;
2145    }
2146
2147    var promise = new Constructor(noop);
2148
2149    _resolve(promise, object);
2150
2151    return promise;
2152  }
2153
2154  var PROMISE_ID = Math.random().toString(36).substring(16);
2155
2156  function noop() {}
2157
2158  var PENDING = void 0;
2159  var FULFILLED = 1;
2160  var REJECTED = 2;
2161  var GET_THEN_ERROR = new ErrorObject();
2162
2163  function selfFulfillment() {
2164    return new TypeError("You cannot resolve a promise with itself");
2165  }
2166
2167  function cannotReturnOwn() {
2168    return new TypeError('A promises callback cannot return that same promise.');
2169  }
2170
2171  function getThen(promise) {
2172    try {
2173      return promise.then;
2174    } catch (error) {
2175      GET_THEN_ERROR.error = error;
2176      return GET_THEN_ERROR;
2177    }
2178  }
2179
2180  function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
2181    try {
2182      then.call(value, fulfillmentHandler, rejectionHandler);
2183    } catch (e) {
2184      return e;
2185    }
2186  }
2187
2188  function handleForeignThenable(promise, thenable, then) {
2189    asap(function (promise) {
2190      var sealed = false;
2191      var error = tryThen(then, thenable, function (value) {
2192        if (sealed) {
2193          return;
2194        }
2195
2196        sealed = true;
2197
2198        if (thenable !== value) {
2199          _resolve(promise, value);
2200        } else {
2201          fulfill(promise, value);
2202        }
2203      }, function (reason) {
2204        if (sealed) {
2205          return;
2206        }
2207
2208        sealed = true;
2209
2210        _reject(promise, reason);
2211      }, 'Settle: ' + (promise._label || ' unknown promise'));
2212
2213      if (!sealed && error) {
2214        sealed = true;
2215
2216        _reject(promise, error);
2217      }
2218    }, promise);
2219  }
2220
2221  function handleOwnThenable(promise, thenable) {
2222    if (thenable._state === FULFILLED) {
2223      fulfill(promise, thenable._result);
2224    } else if (thenable._state === REJECTED) {
2225      _reject(promise, thenable._result);
2226    } else {
2227      subscribe(thenable, undefined, function (value) {
2228        return _resolve(promise, value);
2229      }, function (reason) {
2230        return _reject(promise, reason);
2231      });
2232    }
2233  }
2234
2235  function handleMaybeThenable(promise, maybeThenable, then$$) {
2236    if (maybeThenable.constructor === promise.constructor && then$$ === then && maybeThenable.constructor.resolve === resolve) {
2237      handleOwnThenable(promise, maybeThenable);
2238    } else {
2239      if (then$$ === GET_THEN_ERROR) {
2240        _reject(promise, GET_THEN_ERROR.error);
2241      } else if (then$$ === undefined) {
2242        fulfill(promise, maybeThenable);
2243      } else if (isFunction(then$$)) {
2244        handleForeignThenable(promise, maybeThenable, then$$);
2245      } else {
2246        fulfill(promise, maybeThenable);
2247      }
2248    }
2249  }
2250
2251  function _resolve(promise, value) {
2252    if (promise === value) {
2253      _reject(promise, selfFulfillment());
2254    } else if (objectOrFunction(value)) {
2255      handleMaybeThenable(promise, value, getThen(value));
2256    } else {
2257      fulfill(promise, value);
2258    }
2259  }
2260
2261  function publishRejection(promise) {
2262    if (promise._onerror) {
2263      promise._onerror(promise._result);
2264    }
2265
2266    publish(promise);
2267  }
2268
2269  function fulfill(promise, value) {
2270    if (promise._state !== PENDING) {
2271      return;
2272    }
2273
2274    promise._result = value;
2275    promise._state = FULFILLED;
2276
2277    if (promise._subscribers.length !== 0) {
2278      asap(publish, promise);
2279    }
2280  }
2281
2282  function _reject(promise, reason) {
2283    if (promise._state !== PENDING) {
2284      return;
2285    }
2286
2287    promise._state = REJECTED;
2288    promise._result = reason;
2289    asap(publishRejection, promise);
2290  }
2291
2292  function subscribe(parent, child, onFulfillment, onRejection) {
2293    var _subscribers = parent._subscribers;
2294    var length = _subscribers.length;
2295    parent._onerror = null;
2296    _subscribers[length] = child;
2297    _subscribers[length + FULFILLED] = onFulfillment;
2298    _subscribers[length + REJECTED] = onRejection;
2299
2300    if (length === 0 && parent._state) {
2301      asap(publish, parent);
2302    }
2303  }
2304
2305  function publish(promise) {
2306    var subscribers = promise._subscribers;
2307    var settled = promise._state;
2308
2309    if (subscribers.length === 0) {
2310      return;
2311    }
2312
2313    var child = undefined,
2314        callback = undefined,
2315        detail = promise._result;
2316
2317    for (var i = 0; i < subscribers.length; i += 3) {
2318      child = subscribers[i];
2319      callback = subscribers[i + settled];
2320
2321      if (child) {
2322        invokeCallback(settled, child, callback, detail);
2323      } else {
2324        callback(detail);
2325      }
2326    }
2327
2328    promise._subscribers.length = 0;
2329  }
2330
2331  function ErrorObject() {
2332    this.error = null;
2333  }
2334
2335  var TRY_CATCH_ERROR = new ErrorObject();
2336
2337  function tryCatch(callback, detail) {
2338    try {
2339      return callback(detail);
2340    } catch (e) {
2341      TRY_CATCH_ERROR.error = e;
2342      return TRY_CATCH_ERROR;
2343    }
2344  }
2345
2346  function invokeCallback(settled, promise, callback, detail) {
2347    var hasCallback = isFunction(callback),
2348        value = undefined,
2349        error = undefined,
2350        succeeded = undefined,
2351        failed = undefined;
2352
2353    if (hasCallback) {
2354      value = tryCatch(callback, detail);
2355
2356      if (value === TRY_CATCH_ERROR) {
2357        failed = true;
2358        error = value.error;
2359        value = null;
2360      } else {
2361        succeeded = true;
2362      }
2363
2364      if (promise === value) {
2365        _reject(promise, cannotReturnOwn());
2366
2367        return;
2368      }
2369    } else {
2370      value = detail;
2371      succeeded = true;
2372    }
2373
2374    if (promise._state !== PENDING) {// noop
2375    } else if (hasCallback && succeeded) {
2376      _resolve(promise, value);
2377    } else if (failed) {
2378      _reject(promise, error);
2379    } else if (settled === FULFILLED) {
2380      fulfill(promise, value);
2381    } else if (settled === REJECTED) {
2382      _reject(promise, value);
2383    }
2384  }
2385
2386  function initializePromise(promise, resolver) {
2387    try {
2388      resolver(function resolvePromise(value) {
2389        _resolve(promise, value);
2390      }, function rejectPromise(reason) {
2391        _reject(promise, reason);
2392      });
2393    } catch (e) {
2394      _reject(promise, e);
2395    }
2396  }
2397
2398  var id = 0;
2399
2400  function nextId() {
2401    return id++;
2402  }
2403
2404  function makePromise(promise) {
2405    promise[PROMISE_ID] = id++;
2406    promise._state = undefined;
2407    promise._result = undefined;
2408    promise._subscribers = [];
2409  }
2410
2411  function Enumerator(Constructor, input) {
2412    this._instanceConstructor = Constructor;
2413    this.promise = new Constructor(noop);
2414
2415    if (!this.promise[PROMISE_ID]) {
2416      makePromise(this.promise);
2417    }
2418
2419    if (isArray(input)) {
2420      this._input = input;
2421      this.length = input.length;
2422      this._remaining = input.length;
2423      this._result = new Array(this.length);
2424
2425      if (this.length === 0) {
2426        fulfill(this.promise, this._result);
2427      } else {
2428        this.length = this.length || 0;
2429
2430        this._enumerate();
2431
2432        if (this._remaining === 0) {
2433          fulfill(this.promise, this._result);
2434        }
2435      }
2436    } else {
2437      _reject(this.promise, validationError());
2438    }
2439  }
2440
2441  function validationError() {
2442    return new Error('Array Methods must be provided an Array');
2443  }
2444
2445  ;
2446
2447  Enumerator.prototype._enumerate = function () {
2448    var length = this.length;
2449    var _input = this._input;
2450
2451    for (var i = 0; this._state === PENDING && i < length; i++) {
2452      this._eachEntry(_input[i], i);
2453    }
2454  };
2455
2456  Enumerator.prototype._eachEntry = function (entry, i) {
2457    var c = this._instanceConstructor;
2458    var resolve$$ = c.resolve;
2459
2460    if (resolve$$ === resolve) {
2461      var _then = getThen(entry);
2462
2463      if (_then === then && entry._state !== PENDING) {
2464        this._settledAt(entry._state, i, entry._result);
2465      } else if (typeof _then !== 'function') {
2466        this._remaining--;
2467        this._result[i] = entry;
2468      } else if (c === Promise) {
2469        var promise = new c(noop);
2470        handleMaybeThenable(promise, entry, _then);
2471
2472        this._willSettleAt(promise, i);
2473      } else {
2474        this._willSettleAt(new c(function (resolve$$) {
2475          return resolve$$(entry);
2476        }), i);
2477      }
2478    } else {
2479      this._willSettleAt(resolve$$(entry), i);
2480    }
2481  };
2482
2483  Enumerator.prototype._settledAt = function (state, i, value) {
2484    var promise = this.promise;
2485
2486    if (promise._state === PENDING) {
2487      this._remaining--;
2488
2489      if (state === REJECTED) {
2490        _reject(promise, value);
2491      } else {
2492        this._result[i] = value;
2493      }
2494    }
2495
2496    if (this._remaining === 0) {
2497      fulfill(promise, this._result);
2498    }
2499  };
2500
2501  Enumerator.prototype._willSettleAt = function (promise, i) {
2502    var enumerator = this;
2503    subscribe(promise, undefined, function (value) {
2504      return enumerator._settledAt(FULFILLED, i, value);
2505    }, function (reason) {
2506      return enumerator._settledAt(REJECTED, i, reason);
2507    });
2508  };
2509  /**
2510    `Promise.all` accepts an array of promises, and returns a new promise which
2511    is fulfilled with an array of fulfillment values for the passed promises, or
2512    rejected with the reason of the first passed promise to be rejected. It casts all
2513    elements of the passed iterable to promises as it runs this algorithm.
2514  
2515    Example:
2516  
2517    ```javascript
2518    let promise1 = resolve(1);
2519    let promise2 = resolve(2);
2520    let promise3 = resolve(3);
2521    let promises = [ promise1, promise2, promise3 ];
2522  
2523    Promise.all(promises).then(function(array){
2524      // The array here would be [ 1, 2, 3 ];
2525    });
2526    ```
2527  
2528    If any of the `promises` given to `all` are rejected, the first promise
2529    that is rejected will be given as an argument to the returned promises's
2530    rejection handler. For example:
2531  
2532    Example:
2533  
2534    ```javascript
2535    let promise1 = resolve(1);
2536    let promise2 = reject(new Error("2"));
2537    let promise3 = reject(new Error("3"));
2538    let promises = [ promise1, promise2, promise3 ];
2539  
2540    Promise.all(promises).then(function(array){
2541      // Code here never runs because there are rejected promises!
2542    }, function(error) {
2543      // error.message === "2"
2544    });
2545    ```
2546  
2547    @method all
2548    @static
2549    @param {Array} entries array of promises
2550    @param {String} label optional string for labeling the promise.
2551    Useful for tooling.
2552    @return {Promise} promise that is fulfilled when all `promises` have been
2553    fulfilled, or rejected if any of them become rejected.
2554    @static
2555  */
2556
2557
2558  function all(entries) {
2559    return new Enumerator(this, entries).promise;
2560  }
2561  /**
2562    `Promise.race` returns a new promise which is settled in the same way as the
2563    first passed promise to settle.
2564  
2565    Example:
2566  
2567    ```javascript
2568    let promise1 = new Promise(function(resolve, reject){
2569      setTimeout(function(){
2570        resolve('promise 1');
2571      }, 200);
2572    });
2573  
2574    let promise2 = new Promise(function(resolve, reject){
2575      setTimeout(function(){
2576        resolve('promise 2');
2577      }, 100);
2578    });
2579  
2580    Promise.race([promise1, promise2]).then(function(result){
2581      // result === 'promise 2' because it was resolved before promise1
2582      // was resolved.
2583    });
2584    ```
2585  
2586    `Promise.race` is deterministic in that only the state of the first
2587    settled promise matters. For example, even if other promises given to the
2588    `promises` array argument are resolved, but the first settled promise has
2589    become rejected before the other promises became fulfilled, the returned
2590    promise will become rejected:
2591  
2592    ```javascript
2593    let promise1 = new Promise(function(resolve, reject){
2594      setTimeout(function(){
2595        resolve('promise 1');
2596      }, 200);
2597    });
2598  
2599    let promise2 = new Promise(function(resolve, reject){
2600      setTimeout(function(){
2601        reject(new Error('promise 2'));
2602      }, 100);
2603    });
2604  
2605    Promise.race([promise1, promise2]).then(function(result){
2606      // Code here never runs
2607    }, function(reason){
2608      // reason.message === 'promise 2' because promise 2 became rejected before
2609      // promise 1 became fulfilled
2610    });
2611    ```
2612  
2613    An example real-world use case is implementing timeouts:
2614  
2615    ```javascript
2616    Promise.race([ajax('foo.json'), timeout(5000)])
2617    ```
2618  
2619    @method race
2620    @static
2621    @param {Array} promises array of promises to observe
2622    Useful for tooling.
2623    @return {Promise} a promise which settles in the same way as the first passed
2624    promise to settle.
2625  */
2626
2627
2628  function race(entries) {
2629    /*jshint validthis:true */
2630    var Constructor = this;
2631
2632    if (!isArray(entries)) {
2633      return new Constructor(function (_, reject) {
2634        return reject(new TypeError('You must pass an array to race.'));
2635      });
2636    } else {
2637      return new Constructor(function (resolve, reject) {
2638        var length = entries.length;
2639
2640        for (var i = 0; i < length; i++) {
2641          Constructor.resolve(entries[i]).then(resolve, reject);
2642        }
2643      });
2644    }
2645  }
2646  /**
2647    `Promise.reject` returns a promise rejected with the passed `reason`.
2648    It is shorthand for the following:
2649  
2650    ```javascript
2651    let promise = new Promise(function(resolve, reject){
2652      reject(new Error('WHOOPS'));
2653    });
2654  
2655    promise.then(function(value){
2656      // Code here doesn't run because the promise is rejected!
2657    }, function(reason){
2658      // reason.message === 'WHOOPS'
2659    });
2660    ```
2661  
2662    Instead of writing the above, your code now simply becomes the following:
2663  
2664    ```javascript
2665    let promise = Promise.reject(new Error('WHOOPS'));
2666  
2667    promise.then(function(value){
2668      // Code here doesn't run because the promise is rejected!
2669    }, function(reason){
2670      // reason.message === 'WHOOPS'
2671    });
2672    ```
2673  
2674    @method reject
2675    @static
2676    @param {Any} reason value that the returned promise will be rejected with.
2677    Useful for tooling.
2678    @return {Promise} a promise rejected with the given `reason`.
2679  */
2680
2681
2682  function reject(reason) {
2683    /*jshint validthis:true */
2684    var Constructor = this;
2685    var promise = new Constructor(noop);
2686
2687    _reject(promise, reason);
2688
2689    return promise;
2690  }
2691
2692  function needsResolver() {
2693    throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
2694  }
2695
2696  function needsNew() {
2697    throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
2698  }
2699  /**
2700    Promise objects represent the eventual result of an asynchronous operation. The
2701    primary way of interacting with a promise is through its `then` method, which
2702    registers callbacks to receive either a promise's eventual value or the reason
2703    why the promise cannot be fulfilled.
2704  
2705    Terminology
2706    -----------
2707  
2708    - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
2709    - `thenable` is an object or function that defines a `then` method.
2710    - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
2711    - `exception` is a value that is thrown using the throw statement.
2712    - `reason` is a value that indicates why a promise was rejected.
2713    - `settled` the final resting state of a promise, fulfilled or rejected.
2714  
2715    A promise can be in one of three states: pending, fulfilled, or rejected.
2716  
2717    Promises that are fulfilled have a fulfillment value and are in the fulfilled
2718    state.  Promises that are rejected have a rejection reason and are in the
2719    rejected state.  A fulfillment value is never a thenable.
2720  
2721    Promises can also be said to *resolve* a value.  If this value is also a
2722    promise, then the original promise's settled state will match the value's
2723    settled state.  So a promise that *resolves* a promise that rejects will
2724    itself reject, and a promise that *resolves* a promise that fulfills will
2725    itself fulfill.
2726  
2727  
2728    Basic Usage:
2729    ------------
2730  
2731    ```js
2732    let promise = new Promise(function(resolve, reject) {
2733      // on success
2734      resolve(value);
2735  
2736      // on failure
2737      reject(reason);
2738    });
2739  
2740    promise.then(function(value) {
2741      // on fulfillment
2742    }, function(reason) {
2743      // on rejection
2744    });
2745    ```
2746  
2747    Advanced Usage:
2748    ---------------
2749  
2750    Promises shine when abstracting away asynchronous interactions such as
2751    `XMLHttpRequest`s.
2752  
2753    ```js
2754    function getJSON(url) {
2755      return new Promise(function(resolve, reject){
2756        let xhr = new XMLHttpRequest();
2757  
2758        xhr.open('GET', url);
2759        xhr.onreadystatechange = handler;
2760        xhr.responseType = 'json';
2761        xhr.setRequestHeader('Accept', 'application/json');
2762        xhr.send();
2763  
2764        function handler() {
2765          if (this.readyState === this.DONE) {
2766            if (this.status === 200) {
2767              resolve(this.response);
2768            } else {
2769              reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
2770            }
2771          }
2772        };
2773      });
2774    }
2775  
2776    getJSON('/posts.json').then(function(json) {
2777      // on fulfillment
2778    }, function(reason) {
2779      // on rejection
2780    });
2781    ```
2782  
2783    Unlike callbacks, promises are great composable primitives.
2784  
2785    ```js
2786    Promise.all([
2787      getJSON('/posts'),
2788      getJSON('/comments')
2789    ]).then(function(values){
2790      values[0] // => postsJSON
2791      values[1] // => commentsJSON
2792  
2793      return values;
2794    });
2795    ```
2796  
2797    @class Promise
2798    @param {function} resolver
2799    Useful for tooling.
2800    @constructor
2801  */
2802
2803
2804  function Promise(resolver) {
2805    this[PROMISE_ID] = nextId();
2806    this._result = this._state = undefined;
2807    this._subscribers = [];
2808
2809    if (noop !== resolver) {
2810      typeof resolver !== 'function' && needsResolver();
2811      this instanceof Promise ? initializePromise(this, resolver) : needsNew();
2812    }
2813  }
2814
2815  Promise.all = all;
2816  Promise.race = race;
2817  Promise.resolve = resolve;
2818  Promise.reject = reject;
2819  Promise._setScheduler = setScheduler;
2820  Promise._setAsap = setAsap;
2821  Promise._asap = asap;
2822  Promise.prototype = {
2823    constructor: Promise,
2824
2825    /**
2826      The primary way of interacting with a promise is through its `then` method,
2827      which registers callbacks to receive either a promise's eventual value or the
2828      reason why the promise cannot be fulfilled.
2829    
2830      ```js
2831      findUser().then(function(user){
2832        // user is available
2833      }, function(reason){
2834        // user is unavailable, and you are given the reason why
2835      });
2836      ```
2837    
2838      Chaining
2839      --------
2840    
2841      The return value of `then` is itself a promise.  This second, 'downstream'
2842      promise is resolved with the return value of the first promise's fulfillment
2843      or rejection handler, or rejected if the handler throws an exception.
2844    
2845      ```js
2846      findUser().then(function (user) {
2847        return user.name;
2848      }, function (reason) {
2849        return 'default name';
2850      }).then(function (userName) {
2851        // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
2852        // will be `'default name'`
2853      });
2854    
2855      findUser().then(function (user) {
2856        throw new Error('Found user, but still unhappy');
2857      }, function (reason) {
2858        throw new Error('`findUser` rejected and we're unhappy');
2859      }).then(function (value) {
2860        // never reached
2861      }, function (reason) {
2862        // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
2863        // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
2864      });
2865      ```
2866      If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
2867    
2868      ```js
2869      findUser().then(function (user) {
2870        throw new PedagogicalException('Upstream error');
2871      }).then(function (value) {
2872        // never reached
2873      }).then(function (value) {
2874        // never reached
2875      }, function (reason) {
2876        // The `PedgagocialException` is propagated all the way down to here
2877      });
2878      ```
2879    
2880      Assimilation
2881      ------------
2882    
2883      Sometimes the value you want to propagate to a downstream promise can only be
2884      retrieved asynchronously. This can be achieved by returning a promise in the
2885      fulfillment or rejection handler. The downstream promise will then be pending
2886      until the returned promise is settled. This is called *assimilation*.
2887    
2888      ```js
2889      findUser().then(function (user) {
2890        return findCommentsByAuthor(user);
2891      }).then(function (comments) {
2892        // The user's comments are now available
2893      });
2894      ```
2895    
2896      If the assimliated promise rejects, then the downstream promise will also reject.
2897    
2898      ```js
2899      findUser().then(function (user) {
2900        return findCommentsByAuthor(user);
2901      }).then(function (comments) {
2902        // If `findCommentsByAuthor` fulfills, we'll have the value here
2903      }, function (reason) {
2904        // If `findCommentsByAuthor` rejects, we'll have the reason here
2905      });
2906      ```
2907    
2908      Simple Example
2909      --------------
2910    
2911      Synchronous Example
2912    
2913      ```javascript
2914      let result;
2915    
2916      try {
2917        result = findResult();
2918        // success
2919      } catch(reason) {
2920        // failure
2921      }
2922      ```
2923    
2924      Errback Example
2925    
2926      ```js
2927      findResult(function(result, err){
2928        if (err) {
2929          // failure
2930        } else {
2931          // success
2932        }
2933      });
2934      ```
2935    
2936      Promise Example;
2937    
2938      ```javascript
2939      findResult().then(function(result){
2940        // success
2941      }, function(reason){
2942        // failure
2943      });
2944      ```
2945    
2946      Advanced Example
2947      --------------
2948    
2949      Synchronous Example
2950    
2951      ```javascript
2952      let author, books;
2953    
2954      try {
2955        author = findAuthor();
2956        books  = findBooksByAuthor(author);
2957        // success
2958      } catch(reason) {
2959        // failure
2960      }
2961      ```
2962    
2963      Errback Example
2964    
2965      ```js
2966    
2967      function foundBooks(books) {
2968    
2969      }
2970    
2971      function failure(reason) {
2972    
2973      }
2974    
2975      findAuthor(function(author, err){
2976        if (err) {
2977          failure(err);
2978          // failure
2979        } else {
2980          try {
2981            findBoooksByAuthor(author, function(books, err) {
2982              if (err) {
2983                failure(err);
2984              } else {
2985                try {
2986                  foundBooks(books);
2987                } catch(reason) {
2988                  failure(reason);
2989                }
2990              }
2991            });
2992          } catch(error) {
2993            failure(err);
2994          }
2995          // success
2996        }
2997      });
2998      ```
2999    
3000      Promise Example;
3001    
3002      ```javascript
3003      findAuthor().
3004        then(findBooksByAuthor).
3005        then(function(books){
3006          // found books
3007      }).catch(function(reason){
3008        // something went wrong
3009      });
3010      ```
3011    
3012      @method then
3013      @param {Function} onFulfilled
3014      @param {Function} onRejected
3015      Useful for tooling.
3016      @return {Promise}
3017    */
3018    then: then,
3019
3020    /**
3021      `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
3022      as the catch block of a try/catch statement.
3023    
3024      ```js
3025      function findAuthor(){
3026        throw new Error('couldn't find that author');
3027      }
3028    
3029      // synchronous
3030      try {
3031        findAuthor();
3032      } catch(reason) {
3033        // something went wrong
3034      }
3035    
3036      // async with promises
3037      findAuthor().catch(function(reason){
3038        // something went wrong
3039      });
3040      ```
3041    
3042      @method catch
3043      @param {Function} onRejection
3044      Useful for tooling.
3045      @return {Promise}
3046    */
3047    'catch': function _catch(onRejection) {
3048      return this.then(null, onRejection);
3049    }
3050  };
3051
3052  function polyfill() {
3053    var local = undefined;
3054
3055    if (typeof global !== 'undefined') {
3056      local = global;
3057    } else if (typeof self !== 'undefined') {
3058      local = self;
3059    } else {
3060      try {
3061        local = Function('return this')();
3062      } catch (e) {
3063        throw new Error('polyfill failed because global object is unavailable in this environment');
3064      }
3065    }
3066
3067    var P = local.Promise;
3068
3069    if (P) {
3070      var promiseToString = null;
3071
3072      try {
3073        promiseToString = Object.prototype.toString.call(P.resolve());
3074      } catch (e) {// silently ignored
3075      }
3076
3077      if (promiseToString === '[object Promise]' && !P.cast) {
3078        return;
3079      }
3080    }
3081
3082    local.Promise = Promise;
3083  }
3084
3085  polyfill(); // Strange compat..
3086
3087  Promise.polyfill = polyfill;
3088  Promise.Promise = Promise;
3089  return Promise;
3090});
3091/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
3092
3093/***/ }),
3094
vendor: 5,344 bytes, lines 3095-3312
3095/***/ "./node_modules/process/browser.js":
3096/*!*****************************************!*\
3097  !*** ./node_modules/process/browser.js ***!
3098  \*****************************************/
3099/*! no static exports found */
3100/***/ (function(module, exports) {
3101
3102// shim for using process in browser
3103var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it
3104// don't break things.  But we need to wrap it in a try catch in case it is
3105// wrapped in strict mode code which doesn't define any globals.  It's inside a
3106// function because try/catches deoptimize in certain engines.
3107
3108var cachedSetTimeout;
3109var cachedClearTimeout;
3110
3111function defaultSetTimout() {
3112  throw new Error('setTimeout has not been defined');
3113}
3114
3115function defaultClearTimeout() {
3116  throw new Error('clearTimeout has not been defined');
3117}
3118
3119(function () {
3120  try {
3121    if (typeof setTimeout === 'function') {
3122      cachedSetTimeout = setTimeout;
3123    } else {
3124      cachedSetTimeout = defaultSetTimout;
3125    }
3126  } catch (e) {
3127    cachedSetTimeout = defaultSetTimout;
3128  }
3129
3130  try {
3131    if (typeof clearTimeout === 'function') {
3132      cachedClearTimeout = clearTimeout;
3133    } else {
3134      cachedClearTimeout = defaultClearTimeout;
3135    }
3136  } catch (e) {
3137    cachedClearTimeout = defaultClearTimeout;
3138  }
3139})();
3140
3141function runTimeout(fun) {
3142  if (cachedSetTimeout === setTimeout) {
3143    //normal enviroments in sane situations
3144    return setTimeout(fun, 0);
3145  } // if setTimeout wasn't available but was latter defined
3146
3147
3148  if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
3149    cachedSetTimeout = setTimeout;
3150    return setTimeout(fun, 0);
3151  }
3152
3153  try {
3154    // when when somebody has screwed with setTimeout but no I.E. maddness
3155    return cachedSetTimeout(fun, 0);
3156  } catch (e) {
3157    try {
3158      // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
3159      return cachedSetTimeout.call(null, fun, 0);
3160    } catch (e) {
3161      // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
3162      return cachedSetTimeout.call(this, fun, 0);
3163    }
3164  }
3165}
3166
3167function runClearTimeout(marker) {
3168  if (cachedClearTimeout === clearTimeout) {
3169    //normal enviroments in sane situations
3170    return clearTimeout(marker);
3171  } // if clearTimeout wasn't available but was latter defined
3172
3173
3174  if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
3175    cachedClearTimeout = clearTimeout;
3176    return clearTimeout(marker);
3177  }
3178
3179  try {
3180    // when when somebody has screwed with setTimeout but no I.E. maddness
3181    return cachedClearTimeout(marker);
3182  } catch (e) {
3183    try {
3184      // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
3185      return cachedClearTimeout.call(null, marker);
3186    } catch (e) {
3187      // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
3188      // Some versions of I.E. have different rules for clearTimeout vs setTimeout
3189      return cachedClearTimeout.call(this, marker);
3190    }
3191  }
3192}
3193
3194var queue = [];
3195var draining = false;
3196var currentQueue;
3197var queueIndex = -1;
3198
3199function cleanUpNextTick() {
3200  if (!draining || !currentQueue) {
3201    return;
3202  }
3203
3204  draining = false;
3205
3206  if (currentQueue.length) {
3207    queue = currentQueue.concat(queue);
3208  } else {
3209    queueIndex = -1;
3210  }
3211
3212  if (queue.length) {
3213    drainQueue();
3214  }
3215}
3216
3217function drainQueue() {
3218  if (draining) {
3219    return;
3220  }
3221
3222  var timeout = runTimeout(cleanUpNextTick);
3223  draining = true;
3224  var len = queue.length;
3225
3226  while (len) {
3227    currentQueue = queue;
3228    queue = [];
3229
3230    while (++queueIndex < len) {
3231      if (currentQueue) {
3232        currentQueue[queueIndex].run();
3233      }
3234    }
3235
3236    queueIndex = -1;
3237    len = queue.length;
3238  }
3239
3240  currentQueue = null;
3241  draining = false;
3242  runClearTimeout(timeout);
3243}
3244
3245process.nextTick = function (fun) {
3246  var args = new Array(arguments.length - 1);
3247
3248  if (arguments.length > 1) {
3249    for (var i = 1; i < arguments.length; i++) {
3250      args[i - 1] = arguments[i];
3251    }
3252  }
3253
3254  queue.push(new Item(fun, args));
3255
3256  if (queue.length === 1 && !draining) {
3257    runTimeout(drainQueue);
3258  }
3259}; // v8 likes predictible objects
3260
3261
3262function Item(fun, array) {
3263  this.fun = fun;
3264  this.array = array;
3265}
3266
3267Item.prototype.run = function () {
3268  this.fun.apply(null, this.array);
3269};
3270
3271process.title = 'browser';
3272process.browser = true;
3273process.env = {};
3274process.argv = [];
3275process.version = ''; // empty string to avoid regexp issues
3276
3277process.versions = {};
3278
3279function noop() {}
3280
3281process.on = noop;
3282process.addListener = noop;
3283process.once = noop;
3284process.off = noop;
3285process.removeListener = noop;
3286process.removeAllListeners = noop;
3287process.emit = noop;
3288process.prependListener = noop;
3289process.prependOnceListener = noop;
3290
3291process.listeners = function (name) {
3292  return [];
3293};
3294
3295process.binding = function (name) {
3296  throw new Error('process.binding is not supported');
3297};
3298
3299process.cwd = function () {
3300  return '/';
3301};
3302
3303process.chdir = function (dir) {
3304  throw new Error('process.chdir is not supported');
3305};
3306
3307process.umask = function () {
3308  return 0;
3309};
3310
3311/***/ }),
3312
vendor: 24,919 bytes, lines 3313-4031
3313/***/ "./node_modules/regenerator-runtime/runtime.js":
3314/*!*****************************************************!*\
3315  !*** ./node_modules/regenerator-runtime/runtime.js ***!
3316  \*****************************************************/
3317/*! no static exports found */
3318/***/ (function(module, exports, __webpack_require__) {
3319
3320/* WEBPACK VAR INJECTION */(function(module) {function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3321
3322/**
3323 * Copyright (c) 2014-present, Facebook, Inc.
3324 *
3325 * This source code is licensed under the MIT license found in the
3326 * LICENSE file in the root directory of this source tree.
3327 */
3328var runtime = function (exports) {
3329  "use strict";
3330
3331  var Op = Object.prototype;
3332  var hasOwn = Op.hasOwnProperty;
3333  var undefined; // More compressible than void 0.
3334
3335  var $Symbol = typeof Symbol === "function" ? Symbol : {};
3336  var iteratorSymbol = $Symbol.iterator || "@@iterator";
3337  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
3338  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
3339
3340  function wrap(innerFn, outerFn, self, tryLocsList) {
3341    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
3342    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
3343    var generator = Object.create(protoGenerator.prototype);
3344    var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
3345    // .throw, and .return methods.
3346
3347    generator._invoke = makeInvokeMethod(innerFn, self, context);
3348    return generator;
3349  }
3350
3351  exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
3352  // record like context.tryEntries[i].completion. This interface could
3353  // have been (and was previously) designed to take a closure to be
3354  // invoked without arguments, but in all the cases we care about we
3355  // already have an existing method we want to call, so there's no need
3356  // to create a new function object. We can even get away with assuming
3357  // the method takes exactly one argument, since that happens to be true
3358  // in every case, so we don't have to touch the arguments object. The
3359  // only additional allocation required is the completion record, which
3360  // has a stable shape and so hopefully should be cheap to allocate.
3361
3362  function tryCatch(fn, obj, arg) {
3363    try {
3364      return {
3365        type: "normal",
3366        arg: fn.call(obj, arg)
3367      };
3368    } catch (err) {
3369      return {
3370        type: "throw",
3371        arg: err
3372      };
3373    }
3374  }
3375
3376  var GenStateSuspendedStart = "suspendedStart";
3377  var GenStateSuspendedYield = "suspendedYield";
3378  var GenStateExecuting = "executing";
3379  var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
3380  // breaking out of the dispatch switch statement.
3381
3382  var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
3383  // .constructor.prototype properties for functions that return Generator
3384  // objects. For full spec compliance, you may wish to configure your
3385  // minifier not to mangle the names of these two functions.
3386
3387  function Generator() {}
3388
3389  function GeneratorFunction() {}
3390
3391  function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
3392  // don't natively support it.
3393
3394
3395  var IteratorPrototype = {};
3396
3397  IteratorPrototype[iteratorSymbol] = function () {
3398    return this;
3399  };
3400
3401  var getProto = Object.getPrototypeOf;
3402  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
3403
3404  if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
3405    // This environment has a native %IteratorPrototype%; use it instead
3406    // of the polyfill.
3407    IteratorPrototype = NativeIteratorPrototype;
3408  }
3409
3410  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
3411  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
3412  GeneratorFunctionPrototype.constructor = GeneratorFunction;
3413  GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
3414  // Iterator interface in terms of a single ._invoke method.
3415
3416  function defineIteratorMethods(prototype) {
3417    ["next", "throw", "return"].forEach(function (method) {
3418      prototype[method] = function (arg) {
3419        return this._invoke(method, arg);
3420      };
3421    });
3422  }
3423
3424  exports.isGeneratorFunction = function (genFun) {
3425    var ctor = typeof genFun === "function" && genFun.constructor;
3426    return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
3427    // do is to check its .name property.
3428    (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
3429  };
3430
3431  exports.mark = function (genFun) {
3432    if (Object.setPrototypeOf) {
3433      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
3434    } else {
3435      genFun.__proto__ = GeneratorFunctionPrototype;
3436
3437      if (!(toStringTagSymbol in genFun)) {
3438        genFun[toStringTagSymbol] = "GeneratorFunction";
3439      }
3440    }
3441
3442    genFun.prototype = Object.create(Gp);
3443    return genFun;
3444  }; // Within the body of any async function, `await x` is transformed to
3445  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
3446  // `hasOwn.call(value, "__await")` to determine if the yielded value is
3447  // meant to be awaited.
3448
3449
3450  exports.awrap = function (arg) {
3451    return {
3452      __await: arg
3453    };
3454  };
3455
3456  function AsyncIterator(generator, PromiseImpl) {
3457    function invoke(method, arg, resolve, reject) {
3458      var record = tryCatch(generator[method], generator, arg);
3459
3460      if (record.type === "throw") {
3461        reject(record.arg);
3462      } else {
3463        var result = record.arg;
3464        var value = result.value;
3465
3466        if (value && _typeof(value) === "object" && hasOwn.call(value, "__await")) {
3467          return PromiseImpl.resolve(value.__await).then(function (value) {
3468            invoke("next", value, resolve, reject);
3469          }, function (err) {
3470            invoke("throw", err, resolve, reject);
3471          });
3472        }
3473
3474        return PromiseImpl.resolve(value).then(function (unwrapped) {
3475          // When a yielded Promise is resolved, its final value becomes
3476          // the .value of the Promise<{value,done}> result for the
3477          // current iteration.
3478          result.value = unwrapped;
3479          resolve(result);
3480        }, function (error) {
3481          // If a rejected Promise was yielded, throw the rejection back
3482          // into the async generator function so it can be handled there.
3483          return invoke("throw", error, resolve, reject);
3484        });
3485      }
3486    }
3487
3488    var previousPromise;
3489
3490    function enqueue(method, arg) {
3491      function callInvokeWithMethodAndArg() {
3492        return new PromiseImpl(function (resolve, reject) {
3493          invoke(method, arg, resolve, reject);
3494        });
3495      }
3496
3497      return previousPromise = // If enqueue has been called before, then we want to wait until
3498      // all previous Promises have been resolved before calling invoke,
3499      // so that results are always delivered in the correct order. If
3500      // enqueue has not been called before, then it is important to
3501      // call invoke immediately, without waiting on a callback to fire,
3502      // so that the async generator function has the opportunity to do
3503      // any necessary setup in a predictable way. This predictability
3504      // is why the Promise constructor synchronously invokes its
3505      // executor callback, and why async functions synchronously
3506      // execute code before the first await. Since we implement simple
3507      // async functions in terms of async generators, it is especially
3508      // important to get this right, even though it requires care.
3509      previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
3510      // invocations of the iterator.
3511      callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
3512    } // Define the unified helper method that is used to implement .next,
3513    // .throw, and .return (see defineIteratorMethods).
3514
3515
3516    this._invoke = enqueue;
3517  }
3518
3519  defineIteratorMethods(AsyncIterator.prototype);
3520
3521  AsyncIterator.prototype[asyncIteratorSymbol] = function () {
3522    return this;
3523  };
3524
3525  exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
3526  // AsyncIterator objects; they just return a Promise for the value of
3527  // the final result produced by the iterator.
3528
3529  exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
3530    if (PromiseImpl === void 0) PromiseImpl = Promise;
3531    var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
3532    return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
3533    : iter.next().then(function (result) {
3534      return result.done ? result.value : iter.next();
3535    });
3536  };
3537
3538  function makeInvokeMethod(innerFn, self, context) {
3539    var state = GenStateSuspendedStart;
3540    return function invoke(method, arg) {
3541      if (state === GenStateExecuting) {
3542        throw new Error("Generator is already running");
3543      }
3544
3545      if (state === GenStateCompleted) {
3546        if (method === "throw") {
3547          throw arg;
3548        } // Be forgiving, per 25.3.3.3.3 of the spec:
3549        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
3550
3551
3552        return doneResult();
3553      }
3554
3555      context.method = method;
3556      context.arg = arg;
3557
3558      while (true) {
3559        var delegate = context.delegate;
3560
3561        if (delegate) {
3562          var delegateResult = maybeInvokeDelegate(delegate, context);
3563
3564          if (delegateResult) {
3565            if (delegateResult === ContinueSentinel) continue;
3566            return delegateResult;
3567          }
3568        }
3569
3570        if (context.method === "next") {
3571          // Setting context._sent for legacy support of Babel's
3572          // function.sent implementation.
3573          context.sent = context._sent = context.arg;
3574        } else if (context.method === "throw") {
3575          if (state === GenStateSuspendedStart) {
3576            state = GenStateCompleted;
3577            throw context.arg;
3578          }
3579
3580          context.dispatchException(context.arg);
3581        } else if (context.method === "return") {
3582          context.abrupt("return", context.arg);
3583        }
3584
3585        state = GenStateExecuting;
3586        var record = tryCatch(innerFn, self, context);
3587
3588        if (record.type === "normal") {
3589          // If an exception is thrown from innerFn, we leave state ===
3590          // GenStateExecuting and loop back for another invocation.
3591          state = context.done ? GenStateCompleted : GenStateSuspendedYield;
3592
3593          if (record.arg === ContinueSentinel) {
3594            continue;
3595          }
3596
3597          return {
3598            value: record.arg,
3599            done: context.done
3600          };
3601        } else if (record.type === "throw") {
3602          state = GenStateCompleted; // Dispatch the exception by looping back around to the
3603          // context.dispatchException(context.arg) call above.
3604
3605          context.method = "throw";
3606          context.arg = record.arg;
3607        }
3608      }
3609    };
3610  } // Call delegate.iterator[context.method](context.arg) and handle the
3611  // result, either by returning a { value, done } result from the
3612  // delegate iterator, or by modifying context.method and context.arg,
3613  // setting context.delegate to null, and returning the ContinueSentinel.
3614
3615
3616  function maybeInvokeDelegate(delegate, context) {
3617    var method = delegate.iterator[context.method];
3618
3619    if (method === undefined) {
3620      // A .throw or .return when the delegate iterator has no .throw
3621      // method always terminates the yield* loop.
3622      context.delegate = null;
3623
3624      if (context.method === "throw") {
3625        // Note: ["return"] must be used for ES3 parsing compatibility.
3626        if (delegate.iterator["return"]) {
3627          // If the delegate iterator has a return method, give it a
3628          // chance to clean up.
3629          context.method = "return";
3630          context.arg = undefined;
3631          maybeInvokeDelegate(delegate, context);
3632
3633          if (context.method === "throw") {
3634            // If maybeInvokeDelegate(context) changed context.method from
3635            // "return" to "throw", let that override the TypeError below.
3636            return ContinueSentinel;
3637          }
3638        }
3639
3640        context.method = "throw";
3641        context.arg = new TypeError("The iterator does not provide a 'throw' method");
3642      }
3643
3644      return ContinueSentinel;
3645    }
3646
3647    var record = tryCatch(method, delegate.iterator, context.arg);
3648
3649    if (record.type === "throw") {
3650      context.method = "throw";
3651      context.arg = record.arg;
3652      context.delegate = null;
3653      return ContinueSentinel;
3654    }
3655
3656    var info = record.arg;
3657
3658    if (!info) {
3659      context.method = "throw";
3660      context.arg = new TypeError("iterator result is not an object");
3661      context.delegate = null;
3662      return ContinueSentinel;
3663    }
3664
3665    if (info.done) {
3666      // Assign the result of the finished delegate to the temporary
3667      // variable specified by delegate.resultName (see delegateYield).
3668      context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
3669
3670      context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
3671      // exception, let the outer generator proceed normally. If
3672      // context.method was "next", forget context.arg since it has been
3673      // "consumed" by the delegate iterator. If context.method was
3674      // "return", allow the original .return call to continue in the
3675      // outer generator.
3676
3677      if (context.method !== "return") {
3678        context.method = "next";
3679        context.arg = undefined;
3680      }
3681    } else {
3682      // Re-yield the result returned by the delegate method.
3683      return info;
3684    } // The delegate iterator is finished, so forget it and continue with
3685    // the outer generator.
3686
3687
3688    context.delegate = null;
3689    return ContinueSentinel;
3690  } // Define Generator.prototype.{next,throw,return} in terms of the
3691  // unified ._invoke helper method.
3692
3693
3694  defineIteratorMethods(Gp);
3695  Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
3696  // @@iterator function is called on it. Some browsers' implementations of the
3697  // iterator prototype chain incorrectly implement this, causing the Generator
3698  // object to not be returned from this call. This ensures that doesn't happen.
3699  // See https://github.com/facebook/regenerator/issues/274 for more details.
3700
3701  Gp[iteratorSymbol] = function () {
3702    return this;
3703  };
3704
3705  Gp.toString = function () {
3706    return "[object Generator]";
3707  };
3708
3709  function pushTryEntry(locs) {
3710    var entry = {
3711      tryLoc: locs[0]
3712    };
3713
3714    if (1 in locs) {
3715      entry.catchLoc = locs[1];
3716    }
3717
3718    if (2 in locs) {
3719      entry.finallyLoc = locs[2];
3720      entry.afterLoc = locs[3];
3721    }
3722
3723    this.tryEntries.push(entry);
3724  }
3725
3726  function resetTryEntry(entry) {
3727    var record = entry.completion || {};
3728    record.type = "normal";
3729    delete record.arg;
3730    entry.completion = record;
3731  }
3732
3733  function Context(tryLocsList) {
3734    // The root entry object (effectively a try statement without a catch
3735    // or a finally block) gives us a place to store values thrown from
3736    // locations where there is no enclosing try statement.
3737    this.tryEntries = [{
3738      tryLoc: "root"
3739    }];
3740    tryLocsList.forEach(pushTryEntry, this);
3741    this.reset(true);
3742  }
3743
3744  exports.keys = function (object) {
3745    var keys = [];
3746
3747    for (var key in object) {
3748      keys.push(key);
3749    }
3750
3751    keys.reverse(); // Rather than returning an object with a next method, we keep
3752    // things simple and return the next function itself.
3753
3754    return function next() {
3755      while (keys.length) {
3756        var key = keys.pop();
3757
3758        if (key in object) {
3759          next.value = key;
3760          next.done = false;
3761          return next;
3762        }
3763      } // To avoid creating an additional object, we just hang the .value
3764      // and .done properties off the next function object itself. This
3765      // also ensures that the minifier will not anonymize the function.
3766
3767
3768      next.done = true;
3769      return next;
3770    };
3771  };
3772
3773  function values(iterable) {
3774    if (iterable) {
3775      var iteratorMethod = iterable[iteratorSymbol];
3776
3777      if (iteratorMethod) {
3778        return iteratorMethod.call(iterable);
3779      }
3780
3781      if (typeof iterable.next === "function") {
3782        return iterable;
3783      }
3784
3785      if (!isNaN(iterable.length)) {
3786        var i = -1,
3787            next = function next() {
3788          while (++i < iterable.length) {
3789            if (hasOwn.call(iterable, i)) {
3790              next.value = iterable[i];
3791              next.done = false;
3792              return next;
3793            }
3794          }
3795
3796          next.value = undefined;
3797          next.done = true;
3798          return next;
3799        };
3800
3801        return next.next = next;
3802      }
3803    } // Return an iterator with no values.
3804
3805
3806    return {
3807      next: doneResult
3808    };
3809  }
3810
3811  exports.values = values;
3812
3813  function doneResult() {
3814    return {
3815      value: undefined,
3816      done: true
3817    };
3818  }
3819
3820  Context.prototype = {
3821    constructor: Context,
3822    reset: function reset(skipTempReset) {
3823      this.prev = 0;
3824      this.next = 0; // Resetting context._sent for legacy support of Babel's
3825      // function.sent implementation.
3826
3827      this.sent = this._sent = undefined;
3828      this.done = false;
3829      this.delegate = null;
3830      this.method = "next";
3831      this.arg = undefined;
3832      this.tryEntries.forEach(resetTryEntry);
3833
3834      if (!skipTempReset) {
3835        for (var name in this) {
3836          // Not sure about the optimal order of these conditions:
3837          if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
3838            this[name] = undefined;
3839          }
3840        }
3841      }
3842    },
3843    stop: function stop() {
3844      this.done = true;
3845      var rootEntry = this.tryEntries[0];
3846      var rootRecord = rootEntry.completion;
3847
3848      if (rootRecord.type === "throw") {
3849        throw rootRecord.arg;
3850      }
3851
3852      return this.rval;
3853    },
3854    dispatchException: function dispatchException(exception) {
3855      if (this.done) {
3856        throw exception;
3857      }
3858
3859      var context = this;
3860
3861      function handle(loc, caught) {
3862        record.type = "throw";
3863        record.arg = exception;
3864        context.next = loc;
3865
3866        if (caught) {
3867          // If the dispatched exception was caught by a catch block,
3868          // then let that catch block handle the exception normally.
3869          context.method = "next";
3870          context.arg = undefined;
3871        }
3872
3873        return !!caught;
3874      }
3875
3876      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
3877        var entry = this.tryEntries[i];
3878        var record = entry.completion;
3879
3880        if (entry.tryLoc === "root") {
3881          // Exception thrown outside of any try block that could handle
3882          // it, so set the completion value of the entire function to
3883          // throw the exception.
3884          return handle("end");
3885        }
3886
3887        if (entry.tryLoc <= this.prev) {
3888          var hasCatch = hasOwn.call(entry, "catchLoc");
3889          var hasFinally = hasOwn.call(entry, "finallyLoc");
3890
3891          if (hasCatch && hasFinally) {
3892            if (this.prev < entry.catchLoc) {
3893              return handle(entry.catchLoc, true);
3894            } else if (this.prev < entry.finallyLoc) {
3895              return handle(entry.finallyLoc);
3896            }
3897          } else if (hasCatch) {
3898            if (this.prev < entry.catchLoc) {
3899              return handle(entry.catchLoc, true);
3900            }
3901          } else if (hasFinally) {
3902            if (this.prev < entry.finallyLoc) {
3903              return handle(entry.finallyLoc);
3904            }
3905          } else {
3906            throw new Error("try statement without catch or finally");
3907          }
3908        }
3909      }
3910    },
3911    abrupt: function abrupt(type, arg) {
3912      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
3913        var entry = this.tryEntries[i];
3914
3915        if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
3916          var finallyEntry = entry;
3917          break;
3918        }
3919      }
3920
3921      if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
3922        // Ignore the finally entry if control is not jumping to a
3923        // location outside the try/catch block.
3924        finallyEntry = null;
3925      }
3926
3927      var record = finallyEntry ? finallyEntry.completion : {};
3928      record.type = type;
3929      record.arg = arg;
3930
3931      if (finallyEntry) {
3932        this.method = "next";
3933        this.next = finallyEntry.finallyLoc;
3934        return ContinueSentinel;
3935      }
3936
3937      return this.complete(record);
3938    },
3939    complete: function complete(record, afterLoc) {
3940      if (record.type === "throw") {
3941        throw record.arg;
3942      }
3943
3944      if (record.type === "break" || record.type === "continue") {
3945        this.next = record.arg;
3946      } else if (record.type === "return") {
3947        this.rval = this.arg = record.arg;
3948        this.method = "return";
3949        this.next = "end";
3950      } else if (record.type === "normal" && afterLoc) {
3951        this.next = afterLoc;
3952      }
3953
3954      return ContinueSentinel;
3955    },
3956    finish: function finish(finallyLoc) {
3957      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
3958        var entry = this.tryEntries[i];
3959
3960        if (entry.finallyLoc === finallyLoc) {
3961          this.complete(entry.completion, entry.afterLoc);
3962          resetTryEntry(entry);
3963          return ContinueSentinel;
3964        }
3965      }
3966    },
3967    "catch": function _catch(tryLoc) {
3968      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
3969        var entry = this.tryEntries[i];
3970
3971        if (entry.tryLoc === tryLoc) {
3972          var record = entry.completion;
3973
3974          if (record.type === "throw") {
3975            var thrown = record.arg;
3976            resetTryEntry(entry);
3977          }
3978
3979          return thrown;
3980        }
3981      } // The context.catch method must only be called with a location
3982      // argument that corresponds to a known catch block.
3983
3984
3985      throw new Error("illegal catch attempt");
3986    },
3987    delegateYield: function delegateYield(iterable, resultName, nextLoc) {
3988      this.delegate = {
3989        iterator: values(iterable),
3990        resultName: resultName,
3991        nextLoc: nextLoc
3992      };
3993
3994      if (this.method === "next") {
3995        // Deliberately forget the last sent value so that we don't
3996        // accidentally pass it on to the delegate.
3997        this.arg = undefined;
3998      }
3999
4000      return ContinueSentinel;
4001    }
4002  }; // Regardless of whether this script is executing as a CommonJS module
4003  // or not, return the runtime object so that we can declare the variable
4004  // regeneratorRuntime in the outer scope, which allows this module to be
4005  // injected easily by `bin/regenerator --include-runtime script.js`.
4006
4007  return exports;
4008}( // If this script is executing as a CommonJS module, use module.exports
4009// as the regeneratorRuntime namespace. Otherwise create a new empty
4010// object. Either way, the resulting object will be used to initialize
4011// the regeneratorRuntime variable at the top of this file.
4012( false ? undefined : _typeof(module)) === "object" ? module.exports : {});
4013
4014try {
4015  regeneratorRuntime = runtime;
4016} catch (accidentalStrictMode) {
4017  // This module should not be running in strict mode, so the above
4018  // assignment should always work unless something is misconfigured. Just
4019  // in case runtime.js accidentally runs in strict mode, we can escape
4020  // strict mode using a global Function call. This could conceivably fail
4021  // if a Content Security Policy forbids using Function, but in that case
4022  // the proper solution is to fix the accidental strict mode problem. If
4023  // you've misconfigured your bundler to force strict mode and applied a
4024  // CSP to forbid Function, and you're not willing to fix either of those
4025  // problems, please detail your unique predicament in a GitHub issue.
4026  Function("r", "regeneratorRuntime = r")(runtime);
4027}
4028/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
4029
4030/***/ }),
4031
vendor: 1,157 bytes, lines 4032-4061
4032/***/ "./node_modules/webpack/buildin/global.js":
4033/*!***********************************!*\
4034  !*** (webpack)/buildin/global.js ***!
4035  \***********************************/
4036/*! no static exports found */
4037/***/ (function(module, exports) {
4038
4039function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4040
4041var g; // This works in non-strict mode
4042
4043g = function () {
4044  return this;
4045}();
4046
4047try {
4048  // This works if eval is allowed (see CSP)
4049  g = g || new Function("return this")();
4050} catch (e) {
4051  // This works if the window reference is available
4052  if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window;
4053} // g can still be undefined, but nothing to do about it...
4054// We return undefined, instead of nothing here, so it's
4055// easier to handle this case. if(!global) { ...}
4056
4057
4058module.exports = g;
4059
4060/***/ }),
4061
vendor: 801 bytes, lines 4062-4094
4062/***/ "./node_modules/webpack/buildin/module.js":
4063/*!***********************************!*\
4064  !*** (webpack)/buildin/module.js ***!
4065  \***********************************/
4066/*! no static exports found */
4067/***/ (function(module, exports) {
4068
4069module.exports = function (module) {
4070  if (!module.webpackPolyfill) {
4071    module.deprecate = function () {};
4072
4073    module.paths = []; // module.parent = undefined by default
4074
4075    if (!module.children) module.children = [];
4076    Object.defineProperty(module, "loaded", {
4077      enumerable: true,
4078      get: function get() {
4079        return module.l;
4080      }
4081    });
4082    Object.defineProperty(module, "id", {
4083      enumerable: true,
4084      get: function get() {
4085        return module.i;
4086      }
4087    });
4088    module.webpackPolyfill = 1;
4089  }
4090
4091  return module;
4092};
4093
4094/***/ })
4094,
4095
4096/***/ 0:
4097/*!**********************************************************************!*\
4098  !*** multi es6-promise-promise ./js/polyfill.js ./js/scripts_es6.js ***!
4099  \**********************************************************************/
4100/*! no static exports found */
4101/***/ (function(module, exports, __webpack_require__) {
4102
4103__webpack_require__(/*! es6-promise-promise */"./node_modules/es6-promise-promise/index.js");
4104__webpack_require__(/*! ./js/polyfill.js */"./js/polyfill.js");
4105module.exports = __webpack_require__(/*! ./js/scripts_es6.js */"./js/scripts_es6.js");
4106
4107
4108/***/ }),
4109
4110/***/ 1:
4111/*!***********************!*\
4112  !*** vertx (ignored) ***!
4113  \***********************/
4114/*! no static exports found */
4115/***/ (function(module, exports) {
4116
4117/* (ignored) */
4118
4119/***/ })
4120
4121/******/ });
4122//# sourceMappingURL=scripts.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.