PageSourceSearch

https://wiindot.com/js/app.js

js wiindot.com collected 2026-10-02 01:00:12 UTC 1,590,239 bytes, 47,240 lines download raw bytes

vendor: 78 bytes, lines 1-3
1/******/ (() => { // webpackBootstrap
2/******/ 	var __webpack_modules__ = ({
3
vendor: 13,566 bytes, lines 4-292
4/***/ "./node_modules/@popperjs/core/lib/createPopper.js":
5/*!*********************************************************!*\
6  !*** ./node_modules/@popperjs/core/lib/createPopper.js ***!
7  \*********************************************************/
8/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
10"use strict";
11__webpack_require__.r(__webpack_exports__);
12/* harmony export */ __webpack_require__.d(__webpack_exports__, {
13/* harmony export */   "createPopper": () => (/* binding */ createPopper),
14/* harmony export */   "detectOverflow": () => (/* reexport safe */ _utils_detectOverflow_js__WEBPACK_IMPORTED_MODULE_13__["default"]),
15/* harmony export */   "popperGenerator": () => (/* binding */ popperGenerator)
16/* harmony export */ });
17/* harmony import */ var _dom_utils_getCompositeRect_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./dom-utils/getCompositeRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js");
18/* harmony import */ var _dom_utils_getLayoutRect_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./dom-utils/getLayoutRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js");
19/* harmony import */ var _dom_utils_listScrollParents_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dom-utils/listScrollParents.js */ "./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js");
20/* harmony import */ var _dom_utils_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./dom-utils/getOffsetParent.js */ "./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js");
21/* harmony import */ var _dom_utils_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./dom-utils/getComputedStyle.js */ "./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js");
22/* harmony import */ var _utils_orderModifiers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/orderModifiers.js */ "./node_modules/@popperjs/core/lib/utils/orderModifiers.js");
23/* harmony import */ var _utils_debounce_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/debounce.js */ "./node_modules/@popperjs/core/lib/utils/debounce.js");
24/* harmony import */ var _utils_validateModifiers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/validateModifiers.js */ "./node_modules/@popperjs/core/lib/utils/validateModifiers.js");
25/* harmony import */ var _utils_uniqueBy_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/uniqueBy.js */ "./node_modules/@popperjs/core/lib/utils/uniqueBy.js");
26/* harmony import */ var _utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/getBasePlacement.js */ "./node_modules/@popperjs/core/lib/utils/getBasePlacement.js");
27/* harmony import */ var _utils_mergeByName_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/mergeByName.js */ "./node_modules/@popperjs/core/lib/utils/mergeByName.js");
28/* harmony import */ var _utils_detectOverflow_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utils/detectOverflow.js */ "./node_modules/@popperjs/core/lib/utils/detectOverflow.js");
29/* harmony import */ var _dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom-utils/instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
30/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
46var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
47var DEFAULT_OPTIONS = {
48  placement: 'bottom',
49  modifiers: [],
50  strategy: 'absolute'
51};
52
53function areValidElements() {
54  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
55    args[_key] = arguments[_key];
56  }
57
58  return !args.some(function (element) {
59    return !(element && typeof element.getBoundingClientRect === 'function');
60  });
61}
62
63function popperGenerator(generatorOptions) {
64  if (generatorOptions === void 0) {
65    generatorOptions = {};
66  }
67
68  var _generatorOptions = generatorOptions,
69      _generatorOptions$def = _generatorOptions.defaultModifiers,
70      defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
71      _generatorOptions$def2 = _generatorOptions.defaultOptions,
72      defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
73  return function createPopper(reference, popper, options) {
74    if (options === void 0) {
75      options = defaultOptions;
76    }
77
78    var state = {
79      placement: 'bottom',
80      orderedModifiers: [],
81      options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
82      modifiersData: {},
83      elements: {
84        reference: reference,
85        popper: popper
86      },
87      attributes: {},
88      styles: {}
89    };
90    var effectCleanupFns = [];
91    var isDestroyed = false;
92    var instance = {
93      state: state,
94      setOptions: function setOptions(setOptionsAction) {
95        var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
96        cleanupModifierEffects();
97        state.options = Object.assign({}, defaultOptions, state.options, options);
98        state.scrollParents = {
99          reference: (0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isElement)(reference) ? (0,_dom_utils_listScrollParents_js__WEBPACK_IMPORTED_MODULE_1__["default"])(reference) : reference.contextElement ? (0,_dom_utils_listScrollParents_js__WEBPACK_IMPORTED_MODULE_1__["default"])(reference.contextElement) : [],
100          popper: (0,_dom_utils_listScrollParents_js__WEBPACK_IMPORTED_MODULE_1__["default"])(popper)
101        }; // Orders the modifiers based on their dependencies and `phase`
102        // properties
103
104        var orderedModifiers = (0,_utils_orderModifiers_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_utils_mergeByName_js__WEBPACK_IMPORTED_MODULE_3__["default"])([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
105
106        state.orderedModifiers = orderedModifiers.filter(function (m) {
107          return m.enabled;
108        }); // Validate the provided modifiers so that the consumer will get warned
109        // if one of the modifiers is invalid for any reason
110
111        if (true) {
112          var modifiers = (0,_utils_uniqueBy_js__WEBPACK_IMPORTED_MODULE_4__["default"])([].concat(orderedModifiers, state.options.modifiers), function (_ref) {
113            var name = _ref.name;
114            return name;
115          });
116          (0,_utils_validateModifiers_js__WEBPACK_IMPORTED_MODULE_5__["default"])(modifiers);
117
118          if ((0,_utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_6__["default"])(state.options.placement) === _enums_js__WEBPACK_IMPORTED_MODULE_7__.auto) {
119            var flipModifier = state.orderedModifiers.find(function (_ref2) {
120              var name = _ref2.name;
121              return name === 'flip';
122            });
123
124            if (!flipModifier) {
125              console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' '));
126            }
127          }
128
129          var _getComputedStyle = (0,_dom_utils_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_8__["default"])(popper),
130              marginTop = _getComputedStyle.marginTop,
131              marginRight = _getComputedStyle.marginRight,
132              marginBottom = _getComputedStyle.marginBottom,
133              marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
134          // cause bugs with positioning, so we'll warn the consumer
135
136
137          if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
138            return parseFloat(margin);
139          })) {
140            console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
141          }
142        }
143
144        runModifierEffects();
145        return instance.update();
146      },
147      // Sync update – it will always be executed, even if not necessary. This
148      // is useful for low frequency updates where sync behavior simplifies the
149      // logic.
150      // For high frequency updates (e.g. `resize` and `scroll` events), always
151      // prefer the async Popper#update method
152      forceUpdate: function forceUpdate() {
153        if (isDestroyed) {
154          return;
155        }
156
157        var _state$elements = state.elements,
158            reference = _state$elements.reference,
159            popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
160        // anymore
161
162        if (!areValidElements(reference, popper)) {
163          if (true) {
164            console.error(INVALID_ELEMENT_ERROR);
165          }
166
167          return;
168        } // Store the reference and popper rects to be read by modifiers
169
170
171        state.rects = {
172          reference: (0,_dom_utils_getCompositeRect_js__WEBPACK_IMPORTED_MODULE_9__["default"])(reference, (0,_dom_utils_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__["default"])(popper), state.options.strategy === 'fixed'),
173          popper: (0,_dom_utils_getLayoutRect_js__WEBPACK_IMPORTED_MODULE_11__["default"])(popper)
174        }; // Modifiers have the ability to reset the current update cycle. The
175        // most common use case for this is the `flip` modifier changing the
176        // placement, which then needs to re-run all the modifiers, because the
177        // logic was previously ran for the previous placement and is therefore
178        // stale/incorrect
179
180        state.reset = false;
181        state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
182        // is filled with the initial data specified by the modifier. This means
183        // it doesn't persist and is fresh on each update.
184        // To ensure persistent data, use `${name}#persistent`
185
186        state.orderedModifiers.forEach(function (modifier) {
187          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
188        });
189        var __debug_loops__ = 0;
190
191        for (var index = 0; index < state.orderedModifiers.length; index++) {
192          if (true) {
193            __debug_loops__ += 1;
194
195            if (__debug_loops__ > 100) {
196              console.error(INFINITE_LOOP_ERROR);
197              break;
198            }
199          }
200
201          if (state.reset === true) {
202            state.reset = false;
203            index = -1;
204            continue;
205          }
206
207          var _state$orderedModifie = state.orderedModifiers[index],
208              fn = _state$orderedModifie.fn,
209              _state$orderedModifie2 = _state$orderedModifie.options,
210              _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
211              name = _state$orderedModifie.name;
212
213          if (typeof fn === 'function') {
214            state = fn({
215              state: state,
216              options: _options,
217              name: name,
218              instance: instance
219            }) || state;
220          }
221        }
222      },
223      // Async and optimistically optimized update – it will not be executed if
224      // not necessary (debounced to run at most once-per-tick)
225      update: (0,_utils_debounce_js__WEBPACK_IMPORTED_MODULE_12__["default"])(function () {
226        return new Promise(function (resolve) {
227          instance.forceUpdate();
228          resolve(state);
229        });
230      }),
231      destroy: function destroy() {
232        cleanupModifierEffects();
233        isDestroyed = true;
234      }
235    };
236
237    if (!areValidElements(reference, popper)) {
238      if (true) {
239        console.error(INVALID_ELEMENT_ERROR);
240      }
241
242      return instance;
243    }
244
245    instance.setOptions(options).then(function (state) {
246      if (!isDestroyed && options.onFirstUpdate) {
247        options.onFirstUpdate(state);
248      }
249    }); // Modifiers have the ability to execute arbitrary code before the first
250    // update cycle runs. They will be executed in the same order as the update
251    // cycle. This is useful when a modifier adds some persistent data that
252    // other modifiers need to use, but the modifier is run after the dependent
253    // one.
254
255    function runModifierEffects() {
256      state.orderedModifiers.forEach(function (_ref3) {
257        var name = _ref3.name,
258            _ref3$options = _ref3.options,
259            options = _ref3$options === void 0 ? {} : _ref3$options,
260            effect = _ref3.effect;
261
262        if (typeof effect === 'function') {
263          var cleanupFn = effect({
264            state: state,
265            name: name,
266            instance: instance,
267            options: options
268          });
269
270          var noopFn = function noopFn() {};
271
272          effectCleanupFns.push(cleanupFn || noopFn);
273        }
274      });
275    }
276
277    function cleanupModifierEffects() {
278      effectCleanupFns.forEach(function (fn) {
279        return fn();
280      });
281      effectCleanupFns = [];
282    }
283
284    return instance;
285  };
286}
287var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules
288
289
290
291/***/ }),
292
vendor: 1,418 bytes, lines 293-330
293/***/ "./node_modules/@popperjs/core/lib/dom-utils/contains.js":
294/*!***************************************************************!*\
295  !*** ./node_modules/@popperjs/core/lib/dom-utils/contains.js ***!
296  \***************************************************************/
297/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
298
299"use strict";
300__webpack_require__.r(__webpack_exports__);
301/* harmony export */ __webpack_require__.d(__webpack_exports__, {
302/* harmony export */   "default": () => (/* binding */ contains)
303/* harmony export */ });
304/* harmony import */ var _instanceOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
305
306function contains(parent, child) {
307  var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
308
309  if (parent.contains(child)) {
310    return true;
311  } // then fallback to custom implementation with Shadow DOM support
312  else if (rootNode && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isShadowRoot)(rootNode)) {
313      var next = child;
314
315      do {
316        if (next && parent.isSameNode(next)) {
317          return true;
318        } // $FlowFixMe[prop-missing]: need a better way to handle this...
319
320
321        next = next.parentNode || next.host;
322      } while (next);
323    } // Give up, the result is false
324
325
326  return false;
327}
328
329/***/ }),
330
vendor: 2,033 bytes, lines 331-382
331/***/ "./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js":
332/*!****************************************************************************!*\
333  !*** ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js ***!
334  \****************************************************************************/
335/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
336
337"use strict";
338__webpack_require__.r(__webpack_exports__);
339/* harmony export */ __webpack_require__.d(__webpack_exports__, {
340/* harmony export */   "default": () => (/* binding */ getBoundingClientRect)
341/* harmony export */ });
342/* harmony import */ var _instanceOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
343/* harmony import */ var _utils_math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/math.js */ "./node_modules/@popperjs/core/lib/utils/math.js");
344
345
346function getBoundingClientRect(element, includeScale) {
347  if (includeScale === void 0) {
348    includeScale = false;
349  }
350
351  var rect = element.getBoundingClientRect();
352  var scaleX = 1;
353  var scaleY = 1;
354
355  if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) && includeScale) {
356    var offsetHeight = element.offsetHeight;
357    var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
358    // Fallback to 1 in case both values are `0`
359
360    if (offsetWidth > 0) {
361      scaleX = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_1__.round)(rect.width) / offsetWidth || 1;
362    }
363
364    if (offsetHeight > 0) {
365      scaleY = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_1__.round)(rect.height) / offsetHeight || 1;
366    }
367  }
368
369  return {
370    width: rect.width / scaleX,
371    height: rect.height / scaleY,
372    top: rect.top / scaleY,
373    right: rect.right / scaleX,
374    bottom: rect.bottom / scaleY,
375    left: rect.left / scaleX,
376    x: rect.left / scaleX,
377    y: rect.top / scaleY
378  };
379}
380
381/***/ }),
382
vendor: 6,817 bytes, lines 383-480
383/***/ "./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js":
384/*!**********************************************************************!*\
385  !*** ./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js ***!
386  \**********************************************************************/
387/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
388
389"use strict";
390__webpack_require__.r(__webpack_exports__);
391/* harmony export */ __webpack_require__.d(__webpack_exports__, {
392/* harmony export */   "default": () => (/* binding */ getClippingRect)
393/* harmony export */ });
394/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
395/* harmony import */ var _getViewportRect_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getViewportRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js");
396/* harmony import */ var _getDocumentRect_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./getDocumentRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js");
397/* harmony import */ var _listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./listScrollParents.js */ "./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js");
398/* harmony import */ var _getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./getOffsetParent.js */ "./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js");
399/* harmony import */ var _getDocumentElement_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./getDocumentElement.js */ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js");
400/* harmony import */ var _getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./getComputedStyle.js */ "./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js");
401/* harmony import */ var _instanceOf_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
402/* harmony import */ var _getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBoundingClientRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js");
403/* harmony import */ var _getParentNode_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./getParentNode.js */ "./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js");
404/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./contains.js */ "./node_modules/@popperjs/core/lib/dom-utils/contains.js");
405/* harmony import */ var _getNodeName_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./getNodeName.js */ "./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js");
406/* harmony import */ var _utils_rectToClientRect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/rectToClientRect.js */ "./node_modules/@popperjs/core/lib/utils/rectToClientRect.js");
407/* harmony import */ var _utils_math_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/math.js */ "./node_modules/@popperjs/core/lib/utils/math.js");
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423function getInnerBoundingClientRect(element) {
424  var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element);
425  rect.top = rect.top + element.clientTop;
426  rect.left = rect.left + element.clientLeft;
427  rect.bottom = rect.top + element.clientHeight;
428  rect.right = rect.left + element.clientWidth;
429  rect.width = element.clientWidth;
430  rect.height = element.clientHeight;
431  rect.x = rect.left;
432  rect.y = rect.top;
433  return rect;
434}
435
436function getClientRectFromMixedType(element, clippingParent) {
437  return clippingParent === _enums_js__WEBPACK_IMPORTED_MODULE_1__.viewport ? (0,_utils_rectToClientRect_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_getViewportRect_js__WEBPACK_IMPORTED_MODULE_3__["default"])(element)) : (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) ? getInnerBoundingClientRect(clippingParent) : (0,_utils_rectToClientRect_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_getDocumentRect_js__WEBPACK_IMPORTED_MODULE_5__["default"])((0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_6__["default"])(element)));
438} // A "clipping parent" is an overflowable container with the characteristic of
439// clipping (or hiding) overflowing elements with a position different from
440// `initial`
441
442
443function getClippingParents(element) {
444  var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__["default"])((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__["default"])(element));
445  var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__["default"])(element).position) >= 0;
446  var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__["default"])(element) : element;
447
448  if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {
449    return [];
450  } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
451
452
453  return clippingParents.filter(function (clippingParent) {
454    return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__["default"])(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__["default"])(clippingParent) !== 'body';
455  });
456} // Gets the maximum area that the element is visible in due to any number of
457// clipping parents
458
459
460function getClippingRect(element, boundary, rootBoundary) {
461  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
462  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
463  var firstClippingParent = clippingParents[0];
464  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
465    var rect = getClientRectFromMixedType(element, clippingParent);
466    accRect.top = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_13__.max)(rect.top, accRect.top);
467    accRect.right = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_13__.min)(rect.right, accRect.right);
468    accRect.bottom = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_13__.min)(rect.bottom, accRect.bottom);
469    accRect.left = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_13__.max)(rect.left, accRect.left);
470    return accRect;
471  }, getClientRectFromMixedType(element, firstClippingParent));
472  clippingRect.width = clippingRect.right - clippingRect.left;
473  clippingRect.height = clippingRect.bottom - clippingRect.top;
474  clippingRect.x = clippingRect.left;
475  clippingRect.y = clippingRect.top;
476  return clippingRect;
477}
478
479/***/ }),
480
vendor: 4,343 bytes, lines 481-560
481/***/ "./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js":
482/*!***********************************************************************!*\
483  !*** ./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js ***!
484  \***********************************************************************/
485/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
486
487"use strict";
488__webpack_require__.r(__webpack_exports__);
489/* harmony export */ __webpack_require__.d(__webpack_exports__, {
490/* harmony export */   "default": () => (/* binding */ getCompositeRect)
491/* harmony export */ });
492/* harmony import */ var _getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getBoundingClientRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js");
493/* harmony import */ var _getNodeScroll_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./getNodeScroll.js */ "./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js");
494/* harmony import */ var _getNodeName_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./getNodeName.js */ "./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js");
495/* harmony import */ var _instanceOf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
496/* harmony import */ var _getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./getWindowScrollBarX.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js");
497/* harmony import */ var _getDocumentElement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getDocumentElement.js */ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js");
498/* harmony import */ var _isScrollParent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isScrollParent.js */ "./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js");
499/* harmony import */ var _utils_math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/math.js */ "./node_modules/@popperjs/core/lib/utils/math.js");
500
501
502
503
504
505
506
507
508
509function isElementScaled(element) {
510  var rect = element.getBoundingClientRect();
511  var scaleX = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(rect.width) / element.offsetWidth || 1;
512  var scaleY = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(rect.height) / element.offsetHeight || 1;
513  return scaleX !== 1 || scaleY !== 1;
514} // Returns the composite rect of an element relative to its offsetParent.
515// Composite means it takes into account transforms as well as layout.
516
517
518function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
519  if (isFixed === void 0) {
520    isFixed = false;
521  }
522
523  var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__.isHTMLElement)(offsetParent);
524  var offsetParentIsScaled = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__.isHTMLElement)(offsetParent) && isElementScaled(offsetParent);
525  var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_2__["default"])(offsetParent);
526  var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_3__["default"])(elementOrVirtualElement, offsetParentIsScaled);
527  var scroll = {
528    scrollLeft: 0,
529    scrollTop: 0
530  };
531  var offsets = {
532    x: 0,
533    y: 0
534  };
535
536  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
537    if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_4__["default"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
538    (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_5__["default"])(documentElement)) {
539      scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_6__["default"])(offsetParent);
540    }
541
542    if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__.isHTMLElement)(offsetParent)) {
543      offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_3__["default"])(offsetParent, true);
544      offsets.x += offsetParent.clientLeft;
545      offsets.y += offsetParent.clientTop;
546    } else if (documentElement) {
547      offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_7__["default"])(documentElement);
548    }
549  }
550
551  return {
552    x: rect.left + scroll.scrollLeft - offsets.x,
553    y: rect.top + scroll.scrollTop - offsets.y,
554    width: rect.width,
555    height: rect.height
556  };
557}
558
559/***/ }),
560
vendor: 934 bytes, lines 561-579
561/***/ "./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js":
562/*!***********************************************************************!*\
563  !*** ./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js ***!
564  \***********************************************************************/
565/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
566
567"use strict";
568__webpack_require__.r(__webpack_exports__);
569/* harmony export */ __webpack_require__.d(__webpack_exports__, {
570/* harmony export */   "default": () => (/* binding */ getComputedStyle)
571/* harmony export */ });
572/* harmony import */ var _getWindow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getWindow.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindow.js");
573
574function getComputedStyle(element) {
575  return (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element).getComputedStyle(element);
576}
577
578/***/ }),
579
vendor: 1,105 bytes, lines 580-600
580/***/ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js":
581/*!*************************************************************************!*\
582  !*** ./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js ***!
583  \*************************************************************************/
584/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
585
586"use strict";
587__webpack_require__.r(__webpack_exports__);
588/* harmony export */ __webpack_require__.d(__webpack_exports__, {
589/* harmony export */   "default": () => (/* binding */ getDocumentElement)
590/* harmony export */ });
591/* harmony import */ var _instanceOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
592
593function getDocumentElement(element) {
594  // $FlowFixMe[incompatible-return]: assume body is always available
595  return (((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isElement)(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
596  element.document) || window.document).documentElement;
597}
598
599/***/ }),
600
vendor: 2,858 bytes, lines 601-648
601/***/ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js":
602/*!**********************************************************************!*\
603  !*** ./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js ***!
604  \**********************************************************************/
605/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
606
607"use strict";
608__webpack_require__.r(__webpack_exports__);
609/* harmony export */ __webpack_require__.d(__webpack_exports__, {
610/* harmony export */   "default": () => (/* binding */ getDocumentRect)
611/* harmony export */ });
612/* harmony import */ var _getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getDocumentElement.js */ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js");
613/* harmony import */ var _getComputedStyle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./getComputedStyle.js */ "./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js");
614/* harmony import */ var _getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getWindowScrollBarX.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js");
615/* harmony import */ var _getWindowScroll_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getWindowScroll.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js");
616/* harmony import */ var _utils_math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/math.js */ "./node_modules/@popperjs/core/lib/utils/math.js");
617
618
619
620
621 // Gets the entire size of the scrollable document area, even extending outside
622// of the `<html>` and `<body>` rect bounds if horizontally scrollable
623
624function getDocumentRect(element) {
625  var _element$ownerDocumen;
626
627  var html = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element);
628  var winScroll = (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_1__["default"])(element);
629  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
630  var width = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
631  var height = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
632  var x = -winScroll.scrollLeft + (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_3__["default"])(element);
633  var y = -winScroll.scrollTop;
634
635  if ((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_4__["default"])(body || html).direction === 'rtl') {
636    x += (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.clientWidth, body ? body.clientWidth : 0) - width;
637  }
638
639  return {
640    width: width,
641    height: height,
642    x: x,
643    y: y
644  };
645}
646
647/***/ }),
648
vendor: 766 bytes, lines 649-668
649/***/ "./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js":
650/*!***************************************************************************!*\
651  !*** ./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js ***!
652  \***************************************************************************/
653/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
654
655"use strict";
656__webpack_require__.r(__webpack_exports__);
657/* harmony export */ __webpack_require__.d(__webpack_exports__, {
658/* harmony export */   "default": () => (/* binding */ getHTMLElementScroll)
659/* harmony export */ });
660function getHTMLElementScroll(element) {
661  return {
662    scrollLeft: element.scrollLeft,
663    scrollTop: element.scrollTop
664  };
665}
666
667/***/ }),
668
vendor: 1,550 bytes, lines 669-708
669/***/ "./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js":
670/*!********************************************************************!*\
671  !*** ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js ***!
672  \********************************************************************/
673/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
674
675"use strict";
676__webpack_require__.r(__webpack_exports__);
677/* harmony export */ __webpack_require__.d(__webpack_exports__, {
678/* harmony export */   "default": () => (/* binding */ getLayoutRect)
679/* harmony export */ });
680/* harmony import */ var _getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBoundingClientRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js");
681 // Returns the layout rect of an element relative to its offsetParent. Layout
682// means it doesn't take into account transforms.
683
684function getLayoutRect(element) {
685  var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element); // Use the clientRect sizes if it's not been transformed.
686  // Fixes https://github.com/popperjs/popper-core/issues/1223
687
688  var width = element.offsetWidth;
689  var height = element.offsetHeight;
690
691  if (Math.abs(clientRect.width - width) <= 1) {
692    width = clientRect.width;
693  }
694
695  if (Math.abs(clientRect.height - height) <= 1) {
696    height = clientRect.height;
697  }
698
699  return {
700    x: element.offsetLeft,
701    y: element.offsetTop,
702    width: width,
703    height: height
704  };
705}
706
707/***/ }),
708
vendor: 693 bytes, lines 709-725
709/***/ "./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js":
710/*!******************************************************************!*\
711  !*** ./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js ***!
712  \******************************************************************/
713/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
714
715"use strict";
716__webpack_require__.r(__webpack_exports__);
717/* harmony export */ __webpack_require__.d(__webpack_exports__, {
718/* harmony export */   "default": () => (/* binding */ getNodeName)
719/* harmony export */ });
720function getNodeName(element) {
721  return element ? (element.nodeName || '').toLowerCase() : null;
722}
723
724/***/ }),
725
vendor: 1,724 bytes, lines 726-754
726/***/ "./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js":
727/*!********************************************************************!*\
728  !*** ./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js ***!
729  \********************************************************************/
730/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
731
732"use strict";
733__webpack_require__.r(__webpack_exports__);
734/* harmony export */ __webpack_require__.d(__webpack_exports__, {
735/* harmony export */   "default": () => (/* binding */ getNodeScroll)
736/* harmony export */ });
737/* harmony import */ var _getWindowScroll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getWindowScroll.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js");
738/* harmony import */ var _getWindow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getWindow.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindow.js");
739/* harmony import */ var _instanceOf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
740/* harmony import */ var _getHTMLElementScroll_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getHTMLElementScroll.js */ "./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js");
741
742
743
744
745function getNodeScroll(node) {
746  if (node === (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node) || !(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__.isHTMLElement)(node)) {
747    return (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_2__["default"])(node);
748  } else {
749    return (0,_getHTMLElementScroll_js__WEBPACK_IMPORTED_MODULE_3__["default"])(node);
750  }
751}
752
753/***/ }),
754
vendor: 4,729 bytes, lines 755-842
755/***/ "./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js":
756/*!**********************************************************************!*\
757  !*** ./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js ***!
758  \**********************************************************************/
759/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
760
761"use strict";
762__webpack_require__.r(__webpack_exports__);
763/* harmony export */ __webpack_require__.d(__webpack_exports__, {
764/* harmony export */   "default": () => (/* binding */ getOffsetParent)
765/* harmony export */ });
766/* harmony import */ var _getWindow_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./getWindow.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindow.js");
767/* harmony import */ var _getNodeName_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getNodeName.js */ "./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js");
768/* harmony import */ var _getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getComputedStyle.js */ "./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js");
769/* harmony import */ var _instanceOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
770/* harmony import */ var _isTableElement_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isTableElement.js */ "./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js");
771/* harmony import */ var _getParentNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getParentNode.js */ "./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js");
772
773
774
775
776
777
778
779function getTrueOffsetParent(element) {
780  if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || // https://github.com/popperjs/popper-core/issues/837
781  (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(element).position === 'fixed') {
782    return null;
783  }
784
785  return element.offsetParent;
786} // `.offsetParent` reports `null` for fixed elements, while absolute elements
787// return the containing block
788
789
790function getContainingBlock(element) {
791  var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
792  var isIE = navigator.userAgent.indexOf('Trident') !== -1;
793
794  if (isIE && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element)) {
795    // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
796    var elementCss = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(element);
797
798    if (elementCss.position === 'fixed') {
799      return null;
800    }
801  }
802
803  var currentNode = (0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_2__["default"])(element);
804
805  if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isShadowRoot)(currentNode)) {
806    currentNode = currentNode.host;
807  }
808
809  while ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(currentNode) && ['html', 'body'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__["default"])(currentNode)) < 0) {
810    var css = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that
811    // create a containing block.
812    // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
813
814    if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
815      return currentNode;
816    } else {
817      currentNode = currentNode.parentNode;
818    }
819  }
820
821  return null;
822} // Gets the closest ancestor positioned element. Handles some edge cases,
823// such as table ancestors and cross browser bugs.
824
825
826function getOffsetParent(element) {
827  var window = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_4__["default"])(element);
828  var offsetParent = getTrueOffsetParent(element);
829
830  while (offsetParent && (0,_isTableElement_js__WEBPACK_IMPORTED_MODULE_5__["default"])(offsetParent) && (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(offsetParent).position === 'static') {
831    offsetParent = getTrueOffsetParent(offsetParent);
832  }
833
834  if (offsetParent && ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__["default"])(offsetParent) === 'html' || (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__["default"])(offsetParent) === 'body' && (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(offsetParent).position === 'static')) {
835    return window;
836  }
837
838  return offsetParent || getContainingBlock(element) || window;
839}
840
841/***/ }),
842
vendor: 1,900 bytes, lines 843-878
843/***/ "./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js":
844/*!********************************************************************!*\
845  !*** ./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js ***!
846  \********************************************************************/
847/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
848
849"use strict";
850__webpack_require__.r(__webpack_exports__);
851/* harmony export */ __webpack_require__.d(__webpack_exports__, {
852/* harmony export */   "default": () => (/* binding */ getParentNode)
853/* harmony export */ });
854/* harmony import */ var _getNodeName_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getNodeName.js */ "./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js");
855/* harmony import */ var _getDocumentElement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getDocumentElement.js */ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js");
856/* harmony import */ var _instanceOf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
857
858
859
860function getParentNode(element) {
861  if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element) === 'html') {
862    return element;
863  }
864
865  return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
866    // $FlowFixMe[incompatible-return]
867    // $FlowFixMe[prop-missing]
868    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
869    element.parentNode || ( // DOM Element detected
870    (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__.isShadowRoot)(element) ? element.host : null) || // ShadowRoot detected
871    // $FlowFixMe[incompatible-call]: HTMLElement is a Node
872    (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_2__["default"])(element) // fallback
873
874  );
875}
876
877/***/ }),
878
vendor: 1,878 bytes, lines 879-912
879/***/ "./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js":
880/*!**********************************************************************!*\
881  !*** ./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js ***!
882  \**********************************************************************/
883/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
884
885"use strict";
886__webpack_require__.r(__webpack_exports__);
887/* harmony export */ __webpack_require__.d(__webpack_exports__, {
888/* harmony export */   "default": () => (/* binding */ getScrollParent)
889/* harmony export */ });
890/* harmony import */ var _getParentNode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getParentNode.js */ "./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js");
891/* harmony import */ var _isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isScrollParent.js */ "./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js");
892/* harmony import */ var _getNodeName_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getNodeName.js */ "./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js");
893/* harmony import */ var _instanceOf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
894
895
896
897
898function getScrollParent(node) {
899  if (['html', 'body', '#document'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node)) >= 0) {
900    // $FlowFixMe[incompatible-return]: assume body is always available
901    return node.ownerDocument.body;
902  }
903
904  if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__.isHTMLElement)(node) && (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__["default"])(node)) {
905    return node;
906  }
907
908  return getScrollParent((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_3__["default"])(node));
909}
910
911/***/ }),
912
vendor: 2,757 bytes, lines 913-969
913/***/ "./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js":
914/*!**********************************************************************!*\
915  !*** ./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js ***!
916  \**********************************************************************/
917/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
918
919"use strict";
920__webpack_require__.r(__webpack_exports__);
921/* harmony export */ __webpack_require__.d(__webpack_exports__, {
922/* harmony export */   "default": () => (/* binding */ getViewportRect)
923/* harmony export */ });
924/* harmony import */ var _getWindow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getWindow.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindow.js");
925/* harmony import */ var _getDocumentElement_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getDocumentElement.js */ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js");
926/* harmony import */ var _getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getWindowScrollBarX.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js");
927
928
929
930function getViewportRect(element) {
931  var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element);
932  var html = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_1__["default"])(element);
933  var visualViewport = win.visualViewport;
934  var width = html.clientWidth;
935  var height = html.clientHeight;
936  var x = 0;
937  var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
938  // can be obscured underneath it.
939  // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
940  // if it isn't open, so if this isn't available, the popper will be detected
941  // to overflow the bottom of the screen too early.
942
943  if (visualViewport) {
944    width = visualViewport.width;
945    height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
946    // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
947    // errors due to floating point numbers, so we need to check precision.
948    // Safari returns a number <= 0, usually < -1 when pinch-zoomed
949    // Feature detection fails in mobile emulation mode in Chrome.
950    // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
951    // 0.001
952    // Fallback here: "Not Safari" userAgent
953
954    if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
955      x = visualViewport.offsetLeft;
956      y = visualViewport.offsetTop;
957    }
958  }
959
960  return {
961    width: width,
962    height: height,
963    x: x + (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__["default"])(element),
964    y: y
965  };
966}
967
968/***/ }),
969
vendor: 842 bytes, lines 970-995
970/***/ "./node_modules/@popperjs/core/lib/dom-utils/getWindow.js":
971/*!****************************************************************!*\
972  !*** ./node_modules/@popperjs/core/lib/dom-utils/getWindow.js ***!
973  \****************************************************************/
974/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
975
976"use strict";
977__webpack_require__.r(__webpack_exports__);
978/* harmony export */ __webpack_require__.d(__webpack_exports__, {
979/* harmony export */   "default": () => (/* binding */ getWindow)
980/* harmony export */ });
981function getWindow(node) {
982  if (node == null) {
983    return window;
984  }
985
986  if (node.toString() !== '[object Window]') {
987    var ownerDocument = node.ownerDocument;
988    return ownerDocument ? ownerDocument.defaultView || window : window;
989  }
990
991  return node;
992}
993
994/***/ }),
995
vendor: 1,039 bytes, lines 996-1020
996/***/ "./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js":
997/*!**********************************************************************!*\
998  !*** ./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js ***!
999  \**********************************************************************/
1000/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1001
1002"use strict";
1003__webpack_require__.r(__webpack_exports__);
1004/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1005/* harmony export */   "default": () => (/* binding */ getWindowScroll)
1006/* harmony export */ });
1007/* harmony import */ var _getWindow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getWindow.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindow.js");
1008
1009function getWindowScroll(node) {
1010  var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node);
1011  var scrollLeft = win.pageXOffset;
1012  var scrollTop = win.pageYOffset;
1013  return {
1014    scrollLeft: scrollLeft,
1015    scrollTop: scrollTop
1016  };
1017}
1018
1019/***/ }),
1020
vendor: 1,913 bytes, lines 1021-1050
1021/***/ "./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js":
1022/*!**************************************************************************!*\
1023  !*** ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js ***!
1024  \**************************************************************************/
1025/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1026
1027"use strict";
1028__webpack_require__.r(__webpack_exports__);
1029/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1030/* harmony export */   "default": () => (/* binding */ getWindowScrollBarX)
1031/* harmony export */ });
1032/* harmony import */ var _getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBoundingClientRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js");
1033/* harmony import */ var _getDocumentElement_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getDocumentElement.js */ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js");
1034/* harmony import */ var _getWindowScroll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getWindowScroll.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js");
1035
1036
1037
1038function getWindowScrollBarX(element) {
1039  // If <html> has a CSS width greater than the viewport, then this will be
1040  // incorrect for RTL.
1041  // Popper 1 is broken in this case and never had a bug report so let's assume
1042  // it's not an issue. I don't think anyone ever specifies width on <html>
1043  // anyway.
1044  // Browsers where the left scrollbar doesn't cause an issue report `0` for
1045  // this (e.g. Edge 2019, IE11, Safari)
1046  return (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_1__["default"])(element)).left + (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_2__["default"])(element).scrollLeft;
1047}
1048
1049/***/ }),
1050
vendor: 1,591 bytes, lines 1051-1090
1051/***/ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js":
1052/*!*****************************************************************!*\
1053  !*** ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js ***!
1054  \*****************************************************************/
1055/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1056
1057"use strict";
1058__webpack_require__.r(__webpack_exports__);
1059/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1060/* harmony export */   "isElement": () => (/* binding */ isElement),
1061/* harmony export */   "isHTMLElement": () => (/* binding */ isHTMLElement),
1062/* harmony export */   "isShadowRoot": () => (/* binding */ isShadowRoot)
1063/* harmony export */ });
1064/* harmony import */ var _getWindow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getWindow.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindow.js");
1065
1066
1067function isElement(node) {
1068  var OwnElement = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node).Element;
1069  return node instanceof OwnElement || node instanceof Element;
1070}
1071
1072function isHTMLElement(node) {
1073  var OwnElement = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node).HTMLElement;
1074  return node instanceof OwnElement || node instanceof HTMLElement;
1075}
1076
1077function isShadowRoot(node) {
1078  // IE 11 has no ShadowRoot
1079  if (typeof ShadowRoot === 'undefined') {
1080    return false;
1081  }
1082
1083  var OwnElement = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node).ShadowRoot;
1084  return node instanceof OwnElement || node instanceof ShadowRoot;
1085}
1086
1087
1088
1089/***/ }),
1090
vendor: 1,223 bytes, lines 1091-1115
1091/***/ "./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js":
1092/*!*********************************************************************!*\
1093  !*** ./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js ***!
1094  \*********************************************************************/
1095/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1096
1097"use strict";
1098__webpack_require__.r(__webpack_exports__);
1099/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1100/* harmony export */   "default": () => (/* binding */ isScrollParent)
1101/* harmony export */ });
1102/* harmony import */ var _getComputedStyle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getComputedStyle.js */ "./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js");
1103
1104function isScrollParent(element) {
1105  // Firefox wants us to check `-x` and `-y` variations as well
1106  var _getComputedStyle = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element),
1107      overflow = _getComputedStyle.overflow,
1108      overflowX = _getComputedStyle.overflowX,
1109      overflowY = _getComputedStyle.overflowY;
1110
1111  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
1112}
1113
1114/***/ }),
1115
vendor: 940 bytes, lines 1116-1134
1116/***/ "./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js":
1117/*!*********************************************************************!*\
1118  !*** ./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js ***!
1119  \*********************************************************************/
1120/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1121
1122"use strict";
1123__webpack_require__.r(__webpack_exports__);
1124/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1125/* harmony export */   "default": () => (/* binding */ isTableElement)
1126/* harmony export */ });
1127/* harmony import */ var _getNodeName_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getNodeName.js */ "./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js");
1128
1129function isTableElement(element) {
1130  return ['table', 'td', 'th'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element)) >= 0;
1131}
1132
1133/***/ }),
1134
vendor: 2,529 bytes, lines 1135-1178
1135/***/ "./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js":
1136/*!************************************************************************!*\
1137  !*** ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js ***!
1138  \************************************************************************/
1139/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1140
1141"use strict";
1142__webpack_require__.r(__webpack_exports__);
1143/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1144/* harmony export */   "default": () => (/* binding */ listScrollParents)
1145/* harmony export */ });
1146/* harmony import */ var _getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getScrollParent.js */ "./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js");
1147/* harmony import */ var _getParentNode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getParentNode.js */ "./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js");
1148/* harmony import */ var _getWindow_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getWindow.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindow.js");
1149/* harmony import */ var _isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isScrollParent.js */ "./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js");
1150
1151
1152
1153
1154/*
1155given a DOM element, return the list of all scroll parents, up the list of ancesors
1156until we get to the top window object. This list is what we attach scroll listeners
1157to, because if any of these parent elements scroll, we'll need to re-calculate the
1158reference element's position.
1159*/
1160
1161function listScrollParents(element, list) {
1162  var _element$ownerDocumen;
1163
1164  if (list === void 0) {
1165    list = [];
1166  }
1167
1168  var scrollParent = (0,_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element);
1169  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
1170  var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scrollParent);
1171  var target = isBody ? [win].concat(win.visualViewport || [], (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__["default"])(scrollParent) ? scrollParent : []) : scrollParent;
1172  var updatedList = list.concat(target);
1173  return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1174  updatedList.concat(listScrollParents((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_3__["default"])(target)));
1175}
1176
1177/***/ }),
1178
vendor: 3,246 bytes, lines 1179-1246
1179/***/ "./node_modules/@popperjs/core/lib/enums.js":
1180/*!**************************************************!*\
1181  !*** ./node_modules/@popperjs/core/lib/enums.js ***!
1182  \**************************************************/
1183/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1184
1185"use strict";
1186__webpack_require__.r(__webpack_exports__);
1187/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1188/* harmony export */   "afterMain": () => (/* binding */ afterMain),
1189/* harmony export */   "afterRead": () => (/* binding */ afterRead),
1190/* harmony export */   "afterWrite": () => (/* binding */ afterWrite),
1191/* harmony export */   "auto": () => (/* binding */ auto),
1192/* harmony export */   "basePlacements": () => (/* binding */ basePlacements),
1193/* harmony export */   "beforeMain": () => (/* binding */ beforeMain),
1194/* harmony export */   "beforeRead": () => (/* binding */ beforeRead),
1195/* harmony export */   "beforeWrite": () => (/* binding */ beforeWrite),
1196/* harmony export */   "bottom": () => (/* binding */ bottom),
1197/* harmony export */   "clippingParents": () => (/* binding */ clippingParents),
1198/* harmony export */   "end": () => (/* binding */ end),
1199/* harmony export */   "left": () => (/* binding */ left),
1200/* harmony export */   "main": () => (/* binding */ main),
1201/* harmony export */   "modifierPhases": () => (/* binding */ modifierPhases),
1202/* harmony export */   "placements": () => (/* binding */ placements),
1203/* harmony export */   "popper": () => (/* binding */ popper),
1204/* harmony export */   "read": () => (/* binding */ read),
1205/* harmony export */   "reference": () => (/* binding */ reference),
1206/* harmony export */   "right": () => (/* binding */ right),
1207/* harmony export */   "start": () => (/* binding */ start),
1208/* harmony export */   "top": () => (/* binding */ top),
1209/* harmony export */   "variationPlacements": () => (/* binding */ variationPlacements),
1210/* harmony export */   "viewport": () => (/* binding */ viewport),
1211/* harmony export */   "write": () => (/* binding */ write)
1212/* harmony export */ });
1213var top = 'top';
1214var bottom = 'bottom';
1215var right = 'right';
1216var left = 'left';
1217var auto = 'auto';
1218var basePlacements = [top, bottom, right, left];
1219var start = 'start';
1220var end = 'end';
1221var clippingParents = 'clippingParents';
1222var viewport = 'viewport';
1223var popper = 'popper';
1224var reference = 'reference';
1225var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
1226  return acc.concat([placement + "-" + start, placement + "-" + end]);
1227}, []);
1228var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
1229  return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
1230}, []); // modifiers that need to read the DOM
1231
1232var beforeRead = 'beforeRead';
1233var read = 'read';
1234var afterRead = 'afterRead'; // pure-logic modifiers
1235
1236var beforeMain = 'beforeMain';
1237var main = 'main';
1238var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
1239
1240var beforeWrite = 'beforeWrite';
1241var write = 'write';
1242var afterWrite = 'afterWrite';
1243var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
1244
1245/***/ }),
1246
vendor: 6,098 bytes, lines 1247-1311
1247/***/ "./node_modules/@popperjs/core/lib/index.js":
1248/*!**************************************************!*\
1249  !*** ./node_modules/@popperjs/core/lib/index.js ***!
1250  \**************************************************/
1251/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1252
1253"use strict";
1254__webpack_require__.r(__webpack_exports__);
1255/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1256/* harmony export */   "afterMain": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.afterMain),
1257/* harmony export */   "afterRead": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.afterRead),
1258/* harmony export */   "afterWrite": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.afterWrite),
1259/* harmony export */   "applyStyles": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_1__.applyStyles),
1260/* harmony export */   "arrow": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_1__.arrow),
1261/* harmony export */   "auto": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.auto),
1262/* harmony export */   "basePlacements": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.basePlacements),
1263/* harmony export */   "beforeMain": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.beforeMain),
1264/* harmony export */   "beforeRead": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.beforeRead),
1265/* harmony export */   "beforeWrite": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.beforeWrite),
1266/* harmony export */   "bottom": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.bottom),
1267/* harmony export */   "clippingParents": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.clippingParents),
1268/* harmony export */   "computeStyles": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_1__.computeStyles),
1269/* harmony export */   "createPopper": () => (/* reexport safe */ _popper_js__WEBPACK_IMPORTED_MODULE_4__.createPopper),
1270/* harmony export */   "createPopperBase": () => (/* reexport safe */ _createPopper_js__WEBPACK_IMPORTED_MODULE_2__.createPopper),
1271/* harmony export */   "createPopperLite": () => (/* reexport safe */ _popper_lite_js__WEBPACK_IMPORTED_MODULE_5__.createPopper),
1272/* harmony export */   "detectOverflow": () => (/* reexport safe */ _createPopper_js__WEBPACK_IMPORTED_MODULE_3__["default"]),
1273/* harmony export */   "end": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.end),
1274/* harmony export */   "eventListeners": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_1__.eventListeners),
1275/* harmony export */   "flip": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_1__.flip),
1276/* harmony export */   "hide": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_1__.hide),
1277/* harmony export */   "left": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.left),
1278/* harmony export */   "main": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.main),
1279/* harmony export */   "modifierPhases": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.modifierPhases),
1280/* harmony export */   "offset": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_1__.offset),
1281/* harmony export */   "placements": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.placements),
1282/* harmony export */   "popper": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.popper),
1283/* harmony export */   "popperGenerator": () => (/* reexport safe */ _createPopper_js__WEBPACK_IMPORTED_MODULE_2__.popperGenerator),
1284/* harmony export */   "popperOffsets": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_1__.popperOffsets),
1285/* harmony export */   "preventOverflow": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_1__.preventOverflow),
1286/* harmony export */   "read": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.read),
1287/* harmony export */   "reference": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.reference),
1288/* harmony export */   "right": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.right),
1289/* harmony export */   "start": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.start),
1290/* harmony export */   "top": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.top),
1291/* harmony export */   "variationPlacements": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.variationPlacements),
1292/* harmony export */   "viewport": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.viewport),
1293/* harmony export */   "write": () => (/* reexport safe */ _enums_js__WEBPACK_IMPORTED_MODULE_0__.write)
1294/* harmony export */ });
1295/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
1296/* harmony import */ var _modifiers_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modifiers/index.js */ "./node_modules/@popperjs/core/lib/modifiers/index.js");
1297/* harmony import */ var _createPopper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createPopper.js */ "./node_modules/@popperjs/core/lib/createPopper.js");
1298/* harmony import */ var _createPopper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createPopper.js */ "./node_modules/@popperjs/core/lib/utils/detectOverflow.js");
1299/* harmony import */ var _popper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./popper.js */ "./node_modules/@popperjs/core/lib/popper.js");
1300/* harmony import */ var _popper_lite_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./popper-lite.js */ "./node_modules/@popperjs/core/lib/popper-lite.js");
1301
1302 // eslint-disable-next-line import/no-unused-modules
1303
1304 // eslint-disable-next-line import/no-unused-modules
1305
1306 // eslint-disable-next-line import/no-unused-modules
1307
1308
1309
1310/***/ }),
1311
vendor: 3,689 bytes, lines 1312-1411
1312/***/ "./node_modules/@popperjs/core/lib/modifiers/applyStyles.js":
1313/*!******************************************************************!*\
1314  !*** ./node_modules/@popperjs/core/lib/modifiers/applyStyles.js ***!
1315  \******************************************************************/
1316/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1317
1318"use strict";
1319__webpack_require__.r(__webpack_exports__);
1320/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1321/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1322/* harmony export */ });
1323/* harmony import */ var _dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dom-utils/getNodeName.js */ "./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js");
1324/* harmony import */ var _dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dom-utils/instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
1325
1326 // This modifier takes the styles prepared by the `computeStyles` modifier
1327// and applies them to the HTMLElements such as popper and arrow
1328
1329function applyStyles(_ref) {
1330  var state = _ref.state;
1331  Object.keys(state.elements).forEach(function (name) {
1332    var style = state.styles[name] || {};
1333    var attributes = state.attributes[name] || {};
1334    var element = state.elements[name]; // arrow is optional + virtual elements
1335
1336    if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__["default"])(element)) {
1337      return;
1338    } // Flow doesn't support to extend this property, but it's the most
1339    // effective way to apply styles to an HTMLElement
1340    // $FlowFixMe[cannot-write]
1341
1342
1343    Object.assign(element.style, style);
1344    Object.keys(attributes).forEach(function (name) {
1345      var value = attributes[name];
1346
1347      if (value === false) {
1348        element.removeAttribute(name);
1349      } else {
1350        element.setAttribute(name, value === true ? '' : value);
1351      }
1352    });
1353  });
1354}
1355
1356function effect(_ref2) {
1357  var state = _ref2.state;
1358  var initialStyles = {
1359    popper: {
1360      position: state.options.strategy,
1361      left: '0',
1362      top: '0',
1363      margin: '0'
1364    },
1365    arrow: {
1366      position: 'absolute'
1367    },
1368    reference: {}
1369  };
1370  Object.assign(state.elements.popper.style, initialStyles.popper);
1371  state.styles = initialStyles;
1372
1373  if (state.elements.arrow) {
1374    Object.assign(state.elements.arrow.style, initialStyles.arrow);
1375  }
1376
1377  return function () {
1378    Object.keys(state.elements).forEach(function (name) {
1379      var element = state.elements[name];
1380      var attributes = state.attributes[name] || {};
1381      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
1382
1383      var style = styleProperties.reduce(function (style, property) {
1384        style[property] = '';
1385        return style;
1386      }, {}); // arrow is optional + virtual elements
1387
1388      if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__["default"])(element)) {
1389        return;
1390      }
1391
1392      Object.assign(element.style, style);
1393      Object.keys(attributes).forEach(function (attribute) {
1394        element.removeAttribute(attribute);
1395      });
1396    });
1397  };
1398} // eslint-disable-next-line import/no-unused-modules
1399
1400
1401/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1402  name: 'applyStyles',
1403  enabled: true,
1404  phase: 'write',
1405  fn: applyStyles,
1406  effect: effect,
1407  requires: ['computeStyles']
1408});
1409
1410/***/ }),
1411
vendor: 6,639 bytes, lines 1412-1536
1412/***/ "./node_modules/@popperjs/core/lib/modifiers/arrow.js":
1413/*!************************************************************!*\
1414  !*** ./node_modules/@popperjs/core/lib/modifiers/arrow.js ***!
1415  \************************************************************/
1416/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1417
1418"use strict";
1419__webpack_require__.r(__webpack_exports__);
1420/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1421/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1422/* harmony export */ });
1423/* harmony import */ var _utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/getBasePlacement.js */ "./node_modules/@popperjs/core/lib/utils/getBasePlacement.js");
1424/* harmony import */ var _dom_utils_getLayoutRect_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../dom-utils/getLayoutRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js");
1425/* harmony import */ var _dom_utils_contains_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../dom-utils/contains.js */ "./node_modules/@popperjs/core/lib/dom-utils/contains.js");
1426/* harmony import */ var _dom_utils_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../dom-utils/getOffsetParent.js */ "./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js");
1427/* harmony import */ var _utils_getMainAxisFromPlacement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/getMainAxisFromPlacement.js */ "./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js");
1428/* harmony import */ var _utils_within_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/within.js */ "./node_modules/@popperjs/core/lib/utils/within.js");
1429/* harmony import */ var _utils_mergePaddingObject_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/mergePaddingObject.js */ "./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js");
1430/* harmony import */ var _utils_expandToHashMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/expandToHashMap.js */ "./node_modules/@popperjs/core/lib/utils/expandToHashMap.js");
1431/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
1432/* harmony import */ var _dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../dom-utils/instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442 // eslint-disable-next-line import/no-unused-modules
1443
1444var toPaddingObject = function toPaddingObject(padding, state) {
1445  padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
1446    placement: state.placement
1447  })) : padding;
1448  return (0,_utils_mergePaddingObject_js__WEBPACK_IMPORTED_MODULE_0__["default"])(typeof padding !== 'number' ? padding : (0,_utils_expandToHashMap_js__WEBPACK_IMPORTED_MODULE_1__["default"])(padding, _enums_js__WEBPACK_IMPORTED_MODULE_2__.basePlacements));
1449};
1450
1451function arrow(_ref) {
1452  var _state$modifiersData$;
1453
1454  var state = _ref.state,
1455      name = _ref.name,
1456      options = _ref.options;
1457  var arrowElement = state.elements.arrow;
1458  var popperOffsets = state.modifiersData.popperOffsets;
1459  var basePlacement = (0,_utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_3__["default"])(state.placement);
1460  var axis = (0,_utils_getMainAxisFromPlacement_js__WEBPACK_IMPORTED_MODULE_4__["default"])(basePlacement);
1461  var isVertical = [_enums_js__WEBPACK_IMPORTED_MODULE_2__.left, _enums_js__WEBPACK_IMPORTED_MODULE_2__.right].indexOf(basePlacement) >= 0;
1462  var len = isVertical ? 'height' : 'width';
1463
1464  if (!arrowElement || !popperOffsets) {
1465    return;
1466  }
1467
1468  var paddingObject = toPaddingObject(options.padding, state);
1469  var arrowRect = (0,_dom_utils_getLayoutRect_js__WEBPACK_IMPORTED_MODULE_5__["default"])(arrowElement);
1470  var minProp = axis === 'y' ? _enums_js__WEBPACK_IMPORTED_MODULE_2__.top : _enums_js__WEBPACK_IMPORTED_MODULE_2__.left;
1471  var maxProp = axis === 'y' ? _enums_js__WEBPACK_IMPORTED_MODULE_2__.bottom : _enums_js__WEBPACK_IMPORTED_MODULE_2__.right;
1472  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
1473  var startDiff = popperOffsets[axis] - state.rects.reference[axis];
1474  var arrowOffsetParent = (0,_dom_utils_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_6__["default"])(arrowElement);
1475  var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
1476  var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
1477  // outside of the popper bounds
1478
1479  var min = paddingObject[minProp];
1480  var max = clientSize - arrowRect[len] - paddingObject[maxProp];
1481  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
1482  var offset = (0,_utils_within_js__WEBPACK_IMPORTED_MODULE_7__.within)(min, center, max); // Prevents breaking syntax highlighting...
1483
1484  var axisProp = axis;
1485  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
1486}
1487
1488function effect(_ref2) {
1489  var state = _ref2.state,
1490      options = _ref2.options;
1491  var _options$element = options.element,
1492      arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
1493
1494  if (arrowElement == null) {
1495    return;
1496  } // CSS selector
1497
1498
1499  if (typeof arrowElement === 'string') {
1500    arrowElement = state.elements.popper.querySelector(arrowElement);
1501
1502    if (!arrowElement) {
1503      return;
1504    }
1505  }
1506
1507  if (true) {
1508    if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_8__.isHTMLElement)(arrowElement)) {
1509      console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));
1510    }
1511  }
1512
1513  if (!(0,_dom_utils_contains_js__WEBPACK_IMPORTED_MODULE_9__["default"])(state.elements.popper, arrowElement)) {
1514    if (true) {
1515      console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', 'element.'].join(' '));
1516    }
1517
1518    return;
1519  }
1520
1521  state.elements.arrow = arrowElement;
1522} // eslint-disable-next-line import/no-unused-modules
1523
1524
1525/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1526  name: 'arrow',
1527  enabled: true,
1528  phase: 'main',
1529  fn: arrow,
1530  effect: effect,
1531  requires: ['popperOffsets'],
1532  requiresIfExists: ['preventOverflow']
1533});
1534
1535/***/ }),
1536
vendor: 9,345 bytes, lines 1537-1740
1537/***/ "./node_modules/@popperjs/core/lib/modifiers/computeStyles.js":
1538/*!********************************************************************!*\
1539  !*** ./node_modules/@popperjs/core/lib/modifiers/computeStyles.js ***!
1540  \********************************************************************/
1541/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1542
1543"use strict";
1544__webpack_require__.r(__webpack_exports__);
1545/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1546/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__),
1547/* harmony export */   "mapToStyles": () => (/* binding */ mapToStyles)
1548/* harmony export */ });
1549/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
1550/* harmony import */ var _dom_utils_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dom-utils/getOffsetParent.js */ "./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js");
1551/* harmony import */ var _dom_utils_getWindow_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dom-utils/getWindow.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindow.js");
1552/* harmony import */ var _dom_utils_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../dom-utils/getDocumentElement.js */ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js");
1553/* harmony import */ var _dom_utils_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../dom-utils/getComputedStyle.js */ "./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js");
1554/* harmony import */ var _utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/getBasePlacement.js */ "./node_modules/@popperjs/core/lib/utils/getBasePlacement.js");
1555/* harmony import */ var _utils_getVariation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/getVariation.js */ "./node_modules/@popperjs/core/lib/utils/getVariation.js");
1556/* harmony import */ var _utils_math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/math.js */ "./node_modules/@popperjs/core/lib/utils/math.js");
1557
1558
1559
1560
1561
1562
1563
1564 // eslint-disable-next-line import/no-unused-modules
1565
1566var unsetSides = {
1567  top: 'auto',
1568  right: 'auto',
1569  bottom: 'auto',
1570  left: 'auto'
1571}; // Round the offsets to the nearest suitable subpixel based on the DPR.
1572// Zooming can change the DPR, but it seems to report a value that will
1573// cleanly divide the values into the appropriate subpixels.
1574
1575function roundOffsetsByDPR(_ref) {
1576  var x = _ref.x,
1577      y = _ref.y;
1578  var win = window;
1579  var dpr = win.devicePixelRatio || 1;
1580  return {
1581    x: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(x * dpr) / dpr || 0,
1582    y: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(y * dpr) / dpr || 0
1583  };
1584}
1585
1586function mapToStyles(_ref2) {
1587  var _Object$assign2;
1588
1589  var popper = _ref2.popper,
1590      popperRect = _ref2.popperRect,
1591      placement = _ref2.placement,
1592      variation = _ref2.variation,
1593      offsets = _ref2.offsets,
1594      position = _ref2.position,
1595      gpuAcceleration = _ref2.gpuAcceleration,
1596      adaptive = _ref2.adaptive,
1597      roundOffsets = _ref2.roundOffsets,
1598      isFixed = _ref2.isFixed;
1599  var _offsets$x = offsets.x,
1600      x = _offsets$x === void 0 ? 0 : _offsets$x,
1601      _offsets$y = offsets.y,
1602      y = _offsets$y === void 0 ? 0 : _offsets$y;
1603
1604  var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
1605    x: x,
1606    y: y
1607  }) : {
1608    x: x,
1609    y: y
1610  };
1611
1612  x = _ref3.x;
1613  y = _ref3.y;
1614  var hasX = offsets.hasOwnProperty('x');
1615  var hasY = offsets.hasOwnProperty('y');
1616  var sideX = _enums_js__WEBPACK_IMPORTED_MODULE_1__.left;
1617  var sideY = _enums_js__WEBPACK_IMPORTED_MODULE_1__.top;
1618  var win = window;
1619
1620  if (adaptive) {
1621    var offsetParent = (0,_dom_utils_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_2__["default"])(popper);
1622    var heightProp = 'clientHeight';
1623    var widthProp = 'clientWidth';
1624
1625    if (offsetParent === (0,_dom_utils_getWindow_js__WEBPACK_IMPORTED_MODULE_3__["default"])(popper)) {
1626      offsetParent = (0,_dom_utils_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_4__["default"])(popper);
1627
1628      if ((0,_dom_utils_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_5__["default"])(offsetParent).position !== 'static' && position === 'absolute') {
1629        heightProp = 'scrollHeight';
1630        widthProp = 'scrollWidth';
1631      }
1632    } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
1633
1634
1635    offsetParent = offsetParent;
1636
1637    if (placement === _enums_js__WEBPACK_IMPORTED_MODULE_1__.top || (placement === _enums_js__WEBPACK_IMPORTED_MODULE_1__.left || placement === _enums_js__WEBPACK_IMPORTED_MODULE_1__.right) && variation === _enums_js__WEBPACK_IMPORTED_MODULE_1__.end) {
1638      sideY = _enums_js__WEBPACK_IMPORTED_MODULE_1__.bottom;
1639      var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
1640      offsetParent[heightProp];
1641      y -= offsetY - popperRect.height;
1642      y *= gpuAcceleration ? 1 : -1;
1643    }
1644
1645    if (placement === _enums_js__WEBPACK_IMPORTED_MODULE_1__.left || (placement === _enums_js__WEBPACK_IMPORTED_MODULE_1__.top || placement === _enums_js__WEBPACK_IMPORTED_MODULE_1__.bottom) && variation === _enums_js__WEBPACK_IMPORTED_MODULE_1__.end) {
1646      sideX = _enums_js__WEBPACK_IMPORTED_MODULE_1__.right;
1647      var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
1648      offsetParent[widthProp];
1649      x -= offsetX - popperRect.width;
1650      x *= gpuAcceleration ? 1 : -1;
1651    }
1652  }
1653
1654  var commonStyles = Object.assign({
1655    position: position
1656  }, adaptive && unsetSides);
1657
1658  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
1659    x: x,
1660    y: y
1661  }) : {
1662    x: x,
1663    y: y
1664  };
1665
1666  x = _ref4.x;
1667  y = _ref4.y;
1668
1669  if (gpuAcceleration) {
1670    var _Object$assign;
1671
1672    return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
1673  }
1674
1675  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
1676}
1677
1678function computeStyles(_ref5) {
1679  var state = _ref5.state,
1680      options = _ref5.options;
1681  var _options$gpuAccelerat = options.gpuAcceleration,
1682      gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
1683      _options$adaptive = options.adaptive,
1684      adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
1685      _options$roundOffsets = options.roundOffsets,
1686      roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
1687
1688  if (true) {
1689    var transitionProperty = (0,_dom_utils_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_5__["default"])(state.elements.popper).transitionProperty || '';
1690
1691    if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {
1692      return transitionProperty.indexOf(property) >= 0;
1693    })) {
1694      console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: "transform", "top", "right", "bottom", "left".', '\n\n', 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\n\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));
1695    }
1696  }
1697
1698  var commonStyles = {
1699    placement: (0,_utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_6__["default"])(state.placement),
1700    variation: (0,_utils_getVariation_js__WEBPACK_IMPORTED_MODULE_7__["default"])(state.placement),
1701    popper: state.elements.popper,
1702    popperRect: state.rects.popper,
1703    gpuAcceleration: gpuAcceleration,
1704    isFixed: state.options.strategy === 'fixed'
1705  };
1706
1707  if (state.modifiersData.popperOffsets != null) {
1708    state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
1709      offsets: state.modifiersData.popperOffsets,
1710      position: state.options.strategy,
1711      adaptive: adaptive,
1712      roundOffsets: roundOffsets
1713    })));
1714  }
1715
1716  if (state.modifiersData.arrow != null) {
1717    state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
1718      offsets: state.modifiersData.arrow,
1719      position: 'absolute',
1720      adaptive: false,
1721      roundOffsets: roundOffsets
1722    })));
1723  }
1724
1725  state.attributes.popper = Object.assign({}, state.attributes.popper, {
1726    'data-popper-placement': state.placement
1727  });
1728} // eslint-disable-next-line import/no-unused-modules
1729
1730
1731/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1732  name: 'computeStyles',
1733  enabled: true,
1734  phase: 'beforeWrite',
1735  fn: computeStyles,
1736  data: {}
1737});
1738
1739/***/ }),
1740
vendor: 2,190 bytes, lines 1741-1804
1741/***/ "./node_modules/@popperjs/core/lib/modifiers/eventListeners.js":
1742/*!*********************************************************************!*\
1743  !*** ./node_modules/@popperjs/core/lib/modifiers/eventListeners.js ***!
1744  \*********************************************************************/
1745/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1746
1747"use strict";
1748__webpack_require__.r(__webpack_exports__);
1749/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1750/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1751/* harmony export */ });
1752/* harmony import */ var _dom_utils_getWindow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dom-utils/getWindow.js */ "./node_modules/@popperjs/core/lib/dom-utils/getWindow.js");
1753 // eslint-disable-next-line import/no-unused-modules
1754
1755var passive = {
1756  passive: true
1757};
1758
1759function effect(_ref) {
1760  var state = _ref.state,
1761      instance = _ref.instance,
1762      options = _ref.options;
1763  var _options$scroll = options.scroll,
1764      scroll = _options$scroll === void 0 ? true : _options$scroll,
1765      _options$resize = options.resize,
1766      resize = _options$resize === void 0 ? true : _options$resize;
1767  var window = (0,_dom_utils_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(state.elements.popper);
1768  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
1769
1770  if (scroll) {
1771    scrollParents.forEach(function (scrollParent) {
1772      scrollParent.addEventListener('scroll', instance.update, passive);
1773    });
1774  }
1775
1776  if (resize) {
1777    window.addEventListener('resize', instance.update, passive);
1778  }
1779
1780  return function () {
1781    if (scroll) {
1782      scrollParents.forEach(function (scrollParent) {
1783        scrollParent.removeEventListener('scroll', instance.update, passive);
1784      });
1785    }
1786
1787    if (resize) {
1788      window.removeEventListener('resize', instance.update, passive);
1789    }
1790  };
1791} // eslint-disable-next-line import/no-unused-modules
1792
1793
1794/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1795  name: 'eventListeners',
1796  enabled: true,
1797  phase: 'write',
1798  fn: function fn() {},
1799  effect: effect,
1800  data: {}
1801});
1802
1803/***/ }),
1804
vendor: 7,538 bytes, lines 1805-1972
1805/***/ "./node_modules/@popperjs/core/lib/modifiers/flip.js":
1806/*!***********************************************************!*\
1807  !*** ./node_modules/@popperjs/core/lib/modifiers/flip.js ***!
1808  \***********************************************************/
1809/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1810
1811"use strict";
1812__webpack_require__.r(__webpack_exports__);
1813/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1814/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1815/* harmony export */ });
1816/* harmony import */ var _utils_getOppositePlacement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/getOppositePlacement.js */ "./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js");
1817/* harmony import */ var _utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/getBasePlacement.js */ "./node_modules/@popperjs/core/lib/utils/getBasePlacement.js");
1818/* harmony import */ var _utils_getOppositeVariationPlacement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/getOppositeVariationPlacement.js */ "./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js");
1819/* harmony import */ var _utils_detectOverflow_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/detectOverflow.js */ "./node_modules/@popperjs/core/lib/utils/detectOverflow.js");
1820/* harmony import */ var _utils_computeAutoPlacement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/computeAutoPlacement.js */ "./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js");
1821/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
1822/* harmony import */ var _utils_getVariation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/getVariation.js */ "./node_modules/@popperjs/core/lib/utils/getVariation.js");
1823
1824
1825
1826
1827
1828
1829 // eslint-disable-next-line import/no-unused-modules
1830
1831function getExpandedFallbackPlacements(placement) {
1832  if ((0,_utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_0__["default"])(placement) === _enums_js__WEBPACK_IMPORTED_MODULE_1__.auto) {
1833    return [];
1834  }
1835
1836  var oppositePlacement = (0,_utils_getOppositePlacement_js__WEBPACK_IMPORTED_MODULE_2__["default"])(placement);
1837  return [(0,_utils_getOppositeVariationPlacement_js__WEBPACK_IMPORTED_MODULE_3__["default"])(placement), oppositePlacement, (0,_utils_getOppositeVariationPlacement_js__WEBPACK_IMPORTED_MODULE_3__["default"])(oppositePlacement)];
1838}
1839
1840function flip(_ref) {
1841  var state = _ref.state,
1842      options = _ref.options,
1843      name = _ref.name;
1844
1845  if (state.modifiersData[name]._skip) {
1846    return;
1847  }
1848
1849  var _options$mainAxis = options.mainAxis,
1850      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
1851      _options$altAxis = options.altAxis,
1852      checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
1853      specifiedFallbackPlacements = options.fallbackPlacements,
1854      padding = options.padding,
1855      boundary = options.boundary,
1856      rootBoundary = options.rootBoundary,
1857      altBoundary = options.altBoundary,
1858      _options$flipVariatio = options.flipVariations,
1859      flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
1860      allowedAutoPlacements = options.allowedAutoPlacements;
1861  var preferredPlacement = state.options.placement;
1862  var basePlacement = (0,_utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_0__["default"])(preferredPlacement);
1863  var isBasePlacement = basePlacement === preferredPlacement;
1864  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [(0,_utils_getOppositePlacement_js__WEBPACK_IMPORTED_MODULE_2__["default"])(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
1865  var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
1866    return acc.concat((0,_utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_0__["default"])(placement) === _enums_js__WEBPACK_IMPORTED_MODULE_1__.auto ? (0,_utils_computeAutoPlacement_js__WEBPACK_IMPORTED_MODULE_4__["default"])(state, {
1867      placement: placement,
1868      boundary: boundary,
1869      rootBoundary: rootBoundary,
1870      padding: padding,
1871      flipVariations: flipVariations,
1872      allowedAutoPlacements: allowedAutoPlacements
1873    }) : placement);
1874  }, []);
1875  var referenceRect = state.rects.reference;
1876  var popperRect = state.rects.popper;
1877  var checksMap = new Map();
1878  var makeFallbackChecks = true;
1879  var firstFittingPlacement = placements[0];
1880
1881  for (var i = 0; i < placements.length; i++) {
1882    var placement = placements[i];
1883
1884    var _basePlacement = (0,_utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_0__["default"])(placement);
1885
1886    var isStartVariation = (0,_utils_getVariation_js__WEBPACK_IMPORTED_MODULE_5__["default"])(placement) === _enums_js__WEBPACK_IMPORTED_MODULE_1__.start;
1887    var isVertical = [_enums_js__WEBPACK_IMPORTED_MODULE_1__.top, _enums_js__WEBPACK_IMPORTED_MODULE_1__.bottom].indexOf(_basePlacement) >= 0;
1888    var len = isVertical ? 'width' : 'height';
1889    var overflow = (0,_utils_detectOverflow_js__WEBPACK_IMPORTED_MODULE_6__["default"])(state, {
1890      placement: placement,
1891      boundary: boundary,
1892      rootBoundary: rootBoundary,
1893      altBoundary: altBoundary,
1894      padding: padding
1895    });
1896    var mainVariationSide = isVertical ? isStartVariation ? _enums_js__WEBPACK_IMPORTED_MODULE_1__.right : _enums_js__WEBPACK_IMPORTED_MODULE_1__.left : isStartVariation ? _enums_js__WEBPACK_IMPORTED_MODULE_1__.bottom : _enums_js__WEBPACK_IMPORTED_MODULE_1__.top;
1897
1898    if (referenceRect[len] > popperRect[len]) {
1899      mainVariationSide = (0,_utils_getOppositePlacement_js__WEBPACK_IMPORTED_MODULE_2__["default"])(mainVariationSide);
1900    }
1901
1902    var altVariationSide = (0,_utils_getOppositePlacement_js__WEBPACK_IMPORTED_MODULE_2__["default"])(mainVariationSide);
1903    var checks = [];
1904
1905    if (checkMainAxis) {
1906      checks.push(overflow[_basePlacement] <= 0);
1907    }
1908
1909    if (checkAltAxis) {
1910      checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
1911    }
1912
1913    if (checks.every(function (check) {
1914      return check;
1915    })) {
1916      firstFittingPlacement = placement;
1917      makeFallbackChecks = false;
1918      break;
1919    }
1920
1921    checksMap.set(placement, checks);
1922  }
1923
1924  if (makeFallbackChecks) {
1925    // `2` may be desired in some cases – research later
1926    var numberOfChecks = flipVariations ? 3 : 1;
1927
1928    var _loop = function _loop(_i) {
1929      var fittingPlacement = placements.find(function (placement) {
1930        var checks = checksMap.get(placement);
1931
1932        if (checks) {
1933          return checks.slice(0, _i).every(function (check) {
1934            return check;
1935          });
1936        }
1937      });
1938
1939      if (fittingPlacement) {
1940        firstFittingPlacement = fittingPlacement;
1941        return "break";
1942      }
1943    };
1944
1945    for (var _i = numberOfChecks; _i > 0; _i--) {
1946      var _ret = _loop(_i);
1947
1948      if (_ret === "break") break;
1949    }
1950  }
1951
1952  if (state.placement !== firstFittingPlacement) {
1953    state.modifiersData[name]._skip = true;
1954    state.placement = firstFittingPlacement;
1955    state.reset = true;
1956  }
1957} // eslint-disable-next-line import/no-unused-modules
1958
1959
1960/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1961  name: 'flip',
1962  enabled: true,
1963  phase: 'main',
1964  fn: flip,
1965  requiresIfExists: ['offset'],
1966  data: {
1967    _skip: false
1968  }
1969});
1970
1971/***/ }),
1972
vendor: 3,074 bytes, lines 1973-2049
1973/***/ "./node_modules/@popperjs/core/lib/modifiers/hide.js":
1974/*!***********************************************************!*\
1975  !*** ./node_modules/@popperjs/core/lib/modifiers/hide.js ***!
1976  \***********************************************************/
1977/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1978
1979"use strict";
1980__webpack_require__.r(__webpack_exports__);
1981/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1982/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1983/* harmony export */ });
1984/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
1985/* harmony import */ var _utils_detectOverflow_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/detectOverflow.js */ "./node_modules/@popperjs/core/lib/utils/detectOverflow.js");
1986
1987
1988
1989function getSideOffsets(overflow, rect, preventedOffsets) {
1990  if (preventedOffsets === void 0) {
1991    preventedOffsets = {
1992      x: 0,
1993      y: 0
1994    };
1995  }
1996
1997  return {
1998    top: overflow.top - rect.height - preventedOffsets.y,
1999    right: overflow.right - rect.width + preventedOffsets.x,
2000    bottom: overflow.bottom - rect.height + preventedOffsets.y,
2001    left: overflow.left - rect.width - preventedOffsets.x
2002  };
2003}
2004
2005function isAnySideFullyClipped(overflow) {
2006  return [_enums_js__WEBPACK_IMPORTED_MODULE_0__.top, _enums_js__WEBPACK_IMPORTED_MODULE_0__.right, _enums_js__WEBPACK_IMPORTED_MODULE_0__.bottom, _enums_js__WEBPACK_IMPORTED_MODULE_0__.left].some(function (side) {
2007    return overflow[side] >= 0;
2008  });
2009}
2010
2011function hide(_ref) {
2012  var state = _ref.state,
2013      name = _ref.name;
2014  var referenceRect = state.rects.reference;
2015  var popperRect = state.rects.popper;
2016  var preventedOffsets = state.modifiersData.preventOverflow;
2017  var referenceOverflow = (0,_utils_detectOverflow_js__WEBPACK_IMPORTED_MODULE_1__["default"])(state, {
2018    elementContext: 'reference'
2019  });
2020  var popperAltOverflow = (0,_utils_detectOverflow_js__WEBPACK_IMPORTED_MODULE_1__["default"])(state, {
2021    altBoundary: true
2022  });
2023  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
2024  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
2025  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
2026  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
2027  state.modifiersData[name] = {
2028    referenceClippingOffsets: referenceClippingOffsets,
2029    popperEscapeOffsets: popperEscapeOffsets,
2030    isReferenceHidden: isReferenceHidden,
2031    hasPopperEscaped: hasPopperEscaped
2032  };
2033  state.attributes.popper = Object.assign({}, state.attributes.popper, {
2034    'data-popper-reference-hidden': isReferenceHidden,
2035    'data-popper-escaped': hasPopperEscaped
2036  });
2037} // eslint-disable-next-line import/no-unused-modules
2038
2039
2040/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
2041  name: 'hide',
2042  enabled: true,
2043  phase: 'main',
2044  requiresIfExists: ['preventOverflow'],
2045  fn: hide
2046});
2047
2048/***/ }),
2049
vendor: 3,157 bytes, lines 2050-2089
2050/***/ "./node_modules/@popperjs/core/lib/modifiers/index.js":
2051/*!************************************************************!*\
2052  !*** ./node_modules/@popperjs/core/lib/modifiers/index.js ***!
2053  \************************************************************/
2054/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2055
2056"use strict";
2057__webpack_require__.r(__webpack_exports__);
2058/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2059/* harmony export */   "applyStyles": () => (/* reexport safe */ _applyStyles_js__WEBPACK_IMPORTED_MODULE_0__["default"]),
2060/* harmony export */   "arrow": () => (/* reexport safe */ _arrow_js__WEBPACK_IMPORTED_MODULE_1__["default"]),
2061/* harmony export */   "computeStyles": () => (/* reexport safe */ _computeStyles_js__WEBPACK_IMPORTED_MODULE_2__["default"]),
2062/* harmony export */   "eventListeners": () => (/* reexport safe */ _eventListeners_js__WEBPACK_IMPORTED_MODULE_3__["default"]),
2063/* harmony export */   "flip": () => (/* reexport safe */ _flip_js__WEBPACK_IMPORTED_MODULE_4__["default"]),
2064/* harmony export */   "hide": () => (/* reexport safe */ _hide_js__WEBPACK_IMPORTED_MODULE_5__["default"]),
2065/* harmony export */   "offset": () => (/* reexport safe */ _offset_js__WEBPACK_IMPORTED_MODULE_6__["default"]),
2066/* harmony export */   "popperOffsets": () => (/* reexport safe */ _popperOffsets_js__WEBPACK_IMPORTED_MODULE_7__["default"]),
2067/* harmony export */   "preventOverflow": () => (/* reexport safe */ _preventOverflow_js__WEBPACK_IMPORTED_MODULE_8__["default"])
2068/* harmony export */ });
2069/* harmony import */ var _applyStyles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./applyStyles.js */ "./node_modules/@popperjs/core/lib/modifiers/applyStyles.js");
2070/* harmony import */ var _arrow_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./arrow.js */ "./node_modules/@popperjs/core/lib/modifiers/arrow.js");
2071/* harmony import */ var _computeStyles_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeStyles.js */ "./node_modules/@popperjs/core/lib/modifiers/computeStyles.js");
2072/* harmony import */ var _eventListeners_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eventListeners.js */ "./node_modules/@popperjs/core/lib/modifiers/eventListeners.js");
2073/* harmony import */ var _flip_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./flip.js */ "./node_modules/@popperjs/core/lib/modifiers/flip.js");
2074/* harmony import */ var _hide_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hide.js */ "./node_modules/@popperjs/core/lib/modifiers/hide.js");
2075/* harmony import */ var _offset_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./offset.js */ "./node_modules/@popperjs/core/lib/modifiers/offset.js");
2076/* harmony import */ var _popperOffsets_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./popperOffsets.js */ "./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js");
2077/* harmony import */ var _preventOverflow_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./preventOverflow.js */ "./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js");
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088/***/ }),
2089
vendor: 2,814 bytes, lines 2090-2160
2090/***/ "./node_modules/@popperjs/core/lib/modifiers/offset.js":
2091/*!*************************************************************!*\
2092  !*** ./node_modules/@popperjs/core/lib/modifiers/offset.js ***!
2093  \*************************************************************/
2094/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2095
2096"use strict";
2097__webpack_require__.r(__webpack_exports__);
2098/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2099/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__),
2100/* harmony export */   "distanceAndSkiddingToXY": () => (/* binding */ distanceAndSkiddingToXY)
2101/* harmony export */ });
2102/* harmony import */ var _utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/getBasePlacement.js */ "./node_modules/@popperjs/core/lib/utils/getBasePlacement.js");
2103/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
2104
2105 // eslint-disable-next-line import/no-unused-modules
2106
2107function distanceAndSkiddingToXY(placement, rects, offset) {
2108  var basePlacement = (0,_utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_0__["default"])(placement);
2109  var invertDistance = [_enums_js__WEBPACK_IMPORTED_MODULE_1__.left, _enums_js__WEBPACK_IMPORTED_MODULE_1__.top].indexOf(basePlacement) >= 0 ? -1 : 1;
2110
2111  var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
2112    placement: placement
2113  })) : offset,
2114      skidding = _ref[0],
2115      distance = _ref[1];
2116
2117  skidding = skidding || 0;
2118  distance = (distance || 0) * invertDistance;
2119  return [_enums_js__WEBPACK_IMPORTED_MODULE_1__.left, _enums_js__WEBPACK_IMPORTED_MODULE_1__.right].indexOf(basePlacement) >= 0 ? {
2120    x: distance,
2121    y: skidding
2122  } : {
2123    x: skidding,
2124    y: distance
2125  };
2126}
2127
2128function offset(_ref2) {
2129  var state = _ref2.state,
2130      options = _ref2.options,
2131      name = _ref2.name;
2132  var _options$offset = options.offset,
2133      offset = _options$offset === void 0 ? [0, 0] : _options$offset;
2134  var data = _enums_js__WEBPACK_IMPORTED_MODULE_1__.placements.reduce(function (acc, placement) {
2135    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
2136    return acc;
2137  }, {});
2138  var _data$state$placement = data[state.placement],
2139      x = _data$state$placement.x,
2140      y = _data$state$placement.y;
2141
2142  if (state.modifiersData.popperOffsets != null) {
2143    state.modifiersData.popperOffsets.x += x;
2144    state.modifiersData.popperOffsets.y += y;
2145  }
2146
2147  state.modifiersData[name] = data;
2148} // eslint-disable-next-line import/no-unused-modules
2149
2150
2151/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
2152  name: 'offset',
2153  enabled: true,
2154  phase: 'main',
2155  requires: ['popperOffsets'],
2156  fn: offset
2157});
2158
2159/***/ }),
2160
vendor: 1,555 bytes, lines 2161-2200
2161/***/ "./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js":
2162/*!********************************************************************!*\
2163  !*** ./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js ***!
2164  \********************************************************************/
2165/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2166
2167"use strict";
2168__webpack_require__.r(__webpack_exports__);
2169/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2170/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2171/* harmony export */ });
2172/* harmony import */ var _utils_computeOffsets_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/computeOffsets.js */ "./node_modules/@popperjs/core/lib/utils/computeOffsets.js");
2173
2174
2175function popperOffsets(_ref) {
2176  var state = _ref.state,
2177      name = _ref.name;
2178  // Offsets are the actual position the popper needs to have to be
2179  // properly positioned near its reference element
2180  // This is the most basic placement, and will be adjusted by
2181  // the modifiers in the next step
2182  state.modifiersData[name] = (0,_utils_computeOffsets_js__WEBPACK_IMPORTED_MODULE_0__["default"])({
2183    reference: state.rects.reference,
2184    element: state.rects.popper,
2185    strategy: 'absolute',
2186    placement: state.placement
2187  });
2188} // eslint-disable-next-line import/no-unused-modules
2189
2190
2191/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
2192  name: 'popperOffsets',
2193  enabled: true,
2194  phase: 'read',
2195  fn: popperOffsets,
2196  data: {}
2197});
2198
2199/***/ }),
2200
vendor: 9,904 bytes, lines 2201-2367
2201/***/ "./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js":
2202/*!**********************************************************************!*\
2203  !*** ./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js ***!
2204  \**********************************************************************/
2205/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2206
2207"use strict";
2208__webpack_require__.r(__webpack_exports__);
2209/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2210/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2211/* harmony export */ });
2212/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
2213/* harmony import */ var _utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/getBasePlacement.js */ "./node_modules/@popperjs/core/lib/utils/getBasePlacement.js");
2214/* harmony import */ var _utils_getMainAxisFromPlacement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/getMainAxisFromPlacement.js */ "./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js");
2215/* harmony import */ var _utils_getAltAxis_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/getAltAxis.js */ "./node_modules/@popperjs/core/lib/utils/getAltAxis.js");
2216/* harmony import */ var _utils_within_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/within.js */ "./node_modules/@popperjs/core/lib/utils/within.js");
2217/* harmony import */ var _dom_utils_getLayoutRect_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../dom-utils/getLayoutRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js");
2218/* harmony import */ var _dom_utils_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../dom-utils/getOffsetParent.js */ "./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js");
2219/* harmony import */ var _utils_detectOverflow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/detectOverflow.js */ "./node_modules/@popperjs/core/lib/utils/detectOverflow.js");
2220/* harmony import */ var _utils_getVariation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/getVariation.js */ "./node_modules/@popperjs/core/lib/utils/getVariation.js");
2221/* harmony import */ var _utils_getFreshSideObject_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/getFreshSideObject.js */ "./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js");
2222/* harmony import */ var _utils_math_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/math.js */ "./node_modules/@popperjs/core/lib/utils/math.js");
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235function preventOverflow(_ref) {
2236  var state = _ref.state,
2237      options = _ref.options,
2238      name = _ref.name;
2239  var _options$mainAxis = options.mainAxis,
2240      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
2241      _options$altAxis = options.altAxis,
2242      checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
2243      boundary = options.boundary,
2244      rootBoundary = options.rootBoundary,
2245      altBoundary = options.altBoundary,
2246      padding = options.padding,
2247      _options$tether = options.tether,
2248      tether = _options$tether === void 0 ? true : _options$tether,
2249      _options$tetherOffset = options.tetherOffset,
2250      tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
2251  var overflow = (0,_utils_detectOverflow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(state, {
2252    boundary: boundary,
2253    rootBoundary: rootBoundary,
2254    padding: padding,
2255    altBoundary: altBoundary
2256  });
2257  var basePlacement = (0,_utils_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_1__["default"])(state.placement);
2258  var variation = (0,_utils_getVariation_js__WEBPACK_IMPORTED_MODULE_2__["default"])(state.placement);
2259  var isBasePlacement = !variation;
2260  var mainAxis = (0,_utils_getMainAxisFromPlacement_js__WEBPACK_IMPORTED_MODULE_3__["default"])(basePlacement);
2261  var altAxis = (0,_utils_getAltAxis_js__WEBPACK_IMPORTED_MODULE_4__["default"])(mainAxis);
2262  var popperOffsets = state.modifiersData.popperOffsets;
2263  var referenceRect = state.rects.reference;
2264  var popperRect = state.rects.popper;
2265  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
2266    placement: state.placement
2267  })) : tetherOffset;
2268  var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
2269    mainAxis: tetherOffsetValue,
2270    altAxis: tetherOffsetValue
2271  } : Object.assign({
2272    mainAxis: 0,
2273    altAxis: 0
2274  }, tetherOffsetValue);
2275  var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
2276  var data = {
2277    x: 0,
2278    y: 0
2279  };
2280
2281  if (!popperOffsets) {
2282    return;
2283  }
2284
2285  if (checkMainAxis) {
2286    var _offsetModifierState$;
2287
2288    var mainSide = mainAxis === 'y' ? _enums_js__WEBPACK_IMPORTED_MODULE_5__.top : _enums_js__WEBPACK_IMPORTED_MODULE_5__.left;
2289    var altSide = mainAxis === 'y' ? _enums_js__WEBPACK_IMPORTED_MODULE_5__.bottom : _enums_js__WEBPACK_IMPORTED_MODULE_5__.right;
2290    var len = mainAxis === 'y' ? 'height' : 'width';
2291    var offset = popperOffsets[mainAxis];
2292    var min = offset + overflow[mainSide];
2293    var max = offset - overflow[altSide];
2294    var additive = tether ? -popperRect[len] / 2 : 0;
2295    var minLen = variation === _enums_js__WEBPACK_IMPORTED_MODULE_5__.start ? referenceRect[len] : popperRect[len];
2296    var maxLen = variation === _enums_js__WEBPACK_IMPORTED_MODULE_5__.start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
2297    // outside the reference bounds
2298
2299    var arrowElement = state.elements.arrow;
2300    var arrowRect = tether && arrowElement ? (0,_dom_utils_getLayoutRect_js__WEBPACK_IMPORTED_MODULE_6__["default"])(arrowElement) : {
2301      width: 0,
2302      height: 0
2303    };
2304    var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : (0,_utils_getFreshSideObject_js__WEBPACK_IMPORTED_MODULE_7__["default"])();
2305    var arrowPaddingMin = arrowPaddingObject[mainSide];
2306    var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
2307    // to include its full size in the calculation. If the reference is small
2308    // and near the edge of a boundary, the popper can overflow even if the
2309    // reference is not overflowing as well (e.g. virtual elements with no
2310    // width or height)
2311
2312    var arrowLen = (0,_utils_within_js__WEBPACK_IMPORTED_MODULE_8__.within)(0, referenceRect[len], arrowRect[len]);
2313    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
2314    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
2315    var arrowOffsetParent = state.elements.arrow && (0,_dom_utils_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_9__["default"])(state.elements.arrow);
2316    var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
2317    var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
2318    var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
2319    var tetherMax = offset + maxOffset - offsetModifierValue;
2320    var preventedOffset = (0,_utils_within_js__WEBPACK_IMPORTED_MODULE_8__.within)(tether ? (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_10__.min)(min, tetherMin) : min, offset, tether ? (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_10__.max)(max, tetherMax) : max);
2321    popperOffsets[mainAxis] = preventedOffset;
2322    data[mainAxis] = preventedOffset - offset;
2323  }
2324
2325  if (checkAltAxis) {
2326    var _offsetModifierState$2;
2327
2328    var _mainSide = mainAxis === 'x' ? _enums_js__WEBPACK_IMPORTED_MODULE_5__.top : _enums_js__WEBPACK_IMPORTED_MODULE_5__.left;
2329
2330    var _altSide = mainAxis === 'x' ? _enums_js__WEBPACK_IMPORTED_MODULE_5__.bottom : _enums_js__WEBPACK_IMPORTED_MODULE_5__.right;
2331
2332    var _offset = popperOffsets[altAxis];
2333
2334    var _len = altAxis === 'y' ? 'height' : 'width';
2335
2336    var _min = _offset + overflow[_mainSide];
2337
2338    var _max = _offset - overflow[_altSide];
2339
2340    var isOriginSide = [_enums_js__WEBPACK_IMPORTED_MODULE_5__.top, _enums_js__WEBPACK_IMPORTED_MODULE_5__.left].indexOf(basePlacement) !== -1;
2341
2342    var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
2343
2344    var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
2345
2346    var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
2347
2348    var _preventedOffset = tether && isOriginSide ? (0,_utils_within_js__WEBPACK_IMPORTED_MODULE_8__.withinMaxClamp)(_tetherMin, _offset, _tetherMax) : (0,_utils_within_js__WEBPACK_IMPORTED_MODULE_8__.within)(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
2349
2350    popperOffsets[altAxis] = _preventedOffset;
2351    data[altAxis] = _preventedOffset - _offset;
2352  }
2353
2354  state.modifiersData[name] = data;
2355} // eslint-disable-next-line import/no-unused-modules
2356
2357
2358/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
2359  name: 'preventOverflow',
2360  enabled: true,
2361  phase: 'main',
2362  fn: preventOverflow,
2363  requiresIfExists: ['offset']
2364});
2365
2366/***/ }),
2367
vendor: 2,572 bytes, lines 2368-2401
2368/***/ "./node_modules/@popperjs/core/lib/popper-lite.js":
2369/*!********************************************************!*\
2370  !*** ./node_modules/@popperjs/core/lib/popper-lite.js ***!
2371  \********************************************************/
2372/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2373
2374"use strict";
2375__webpack_require__.r(__webpack_exports__);
2376/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2377/* harmony export */   "createPopper": () => (/* binding */ createPopper),
2378/* harmony export */   "defaultModifiers": () => (/* binding */ defaultModifiers),
2379/* harmony export */   "detectOverflow": () => (/* reexport safe */ _createPopper_js__WEBPACK_IMPORTED_MODULE_5__["default"]),
2380/* harmony export */   "popperGenerator": () => (/* reexport safe */ _createPopper_js__WEBPACK_IMPORTED_MODULE_4__.popperGenerator)
2381/* harmony export */ });
2382/* harmony import */ var _createPopper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createPopper.js */ "./node_modules/@popperjs/core/lib/createPopper.js");
2383/* harmony import */ var _createPopper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./createPopper.js */ "./node_modules/@popperjs/core/lib/utils/detectOverflow.js");
2384/* harmony import */ var _modifiers_eventListeners_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modifiers/eventListeners.js */ "./node_modules/@popperjs/core/lib/modifiers/eventListeners.js");
2385/* harmony import */ var _modifiers_popperOffsets_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modifiers/popperOffsets.js */ "./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js");
2386/* harmony import */ var _modifiers_computeStyles_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modifiers/computeStyles.js */ "./node_modules/@popperjs/core/lib/modifiers/computeStyles.js");
2387/* harmony import */ var _modifiers_applyStyles_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modifiers/applyStyles.js */ "./node_modules/@popperjs/core/lib/modifiers/applyStyles.js");
2388
2389
2390
2391
2392
2393var defaultModifiers = [_modifiers_eventListeners_js__WEBPACK_IMPORTED_MODULE_0__["default"], _modifiers_popperOffsets_js__WEBPACK_IMPORTED_MODULE_1__["default"], _modifiers_computeStyles_js__WEBPACK_IMPORTED_MODULE_2__["default"], _modifiers_applyStyles_js__WEBPACK_IMPORTED_MODULE_3__["default"]];
2394var createPopper = /*#__PURE__*/(0,_createPopper_js__WEBPACK_IMPORTED_MODULE_4__.popperGenerator)({
2395  defaultModifiers: defaultModifiers
2396}); // eslint-disable-next-line import/no-unused-modules
2397
2398
2399
2400/***/ }),
2401
vendor: 5,531 bytes, lines 2402-2461
2402/***/ "./node_modules/@popperjs/core/lib/popper.js":
2403/*!***************************************************!*\
2404  !*** ./node_modules/@popperjs/core/lib/popper.js ***!
2405  \***************************************************/
2406/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2407
2408"use strict";
2409__webpack_require__.r(__webpack_exports__);
2410/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2411/* harmony export */   "applyStyles": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__.applyStyles),
2412/* harmony export */   "arrow": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__.arrow),
2413/* harmony export */   "computeStyles": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__.computeStyles),
2414/* harmony export */   "createPopper": () => (/* binding */ createPopper),
2415/* harmony export */   "createPopperLite": () => (/* reexport safe */ _popper_lite_js__WEBPACK_IMPORTED_MODULE_11__.createPopper),
2416/* harmony export */   "defaultModifiers": () => (/* binding */ defaultModifiers),
2417/* harmony export */   "detectOverflow": () => (/* reexport safe */ _createPopper_js__WEBPACK_IMPORTED_MODULE_10__["default"]),
2418/* harmony export */   "eventListeners": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__.eventListeners),
2419/* harmony export */   "flip": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__.flip),
2420/* harmony export */   "hide": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__.hide),
2421/* harmony export */   "offset": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__.offset),
2422/* harmony export */   "popperGenerator": () => (/* reexport safe */ _createPopper_js__WEBPACK_IMPORTED_MODULE_9__.popperGenerator),
2423/* harmony export */   "popperOffsets": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__.popperOffsets),
2424/* harmony export */   "preventOverflow": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__.preventOverflow)
2425/* harmony export */ });
2426/* harmony import */ var _createPopper_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./createPopper.js */ "./node_modules/@popperjs/core/lib/createPopper.js");
2427/* harmony import */ var _createPopper_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./createPopper.js */ "./node_modules/@popperjs/core/lib/utils/detectOverflow.js");
2428/* harmony import */ var _modifiers_eventListeners_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modifiers/eventListeners.js */ "./node_modules/@popperjs/core/lib/modifiers/eventListeners.js");
2429/* harmony import */ var _modifiers_popperOffsets_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modifiers/popperOffsets.js */ "./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js");
2430/* harmony import */ var _modifiers_computeStyles_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modifiers/computeStyles.js */ "./node_modules/@popperjs/core/lib/modifiers/computeStyles.js");
2431/* harmony import */ var _modifiers_applyStyles_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modifiers/applyStyles.js */ "./node_modules/@popperjs/core/lib/modifiers/applyStyles.js");
2432/* harmony import */ var _modifiers_offset_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modifiers/offset.js */ "./node_modules/@popperjs/core/lib/modifiers/offset.js");
2433/* harmony import */ var _modifiers_flip_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modifiers/flip.js */ "./node_modules/@popperjs/core/lib/modifiers/flip.js");
2434/* harmony import */ var _modifiers_preventOverflow_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modifiers/preventOverflow.js */ "./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js");
2435/* harmony import */ var _modifiers_arrow_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modifiers/arrow.js */ "./node_modules/@popperjs/core/lib/modifiers/arrow.js");
2436/* harmony import */ var _modifiers_hide_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modifiers/hide.js */ "./node_modules/@popperjs/core/lib/modifiers/hide.js");
2437/* harmony import */ var _popper_lite_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./popper-lite.js */ "./node_modules/@popperjs/core/lib/popper-lite.js");
2438/* harmony import */ var _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./modifiers/index.js */ "./node_modules/@popperjs/core/lib/modifiers/index.js");
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449var defaultModifiers = [_modifiers_eventListeners_js__WEBPACK_IMPORTED_MODULE_0__["default"], _modifiers_popperOffsets_js__WEBPACK_IMPORTED_MODULE_1__["default"], _modifiers_computeStyles_js__WEBPACK_IMPORTED_MODULE_2__["default"], _modifiers_applyStyles_js__WEBPACK_IMPORTED_MODULE_3__["default"], _modifiers_offset_js__WEBPACK_IMPORTED_MODULE_4__["default"], _modifiers_flip_js__WEBPACK_IMPORTED_MODULE_5__["default"], _modifiers_preventOverflow_js__WEBPACK_IMPORTED_MODULE_6__["default"], _modifiers_arrow_js__WEBPACK_IMPORTED_MODULE_7__["default"], _modifiers_hide_js__WEBPACK_IMPORTED_MODULE_8__["default"]];
2450var createPopper = /*#__PURE__*/(0,_createPopper_js__WEBPACK_IMPORTED_MODULE_9__.popperGenerator)({
2451  defaultModifiers: defaultModifiers
2452}); // eslint-disable-next-line import/no-unused-modules
2453
2454 // eslint-disable-next-line import/no-unused-modules
2455
2456 // eslint-disable-next-line import/no-unused-modules
2457
2458
2459
2460/***/ }),
2461
vendor: 3,405 bytes, lines 2462-2526
2462/***/ "./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js":
2463/*!***********************************************************************!*\
2464  !*** ./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js ***!
2465  \***********************************************************************/
2466/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2467
2468"use strict";
2469__webpack_require__.r(__webpack_exports__);
2470/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2471/* harmony export */   "default": () => (/* binding */ computeAutoPlacement)
2472/* harmony export */ });
2473/* harmony import */ var _getVariation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getVariation.js */ "./node_modules/@popperjs/core/lib/utils/getVariation.js");
2474/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
2475/* harmony import */ var _detectOverflow_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./detectOverflow.js */ "./node_modules/@popperjs/core/lib/utils/detectOverflow.js");
2476/* harmony import */ var _getBasePlacement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getBasePlacement.js */ "./node_modules/@popperjs/core/lib/utils/getBasePlacement.js");
2477
2478
2479
2480
2481function computeAutoPlacement(state, options) {
2482  if (options === void 0) {
2483    options = {};
2484  }
2485
2486  var _options = options,
2487      placement = _options.placement,
2488      boundary = _options.boundary,
2489      rootBoundary = _options.rootBoundary,
2490      padding = _options.padding,
2491      flipVariations = _options.flipVariations,
2492      _options$allowedAutoP = _options.allowedAutoPlacements,
2493      allowedAutoPlacements = _options$allowedAutoP === void 0 ? _enums_js__WEBPACK_IMPORTED_MODULE_0__.placements : _options$allowedAutoP;
2494  var variation = (0,_getVariation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(placement);
2495  var placements = variation ? flipVariations ? _enums_js__WEBPACK_IMPORTED_MODULE_0__.variationPlacements : _enums_js__WEBPACK_IMPORTED_MODULE_0__.variationPlacements.filter(function (placement) {
2496    return (0,_getVariation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(placement) === variation;
2497  }) : _enums_js__WEBPACK_IMPORTED_MODULE_0__.basePlacements;
2498  var allowedPlacements = placements.filter(function (placement) {
2499    return allowedAutoPlacements.indexOf(placement) >= 0;
2500  });
2501
2502  if (allowedPlacements.length === 0) {
2503    allowedPlacements = placements;
2504
2505    if (true) {
2506      console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(' '));
2507    }
2508  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
2509
2510
2511  var overflows = allowedPlacements.reduce(function (acc, placement) {
2512    acc[placement] = (0,_detectOverflow_js__WEBPACK_IMPORTED_MODULE_2__["default"])(state, {
2513      placement: placement,
2514      boundary: boundary,
2515      rootBoundary: rootBoundary,
2516      padding: padding
2517    })[(0,_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_3__["default"])(placement)];
2518    return acc;
2519  }, {});
2520  return Object.keys(overflows).sort(function (a, b) {
2521    return overflows[a] - overflows[b];
2522  });
2523}
2524
2525/***/ }),
2526
vendor: 3,194 bytes, lines 2527-2614
2527/***/ "./node_modules/@popperjs/core/lib/utils/computeOffsets.js":
2528/*!*****************************************************************!*\
2529  !*** ./node_modules/@popperjs/core/lib/utils/computeOffsets.js ***!
2530  \*****************************************************************/
2531/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2532
2533"use strict";
2534__webpack_require__.r(__webpack_exports__);
2535/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2536/* harmony export */   "default": () => (/* binding */ computeOffsets)
2537/* harmony export */ });
2538/* harmony import */ var _getBasePlacement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBasePlacement.js */ "./node_modules/@popperjs/core/lib/utils/getBasePlacement.js");
2539/* harmony import */ var _getVariation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getVariation.js */ "./node_modules/@popperjs/core/lib/utils/getVariation.js");
2540/* harmony import */ var _getMainAxisFromPlacement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getMainAxisFromPlacement.js */ "./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js");
2541/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
2542
2543
2544
2545
2546function computeOffsets(_ref) {
2547  var reference = _ref.reference,
2548      element = _ref.element,
2549      placement = _ref.placement;
2550  var basePlacement = placement ? (0,_getBasePlacement_js__WEBPACK_IMPORTED_MODULE_0__["default"])(placement) : null;
2551  var variation = placement ? (0,_getVariation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(placement) : null;
2552  var commonX = reference.x + reference.width / 2 - element.width / 2;
2553  var commonY = reference.y + reference.height / 2 - element.height / 2;
2554  var offsets;
2555
2556  switch (basePlacement) {
2557    case _enums_js__WEBPACK_IMPORTED_MODULE_2__.top:
2558      offsets = {
2559        x: commonX,
2560        y: reference.y - element.height
2561      };
2562      break;
2563
2564    case _enums_js__WEBPACK_IMPORTED_MODULE_2__.bottom:
2565      offsets = {
2566        x: commonX,
2567        y: reference.y + reference.height
2568      };
2569      break;
2570
2571    case _enums_js__WEBPACK_IMPORTED_MODULE_2__.right:
2572      offsets = {
2573        x: reference.x + reference.width,
2574        y: commonY
2575      };
2576      break;
2577
2578    case _enums_js__WEBPACK_IMPORTED_MODULE_2__.left:
2579      offsets = {
2580        x: reference.x - element.width,
2581        y: commonY
2582      };
2583      break;
2584
2585    default:
2586      offsets = {
2587        x: reference.x,
2588        y: reference.y
2589      };
2590  }
2591
2592  var mainAxis = basePlacement ? (0,_getMainAxisFromPlacement_js__WEBPACK_IMPORTED_MODULE_3__["default"])(basePlacement) : null;
2593
2594  if (mainAxis != null) {
2595    var len = mainAxis === 'y' ? 'height' : 'width';
2596
2597    switch (variation) {
2598      case _enums_js__WEBPACK_IMPORTED_MODULE_2__.start:
2599        offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
2600        break;
2601
2602      case _enums_js__WEBPACK_IMPORTED_MODULE_2__.end:
2603        offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
2604        break;
2605
2606      default:
2607    }
2608  }
2609
2610  return offsets;
2611}
2612
2613/***/ }),
2614
vendor: 850 bytes, lines 2615-2643
2615/***/ "./node_modules/@popperjs/core/lib/utils/debounce.js":
2616/*!***********************************************************!*\
2617  !*** ./node_modules/@popperjs/core/lib/utils/debounce.js ***!
2618  \***********************************************************/
2619/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2620
2621"use strict";
2622__webpack_require__.r(__webpack_exports__);
2623/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2624/* harmony export */   "default": () => (/* binding */ debounce)
2625/* harmony export */ });
2626function debounce(fn) {
2627  var pending;
2628  return function () {
2629    if (!pending) {
2630      pending = new Promise(function (resolve) {
2631        Promise.resolve().then(function () {
2632          pending = undefined;
2633          resolve(fn());
2634        });
2635      });
2636    }
2637
2638    return pending;
2639  };
2640}
2641
2642/***/ }),
2643
vendor: 6,087 bytes, lines 2644-2729
2644/***/ "./node_modules/@popperjs/core/lib/utils/detectOverflow.js":
2645/*!*****************************************************************!*\
2646  !*** ./node_modules/@popperjs/core/lib/utils/detectOverflow.js ***!
2647  \*****************************************************************/
2648/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2649
2650"use strict";
2651__webpack_require__.r(__webpack_exports__);
2652/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2653/* harmony export */   "default": () => (/* binding */ detectOverflow)
2654/* harmony export */ });
2655/* harmony import */ var _dom_utils_getClippingRect_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dom-utils/getClippingRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js");
2656/* harmony import */ var _dom_utils_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../dom-utils/getDocumentElement.js */ "./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js");
2657/* harmony import */ var _dom_utils_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../dom-utils/getBoundingClientRect.js */ "./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js");
2658/* harmony import */ var _computeOffsets_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./computeOffsets.js */ "./node_modules/@popperjs/core/lib/utils/computeOffsets.js");
2659/* harmony import */ var _rectToClientRect_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./rectToClientRect.js */ "./node_modules/@popperjs/core/lib/utils/rectToClientRect.js");
2660/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
2661/* harmony import */ var _dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../dom-utils/instanceOf.js */ "./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js");
2662/* harmony import */ var _mergePaddingObject_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergePaddingObject.js */ "./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js");
2663/* harmony import */ var _expandToHashMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./expandToHashMap.js */ "./node_modules/@popperjs/core/lib/utils/expandToHashMap.js");
2664
2665
2666
2667
2668
2669
2670
2671
2672 // eslint-disable-next-line import/no-unused-modules
2673
2674function detectOverflow(state, options) {
2675  if (options === void 0) {
2676    options = {};
2677  }
2678
2679  var _options = options,
2680      _options$placement = _options.placement,
2681      placement = _options$placement === void 0 ? state.placement : _options$placement,
2682      _options$boundary = _options.boundary,
2683      boundary = _options$boundary === void 0 ? _enums_js__WEBPACK_IMPORTED_MODULE_0__.clippingParents : _options$boundary,
2684      _options$rootBoundary = _options.rootBoundary,
2685      rootBoundary = _options$rootBoundary === void 0 ? _enums_js__WEBPACK_IMPORTED_MODULE_0__.viewport : _options$rootBoundary,
2686      _options$elementConte = _options.elementContext,
2687      elementContext = _options$elementConte === void 0 ? _enums_js__WEBPACK_IMPORTED_MODULE_0__.popper : _options$elementConte,
2688      _options$altBoundary = _options.altBoundary,
2689      altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
2690      _options$padding = _options.padding,
2691      padding = _options$padding === void 0 ? 0 : _options$padding;
2692  var paddingObject = (0,_mergePaddingObject_js__WEBPACK_IMPORTED_MODULE_1__["default"])(typeof padding !== 'number' ? padding : (0,_expandToHashMap_js__WEBPACK_IMPORTED_MODULE_2__["default"])(padding, _enums_js__WEBPACK_IMPORTED_MODULE_0__.basePlacements));
2693  var altContext = elementContext === _enums_js__WEBPACK_IMPORTED_MODULE_0__.popper ? _enums_js__WEBPACK_IMPORTED_MODULE_0__.reference : _enums_js__WEBPACK_IMPORTED_MODULE_0__.popper;
2694  var popperRect = state.rects.popper;
2695  var element = state.elements[altBoundary ? altContext : elementContext];
2696  var clippingClientRect = (0,_dom_utils_getClippingRect_js__WEBPACK_IMPORTED_MODULE_3__["default"])((0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(element) ? element : element.contextElement || (0,_dom_utils_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__["default"])(state.elements.popper), boundary, rootBoundary);
2697  var referenceClientRect = (0,_dom_utils_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_6__["default"])(state.elements.reference);
2698  var popperOffsets = (0,_computeOffsets_js__WEBPACK_IMPORTED_MODULE_7__["default"])({
2699    reference: referenceClientRect,
2700    element: popperRect,
2701    strategy: 'absolute',
2702    placement: placement
2703  });
2704  var popperClientRect = (0,_rectToClientRect_js__WEBPACK_IMPORTED_MODULE_8__["default"])(Object.assign({}, popperRect, popperOffsets));
2705  var elementClientRect = elementContext === _enums_js__WEBPACK_IMPORTED_MODULE_0__.popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
2706  // 0 or negative = within the clipping rect
2707
2708  var overflowOffsets = {
2709    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
2710    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
2711    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
2712    right: elementClientRect.right - clippingClientRect.right + paddingObject.right
2713  };
2714  var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
2715
2716  if (elementContext === _enums_js__WEBPACK_IMPORTED_MODULE_0__.popper && offsetData) {
2717    var offset = offsetData[placement];
2718    Object.keys(overflowOffsets).forEach(function (key) {
2719      var multiply = [_enums_js__WEBPACK_IMPORTED_MODULE_0__.right, _enums_js__WEBPACK_IMPORTED_MODULE_0__.bottom].indexOf(key) >= 0 ? 1 : -1;
2720      var axis = [_enums_js__WEBPACK_IMPORTED_MODULE_0__.top, _enums_js__WEBPACK_IMPORTED_MODULE_0__.bottom].indexOf(key) >= 0 ? 'y' : 'x';
2721      overflowOffsets[key] += offset[axis] * multiply;
2722    });
2723  }
2724
2725  return overflowOffsets;
2726}
2727
2728/***/ }),
2729
vendor: 742 bytes, lines 2730-2749
2730/***/ "./node_modules/@popperjs/core/lib/utils/expandToHashMap.js":
2731/*!******************************************************************!*\
2732  !*** ./node_modules/@popperjs/core/lib/utils/expandToHashMap.js ***!
2733  \******************************************************************/
2734/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2735
2736"use strict";
2737__webpack_require__.r(__webpack_exports__);
2738/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2739/* harmony export */   "default": () => (/* binding */ expandToHashMap)
2740/* harmony export */ });
2741function expandToHashMap(value, keys) {
2742  return keys.reduce(function (hashMap, key) {
2743    hashMap[key] = value;
2744    return hashMap;
2745  }, {});
2746}
2747
2748/***/ }),
2749
vendor: 824 bytes, lines 2750-2772
2750/***/ "./node_modules/@popperjs/core/lib/utils/format.js":
2751/*!*********************************************************!*\
2752  !*** ./node_modules/@popperjs/core/lib/utils/format.js ***!
2753  \*********************************************************/
2754/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2755
2756"use strict";
2757__webpack_require__.r(__webpack_exports__);
2758/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2759/* harmony export */   "default": () => (/* binding */ format)
2760/* harmony export */ });
2761function format(str) {
2762  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2763    args[_key - 1] = arguments[_key];
2764  }
2765
2766  return [].concat(args).reduce(function (p, c) {
2767    return p.replace(/%s/, c);
2768  }, str);
2769}
2770
2771/***/ }),
2772
vendor: 637 bytes, lines 2773-2789
2773/***/ "./node_modules/@popperjs/core/lib/utils/getAltAxis.js":
2774/*!*************************************************************!*\
2775  !*** ./node_modules/@popperjs/core/lib/utils/getAltAxis.js ***!
2776  \*************************************************************/
2777/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2778
2779"use strict";
2780__webpack_require__.r(__webpack_exports__);
2781/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2782/* harmony export */   "default": () => (/* binding */ getAltAxis)
2783/* harmony export */ });
2784function getAltAxis(axis) {
2785  return axis === 'x' ? 'y' : 'x';
2786}
2787
2788/***/ }),
2789
vendor: 678 bytes, lines 2790-2807
2790/***/ "./node_modules/@popperjs/core/lib/utils/getBasePlacement.js":
2791/*!*******************************************************************!*\
2792  !*** ./node_modules/@popperjs/core/lib/utils/getBasePlacement.js ***!
2793  \*******************************************************************/
2794/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2795
2796"use strict";
2797__webpack_require__.r(__webpack_exports__);
2798/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2799/* harmony export */   "default": () => (/* binding */ getBasePlacement)
2800/* harmony export */ });
2801
2802function getBasePlacement(placement) {
2803  return placement.split('-')[0];
2804}
2805
2806/***/ }),
2807
vendor: 715 bytes, lines 2808-2829
2808/***/ "./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js":
2809/*!*********************************************************************!*\
2810  !*** ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js ***!
2811  \*********************************************************************/
2812/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2813
2814"use strict";
2815__webpack_require__.r(__webpack_exports__);
2816/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2817/* harmony export */   "default": () => (/* binding */ getFreshSideObject)
2818/* harmony export */ });
2819function getFreshSideObject() {
2820  return {
2821    top: 0,
2822    right: 0,
2823    bottom: 0,
2824    left: 0
2825  };
2826}
2827
2828/***/ }),
2829
vendor: 755 bytes, lines 2830-2846
2830/***/ "./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js":
2831/*!***************************************************************************!*\
2832  !*** ./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js ***!
2833  \***************************************************************************/
2834/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2835
2836"use strict";
2837__webpack_require__.r(__webpack_exports__);
2838/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2839/* harmony export */   "default": () => (/* binding */ getMainAxisFromPlacement)
2840/* harmony export */ });
2841function getMainAxisFromPlacement(placement) {
2842  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
2843}
2844
2845/***/ }),
2846
vendor: 856 bytes, lines 2847-2871
2847/***/ "./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js":
2848/*!***********************************************************************!*\
2849  !*** ./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js ***!
2850  \***********************************************************************/
2851/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2852
2853"use strict";
2854__webpack_require__.r(__webpack_exports__);
2855/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2856/* harmony export */   "default": () => (/* binding */ getOppositePlacement)
2857/* harmony export */ });
2858var hash = {
2859  left: 'right',
2860  right: 'left',
2861  bottom: 'top',
2862  top: 'bottom'
2863};
2864function getOppositePlacement(placement) {
2865  return placement.replace(/left|right|bottom|top/g, function (matched) {
2866    return hash[matched];
2867  });
2868}
2869
2870/***/ }),
2871
vendor: 862 bytes, lines 2872-2894
2872/***/ "./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js":
2873/*!********************************************************************************!*\
2874  !*** ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js ***!
2875  \********************************************************************************/
2876/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2877
2878"use strict";
2879__webpack_require__.r(__webpack_exports__);
2880/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2881/* harmony export */   "default": () => (/* binding */ getOppositeVariationPlacement)
2882/* harmony export */ });
2883var hash = {
2884  start: 'end',
2885  end: 'start'
2886};
2887function getOppositeVariationPlacement(placement) {
2888  return placement.replace(/start|end/g, function (matched) {
2889    return hash[matched];
2890  });
2891}
2892
2893/***/ }),
2894
vendor: 653 bytes, lines 2895-2911
2895/***/ "./node_modules/@popperjs/core/lib/utils/getVariation.js":
2896/*!***************************************************************!*\
2897  !*** ./node_modules/@popperjs/core/lib/utils/getVariation.js ***!
2898  \***************************************************************/
2899/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2900
2901"use strict";
2902__webpack_require__.r(__webpack_exports__);
2903/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2904/* harmony export */   "default": () => (/* binding */ getVariation)
2905/* harmony export */ });
2906function getVariation(placement) {
2907  return placement.split('-')[1];
2908}
2909
2910/***/ }),
2911
vendor: 719 bytes, lines 2912-2930
2912/***/ "./node_modules/@popperjs/core/lib/utils/math.js":
2913/*!*******************************************************!*\
2914  !*** ./node_modules/@popperjs/core/lib/utils/math.js ***!
2915  \*******************************************************/
2916/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2917
2918"use strict";
2919__webpack_require__.r(__webpack_exports__);
2920/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2921/* harmony export */   "max": () => (/* binding */ max),
2922/* harmony export */   "min": () => (/* binding */ min),
2923/* harmony export */   "round": () => (/* binding */ round)
2924/* harmony export */ });
2925var max = Math.max;
2926var min = Math.min;
2927var round = Math.round;
2928
2929/***/ }),
2930
vendor: 1,087 bytes, lines 2931-2958
2931/***/ "./node_modules/@popperjs/core/lib/utils/mergeByName.js":
2932/*!**************************************************************!*\
2933  !*** ./node_modules/@popperjs/core/lib/utils/mergeByName.js ***!
2934  \**************************************************************/
2935/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2936
2937"use strict";
2938__webpack_require__.r(__webpack_exports__);
2939/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2940/* harmony export */   "default": () => (/* binding */ mergeByName)
2941/* harmony export */ });
2942function mergeByName(modifiers) {
2943  var merged = modifiers.reduce(function (merged, current) {
2944    var existing = merged[current.name];
2945    merged[current.name] = existing ? Object.assign({}, existing, current, {
2946      options: Object.assign({}, existing.options, current.options),
2947      data: Object.assign({}, existing.data, current.data)
2948    }) : current;
2949    return merged;
2950  }, {}); // IE11 does not support Object.values
2951
2952  return Object.keys(merged).map(function (key) {
2953    return merged[key];
2954  });
2955}
2956
2957/***/ }),
2958
vendor: 969 bytes, lines 2959-2977
2959/***/ "./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js":
2960/*!*********************************************************************!*\
2961  !*** ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js ***!
2962  \*********************************************************************/
2963/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2964
2965"use strict";
2966__webpack_require__.r(__webpack_exports__);
2967/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2968/* harmony export */   "default": () => (/* binding */ mergePaddingObject)
2969/* harmony export */ });
2970/* harmony import */ var _getFreshSideObject_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getFreshSideObject.js */ "./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js");
2971
2972function mergePaddingObject(paddingObject) {
2973  return Object.assign({}, (0,_getFreshSideObject_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), paddingObject);
2974}
2975
2976/***/ }),
2977
vendor: 1,964 bytes, lines 2978-3036
2978/***/ "./node_modules/@popperjs/core/lib/utils/orderModifiers.js":
2979/*!*****************************************************************!*\
2980  !*** ./node_modules/@popperjs/core/lib/utils/orderModifiers.js ***!
2981  \*****************************************************************/
2982/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2983
2984"use strict";
2985__webpack_require__.r(__webpack_exports__);
2986/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2987/* harmony export */   "default": () => (/* binding */ orderModifiers)
2988/* harmony export */ });
2989/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
2990 // source: https://stackoverflow.com/questions/49875255
2991
2992function order(modifiers) {
2993  var map = new Map();
2994  var visited = new Set();
2995  var result = [];
2996  modifiers.forEach(function (modifier) {
2997    map.set(modifier.name, modifier);
2998  }); // On visiting object, check for its dependencies and visit them recursively
2999
3000  function sort(modifier) {
3001    visited.add(modifier.name);
3002    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
3003    requires.forEach(function (dep) {
3004      if (!visited.has(dep)) {
3005        var depModifier = map.get(dep);
3006
3007        if (depModifier) {
3008          sort(depModifier);
3009        }
3010      }
3011    });
3012    result.push(modifier);
3013  }
3014
3015  modifiers.forEach(function (modifier) {
3016    if (!visited.has(modifier.name)) {
3017      // check for visited object
3018      sort(modifier);
3019    }
3020  });
3021  return result;
3022}
3023
3024function orderModifiers(modifiers) {
3025  // order based on dependencies
3026  var orderedModifiers = order(modifiers); // order based on phase
3027
3028  return _enums_js__WEBPACK_IMPORTED_MODULE_0__.modifierPhases.reduce(function (acc, phase) {
3029    return acc.concat(orderedModifiers.filter(function (modifier) {
3030      return modifier.phase === phase;
3031    }));
3032  }, []);
3033}
3034
3035/***/ }),
3036
vendor: 779 bytes, lines 3037-3058
3037/***/ "./node_modules/@popperjs/core/lib/utils/rectToClientRect.js":
3038/*!*******************************************************************!*\
3039  !*** ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js ***!
3040  \*******************************************************************/
3041/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3042
3043"use strict";
3044__webpack_require__.r(__webpack_exports__);
3045/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3046/* harmony export */   "default": () => (/* binding */ rectToClientRect)
3047/* harmony export */ });
3048function rectToClientRect(rect) {
3049  return Object.assign({}, rect, {
3050    left: rect.x,
3051    top: rect.y,
3052    right: rect.x + rect.width,
3053    bottom: rect.y + rect.height
3054  });
3055}
3056
3057/***/ }),
3058
vendor: 800 bytes, lines 3059-3083
3059/***/ "./node_modules/@popperjs/core/lib/utils/uniqueBy.js":
3060/*!***********************************************************!*\
3061  !*** ./node_modules/@popperjs/core/lib/utils/uniqueBy.js ***!
3062  \***********************************************************/
3063/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3064
3065"use strict";
3066__webpack_require__.r(__webpack_exports__);
3067/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3068/* harmony export */   "default": () => (/* binding */ uniqueBy)
3069/* harmony export */ });
3070function uniqueBy(arr, fn) {
3071  var identifiers = new Set();
3072  return arr.filter(function (item) {
3073    var identifier = fn(item);
3074
3075    if (!identifiers.has(identifier)) {
3076      identifiers.add(identifier);
3077      return true;
3078    }
3079  });
3080}
3081
3082/***/ }),
3083
vendor: 4,550 bytes, lines 3084-3180
3084/***/ "./node_modules/@popperjs/core/lib/utils/validateModifiers.js":
3085/*!********************************************************************!*\
3086  !*** ./node_modules/@popperjs/core/lib/utils/validateModifiers.js ***!
3087  \********************************************************************/
3088/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3089
3090"use strict";
3091__webpack_require__.r(__webpack_exports__);
3092/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3093/* harmony export */   "default": () => (/* binding */ validateModifiers)
3094/* harmony export */ });
3095/* harmony import */ var _format_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format.js */ "./node_modules/@popperjs/core/lib/utils/format.js");
3096/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../enums.js */ "./node_modules/@popperjs/core/lib/enums.js");
3097
3098
3099var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
3100var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
3101var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
3102function validateModifiers(modifiers) {
3103  modifiers.forEach(function (modifier) {
3104    [].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)`
3105    .filter(function (value, index, self) {
3106      return self.indexOf(value) === index;
3107    }).forEach(function (key) {
3108      switch (key) {
3109        case 'name':
3110          if (typeof modifier.name !== 'string') {
3111            console.error((0,_format_js__WEBPACK_IMPORTED_MODULE_0__["default"])(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
3112          }
3113
3114          break;
3115
3116        case 'enabled':
3117          if (typeof modifier.enabled !== 'boolean') {
3118            console.error((0,_format_js__WEBPACK_IMPORTED_MODULE_0__["default"])(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
3119          }
3120
3121          break;
3122
3123        case 'phase':
3124          if (_enums_js__WEBPACK_IMPORTED_MODULE_1__.modifierPhases.indexOf(modifier.phase) < 0) {
3125            console.error((0,_format_js__WEBPACK_IMPORTED_MODULE_0__["default"])(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + _enums_js__WEBPACK_IMPORTED_MODULE_1__.modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
3126          }
3127
3128          break;
3129
3130        case 'fn':
3131          if (typeof modifier.fn !== 'function') {
3132            console.error((0,_format_js__WEBPACK_IMPORTED_MODULE_0__["default"])(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
3133          }
3134
3135          break;
3136
3137        case 'effect':
3138          if (modifier.effect != null && typeof modifier.effect !== 'function') {
3139            console.error((0,_format_js__WEBPACK_IMPORTED_MODULE_0__["default"])(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
3140          }
3141
3142          break;
3143
3144        case 'requires':
3145          if (modifier.requires != null && !Array.isArray(modifier.requires)) {
3146            console.error((0,_format_js__WEBPACK_IMPORTED_MODULE_0__["default"])(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
3147          }
3148
3149          break;
3150
3151        case 'requiresIfExists':
3152          if (!Array.isArray(modifier.requiresIfExists)) {
3153            console.error((0,_format_js__WEBPACK_IMPORTED_MODULE_0__["default"])(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
3154          }
3155
3156          break;
3157
3158        case 'options':
3159        case 'data':
3160          break;
3161
3162        default:
3163          console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
3164            return "\"" + s + "\"";
3165          }).join(', ') + "; but \"" + key + "\" was provided.");
3166      }
3167
3168      modifier.requires && modifier.requires.forEach(function (requirement) {
3169        if (modifiers.find(function (mod) {
3170          return mod.name === requirement;
3171        }) == null) {
3172          console.error((0,_format_js__WEBPACK_IMPORTED_MODULE_0__["default"])(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
3173        }
3174      });
3175    });
3176  });
3177}
3178
3179/***/ }),
3180
vendor: 1,050 bytes, lines 3181-3204
3181/***/ "./node_modules/@popperjs/core/lib/utils/within.js":
3182/*!*********************************************************!*\
3183  !*** ./node_modules/@popperjs/core/lib/utils/within.js ***!
3184  \*********************************************************/
3185/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3186
3187"use strict";
3188__webpack_require__.r(__webpack_exports__);
3189/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3190/* harmony export */   "within": () => (/* binding */ within),
3191/* harmony export */   "withinMaxClamp": () => (/* binding */ withinMaxClamp)
3192/* harmony export */ });
3193/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/@popperjs/core/lib/utils/math.js");
3194
3195function within(min, value, max) {
3196  return (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.max)(min, (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.min)(value, max));
3197}
3198function withinMaxClamp(min, value, max) {
3199  var v = within(min, value, max);
3200  return v > max ? max : v;
3201}
3202
3203/***/ }),
3204
vendor: 342 bytes, lines 3205-3214
3205/***/ "./node_modules/axios/index.js":
3206/*!*************************************!*\
3207  !*** ./node_modules/axios/index.js ***!
3208  \*************************************/
3209/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3210
3211module.exports = __webpack_require__(/*! ./lib/axios */ "./node_modules/axios/lib/axios.js");
3212
3213/***/ }),
3214
vendor: 6,957 bytes, lines 3215-3414
3215/***/ "./node_modules/axios/lib/adapters/xhr.js":
3216/*!************************************************!*\
3217  !*** ./node_modules/axios/lib/adapters/xhr.js ***!
3218  \************************************************/
3219/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3220
3221"use strict";
3222
3223
3224var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
3225var settle = __webpack_require__(/*! ./../core/settle */ "./node_modules/axios/lib/core/settle.js");
3226var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./node_modules/axios/lib/helpers/cookies.js");
3227var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js");
3228var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./node_modules/axios/lib/core/buildFullPath.js");
3229var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./node_modules/axios/lib/helpers/parseHeaders.js");
3230var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js");
3231var createError = __webpack_require__(/*! ../core/createError */ "./node_modules/axios/lib/core/createError.js");
3232
3233module.exports = function xhrAdapter(config) {
3234  return new Promise(function dispatchXhrRequest(resolve, reject) {
3235    var requestData = config.data;
3236    var requestHeaders = config.headers;
3237    var responseType = config.responseType;
3238
3239    if (utils.isFormData(requestData)) {
3240      delete requestHeaders['Content-Type']; // Let the browser set it
3241    }
3242
3243    var request = new XMLHttpRequest();
3244
3245    // HTTP basic authentication
3246    if (config.auth) {
3247      var username = config.auth.username || '';
3248      var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
3249      requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
3250    }
3251
3252    var fullPath = buildFullPath(config.baseURL, config.url);
3253    request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
3254
3255    // Set the request timeout in MS
3256    request.timeout = config.timeout;
3257
3258    function onloadend() {
3259      if (!request) {
3260        return;
3261      }
3262      // Prepare the response
3263      var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
3264      var responseData = !responseType || responseType === 'text' ||  responseType === 'json' ?
3265        request.responseText : request.response;
3266      var response = {
3267        data: responseData,
3268        status: request.status,
3269        statusText: request.statusText,
3270        headers: responseHeaders,
3271        config: config,
3272        request: request
3273      };
3274
3275      settle(resolve, reject, response);
3276
3277      // Clean up request
3278      request = null;
3279    }
3280
3281    if ('onloadend' in request) {
3282      // Use onloadend if available
3283      request.onloadend = onloadend;
3284    } else {
3285      // Listen for ready state to emulate onloadend
3286      request.onreadystatechange = function handleLoad() {
3287        if (!request || request.readyState !== 4) {
3288          return;
3289        }
3290
3291        // The request errored out and we didn't get a response, this will be
3292        // handled by onerror instead
3293        // With one exception: request that using file: protocol, most browsers
3294        // will return status as 0 even though it's a successful request
3295        if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
3296          return;
3297        }
3298        // readystate handler is calling before onerror or ontimeout handlers,
3299        // so we should call onloadend on the next 'tick'
3300        setTimeout(onloadend);
3301      };
3302    }
3303
3304    // Handle browser request cancellation (as opposed to a manual cancellation)
3305    request.onabort = function handleAbort() {
3306      if (!request) {
3307        return;
3308      }
3309
3310      reject(createError('Request aborted', config, 'ECONNABORTED', request));
3311
3312      // Clean up request
3313      request = null;
3314    };
3315
3316    // Handle low level network errors
3317    request.onerror = function handleError() {
3318      // Real errors are hidden from us by the browser
3319      // onerror should only fire if it's a network error
3320      reject(createError('Network Error', config, null, request));
3321
3322      // Clean up request
3323      request = null;
3324    };
3325
3326    // Handle timeout
3327    request.ontimeout = function handleTimeout() {
3328      var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
3329      if (config.timeoutErrorMessage) {
3330        timeoutErrorMessage = config.timeoutErrorMessage;
3331      }
3332      reject(createError(
3333        timeoutErrorMessage,
3334        config,
3335        config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
3336        request));
3337
3338      // Clean up request
3339      request = null;
3340    };
3341
3342    // Add xsrf header
3343    // This is only done if running in a standard browser environment.
3344    // Specifically not if we're in a web worker, or react-native.
3345    if (utils.isStandardBrowserEnv()) {
3346      // Add xsrf header
3347      var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
3348        cookies.read(config.xsrfCookieName) :
3349        undefined;
3350
3351      if (xsrfValue) {
3352        requestHeaders[config.xsrfHeaderName] = xsrfValue;
3353      }
3354    }
3355
3356    // Add headers to the request
3357    if ('setRequestHeader' in request) {
3358      utils.forEach(requestHeaders, function setRequestHeader(val, key) {
3359        if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
3360          // Remove Content-Type if data is undefined
3361          delete requestHeaders[key];
3362        } else {
3363          // Otherwise add header to the request
3364          request.setRequestHeader(key, val);
3365        }
3366      });
3367    }
3368
3369    // Add withCredentials to request if needed
3370    if (!utils.isUndefined(config.withCredentials)) {
3371      request.withCredentials = !!config.withCredentials;
3372    }
3373
3374    // Add responseType to request if needed
3375    if (responseType && responseType !== 'json') {
3376      request.responseType = config.responseType;
3377    }
3378
3379    // Handle progress if needed
3380    if (typeof config.onDownloadProgress === 'function') {
3381      request.addEventListener('progress', config.onDownloadProgress);
3382    }
3383
3384    // Not all browsers support upload events
3385    if (typeof config.onUploadProgress === 'function' && request.upload) {
3386      request.upload.addEventListener('progress', config.onUploadProgress);
3387    }
3388
3389    if (config.cancelToken) {
3390      // Handle cancellation
3391      config.cancelToken.promise.then(function onCanceled(cancel) {
3392        if (!request) {
3393          return;
3394        }
3395
3396        request.abort();
3397        reject(cancel);
3398        // Clean up request
3399        request = null;
3400      });
3401    }
3402
3403    if (!requestData) {
3404      requestData = null;
3405    }
3406
3407    // Send the request
3408    request.send(requestData);
3409  });
3410};
3411
3412
3413/***/ }),
3414
vendor: 2,383 bytes, lines 3415-3481
3415/***/ "./node_modules/axios/lib/axios.js":
3416/*!*****************************************!*\
3417  !*** ./node_modules/axios/lib/axios.js ***!
3418  \*****************************************/
3419/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3420
3421"use strict";
3422
3423
3424var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js");
3425var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js");
3426var Axios = __webpack_require__(/*! ./core/Axios */ "./node_modules/axios/lib/core/Axios.js");
3427var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js");
3428var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/axios/lib/defaults.js");
3429
3430/**
3431 * Create an instance of Axios
3432 *
3433 * @param {Object} defaultConfig The default config for the instance
3434 * @return {Axios} A new instance of Axios
3435 */
3436function createInstance(defaultConfig) {
3437  var context = new Axios(defaultConfig);
3438  var instance = bind(Axios.prototype.request, context);
3439
3440  // Copy axios.prototype to instance
3441  utils.extend(instance, Axios.prototype, context);
3442
3443  // Copy context to instance
3444  utils.extend(instance, context);
3445
3446  return instance;
3447}
3448
3449// Create the default instance to be exported
3450var axios = createInstance(defaults);
3451
3452// Expose Axios class to allow class inheritance
3453axios.Axios = Axios;
3454
3455// Factory for creating new instances
3456axios.create = function create(instanceConfig) {
3457  return createInstance(mergeConfig(axios.defaults, instanceConfig));
3458};
3459
3460// Expose Cancel & CancelToken
3461axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./node_modules/axios/lib/cancel/Cancel.js");
3462axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/axios/lib/cancel/CancelToken.js");
3463axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js");
3464
3465// Expose all/spread
3466axios.all = function all(promises) {
3467  return Promise.all(promises);
3468};
3469axios.spread = __webpack_require__(/*! ./helpers/spread */ "./node_modules/axios/lib/helpers/spread.js");
3470
3471// Expose isAxiosError
3472axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./node_modules/axios/lib/helpers/isAxiosError.js");
3473
3474module.exports = axios;
3475
3476// Allow use of default import syntax in TypeScript
3477module.exports["default"] = axios;
3478
3479
3480/***/ }),
3481
vendor: 636 bytes, lines 3482-3511
3482/***/ "./node_modules/axios/lib/cancel/Cancel.js":
3483/*!*************************************************!*\
3484  !*** ./node_modules/axios/lib/cancel/Cancel.js ***!
3485  \*************************************************/
3486/***/ ((module) => {
3487
3488"use strict";
3489
3490
3491/**
3492 * A `Cancel` is an object that is thrown when an operation is canceled.
3493 *
3494 * @class
3495 * @param {string=} message The message.
3496 */
3497function Cancel(message) {
3498  this.message = message;
3499}
3500
3501Cancel.prototype.toString = function toString() {
3502  return 'Cancel' + (this.message ? ': ' + this.message : '');
3503};
3504
3505Cancel.prototype.__CANCEL__ = true;
3506
3507module.exports = Cancel;
3508
3509
3510/***/ }),
3511
vendor: 1,619 bytes, lines 3512-3579
3512/***/ "./node_modules/axios/lib/cancel/CancelToken.js":
3513/*!******************************************************!*\
3514  !*** ./node_modules/axios/lib/cancel/CancelToken.js ***!
3515  \******************************************************/
3516/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3517
3518"use strict";
3519
3520
3521var Cancel = __webpack_require__(/*! ./Cancel */ "./node_modules/axios/lib/cancel/Cancel.js");
3522
3523/**
3524 * A `CancelToken` is an object that can be used to request cancellation of an operation.
3525 *
3526 * @class
3527 * @param {Function} executor The executor function.
3528 */
3529function CancelToken(executor) {
3530  if (typeof executor !== 'function') {
3531    throw new TypeError('executor must be a function.');
3532  }
3533
3534  var resolvePromise;
3535  this.promise = new Promise(function promiseExecutor(resolve) {
3536    resolvePromise = resolve;
3537  });
3538
3539  var token = this;
3540  executor(function cancel(message) {
3541    if (token.reason) {
3542      // Cancellation has already been requested
3543      return;
3544    }
3545
3546    token.reason = new Cancel(message);
3547    resolvePromise(token.reason);
3548  });
3549}
3550
3551/**
3552 * Throws a `Cancel` if cancellation has been requested.
3553 */
3554CancelToken.prototype.throwIfRequested = function throwIfRequested() {
3555  if (this.reason) {
3556    throw this.reason;
3557  }
3558};
3559
3560/**
3561 * Returns an object that contains a new `CancelToken` and a function that, when called,
3562 * cancels the `CancelToken`.
3563 */
3564CancelToken.source = function source() {
3565  var cancel;
3566  var token = new CancelToken(function executor(c) {
3567    cancel = c;
3568  });
3569  return {
3570    token: token,
3571    cancel: cancel
3572  };
3573};
3574
3575module.exports = CancelToken;
3576
3577
3578/***/ }),
3579
vendor: 361 bytes, lines 3580-3595
3580/***/ "./node_modules/axios/lib/cancel/isCancel.js":
3581/*!***************************************************!*\
3582  !*** ./node_modules/axios/lib/cancel/isCancel.js ***!
3583  \***************************************************/
3584/***/ ((module) => {
3585
3586"use strict";
3587
3588
3589module.exports = function isCancel(value) {
3590  return !!(value && value.__CANCEL__);
3591};
3592
3593
3594/***/ }),
3595
vendor: 4,919 bytes, lines 3596-3754
3596/***/ "./node_modules/axios/lib/core/Axios.js":
3597/*!**********************************************!*\
3598  !*** ./node_modules/axios/lib/core/Axios.js ***!
3599  \**********************************************/
3600/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3601
3602"use strict";
3603
3604
3605var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
3606var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js");
3607var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/axios/lib/core/InterceptorManager.js");
3608var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/axios/lib/core/dispatchRequest.js");
3609var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js");
3610var validator = __webpack_require__(/*! ../helpers/validator */ "./node_modules/axios/lib/helpers/validator.js");
3611
3612var validators = validator.validators;
3613/**
3614 * Create a new instance of Axios
3615 *
3616 * @param {Object} instanceConfig The default config for the instance
3617 */
3618function Axios(instanceConfig) {
3619  this.defaults = instanceConfig;
3620  this.interceptors = {
3621    request: new InterceptorManager(),
3622    response: new InterceptorManager()
3623  };
3624}
3625
3626/**
3627 * Dispatch a request
3628 *
3629 * @param {Object} config The config specific for this request (merged with this.defaults)
3630 */
3631Axios.prototype.request = function request(config) {
3632  /*eslint no-param-reassign:0*/
3633  // Allow for axios('example/url'[, config]) a la fetch API
3634  if (typeof config === 'string') {
3635    config = arguments[1] || {};
3636    config.url = arguments[0];
3637  } else {
3638    config = config || {};
3639  }
3640
3641  config = mergeConfig(this.defaults, config);
3642
3643  // Set config.method
3644  if (config.method) {
3645    config.method = config.method.toLowerCase();
3646  } else if (this.defaults.method) {
3647    config.method = this.defaults.method.toLowerCase();
3648  } else {
3649    config.method = 'get';
3650  }
3651
3652  var transitional = config.transitional;
3653
3654  if (transitional !== undefined) {
3655    validator.assertOptions(transitional, {
3656      silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
3657      forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
3658      clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
3659    }, false);
3660  }
3661
3662  // filter out skipped interceptors
3663  var requestInterceptorChain = [];
3664  var synchronousRequestInterceptors = true;
3665  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
3666    if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
3667      return;
3668    }
3669
3670    synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
3671
3672    requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
3673  });
3674
3675  var responseInterceptorChain = [];
3676  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
3677    responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
3678  });
3679
3680  var promise;
3681
3682  if (!synchronousRequestInterceptors) {
3683    var chain = [dispatchRequest, undefined];
3684
3685    Array.prototype.unshift.apply(chain, requestInterceptorChain);
3686    chain = chain.concat(responseInterceptorChain);
3687
3688    promise = Promise.resolve(config);
3689    while (chain.length) {
3690      promise = promise.then(chain.shift(), chain.shift());
3691    }
3692
3693    return promise;
3694  }
3695
3696
3697  var newConfig = config;
3698  while (requestInterceptorChain.length) {
3699    var onFulfilled = requestInterceptorChain.shift();
3700    var onRejected = requestInterceptorChain.shift();
3701    try {
3702      newConfig = onFulfilled(newConfig);
3703    } catch (error) {
3704      onRejected(error);
3705      break;
3706    }
3707  }
3708
3709  try {
3710    promise = dispatchRequest(newConfig);
3711  } catch (error) {
3712    return Promise.reject(error);
3713  }
3714
3715  while (responseInterceptorChain.length) {
3716    promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
3717  }
3718
3719  return promise;
3720};
3721
3722Axios.prototype.getUri = function getUri(config) {
3723  config = mergeConfig(this.defaults, config);
3724  return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
3725};
3726
3727// Provide aliases for supported request methods
3728utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3729  /*eslint func-names:0*/
3730  Axios.prototype[method] = function(url, config) {
3731    return this.request(mergeConfig(config || {}, {
3732      method: method,
3733      url: url,
3734      data: (config || {}).data
3735    }));
3736  };
3737});
3738
3739utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3740  /*eslint func-names:0*/
3741  Axios.prototype[method] = function(url, data, config) {
3742    return this.request(mergeConfig(config || {}, {
3743      method: method,
3744      url: url,
3745      data: data
3746    }));
3747  };
3748});
3749
3750module.exports = Axios;
3751
3752
3753/***/ }),
3754
vendor: 1,754 bytes, lines 3755-3819
3755/***/ "./node_modules/axios/lib/core/InterceptorManager.js":
3756/*!***********************************************************!*\
3757  !*** ./node_modules/axios/lib/core/InterceptorManager.js ***!
3758  \***********************************************************/
3759/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3760
3761"use strict";
3762
3763
3764var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
3765
3766function InterceptorManager() {
3767  this.handlers = [];
3768}
3769
3770/**
3771 * Add a new interceptor to the stack
3772 *
3773 * @param {Function} fulfilled The function to handle `then` for a `Promise`
3774 * @param {Function} rejected The function to handle `reject` for a `Promise`
3775 *
3776 * @return {Number} An ID used to remove interceptor later
3777 */
3778InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
3779  this.handlers.push({
3780    fulfilled: fulfilled,
3781    rejected: rejected,
3782    synchronous: options ? options.synchronous : false,
3783    runWhen: options ? options.runWhen : null
3784  });
3785  return this.handlers.length - 1;
3786};
3787
3788/**
3789 * Remove an interceptor from the stack
3790 *
3791 * @param {Number} id The ID that was returned by `use`
3792 */
3793InterceptorManager.prototype.eject = function eject(id) {
3794  if (this.handlers[id]) {
3795    this.handlers[id] = null;
3796  }
3797};
3798
3799/**
3800 * Iterate over all the registered interceptors
3801 *
3802 * This method is particularly useful for skipping over any
3803 * interceptors that may have become `null` calling `eject`.
3804 *
3805 * @param {Function} fn The function to call for each interceptor
3806 */
3807InterceptorManager.prototype.forEach = function forEach(fn) {
3808  utils.forEach(this.handlers, function forEachHandler(h) {
3809    if (h !== null) {
3810      fn(h);
3811    }
3812  });
3813};
3814
3815module.exports = InterceptorManager;
3816
3817
3818/***/ }),
3819
vendor: 1,149 bytes, lines 3820-3850
3820/***/ "./node_modules/axios/lib/core/buildFullPath.js":
3821/*!******************************************************!*\
3822  !*** ./node_modules/axios/lib/core/buildFullPath.js ***!
3823  \******************************************************/
3824/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3825
3826"use strict";
3827
3828
3829var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js");
3830var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./node_modules/axios/lib/helpers/combineURLs.js");
3831
3832/**
3833 * Creates a new URL by combining the baseURL with the requestedURL,
3834 * only when the requestedURL is not already an absolute URL.
3835 * If the requestURL is absolute, this function returns the requestedURL untouched.
3836 *
3837 * @param {string} baseURL The base URL
3838 * @param {string} requestedURL Absolute or relative URL to combine
3839 * @returns {string} The combined full path
3840 */
3841module.exports = function buildFullPath(baseURL, requestedURL) {
3842  if (baseURL && !isAbsoluteURL(requestedURL)) {
3843    return combineURLs(baseURL, requestedURL);
3844  }
3845  return requestedURL;
3846};
3847
3848
3849/***/ }),
3850
vendor: 1,000 bytes, lines 3851-3879
3851/***/ "./node_modules/axios/lib/core/createError.js":
3852/*!****************************************************!*\
3853  !*** ./node_modules/axios/lib/core/createError.js ***!
3854  \****************************************************/
3855/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3856
3857"use strict";
3858
3859
3860var enhanceError = __webpack_require__(/*! ./enhanceError */ "./node_modules/axios/lib/core/enhanceError.js");
3861
3862/**
3863 * Create an Error with the specified message, config, error code, request and response.
3864 *
3865 * @param {string} message The error message.
3866 * @param {Object} config The config.
3867 * @param {string} [code] The error code (for example, 'ECONNABORTED').
3868 * @param {Object} [request] The request.
3869 * @param {Object} [response] The response.
3870 * @returns {Error} The created error.
3871 */
3872module.exports = function createError(message, config, code, request, response) {
3873  var error = new Error(message);
3874  return enhanceError(error, config, code, request, response);
3875};
3876
3877
3878/***/ }),
3879
vendor: 2,557 bytes, lines 3880-3972
3880/***/ "./node_modules/axios/lib/core/dispatchRequest.js":
3881/*!********************************************************!*\
3882  !*** ./node_modules/axios/lib/core/dispatchRequest.js ***!
3883  \********************************************************/
3884/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3885
3886"use strict";
3887
3888
3889var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
3890var transformData = __webpack_require__(/*! ./transformData */ "./node_modules/axios/lib/core/transformData.js");
3891var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js");
3892var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/axios/lib/defaults.js");
3893
3894/**
3895 * Throws a `Cancel` if cancellation has been requested.
3896 */
3897function throwIfCancellationRequested(config) {
3898  if (config.cancelToken) {
3899    config.cancelToken.throwIfRequested();
3900  }
3901}
3902
3903/**
3904 * Dispatch a request to the server using the configured adapter.
3905 *
3906 * @param {object} config The config that is to be used for the request
3907 * @returns {Promise} The Promise to be fulfilled
3908 */
3909module.exports = function dispatchRequest(config) {
3910  throwIfCancellationRequested(config);
3911
3912  // Ensure headers exist
3913  config.headers = config.headers || {};
3914
3915  // Transform request data
3916  config.data = transformData.call(
3917    config,
3918    config.data,
3919    config.headers,
3920    config.transformRequest
3921  );
3922
3923  // Flatten headers
3924  config.headers = utils.merge(
3925    config.headers.common || {},
3926    config.headers[config.method] || {},
3927    config.headers
3928  );
3929
3930  utils.forEach(
3931    ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
3932    function cleanHeaderConfig(method) {
3933      delete config.headers[method];
3934    }
3935  );
3936
3937  var adapter = config.adapter || defaults.adapter;
3938
3939  return adapter(config).then(function onAdapterResolution(response) {
3940    throwIfCancellationRequested(config);
3941
3942    // Transform response data
3943    response.data = transformData.call(
3944      config,
3945      response.data,
3946      response.headers,
3947      config.transformResponse
3948    );
3949
3950    return response;
3951  }, function onAdapterRejection(reason) {
3952    if (!isCancel(reason)) {
3953      throwIfCancellationRequested(config);
3954
3955      // Transform response data
3956      if (reason && reason.response) {
3957        reason.response.data = transformData.call(
3958          config,
3959          reason.response.data,
3960          reason.response.headers,
3961          config.transformResponse
3962        );
3963      }
3964    }
3965
3966    return Promise.reject(reason);
3967  });
3968};
3969
3970
3971/***/ }),
3972
vendor: 1,316 bytes, lines 3973-4025
3973/***/ "./node_modules/axios/lib/core/enhanceError.js":
3974/*!*****************************************************!*\
3975  !*** ./node_modules/axios/lib/core/enhanceError.js ***!
3976  \*****************************************************/
3977/***/ ((module) => {
3978
3979"use strict";
3980
3981
3982/**
3983 * Update an Error with the specified config, error code, and response.
3984 *
3985 * @param {Error} error The error to update.
3986 * @param {Object} config The config.
3987 * @param {string} [code] The error code (for example, 'ECONNABORTED').
3988 * @param {Object} [request] The request.
3989 * @param {Object} [response] The response.
3990 * @returns {Error} The error.
3991 */
3992module.exports = function enhanceError(error, config, code, request, response) {
3993  error.config = config;
3994  if (code) {
3995    error.code = code;
3996  }
3997
3998  error.request = request;
3999  error.response = response;
4000  error.isAxiosError = true;
4001
4002  error.toJSON = function toJSON() {
4003    return {
4004      // Standard
4005      message: this.message,
4006      name: this.name,
4007      // Microsoft
4008      description: this.description,
4009      number: this.number,
4010      // Mozilla
4011      fileName: this.fileName,
4012      lineNumber: this.lineNumber,
4013      columnNumber: this.columnNumber,
4014      stack: this.stack,
4015      // Axios
4016      config: this.config,
4017      code: this.code
4018    };
4019  };
4020  return error;
4021};
4022
4023
4024/***/ }),
4025
vendor: 3,258 bytes, lines 4026-4123
4026/***/ "./node_modules/axios/lib/core/mergeConfig.js":
4027/*!****************************************************!*\
4028  !*** ./node_modules/axios/lib/core/mergeConfig.js ***!
4029  \****************************************************/
4030/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4031
4032"use strict";
4033
4034
4035var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js");
4036
4037/**
4038 * Config-specific merge-function which creates a new config-object
4039 * by merging two configuration objects together.
4040 *
4041 * @param {Object} config1
4042 * @param {Object} config2
4043 * @returns {Object} New object resulting from merging config2 to config1
4044 */
4045module.exports = function mergeConfig(config1, config2) {
4046  // eslint-disable-next-line no-param-reassign
4047  config2 = config2 || {};
4048  var config = {};
4049
4050  var valueFromConfig2Keys = ['url', 'method', 'data'];
4051  var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
4052  var defaultToConfig2Keys = [
4053    'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
4054    'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
4055    'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
4056    'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
4057    'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
4058  ];
4059  var directMergeKeys = ['validateStatus'];
4060
4061  function getMergedValue(target, source) {
4062    if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
4063      return utils.merge(target, source);
4064    } else if (utils.isPlainObject(source)) {
4065      return utils.merge({}, source);
4066    } else if (utils.isArray(source)) {
4067      return source.slice();
4068    }
4069    return source;
4070  }
4071
4072  function mergeDeepProperties(prop) {
4073    if (!utils.isUndefined(config2[prop])) {
4074      config[prop] = getMergedValue(config1[prop], config2[prop]);
4075    } else if (!utils.isUndefined(config1[prop])) {
4076      config[prop] = getMergedValue(undefined, config1[prop]);
4077    }
4078  }
4079
4080  utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
4081    if (!utils.isUndefined(config2[prop])) {
4082      config[prop] = getMergedValue(undefined, config2[prop]);
4083    }
4084  });
4085
4086  utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
4087
4088  utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
4089    if (!utils.isUndefined(config2[prop])) {
4090      config[prop] = getMergedValue(undefined, config2[prop]);
4091    } else if (!utils.isUndefined(config1[prop])) {
4092      config[prop] = getMergedValue(undefined, config1[prop]);
4093    }
4094  });
4095
4096  utils.forEach(directMergeKeys, function merge(prop) {
4097    if (prop in config2) {
4098      config[prop] = getMergedValue(config1[prop], config2[prop]);
4099    } else if (prop in config1) {
4100      config[prop] = getMergedValue(undefined, config1[prop]);
4101    }
4102  });
4103
4104  var axiosKeys = valueFromConfig2Keys
4105    .concat(mergeDeepPropertiesKeys)
4106    .concat(defaultToConfig2Keys)
4107    .concat(directMergeKeys);
4108
4109  var otherKeys = Object
4110    .keys(config1)
4111    .concat(Object.keys(config2))
4112    .filter(function filterAxiosKeys(key) {
4113      return axiosKeys.indexOf(key) === -1;
4114    });
4115
4116  utils.forEach(otherKeys, mergeDeepProperties);
4117
4118  return config;
4119};
4120
4121
4122/***/ }),
4123
vendor: 1,060 bytes, lines 4124-4159
4124/***/ "./node_modules/axios/lib/core/settle.js":
4125/*!***********************************************!*\
4126  !*** ./node_modules/axios/lib/core/settle.js ***!
4127  \***********************************************/
4128/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4129
4130"use strict";
4131
4132
4133var createError = __webpack_require__(/*! ./createError */ "./node_modules/axios/lib/core/createError.js");
4134
4135/**
4136 * Resolve or reject a Promise based on response status.
4137 *
4138 * @param {Function} resolve A function that resolves the promise.
4139 * @param {Function} reject A function that rejects the promise.
4140 * @param {object} response The response.
4141 */
4142module.exports = function settle(resolve, reject, response) {
4143  var validateStatus = response.config.validateStatus;
4144  if (!response.status || !validateStatus || validateStatus(response.status)) {
4145    resolve(response);
4146  } else {
4147    reject(createError(
4148      'Request failed with status code ' + response.status,
4149      response.config,
4150      null,
4151      response.request,
4152      response
4153    ));
4154  }
4155};
4156
4157
4158/***/ }),
4159
vendor: 1,066 bytes, lines 4160-4192
4160/***/ "./node_modules/axios/lib/core/transformData.js":
4161/*!******************************************************!*\
4162  !*** ./node_modules/axios/lib/core/transformData.js ***!
4163  \******************************************************/
4164/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4165
4166"use strict";
4167
4168
4169var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
4170var defaults = __webpack_require__(/*! ./../defaults */ "./node_modules/axios/lib/defaults.js");
4171
4172/**
4173 * Transform the data for a request or a response
4174 *
4175 * @param {Object|String} data The data to be transformed
4176 * @param {Array} headers The headers for the request or response
4177 * @param {Array|Function} fns A single function or Array of functions
4178 * @returns {*} The resulting transformed data
4179 */
4180module.exports = function transformData(data, headers, fns) {
4181  var context = this || defaults;
4182  /*eslint no-param-reassign:0*/
4183  utils.forEach(fns, function transform(fn) {
4184    data = fn.call(context, data, headers);
4185  });
4186
4187  return data;
4188};
4189
4190
4191/***/ }),
4192
vendor: 4,272 bytes, lines 4193-4338
4193/***/ "./node_modules/axios/lib/defaults.js":
4194/*!********************************************!*\
4195  !*** ./node_modules/axios/lib/defaults.js ***!
4196  \********************************************/
4197/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4198
4199"use strict";
4200/* provided dependency */ var process = __webpack_require__(/*! process/browser.js */ "./node_modules/process/browser.js");
4201
4202
4203var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js");
4204var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "./node_modules/axios/lib/helpers/normalizeHeaderName.js");
4205var enhanceError = __webpack_require__(/*! ./core/enhanceError */ "./node_modules/axios/lib/core/enhanceError.js");
4206
4207var DEFAULT_CONTENT_TYPE = {
4208  'Content-Type': 'application/x-www-form-urlencoded'
4209};
4210
4211function setContentTypeIfUnset(headers, value) {
4212  if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
4213    headers['Content-Type'] = value;
4214  }
4215}
4216
4217function getDefaultAdapter() {
4218  var adapter;
4219  if (typeof XMLHttpRequest !== 'undefined') {
4220    // For browsers use XHR adapter
4221    adapter = __webpack_require__(/*! ./adapters/xhr */ "./node_modules/axios/lib/adapters/xhr.js");
4222  } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
4223    // For node use HTTP adapter
4224    adapter = __webpack_require__(/*! ./adapters/http */ "./node_modules/axios/lib/adapters/xhr.js");
4225  }
4226  return adapter;
4227}
4228
4229function stringifySafely(rawValue, parser, encoder) {
4230  if (utils.isString(rawValue)) {
4231    try {
4232      (parser || JSON.parse)(rawValue);
4233      return utils.trim(rawValue);
4234    } catch (e) {
4235      if (e.name !== 'SyntaxError') {
4236        throw e;
4237      }
4238    }
4239  }
4240
4241  return (encoder || JSON.stringify)(rawValue);
4242}
4243
4244var defaults = {
4245
4246  transitional: {
4247    silentJSONParsing: true,
4248    forcedJSONParsing: true,
4249    clarifyTimeoutError: false
4250  },
4251
4252  adapter: getDefaultAdapter(),
4253
4254  transformRequest: [function transformRequest(data, headers) {
4255    normalizeHeaderName(headers, 'Accept');
4256    normalizeHeaderName(headers, 'Content-Type');
4257
4258    if (utils.isFormData(data) ||
4259      utils.isArrayBuffer(data) ||
4260      utils.isBuffer(data) ||
4261      utils.isStream(data) ||
4262      utils.isFile(data) ||
4263      utils.isBlob(data)
4264    ) {
4265      return data;
4266    }
4267    if (utils.isArrayBufferView(data)) {
4268      return data.buffer;
4269    }
4270    if (utils.isURLSearchParams(data)) {
4271      setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
4272      return data.toString();
4273    }
4274    if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
4275      setContentTypeIfUnset(headers, 'application/json');
4276      return stringifySafely(data);
4277    }
4278    return data;
4279  }],
4280
4281  transformResponse: [function transformResponse(data) {
4282    var transitional = this.transitional;
4283    var silentJSONParsing = transitional && transitional.silentJSONParsing;
4284    var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
4285    var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
4286
4287    if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
4288      try {
4289        return JSON.parse(data);
4290      } catch (e) {
4291        if (strictJSONParsing) {
4292          if (e.name === 'SyntaxError') {
4293            throw enhanceError(e, this, 'E_JSON_PARSE');
4294          }
4295          throw e;
4296        }
4297      }
4298    }
4299
4300    return data;
4301  }],
4302
4303  /**
4304   * A timeout in milliseconds to abort a request. If set to 0 (default) a
4305   * timeout is not created.
4306   */
4307  timeout: 0,
4308
4309  xsrfCookieName: 'XSRF-TOKEN',
4310  xsrfHeaderName: 'X-XSRF-TOKEN',
4311
4312  maxContentLength: -1,
4313  maxBodyLength: -1,
4314
4315  validateStatus: function validateStatus(status) {
4316    return status >= 200 && status < 300;
4317  }
4318};
4319
4320defaults.headers = {
4321  common: {
4322    'Accept': 'application/json, text/plain, */*'
4323  }
4324};
4325
4326utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
4327  defaults.headers[method] = {};
4328});
4329
4330utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
4331  defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
4332});
4333
4334module.exports = defaults;
4335
4336
4337/***/ }),
4338
vendor: 503 bytes, lines 4339-4360
4339/***/ "./node_modules/axios/lib/helpers/bind.js":
4340/*!************************************************!*\
4341  !*** ./node_modules/axios/lib/helpers/bind.js ***!
4342  \************************************************/
4343/***/ ((module) => {
4344
4345"use strict";
4346
4347
4348module.exports = function bind(fn, thisArg) {
4349  return function wrap() {
4350    var args = new Array(arguments.length);
4351    for (var i = 0; i < args.length; i++) {
4352      args[i] = arguments[i];
4353    }
4354    return fn.apply(thisArg, args);
4355  };
4356};
4357
4358
4359/***/ }),
4360
vendor: 2,007 bytes, lines 4361-4441
4361/***/ "./node_modules/axios/lib/helpers/buildURL.js":
4362/*!****************************************************!*\
4363  !*** ./node_modules/axios/lib/helpers/buildURL.js ***!
4364  \****************************************************/
4365/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4366
4367"use strict";
4368
4369
4370var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
4371
4372function encode(val) {
4373  return encodeURIComponent(val).
4374    replace(/%3A/gi, ':').
4375    replace(/%24/g, '$').
4376    replace(/%2C/gi, ',').
4377    replace(/%20/g, '+').
4378    replace(/%5B/gi, '[').
4379    replace(/%5D/gi, ']');
4380}
4381
4382/**
4383 * Build a URL by appending params to the end
4384 *
4385 * @param {string} url The base of the url (e.g., http://www.google.com)
4386 * @param {object} [params] The params to be appended
4387 * @returns {string} The formatted url
4388 */
4389module.exports = function buildURL(url, params, paramsSerializer) {
4390  /*eslint no-param-reassign:0*/
4391  if (!params) {
4392    return url;
4393  }
4394
4395  var serializedParams;
4396  if (paramsSerializer) {
4397    serializedParams = paramsSerializer(params);
4398  } else if (utils.isURLSearchParams(params)) {
4399    serializedParams = params.toString();
4400  } else {
4401    var parts = [];
4402
4403    utils.forEach(params, function serialize(val, key) {
4404      if (val === null || typeof val === 'undefined') {
4405        return;
4406      }
4407
4408      if (utils.isArray(val)) {
4409        key = key + '[]';
4410      } else {
4411        val = [val];
4412      }
4413
4414      utils.forEach(val, function parseValue(v) {
4415        if (utils.isDate(v)) {
4416          v = v.toISOString();
4417        } else if (utils.isObject(v)) {
4418          v = JSON.stringify(v);
4419        }
4420        parts.push(encode(key) + '=' + encode(v));
4421      });
4422    });
4423
4424    serializedParams = parts.join('&');
4425  }
4426
4427  if (serializedParams) {
4428    var hashmarkIndex = url.indexOf('#');
4429    if (hashmarkIndex !== -1) {
4430      url = url.slice(0, hashmarkIndex);
4431    }
4432
4433    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
4434  }
4435
4436  return url;
4437};
4438
4439
4440/***/ }),
4441
vendor: 655 bytes, lines 4442-4466
4442/***/ "./node_modules/axios/lib/helpers/combineURLs.js":
4443/*!*******************************************************!*\
4444  !*** ./node_modules/axios/lib/helpers/combineURLs.js ***!
4445  \*******************************************************/
4446/***/ ((module) => {
4447
4448"use strict";
4449
4450
4451/**
4452 * Creates a new URL by combining the specified URLs
4453 *
4454 * @param {string} baseURL The base URL
4455 * @param {string} relativeURL The relative URL
4456 * @returns {string} The combined URL
4457 */
4458module.exports = function combineURLs(baseURL, relativeURL) {
4459  return relativeURL
4460    ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
4461    : baseURL;
4462};
4463
4464
4465/***/ }),
4466
vendor: 1,794 bytes, lines 4467-4530
4467/***/ "./node_modules/axios/lib/helpers/cookies.js":
4468/*!***************************************************!*\
4469  !*** ./node_modules/axios/lib/helpers/cookies.js ***!
4470  \***************************************************/
4471/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4472
4473"use strict";
4474
4475
4476var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
4477
4478module.exports = (
4479  utils.isStandardBrowserEnv() ?
4480
4481  // Standard browser envs support document.cookie
4482    (function standardBrowserEnv() {
4483      return {
4484        write: function write(name, value, expires, path, domain, secure) {
4485          var cookie = [];
4486          cookie.push(name + '=' + encodeURIComponent(value));
4487
4488          if (utils.isNumber(expires)) {
4489            cookie.push('expires=' + new Date(expires).toGMTString());
4490          }
4491
4492          if (utils.isString(path)) {
4493            cookie.push('path=' + path);
4494          }
4495
4496          if (utils.isString(domain)) {
4497            cookie.push('domain=' + domain);
4498          }
4499
4500          if (secure === true) {
4501            cookie.push('secure');
4502          }
4503
4504          document.cookie = cookie.join('; ');
4505        },
4506
4507        read: function read(name) {
4508          var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
4509          return (match ? decodeURIComponent(match[3]) : null);
4510        },
4511
4512        remove: function remove(name) {
4513          this.write(name, '', Date.now() - 86400000);
4514        }
4515      };
4516    })() :
4517
4518  // Non standard browser env (web workers, react-native) lack needed support.
4519    (function nonStandardBrowserEnv() {
4520      return {
4521        write: function write() {},
4522        read: function read() { return null; },
4523        remove: function remove() {}
4524      };
4525    })()
4526);
4527
4528
4529/***/ }),
4530
vendor: 846 bytes, lines 4531-4555
4531/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js":
4532/*!*********************************************************!*\
4533  !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
4534  \*********************************************************/
4535/***/ ((module) => {
4536
4537"use strict";
4538
4539
4540/**
4541 * Determines whether the specified URL is absolute
4542 *
4543 * @param {string} url The URL to test
4544 * @returns {boolean} True if the specified URL is absolute, otherwise false
4545 */
4546module.exports = function isAbsoluteURL(url) {
4547  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
4548  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
4549  // by any combination of letters, digits, plus, period, or hyphen.
4550  return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
4551};
4552
4553
4554/***/ }),
4555
vendor: 622 bytes, lines 4556-4577
4556/***/ "./node_modules/axios/lib/helpers/isAxiosError.js":
4557/*!********************************************************!*\
4558  !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***!
4559  \********************************************************/
4560/***/ ((module) => {
4561
4562"use strict";
4563
4564
4565/**
4566 * Determines whether the payload is an error thrown by Axios
4567 *
4568 * @param {*} payload The value to test
4569 * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
4570 */
4571module.exports = function isAxiosError(payload) {
4572  return (typeof payload === 'object') && (payload.isAxiosError === true);
4573};
4574
4575
4576/***/ }),
4577
vendor: 2,696 bytes, lines 4578-4656
4578/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js":
4579/*!***********************************************************!*\
4580  !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
4581  \***********************************************************/
4582/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4583
4584"use strict";
4585
4586
4587var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
4588
4589module.exports = (
4590  utils.isStandardBrowserEnv() ?
4591
4592  // Standard browser envs have full support of the APIs needed to test
4593  // whether the request URL is of the same origin as current location.
4594    (function standardBrowserEnv() {
4595      var msie = /(msie|trident)/i.test(navigator.userAgent);
4596      var urlParsingNode = document.createElement('a');
4597      var originURL;
4598
4599      /**
4600    * Parse a URL to discover it's components
4601    *
4602    * @param {String} url The URL to be parsed
4603    * @returns {Object}
4604    */
4605      function resolveURL(url) {
4606        var href = url;
4607
4608        if (msie) {
4609        // IE needs attribute set twice to normalize properties
4610          urlParsingNode.setAttribute('href', href);
4611          href = urlParsingNode.href;
4612        }
4613
4614        urlParsingNode.setAttribute('href', href);
4615
4616        // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
4617        return {
4618          href: urlParsingNode.href,
4619          protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
4620          host: urlParsingNode.host,
4621          search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
4622          hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
4623          hostname: urlParsingNode.hostname,
4624          port: urlParsingNode.port,
4625          pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
4626            urlParsingNode.pathname :
4627            '/' + urlParsingNode.pathname
4628        };
4629      }
4630
4631      originURL = resolveURL(window.location.href);
4632
4633      /**
4634    * Determine if a URL shares the same origin as the current location
4635    *
4636    * @param {String} requestURL The URL to test
4637    * @returns {boolean} True if URL shares the same origin, otherwise false
4638    */
4639      return function isURLSameOrigin(requestURL) {
4640        var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
4641        return (parsed.protocol === originURL.protocol &&
4642            parsed.host === originURL.host);
4643      };
4644    })() :
4645
4646  // Non standard browser envs (web workers, react-native) lack needed support.
4647    (function nonStandardBrowserEnv() {
4648      return function isURLSameOrigin() {
4649        return true;
4650      };
4651    })()
4652);
4653
4654
4655/***/ }),
4656
vendor: 764 bytes, lines 4657-4679
4657/***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js":
4658/*!***************************************************************!*\
4659  !*** ./node_modules/axios/lib/helpers/normalizeHeaderName.js ***!
4660  \***************************************************************/
4661/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4662
4663"use strict";
4664
4665
4666var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js");
4667
4668module.exports = function normalizeHeaderName(headers, normalizedName) {
4669  utils.forEach(headers, function processHeader(value, name) {
4670    if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
4671      headers[normalizedName] = value;
4672      delete headers[name];
4673    }
4674  });
4675};
4676
4677
4678/***/ }),
4679
vendor: 1,772 bytes, lines 4680-4743
4680/***/ "./node_modules/axios/lib/helpers/parseHeaders.js":
4681/*!********************************************************!*\
4682  !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***!
4683  \********************************************************/
4684/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4685
4686"use strict";
4687
4688
4689var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
4690
4691// Headers whose duplicates are ignored by node
4692// c.f. https://nodejs.org/api/http.html#http_message_headers
4693var ignoreDuplicateOf = [
4694  'age', 'authorization', 'content-length', 'content-type', 'etag',
4695  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
4696  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
4697  'referer', 'retry-after', 'user-agent'
4698];
4699
4700/**
4701 * Parse headers into an object
4702 *
4703 * ```
4704 * Date: Wed, 27 Aug 2014 08:58:49 GMT
4705 * Content-Type: application/json
4706 * Connection: keep-alive
4707 * Transfer-Encoding: chunked
4708 * ```
4709 *
4710 * @param {String} headers Headers needing to be parsed
4711 * @returns {Object} Headers parsed into an object
4712 */
4713module.exports = function parseHeaders(headers) {
4714  var parsed = {};
4715  var key;
4716  var val;
4717  var i;
4718
4719  if (!headers) { return parsed; }
4720
4721  utils.forEach(headers.split('\n'), function parser(line) {
4722    i = line.indexOf(':');
4723    key = utils.trim(line.substr(0, i)).toLowerCase();
4724    val = utils.trim(line.substr(i + 1));
4725
4726    if (key) {
4727      if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
4728        return;
4729      }
4730      if (key === 'set-cookie') {
4731        parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
4732      } else {
4733        parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
4734      }
4735    }
4736  });
4737
4738  return parsed;
4739};
4740
4741
4742/***/ }),
4743
vendor: 819 bytes, lines 4744-4781
4744/***/ "./node_modules/axios/lib/helpers/spread.js":
4745/*!**************************************************!*\
4746  !*** ./node_modules/axios/lib/helpers/spread.js ***!
4747  \**************************************************/
4748/***/ ((module) => {
4749
4750"use strict";
4751
4752
4753/**
4754 * Syntactic sugar for invoking a function and expanding an array for arguments.
4755 *
4756 * Common use case would be to use `Function.prototype.apply`.
4757 *
4758 *  ```js
4759 *  function f(x, y, z) {}
4760 *  var args = [1, 2, 3];
4761 *  f.apply(null, args);
4762 *  ```
4763 *
4764 * With `spread` this example can be re-written.
4765 *
4766 *  ```js
4767 *  spread(function(x, y, z) {})([1, 2, 3]);
4768 *  ```
4769 *
4770 * @param {Function} callback
4771 * @returns {Function}
4772 */
4773module.exports = function spread(callback) {
4774  return function wrap(arr) {
4775    return callback.apply(null, arr);
4776  };
4777};
4778
4779
4780/***/ }),
4781
vendor: 3,159 bytes, lines 4782-4897
4782/***/ "./node_modules/axios/lib/helpers/validator.js":
4783/*!*****************************************************!*\
4784  !*** ./node_modules/axios/lib/helpers/validator.js ***!
4785  \*****************************************************/
4786/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4787
4788"use strict";
4789
4790
4791var pkg = __webpack_require__(/*! ./../../package.json */ "./node_modules/axios/package.json");
4792
4793var validators = {};
4794
4795// eslint-disable-next-line func-names
4796['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
4797  validators[type] = function validator(thing) {
4798    return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
4799  };
4800});
4801
4802var deprecatedWarnings = {};
4803var currentVerArr = pkg.version.split('.');
4804
4805/**
4806 * Compare package versions
4807 * @param {string} version
4808 * @param {string?} thanVersion
4809 * @returns {boolean}
4810 */
4811function isOlderVersion(version, thanVersion) {
4812  var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
4813  var destVer = version.split('.');
4814  for (var i = 0; i < 3; i++) {
4815    if (pkgVersionArr[i] > destVer[i]) {
4816      return true;
4817    } else if (pkgVersionArr[i] < destVer[i]) {
4818      return false;
4819    }
4820  }
4821  return false;
4822}
4823
4824/**
4825 * Transitional option validator
4826 * @param {function|boolean?} validator
4827 * @param {string?} version
4828 * @param {string} message
4829 * @returns {function}
4830 */
4831validators.transitional = function transitional(validator, version, message) {
4832  var isDeprecated = version && isOlderVersion(version);
4833
4834  function formatMessage(opt, desc) {
4835    return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
4836  }
4837
4838  // eslint-disable-next-line func-names
4839  return function(value, opt, opts) {
4840    if (validator === false) {
4841      throw new Error(formatMessage(opt, ' has been removed in ' + version));
4842    }
4843
4844    if (isDeprecated && !deprecatedWarnings[opt]) {
4845      deprecatedWarnings[opt] = true;
4846      // eslint-disable-next-line no-console
4847      console.warn(
4848        formatMessage(
4849          opt,
4850          ' has been deprecated since v' + version + ' and will be removed in the near future'
4851        )
4852      );
4853    }
4854
4855    return validator ? validator(value, opt, opts) : true;
4856  };
4857};
4858
4859/**
4860 * Assert object's properties type
4861 * @param {object} options
4862 * @param {object} schema
4863 * @param {boolean?} allowUnknown
4864 */
4865
4866function assertOptions(options, schema, allowUnknown) {
4867  if (typeof options !== 'object') {
4868    throw new TypeError('options must be an object');
4869  }
4870  var keys = Object.keys(options);
4871  var i = keys.length;
4872  while (i-- > 0) {
4873    var opt = keys[i];
4874    var validator = schema[opt];
4875    if (validator) {
4876      var value = options[opt];
4877      var result = value === undefined || validator(value, opt, options);
4878      if (result !== true) {
4879        throw new TypeError('option ' + opt + ' must be ' + result);
4880      }
4881      continue;
4882    }
4883    if (allowUnknown !== true) {
4884      throw Error('Unknown option ' + opt);
4885    }
4886  }
4887}
4888
4889module.exports = {
4890  isOlderVersion: isOlderVersion,
4891  assertOptions: assertOptions,
4892  validators: validators
4893};
4894
4895
4896/***/ }),
4897
vendor: 14,844 bytes, lines 4898-5463
4898/***/ "./node_modules/axios/lib/utils.js":
4899/*!*****************************************!*\
4900  !*** ./node_modules/axios/lib/utils.js ***!
4901  \*****************************************/
4902/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4903
4904"use strict";
4905
4906
4907var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js");
4908
4909// utils is a library of generic helper functions non-specific to axios
4910
4911var toString = Object.prototype.toString;
4912
4913/**
4914 * Determine if a value is an Array
4915 *
4916 * @param {Object} val The value to test
4917 * @returns {boolean} True if value is an Array, otherwise false
4918 */
4919function isArray(val) {
4920  return toString.call(val) === '[object Array]';
4921}
4922
4923/**
4924 * Determine if a value is undefined
4925 *
4926 * @param {Object} val The value to test
4927 * @returns {boolean} True if the value is undefined, otherwise false
4928 */
4929function isUndefined(val) {
4930  return typeof val === 'undefined';
4931}
4932
4933/**
4934 * Determine if a value is a Buffer
4935 *
4936 * @param {Object} val The value to test
4937 * @returns {boolean} True if value is a Buffer, otherwise false
4938 */
4939function isBuffer(val) {
4940  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
4941    && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
4942}
4943
4944/**
4945 * Determine if a value is an ArrayBuffer
4946 *
4947 * @param {Object} val The value to test
4948 * @returns {boolean} True if value is an ArrayBuffer, otherwise false
4949 */
4950function isArrayBuffer(val) {
4951  return toString.call(val) === '[object ArrayBuffer]';
4952}
4953
4954/**
4955 * Determine if a value is a FormData
4956 *
4957 * @param {Object} val The value to test
4958 * @returns {boolean} True if value is an FormData, otherwise false
4959 */
4960function isFormData(val) {
4961  return (typeof FormData !== 'undefined') && (val instanceof FormData);
4962}
4963
4964/**
4965 * Determine if a value is a view on an ArrayBuffer
4966 *
4967 * @param {Object} val The value to test
4968 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
4969 */
4970function isArrayBufferView(val) {
4971  var result;
4972  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
4973    result = ArrayBuffer.isView(val);
4974  } else {
4975    result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
4976  }
4977  return result;
4978}
4979
4980/**
4981 * Determine if a value is a String
4982 *
4983 * @param {Object} val The value to test
4984 * @returns {boolean} True if value is a String, otherwise false
4985 */
4986function isString(val) {
4987  return typeof val === 'string';
4988}
4989
4990/**
4991 * Determine if a value is a Number
4992 *
4993 * @param {Object} val The value to test
4994 * @returns {boolean} True if value is a Number, otherwise false
4995 */
4996function isNumber(val) {
4997  return typeof val === 'number';
4998}
4999
5000/**
5001 * Determine if a value is an Object
5002 *
5003 * @param {Object} val The value to test
5004 * @returns {boolean} True if value is an Object, otherwise false
5005 */
5006function isObject(val) {
5007  return val !== null && typeof val === 'object';
5008}
5009
5010/**
5011 * Determine if a value is a plain Object
5012 *
5013 * @param {Object} val The value to test
5014 * @return {boolean} True if value is a plain Object, otherwise false
5015 */
5016function isPlainObject(val) {
5017  if (toString.call(val) !== '[object Object]') {
5018    return false;
5019  }
5020
5021  var prototype = Object.getPrototypeOf(val);
5022  return prototype === null || prototype === Object.prototype;
5023}
5024
5025/**
5026 * Determine if a value is a Date
5027 *
5028 * @param {Object} val The value to test
5029 * @returns {boolean} True if value is a Date, otherwise false
5030 */
5031function isDate(val) {
5032  return toString.call(val) === '[object Date]';
5033}
5034
5035/**
5036 * Determine if a value is a File
5037 *
5038 * @param {Object} val The value to test
5039 * @returns {boolean} True if value is a File, otherwise false
5040 */
5041function isFile(val) {
5042  return toString.call(val) === '[object File]';
5043}
5044
5045/**
5046 * Determine if a value is a Blob
5047 *
5048 * @param {Object} val The value to test
5049 * @returns {boolean} True if value is a Blob, otherwise false
5050 */
5051function isBlob(val) {
5052  return toString.call(val) === '[object Blob]';
5053}
5054
5055/**
5056 * Determine if a value is a Function
5057 *
5058 * @param {Object} val The value to test
5059 * @returns {boolean} True if value is a Function, otherwise false
5060 */
5061function isFunction(val) {
5062  return toString.call(val) === '[object Function]';
5063}
5064
5065/**
5066 * Determine if a value is a Stream
5067 *
5068 * @param {Object} val The value to test
5069 * @returns {boolean} True if value is a Stream, otherwise false
5070 */
5071function isStream(val) {
5072  return isObject(val) && isFunction(val.pipe);
5073}
5074
5075/**
5076 * Determine if a value is a URLSearchParams object
5077 *
5078 * @param {Object} val The value to test
5079 * @returns {boolean} True if value is a URLSearchParams object, otherwise false
5080 */
5081function isURLSearchParams(val) {
5082  return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
5083}
5084
5085/**
5086 * Trim excess whitespace off the beginning and end of a string
5087 *
5088 * @param {String} str The String to trim
5089 * @returns {String} The String freed of excess whitespace
5090 */
5091function trim(str) {
5092  return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
5093}
5094
5095/**
5096 * Determine if we're running in a standard browser environment
5097 *
5098 * This allows axios to run in a web worker, and react-native.
5099 * Both environments support XMLHttpRequest, but not fully standard globals.
5100 *
5101 * web workers:
5102 *  typeof window -> undefined
5103 *  typeof document -> undefined
5104 *
5105 * react-native:
5106 *  navigator.product -> 'ReactNative'
5107 * nativescript
5108 *  navigator.product -> 'NativeScript' or 'NS'
5109 */
5110function isStandardBrowserEnv() {
5111  if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
5112                                           navigator.product === 'NativeScript' ||
5113                                           navigator.product === 'NS')) {
5114    return false;
5115  }
5116  return (
5117    typeof window !== 'undefined' &&
5118    typeof document !== 'undefined'
5119  );
5120}
5121
5122/**
5123 * Iterate over an Array or an Object invoking a function for each item.
5124 *
5125 * If `obj` is an Array callback will be called passing
5126 * the value, index, and complete array for each item.
5127 *
5128 * If 'obj' is an Object callback will be called passing
5129 * the value, key, and complete object for each property.
5130 *
5131 * @param {Object|Array} obj The object to iterate
5132 * @param {Function} fn The callback to invoke for each item
5133 */
5134function forEach(obj, fn) {
5135  // Don't bother if no value provided
5136  if (obj === null || typeof obj === 'undefined') {
5137    return;
5138  }
5139
5140  // Force an array if not already something iterable
5141  if (typeof obj !== 'object') {
5142    /*eslint no-param-reassign:0*/
5143    obj = [obj];
5144  }
5145
5146  if (isArray(obj)) {
5147    // Iterate over array values
5148    for (var i = 0, l = obj.length; i < l; i++) {
5149      fn.call(null, obj[i], i, obj);
5150    }
5151  } else {
5152    // Iterate over object keys
5153    for (var key in obj) {
5154      if (Object.prototype.hasOwnProperty.call(obj, key)) {
5155        fn.call(null, obj[key], key, obj);
5156      }
5157    }
5158  }
5159}
5160
5161/**
5162 * Accepts varargs expecting each argument to be an object, then
5163 * immutably merges the properties of each object and returns result.
5164 *
5165 * When multiple objects contain the same key the later object in
5166 * the arguments list will take precedence.
5167 *
5168 * Example:
5169 *
5170 * ```js
5171 * var result = merge({foo: 123}, {foo: 456});
5172 * console.log(result.foo); // outputs 456
5173 * ```
5174 *
5175 * @param {Object} obj1 Object to merge
5176 * @returns {Object} Result of all merge properties
5177 */
5178function merge(/* obj1, obj2, obj3, ... */) {
5179  var result = {};
5180  function assignValue(val, key) {
5181    if (isPlainObject(result[key]) && isPlainObject(val)) {
5182      result[key] = merge(result[key], val);
5183    } else if (isPlainObject(val)) {
5184      result[key] = merge({}, val);
5185    } else if (isArray(val)) {
5186      result[key] = val.slice();
5187    } else {
5188      result[key] = val;
5189    }
5190  }
5191
5192  for (var i = 0, l = arguments.length; i < l; i++) {
5193    forEach(arguments[i], assignValue);
5194  }
5195  return result;
5196}
5197
5198/**
5199 * Extends object a by mutably adding to it the properties of object b.
5200 *
5201 * @param {Object} a The object to be extended
5202 * @param {Object} b The object to copy properties from
5203 * @param {Object} thisArg The object to bind function to
5204 * @return {Object} The resulting value of object a
5205 */
5206function extend(a, b, thisArg) {
5207  forEach(b, function assignValue(val, key) {
5208    if (thisArg && typeof val === 'function') {
5209      a[key] = bind(val, thisArg);
5210    } else {
5211      a[key] = val;
5212    }
5213  });
5214  return a;
5215}
5216
5217/**
5218 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
5219 *
5220 * @param {string} content with BOM
5221 * @return {string} content value without BOM
5222 */
5223function stripBOM(content) {
5224  if (content.charCodeAt(0) === 0xFEFF) {
5225    content = content.slice(1);
5226  }
5227  return content;
5228}
5229
5230module.exports = {
5231  isArray: isArray,
5232  isArrayBuffer: isArrayBuffer,
5233  isBuffer: isBuffer,
5234  isFormData: isFormData,
5235  isArrayBufferView: isArrayBufferView,
5236  isString: isString,
5237  isNumber: isNumber,
5238  isObject: isObject,
5239  isPlainObject: isPlainObject,
5240  isUndefined: isUndefined,
5241  isDate: isDate,
5242  isFile: isFile,
5243  isBlob: isBlob,
5244  isFunction: isFunction,
5245  isStream: isStream,
5246  isURLSearchParams: isURLSearchParams,
5247  isStandardBrowserEnv: isStandardBrowserEnv,
5248  forEach: forEach,
5249  merge: merge,
5250  extend: extend,
5251  trim: trim,
5252  stripBOM: stripBOM
5253};
5254
5255
5256/***/ }),
5257
5258/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/AdminSupportChatComponent.vue?vue&type=script&lang=js&":
5259/*!********************************************************************************************************************************************************************************************************************************!*\
5260  !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/AdminSupportChatComponent.vue?vue&type=script&lang=js& ***!
5261  \********************************************************************************************************************************************************************************************************************************/
5262/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5263
5264"use strict";
5265__webpack_require__.r(__webpack_exports__);
5266/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5267/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
5268/* harmony export */ });
5269//
5270//
5271//
5272//
5273//
5274//
5275//
5276//
5277//
5278//
5279//
5280//
5281//
5282//
5283//
5284//
5285//
5286//
5287//
5288//
5289//
5290//
5291//
5292//
5293//
5294//
5295//
5296//
5297//
5298//
5299//
5300//
5301//
5302/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
5303  name: "admin-support-chat-component",
5304  // using EXACTLY this name is essential
5305  props: ['support_chat_room_id', 'admin'],
5306  data: function data() {
5307    return {
5308      messages: [],
5309      newMessage: '',
5310      users: [],
5311      activeUser: false,
5312      typingTimer: false,
5313      timer: ''
5314    };
5315  },
5316  ready: function ready() {
5317    var _this = this;
5318
5319    this.timer = setInterval(this.created, 1000);
5320    window.setInterval(function () {
5321      _this.created();
5322    }, 1000);
5323    Echo.join('support-chat').listen('SupportMsgSend', function (event) {
5324      _this.messages.push(event.data);
5325    });
5326  },
5327  created: function created() {
5328    var _this2 = this;
5329
5330    axios.get('/admin/support-chat/msgs/get/' + this.support_chat_room_id).then(function (response) {
5331      _this2.messages = response.data;
5332    });
5333    window.setInterval(function () {
5334      axios.get('/admin/support-chat/msgs/get/' + _this2.support_chat_room_id).then(function (response) {
5335        _this2.messages = response.data;
5336      });
5337    }, 1000);
5338  },
5339  methods: {
5340    sendMessage: function sendMessage() {
5341      var _this3 = this;
5342
5343      axios.post('/admin/support-chat/msgs/send', {
5344        support_chat_room_id: this.support_chat_room_id,
5345        message: this.newMessage
5346      });
5347      this.newMessage = '';
5348      axios.get('/admin/support-chat/msgs/get/' + this.support_chat_room_id).then(function (response) {
5349        _this3.messages = response.data;
5350      });
5351    }
5352  }
5353});
5354
5355/***/ }),
5356
5357/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/SupportChatFrontComponent.vue?vue&type=script&lang=js&":
5358/*!********************************************************************************************************************************************************************************************************************************!*\
5359  !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/SupportChatFrontComponent.vue?vue&type=script&lang=js& ***!
5360  \********************************************************************************************************************************************************************************************************************************/
5361/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5362
5363"use strict";
5364__webpack_require__.r(__webpack_exports__);
5365/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5366/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
5367/* harmony export */ });
5368//
5369//
5370//
5371//
5372//
5373//
5374//
5375//
5376//
5377//
5378//
5379//
5380//
5381//
5382//
5383//
5384//
5385//
5386//
5387//
5388//
5389//
5390//
5391//
5392//
5393//
5394//
5395//
5396//
5397//
5398//
5399//
5400//
5401//
5402//
5403//
5404//
5405//
5406//
5407//
5408/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
5409  name: "support-chat-component",
5410  // using EXACTLY this name is essential
5411  props: ['front_user', 'admin'],
5412  data: function data() {
5413    return {
5414      messages: [],
5415      newMessage: '',
5416      users: [],
5417      activeUser: false,
5418      typingTimer: false,
5419      timer: ''
5420    };
5421  },
5422  ready: function ready() {
5423    var _this = this;
5424
5425    this.timer = setInterval(this.created, 1000);
5426    window.setInterval(function () {
5427      _this.created();
5428    }, 1000);
5429    Echo.join('support-chat').listen('SupportMsgSend', function (event) {
5430      _this.messages.push(event.data);
5431    });
5432  },
5433  created: function created() {
5434    var _this2 = this;
5435
5436    axios.get('/get/support-chat/msgs').then(function (response) {
5437      _this2.messages = response.data;
5438    });
5439    window.setInterval(function () {
5440      axios.get('/get/support-chat/msgs').then(function (response) {
5441        _this2.messages = response.data;
5442      });
5443    }, 1000);
5444  },
5445  methods: {
5446    sendMessage: function sendMessage() {
5447      var _this3 = this;
5448
5449      axios.post('/send/support-chat/msgs', {
5450        front_user: this.front_user,
5451        to_id: this.admin,
5452        message: this.newMessage
5453      });
5454      this.newMessage = '';
5455      axios.get('/get/support-chat/msgs').then(function (response) {
5456        _this3.messages = response.data;
5457      });
5458    }
5459  }
5460});
5461
5462/***/ }),
5463
5464/***/ "./resources/js/app.js":
5465/*!*****************************!*\
5466  !*** ./resources/js/app.js ***!
5467  \*****************************/
5468/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5469
5470"use strict";
5471__webpack_require__.r(__webpack_exports__);
5472/* harmony import */ var vue_chat_scroll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue-chat-scroll */ "./node_modules/vue-chat-scroll/dist/vue-chat-scroll.js");
5473/* harmony import */ var vue_chat_scroll__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue_chat_scroll__WEBPACK_IMPORTED_MODULE_0__);
5474/**
5475 * First we will load all of this project's JavaScript dependencies which
5476 * includes Vue and other libraries. It is a great starting point when
5477 * building robust, powerful web applications using Vue and Laravel.
5478 */
5479__webpack_require__(/*! ./bootstrap */ "./resources/js/bootstrap.js");
5480
5481window.Vue = (__webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm.js")["default"]);
5482
5483Vue.use((vue_chat_scroll__WEBPACK_IMPORTED_MODULE_0___default()));
5484/**
5485 * The following block of code may be used to automatically register your
5486 * Vue components. It will recursively scan this directory for the Vue
5487 * components and automatically register them with their "basename".
5488 *
5489 * Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
5490 */
5491// const files = require.context('./', true, /\.vue$/i)
5492// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))
5493
5494Vue.component('support-chat-component', (__webpack_require__(/*! ./components/SupportChatFrontComponent.vue */ "./resources/js/components/SupportChatFrontComponent.vue")["default"]));
5495Vue.component('admin-support-chat-component', (__webpack_require__(/*! ./components/AdminSupportChatComponent.vue */ "./resources/js/components/AdminSupportChatComponent.vue")["default"]));
5496/**
5497 * Next, we will create a fresh Vue application instance and attach it to
5498 * the page. Then, you may begin adding components to this application
5499 * or customize the JavaScript scaffolding to fit your unique needs.
5500 */
5501
5502var app = new Vue({
5503  el: '#app'
5504});
5505
5506/***/ }),
5507
5508/***/ "./resources/js/bootstrap.js":
5509/*!***********************************!*\
5510  !*** ./resources/js/bootstrap.js ***!
5511  \***********************************/
5512/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5513
5514"use strict";
5515__webpack_require__.r(__webpack_exports__);
5516/* harmony import */ var laravel_echo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! laravel-echo */ "./node_modules/laravel-echo/dist/echo.js");
5517window._ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
5518
5519try {
5520  __webpack_require__(/*! bootstrap */ "./node_modules/bootstrap/dist/js/bootstrap.esm.js");
5521} catch (e) {}
5522/**
5523 * We'll load the axios HTTP library which allows us to easily issue requests
5524 * to our Laravel back-end. This library automatically handles sending the
5525 * CSRF token as a header based on the value of the "XSRF" token cookie.
5526 */
5527
5528
5529window.axios = __webpack_require__(/*! axios */ "./node_modules/axios/index.js");
5530window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
5531/**
5532 * Echo exposes an expressive API for subscribing to channels and listening
5533 * for events that are broadcast by Laravel. Echo and event broadcasting
5534 * allows your team to easily build robust real-time web applications.
5535 */
5536
5537
5538window.Pusher = __webpack_require__(/*! pusher-js */ "./node_modules/pusher-js/dist/web/pusher.js");
5539window.Echo = new laravel_echo__WEBPACK_IMPORTED_MODULE_0__["default"]({
5540  broadcaster: 'pusher',
5541  key: "d68c729a57afa7ab83b4",
5542  cluster: "ap2",
5543  forceTLS: true
5544});
5545
5546/***/ }),
5547
vendor: 141,348 bytes, lines 5548-10574
5548/***/ "./node_modules/bootstrap/dist/js/bootstrap.esm.js":
5549/*!*********************************************************!*\
5550  !*** ./node_modules/bootstrap/dist/js/bootstrap.esm.js ***!
5551  \*********************************************************/
5552/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5553
5554"use strict";
5555__webpack_require__.r(__webpack_exports__);
5556/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5557/* harmony export */   "Alert": () => (/* binding */ Alert),
5558/* harmony export */   "Button": () => (/* binding */ Button),
5559/* harmony export */   "Carousel": () => (/* binding */ Carousel),
5560/* harmony export */   "Collapse": () => (/* binding */ Collapse),
5561/* harmony export */   "Dropdown": () => (/* binding */ Dropdown),
5562/* harmony export */   "Modal": () => (/* binding */ Modal),
5563/* harmony export */   "Offcanvas": () => (/* binding */ Offcanvas),
5564/* harmony export */   "Popover": () => (/* binding */ Popover),
5565/* harmony export */   "ScrollSpy": () => (/* binding */ ScrollSpy),
5566/* harmony export */   "Tab": () => (/* binding */ Tab),
5567/* harmony export */   "Toast": () => (/* binding */ Toast),
5568/* harmony export */   "Tooltip": () => (/* binding */ Tooltip)
5569/* harmony export */ });
5570/* harmony import */ var _popperjs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @popperjs/core */ "./node_modules/@popperjs/core/lib/index.js");
5571/* harmony import */ var _popperjs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @popperjs/core */ "./node_modules/@popperjs/core/lib/popper.js");
5572/*!
5573  * Bootstrap v5.1.3 (https://getbootstrap.com/)
5574  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
5575  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5576  */
5577
5578
5579/**
5580 * --------------------------------------------------------------------------
5581 * Bootstrap (v5.1.3): util/index.js
5582 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5583 * --------------------------------------------------------------------------
5584 */
5585const MAX_UID = 1000000;
5586const MILLISECONDS_MULTIPLIER = 1000;
5587const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
5588
5589const toType = obj => {
5590  if (obj === null || obj === undefined) {
5591    return `${obj}`;
5592  }
5593
5594  return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
5595};
5596/**
5597 * --------------------------------------------------------------------------
5598 * Public Util Api
5599 * --------------------------------------------------------------------------
5600 */
5601
5602
5603const getUID = prefix => {
5604  do {
5605    prefix += Math.floor(Math.random() * MAX_UID);
5606  } while (document.getElementById(prefix));
5607
5608  return prefix;
5609};
5610
5611const getSelector = element => {
5612  let selector = element.getAttribute('data-bs-target');
5613
5614  if (!selector || selector === '#') {
5615    let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
5616    // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
5617    // `document.querySelector` will rightfully complain it is invalid.
5618    // See https://github.com/twbs/bootstrap/issues/32273
5619
5620    if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
5621      return null;
5622    } // Just in case some CMS puts out a full URL with the anchor appended
5623
5624
5625    if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
5626      hrefAttr = `#${hrefAttr.split('#')[1]}`;
5627    }
5628
5629    selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
5630  }
5631
5632  return selector;
5633};
5634
5635const getSelectorFromElement = element => {
5636  const selector = getSelector(element);
5637
5638  if (selector) {
5639    return document.querySelector(selector) ? selector : null;
5640  }
5641
5642  return null;
5643};
5644
5645const getElementFromSelector = element => {
5646  const selector = getSelector(element);
5647  return selector ? document.querySelector(selector) : null;
5648};
5649
5650const getTransitionDurationFromElement = element => {
5651  if (!element) {
5652    return 0;
5653  } // Get transition-duration of the element
5654
5655
5656  let {
5657    transitionDuration,
5658    transitionDelay
5659  } = window.getComputedStyle(element);
5660  const floatTransitionDuration = Number.parseFloat(transitionDuration);
5661  const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
5662
5663  if (!floatTransitionDuration && !floatTransitionDelay) {
5664    return 0;
5665  } // If multiple durations are defined, take the first
5666
5667
5668  transitionDuration = transitionDuration.split(',')[0];
5669  transitionDelay = transitionDelay.split(',')[0];
5670  return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
5671};
5672
5673const triggerTransitionEnd = element => {
5674  element.dispatchEvent(new Event(TRANSITION_END));
5675};
5676
5677const isElement = obj => {
5678  if (!obj || typeof obj !== 'object') {
5679    return false;
5680  }
5681
5682  if (typeof obj.jquery !== 'undefined') {
5683    obj = obj[0];
5684  }
5685
5686  return typeof obj.nodeType !== 'undefined';
5687};
5688
5689const getElement = obj => {
5690  if (isElement(obj)) {
5691    // it's a jQuery object or a node element
5692    return obj.jquery ? obj[0] : obj;
5693  }
5694
5695  if (typeof obj === 'string' && obj.length > 0) {
5696    return document.querySelector(obj);
5697  }
5698
5699  return null;
5700};
5701
5702const typeCheckConfig = (componentName, config, configTypes) => {
5703  Object.keys(configTypes).forEach(property => {
5704    const expectedTypes = configTypes[property];
5705    const value = config[property];
5706    const valueType = value && isElement(value) ? 'element' : toType(value);
5707
5708    if (!new RegExp(expectedTypes).test(valueType)) {
5709      throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
5710    }
5711  });
5712};
5713
5714const isVisible = element => {
5715  if (!isElement(element) || element.getClientRects().length === 0) {
5716    return false;
5717  }
5718
5719  return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
5720};
5721
5722const isDisabled = element => {
5723  if (!element || element.nodeType !== Node.ELEMENT_NODE) {
5724    return true;
5725  }
5726
5727  if (element.classList.contains('disabled')) {
5728    return true;
5729  }
5730
5731  if (typeof element.disabled !== 'undefined') {
5732    return element.disabled;
5733  }
5734
5735  return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
5736};
5737
5738const findShadowRoot = element => {
5739  if (!document.documentElement.attachShadow) {
5740    return null;
5741  } // Can find the shadow root otherwise it'll return the document
5742
5743
5744  if (typeof element.getRootNode === 'function') {
5745    const root = element.getRootNode();
5746    return root instanceof ShadowRoot ? root : null;
5747  }
5748
5749  if (element instanceof ShadowRoot) {
5750    return element;
5751  } // when we don't find a shadow root
5752
5753
5754  if (!element.parentNode) {
5755    return null;
5756  }
5757
5758  return findShadowRoot(element.parentNode);
5759};
5760
5761const noop = () => {};
5762/**
5763 * Trick to restart an element's animation
5764 *
5765 * @param {HTMLElement} element
5766 * @return void
5767 *
5768 * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
5769 */
5770
5771
5772const reflow = element => {
5773  // eslint-disable-next-line no-unused-expressions
5774  element.offsetHeight;
5775};
5776
5777const getjQuery = () => {
5778  const {
5779    jQuery
5780  } = window;
5781
5782  if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
5783    return jQuery;
5784  }
5785
5786  return null;
5787};
5788
5789const DOMContentLoadedCallbacks = [];
5790
5791const onDOMContentLoaded = callback => {
5792  if (document.readyState === 'loading') {
5793    // add listener on the first call when the document is in loading state
5794    if (!DOMContentLoadedCallbacks.length) {
5795      document.addEventListener('DOMContentLoaded', () => {
5796        DOMContentLoadedCallbacks.forEach(callback => callback());
5797      });
5798    }
5799
5800    DOMContentLoadedCallbacks.push(callback);
5801  } else {
5802    callback();
5803  }
5804};
5805
5806const isRTL = () => document.documentElement.dir === 'rtl';
5807
5808const defineJQueryPlugin = plugin => {
5809  onDOMContentLoaded(() => {
5810    const $ = getjQuery();
5811    /* istanbul ignore if */
5812
5813    if ($) {
5814      const name = plugin.NAME;
5815      const JQUERY_NO_CONFLICT = $.fn[name];
5816      $.fn[name] = plugin.jQueryInterface;
5817      $.fn[name].Constructor = plugin;
5818
5819      $.fn[name].noConflict = () => {
5820        $.fn[name] = JQUERY_NO_CONFLICT;
5821        return plugin.jQueryInterface;
5822      };
5823    }
5824  });
5825};
5826
5827const execute = callback => {
5828  if (typeof callback === 'function') {
5829    callback();
5830  }
5831};
5832
5833const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
5834  if (!waitForTransition) {
5835    execute(callback);
5836    return;
5837  }
5838
5839  const durationPadding = 5;
5840  const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
5841  let called = false;
5842
5843  const handler = ({
5844    target
5845  }) => {
5846    if (target !== transitionElement) {
5847      return;
5848    }
5849
5850    called = true;
5851    transitionElement.removeEventListener(TRANSITION_END, handler);
5852    execute(callback);
5853  };
5854
5855  transitionElement.addEventListener(TRANSITION_END, handler);
5856  setTimeout(() => {
5857    if (!called) {
5858      triggerTransitionEnd(transitionElement);
5859    }
5860  }, emulatedDuration);
5861};
5862/**
5863 * Return the previous/next element of a list.
5864 *
5865 * @param {array} list    The list of elements
5866 * @param activeElement   The active element
5867 * @param shouldGetNext   Choose to get next or previous element
5868 * @param isCycleAllowed
5869 * @return {Element|elem} The proper element
5870 */
5871
5872
5873const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
5874  let index = list.indexOf(activeElement); // if the element does not exist in the list return an element depending on the direction and if cycle is allowed
5875
5876  if (index === -1) {
5877    return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0];
5878  }
5879
5880  const listLength = list.length;
5881  index += shouldGetNext ? 1 : -1;
5882
5883  if (isCycleAllowed) {
5884    index = (index + listLength) % listLength;
5885  }
5886
5887  return list[Math.max(0, Math.min(index, listLength - 1))];
5888};
5889
5890/**
5891 * --------------------------------------------------------------------------
5892 * Bootstrap (v5.1.3): dom/event-handler.js
5893 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5894 * --------------------------------------------------------------------------
5895 */
5896/**
5897 * ------------------------------------------------------------------------
5898 * Constants
5899 * ------------------------------------------------------------------------
5900 */
5901
5902const namespaceRegex = /[^.]*(?=\..*)\.|.*/;
5903const stripNameRegex = /\..*/;
5904const stripUidRegex = /::\d+$/;
5905const eventRegistry = {}; // Events storage
5906
5907let uidEvent = 1;
5908const customEvents = {
5909  mouseenter: 'mouseover',
5910  mouseleave: 'mouseout'
5911};
5912const customEventsRegex = /^(mouseenter|mouseleave)/i;
5913const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
5914/**
5915 * ------------------------------------------------------------------------
5916 * Private methods
5917 * ------------------------------------------------------------------------
5918 */
5919
5920function getUidEvent(element, uid) {
5921  return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
5922}
5923
5924function getEvent(element) {
5925  const uid = getUidEvent(element);
5926  element.uidEvent = uid;
5927  eventRegistry[uid] = eventRegistry[uid] || {};
5928  return eventRegistry[uid];
5929}
5930
5931function bootstrapHandler(element, fn) {
5932  return function handler(event) {
5933    event.delegateTarget = element;
5934
5935    if (handler.oneOff) {
5936      EventHandler.off(element, event.type, fn);
5937    }
5938
5939    return fn.apply(element, [event]);
5940  };
5941}
5942
5943function bootstrapDelegationHandler(element, selector, fn) {
5944  return function handler(event) {
5945    const domElements = element.querySelectorAll(selector);
5946
5947    for (let {
5948      target
5949    } = event; target && target !== this; target = target.parentNode) {
5950      for (let i = domElements.length; i--;) {
5951        if (domElements[i] === target) {
5952          event.delegateTarget = target;
5953
5954          if (handler.oneOff) {
5955            EventHandler.off(element, event.type, selector, fn);
5956          }
5957
5958          return fn.apply(target, [event]);
5959        }
5960      }
5961    } // To please ESLint
5962
5963
5964    return null;
5965  };
5966}
5967
5968function findHandler(events, handler, delegationSelector = null) {
5969  const uidEventList = Object.keys(events);
5970
5971  for (let i = 0, len = uidEventList.length; i < len; i++) {
5972    const event = events[uidEventList[i]];
5973
5974    if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
5975      return event;
5976    }
5977  }
5978
5979  return null;
5980}
5981
5982function normalizeParams(originalTypeEvent, handler, delegationFn) {
5983  const delegation = typeof handler === 'string';
5984  const originalHandler = delegation ? delegationFn : handler;
5985  let typeEvent = getTypeEvent(originalTypeEvent);
5986  const isNative = nativeEvents.has(typeEvent);
5987
5988  if (!isNative) {
5989    typeEvent = originalTypeEvent;
5990  }
5991
5992  return [delegation, originalHandler, typeEvent];
5993}
5994
5995function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
5996  if (typeof originalTypeEvent !== 'string' || !element) {
5997    return;
5998  }
5999
6000  if (!handler) {
6001    handler = delegationFn;
6002    delegationFn = null;
6003  } // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
6004  // this prevents the handler from being dispatched the same way as mouseover or mouseout does
6005
6006
6007  if (customEventsRegex.test(originalTypeEvent)) {
6008    const wrapFn = fn => {
6009      return function (event) {
6010        if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {
6011          return fn.call(this, event);
6012        }
6013      };
6014    };
6015
6016    if (delegationFn) {
6017      delegationFn = wrapFn(delegationFn);
6018    } else {
6019      handler = wrapFn(handler);
6020    }
6021  }
6022
6023  const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
6024  const events = getEvent(element);
6025  const handlers = events[typeEvent] || (events[typeEvent] = {});
6026  const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
6027
6028  if (previousFn) {
6029    previousFn.oneOff = previousFn.oneOff && oneOff;
6030    return;
6031  }
6032
6033  const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
6034  const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
6035  fn.delegationSelector = delegation ? handler : null;
6036  fn.originalHandler = originalHandler;
6037  fn.oneOff = oneOff;
6038  fn.uidEvent = uid;
6039  handlers[uid] = fn;
6040  element.addEventListener(typeEvent, fn, delegation);
6041}
6042
6043function removeHandler(element, events, typeEvent, handler, delegationSelector) {
6044  const fn = findHandler(events[typeEvent], handler, delegationSelector);
6045
6046  if (!fn) {
6047    return;
6048  }
6049
6050  element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
6051  delete events[typeEvent][fn.uidEvent];
6052}
6053
6054function removeNamespacedHandlers(element, events, typeEvent, namespace) {
6055  const storeElementEvent = events[typeEvent] || {};
6056  Object.keys(storeElementEvent).forEach(handlerKey => {
6057    if (handlerKey.includes(namespace)) {
6058      const event = storeElementEvent[handlerKey];
6059      removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
6060    }
6061  });
6062}
6063
6064function getTypeEvent(event) {
6065  // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
6066  event = event.replace(stripNameRegex, '');
6067  return customEvents[event] || event;
6068}
6069
6070const EventHandler = {
6071  on(element, event, handler, delegationFn) {
6072    addHandler(element, event, handler, delegationFn, false);
6073  },
6074
6075  one(element, event, handler, delegationFn) {
6076    addHandler(element, event, handler, delegationFn, true);
6077  },
6078
6079  off(element, originalTypeEvent, handler, delegationFn) {
6080    if (typeof originalTypeEvent !== 'string' || !element) {
6081      return;
6082    }
6083
6084    const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
6085    const inNamespace = typeEvent !== originalTypeEvent;
6086    const events = getEvent(element);
6087    const isNamespace = originalTypeEvent.startsWith('.');
6088
6089    if (typeof originalHandler !== 'undefined') {
6090      // Simplest case: handler is passed, remove that listener ONLY.
6091      if (!events || !events[typeEvent]) {
6092        return;
6093      }
6094
6095      removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
6096      return;
6097    }
6098
6099    if (isNamespace) {
6100      Object.keys(events).forEach(elementEvent => {
6101        removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
6102      });
6103    }
6104
6105    const storeElementEvent = events[typeEvent] || {};
6106    Object.keys(storeElementEvent).forEach(keyHandlers => {
6107      const handlerKey = keyHandlers.replace(stripUidRegex, '');
6108
6109      if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
6110        const event = storeElementEvent[keyHandlers];
6111        removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
6112      }
6113    });
6114  },
6115
6116  trigger(element, event, args) {
6117    if (typeof event !== 'string' || !element) {
6118      return null;
6119    }
6120
6121    const $ = getjQuery();
6122    const typeEvent = getTypeEvent(event);
6123    const inNamespace = event !== typeEvent;
6124    const isNative = nativeEvents.has(typeEvent);
6125    let jQueryEvent;
6126    let bubbles = true;
6127    let nativeDispatch = true;
6128    let defaultPrevented = false;
6129    let evt = null;
6130
6131    if (inNamespace && $) {
6132      jQueryEvent = $.Event(event, args);
6133      $(element).trigger(jQueryEvent);
6134      bubbles = !jQueryEvent.isPropagationStopped();
6135      nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
6136      defaultPrevented = jQueryEvent.isDefaultPrevented();
6137    }
6138
6139    if (isNative) {
6140      evt = document.createEvent('HTMLEvents');
6141      evt.initEvent(typeEvent, bubbles, true);
6142    } else {
6143      evt = new CustomEvent(event, {
6144        bubbles,
6145        cancelable: true
6146      });
6147    } // merge custom information in our event
6148
6149
6150    if (typeof args !== 'undefined') {
6151      Object.keys(args).forEach(key => {
6152        Object.defineProperty(evt, key, {
6153          get() {
6154            return args[key];
6155          }
6156
6157        });
6158      });
6159    }
6160
6161    if (defaultPrevented) {
6162      evt.preventDefault();
6163    }
6164
6165    if (nativeDispatch) {
6166      element.dispatchEvent(evt);
6167    }
6168
6169    if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
6170      jQueryEvent.preventDefault();
6171    }
6172
6173    return evt;
6174  }
6175
6176};
6177
6178/**
6179 * --------------------------------------------------------------------------
6180 * Bootstrap (v5.1.3): dom/data.js
6181 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6182 * --------------------------------------------------------------------------
6183 */
6184
6185/**
6186 * ------------------------------------------------------------------------
6187 * Constants
6188 * ------------------------------------------------------------------------
6189 */
6190const elementMap = new Map();
6191const Data = {
6192  set(element, key, instance) {
6193    if (!elementMap.has(element)) {
6194      elementMap.set(element, new Map());
6195    }
6196
6197    const instanceMap = elementMap.get(element); // make it clear we only want one instance per element
6198    // can be removed later when multiple key/instances are fine to be used
6199
6200    if (!instanceMap.has(key) && instanceMap.size !== 0) {
6201      // eslint-disable-next-line no-console
6202      console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
6203      return;
6204    }
6205
6206    instanceMap.set(key, instance);
6207  },
6208
6209  get(element, key) {
6210    if (elementMap.has(element)) {
6211      return elementMap.get(element).get(key) || null;
6212    }
6213
6214    return null;
6215  },
6216
6217  remove(element, key) {
6218    if (!elementMap.has(element)) {
6219      return;
6220    }
6221
6222    const instanceMap = elementMap.get(element);
6223    instanceMap.delete(key); // free up element references if there are no instances left for an element
6224
6225    if (instanceMap.size === 0) {
6226      elementMap.delete(element);
6227    }
6228  }
6229
6230};
6231
6232/**
6233 * --------------------------------------------------------------------------
6234 * Bootstrap (v5.1.3): base-component.js
6235 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6236 * --------------------------------------------------------------------------
6237 */
6238/**
6239 * ------------------------------------------------------------------------
6240 * Constants
6241 * ------------------------------------------------------------------------
6242 */
6243
6244const VERSION = '5.1.3';
6245
6246class BaseComponent {
6247  constructor(element) {
6248    element = getElement(element);
6249
6250    if (!element) {
6251      return;
6252    }
6253
6254    this._element = element;
6255    Data.set(this._element, this.constructor.DATA_KEY, this);
6256  }
6257
6258  dispose() {
6259    Data.remove(this._element, this.constructor.DATA_KEY);
6260    EventHandler.off(this._element, this.constructor.EVENT_KEY);
6261    Object.getOwnPropertyNames(this).forEach(propertyName => {
6262      this[propertyName] = null;
6263    });
6264  }
6265
6266  _queueCallback(callback, element, isAnimated = true) {
6267    executeAfterTransition(callback, element, isAnimated);
6268  }
6269  /** Static */
6270
6271
6272  static getInstance(element) {
6273    return Data.get(getElement(element), this.DATA_KEY);
6274  }
6275
6276  static getOrCreateInstance(element, config = {}) {
6277    return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
6278  }
6279
6280  static get VERSION() {
6281    return VERSION;
6282  }
6283
6284  static get NAME() {
6285    throw new Error('You have to implement the static method "NAME", for each component!');
6286  }
6287
6288  static get DATA_KEY() {
6289    return `bs.${this.NAME}`;
6290  }
6291
6292  static get EVENT_KEY() {
6293    return `.${this.DATA_KEY}`;
6294  }
6295
6296}
6297
6298/**
6299 * --------------------------------------------------------------------------
6300 * Bootstrap (v5.1.3): util/component-functions.js
6301 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6302 * --------------------------------------------------------------------------
6303 */
6304
6305const enableDismissTrigger = (component, method = 'hide') => {
6306  const clickEvent = `click.dismiss${component.EVENT_KEY}`;
6307  const name = component.NAME;
6308  EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
6309    if (['A', 'AREA'].includes(this.tagName)) {
6310      event.preventDefault();
6311    }
6312
6313    if (isDisabled(this)) {
6314      return;
6315    }
6316
6317    const target = getElementFromSelector(this) || this.closest(`.${name}`);
6318    const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
6319
6320    instance[method]();
6321  });
6322};
6323
6324/**
6325 * --------------------------------------------------------------------------
6326 * Bootstrap (v5.1.3): alert.js
6327 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6328 * --------------------------------------------------------------------------
6329 */
6330/**
6331 * ------------------------------------------------------------------------
6332 * Constants
6333 * ------------------------------------------------------------------------
6334 */
6335
6336const NAME$d = 'alert';
6337const DATA_KEY$c = 'bs.alert';
6338const EVENT_KEY$c = `.${DATA_KEY$c}`;
6339const EVENT_CLOSE = `close${EVENT_KEY$c}`;
6340const EVENT_CLOSED = `closed${EVENT_KEY$c}`;
6341const CLASS_NAME_FADE$5 = 'fade';
6342const CLASS_NAME_SHOW$8 = 'show';
6343/**
6344 * ------------------------------------------------------------------------
6345 * Class Definition
6346 * ------------------------------------------------------------------------
6347 */
6348
6349class Alert extends BaseComponent {
6350  // Getters
6351  static get NAME() {
6352    return NAME$d;
6353  } // Public
6354
6355
6356  close() {
6357    const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
6358
6359    if (closeEvent.defaultPrevented) {
6360      return;
6361    }
6362
6363    this._element.classList.remove(CLASS_NAME_SHOW$8);
6364
6365    const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);
6366
6367    this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
6368  } // Private
6369
6370
6371  _destroyElement() {
6372    this._element.remove();
6373
6374    EventHandler.trigger(this._element, EVENT_CLOSED);
6375    this.dispose();
6376  } // Static
6377
6378
6379  static jQueryInterface(config) {
6380    return this.each(function () {
6381      const data = Alert.getOrCreateInstance(this);
6382
6383      if (typeof config !== 'string') {
6384        return;
6385      }
6386
6387      if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
6388        throw new TypeError(`No method named "${config}"`);
6389      }
6390
6391      data[config](this);
6392    });
6393  }
6394
6395}
6396/**
6397 * ------------------------------------------------------------------------
6398 * Data Api implementation
6399 * ------------------------------------------------------------------------
6400 */
6401
6402
6403enableDismissTrigger(Alert, 'close');
6404/**
6405 * ------------------------------------------------------------------------
6406 * jQuery
6407 * ------------------------------------------------------------------------
6408 * add .Alert to jQuery only if jQuery is present
6409 */
6410
6411defineJQueryPlugin(Alert);
6412
6413/**
6414 * --------------------------------------------------------------------------
6415 * Bootstrap (v5.1.3): button.js
6416 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6417 * --------------------------------------------------------------------------
6418 */
6419/**
6420 * ------------------------------------------------------------------------
6421 * Constants
6422 * ------------------------------------------------------------------------
6423 */
6424
6425const NAME$c = 'button';
6426const DATA_KEY$b = 'bs.button';
6427const EVENT_KEY$b = `.${DATA_KEY$b}`;
6428const DATA_API_KEY$7 = '.data-api';
6429const CLASS_NAME_ACTIVE$3 = 'active';
6430const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
6431const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$b}${DATA_API_KEY$7}`;
6432/**
6433 * ------------------------------------------------------------------------
6434 * Class Definition
6435 * ------------------------------------------------------------------------
6436 */
6437
6438class Button extends BaseComponent {
6439  // Getters
6440  static get NAME() {
6441    return NAME$c;
6442  } // Public
6443
6444
6445  toggle() {
6446    // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
6447    this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));
6448  } // Static
6449
6450
6451  static jQueryInterface(config) {
6452    return this.each(function () {
6453      const data = Button.getOrCreateInstance(this);
6454
6455      if (config === 'toggle') {
6456        data[config]();
6457      }
6458    });
6459  }
6460
6461}
6462/**
6463 * ------------------------------------------------------------------------
6464 * Data Api implementation
6465 * ------------------------------------------------------------------------
6466 */
6467
6468
6469EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {
6470  event.preventDefault();
6471  const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);
6472  const data = Button.getOrCreateInstance(button);
6473  data.toggle();
6474});
6475/**
6476 * ------------------------------------------------------------------------
6477 * jQuery
6478 * ------------------------------------------------------------------------
6479 * add .Button to jQuery only if jQuery is present
6480 */
6481
6482defineJQueryPlugin(Button);
6483
6484/**
6485 * --------------------------------------------------------------------------
6486 * Bootstrap (v5.1.3): dom/manipulator.js
6487 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6488 * --------------------------------------------------------------------------
6489 */
6490function normalizeData(val) {
6491  if (val === 'true') {
6492    return true;
6493  }
6494
6495  if (val === 'false') {
6496    return false;
6497  }
6498
6499  if (val === Number(val).toString()) {
6500    return Number(val);
6501  }
6502
6503  if (val === '' || val === 'null') {
6504    return null;
6505  }
6506
6507  return val;
6508}
6509
6510function normalizeDataKey(key) {
6511  return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);
6512}
6513
6514const Manipulator = {
6515  setDataAttribute(element, key, value) {
6516    element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
6517  },
6518
6519  removeDataAttribute(element, key) {
6520    element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
6521  },
6522
6523  getDataAttributes(element) {
6524    if (!element) {
6525      return {};
6526    }
6527
6528    const attributes = {};
6529    Object.keys(element.dataset).filter(key => key.startsWith('bs')).forEach(key => {
6530      let pureKey = key.replace(/^bs/, '');
6531      pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
6532      attributes[pureKey] = normalizeData(element.dataset[key]);
6533    });
6534    return attributes;
6535  },
6536
6537  getDataAttribute(element, key) {
6538    return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
6539  },
6540
6541  offset(element) {
6542    const rect = element.getBoundingClientRect();
6543    return {
6544      top: rect.top + window.pageYOffset,
6545      left: rect.left + window.pageXOffset
6546    };
6547  },
6548
6549  position(element) {
6550    return {
6551      top: element.offsetTop,
6552      left: element.offsetLeft
6553    };
6554  }
6555
6556};
6557
6558/**
6559 * --------------------------------------------------------------------------
6560 * Bootstrap (v5.1.3): dom/selector-engine.js
6561 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6562 * --------------------------------------------------------------------------
6563 */
6564const NODE_TEXT = 3;
6565const SelectorEngine = {
6566  find(selector, element = document.documentElement) {
6567    return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
6568  },
6569
6570  findOne(selector, element = document.documentElement) {
6571    return Element.prototype.querySelector.call(element, selector);
6572  },
6573
6574  children(element, selector) {
6575    return [].concat(...element.children).filter(child => child.matches(selector));
6576  },
6577
6578  parents(element, selector) {
6579    const parents = [];
6580    let ancestor = element.parentNode;
6581
6582    while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
6583      if (ancestor.matches(selector)) {
6584        parents.push(ancestor);
6585      }
6586
6587      ancestor = ancestor.parentNode;
6588    }
6589
6590    return parents;
6591  },
6592
6593  prev(element, selector) {
6594    let previous = element.previousElementSibling;
6595
6596    while (previous) {
6597      if (previous.matches(selector)) {
6598        return [previous];
6599      }
6600
6601      previous = previous.previousElementSibling;
6602    }
6603
6604    return [];
6605  },
6606
6607  next(element, selector) {
6608    let next = element.nextElementSibling;
6609
6610    while (next) {
6611      if (next.matches(selector)) {
6612        return [next];
6613      }
6614
6615      next = next.nextElementSibling;
6616    }
6617
6618    return [];
6619  },
6620
6621  focusableChildren(element) {
6622    const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(', ');
6623    return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
6624  }
6625
6626};
6627
6628/**
6629 * --------------------------------------------------------------------------
6630 * Bootstrap (v5.1.3): carousel.js
6631 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6632 * --------------------------------------------------------------------------
6633 */
6634/**
6635 * ------------------------------------------------------------------------
6636 * Constants
6637 * ------------------------------------------------------------------------
6638 */
6639
6640const NAME$b = 'carousel';
6641const DATA_KEY$a = 'bs.carousel';
6642const EVENT_KEY$a = `.${DATA_KEY$a}`;
6643const DATA_API_KEY$6 = '.data-api';
6644const ARROW_LEFT_KEY = 'ArrowLeft';
6645const ARROW_RIGHT_KEY = 'ArrowRight';
6646const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
6647
6648const SWIPE_THRESHOLD = 40;
6649const Default$a = {
6650  interval: 5000,
6651  keyboard: true,
6652  slide: false,
6653  pause: 'hover',
6654  wrap: true,
6655  touch: true
6656};
6657const DefaultType$a = {
6658  interval: '(number|boolean)',
6659  keyboard: 'boolean',
6660  slide: '(boolean|string)',
6661  pause: '(string|boolean)',
6662  wrap: 'boolean',
6663  touch: 'boolean'
6664};
6665const ORDER_NEXT = 'next';
6666const ORDER_PREV = 'prev';
6667const DIRECTION_LEFT = 'left';
6668const DIRECTION_RIGHT = 'right';
6669const KEY_TO_DIRECTION = {
6670  [ARROW_LEFT_KEY]: DIRECTION_RIGHT,
6671  [ARROW_RIGHT_KEY]: DIRECTION_LEFT
6672};
6673const EVENT_SLIDE = `slide${EVENT_KEY$a}`;
6674const EVENT_SLID = `slid${EVENT_KEY$a}`;
6675const EVENT_KEYDOWN = `keydown${EVENT_KEY$a}`;
6676const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$a}`;
6677const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$a}`;
6678const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$a}`;
6679const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$a}`;
6680const EVENT_TOUCHEND = `touchend${EVENT_KEY$a}`;
6681const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$a}`;
6682const EVENT_POINTERUP = `pointerup${EVENT_KEY$a}`;
6683const EVENT_DRAG_START = `dragstart${EVENT_KEY$a}`;
6684const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$a}${DATA_API_KEY$6}`;
6685const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;
6686const CLASS_NAME_CAROUSEL = 'carousel';
6687const CLASS_NAME_ACTIVE$2 = 'active';
6688const CLASS_NAME_SLIDE = 'slide';
6689const CLASS_NAME_END = 'carousel-item-end';
6690const CLASS_NAME_START = 'carousel-item-start';
6691const CLASS_NAME_NEXT = 'carousel-item-next';
6692const CLASS_NAME_PREV = 'carousel-item-prev';
6693const CLASS_NAME_POINTER_EVENT = 'pointer-event';
6694const SELECTOR_ACTIVE$1 = '.active';
6695const SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
6696const SELECTOR_ITEM = '.carousel-item';
6697const SELECTOR_ITEM_IMG = '.carousel-item img';
6698const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
6699const SELECTOR_INDICATORS = '.carousel-indicators';
6700const SELECTOR_INDICATOR = '[data-bs-target]';
6701const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
6702const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
6703const POINTER_TYPE_TOUCH = 'touch';
6704const POINTER_TYPE_PEN = 'pen';
6705/**
6706 * ------------------------------------------------------------------------
6707 * Class Definition
6708 * ------------------------------------------------------------------------
6709 */
6710
6711class Carousel extends BaseComponent {
6712  constructor(element, config) {
6713    super(element);
6714    this._items = null;
6715    this._interval = null;
6716    this._activeElement = null;
6717    this._isPaused = false;
6718    this._isSliding = false;
6719    this.touchTimeout = null;
6720    this.touchStartX = 0;
6721    this.touchDeltaX = 0;
6722    this._config = this._getConfig(config);
6723    this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);
6724    this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
6725    this._pointerEvent = Boolean(window.PointerEvent);
6726
6727    this._addEventListeners();
6728  } // Getters
6729
6730
6731  static get Default() {
6732    return Default$a;
6733  }
6734
6735  static get NAME() {
6736    return NAME$b;
6737  } // Public
6738
6739
6740  next() {
6741    this._slide(ORDER_NEXT);
6742  }
6743
6744  nextWhenVisible() {
6745    // Don't call next when the page isn't visible
6746    // or the carousel or its parent isn't visible
6747    if (!document.hidden && isVisible(this._element)) {
6748      this.next();
6749    }
6750  }
6751
6752  prev() {
6753    this._slide(ORDER_PREV);
6754  }
6755
6756  pause(event) {
6757    if (!event) {
6758      this._isPaused = true;
6759    }
6760
6761    if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
6762      triggerTransitionEnd(this._element);
6763      this.cycle(true);
6764    }
6765
6766    clearInterval(this._interval);
6767    this._interval = null;
6768  }
6769
6770  cycle(event) {
6771    if (!event) {
6772      this._isPaused = false;
6773    }
6774
6775    if (this._interval) {
6776      clearInterval(this._interval);
6777      this._interval = null;
6778    }
6779
6780    if (this._config && this._config.interval && !this._isPaused) {
6781      this._updateInterval();
6782
6783      this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
6784    }
6785  }
6786
6787  to(index) {
6788    this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
6789
6790    const activeIndex = this._getItemIndex(this._activeElement);
6791
6792    if (index > this._items.length - 1 || index < 0) {
6793      return;
6794    }
6795
6796    if (this._isSliding) {
6797      EventHandler.one(this._element, EVENT_SLID, () => this.to(index));
6798      return;
6799    }
6800
6801    if (activeIndex === index) {
6802      this.pause();
6803      this.cycle();
6804      return;
6805    }
6806
6807    const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
6808
6809    this._slide(order, this._items[index]);
6810  } // Private
6811
6812
6813  _getConfig(config) {
6814    config = { ...Default$a,
6815      ...Manipulator.getDataAttributes(this._element),
6816      ...(typeof config === 'object' ? config : {})
6817    };
6818    typeCheckConfig(NAME$b, config, DefaultType$a);
6819    return config;
6820  }
6821
6822  _handleSwipe() {
6823    const absDeltax = Math.abs(this.touchDeltaX);
6824
6825    if (absDeltax <= SWIPE_THRESHOLD) {
6826      return;
6827    }
6828
6829    const direction = absDeltax / this.touchDeltaX;
6830    this.touchDeltaX = 0;
6831
6832    if (!direction) {
6833      return;
6834    }
6835
6836    this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT);
6837  }
6838
6839  _addEventListeners() {
6840    if (this._config.keyboard) {
6841      EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
6842    }
6843
6844    if (this._config.pause === 'hover') {
6845      EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event));
6846      EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event));
6847    }
6848
6849    if (this._config.touch && this._touchSupported) {
6850      this._addTouchEventListeners();
6851    }
6852  }
6853
6854  _addTouchEventListeners() {
6855    const hasPointerPenTouch = event => {
6856      return this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);
6857    };
6858
6859    const start = event => {
6860      if (hasPointerPenTouch(event)) {
6861        this.touchStartX = event.clientX;
6862      } else if (!this._pointerEvent) {
6863        this.touchStartX = event.touches[0].clientX;
6864      }
6865    };
6866
6867    const move = event => {
6868      // ensure swiping with one touch and not pinching
6869      this.touchDeltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this.touchStartX;
6870    };
6871
6872    const end = event => {
6873      if (hasPointerPenTouch(event)) {
6874        this.touchDeltaX = event.clientX - this.touchStartX;
6875      }
6876
6877      this._handleSwipe();
6878
6879      if (this._config.pause === 'hover') {
6880        // If it's a touch-enabled device, mouseenter/leave are fired as
6881        // part of the mouse compatibility events on first tap - the carousel
6882        // would stop cycling until user tapped out of it;
6883        // here, we listen for touchend, explicitly pause the carousel
6884        // (as if it's the second time we tap on it, mouseenter compat event
6885        // is NOT fired) and after a timeout (to allow for mouse compatibility
6886        // events to fire) we explicitly restart cycling
6887        this.pause();
6888
6889        if (this.touchTimeout) {
6890          clearTimeout(this.touchTimeout);
6891        }
6892
6893        this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
6894      }
6895    };
6896
6897    SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
6898      EventHandler.on(itemImg, EVENT_DRAG_START, event => event.preventDefault());
6899    });
6900
6901    if (this._pointerEvent) {
6902      EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event));
6903      EventHandler.on(this._element, EVENT_POINTERUP, event => end(event));
6904
6905      this._element.classList.add(CLASS_NAME_POINTER_EVENT);
6906    } else {
6907      EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event));
6908      EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event));
6909      EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event));
6910    }
6911  }
6912
6913  _keydown(event) {
6914    if (/input|textarea/i.test(event.target.tagName)) {
6915      return;
6916    }
6917
6918    const direction = KEY_TO_DIRECTION[event.key];
6919
6920    if (direction) {
6921      event.preventDefault();
6922
6923      this._slide(direction);
6924    }
6925  }
6926
6927  _getItemIndex(element) {
6928    this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];
6929    return this._items.indexOf(element);
6930  }
6931
6932  _getItemByOrder(order, activeElement) {
6933    const isNext = order === ORDER_NEXT;
6934    return getNextActiveElement(this._items, activeElement, isNext, this._config.wrap);
6935  }
6936
6937  _triggerSlideEvent(relatedTarget, eventDirectionName) {
6938    const targetIndex = this._getItemIndex(relatedTarget);
6939
6940    const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));
6941
6942    return EventHandler.trigger(this._element, EVENT_SLIDE, {
6943      relatedTarget,
6944      direction: eventDirectionName,
6945      from: fromIndex,
6946      to: targetIndex
6947    });
6948  }
6949
6950  _setActiveIndicatorElement(element) {
6951    if (this._indicatorsElement) {
6952      const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE$1, this._indicatorsElement);
6953      activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);
6954      activeIndicator.removeAttribute('aria-current');
6955      const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement);
6956
6957      for (let i = 0; i < indicators.length; i++) {
6958        if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {
6959          indicators[i].classList.add(CLASS_NAME_ACTIVE$2);
6960          indicators[i].setAttribute('aria-current', 'true');
6961          break;
6962        }
6963      }
6964    }
6965  }
6966
6967  _updateInterval() {
6968    const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
6969
6970    if (!element) {
6971      return;
6972    }
6973
6974    const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
6975
6976    if (elementInterval) {
6977      this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
6978      this._config.interval = elementInterval;
6979    } else {
6980      this._config.interval = this._config.defaultInterval || this._config.interval;
6981    }
6982  }
6983
6984  _slide(directionOrOrder, element) {
6985    const order = this._directionToOrder(directionOrOrder);
6986
6987    const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
6988
6989    const activeElementIndex = this._getItemIndex(activeElement);
6990
6991    const nextElement = element || this._getItemByOrder(order, activeElement);
6992
6993    const nextElementIndex = this._getItemIndex(nextElement);
6994
6995    const isCycling = Boolean(this._interval);
6996    const isNext = order === ORDER_NEXT;
6997    const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
6998    const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
6999
7000    const eventDirectionName = this._orderToDirection(order);
7001
7002    if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$2)) {
7003      this._isSliding = false;
7004      return;
7005    }
7006
7007    if (this._isSliding) {
7008      return;
7009    }
7010
7011    const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
7012
7013    if (slideEvent.defaultPrevented) {
7014      return;
7015    }
7016
7017    if (!activeElement || !nextElement) {
7018      // Some weirdness is happening, so we bail
7019      return;
7020    }
7021
7022    this._isSliding = true;
7023
7024    if (isCycling) {
7025      this.pause();
7026    }
7027
7028    this._setActiveIndicatorElement(nextElement);
7029
7030    this._activeElement = nextElement;
7031
7032    const triggerSlidEvent = () => {
7033      EventHandler.trigger(this._element, EVENT_SLID, {
7034        relatedTarget: nextElement,
7035        direction: eventDirectionName,
7036        from: activeElementIndex,
7037        to: nextElementIndex
7038      });
7039    };
7040
7041    if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
7042      nextElement.classList.add(orderClassName);
7043      reflow(nextElement);
7044      activeElement.classList.add(directionalClassName);
7045      nextElement.classList.add(directionalClassName);
7046
7047      const completeCallBack = () => {
7048        nextElement.classList.remove(directionalClassName, orderClassName);
7049        nextElement.classList.add(CLASS_NAME_ACTIVE$2);
7050        activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
7051        this._isSliding = false;
7052        setTimeout(triggerSlidEvent, 0);
7053      };
7054
7055      this._queueCallback(completeCallBack, activeElement, true);
7056    } else {
7057      activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
7058      nextElement.classList.add(CLASS_NAME_ACTIVE$2);
7059      this._isSliding = false;
7060      triggerSlidEvent();
7061    }
7062
7063    if (isCycling) {
7064      this.cycle();
7065    }
7066  }
7067
7068  _directionToOrder(direction) {
7069    if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {
7070      return direction;
7071    }
7072
7073    if (isRTL()) {
7074      return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
7075    }
7076
7077    return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
7078  }
7079
7080  _orderToDirection(order) {
7081    if (![ORDER_NEXT, ORDER_PREV].includes(order)) {
7082      return order;
7083    }
7084
7085    if (isRTL()) {
7086      return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
7087    }
7088
7089    return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
7090  } // Static
7091
7092
7093  static carouselInterface(element, config) {
7094    const data = Carousel.getOrCreateInstance(element, config);
7095    let {
7096      _config
7097    } = data;
7098
7099    if (typeof config === 'object') {
7100      _config = { ..._config,
7101        ...config
7102      };
7103    }
7104
7105    const action = typeof config === 'string' ? config : _config.slide;
7106
7107    if (typeof config === 'number') {
7108      data.to(config);
7109    } else if (typeof action === 'string') {
7110      if (typeof data[action] === 'undefined') {
7111        throw new TypeError(`No method named "${action}"`);
7112      }
7113
7114      data[action]();
7115    } else if (_config.interval && _config.ride) {
7116      data.pause();
7117      data.cycle();
7118    }
7119  }
7120
7121  static jQueryInterface(config) {
7122    return this.each(function () {
7123      Carousel.carouselInterface(this, config);
7124    });
7125  }
7126
7127  static dataApiClickHandler(event) {
7128    const target = getElementFromSelector(this);
7129
7130    if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
7131      return;
7132    }
7133
7134    const config = { ...Manipulator.getDataAttributes(target),
7135      ...Manipulator.getDataAttributes(this)
7136    };
7137    const slideIndex = this.getAttribute('data-bs-slide-to');
7138
7139    if (slideIndex) {
7140      config.interval = false;
7141    }
7142
7143    Carousel.carouselInterface(target, config);
7144
7145    if (slideIndex) {
7146      Carousel.getInstance(target).to(slideIndex);
7147    }
7148
7149    event.preventDefault();
7150  }
7151
7152}
7153/**
7154 * ------------------------------------------------------------------------
7155 * Data Api implementation
7156 * ------------------------------------------------------------------------
7157 */
7158
7159
7160EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
7161EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {
7162  const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
7163
7164  for (let i = 0, len = carousels.length; i < len; i++) {
7165    Carousel.carouselInterface(carousels[i], Carousel.getInstance(carousels[i]));
7166  }
7167});
7168/**
7169 * ------------------------------------------------------------------------
7170 * jQuery
7171 * ------------------------------------------------------------------------
7172 * add .Carousel to jQuery only if jQuery is present
7173 */
7174
7175defineJQueryPlugin(Carousel);
7176
7177/**
7178 * --------------------------------------------------------------------------
7179 * Bootstrap (v5.1.3): collapse.js
7180 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
7181 * --------------------------------------------------------------------------
7182 */
7183/**
7184 * ------------------------------------------------------------------------
7185 * Constants
7186 * ------------------------------------------------------------------------
7187 */
7188
7189const NAME$a = 'collapse';
7190const DATA_KEY$9 = 'bs.collapse';
7191const EVENT_KEY$9 = `.${DATA_KEY$9}`;
7192const DATA_API_KEY$5 = '.data-api';
7193const Default$9 = {
7194  toggle: true,
7195  parent: null
7196};
7197const DefaultType$9 = {
7198  toggle: 'boolean',
7199  parent: '(null|element)'
7200};
7201const EVENT_SHOW$5 = `show${EVENT_KEY$9}`;
7202const EVENT_SHOWN$5 = `shown${EVENT_KEY$9}`;
7203const EVENT_HIDE$5 = `hide${EVENT_KEY$9}`;
7204const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$9}`;
7205const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$9}${DATA_API_KEY$5}`;
7206const CLASS_NAME_SHOW$7 = 'show';
7207const CLASS_NAME_COLLAPSE = 'collapse';
7208const CLASS_NAME_COLLAPSING = 'collapsing';
7209const CLASS_NAME_COLLAPSED = 'collapsed';
7210const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;
7211const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
7212const WIDTH = 'width';
7213const HEIGHT = 'height';
7214const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
7215const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
7216/**
7217 * ------------------------------------------------------------------------
7218 * Class Definition
7219 * ------------------------------------------------------------------------
7220 */
7221
7222class Collapse extends BaseComponent {
7223  constructor(element, config) {
7224    super(element);
7225    this._isTransitioning = false;
7226    this._config = this._getConfig(config);
7227    this._triggerArray = [];
7228    const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
7229
7230    for (let i = 0, len = toggleList.length; i < len; i++) {
7231      const elem = toggleList[i];
7232      const selector = getSelectorFromElement(elem);
7233      const filterElement = SelectorEngine.find(selector).filter(foundElem => foundElem === this._element);
7234
7235      if (selector !== null && filterElement.length) {
7236        this._selector = selector;
7237
7238        this._triggerArray.push(elem);
7239      }
7240    }
7241
7242    this._initializeChildren();
7243
7244    if (!this._config.parent) {
7245      this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
7246    }
7247
7248    if (this._config.toggle) {
7249      this.toggle();
7250    }
7251  } // Getters
7252
7253
7254  static get Default() {
7255    return Default$9;
7256  }
7257
7258  static get NAME() {
7259    return NAME$a;
7260  } // Public
7261
7262
7263  toggle() {
7264    if (this._isShown()) {
7265      this.hide();
7266    } else {
7267      this.show();
7268    }
7269  }
7270
7271  show() {
7272    if (this._isTransitioning || this._isShown()) {
7273      return;
7274    }
7275
7276    let actives = [];
7277    let activesData;
7278
7279    if (this._config.parent) {
7280      const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
7281      actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth
7282    }
7283
7284    const container = SelectorEngine.findOne(this._selector);
7285
7286    if (actives.length) {
7287      const tempActiveData = actives.find(elem => container !== elem);
7288      activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;
7289
7290      if (activesData && activesData._isTransitioning) {
7291        return;
7292      }
7293    }
7294
7295    const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$5);
7296
7297    if (startEvent.defaultPrevented) {
7298      return;
7299    }
7300
7301    actives.forEach(elemActive => {
7302      if (container !== elemActive) {
7303        Collapse.getOrCreateInstance(elemActive, {
7304          toggle: false
7305        }).hide();
7306      }
7307
7308      if (!activesData) {
7309        Data.set(elemActive, DATA_KEY$9, null);
7310      }
7311    });
7312
7313    const dimension = this._getDimension();
7314
7315    this._element.classList.remove(CLASS_NAME_COLLAPSE);
7316
7317    this._element.classList.add(CLASS_NAME_COLLAPSING);
7318
7319    this._element.style[dimension] = 0;
7320
7321    this._addAriaAndCollapsedClass(this._triggerArray, true);
7322
7323    this._isTransitioning = true;
7324
7325    const complete = () => {
7326      this._isTransitioning = false;
7327
7328      this._element.classList.remove(CLASS_NAME_COLLAPSING);
7329
7330      this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
7331
7332      this._element.style[dimension] = '';
7333      EventHandler.trigger(this._element, EVENT_SHOWN$5);
7334    };
7335
7336    const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
7337    const scrollSize = `scroll${capitalizedDimension}`;
7338
7339    this._queueCallback(complete, this._element, true);
7340
7341    this._element.style[dimension] = `${this._element[scrollSize]}px`;
7342  }
7343
7344  hide() {
7345    if (this._isTransitioning || !this._isShown()) {
7346      return;
7347    }
7348
7349    const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$5);
7350
7351    if (startEvent.defaultPrevented) {
7352      return;
7353    }
7354
7355    const dimension = this._getDimension();
7356
7357    this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
7358    reflow(this._element);
7359
7360    this._element.classList.add(CLASS_NAME_COLLAPSING);
7361
7362    this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
7363
7364    const triggerArrayLength = this._triggerArray.length;
7365
7366    for (let i = 0; i < triggerArrayLength; i++) {
7367      const trigger = this._triggerArray[i];
7368      const elem = getElementFromSelector(trigger);
7369
7370      if (elem && !this._isShown(elem)) {
7371        this._addAriaAndCollapsedClass([trigger], false);
7372      }
7373    }
7374
7375    this._isTransitioning = true;
7376
7377    const complete = () => {
7378      this._isTransitioning = false;
7379
7380      this._element.classList.remove(CLASS_NAME_COLLAPSING);
7381
7382      this._element.classList.add(CLASS_NAME_COLLAPSE);
7383
7384      EventHandler.trigger(this._element, EVENT_HIDDEN$5);
7385    };
7386
7387    this._element.style[dimension] = '';
7388
7389    this._queueCallback(complete, this._element, true);
7390  }
7391
7392  _isShown(element = this._element) {
7393    return element.classList.contains(CLASS_NAME_SHOW$7);
7394  } // Private
7395
7396
7397  _getConfig(config) {
7398    config = { ...Default$9,
7399      ...Manipulator.getDataAttributes(this._element),
7400      ...config
7401    };
7402    config.toggle = Boolean(config.toggle); // Coerce string values
7403
7404    config.parent = getElement(config.parent);
7405    typeCheckConfig(NAME$a, config, DefaultType$9);
7406    return config;
7407  }
7408
7409  _getDimension() {
7410    return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
7411  }
7412
7413  _initializeChildren() {
7414    if (!this._config.parent) {
7415      return;
7416    }
7417
7418    const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
7419    SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {
7420      const selected = getElementFromSelector(element);
7421
7422      if (selected) {
7423        this._addAriaAndCollapsedClass([element], this._isShown(selected));
7424      }
7425    });
7426  }
7427
7428  _addAriaAndCollapsedClass(triggerArray, isOpen) {
7429    if (!triggerArray.length) {
7430      return;
7431    }
7432
7433    triggerArray.forEach(elem => {
7434      if (isOpen) {
7435        elem.classList.remove(CLASS_NAME_COLLAPSED);
7436      } else {
7437        elem.classList.add(CLASS_NAME_COLLAPSED);
7438      }
7439
7440      elem.setAttribute('aria-expanded', isOpen);
7441    });
7442  } // Static
7443
7444
7445  static jQueryInterface(config) {
7446    return this.each(function () {
7447      const _config = {};
7448
7449      if (typeof config === 'string' && /show|hide/.test(config)) {
7450        _config.toggle = false;
7451      }
7452
7453      const data = Collapse.getOrCreateInstance(this, _config);
7454
7455      if (typeof config === 'string') {
7456        if (typeof data[config] === 'undefined') {
7457          throw new TypeError(`No method named "${config}"`);
7458        }
7459
7460        data[config]();
7461      }
7462    });
7463  }
7464
7465}
7466/**
7467 * ------------------------------------------------------------------------
7468 * Data Api implementation
7469 * ------------------------------------------------------------------------
7470 */
7471
7472
7473EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {
7474  // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
7475  if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
7476    event.preventDefault();
7477  }
7478
7479  const selector = getSelectorFromElement(this);
7480  const selectorElements = SelectorEngine.find(selector);
7481  selectorElements.forEach(element => {
7482    Collapse.getOrCreateInstance(element, {
7483      toggle: false
7484    }).toggle();
7485  });
7486});
7487/**
7488 * ------------------------------------------------------------------------
7489 * jQuery
7490 * ------------------------------------------------------------------------
7491 * add .Collapse to jQuery only if jQuery is present
7492 */
7493
7494defineJQueryPlugin(Collapse);
7495
7496/**
7497 * --------------------------------------------------------------------------
7498 * Bootstrap (v5.1.3): dropdown.js
7499 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
7500 * --------------------------------------------------------------------------
7501 */
7502/**
7503 * ------------------------------------------------------------------------
7504 * Constants
7505 * ------------------------------------------------------------------------
7506 */
7507
7508const NAME$9 = 'dropdown';
7509const DATA_KEY$8 = 'bs.dropdown';
7510const EVENT_KEY$8 = `.${DATA_KEY$8}`;
7511const DATA_API_KEY$4 = '.data-api';
7512const ESCAPE_KEY$2 = 'Escape';
7513const SPACE_KEY = 'Space';
7514const TAB_KEY$1 = 'Tab';
7515const ARROW_UP_KEY = 'ArrowUp';
7516const ARROW_DOWN_KEY = 'ArrowDown';
7517const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
7518
7519const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);
7520const EVENT_HIDE$4 = `hide${EVENT_KEY$8}`;
7521const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$8}`;
7522const EVENT_SHOW$4 = `show${EVENT_KEY$8}`;
7523const EVENT_SHOWN$4 = `shown${EVENT_KEY$8}`;
7524const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$8}${DATA_API_KEY$4}`;
7525const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$8}${DATA_API_KEY$4}`;
7526const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$8}${DATA_API_KEY$4}`;
7527const CLASS_NAME_SHOW$6 = 'show';
7528const CLASS_NAME_DROPUP = 'dropup';
7529const CLASS_NAME_DROPEND = 'dropend';
7530const CLASS_NAME_DROPSTART = 'dropstart';
7531const CLASS_NAME_NAVBAR = 'navbar';
7532const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]';
7533const SELECTOR_MENU = '.dropdown-menu';
7534const SELECTOR_NAVBAR_NAV = '.navbar-nav';
7535const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
7536const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';
7537const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';
7538const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';
7539const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
7540const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
7541const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
7542const Default$8 = {
7543  offset: [0, 2],
7544  boundary: 'clippingParents',
7545  reference: 'toggle',
7546  display: 'dynamic',
7547  popperConfig: null,
7548  autoClose: true
7549};
7550const DefaultType$8 = {
7551  offset: '(array|string|function)',
7552  boundary: '(string|element)',
7553  reference: '(string|element|object)',
7554  display: 'string',
7555  popperConfig: '(null|object|function)',
7556  autoClose: '(boolean|string)'
7557};
7558/**
7559 * ------------------------------------------------------------------------
7560 * Class Definition
7561 * ------------------------------------------------------------------------
7562 */
7563
7564class Dropdown extends BaseComponent {
7565  constructor(element, config) {
7566    super(element);
7567    this._popper = null;
7568    this._config = this._getConfig(config);
7569    this._menu = this._getMenuElement();
7570    this._inNavbar = this._detectNavbar();
7571  } // Getters
7572
7573
7574  static get Default() {
7575    return Default$8;
7576  }
7577
7578  static get DefaultType() {
7579    return DefaultType$8;
7580  }
7581
7582  static get NAME() {
7583    return NAME$9;
7584  } // Public
7585
7586
7587  toggle() {
7588    return this._isShown() ? this.hide() : this.show();
7589  }
7590
7591  show() {
7592    if (isDisabled(this._element) || this._isShown(this._menu)) {
7593      return;
7594    }
7595
7596    const relatedTarget = {
7597      relatedTarget: this._element
7598    };
7599    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, relatedTarget);
7600
7601    if (showEvent.defaultPrevented) {
7602      return;
7603    }
7604
7605    const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar
7606
7607    if (this._inNavbar) {
7608      Manipulator.setDataAttribute(this._menu, 'popper', 'none');
7609    } else {
7610      this._createPopper(parent);
7611    } // If this is a touch-enabled device we add extra
7612    // empty mouseover listeners to the body's immediate children;
7613    // only needed because of broken event delegation on iOS
7614    // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
7615
7616
7617    if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
7618      [].concat(...document.body.children).forEach(elem => EventHandler.on(elem, 'mouseover', noop));
7619    }
7620
7621    this._element.focus();
7622
7623    this._element.setAttribute('aria-expanded', true);
7624
7625    this._menu.classList.add(CLASS_NAME_SHOW$6);
7626
7627    this._element.classList.add(CLASS_NAME_SHOW$6);
7628
7629    EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);
7630  }
7631
7632  hide() {
7633    if (isDisabled(this._element) || !this._isShown(this._menu)) {
7634      return;
7635    }
7636
7637    const relatedTarget = {
7638      relatedTarget: this._element
7639    };
7640
7641    this._completeHide(relatedTarget);
7642  }
7643
7644  dispose() {
7645    if (this._popper) {
7646      this._popper.destroy();
7647    }
7648
7649    super.dispose();
7650  }
7651
7652  update() {
7653    this._inNavbar = this._detectNavbar();
7654
7655    if (this._popper) {
7656      this._popper.update();
7657    }
7658  } // Private
7659
7660
7661  _completeHide(relatedTarget) {
7662    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);
7663
7664    if (hideEvent.defaultPrevented) {
7665      return;
7666    } // If this is a touch-enabled device we remove the extra
7667    // empty mouseover listeners we added for iOS support
7668
7669
7670    if ('ontouchstart' in document.documentElement) {
7671      [].concat(...document.body.children).forEach(elem => EventHandler.off(elem, 'mouseover', noop));
7672    }
7673
7674    if (this._popper) {
7675      this._popper.destroy();
7676    }
7677
7678    this._menu.classList.remove(CLASS_NAME_SHOW$6);
7679
7680    this._element.classList.remove(CLASS_NAME_SHOW$6);
7681
7682    this._element.setAttribute('aria-expanded', 'false');
7683
7684    Manipulator.removeDataAttribute(this._menu, 'popper');
7685    EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget);
7686  }
7687
7688  _getConfig(config) {
7689    config = { ...this.constructor.Default,
7690      ...Manipulator.getDataAttributes(this._element),
7691      ...config
7692    };
7693    typeCheckConfig(NAME$9, config, this.constructor.DefaultType);
7694
7695    if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
7696      // Popper virtual elements require a getBoundingClientRect method
7697      throw new TypeError(`${NAME$9.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
7698    }
7699
7700    return config;
7701  }
7702
7703  _createPopper(parent) {
7704    if (typeof _popperjs_core__WEBPACK_IMPORTED_MODULE_0__ === 'undefined') {
7705      throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
7706    }
7707
7708    let referenceElement = this._element;
7709
7710    if (this._config.reference === 'parent') {
7711      referenceElement = parent;
7712    } else if (isElement(this._config.reference)) {
7713      referenceElement = getElement(this._config.reference);
7714    } else if (typeof this._config.reference === 'object') {
7715      referenceElement = this._config.reference;
7716    }
7717
7718    const popperConfig = this._getPopperConfig();
7719
7720    const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
7721    this._popper = _popperjs_core__WEBPACK_IMPORTED_MODULE_1__.createPopper(referenceElement, this._menu, popperConfig);
7722
7723    if (isDisplayStatic) {
7724      Manipulator.setDataAttribute(this._menu, 'popper', 'static');
7725    }
7726  }
7727
7728  _isShown(element = this._element) {
7729    return element.classList.contains(CLASS_NAME_SHOW$6);
7730  }
7731
7732  _getMenuElement() {
7733    return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
7734  }
7735
7736  _getPlacement() {
7737    const parentDropdown = this._element.parentNode;
7738
7739    if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
7740      return PLACEMENT_RIGHT;
7741    }
7742
7743    if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
7744      return PLACEMENT_LEFT;
7745    } // We need to trim the value because custom properties can also include spaces
7746
7747
7748    const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
7749
7750    if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
7751      return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
7752    }
7753
7754    return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
7755  }
7756
7757  _detectNavbar() {
7758    return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null;
7759  }
7760
7761  _getOffset() {
7762    const {
7763      offset
7764    } = this._config;
7765
7766    if (typeof offset === 'string') {
7767      return offset.split(',').map(val => Number.parseInt(val, 10));
7768    }
7769
7770    if (typeof offset === 'function') {
7771      return popperData => offset(popperData, this._element);
7772    }
7773
7774    return offset;
7775  }
7776
7777  _getPopperConfig() {
7778    const defaultBsPopperConfig = {
7779      placement: this._getPlacement(),
7780      modifiers: [{
7781        name: 'preventOverflow',
7782        options: {
7783          boundary: this._config.boundary
7784        }
7785      }, {
7786        name: 'offset',
7787        options: {
7788          offset: this._getOffset()
7789        }
7790      }]
7791    }; // Disable Popper if we have a static display
7792
7793    if (this._config.display === 'static') {
7794      defaultBsPopperConfig.modifiers = [{
7795        name: 'applyStyles',
7796        enabled: false
7797      }];
7798    }
7799
7800    return { ...defaultBsPopperConfig,
7801      ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
7802    };
7803  }
7804
7805  _selectMenuItem({
7806    key,
7807    target
7808  }) {
7809    const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
7810
7811    if (!items.length) {
7812      return;
7813    } // if target isn't included in items (e.g. when expanding the dropdown)
7814    // allow cycling to get the last item in case key equals ARROW_UP_KEY
7815
7816
7817    getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus();
7818  } // Static
7819
7820
7821  static jQueryInterface(config) {
7822    return this.each(function () {
7823      const data = Dropdown.getOrCreateInstance(this, config);
7824
7825      if (typeof config !== 'string') {
7826        return;
7827      }
7828
7829      if (typeof data[config] === 'undefined') {
7830        throw new TypeError(`No method named "${config}"`);
7831      }
7832
7833      data[config]();
7834    });
7835  }
7836
7837  static clearMenus(event) {
7838    if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1)) {
7839      return;
7840    }
7841
7842    const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);
7843
7844    for (let i = 0, len = toggles.length; i < len; i++) {
7845      const context = Dropdown.getInstance(toggles[i]);
7846
7847      if (!context || context._config.autoClose === false) {
7848        continue;
7849      }
7850
7851      if (!context._isShown()) {
7852        continue;
7853      }
7854
7855      const relatedTarget = {
7856        relatedTarget: context._element
7857      };
7858
7859      if (event) {
7860        const composedPath = event.composedPath();
7861        const isMenuTarget = composedPath.includes(context._menu);
7862
7863        if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
7864          continue;
7865        } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
7866
7867
7868        if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {
7869          continue;
7870        }
7871
7872        if (event.type === 'click') {
7873          relatedTarget.clickEvent = event;
7874        }
7875      }
7876
7877      context._completeHide(relatedTarget);
7878    }
7879  }
7880
7881  static getParentFromElement(element) {
7882    return getElementFromSelector(element) || element.parentNode;
7883  }
7884
7885  static dataApiKeydownHandler(event) {
7886    // If not input/textarea:
7887    //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
7888    // If input/textarea:
7889    //  - If space key => not a dropdown command
7890    //  - If key is other than escape
7891    //    - If key is not up or down => not a dropdown command
7892    //    - If trigger inside the menu => not a dropdown command
7893    if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY$2 && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {
7894      return;
7895    }
7896
7897    const isActive = this.classList.contains(CLASS_NAME_SHOW$6);
7898
7899    if (!isActive && event.key === ESCAPE_KEY$2) {
7900      return;
7901    }
7902
7903    event.preventDefault();
7904    event.stopPropagation();
7905
7906    if (isDisabled(this)) {
7907      return;
7908    }
7909
7910    const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
7911    const instance = Dropdown.getOrCreateInstance(getToggleButton);
7912
7913    if (event.key === ESCAPE_KEY$2) {
7914      instance.hide();
7915      return;
7916    }
7917
7918    if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {
7919      if (!isActive) {
7920        instance.show();
7921      }
7922
7923      instance._selectMenuItem(event);
7924
7925      return;
7926    }
7927
7928    if (!isActive || event.key === SPACE_KEY) {
7929      Dropdown.clearMenus();
7930    }
7931  }
7932
7933}
7934/**
7935 * ------------------------------------------------------------------------
7936 * Data Api implementation
7937 * ------------------------------------------------------------------------
7938 */
7939
7940
7941EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);
7942EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
7943EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);
7944EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
7945EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
7946  event.preventDefault();
7947  Dropdown.getOrCreateInstance(this).toggle();
7948});
7949/**
7950 * ------------------------------------------------------------------------
7951 * jQuery
7952 * ------------------------------------------------------------------------
7953 * add .Dropdown to jQuery only if jQuery is present
7954 */
7955
7956defineJQueryPlugin(Dropdown);
7957
7958/**
7959 * --------------------------------------------------------------------------
7960 * Bootstrap (v5.1.3): util/scrollBar.js
7961 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
7962 * --------------------------------------------------------------------------
7963 */
7964const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
7965const SELECTOR_STICKY_CONTENT = '.sticky-top';
7966
7967class ScrollBarHelper {
7968  constructor() {
7969    this._element = document.body;
7970  }
7971
7972  getWidth() {
7973    // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
7974    const documentWidth = document.documentElement.clientWidth;
7975    return Math.abs(window.innerWidth - documentWidth);
7976  }
7977
7978  hide() {
7979    const width = this.getWidth();
7980
7981    this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width
7982
7983
7984    this._setElementAttributes(this._element, 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
7985
7986
7987    this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
7988
7989    this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
7990  }
7991
7992  _disableOverFlow() {
7993    this._saveInitialAttribute(this._element, 'overflow');
7994
7995    this._element.style.overflow = 'hidden';
7996  }
7997
7998  _setElementAttributes(selector, styleProp, callback) {
7999    const scrollbarWidth = this.getWidth();
8000
8001    const manipulationCallBack = element => {
8002      if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
8003        return;
8004      }
8005
8006      this._saveInitialAttribute(element, styleProp);
8007
8008      const calculatedValue = window.getComputedStyle(element)[styleProp];
8009      element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
8010    };
8011
8012    this._applyManipulationCallback(selector, manipulationCallBack);
8013  }
8014
8015  reset() {
8016    this._resetElementAttributes(this._element, 'overflow');
8017
8018    this._resetElementAttributes(this._element, 'paddingRight');
8019
8020    this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
8021
8022    this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
8023  }
8024
8025  _saveInitialAttribute(element, styleProp) {
8026    const actualValue = element.style[styleProp];
8027
8028    if (actualValue) {
8029      Manipulator.setDataAttribute(element, styleProp, actualValue);
8030    }
8031  }
8032
8033  _resetElementAttributes(selector, styleProp) {
8034    const manipulationCallBack = element => {
8035      const value = Manipulator.getDataAttribute(element, styleProp);
8036
8037      if (typeof value === 'undefined') {
8038        element.style.removeProperty(styleProp);
8039      } else {
8040        Manipulator.removeDataAttribute(element, styleProp);
8041        element.style[styleProp] = value;
8042      }
8043    };
8044
8045    this._applyManipulationCallback(selector, manipulationCallBack);
8046  }
8047
8048  _applyManipulationCallback(selector, callBack) {
8049    if (isElement(selector)) {
8050      callBack(selector);
8051    } else {
8052      SelectorEngine.find(selector, this._element).forEach(callBack);
8053    }
8054  }
8055
8056  isOverflowing() {
8057    return this.getWidth() > 0;
8058  }
8059
8060}
8061
8062/**
8063 * --------------------------------------------------------------------------
8064 * Bootstrap (v5.1.3): util/backdrop.js
8065 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8066 * --------------------------------------------------------------------------
8067 */
8068const Default$7 = {
8069  className: 'modal-backdrop',
8070  isVisible: true,
8071  // if false, we use the backdrop helper without adding any element to the dom
8072  isAnimated: false,
8073  rootElement: 'body',
8074  // give the choice to place backdrop under different elements
8075  clickCallback: null
8076};
8077const DefaultType$7 = {
8078  className: 'string',
8079  isVisible: 'boolean',
8080  isAnimated: 'boolean',
8081  rootElement: '(element|string)',
8082  clickCallback: '(function|null)'
8083};
8084const NAME$8 = 'backdrop';
8085const CLASS_NAME_FADE$4 = 'fade';
8086const CLASS_NAME_SHOW$5 = 'show';
8087const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$8}`;
8088
8089class Backdrop {
8090  constructor(config) {
8091    this._config = this._getConfig(config);
8092    this._isAppended = false;
8093    this._element = null;
8094  }
8095
8096  show(callback) {
8097    if (!this._config.isVisible) {
8098      execute(callback);
8099      return;
8100    }
8101
8102    this._append();
8103
8104    if (this._config.isAnimated) {
8105      reflow(this._getElement());
8106    }
8107
8108    this._getElement().classList.add(CLASS_NAME_SHOW$5);
8109
8110    this._emulateAnimation(() => {
8111      execute(callback);
8112    });
8113  }
8114
8115  hide(callback) {
8116    if (!this._config.isVisible) {
8117      execute(callback);
8118      return;
8119    }
8120
8121    this._getElement().classList.remove(CLASS_NAME_SHOW$5);
8122
8123    this._emulateAnimation(() => {
8124      this.dispose();
8125      execute(callback);
8126    });
8127  } // Private
8128
8129
8130  _getElement() {
8131    if (!this._element) {
8132      const backdrop = document.createElement('div');
8133      backdrop.className = this._config.className;
8134
8135      if (this._config.isAnimated) {
8136        backdrop.classList.add(CLASS_NAME_FADE$4);
8137      }
8138
8139      this._element = backdrop;
8140    }
8141
8142    return this._element;
8143  }
8144
8145  _getConfig(config) {
8146    config = { ...Default$7,
8147      ...(typeof config === 'object' ? config : {})
8148    }; // use getElement() with the default "body" to get a fresh Element on each instantiation
8149
8150    config.rootElement = getElement(config.rootElement);
8151    typeCheckConfig(NAME$8, config, DefaultType$7);
8152    return config;
8153  }
8154
8155  _append() {
8156    if (this._isAppended) {
8157      return;
8158    }
8159
8160    this._config.rootElement.append(this._getElement());
8161
8162    EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {
8163      execute(this._config.clickCallback);
8164    });
8165    this._isAppended = true;
8166  }
8167
8168  dispose() {
8169    if (!this._isAppended) {
8170      return;
8171    }
8172
8173    EventHandler.off(this._element, EVENT_MOUSEDOWN);
8174
8175    this._element.remove();
8176
8177    this._isAppended = false;
8178  }
8179
8180  _emulateAnimation(callback) {
8181    executeAfterTransition(callback, this._getElement(), this._config.isAnimated);
8182  }
8183
8184}
8185
8186/**
8187 * --------------------------------------------------------------------------
8188 * Bootstrap (v5.1.3): util/focustrap.js
8189 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8190 * --------------------------------------------------------------------------
8191 */
8192const Default$6 = {
8193  trapElement: null,
8194  // The element to trap focus inside of
8195  autofocus: true
8196};
8197const DefaultType$6 = {
8198  trapElement: 'element',
8199  autofocus: 'boolean'
8200};
8201const NAME$7 = 'focustrap';
8202const DATA_KEY$7 = 'bs.focustrap';
8203const EVENT_KEY$7 = `.${DATA_KEY$7}`;
8204const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$7}`;
8205const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$7}`;
8206const TAB_KEY = 'Tab';
8207const TAB_NAV_FORWARD = 'forward';
8208const TAB_NAV_BACKWARD = 'backward';
8209
8210class FocusTrap {
8211  constructor(config) {
8212    this._config = this._getConfig(config);
8213    this._isActive = false;
8214    this._lastTabNavDirection = null;
8215  }
8216
8217  activate() {
8218    const {
8219      trapElement,
8220      autofocus
8221    } = this._config;
8222
8223    if (this._isActive) {
8224      return;
8225    }
8226
8227    if (autofocus) {
8228      trapElement.focus();
8229    }
8230
8231    EventHandler.off(document, EVENT_KEY$7); // guard against infinite focus loop
8232
8233    EventHandler.on(document, EVENT_FOCUSIN$1, event => this._handleFocusin(event));
8234    EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
8235    this._isActive = true;
8236  }
8237
8238  deactivate() {
8239    if (!this._isActive) {
8240      return;
8241    }
8242
8243    this._isActive = false;
8244    EventHandler.off(document, EVENT_KEY$7);
8245  } // Private
8246
8247
8248  _handleFocusin(event) {
8249    const {
8250      target
8251    } = event;
8252    const {
8253      trapElement
8254    } = this._config;
8255
8256    if (target === document || target === trapElement || trapElement.contains(target)) {
8257      return;
8258    }
8259
8260    const elements = SelectorEngine.focusableChildren(trapElement);
8261
8262    if (elements.length === 0) {
8263      trapElement.focus();
8264    } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
8265      elements[elements.length - 1].focus();
8266    } else {
8267      elements[0].focus();
8268    }
8269  }
8270
8271  _handleKeydown(event) {
8272    if (event.key !== TAB_KEY) {
8273      return;
8274    }
8275
8276    this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
8277  }
8278
8279  _getConfig(config) {
8280    config = { ...Default$6,
8281      ...(typeof config === 'object' ? config : {})
8282    };
8283    typeCheckConfig(NAME$7, config, DefaultType$6);
8284    return config;
8285  }
8286
8287}
8288
8289/**
8290 * --------------------------------------------------------------------------
8291 * Bootstrap (v5.1.3): modal.js
8292 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8293 * --------------------------------------------------------------------------
8294 */
8295/**
8296 * ------------------------------------------------------------------------
8297 * Constants
8298 * ------------------------------------------------------------------------
8299 */
8300
8301const NAME$6 = 'modal';
8302const DATA_KEY$6 = 'bs.modal';
8303const EVENT_KEY$6 = `.${DATA_KEY$6}`;
8304const DATA_API_KEY$3 = '.data-api';
8305const ESCAPE_KEY$1 = 'Escape';
8306const Default$5 = {
8307  backdrop: true,
8308  keyboard: true,
8309  focus: true
8310};
8311const DefaultType$5 = {
8312  backdrop: '(boolean|string)',
8313  keyboard: 'boolean',
8314  focus: 'boolean'
8315};
8316const EVENT_HIDE$3 = `hide${EVENT_KEY$6}`;
8317const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$6}`;
8318const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
8319const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
8320const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
8321const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
8322const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$6}`;
8323const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
8324const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;
8325const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;
8326const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
8327const CLASS_NAME_OPEN = 'modal-open';
8328const CLASS_NAME_FADE$3 = 'fade';
8329const CLASS_NAME_SHOW$4 = 'show';
8330const CLASS_NAME_STATIC = 'modal-static';
8331const OPEN_SELECTOR$1 = '.modal.show';
8332const SELECTOR_DIALOG = '.modal-dialog';
8333const SELECTOR_MODAL_BODY = '.modal-body';
8334const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
8335/**
8336 * ------------------------------------------------------------------------
8337 * Class Definition
8338 * ------------------------------------------------------------------------
8339 */
8340
8341class Modal extends BaseComponent {
8342  constructor(element, config) {
8343    super(element);
8344    this._config = this._getConfig(config);
8345    this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
8346    this._backdrop = this._initializeBackDrop();
8347    this._focustrap = this._initializeFocusTrap();
8348    this._isShown = false;
8349    this._ignoreBackdropClick = false;
8350    this._isTransitioning = false;
8351    this._scrollBar = new ScrollBarHelper();
8352  } // Getters
8353
8354
8355  static get Default() {
8356    return Default$5;
8357  }
8358
8359  static get NAME() {
8360    return NAME$6;
8361  } // Public
8362
8363
8364  toggle(relatedTarget) {
8365    return this._isShown ? this.hide() : this.show(relatedTarget);
8366  }
8367
8368  show(relatedTarget) {
8369    if (this._isShown || this._isTransitioning) {
8370      return;
8371    }
8372
8373    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
8374      relatedTarget
8375    });
8376
8377    if (showEvent.defaultPrevented) {
8378      return;
8379    }
8380
8381    this._isShown = true;
8382
8383    if (this._isAnimated()) {
8384      this._isTransitioning = true;
8385    }
8386
8387    this._scrollBar.hide();
8388
8389    document.body.classList.add(CLASS_NAME_OPEN);
8390
8391    this._adjustDialog();
8392
8393    this._setEscapeEvent();
8394
8395    this._setResizeEvent();
8396
8397    EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
8398      EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {
8399        if (event.target === this._element) {
8400          this._ignoreBackdropClick = true;
8401        }
8402      });
8403    });
8404
8405    this._showBackdrop(() => this._showElement(relatedTarget));
8406  }
8407
8408  hide() {
8409    if (!this._isShown || this._isTransitioning) {
8410      return;
8411    }
8412
8413    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);
8414
8415    if (hideEvent.defaultPrevented) {
8416      return;
8417    }
8418
8419    this._isShown = false;
8420
8421    const isAnimated = this._isAnimated();
8422
8423    if (isAnimated) {
8424      this._isTransitioning = true;
8425    }
8426
8427    this._setEscapeEvent();
8428
8429    this._setResizeEvent();
8430
8431    this._focustrap.deactivate();
8432
8433    this._element.classList.remove(CLASS_NAME_SHOW$4);
8434
8435    EventHandler.off(this._element, EVENT_CLICK_DISMISS);
8436    EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
8437
8438    this._queueCallback(() => this._hideModal(), this._element, isAnimated);
8439  }
8440
8441  dispose() {
8442    [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));
8443
8444    this._backdrop.dispose();
8445
8446    this._focustrap.deactivate();
8447
8448    super.dispose();
8449  }
8450
8451  handleUpdate() {
8452    this._adjustDialog();
8453  } // Private
8454
8455
8456  _initializeBackDrop() {
8457    return new Backdrop({
8458      isVisible: Boolean(this._config.backdrop),
8459      // 'static' option will be translated to true, and booleans will keep their value
8460      isAnimated: this._isAnimated()
8461    });
8462  }
8463
8464  _initializeFocusTrap() {
8465    return new FocusTrap({
8466      trapElement: this._element
8467    });
8468  }
8469
8470  _getConfig(config) {
8471    config = { ...Default$5,
8472      ...Manipulator.getDataAttributes(this._element),
8473      ...(typeof config === 'object' ? config : {})
8474    };
8475    typeCheckConfig(NAME$6, config, DefaultType$5);
8476    return config;
8477  }
8478
8479  _showElement(relatedTarget) {
8480    const isAnimated = this._isAnimated();
8481
8482    const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
8483
8484    if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
8485      // Don't move modal's DOM position
8486      document.body.append(this._element);
8487    }
8488
8489    this._element.style.display = 'block';
8490
8491    this._element.removeAttribute('aria-hidden');
8492
8493    this._element.setAttribute('aria-modal', true);
8494
8495    this._element.setAttribute('role', 'dialog');
8496
8497    this._element.scrollTop = 0;
8498
8499    if (modalBody) {
8500      modalBody.scrollTop = 0;
8501    }
8502
8503    if (isAnimated) {
8504      reflow(this._element);
8505    }
8506
8507    this._element.classList.add(CLASS_NAME_SHOW$4);
8508
8509    const transitionComplete = () => {
8510      if (this._config.focus) {
8511        this._focustrap.activate();
8512      }
8513
8514      this._isTransitioning = false;
8515      EventHandler.trigger(this._element, EVENT_SHOWN$3, {
8516        relatedTarget
8517      });
8518    };
8519
8520    this._queueCallback(transitionComplete, this._dialog, isAnimated);
8521  }
8522
8523  _setEscapeEvent() {
8524    if (this._isShown) {
8525      EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
8526        if (this._config.keyboard && event.key === ESCAPE_KEY$1) {
8527          event.preventDefault();
8528          this.hide();
8529        } else if (!this._config.keyboard && event.key === ESCAPE_KEY$1) {
8530          this._triggerBackdropTransition();
8531        }
8532      });
8533    } else {
8534      EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS$1);
8535    }
8536  }
8537
8538  _setResizeEvent() {
8539    if (this._isShown) {
8540      EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog());
8541    } else {
8542      EventHandler.off(window, EVENT_RESIZE);
8543    }
8544  }
8545
8546  _hideModal() {
8547    this._element.style.display = 'none';
8548
8549    this._element.setAttribute('aria-hidden', true);
8550
8551    this._element.removeAttribute('aria-modal');
8552
8553    this._element.removeAttribute('role');
8554
8555    this._isTransitioning = false;
8556
8557    this._backdrop.hide(() => {
8558      document.body.classList.remove(CLASS_NAME_OPEN);
8559
8560      this._resetAdjustments();
8561
8562      this._scrollBar.reset();
8563
8564      EventHandler.trigger(this._element, EVENT_HIDDEN$3);
8565    });
8566  }
8567
8568  _showBackdrop(callback) {
8569    EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {
8570      if (this._ignoreBackdropClick) {
8571        this._ignoreBackdropClick = false;
8572        return;
8573      }
8574
8575      if (event.target !== event.currentTarget) {
8576        return;
8577      }
8578
8579      if (this._config.backdrop === true) {
8580        this.hide();
8581      } else if (this._config.backdrop === 'static') {
8582        this._triggerBackdropTransition();
8583      }
8584    });
8585
8586    this._backdrop.show(callback);
8587  }
8588
8589  _isAnimated() {
8590    return this._element.classList.contains(CLASS_NAME_FADE$3);
8591  }
8592
8593  _triggerBackdropTransition() {
8594    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
8595
8596    if (hideEvent.defaultPrevented) {
8597      return;
8598    }
8599
8600    const {
8601      classList,
8602      scrollHeight,
8603      style
8604    } = this._element;
8605    const isModalOverflowing = scrollHeight > document.documentElement.clientHeight; // return if the following background transition hasn't yet completed
8606
8607    if (!isModalOverflowing && style.overflowY === 'hidden' || classList.contains(CLASS_NAME_STATIC)) {
8608      return;
8609    }
8610
8611    if (!isModalOverflowing) {
8612      style.overflowY = 'hidden';
8613    }
8614
8615    classList.add(CLASS_NAME_STATIC);
8616
8617    this._queueCallback(() => {
8618      classList.remove(CLASS_NAME_STATIC);
8619
8620      if (!isModalOverflowing) {
8621        this._queueCallback(() => {
8622          style.overflowY = '';
8623        }, this._dialog);
8624      }
8625    }, this._dialog);
8626
8627    this._element.focus();
8628  } // ----------------------------------------------------------------------
8629  // the following methods are used to handle overflowing modals
8630  // ----------------------------------------------------------------------
8631
8632
8633  _adjustDialog() {
8634    const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
8635
8636    const scrollbarWidth = this._scrollBar.getWidth();
8637
8638    const isBodyOverflowing = scrollbarWidth > 0;
8639
8640    if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) {
8641      this._element.style.paddingLeft = `${scrollbarWidth}px`;
8642    }
8643
8644    if (isBodyOverflowing && !isModalOverflowing && !isRTL() || !isBodyOverflowing && isModalOverflowing && isRTL()) {
8645      this._element.style.paddingRight = `${scrollbarWidth}px`;
8646    }
8647  }
8648
8649  _resetAdjustments() {
8650    this._element.style.paddingLeft = '';
8651    this._element.style.paddingRight = '';
8652  } // Static
8653
8654
8655  static jQueryInterface(config, relatedTarget) {
8656    return this.each(function () {
8657      const data = Modal.getOrCreateInstance(this, config);
8658
8659      if (typeof config !== 'string') {
8660        return;
8661      }
8662
8663      if (typeof data[config] === 'undefined') {
8664        throw new TypeError(`No method named "${config}"`);
8665      }
8666
8667      data[config](relatedTarget);
8668    });
8669  }
8670
8671}
8672/**
8673 * ------------------------------------------------------------------------
8674 * Data Api implementation
8675 * ------------------------------------------------------------------------
8676 */
8677
8678
8679EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
8680  const target = getElementFromSelector(this);
8681
8682  if (['A', 'AREA'].includes(this.tagName)) {
8683    event.preventDefault();
8684  }
8685
8686  EventHandler.one(target, EVENT_SHOW$3, showEvent => {
8687    if (showEvent.defaultPrevented) {
8688      // only register focus restorer if modal will actually get shown
8689      return;
8690    }
8691
8692    EventHandler.one(target, EVENT_HIDDEN$3, () => {
8693      if (isVisible(this)) {
8694        this.focus();
8695      }
8696    });
8697  }); // avoid conflict when clicking moddal toggler while another one is open
8698
8699  const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);
8700
8701  if (allReadyOpen) {
8702    Modal.getInstance(allReadyOpen).hide();
8703  }
8704
8705  const data = Modal.getOrCreateInstance(target);
8706  data.toggle(this);
8707});
8708enableDismissTrigger(Modal);
8709/**
8710 * ------------------------------------------------------------------------
8711 * jQuery
8712 * ------------------------------------------------------------------------
8713 * add .Modal to jQuery only if jQuery is present
8714 */
8715
8716defineJQueryPlugin(Modal);
8717
8718/**
8719 * --------------------------------------------------------------------------
8720 * Bootstrap (v5.1.3): offcanvas.js
8721 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8722 * --------------------------------------------------------------------------
8723 */
8724/**
8725 * ------------------------------------------------------------------------
8726 * Constants
8727 * ------------------------------------------------------------------------
8728 */
8729
8730const NAME$5 = 'offcanvas';
8731const DATA_KEY$5 = 'bs.offcanvas';
8732const EVENT_KEY$5 = `.${DATA_KEY$5}`;
8733const DATA_API_KEY$2 = '.data-api';
8734const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$5}${DATA_API_KEY$2}`;
8735const ESCAPE_KEY = 'Escape';
8736const Default$4 = {
8737  backdrop: true,
8738  keyboard: true,
8739  scroll: false
8740};
8741const DefaultType$4 = {
8742  backdrop: 'boolean',
8743  keyboard: 'boolean',
8744  scroll: 'boolean'
8745};
8746const CLASS_NAME_SHOW$3 = 'show';
8747const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';
8748const OPEN_SELECTOR = '.offcanvas.show';
8749const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;
8750const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
8751const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
8752const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
8753const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
8754const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
8755const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
8756/**
8757 * ------------------------------------------------------------------------
8758 * Class Definition
8759 * ------------------------------------------------------------------------
8760 */
8761
8762class Offcanvas extends BaseComponent {
8763  constructor(element, config) {
8764    super(element);
8765    this._config = this._getConfig(config);
8766    this._isShown = false;
8767    this._backdrop = this._initializeBackDrop();
8768    this._focustrap = this._initializeFocusTrap();
8769
8770    this._addEventListeners();
8771  } // Getters
8772
8773
8774  static get NAME() {
8775    return NAME$5;
8776  }
8777
8778  static get Default() {
8779    return Default$4;
8780  } // Public
8781
8782
8783  toggle(relatedTarget) {
8784    return this._isShown ? this.hide() : this.show(relatedTarget);
8785  }
8786
8787  show(relatedTarget) {
8788    if (this._isShown) {
8789      return;
8790    }
8791
8792    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {
8793      relatedTarget
8794    });
8795
8796    if (showEvent.defaultPrevented) {
8797      return;
8798    }
8799
8800    this._isShown = true;
8801    this._element.style.visibility = 'visible';
8802
8803    this._backdrop.show();
8804
8805    if (!this._config.scroll) {
8806      new ScrollBarHelper().hide();
8807    }
8808
8809    this._element.removeAttribute('aria-hidden');
8810
8811    this._element.setAttribute('aria-modal', true);
8812
8813    this._element.setAttribute('role', 'dialog');
8814
8815    this._element.classList.add(CLASS_NAME_SHOW$3);
8816
8817    const completeCallBack = () => {
8818      if (!this._config.scroll) {
8819        this._focustrap.activate();
8820      }
8821
8822      EventHandler.trigger(this._element, EVENT_SHOWN$2, {
8823        relatedTarget
8824      });
8825    };
8826
8827    this._queueCallback(completeCallBack, this._element, true);
8828  }
8829
8830  hide() {
8831    if (!this._isShown) {
8832      return;
8833    }
8834
8835    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);
8836
8837    if (hideEvent.defaultPrevented) {
8838      return;
8839    }
8840
8841    this._focustrap.deactivate();
8842
8843    this._element.blur();
8844
8845    this._isShown = false;
8846
8847    this._element.classList.remove(CLASS_NAME_SHOW$3);
8848
8849    this._backdrop.hide();
8850
8851    const completeCallback = () => {
8852      this._element.setAttribute('aria-hidden', true);
8853
8854      this._element.removeAttribute('aria-modal');
8855
8856      this._element.removeAttribute('role');
8857
8858      this._element.style.visibility = 'hidden';
8859
8860      if (!this._config.scroll) {
8861        new ScrollBarHelper().reset();
8862      }
8863
8864      EventHandler.trigger(this._element, EVENT_HIDDEN$2);
8865    };
8866
8867    this._queueCallback(completeCallback, this._element, true);
8868  }
8869
8870  dispose() {
8871    this._backdrop.dispose();
8872
8873    this._focustrap.deactivate();
8874
8875    super.dispose();
8876  } // Private
8877
8878
8879  _getConfig(config) {
8880    config = { ...Default$4,
8881      ...Manipulator.getDataAttributes(this._element),
8882      ...(typeof config === 'object' ? config : {})
8883    };
8884    typeCheckConfig(NAME$5, config, DefaultType$4);
8885    return config;
8886  }
8887
8888  _initializeBackDrop() {
8889    return new Backdrop({
8890      className: CLASS_NAME_BACKDROP,
8891      isVisible: this._config.backdrop,
8892      isAnimated: true,
8893      rootElement: this._element.parentNode,
8894      clickCallback: () => this.hide()
8895    });
8896  }
8897
8898  _initializeFocusTrap() {
8899    return new FocusTrap({
8900      trapElement: this._element
8901    });
8902  }
8903
8904  _addEventListeners() {
8905    EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
8906      if (this._config.keyboard && event.key === ESCAPE_KEY) {
8907        this.hide();
8908      }
8909    });
8910  } // Static
8911
8912
8913  static jQueryInterface(config) {
8914    return this.each(function () {
8915      const data = Offcanvas.getOrCreateInstance(this, config);
8916
8917      if (typeof config !== 'string') {
8918        return;
8919      }
8920
8921      if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
8922        throw new TypeError(`No method named "${config}"`);
8923      }
8924
8925      data[config](this);
8926    });
8927  }
8928
8929}
8930/**
8931 * ------------------------------------------------------------------------
8932 * Data Api implementation
8933 * ------------------------------------------------------------------------
8934 */
8935
8936
8937EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
8938  const target = getElementFromSelector(this);
8939
8940  if (['A', 'AREA'].includes(this.tagName)) {
8941    event.preventDefault();
8942  }
8943
8944  if (isDisabled(this)) {
8945    return;
8946  }
8947
8948  EventHandler.one(target, EVENT_HIDDEN$2, () => {
8949    // focus on trigger when it is closed
8950    if (isVisible(this)) {
8951      this.focus();
8952    }
8953  }); // avoid conflict when clicking a toggler of an offcanvas, while another is open
8954
8955  const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);
8956
8957  if (allReadyOpen && allReadyOpen !== target) {
8958    Offcanvas.getInstance(allReadyOpen).hide();
8959  }
8960
8961  const data = Offcanvas.getOrCreateInstance(target);
8962  data.toggle(this);
8963});
8964EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show()));
8965enableDismissTrigger(Offcanvas);
8966/**
8967 * ------------------------------------------------------------------------
8968 * jQuery
8969 * ------------------------------------------------------------------------
8970 */
8971
8972defineJQueryPlugin(Offcanvas);
8973
8974/**
8975 * --------------------------------------------------------------------------
8976 * Bootstrap (v5.1.3): util/sanitizer.js
8977 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8978 * --------------------------------------------------------------------------
8979 */
8980const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
8981const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
8982/**
8983 * A pattern that recognizes a commonly useful subset of URLs that are safe.
8984 *
8985 * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
8986 */
8987
8988const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
8989/**
8990 * A pattern that matches safe data URLs. Only matches image, video and audio types.
8991 *
8992 * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
8993 */
8994
8995const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
8996
8997const allowedAttribute = (attribute, allowedAttributeList) => {
8998  const attributeName = attribute.nodeName.toLowerCase();
8999
9000  if (allowedAttributeList.includes(attributeName)) {
9001    if (uriAttributes.has(attributeName)) {
9002      return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));
9003    }
9004
9005    return true;
9006  }
9007
9008  const regExp = allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp); // Check if a regular expression validates the attribute.
9009
9010  for (let i = 0, len = regExp.length; i < len; i++) {
9011    if (regExp[i].test(attributeName)) {
9012      return true;
9013    }
9014  }
9015
9016  return false;
9017};
9018
9019const DefaultAllowlist = {
9020  // Global attributes allowed on any supplied element below.
9021  '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
9022  a: ['target', 'href', 'title', 'rel'],
9023  area: [],
9024  b: [],
9025  br: [],
9026  col: [],
9027  code: [],
9028  div: [],
9029  em: [],
9030  hr: [],
9031  h1: [],
9032  h2: [],
9033  h3: [],
9034  h4: [],
9035  h5: [],
9036  h6: [],
9037  i: [],
9038  img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
9039  li: [],
9040  ol: [],
9041  p: [],
9042  pre: [],
9043  s: [],
9044  small: [],
9045  span: [],
9046  sub: [],
9047  sup: [],
9048  strong: [],
9049  u: [],
9050  ul: []
9051};
9052function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
9053  if (!unsafeHtml.length) {
9054    return unsafeHtml;
9055  }
9056
9057  if (sanitizeFn && typeof sanitizeFn === 'function') {
9058    return sanitizeFn(unsafeHtml);
9059  }
9060
9061  const domParser = new window.DOMParser();
9062  const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
9063  const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
9064
9065  for (let i = 0, len = elements.length; i < len; i++) {
9066    const element = elements[i];
9067    const elementName = element.nodeName.toLowerCase();
9068
9069    if (!Object.keys(allowList).includes(elementName)) {
9070      element.remove();
9071      continue;
9072    }
9073
9074    const attributeList = [].concat(...element.attributes);
9075    const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);
9076    attributeList.forEach(attribute => {
9077      if (!allowedAttribute(attribute, allowedAttributes)) {
9078        element.removeAttribute(attribute.nodeName);
9079      }
9080    });
9081  }
9082
9083  return createdDocument.body.innerHTML;
9084}
9085
9086/**
9087 * --------------------------------------------------------------------------
9088 * Bootstrap (v5.1.3): tooltip.js
9089 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
9090 * --------------------------------------------------------------------------
9091 */
9092/**
9093 * ------------------------------------------------------------------------
9094 * Constants
9095 * ------------------------------------------------------------------------
9096 */
9097
9098const NAME$4 = 'tooltip';
9099const DATA_KEY$4 = 'bs.tooltip';
9100const EVENT_KEY$4 = `.${DATA_KEY$4}`;
9101const CLASS_PREFIX$1 = 'bs-tooltip';
9102const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
9103const DefaultType$3 = {
9104  animation: 'boolean',
9105  template: 'string',
9106  title: '(string|element|function)',
9107  trigger: 'string',
9108  delay: '(number|object)',
9109  html: 'boolean',
9110  selector: '(string|boolean)',
9111  placement: '(string|function)',
9112  offset: '(array|string|function)',
9113  container: '(string|element|boolean)',
9114  fallbackPlacements: 'array',
9115  boundary: '(string|element)',
9116  customClass: '(string|function)',
9117  sanitize: 'boolean',
9118  sanitizeFn: '(null|function)',
9119  allowList: 'object',
9120  popperConfig: '(null|object|function)'
9121};
9122const AttachmentMap = {
9123  AUTO: 'auto',
9124  TOP: 'top',
9125  RIGHT: isRTL() ? 'left' : 'right',
9126  BOTTOM: 'bottom',
9127  LEFT: isRTL() ? 'right' : 'left'
9128};
9129const Default$3 = {
9130  animation: true,
9131  template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
9132  trigger: 'hover focus',
9133  title: '',
9134  delay: 0,
9135  html: false,
9136  selector: false,
9137  placement: 'top',
9138  offset: [0, 0],
9139  container: false,
9140  fallbackPlacements: ['top', 'right', 'bottom', 'left'],
9141  boundary: 'clippingParents',
9142  customClass: '',
9143  sanitize: true,
9144  sanitizeFn: null,
9145  allowList: DefaultAllowlist,
9146  popperConfig: null
9147};
9148const Event$2 = {
9149  HIDE: `hide${EVENT_KEY$4}`,
9150  HIDDEN: `hidden${EVENT_KEY$4}`,
9151  SHOW: `show${EVENT_KEY$4}`,
9152  SHOWN: `shown${EVENT_KEY$4}`,
9153  INSERTED: `inserted${EVENT_KEY$4}`,
9154  CLICK: `click${EVENT_KEY$4}`,
9155  FOCUSIN: `focusin${EVENT_KEY$4}`,
9156  FOCUSOUT: `focusout${EVENT_KEY$4}`,
9157  MOUSEENTER: `mouseenter${EVENT_KEY$4}`,
9158  MOUSELEAVE: `mouseleave${EVENT_KEY$4}`
9159};
9160const CLASS_NAME_FADE$2 = 'fade';
9161const CLASS_NAME_MODAL = 'modal';
9162const CLASS_NAME_SHOW$2 = 'show';
9163const HOVER_STATE_SHOW = 'show';
9164const HOVER_STATE_OUT = 'out';
9165const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
9166const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;
9167const EVENT_MODAL_HIDE = 'hide.bs.modal';
9168const TRIGGER_HOVER = 'hover';
9169const TRIGGER_FOCUS = 'focus';
9170const TRIGGER_CLICK = 'click';
9171const TRIGGER_MANUAL = 'manual';
9172/**
9173 * ------------------------------------------------------------------------
9174 * Class Definition
9175 * ------------------------------------------------------------------------
9176 */
9177
9178class Tooltip extends BaseComponent {
9179  constructor(element, config) {
9180    if (typeof _popperjs_core__WEBPACK_IMPORTED_MODULE_0__ === 'undefined') {
9181      throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
9182    }
9183
9184    super(element); // private
9185
9186    this._isEnabled = true;
9187    this._timeout = 0;
9188    this._hoverState = '';
9189    this._activeTrigger = {};
9190    this._popper = null; // Protected
9191
9192    this._config = this._getConfig(config);
9193    this.tip = null;
9194
9195    this._setListeners();
9196  } // Getters
9197
9198
9199  static get Default() {
9200    return Default$3;
9201  }
9202
9203  static get NAME() {
9204    return NAME$4;
9205  }
9206
9207  static get Event() {
9208    return Event$2;
9209  }
9210
9211  static get DefaultType() {
9212    return DefaultType$3;
9213  } // Public
9214
9215
9216  enable() {
9217    this._isEnabled = true;
9218  }
9219
9220  disable() {
9221    this._isEnabled = false;
9222  }
9223
9224  toggleEnabled() {
9225    this._isEnabled = !this._isEnabled;
9226  }
9227
9228  toggle(event) {
9229    if (!this._isEnabled) {
9230      return;
9231    }
9232
9233    if (event) {
9234      const context = this._initializeOnDelegatedTarget(event);
9235
9236      context._activeTrigger.click = !context._activeTrigger.click;
9237
9238      if (context._isWithActiveTrigger()) {
9239        context._enter(null, context);
9240      } else {
9241        context._leave(null, context);
9242      }
9243    } else {
9244      if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$2)) {
9245        this._leave(null, this);
9246
9247        return;
9248      }
9249
9250      this._enter(null, this);
9251    }
9252  }
9253
9254  dispose() {
9255    clearTimeout(this._timeout);
9256    EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
9257
9258    if (this.tip) {
9259      this.tip.remove();
9260    }
9261
9262    this._disposePopper();
9263
9264    super.dispose();
9265  }
9266
9267  show() {
9268    if (this._element.style.display === 'none') {
9269      throw new Error('Please use show on visible elements');
9270    }
9271
9272    if (!(this.isWithContent() && this._isEnabled)) {
9273      return;
9274    }
9275
9276    const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);
9277    const shadowRoot = findShadowRoot(this._element);
9278    const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
9279
9280    if (showEvent.defaultPrevented || !isInTheDom) {
9281      return;
9282    } // A trick to recreate a tooltip in case a new title is given by using the NOT documented `data-bs-original-title`
9283    // This will be removed later in favor of a `setContent` method
9284
9285
9286    if (this.constructor.NAME === 'tooltip' && this.tip && this.getTitle() !== this.tip.querySelector(SELECTOR_TOOLTIP_INNER).innerHTML) {
9287      this._disposePopper();
9288
9289      this.tip.remove();
9290      this.tip = null;
9291    }
9292
9293    const tip = this.getTipElement();
9294    const tipId = getUID(this.constructor.NAME);
9295    tip.setAttribute('id', tipId);
9296
9297    this._element.setAttribute('aria-describedby', tipId);
9298
9299    if (this._config.animation) {
9300      tip.classList.add(CLASS_NAME_FADE$2);
9301    }
9302
9303    const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
9304
9305    const attachment = this._getAttachment(placement);
9306
9307    this._addAttachmentClass(attachment);
9308
9309    const {
9310      container
9311    } = this._config;
9312    Data.set(tip, this.constructor.DATA_KEY, this);
9313
9314    if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
9315      container.append(tip);
9316      EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
9317    }
9318
9319    if (this._popper) {
9320      this._popper.update();
9321    } else {
9322      this._popper = _popperjs_core__WEBPACK_IMPORTED_MODULE_1__.createPopper(this._element, tip, this._getPopperConfig(attachment));
9323    }
9324
9325    tip.classList.add(CLASS_NAME_SHOW$2);
9326
9327    const customClass = this._resolvePossibleFunction(this._config.customClass);
9328
9329    if (customClass) {
9330      tip.classList.add(...customClass.split(' '));
9331    } // If this is a touch-enabled device we add extra
9332    // empty mouseover listeners to the body's immediate children;
9333    // only needed because of broken event delegation on iOS
9334    // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
9335
9336
9337    if ('ontouchstart' in document.documentElement) {
9338      [].concat(...document.body.children).forEach(element => {
9339        EventHandler.on(element, 'mouseover', noop);
9340      });
9341    }
9342
9343    const complete = () => {
9344      const prevHoverState = this._hoverState;
9345      this._hoverState = null;
9346      EventHandler.trigger(this._element, this.constructor.Event.SHOWN);
9347
9348      if (prevHoverState === HOVER_STATE_OUT) {
9349        this._leave(null, this);
9350      }
9351    };
9352
9353    const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
9354
9355    this._queueCallback(complete, this.tip, isAnimated);
9356  }
9357
9358  hide() {
9359    if (!this._popper) {
9360      return;
9361    }
9362
9363    const tip = this.getTipElement();
9364
9365    const complete = () => {
9366      if (this._isWithActiveTrigger()) {
9367        return;
9368      }
9369
9370      if (this._hoverState !== HOVER_STATE_SHOW) {
9371        tip.remove();
9372      }
9373
9374      this._cleanTipClass();
9375
9376      this._element.removeAttribute('aria-describedby');
9377
9378      EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);
9379
9380      this._disposePopper();
9381    };
9382
9383    const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);
9384
9385    if (hideEvent.defaultPrevented) {
9386      return;
9387    }
9388
9389    tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra
9390    // empty mouseover listeners we added for iOS support
9391
9392    if ('ontouchstart' in document.documentElement) {
9393      [].concat(...document.body.children).forEach(element => EventHandler.off(element, 'mouseover', noop));
9394    }
9395
9396    this._activeTrigger[TRIGGER_CLICK] = false;
9397    this._activeTrigger[TRIGGER_FOCUS] = false;
9398    this._activeTrigger[TRIGGER_HOVER] = false;
9399    const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
9400
9401    this._queueCallback(complete, this.tip, isAnimated);
9402
9403    this._hoverState = '';
9404  }
9405
9406  update() {
9407    if (this._popper !== null) {
9408      this._popper.update();
9409    }
9410  } // Protected
9411
9412
9413  isWithContent() {
9414    return Boolean(this.getTitle());
9415  }
9416
9417  getTipElement() {
9418    if (this.tip) {
9419      return this.tip;
9420    }
9421
9422    const element = document.createElement('div');
9423    element.innerHTML = this._config.template;
9424    const tip = element.children[0];
9425    this.setContent(tip);
9426    tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
9427    this.tip = tip;
9428    return this.tip;
9429  }
9430
9431  setContent(tip) {
9432    this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TOOLTIP_INNER);
9433  }
9434
9435  _sanitizeAndSetContent(template, content, selector) {
9436    const templateElement = SelectorEngine.findOne(selector, template);
9437
9438    if (!content && templateElement) {
9439      templateElement.remove();
9440      return;
9441    } // we use append for html objects to maintain js events
9442
9443
9444    this.setElementContent(templateElement, content);
9445  }
9446
9447  setElementContent(element, content) {
9448    if (element === null) {
9449      return;
9450    }
9451
9452    if (isElement(content)) {
9453      content = getElement(content); // content is a DOM node or a jQuery
9454
9455      if (this._config.html) {
9456        if (content.parentNode !== element) {
9457          element.innerHTML = '';
9458          element.append(content);
9459        }
9460      } else {
9461        element.textContent = content.textContent;
9462      }
9463
9464      return;
9465    }
9466
9467    if (this._config.html) {
9468      if (this._config.sanitize) {
9469        content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
9470      }
9471
9472      element.innerHTML = content;
9473    } else {
9474      element.textContent = content;
9475    }
9476  }
9477
9478  getTitle() {
9479    const title = this._element.getAttribute('data-bs-original-title') || this._config.title;
9480
9481    return this._resolvePossibleFunction(title);
9482  }
9483
9484  updateAttachment(attachment) {
9485    if (attachment === 'right') {
9486      return 'end';
9487    }
9488
9489    if (attachment === 'left') {
9490      return 'start';
9491    }
9492
9493    return attachment;
9494  } // Private
9495
9496
9497  _initializeOnDelegatedTarget(event, context) {
9498    return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
9499  }
9500
9501  _getOffset() {
9502    const {
9503      offset
9504    } = this._config;
9505
9506    if (typeof offset === 'string') {
9507      return offset.split(',').map(val => Number.parseInt(val, 10));
9508    }
9509
9510    if (typeof offset === 'function') {
9511      return popperData => offset(popperData, this._element);
9512    }
9513
9514    return offset;
9515  }
9516
9517  _resolvePossibleFunction(content) {
9518    return typeof content === 'function' ? content.call(this._element) : content;
9519  }
9520
9521  _getPopperConfig(attachment) {
9522    const defaultBsPopperConfig = {
9523      placement: attachment,
9524      modifiers: [{
9525        name: 'flip',
9526        options: {
9527          fallbackPlacements: this._config.fallbackPlacements
9528        }
9529      }, {
9530        name: 'offset',
9531        options: {
9532          offset: this._getOffset()
9533        }
9534      }, {
9535        name: 'preventOverflow',
9536        options: {
9537          boundary: this._config.boundary
9538        }
9539      }, {
9540        name: 'arrow',
9541        options: {
9542          element: `.${this.constructor.NAME}-arrow`
9543        }
9544      }, {
9545        name: 'onChange',
9546        enabled: true,
9547        phase: 'afterWrite',
9548        fn: data => this._handlePopperPlacementChange(data)
9549      }],
9550      onFirstUpdate: data => {
9551        if (data.options.placement !== data.placement) {
9552          this._handlePopperPlacementChange(data);
9553        }
9554      }
9555    };
9556    return { ...defaultBsPopperConfig,
9557      ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
9558    };
9559  }
9560
9561  _addAttachmentClass(attachment) {
9562    this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(attachment)}`);
9563  }
9564
9565  _getAttachment(placement) {
9566    return AttachmentMap[placement.toUpperCase()];
9567  }
9568
9569  _setListeners() {
9570    const triggers = this._config.trigger.split(' ');
9571
9572    triggers.forEach(trigger => {
9573      if (trigger === 'click') {
9574        EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
9575      } else if (trigger !== TRIGGER_MANUAL) {
9576        const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
9577        const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
9578        EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));
9579        EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));
9580      }
9581    });
9582
9583    this._hideModalHandler = () => {
9584      if (this._element) {
9585        this.hide();
9586      }
9587    };
9588
9589    EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
9590
9591    if (this._config.selector) {
9592      this._config = { ...this._config,
9593        trigger: 'manual',
9594        selector: ''
9595      };
9596    } else {
9597      this._fixTitle();
9598    }
9599  }
9600
9601  _fixTitle() {
9602    const title = this._element.getAttribute('title');
9603
9604    const originalTitleType = typeof this._element.getAttribute('data-bs-original-title');
9605
9606    if (title || originalTitleType !== 'string') {
9607      this._element.setAttribute('data-bs-original-title', title || '');
9608
9609      if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {
9610        this._element.setAttribute('aria-label', title);
9611      }
9612
9613      this._element.setAttribute('title', '');
9614    }
9615  }
9616
9617  _enter(event, context) {
9618    context = this._initializeOnDelegatedTarget(event, context);
9619
9620    if (event) {
9621      context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
9622    }
9623
9624    if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$2) || context._hoverState === HOVER_STATE_SHOW) {
9625      context._hoverState = HOVER_STATE_SHOW;
9626      return;
9627    }
9628
9629    clearTimeout(context._timeout);
9630    context._hoverState = HOVER_STATE_SHOW;
9631
9632    if (!context._config.delay || !context._config.delay.show) {
9633      context.show();
9634      return;
9635    }
9636
9637    context._timeout = setTimeout(() => {
9638      if (context._hoverState === HOVER_STATE_SHOW) {
9639        context.show();
9640      }
9641    }, context._config.delay.show);
9642  }
9643
9644  _leave(event, context) {
9645    context = this._initializeOnDelegatedTarget(event, context);
9646
9647    if (event) {
9648      context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
9649    }
9650
9651    if (context._isWithActiveTrigger()) {
9652      return;
9653    }
9654
9655    clearTimeout(context._timeout);
9656    context._hoverState = HOVER_STATE_OUT;
9657
9658    if (!context._config.delay || !context._config.delay.hide) {
9659      context.hide();
9660      return;
9661    }
9662
9663    context._timeout = setTimeout(() => {
9664      if (context._hoverState === HOVER_STATE_OUT) {
9665        context.hide();
9666      }
9667    }, context._config.delay.hide);
9668  }
9669
9670  _isWithActiveTrigger() {
9671    for (const trigger in this._activeTrigger) {
9672      if (this._activeTrigger[trigger]) {
9673        return true;
9674      }
9675    }
9676
9677    return false;
9678  }
9679
9680  _getConfig(config) {
9681    const dataAttributes = Manipulator.getDataAttributes(this._element);
9682    Object.keys(dataAttributes).forEach(dataAttr => {
9683      if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
9684        delete dataAttributes[dataAttr];
9685      }
9686    });
9687    config = { ...this.constructor.Default,
9688      ...dataAttributes,
9689      ...(typeof config === 'object' && config ? config : {})
9690    };
9691    config.container = config.container === false ? document.body : getElement(config.container);
9692
9693    if (typeof config.delay === 'number') {
9694      config.delay = {
9695        show: config.delay,
9696        hide: config.delay
9697      };
9698    }
9699
9700    if (typeof config.title === 'number') {
9701      config.title = config.title.toString();
9702    }
9703
9704    if (typeof config.content === 'number') {
9705      config.content = config.content.toString();
9706    }
9707
9708    typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
9709
9710    if (config.sanitize) {
9711      config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);
9712    }
9713
9714    return config;
9715  }
9716
9717  _getDelegateConfig() {
9718    const config = {};
9719
9720    for (const key in this._config) {
9721      if (this.constructor.Default[key] !== this._config[key]) {
9722        config[key] = this._config[key];
9723      }
9724    } // In the future can be replaced with:
9725    // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
9726    // `Object.fromEntries(keysWithDifferentValues)`
9727
9728
9729    return config;
9730  }
9731
9732  _cleanTipClass() {
9733    const tip = this.getTipElement();
9734    const basicClassPrefixRegex = new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`, 'g');
9735    const tabClass = tip.getAttribute('class').match(basicClassPrefixRegex);
9736
9737    if (tabClass !== null && tabClass.length > 0) {
9738      tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
9739    }
9740  }
9741
9742  _getBasicClassPrefix() {
9743    return CLASS_PREFIX$1;
9744  }
9745
9746  _handlePopperPlacementChange(popperData) {
9747    const {
9748      state
9749    } = popperData;
9750
9751    if (!state) {
9752      return;
9753    }
9754
9755    this.tip = state.elements.popper;
9756
9757    this._cleanTipClass();
9758
9759    this._addAttachmentClass(this._getAttachment(state.placement));
9760  }
9761
9762  _disposePopper() {
9763    if (this._popper) {
9764      this._popper.destroy();
9765
9766      this._popper = null;
9767    }
9768  } // Static
9769
9770
9771  static jQueryInterface(config) {
9772    return this.each(function () {
9773      const data = Tooltip.getOrCreateInstance(this, config);
9774
9775      if (typeof config === 'string') {
9776        if (typeof data[config] === 'undefined') {
9777          throw new TypeError(`No method named "${config}"`);
9778        }
9779
9780        data[config]();
9781      }
9782    });
9783  }
9784
9785}
9786/**
9787 * ------------------------------------------------------------------------
9788 * jQuery
9789 * ------------------------------------------------------------------------
9790 * add .Tooltip to jQuery only if jQuery is present
9791 */
9792
9793
9794defineJQueryPlugin(Tooltip);
9795
9796/**
9797 * --------------------------------------------------------------------------
9798 * Bootstrap (v5.1.3): popover.js
9799 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
9800 * --------------------------------------------------------------------------
9801 */
9802/**
9803 * ------------------------------------------------------------------------
9804 * Constants
9805 * ------------------------------------------------------------------------
9806 */
9807
9808const NAME$3 = 'popover';
9809const DATA_KEY$3 = 'bs.popover';
9810const EVENT_KEY$3 = `.${DATA_KEY$3}`;
9811const CLASS_PREFIX = 'bs-popover';
9812const Default$2 = { ...Tooltip.Default,
9813  placement: 'right',
9814  offset: [0, 8],
9815  trigger: 'click',
9816  content: '',
9817  template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
9818};
9819const DefaultType$2 = { ...Tooltip.DefaultType,
9820  content: '(string|element|function)'
9821};
9822const Event$1 = {
9823  HIDE: `hide${EVENT_KEY$3}`,
9824  HIDDEN: `hidden${EVENT_KEY$3}`,
9825  SHOW: `show${EVENT_KEY$3}`,
9826  SHOWN: `shown${EVENT_KEY$3}`,
9827  INSERTED: `inserted${EVENT_KEY$3}`,
9828  CLICK: `click${EVENT_KEY$3}`,
9829  FOCUSIN: `focusin${EVENT_KEY$3}`,
9830  FOCUSOUT: `focusout${EVENT_KEY$3}`,
9831  MOUSEENTER: `mouseenter${EVENT_KEY$3}`,
9832  MOUSELEAVE: `mouseleave${EVENT_KEY$3}`
9833};
9834const SELECTOR_TITLE = '.popover-header';
9835const SELECTOR_CONTENT = '.popover-body';
9836/**
9837 * ------------------------------------------------------------------------
9838 * Class Definition
9839 * ------------------------------------------------------------------------
9840 */
9841
9842class Popover extends Tooltip {
9843  // Getters
9844  static get Default() {
9845    return Default$2;
9846  }
9847
9848  static get NAME() {
9849    return NAME$3;
9850  }
9851
9852  static get Event() {
9853    return Event$1;
9854  }
9855
9856  static get DefaultType() {
9857    return DefaultType$2;
9858  } // Overrides
9859
9860
9861  isWithContent() {
9862    return this.getTitle() || this._getContent();
9863  }
9864
9865  setContent(tip) {
9866    this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE);
9867
9868    this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT);
9869  } // Private
9870
9871
9872  _getContent() {
9873    return this._resolvePossibleFunction(this._config.content);
9874  }
9875
9876  _getBasicClassPrefix() {
9877    return CLASS_PREFIX;
9878  } // Static
9879
9880
9881  static jQueryInterface(config) {
9882    return this.each(function () {
9883      const data = Popover.getOrCreateInstance(this, config);
9884
9885      if (typeof config === 'string') {
9886        if (typeof data[config] === 'undefined') {
9887          throw new TypeError(`No method named "${config}"`);
9888        }
9889
9890        data[config]();
9891      }
9892    });
9893  }
9894
9895}
9896/**
9897 * ------------------------------------------------------------------------
9898 * jQuery
9899 * ------------------------------------------------------------------------
9900 * add .Popover to jQuery only if jQuery is present
9901 */
9902
9903
9904defineJQueryPlugin(Popover);
9905
9906/**
9907 * --------------------------------------------------------------------------
9908 * Bootstrap (v5.1.3): scrollspy.js
9909 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
9910 * --------------------------------------------------------------------------
9911 */
9912/**
9913 * ------------------------------------------------------------------------
9914 * Constants
9915 * ------------------------------------------------------------------------
9916 */
9917
9918const NAME$2 = 'scrollspy';
9919const DATA_KEY$2 = 'bs.scrollspy';
9920const EVENT_KEY$2 = `.${DATA_KEY$2}`;
9921const DATA_API_KEY$1 = '.data-api';
9922const Default$1 = {
9923  offset: 10,
9924  method: 'auto',
9925  target: ''
9926};
9927const DefaultType$1 = {
9928  offset: 'number',
9929  method: 'string',
9930  target: '(string|element)'
9931};
9932const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;
9933const EVENT_SCROLL = `scroll${EVENT_KEY$2}`;
9934const EVENT_LOAD_DATA_API = `load${EVENT_KEY$2}${DATA_API_KEY$1}`;
9935const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
9936const CLASS_NAME_ACTIVE$1 = 'active';
9937const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
9938const SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
9939const SELECTOR_NAV_LINKS = '.nav-link';
9940const SELECTOR_NAV_ITEMS = '.nav-item';
9941const SELECTOR_LIST_ITEMS = '.list-group-item';
9942const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}, .${CLASS_NAME_DROPDOWN_ITEM}`;
9943const SELECTOR_DROPDOWN$1 = '.dropdown';
9944const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
9945const METHOD_OFFSET = 'offset';
9946const METHOD_POSITION = 'position';
9947/**
9948 * ------------------------------------------------------------------------
9949 * Class Definition
9950 * ------------------------------------------------------------------------
9951 */
9952
9953class ScrollSpy extends BaseComponent {
9954  constructor(element, config) {
9955    super(element);
9956    this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
9957    this._config = this._getConfig(config);
9958    this._offsets = [];
9959    this._targets = [];
9960    this._activeTarget = null;
9961    this._scrollHeight = 0;
9962    EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process());
9963    this.refresh();
9964
9965    this._process();
9966  } // Getters
9967
9968
9969  static get Default() {
9970    return Default$1;
9971  }
9972
9973  static get NAME() {
9974    return NAME$2;
9975  } // Public
9976
9977
9978  refresh() {
9979    const autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
9980    const offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
9981    const offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
9982    this._offsets = [];
9983    this._targets = [];
9984    this._scrollHeight = this._getScrollHeight();
9985    const targets = SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target);
9986    targets.map(element => {
9987      const targetSelector = getSelectorFromElement(element);
9988      const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;
9989
9990      if (target) {
9991        const targetBCR = target.getBoundingClientRect();
9992
9993        if (targetBCR.width || targetBCR.height) {
9994          return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
9995        }
9996      }
9997
9998      return null;
9999    }).filter(item => item).sort((a, b) => a[0] - b[0]).forEach(item => {
10000      this._offsets.push(item[0]);
10001
10002      this._targets.push(item[1]);
10003    });
10004  }
10005
10006  dispose() {
10007    EventHandler.off(this._scrollElement, EVENT_KEY$2);
10008    super.dispose();
10009  } // Private
10010
10011
10012  _getConfig(config) {
10013    config = { ...Default$1,
10014      ...Manipulator.getDataAttributes(this._element),
10015      ...(typeof config === 'object' && config ? config : {})
10016    };
10017    config.target = getElement(config.target) || document.documentElement;
10018    typeCheckConfig(NAME$2, config, DefaultType$1);
10019    return config;
10020  }
10021
10022  _getScrollTop() {
10023    return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
10024  }
10025
10026  _getScrollHeight() {
10027    return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
10028  }
10029
10030  _getOffsetHeight() {
10031    return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
10032  }
10033
10034  _process() {
10035    const scrollTop = this._getScrollTop() + this._config.offset;
10036
10037    const scrollHeight = this._getScrollHeight();
10038
10039    const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
10040
10041    if (this._scrollHeight !== scrollHeight) {
10042      this.refresh();
10043    }
10044
10045    if (scrollTop >= maxScroll) {
10046      const target = this._targets[this._targets.length - 1];
10047
10048      if (this._activeTarget !== target) {
10049        this._activate(target);
10050      }
10051
10052      return;
10053    }
10054
10055    if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
10056      this._activeTarget = null;
10057
10058      this._clear();
10059
10060      return;
10061    }
10062
10063    for (let i = this._offsets.length; i--;) {
10064      const isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
10065
10066      if (isActiveTarget) {
10067        this._activate(this._targets[i]);
10068      }
10069    }
10070  }
10071
10072  _activate(target) {
10073    this._activeTarget = target;
10074
10075    this._clear();
10076
10077    const queries = SELECTOR_LINK_ITEMS.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
10078    const link = SelectorEngine.findOne(queries.join(','), this._config.target);
10079    link.classList.add(CLASS_NAME_ACTIVE$1);
10080
10081    if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
10082      SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);
10083    } else {
10084      SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {
10085        // Set triggered links parents as active
10086        // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
10087        SelectorEngine.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`).forEach(item => item.classList.add(CLASS_NAME_ACTIVE$1)); // Handle special case when .nav-link is inside .nav-item
10088
10089        SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(navItem => {
10090          SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(item => item.classList.add(CLASS_NAME_ACTIVE$1));
10091        });
10092      });
10093    }
10094
10095    EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
10096      relatedTarget: target
10097    });
10098  }
10099
10100  _clear() {
10101    SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1));
10102  } // Static
10103
10104
10105  static jQueryInterface(config) {
10106    return this.each(function () {
10107      const data = ScrollSpy.getOrCreateInstance(this, config);
10108
10109      if (typeof config !== 'string') {
10110        return;
10111      }
10112
10113      if (typeof data[config] === 'undefined') {
10114        throw new TypeError(`No method named "${config}"`);
10115      }
10116
10117      data[config]();
10118    });
10119  }
10120
10121}
10122/**
10123 * ------------------------------------------------------------------------
10124 * Data Api implementation
10125 * ------------------------------------------------------------------------
10126 */
10127
10128
10129EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
10130  SelectorEngine.find(SELECTOR_DATA_SPY).forEach(spy => new ScrollSpy(spy));
10131});
10132/**
10133 * ------------------------------------------------------------------------
10134 * jQuery
10135 * ------------------------------------------------------------------------
10136 * add .ScrollSpy to jQuery only if jQuery is present
10137 */
10138
10139defineJQueryPlugin(ScrollSpy);
10140
10141/**
10142 * --------------------------------------------------------------------------
10143 * Bootstrap (v5.1.3): tab.js
10144 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
10145 * --------------------------------------------------------------------------
10146 */
10147/**
10148 * ------------------------------------------------------------------------
10149 * Constants
10150 * ------------------------------------------------------------------------
10151 */
10152
10153const NAME$1 = 'tab';
10154const DATA_KEY$1 = 'bs.tab';
10155const EVENT_KEY$1 = `.${DATA_KEY$1}`;
10156const DATA_API_KEY = '.data-api';
10157const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;
10158const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;
10159const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;
10160const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;
10161const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}${DATA_API_KEY}`;
10162const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
10163const CLASS_NAME_ACTIVE = 'active';
10164const CLASS_NAME_FADE$1 = 'fade';
10165const CLASS_NAME_SHOW$1 = 'show';
10166const SELECTOR_DROPDOWN = '.dropdown';
10167const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
10168const SELECTOR_ACTIVE = '.active';
10169const SELECTOR_ACTIVE_UL = ':scope > li > .active';
10170const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';
10171const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
10172const SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
10173/**
10174 * ------------------------------------------------------------------------
10175 * Class Definition
10176 * ------------------------------------------------------------------------
10177 */
10178
10179class Tab extends BaseComponent {
10180  // Getters
10181  static get NAME() {
10182    return NAME$1;
10183  } // Public
10184
10185
10186  show() {
10187    if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
10188      return;
10189    }
10190
10191    let previous;
10192    const target = getElementFromSelector(this._element);
10193
10194    const listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP);
10195
10196    if (listElement) {
10197      const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
10198      previous = SelectorEngine.find(itemSelector, listElement);
10199      previous = previous[previous.length - 1];
10200    }
10201
10202    const hideEvent = previous ? EventHandler.trigger(previous, EVENT_HIDE$1, {
10203      relatedTarget: this._element
10204    }) : null;
10205    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$1, {
10206      relatedTarget: previous
10207    });
10208
10209    if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
10210      return;
10211    }
10212
10213    this._activate(this._element, listElement);
10214
10215    const complete = () => {
10216      EventHandler.trigger(previous, EVENT_HIDDEN$1, {
10217        relatedTarget: this._element
10218      });
10219      EventHandler.trigger(this._element, EVENT_SHOWN$1, {
10220        relatedTarget: previous
10221      });
10222    };
10223
10224    if (target) {
10225      this._activate(target, target.parentNode, complete);
10226    } else {
10227      complete();
10228    }
10229  } // Private
10230
10231
10232  _activate(element, container, callback) {
10233    const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE);
10234    const active = activeElements[0];
10235    const isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$1);
10236
10237    const complete = () => this._transitionComplete(element, active, callback);
10238
10239    if (active && isTransitioning) {
10240      active.classList.remove(CLASS_NAME_SHOW$1);
10241
10242      this._queueCallback(complete, element, true);
10243    } else {
10244      complete();
10245    }
10246  }
10247
10248  _transitionComplete(element, active, callback) {
10249    if (active) {
10250      active.classList.remove(CLASS_NAME_ACTIVE);
10251      const dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
10252
10253      if (dropdownChild) {
10254        dropdownChild.classList.remove(CLASS_NAME_ACTIVE);
10255      }
10256
10257      if (active.getAttribute('role') === 'tab') {
10258        active.setAttribute('aria-selected', false);
10259      }
10260    }
10261
10262    element.classList.add(CLASS_NAME_ACTIVE);
10263
10264    if (element.getAttribute('role') === 'tab') {
10265      element.setAttribute('aria-selected', true);
10266    }
10267
10268    reflow(element);
10269
10270    if (element.classList.contains(CLASS_NAME_FADE$1)) {
10271      element.classList.add(CLASS_NAME_SHOW$1);
10272    }
10273
10274    let parent = element.parentNode;
10275
10276    if (parent && parent.nodeName === 'LI') {
10277      parent = parent.parentNode;
10278    }
10279
10280    if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
10281      const dropdownElement = element.closest(SELECTOR_DROPDOWN);
10282
10283      if (dropdownElement) {
10284        SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement).forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE));
10285      }
10286
10287      element.setAttribute('aria-expanded', true);
10288    }
10289
10290    if (callback) {
10291      callback();
10292    }
10293  } // Static
10294
10295
10296  static jQueryInterface(config) {
10297    return this.each(function () {
10298      const data = Tab.getOrCreateInstance(this);
10299
10300      if (typeof config === 'string') {
10301        if (typeof data[config] === 'undefined') {
10302          throw new TypeError(`No method named "${config}"`);
10303        }
10304
10305        data[config]();
10306      }
10307    });
10308  }
10309
10310}
10311/**
10312 * ------------------------------------------------------------------------
10313 * Data Api implementation
10314 * ------------------------------------------------------------------------
10315 */
10316
10317
10318EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
10319  if (['A', 'AREA'].includes(this.tagName)) {
10320    event.preventDefault();
10321  }
10322
10323  if (isDisabled(this)) {
10324    return;
10325  }
10326
10327  const data = Tab.getOrCreateInstance(this);
10328  data.show();
10329});
10330/**
10331 * ------------------------------------------------------------------------
10332 * jQuery
10333 * ------------------------------------------------------------------------
10334 * add .Tab to jQuery only if jQuery is present
10335 */
10336
10337defineJQueryPlugin(Tab);
10338
10339/**
10340 * --------------------------------------------------------------------------
10341 * Bootstrap (v5.1.3): toast.js
10342 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
10343 * --------------------------------------------------------------------------
10344 */
10345/**
10346 * ------------------------------------------------------------------------
10347 * Constants
10348 * ------------------------------------------------------------------------
10349 */
10350
10351const NAME = 'toast';
10352const DATA_KEY = 'bs.toast';
10353const EVENT_KEY = `.${DATA_KEY}`;
10354const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
10355const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
10356const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
10357const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
10358const EVENT_HIDE = `hide${EVENT_KEY}`;
10359const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
10360const EVENT_SHOW = `show${EVENT_KEY}`;
10361const EVENT_SHOWN = `shown${EVENT_KEY}`;
10362const CLASS_NAME_FADE = 'fade';
10363const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
10364
10365const CLASS_NAME_SHOW = 'show';
10366const CLASS_NAME_SHOWING = 'showing';
10367const DefaultType = {
10368  animation: 'boolean',
10369  autohide: 'boolean',
10370  delay: 'number'
10371};
10372const Default = {
10373  animation: true,
10374  autohide: true,
10375  delay: 5000
10376};
10377/**
10378 * ------------------------------------------------------------------------
10379 * Class Definition
10380 * ------------------------------------------------------------------------
10381 */
10382
10383class Toast extends BaseComponent {
10384  constructor(element, config) {
10385    super(element);
10386    this._config = this._getConfig(config);
10387    this._timeout = null;
10388    this._hasMouseInteraction = false;
10389    this._hasKeyboardInteraction = false;
10390
10391    this._setListeners();
10392  } // Getters
10393
10394
10395  static get DefaultType() {
10396    return DefaultType;
10397  }
10398
10399  static get Default() {
10400    return Default;
10401  }
10402
10403  static get NAME() {
10404    return NAME;
10405  } // Public
10406
10407
10408  show() {
10409    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
10410
10411    if (showEvent.defaultPrevented) {
10412      return;
10413    }
10414
10415    this._clearTimeout();
10416
10417    if (this._config.animation) {
10418      this._element.classList.add(CLASS_NAME_FADE);
10419    }
10420
10421    const complete = () => {
10422      this._element.classList.remove(CLASS_NAME_SHOWING);
10423
10424      EventHandler.trigger(this._element, EVENT_SHOWN);
10425
10426      this._maybeScheduleHide();
10427    };
10428
10429    this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
10430
10431
10432    reflow(this._element);
10433
10434    this._element.classList.add(CLASS_NAME_SHOW);
10435
10436    this._element.classList.add(CLASS_NAME_SHOWING);
10437
10438    this._queueCallback(complete, this._element, this._config.animation);
10439  }
10440
10441  hide() {
10442    if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
10443      return;
10444    }
10445
10446    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
10447
10448    if (hideEvent.defaultPrevented) {
10449      return;
10450    }
10451
10452    const complete = () => {
10453      this._element.classList.add(CLASS_NAME_HIDE); // @deprecated
10454
10455
10456      this._element.classList.remove(CLASS_NAME_SHOWING);
10457
10458      this._element.classList.remove(CLASS_NAME_SHOW);
10459
10460      EventHandler.trigger(this._element, EVENT_HIDDEN);
10461    };
10462
10463    this._element.classList.add(CLASS_NAME_SHOWING);
10464
10465    this._queueCallback(complete, this._element, this._config.animation);
10466  }
10467
10468  dispose() {
10469    this._clearTimeout();
10470
10471    if (this._element.classList.contains(CLASS_NAME_SHOW)) {
10472      this._element.classList.remove(CLASS_NAME_SHOW);
10473    }
10474
10475    super.dispose();
10476  } // Private
10477
10478
10479  _getConfig(config) {
10480    config = { ...Default,
10481      ...Manipulator.getDataAttributes(this._element),
10482      ...(typeof config === 'object' && config ? config : {})
10483    };
10484    typeCheckConfig(NAME, config, this.constructor.DefaultType);
10485    return config;
10486  }
10487
10488  _maybeScheduleHide() {
10489    if (!this._config.autohide) {
10490      return;
10491    }
10492
10493    if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
10494      return;
10495    }
10496
10497    this._timeout = setTimeout(() => {
10498      this.hide();
10499    }, this._config.delay);
10500  }
10501
10502  _onInteraction(event, isInteracting) {
10503    switch (event.type) {
10504      case 'mouseover':
10505      case 'mouseout':
10506        this._hasMouseInteraction = isInteracting;
10507        break;
10508
10509      case 'focusin':
10510      case 'focusout':
10511        this._hasKeyboardInteraction = isInteracting;
10512        break;
10513    }
10514
10515    if (isInteracting) {
10516      this._clearTimeout();
10517
10518      return;
10519    }
10520
10521    const nextElement = event.relatedTarget;
10522
10523    if (this._element === nextElement || this._element.contains(nextElement)) {
10524      return;
10525    }
10526
10527    this._maybeScheduleHide();
10528  }
10529
10530  _setListeners() {
10531    EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
10532    EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
10533    EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
10534    EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
10535  }
10536
10537  _clearTimeout() {
10538    clearTimeout(this._timeout);
10539    this._timeout = null;
10540  } // Static
10541
10542
10543  static jQueryInterface(config) {
10544    return this.each(function () {
10545      const data = Toast.getOrCreateInstance(this, config);
10546
10547      if (typeof config === 'string') {
10548        if (typeof data[config] === 'undefined') {
10549          throw new TypeError(`No method named "${config}"`);
10550        }
10551
10552        data[config](this);
10553      }
10554    });
10555  }
10556
10557}
10558
10559enableDismissTrigger(Toast);
10560/**
10561 * ------------------------------------------------------------------------
10562 * jQuery
10563 * ------------------------------------------------------------------------
10564 * add .Toast to jQuery only if jQuery is present
10565 */
10566
10567defineJQueryPlugin(Toast);
10568
10569
10570//# sourceMappingURL=bootstrap.esm.js.map
10571
10572
10573/***/ }),
10574
vendor: 37,813 bytes, lines 10575-12209
10575/***/ "./node_modules/laravel-echo/dist/echo.js":
10576/*!************************************************!*\
10577  !*** ./node_modules/laravel-echo/dist/echo.js ***!
10578  \************************************************/
10579/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10580
10581"use strict";
10582__webpack_require__.r(__webpack_exports__);
10583/* harmony export */ __webpack_require__.d(__webpack_exports__, {
10584/* harmony export */   "Channel": () => (/* binding */ Channel),
10585/* harmony export */   "default": () => (/* binding */ Echo)
10586/* harmony export */ });
10587function _typeof(obj) {
10588  "@babel/helpers - typeof";
10589
10590  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
10591    return typeof obj;
10592  } : function (obj) {
10593    return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10594  }, _typeof(obj);
10595}
10596
10597function _classCallCheck(instance, Constructor) {
10598  if (!(instance instanceof Constructor)) {
10599    throw new TypeError("Cannot call a class as a function");
10600  }
10601}
10602
10603function _defineProperties(target, props) {
10604  for (var i = 0; i < props.length; i++) {
10605    var descriptor = props[i];
10606    descriptor.enumerable = descriptor.enumerable || false;
10607    descriptor.configurable = true;
10608    if ("value" in descriptor) descriptor.writable = true;
10609    Object.defineProperty(target, descriptor.key, descriptor);
10610  }
10611}
10612
10613function _createClass(Constructor, protoProps, staticProps) {
10614  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
10615  if (staticProps) _defineProperties(Constructor, staticProps);
10616  Object.defineProperty(Constructor, "prototype", {
10617    writable: false
10618  });
10619  return Constructor;
10620}
10621
10622function _extends() {
10623  _extends = Object.assign || function (target) {
10624    for (var i = 1; i < arguments.length; i++) {
10625      var source = arguments[i];
10626
10627      for (var key in source) {
10628        if (Object.prototype.hasOwnProperty.call(source, key)) {
10629          target[key] = source[key];
10630        }
10631      }
10632    }
10633
10634    return target;
10635  };
10636
10637  return _extends.apply(this, arguments);
10638}
10639
10640function _inherits(subClass, superClass) {
10641  if (typeof superClass !== "function" && superClass !== null) {
10642    throw new TypeError("Super expression must either be null or a function");
10643  }
10644
10645  subClass.prototype = Object.create(superClass && superClass.prototype, {
10646    constructor: {
10647      value: subClass,
10648      writable: true,
10649      configurable: true
10650    }
10651  });
10652  Object.defineProperty(subClass, "prototype", {
10653    writable: false
10654  });
10655  if (superClass) _setPrototypeOf(subClass, superClass);
10656}
10657
10658function _getPrototypeOf(o) {
10659  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
10660    return o.__proto__ || Object.getPrototypeOf(o);
10661  };
10662  return _getPrototypeOf(o);
10663}
10664
10665function _setPrototypeOf(o, p) {
10666  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
10667    o.__proto__ = p;
10668    return o;
10669  };
10670
10671  return _setPrototypeOf(o, p);
10672}
10673
10674function _isNativeReflectConstruct() {
10675  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
10676  if (Reflect.construct.sham) return false;
10677  if (typeof Proxy === "function") return true;
10678
10679  try {
10680    Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
10681    return true;
10682  } catch (e) {
10683    return false;
10684  }
10685}
10686
10687function _assertThisInitialized(self) {
10688  if (self === void 0) {
10689    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10690  }
10691
10692  return self;
10693}
10694
10695function _possibleConstructorReturn(self, call) {
10696  if (call && (typeof call === "object" || typeof call === "function")) {
10697    return call;
10698  } else if (call !== void 0) {
10699    throw new TypeError("Derived constructors may only return object or undefined");
10700  }
10701
10702  return _assertThisInitialized(self);
10703}
10704
10705function _createSuper(Derived) {
10706  var hasNativeReflectConstruct = _isNativeReflectConstruct();
10707
10708  return function _createSuperInternal() {
10709    var Super = _getPrototypeOf(Derived),
10710        result;
10711
10712    if (hasNativeReflectConstruct) {
10713      var NewTarget = _getPrototypeOf(this).constructor;
10714
10715      result = Reflect.construct(Super, arguments, NewTarget);
10716    } else {
10717      result = Super.apply(this, arguments);
10718    }
10719
10720    return _possibleConstructorReturn(this, result);
10721  };
10722}
10723
10724/**
10725 * This class represents a basic channel.
10726 */
10727var Channel = /*#__PURE__*/function () {
10728  function Channel() {
10729    _classCallCheck(this, Channel);
10730  }
10731
10732  _createClass(Channel, [{
10733    key: "listenForWhisper",
10734    value:
10735    /**
10736     * Listen for a whisper event on the channel instance.
10737     */
10738    function listenForWhisper(event, callback) {
10739      return this.listen('.client-' + event, callback);
10740    }
10741    /**
10742     * Listen for an event on the channel instance.
10743     */
10744
10745  }, {
10746    key: "notification",
10747    value: function notification(callback) {
10748      return this.listen('.Illuminate\\Notifications\\Events\\BroadcastNotificationCreated', callback);
10749    }
10750    /**
10751     * Stop listening for a whisper event on the channel instance.
10752     */
10753
10754  }, {
10755    key: "stopListeningForWhisper",
10756    value: function stopListeningForWhisper(event, callback) {
10757      return this.stopListening('.client-' + event, callback);
10758    }
10759  }]);
10760
10761  return Channel;
10762}();
10763
10764/**
10765 * Event name formatter
10766 */
10767var EventFormatter = /*#__PURE__*/function () {
10768  /**
10769   * Create a new class instance.
10770   */
10771  function EventFormatter(namespace) {
10772    _classCallCheck(this, EventFormatter);
10773
10774    this.setNamespace(namespace);
10775  }
10776  /**
10777   * Format the given event name.
10778   */
10779
10780
10781  _createClass(EventFormatter, [{
10782    key: "format",
10783    value: function format(event) {
10784      if (event.charAt(0) === '.' || event.charAt(0) === '\\') {
10785        return event.substr(1);
10786      } else if (this.namespace) {
10787        event = this.namespace + '.' + event;
10788      }
10789
10790      return event.replace(/\./g, '\\');
10791    }
10792    /**
10793     * Set the event namespace.
10794     */
10795
10796  }, {
10797    key: "setNamespace",
10798    value: function setNamespace(value) {
10799      this.namespace = value;
10800    }
10801  }]);
10802
10803  return EventFormatter;
10804}();
10805
10806/**
10807 * This class represents a Pusher channel.
10808 */
10809
10810var PusherChannel = /*#__PURE__*/function (_Channel) {
10811  _inherits(PusherChannel, _Channel);
10812
10813  var _super = _createSuper(PusherChannel);
10814
10815  /**
10816   * Create a new class instance.
10817   */
10818  function PusherChannel(pusher, name, options) {
10819    var _this;
10820
10821    _classCallCheck(this, PusherChannel);
10822
10823    _this = _super.call(this);
10824    _this.name = name;
10825    _this.pusher = pusher;
10826    _this.options = options;
10827    _this.eventFormatter = new EventFormatter(_this.options.namespace);
10828
10829    _this.subscribe();
10830
10831    return _this;
10832  }
10833  /**
10834   * Subscribe to a Pusher channel.
10835   */
10836
10837
10838  _createClass(PusherChannel, [{
10839    key: "subscribe",
10840    value: function subscribe() {
10841      this.subscription = this.pusher.subscribe(this.name);
10842    }
10843    /**
10844     * Unsubscribe from a Pusher channel.
10845     */
10846
10847  }, {
10848    key: "unsubscribe",
10849    value: function unsubscribe() {
10850      this.pusher.unsubscribe(this.name);
10851    }
10852    /**
10853     * Listen for an event on the channel instance.
10854     */
10855
10856  }, {
10857    key: "listen",
10858    value: function listen(event, callback) {
10859      this.on(this.eventFormatter.format(event), callback);
10860      return this;
10861    }
10862    /**
10863     * Listen for all events on the channel instance.
10864     */
10865
10866  }, {
10867    key: "listenToAll",
10868    value: function listenToAll(callback) {
10869      var _this2 = this;
10870
10871      this.subscription.bind_global(function (event, data) {
10872        if (event.startsWith('pusher:')) {
10873          return;
10874        }
10875
10876        var namespace = _this2.options.namespace.replace(/\./g, '\\');
10877
10878        var formattedEvent = event.startsWith(namespace) ? event.substring(namespace.length + 1) : '.' + event;
10879        callback(formattedEvent, data);
10880      });
10881      return this;
10882    }
10883    /**
10884     * Stop listening for an event on the channel instance.
10885     */
10886
10887  }, {
10888    key: "stopListening",
10889    value: function stopListening(event, callback) {
10890      if (callback) {
10891        this.subscription.unbind(this.eventFormatter.format(event), callback);
10892      } else {
10893        this.subscription.unbind(this.eventFormatter.format(event));
10894      }
10895
10896      return this;
10897    }
10898    /**
10899     * Stop listening for all events on the channel instance.
10900     */
10901
10902  }, {
10903    key: "stopListeningToAll",
10904    value: function stopListeningToAll(callback) {
10905      if (callback) {
10906        this.subscription.unbind_global(callback);
10907      } else {
10908        this.subscription.unbind_global();
10909      }
10910
10911      return this;
10912    }
10913    /**
10914     * Register a callback to be called anytime a subscription succeeds.
10915     */
10916
10917  }, {
10918    key: "subscribed",
10919    value: function subscribed(callback) {
10920      this.on('pusher:subscription_succeeded', function () {
10921        callback();
10922      });
10923      return this;
10924    }
10925    /**
10926     * Register a callback to be called anytime a subscription error occurs.
10927     */
10928
10929  }, {
10930    key: "error",
10931    value: function error(callback) {
10932      this.on('pusher:subscription_error', function (status) {
10933        callback(status);
10934      });
10935      return this;
10936    }
10937    /**
10938     * Bind a channel to an event.
10939     */
10940
10941  }, {
10942    key: "on",
10943    value: function on(event, callback) {
10944      this.subscription.bind(event, callback);
10945      return this;
10946    }
10947  }]);
10948
10949  return PusherChannel;
10950}(Channel);
10951
10952/**
10953 * This class represents a Pusher private channel.
10954 */
10955
10956var PusherPrivateChannel = /*#__PURE__*/function (_PusherChannel) {
10957  _inherits(PusherPrivateChannel, _PusherChannel);
10958
10959  var _super = _createSuper(PusherPrivateChannel);
10960
10961  function PusherPrivateChannel() {
10962    _classCallCheck(this, PusherPrivateChannel);
10963
10964    return _super.apply(this, arguments);
10965  }
10966
10967  _createClass(PusherPrivateChannel, [{
10968    key: "whisper",
10969    value:
10970    /**
10971     * Trigger client event on the channel.
10972     */
10973    function whisper(eventName, data) {
10974      this.pusher.channels.channels[this.name].trigger("client-".concat(eventName), data);
10975      return this;
10976    }
10977  }]);
10978
10979  return PusherPrivateChannel;
10980}(PusherChannel);
10981
10982/**
10983 * This class represents a Pusher private channel.
10984 */
10985
10986var PusherEncryptedPrivateChannel = /*#__PURE__*/function (_PusherChannel) {
10987  _inherits(PusherEncryptedPrivateChannel, _PusherChannel);
10988
10989  var _super = _createSuper(PusherEncryptedPrivateChannel);
10990
10991  function PusherEncryptedPrivateChannel() {
10992    _classCallCheck(this, PusherEncryptedPrivateChannel);
10993
10994    return _super.apply(this, arguments);
10995  }
10996
10997  _createClass(PusherEncryptedPrivateChannel, [{
10998    key: "whisper",
10999    value:
11000    /**
11001     * Trigger client event on the channel.
11002     */
11003    function whisper(eventName, data) {
11004      this.pusher.channels.channels[this.name].trigger("client-".concat(eventName), data);
11005      return this;
11006    }
11007  }]);
11008
11009  return PusherEncryptedPrivateChannel;
11010}(PusherChannel);
11011
11012/**
11013 * This class represents a Pusher presence channel.
11014 */
11015
11016var PusherPresenceChannel = /*#__PURE__*/function (_PusherChannel) {
11017  _inherits(PusherPresenceChannel, _PusherChannel);
11018
11019  var _super = _createSuper(PusherPresenceChannel);
11020
11021  function PusherPresenceChannel() {
11022    _classCallCheck(this, PusherPresenceChannel);
11023
11024    return _super.apply(this, arguments);
11025  }
11026
11027  _createClass(PusherPresenceChannel, [{
11028    key: "here",
11029    value:
11030    /**
11031     * Register a callback to be called anytime the member list changes.
11032     */
11033    function here(callback) {
11034      this.on('pusher:subscription_succeeded', function (data) {
11035        callback(Object.keys(data.members).map(function (k) {
11036          return data.members[k];
11037        }));
11038      });
11039      return this;
11040    }
11041    /**
11042     * Listen for someone joining the channel.
11043     */
11044
11045  }, {
11046    key: "joining",
11047    value: function joining(callback) {
11048      this.on('pusher:member_added', function (member) {
11049        callback(member.info);
11050      });
11051      return this;
11052    }
11053    /**
11054     * Listen for someone leaving the channel.
11055     */
11056
11057  }, {
11058    key: "leaving",
11059    value: function leaving(callback) {
11060      this.on('pusher:member_removed', function (member) {
11061        callback(member.info);
11062      });
11063      return this;
11064    }
11065    /**
11066     * Trigger client event on the channel.
11067     */
11068
11069  }, {
11070    key: "whisper",
11071    value: function whisper(eventName, data) {
11072      this.pusher.channels.channels[this.name].trigger("client-".concat(eventName), data);
11073      return this;
11074    }
11075  }]);
11076
11077  return PusherPresenceChannel;
11078}(PusherChannel);
11079
11080/**
11081 * This class represents a Socket.io channel.
11082 */
11083
11084var SocketIoChannel = /*#__PURE__*/function (_Channel) {
11085  _inherits(SocketIoChannel, _Channel);
11086
11087  var _super = _createSuper(SocketIoChannel);
11088
11089  /**
11090   * Create a new class instance.
11091   */
11092  function SocketIoChannel(socket, name, options) {
11093    var _this;
11094
11095    _classCallCheck(this, SocketIoChannel);
11096
11097    _this = _super.call(this);
11098    /**
11099     * The event callbacks applied to the socket.
11100     */
11101
11102    _this.events = {};
11103    /**
11104     * User supplied callbacks for events on this channel.
11105     */
11106
11107    _this.listeners = {};
11108    _this.name = name;
11109    _this.socket = socket;
11110    _this.options = options;
11111    _this.eventFormatter = new EventFormatter(_this.options.namespace);
11112
11113    _this.subscribe();
11114
11115    return _this;
11116  }
11117  /**
11118   * Subscribe to a Socket.io channel.
11119   */
11120
11121
11122  _createClass(SocketIoChannel, [{
11123    key: "subscribe",
11124    value: function subscribe() {
11125      this.socket.emit('subscribe', {
11126        channel: this.name,
11127        auth: this.options.auth || {}
11128      });
11129    }
11130    /**
11131     * Unsubscribe from channel and ubind event callbacks.
11132     */
11133
11134  }, {
11135    key: "unsubscribe",
11136    value: function unsubscribe() {
11137      this.unbind();
11138      this.socket.emit('unsubscribe', {
11139        channel: this.name,
11140        auth: this.options.auth || {}
11141      });
11142    }
11143    /**
11144     * Listen for an event on the channel instance.
11145     */
11146
11147  }, {
11148    key: "listen",
11149    value: function listen(event, callback) {
11150      this.on(this.eventFormatter.format(event), callback);
11151      return this;
11152    }
11153    /**
11154     * Stop listening for an event on the channel instance.
11155     */
11156
11157  }, {
11158    key: "stopListening",
11159    value: function stopListening(event, callback) {
11160      this.unbindEvent(this.eventFormatter.format(event), callback);
11161      return this;
11162    }
11163    /**
11164     * Register a callback to be called anytime a subscription succeeds.
11165     */
11166
11167  }, {
11168    key: "subscribed",
11169    value: function subscribed(callback) {
11170      this.on('connect', function (socket) {
11171        callback(socket);
11172      });
11173      return this;
11174    }
11175    /**
11176     * Register a callback to be called anytime an error occurs.
11177     */
11178
11179  }, {
11180    key: "error",
11181    value: function error(callback) {
11182      return this;
11183    }
11184    /**
11185     * Bind the channel's socket to an event and store the callback.
11186     */
11187
11188  }, {
11189    key: "on",
11190    value: function on(event, callback) {
11191      var _this2 = this;
11192
11193      this.listeners[event] = this.listeners[event] || [];
11194
11195      if (!this.events[event]) {
11196        this.events[event] = function (channel, data) {
11197          if (_this2.name === channel && _this2.listeners[event]) {
11198            _this2.listeners[event].forEach(function (cb) {
11199              return cb(data);
11200            });
11201          }
11202        };
11203
11204        this.socket.on(event, this.events[event]);
11205      }
11206
11207      this.listeners[event].push(callback);
11208      return this;
11209    }
11210    /**
11211     * Unbind the channel's socket from all stored event callbacks.
11212     */
11213
11214  }, {
11215    key: "unbind",
11216    value: function unbind() {
11217      var _this3 = this;
11218
11219      Object.keys(this.events).forEach(function (event) {
11220        _this3.unbindEvent(event);
11221      });
11222    }
11223    /**
11224     * Unbind the listeners for the given event.
11225     */
11226
11227  }, {
11228    key: "unbindEvent",
11229    value: function unbindEvent(event, callback) {
11230      this.listeners[event] = this.listeners[event] || [];
11231
11232      if (callback) {
11233        this.listeners[event] = this.listeners[event].filter(function (cb) {
11234          return cb !== callback;
11235        });
11236      }
11237
11238      if (!callback || this.listeners[event].length === 0) {
11239        if (this.events[event]) {
11240          this.socket.removeListener(event, this.events[event]);
11241          delete this.events[event];
11242        }
11243
11244        delete this.listeners[event];
11245      }
11246    }
11247  }]);
11248
11249  return SocketIoChannel;
11250}(Channel);
11251
11252/**
11253 * This class represents a Socket.io private channel.
11254 */
11255
11256var SocketIoPrivateChannel = /*#__PURE__*/function (_SocketIoChannel) {
11257  _inherits(SocketIoPrivateChannel, _SocketIoChannel);
11258
11259  var _super = _createSuper(SocketIoPrivateChannel);
11260
11261  function SocketIoPrivateChannel() {
11262    _classCallCheck(this, SocketIoPrivateChannel);
11263
11264    return _super.apply(this, arguments);
11265  }
11266
11267  _createClass(SocketIoPrivateChannel, [{
11268    key: "whisper",
11269    value:
11270    /**
11271     * Trigger client event on the channel.
11272     */
11273    function whisper(eventName, data) {
11274      this.socket.emit('client event', {
11275        channel: this.name,
11276        event: "client-".concat(eventName),
11277        data: data
11278      });
11279      return this;
11280    }
11281  }]);
11282
11283  return SocketIoPrivateChannel;
11284}(SocketIoChannel);
11285
11286/**
11287 * This class represents a Socket.io presence channel.
11288 */
11289
11290var SocketIoPresenceChannel = /*#__PURE__*/function (_SocketIoPrivateChann) {
11291  _inherits(SocketIoPresenceChannel, _SocketIoPrivateChann);
11292
11293  var _super = _createSuper(SocketIoPresenceChannel);
11294
11295  function SocketIoPresenceChannel() {
11296    _classCallCheck(this, SocketIoPresenceChannel);
11297
11298    return _super.apply(this, arguments);
11299  }
11300
11301  _createClass(SocketIoPresenceChannel, [{
11302    key: "here",
11303    value:
11304    /**
11305     * Register a callback to be called anytime the member list changes.
11306     */
11307    function here(callback) {
11308      this.on('presence:subscribed', function (members) {
11309        callback(members.map(function (m) {
11310          return m.user_info;
11311        }));
11312      });
11313      return this;
11314    }
11315    /**
11316     * Listen for someone joining the channel.
11317     */
11318
11319  }, {
11320    key: "joining",
11321    value: function joining(callback) {
11322      this.on('presence:joining', function (member) {
11323        return callback(member.user_info);
11324      });
11325      return this;
11326    }
11327    /**
11328     * Listen for someone leaving the channel.
11329     */
11330
11331  }, {
11332    key: "leaving",
11333    value: function leaving(callback) {
11334      this.on('presence:leaving', function (member) {
11335        return callback(member.user_info);
11336      });
11337      return this;
11338    }
11339  }]);
11340
11341  return SocketIoPresenceChannel;
11342}(SocketIoPrivateChannel);
11343
11344/**
11345 * This class represents a null channel.
11346 */
11347
11348var NullChannel = /*#__PURE__*/function (_Channel) {
11349  _inherits(NullChannel, _Channel);
11350
11351  var _super = _createSuper(NullChannel);
11352
11353  function NullChannel() {
11354    _classCallCheck(this, NullChannel);
11355
11356    return _super.apply(this, arguments);
11357  }
11358
11359  _createClass(NullChannel, [{
11360    key: "subscribe",
11361    value:
11362    /**
11363     * Subscribe to a channel.
11364     */
11365    function subscribe() {//
11366    }
11367    /**
11368     * Unsubscribe from a channel.
11369     */
11370
11371  }, {
11372    key: "unsubscribe",
11373    value: function unsubscribe() {//
11374    }
11375    /**
11376     * Listen for an event on the channel instance.
11377     */
11378
11379  }, {
11380    key: "listen",
11381    value: function listen(event, callback) {
11382      return this;
11383    }
11384    /**
11385     * Stop listening for an event on the channel instance.
11386     */
11387
11388  }, {
11389    key: "stopListening",
11390    value: function stopListening(event, callback) {
11391      return this;
11392    }
11393    /**
11394     * Register a callback to be called anytime a subscription succeeds.
11395     */
11396
11397  }, {
11398    key: "subscribed",
11399    value: function subscribed(callback) {
11400      return this;
11401    }
11402    /**
11403     * Register a callback to be called anytime an error occurs.
11404     */
11405
11406  }, {
11407    key: "error",
11408    value: function error(callback) {
11409      return this;
11410    }
11411    /**
11412     * Bind a channel to an event.
11413     */
11414
11415  }, {
11416    key: "on",
11417    value: function on(event, callback) {
11418      return this;
11419    }
11420  }]);
11421
11422  return NullChannel;
11423}(Channel);
11424
11425/**
11426 * This class represents a null private channel.
11427 */
11428
11429var NullPrivateChannel = /*#__PURE__*/function (_NullChannel) {
11430  _inherits(NullPrivateChannel, _NullChannel);
11431
11432  var _super = _createSuper(NullPrivateChannel);
11433
11434  function NullPrivateChannel() {
11435    _classCallCheck(this, NullPrivateChannel);
11436
11437    return _super.apply(this, arguments);
11438  }
11439
11440  _createClass(NullPrivateChannel, [{
11441    key: "whisper",
11442    value:
11443    /**
11444     * Trigger client event on the channel.
11445     */
11446    function whisper(eventName, data) {
11447      return this;
11448    }
11449  }]);
11450
11451  return NullPrivateChannel;
11452}(NullChannel);
11453
11454/**
11455 * This class represents a null presence channel.
11456 */
11457
11458var NullPresenceChannel = /*#__PURE__*/function (_NullChannel) {
11459  _inherits(NullPresenceChannel, _NullChannel);
11460
11461  var _super = _createSuper(NullPresenceChannel);
11462
11463  function NullPresenceChannel() {
11464    _classCallCheck(this, NullPresenceChannel);
11465
11466    return _super.apply(this, arguments);
11467  }
11468
11469  _createClass(NullPresenceChannel, [{
11470    key: "here",
11471    value:
11472    /**
11473     * Register a callback to be called anytime the member list changes.
11474     */
11475    function here(callback) {
11476      return this;
11477    }
11478    /**
11479     * Listen for someone joining the channel.
11480     */
11481
11482  }, {
11483    key: "joining",
11484    value: function joining(callback) {
11485      return this;
11486    }
11487    /**
11488     * Listen for someone leaving the channel.
11489     */
11490
11491  }, {
11492    key: "leaving",
11493    value: function leaving(callback) {
11494      return this;
11495    }
11496    /**
11497     * Trigger client event on the channel.
11498     */
11499
11500  }, {
11501    key: "whisper",
11502    value: function whisper(eventName, data) {
11503      return this;
11504    }
11505  }]);
11506
11507  return NullPresenceChannel;
11508}(NullChannel);
11509
11510var Connector = /*#__PURE__*/function () {
11511  /**
11512   * Create a new class instance.
11513   */
11514  function Connector(options) {
11515    _classCallCheck(this, Connector);
11516
11517    /**
11518     * Default connector options.
11519     */
11520    this._defaultOptions = {
11521      auth: {
11522        headers: {}
11523      },
11524      authEndpoint: '/broadcasting/auth',
11525      userAuthentication: {
11526        endpoint: '/broadcasting/user-auth',
11527        headers: {}
11528      },
11529      broadcaster: 'pusher',
11530      csrfToken: null,
11531      host: null,
11532      key: null,
11533      namespace: 'App.Events'
11534    };
11535    this.setOptions(options);
11536    this.connect();
11537  }
11538  /**
11539   * Merge the custom options with the defaults.
11540   */
11541
11542
11543  _createClass(Connector, [{
11544    key: "setOptions",
11545    value: function setOptions(options) {
11546      this.options = _extends(this._defaultOptions, options);
11547      var token = this.csrfToken();
11548
11549      if (token) {
11550        this.options.auth.headers['X-CSRF-TOKEN'] = token;
11551        this.options.userAuthentication.headers['X-CSRF-TOKEN'] = token;
11552      }
11553
11554      return options;
11555    }
11556    /**
11557     * Extract the CSRF token from the page.
11558     */
11559
11560  }, {
11561    key: "csrfToken",
11562    value: function csrfToken() {
11563      var selector;
11564
11565      if (typeof window !== 'undefined' && window['Laravel'] && window['Laravel'].csrfToken) {
11566        return window['Laravel'].csrfToken;
11567      } else if (this.options.csrfToken) {
11568        return this.options.csrfToken;
11569      } else if (typeof document !== 'undefined' && typeof document.querySelector === 'function' && (selector = document.querySelector('meta[name="csrf-token"]'))) {
11570        return selector.getAttribute('content');
11571      }
11572
11573      return null;
11574    }
11575  }]);
11576
11577  return Connector;
11578}();
11579
11580/**
11581 * This class creates a connector to Pusher.
11582 */
11583
11584var PusherConnector = /*#__PURE__*/function (_Connector) {
11585  _inherits(PusherConnector, _Connector);
11586
11587  var _super = _createSuper(PusherConnector);
11588
11589  function PusherConnector() {
11590    var _this;
11591
11592    _classCallCheck(this, PusherConnector);
11593
11594    _this = _super.apply(this, arguments);
11595    /**
11596     * All of the subscribed channel names.
11597     */
11598
11599    _this.channels = {};
11600    return _this;
11601  }
11602  /**
11603   * Create a fresh Pusher connection.
11604   */
11605
11606
11607  _createClass(PusherConnector, [{
11608    key: "connect",
11609    value: function connect() {
11610      if (typeof this.options.client !== 'undefined') {
11611        this.pusher = this.options.client;
11612      } else {
11613        this.pusher = new Pusher(this.options.key, this.options);
11614      }
11615    }
11616    /**
11617     * Sign in the user via Pusher user authentication (https://pusher.com/docs/channels/using_channels/user-authentication/).
11618     */
11619
11620  }, {
11621    key: "signin",
11622    value: function signin() {
11623      this.pusher.signin();
11624    }
11625    /**
11626     * Listen for an event on a channel instance.
11627     */
11628
11629  }, {
11630    key: "listen",
11631    value: function listen(name, event, callback) {
11632      return this.channel(name).listen(event, callback);
11633    }
11634    /**
11635     * Get a channel instance by name.
11636     */
11637
11638  }, {
11639    key: "channel",
11640    value: function channel(name) {
11641      if (!this.channels[name]) {
11642        this.channels[name] = new PusherChannel(this.pusher, name, this.options);
11643      }
11644
11645      return this.channels[name];
11646    }
11647    /**
11648     * Get a private channel instance by name.
11649     */
11650
11651  }, {
11652    key: "privateChannel",
11653    value: function privateChannel(name) {
11654      if (!this.channels['private-' + name]) {
11655        this.channels['private-' + name] = new PusherPrivateChannel(this.pusher, 'private-' + name, this.options);
11656      }
11657
11658      return this.channels['private-' + name];
11659    }
11660    /**
11661     * Get a private encrypted channel instance by name.
11662     */
11663
11664  }, {
11665    key: "encryptedPrivateChannel",
11666    value: function encryptedPrivateChannel(name) {
11667      if (!this.channels['private-encrypted-' + name]) {
11668        this.channels['private-encrypted-' + name] = new PusherEncryptedPrivateChannel(this.pusher, 'private-encrypted-' + name, this.options);
11669      }
11670
11671      return this.channels['private-encrypted-' + name];
11672    }
11673    /**
11674     * Get a presence channel instance by name.
11675     */
11676
11677  }, {
11678    key: "presenceChannel",
11679    value: function presenceChannel(name) {
11680      if (!this.channels['presence-' + name]) {
11681        this.channels['presence-' + name] = new PusherPresenceChannel(this.pusher, 'presence-' + name, this.options);
11682      }
11683
11684      return this.channels['presence-' + name];
11685    }
11686    /**
11687     * Leave the given channel, as well as its private and presence variants.
11688     */
11689
11690  }, {
11691    key: "leave",
11692    value: function leave(name) {
11693      var _this2 = this;
11694
11695      var channels = [name, 'private-' + name, 'private-encrypted-' + name, 'presence-' + name];
11696      channels.forEach(function (name, index) {
11697        _this2.leaveChannel(name);
11698      });
11699    }
11700    /**
11701     * Leave the given channel.
11702     */
11703
11704  }, {
11705    key: "leaveChannel",
11706    value: function leaveChannel(name) {
11707      if (this.channels[name]) {
11708        this.channels[name].unsubscribe();
11709        delete this.channels[name];
11710      }
11711    }
11712    /**
11713     * Get the socket ID for the connection.
11714     */
11715
11716  }, {
11717    key: "socketId",
11718    value: function socketId() {
11719      return this.pusher.connection.socket_id;
11720    }
11721    /**
11722     * Disconnect Pusher connection.
11723     */
11724
11725  }, {
11726    key: "disconnect",
11727    value: function disconnect() {
11728      this.pusher.disconnect();
11729    }
11730  }]);
11731
11732  return PusherConnector;
11733}(Connector);
11734
11735/**
11736 * This class creates a connnector to a Socket.io server.
11737 */
11738
11739var SocketIoConnector = /*#__PURE__*/function (_Connector) {
11740  _inherits(SocketIoConnector, _Connector);
11741
11742  var _super = _createSuper(SocketIoConnector);
11743
11744  function SocketIoConnector() {
11745    var _this;
11746
11747    _classCallCheck(this, SocketIoConnector);
11748
11749    _this = _super.apply(this, arguments);
11750    /**
11751     * All of the subscribed channel names.
11752     */
11753
11754    _this.channels = {};
11755    return _this;
11756  }
11757  /**
11758   * Create a fresh Socket.io connection.
11759   */
11760
11761
11762  _createClass(SocketIoConnector, [{
11763    key: "connect",
11764    value: function connect() {
11765      var _this2 = this;
11766
11767      var io = this.getSocketIO();
11768      this.socket = io(this.options.host, this.options);
11769      this.socket.on('reconnect', function () {
11770        Object.values(_this2.channels).forEach(function (channel) {
11771          channel.subscribe();
11772        });
11773      });
11774      return this.socket;
11775    }
11776    /**
11777     * Get socket.io module from global scope or options.
11778     */
11779
11780  }, {
11781    key: "getSocketIO",
11782    value: function getSocketIO() {
11783      if (typeof this.options.client !== 'undefined') {
11784        return this.options.client;
11785      }
11786
11787      if (typeof io !== 'undefined') {
11788        return io;
11789      }
11790
11791      throw new Error('Socket.io client not found. Should be globally available or passed via options.client');
11792    }
11793    /**
11794     * Listen for an event on a channel instance.
11795     */
11796
11797  }, {
11798    key: "listen",
11799    value: function listen(name, event, callback) {
11800      return this.channel(name).listen(event, callback);
11801    }
11802    /**
11803     * Get a channel instance by name.
11804     */
11805
11806  }, {
11807    key: "channel",
11808    value: function channel(name) {
11809      if (!this.channels[name]) {
11810        this.channels[name] = new SocketIoChannel(this.socket, name, this.options);
11811      }
11812
11813      return this.channels[name];
11814    }
11815    /**
11816     * Get a private channel instance by name.
11817     */
11818
11819  }, {
11820    key: "privateChannel",
11821    value: function privateChannel(name) {
11822      if (!this.channels['private-' + name]) {
11823        this.channels['private-' + name] = new SocketIoPrivateChannel(this.socket, 'private-' + name, this.options);
11824      }
11825
11826      return this.channels['private-' + name];
11827    }
11828    /**
11829     * Get a presence channel instance by name.
11830     */
11831
11832  }, {
11833    key: "presenceChannel",
11834    value: function presenceChannel(name) {
11835      if (!this.channels['presence-' + name]) {
11836        this.channels['presence-' + name] = new SocketIoPresenceChannel(this.socket, 'presence-' + name, this.options);
11837      }
11838
11839      return this.channels['presence-' + name];
11840    }
11841    /**
11842     * Leave the given channel, as well as its private and presence variants.
11843     */
11844
11845  }, {
11846    key: "leave",
11847    value: function leave(name) {
11848      var _this3 = this;
11849
11850      var channels = [name, 'private-' + name, 'presence-' + name];
11851      channels.forEach(function (name) {
11852        _this3.leaveChannel(name);
11853      });
11854    }
11855    /**
11856     * Leave the given channel.
11857     */
11858
11859  }, {
11860    key: "leaveChannel",
11861    value: function leaveChannel(name) {
11862      if (this.channels[name]) {
11863        this.channels[name].unsubscribe();
11864        delete this.channels[name];
11865      }
11866    }
11867    /**
11868     * Get the socket ID for the connection.
11869     */
11870
11871  }, {
11872    key: "socketId",
11873    value: function socketId() {
11874      return this.socket.id;
11875    }
11876    /**
11877     * Disconnect Socketio connection.
11878     */
11879
11880  }, {
11881    key: "disconnect",
11882    value: function disconnect() {
11883      this.socket.disconnect();
11884    }
11885  }]);
11886
11887  return SocketIoConnector;
11888}(Connector);
11889
11890/**
11891 * This class creates a null connector.
11892 */
11893
11894var NullConnector = /*#__PURE__*/function (_Connector) {
11895  _inherits(NullConnector, _Connector);
11896
11897  var _super = _createSuper(NullConnector);
11898
11899  function NullConnector() {
11900    var _this;
11901
11902    _classCallCheck(this, NullConnector);
11903
11904    _this = _super.apply(this, arguments);
11905    /**
11906     * All of the subscribed channel names.
11907     */
11908
11909    _this.channels = {};
11910    return _this;
11911  }
11912  /**
11913   * Create a fresh connection.
11914   */
11915
11916
11917  _createClass(NullConnector, [{
11918    key: "connect",
11919    value: function connect() {//
11920    }
11921    /**
11922     * Listen for an event on a channel instance.
11923     */
11924
11925  }, {
11926    key: "listen",
11927    value: function listen(name, event, callback) {
11928      return new NullChannel();
11929    }
11930    /**
11931     * Get a channel instance by name.
11932     */
11933
11934  }, {
11935    key: "channel",
11936    value: function channel(name) {
11937      return new NullChannel();
11938    }
11939    /**
11940     * Get a private channel instance by name.
11941     */
11942
11943  }, {
11944    key: "privateChannel",
11945    value: function privateChannel(name) {
11946      return new NullPrivateChannel();
11947    }
11948    /**
11949     * Get a presence channel instance by name.
11950     */
11951
11952  }, {
11953    key: "presenceChannel",
11954    value: function presenceChannel(name) {
11955      return new NullPresenceChannel();
11956    }
11957    /**
11958     * Leave the given channel, as well as its private and presence variants.
11959     */
11960
11961  }, {
11962    key: "leave",
11963    value: function leave(name) {//
11964    }
11965    /**
11966     * Leave the given channel.
11967     */
11968
11969  }, {
11970    key: "leaveChannel",
11971    value: function leaveChannel(name) {//
11972    }
11973    /**
11974     * Get the socket ID for the connection.
11975     */
11976
11977  }, {
11978    key: "socketId",
11979    value: function socketId() {
11980      return 'fake-socket-id';
11981    }
11982    /**
11983     * Disconnect the connection.
11984     */
11985
11986  }, {
11987    key: "disconnect",
11988    value: function disconnect() {//
11989    }
11990  }]);
11991
11992  return NullConnector;
11993}(Connector);
11994
11995/**
11996 * This class is the primary API for interacting with broadcasting.
11997 */
11998
11999var Echo = /*#__PURE__*/function () {
12000  /**
12001   * Create a new class instance.
12002   */
12003  function Echo(options) {
12004    _classCallCheck(this, Echo);
12005
12006    this.options = options;
12007    this.connect();
12008
12009    if (!this.options.withoutInterceptors) {
12010      this.registerInterceptors();
12011    }
12012  }
12013  /**
12014   * Get a channel instance by name.
12015   */
12016
12017
12018  _createClass(Echo, [{
12019    key: "channel",
12020    value: function channel(_channel) {
12021      return this.connector.channel(_channel);
12022    }
12023    /**
12024     * Create a new connection.
12025     */
12026
12027  }, {
12028    key: "connect",
12029    value: function connect() {
12030      if (this.options.broadcaster == 'pusher') {
12031        this.connector = new PusherConnector(this.options);
12032      } else if (this.options.broadcaster == 'socket.io') {
12033        this.connector = new SocketIoConnector(this.options);
12034      } else if (this.options.broadcaster == 'null') {
12035        this.connector = new NullConnector(this.options);
12036      } else if (typeof this.options.broadcaster == 'function') {
12037        this.connector = new this.options.broadcaster(this.options);
12038      }
12039    }
12040    /**
12041     * Disconnect from the Echo server.
12042     */
12043
12044  }, {
12045    key: "disconnect",
12046    value: function disconnect() {
12047      this.connector.disconnect();
12048    }
12049    /**
12050     * Get a presence channel instance by name.
12051     */
12052
12053  }, {
12054    key: "join",
12055    value: function join(channel) {
12056      return this.connector.presenceChannel(channel);
12057    }
12058    /**
12059     * Leave the given channel, as well as its private and presence variants.
12060     */
12061
12062  }, {
12063    key: "leave",
12064    value: function leave(channel) {
12065      this.connector.leave(channel);
12066    }
12067    /**
12068     * Leave the given channel.
12069     */
12070
12071  }, {
12072    key: "leaveChannel",
12073    value: function leaveChannel(channel) {
12074      this.connector.leaveChannel(channel);
12075    }
12076    /**
12077     * Listen for an event on a channel instance.
12078     */
12079
12080  }, {
12081    key: "listen",
12082    value: function listen(channel, event, callback) {
12083      return this.connector.listen(channel, event, callback);
12084    }
12085    /**
12086     * Get a private channel instance by name.
12087     */
12088
12089  }, {
12090    key: "private",
12091    value: function _private(channel) {
12092      return this.connector.privateChannel(channel);
12093    }
12094    /**
12095     * Get a private encrypted channel instance by name.
12096     */
12097
12098  }, {
12099    key: "encryptedPrivate",
12100    value: function encryptedPrivate(channel) {
12101      return this.connector.encryptedPrivateChannel(channel);
12102    }
12103    /**
12104     * Get the Socket ID for the connection.
12105     */
12106
12107  }, {
12108    key: "socketId",
12109    value: function socketId() {
12110      return this.connector.socketId();
12111    }
12112    /**
12113     * Register 3rd party request interceptiors. These are used to automatically
12114     * send a connections socket id to a Laravel app with a X-Socket-Id header.
12115     */
12116
12117  }, {
12118    key: "registerInterceptors",
12119    value: function registerInterceptors() {
12120      if (typeof Vue === 'function' && Vue.http) {
12121        this.registerVueRequestInterceptor();
12122      }
12123
12124      if (typeof axios === 'function') {
12125        this.registerAxiosRequestInterceptor();
12126      }
12127
12128      if (typeof jQuery === 'function') {
12129        this.registerjQueryAjaxSetup();
12130      }
12131
12132      if ((typeof Turbo === "undefined" ? "undefined" : _typeof(Turbo)) === 'object') {
12133        this.registerTurboRequestInterceptor();
12134      }
12135    }
12136    /**
12137     * Register a Vue HTTP interceptor to add the X-Socket-ID header.
12138     */
12139
12140  }, {
12141    key: "registerVueRequestInterceptor",
12142    value: function registerVueRequestInterceptor() {
12143      var _this = this;
12144
12145      Vue.http.interceptors.push(function (request, next) {
12146        if (_this.socketId()) {
12147          request.headers.set('X-Socket-ID', _this.socketId());
12148        }
12149
12150        next();
12151      });
12152    }
12153    /**
12154     * Register an Axios HTTP interceptor to add the X-Socket-ID header.
12155     */
12156
12157  }, {
12158    key: "registerAxiosRequestInterceptor",
12159    value: function registerAxiosRequestInterceptor() {
12160      var _this2 = this;
12161
12162      axios.interceptors.request.use(function (config) {
12163        if (_this2.socketId()) {
12164          config.headers['X-Socket-Id'] = _this2.socketId();
12165        }
12166
12167        return config;
12168      });
12169    }
12170    /**
12171     * Register jQuery AjaxPrefilter to add the X-Socket-ID header.
12172     */
12173
12174  }, {
12175    key: "registerjQueryAjaxSetup",
12176    value: function registerjQueryAjaxSetup() {
12177      var _this3 = this;
12178
12179      if (typeof jQuery.ajax != 'undefined') {
12180        jQuery.ajaxPrefilter(function (options, originalOptions, xhr) {
12181          if (_this3.socketId()) {
12182            xhr.setRequestHeader('X-Socket-Id', _this3.socketId());
12183          }
12184        });
12185      }
12186    }
12187    /**
12188     * Register the Turbo Request interceptor to add the X-Socket-ID header.
12189     */
12190
12191  }, {
12192    key: "registerTurboRequestInterceptor",
12193    value: function registerTurboRequestInterceptor() {
12194      var _this4 = this;
12195
12196      document.addEventListener('turbo:before-fetch-request', function (event) {
12197        event.detail.fetchOptions.headers['X-Socket-Id'] = _this4.socketId();
12198      });
12199    }
12200  }]);
12201
12202  return Echo;
12203}();
12204
12205
12206
12207
12208/***/ }),
12209
vendor: 544,380 bytes, lines 12210-29421
12210/***/ "./node_modules/lodash/lodash.js":
12211/*!***************************************!*\
12212  !*** ./node_modules/lodash/lodash.js ***!
12213  \***************************************/
12214/***/ (function(module, exports, __webpack_require__) {
12215
12216/* module decorator */ module = __webpack_require__.nmd(module);
12217var __WEBPACK_AMD_DEFINE_RESULT__;/**
12218 * @license
12219 * Lodash <https://lodash.com/>
12220 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
12221 * Released under MIT license <https://lodash.com/license>
12222 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
12223 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
12224 */
12225;(function() {
12226
12227  /** Used as a safe reference for `undefined` in pre-ES5 environments. */
12228  var undefined;
12229
12230  /** Used as the semantic version number. */
12231  var VERSION = '4.17.21';
12232
12233  /** Used as the size to enable large array optimizations. */
12234  var LARGE_ARRAY_SIZE = 200;
12235
12236  /** Error message constants. */
12237  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
12238      FUNC_ERROR_TEXT = 'Expected a function',
12239      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
12240
12241  /** Used to stand-in for `undefined` hash values. */
12242  var HASH_UNDEFINED = '__lodash_hash_undefined__';
12243
12244  /** Used as the maximum memoize cache size. */
12245  var MAX_MEMOIZE_SIZE = 500;
12246
12247  /** Used as the internal argument placeholder. */
12248  var PLACEHOLDER = '__lodash_placeholder__';
12249
12250  /** Used to compose bitmasks for cloning. */
12251  var CLONE_DEEP_FLAG = 1,
12252      CLONE_FLAT_FLAG = 2,
12253      CLONE_SYMBOLS_FLAG = 4;
12254
12255  /** Used to compose bitmasks for value comparisons. */
12256  var COMPARE_PARTIAL_FLAG = 1,
12257      COMPARE_UNORDERED_FLAG = 2;
12258
12259  /** Used to compose bitmasks for function metadata. */
12260  var WRAP_BIND_FLAG = 1,
12261      WRAP_BIND_KEY_FLAG = 2,
12262      WRAP_CURRY_BOUND_FLAG = 4,
12263      WRAP_CURRY_FLAG = 8,
12264      WRAP_CURRY_RIGHT_FLAG = 16,
12265      WRAP_PARTIAL_FLAG = 32,
12266      WRAP_PARTIAL_RIGHT_FLAG = 64,
12267      WRAP_ARY_FLAG = 128,
12268      WRAP_REARG_FLAG = 256,
12269      WRAP_FLIP_FLAG = 512;
12270
12271  /** Used as default options for `_.truncate`. */
12272  var DEFAULT_TRUNC_LENGTH = 30,
12273      DEFAULT_TRUNC_OMISSION = '...';
12274
12275  /** Used to detect hot functions by number of calls within a span of milliseconds. */
12276  var HOT_COUNT = 800,
12277      HOT_SPAN = 16;
12278
12279  /** Used to indicate the type of lazy iteratees. */
12280  var LAZY_FILTER_FLAG = 1,
12281      LAZY_MAP_FLAG = 2,
12282      LAZY_WHILE_FLAG = 3;
12283
12284  /** Used as references for various `Number` constants. */
12285  var INFINITY = 1 / 0,
12286      MAX_SAFE_INTEGER = 9007199254740991,
12287      MAX_INTEGER = 1.7976931348623157e+308,
12288      NAN = 0 / 0;
12289
12290  /** Used as references for the maximum length and index of an array. */
12291  var MAX_ARRAY_LENGTH = 4294967295,
12292      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
12293      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
12294
12295  /** Used to associate wrap methods with their bit flags. */
12296  var wrapFlags = [
12297    ['ary', WRAP_ARY_FLAG],
12298    ['bind', WRAP_BIND_FLAG],
12299    ['bindKey', WRAP_BIND_KEY_FLAG],
12300    ['curry', WRAP_CURRY_FLAG],
12301    ['curryRight', WRAP_CURRY_RIGHT_FLAG],
12302    ['flip', WRAP_FLIP_FLAG],
12303    ['partial', WRAP_PARTIAL_FLAG],
12304    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
12305    ['rearg', WRAP_REARG_FLAG]
12306  ];
12307
12308  /** `Object#toString` result references. */
12309  var argsTag = '[object Arguments]',
12310      arrayTag = '[object Array]',
12311      asyncTag = '[object AsyncFunction]',
12312      boolTag = '[object Boolean]',
12313      dateTag = '[object Date]',
12314      domExcTag = '[object DOMException]',
12315      errorTag = '[object Error]',
12316      funcTag = '[object Function]',
12317      genTag = '[object GeneratorFunction]',
12318      mapTag = '[object Map]',
12319      numberTag = '[object Number]',
12320      nullTag = '[object Null]',
12321      objectTag = '[object Object]',
12322      promiseTag = '[object Promise]',
12323      proxyTag = '[object Proxy]',
12324      regexpTag = '[object RegExp]',
12325      setTag = '[object Set]',
12326      stringTag = '[object String]',
12327      symbolTag = '[object Symbol]',
12328      undefinedTag = '[object Undefined]',
12329      weakMapTag = '[object WeakMap]',
12330      weakSetTag = '[object WeakSet]';
12331
12332  var arrayBufferTag = '[object ArrayBuffer]',
12333      dataViewTag = '[object DataView]',
12334      float32Tag = '[object Float32Array]',
12335      float64Tag = '[object Float64Array]',
12336      int8Tag = '[object Int8Array]',
12337      int16Tag = '[object Int16Array]',
12338      int32Tag = '[object Int32Array]',
12339      uint8Tag = '[object Uint8Array]',
12340      uint8ClampedTag = '[object Uint8ClampedArray]',
12341      uint16Tag = '[object Uint16Array]',
12342      uint32Tag = '[object Uint32Array]';
12343
12344  /** Used to match empty string literals in compiled template source. */
12345  var reEmptyStringLeading = /\b__p \+= '';/g,
12346      reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
12347      reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
12348
12349  /** Used to match HTML entities and HTML characters. */
12350  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
12351      reUnescapedHtml = /[&<>"']/g,
12352      reHasEscapedHtml = RegExp(reEscapedHtml.source),
12353      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
12354
12355  /** Used to match template delimiters. */
12356  var reEscape = /<%-([\s\S]+?)%>/g,
12357      reEvaluate = /<%([\s\S]+?)%>/g,
12358      reInterpolate = /<%=([\s\S]+?)%>/g;
12359
12360  /** Used to match property names within property paths. */
12361  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
12362      reIsPlainProp = /^\w*$/,
12363      rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
12364
12365  /**
12366   * Used to match `RegExp`
12367   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
12368   */
12369  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
12370      reHasRegExpChar = RegExp(reRegExpChar.source);
12371
12372  /** Used to match leading whitespace. */
12373  var reTrimStart = /^\s+/;
12374
12375  /** Used to match a single whitespace character. */
12376  var reWhitespace = /\s/;
12377
12378  /** Used to match wrap detail comments. */
12379  var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
12380      reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
12381      reSplitDetails = /,? & /;
12382
12383  /** Used to match words composed of alphanumeric characters. */
12384  var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
12385
12386  /**
12387   * Used to validate the `validate` option in `_.template` variable.
12388   *
12389   * Forbids characters which could potentially change the meaning of the function argument definition:
12390   * - "()," (modification of function parameters)
12391   * - "=" (default value)
12392   * - "[]{}" (destructuring of function parameters)
12393   * - "/" (beginning of a comment)
12394   * - whitespace
12395   */
12396  var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
12397
12398  /** Used to match backslashes in property paths. */
12399  var reEscapeChar = /\\(\\)?/g;
12400
12401  /**
12402   * Used to match
12403   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
12404   */
12405  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
12406
12407  /** Used to match `RegExp` flags from their coerced string values. */
12408  var reFlags = /\w*$/;
12409
12410  /** Used to detect bad signed hexadecimal string values. */
12411  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
12412
12413  /** Used to detect binary string values. */
12414  var reIsBinary = /^0b[01]+$/i;
12415
12416  /** Used to detect host constructors (Safari). */
12417  var reIsHostCtor = /^\[object .+?Constructor\]$/;
12418
12419  /** Used to detect octal string values. */
12420  var reIsOctal = /^0o[0-7]+$/i;
12421
12422  /** Used to detect unsigned integer values. */
12423  var reIsUint = /^(?:0|[1-9]\d*)$/;
12424
12425  /** Used to match Latin Unicode letters (excluding mathematical operators). */
12426  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
12427
12428  /** Used to ensure capturing order of template delimiters. */
12429  var reNoMatch = /($^)/;
12430
12431  /** Used to match unescaped characters in compiled string literals. */
12432  var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
12433
12434  /** Used to compose unicode character classes. */
12435  var rsAstralRange = '\\ud800-\\udfff',
12436      rsComboMarksRange = '\\u0300-\\u036f',
12437      reComboHalfMarksRange = '\\ufe20-\\ufe2f',
12438      rsComboSymbolsRange = '\\u20d0-\\u20ff',
12439      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
12440      rsDingbatRange = '\\u2700-\\u27bf',
12441      rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
12442      rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
12443      rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
12444      rsPunctuationRange = '\\u2000-\\u206f',
12445      rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
12446      rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
12447      rsVarRange = '\\ufe0e\\ufe0f',
12448      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
12449
12450  /** Used to compose unicode capture groups. */
12451  var rsApos = "['\u2019]",
12452      rsAstral = '[' + rsAstralRange + ']',
12453      rsBreak = '[' + rsBreakRange + ']',
12454      rsCombo = '[' + rsComboRange + ']',
12455      rsDigits = '\\d+',
12456      rsDingbat = '[' + rsDingbatRange + ']',
12457      rsLower = '[' + rsLowerRange + ']',
12458      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
12459      rsFitz = '\\ud83c[\\udffb-\\udfff]',
12460      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
12461      rsNonAstral = '[^' + rsAstralRange + ']',
12462      rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
12463      rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
12464      rsUpper = '[' + rsUpperRange + ']',
12465      rsZWJ = '\\u200d';
12466
12467  /** Used to compose unicode regexes. */
12468  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
12469      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
12470      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
12471      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
12472      reOptMod = rsModifier + '?',
12473      rsOptVar = '[' + rsVarRange + ']?',
12474      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
12475      rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
12476      rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
12477      rsSeq = rsOptVar + reOptMod + rsOptJoin,
12478      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
12479      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
12480
12481  /** Used to match apostrophes. */
12482  var reApos = RegExp(rsApos, 'g');
12483
12484  /**
12485   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
12486   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
12487   */
12488  var reComboMark = RegExp(rsCombo, 'g');
12489
12490  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
12491  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
12492
12493  /** Used to match complex or compound words. */
12494  var reUnicodeWord = RegExp([
12495    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
12496    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
12497    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
12498    rsUpper + '+' + rsOptContrUpper,
12499    rsOrdUpper,
12500    rsOrdLower,
12501    rsDigits,
12502    rsEmoji
12503  ].join('|'), 'g');
12504
12505  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
12506  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');
12507
12508  /** Used to detect strings that need a more robust regexp to match words. */
12509  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
12510
12511  /** Used to assign default `context` object properties. */
12512  var contextProps = [
12513    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
12514    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
12515    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
12516    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
12517    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
12518  ];
12519
12520  /** Used to make template sourceURLs easier to identify. */
12521  var templateCounter = -1;
12522
12523  /** Used to identify `toStringTag` values of typed arrays. */
12524  var typedArrayTags = {};
12525  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
12526  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
12527  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
12528  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
12529  typedArrayTags[uint32Tag] = true;
12530  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
12531  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
12532  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
12533  typedArrayTags[errorTag] = typedArrayTags[funcTag] =
12534  typedArrayTags[mapTag] = typedArrayTags[numberTag] =
12535  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
12536  typedArrayTags[setTag] = typedArrayTags[stringTag] =
12537  typedArrayTags[weakMapTag] = false;
12538
12539  /** Used to identify `toStringTag` values supported by `_.clone`. */
12540  var cloneableTags = {};
12541  cloneableTags[argsTag] = cloneableTags[arrayTag] =
12542  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
12543  cloneableTags[boolTag] = cloneableTags[dateTag] =
12544  cloneableTags[float32Tag] = cloneableTags[float64Tag] =
12545  cloneableTags[int8Tag] = cloneableTags[int16Tag] =
12546  cloneableTags[int32Tag] = cloneableTags[mapTag] =
12547  cloneableTags[numberTag] = cloneableTags[objectTag] =
12548  cloneableTags[regexpTag] = cloneableTags[setTag] =
12549  cloneableTags[stringTag] = cloneableTags[symbolTag] =
12550  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
12551  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
12552  cloneableTags[errorTag] = cloneableTags[funcTag] =
12553  cloneableTags[weakMapTag] = false;
12554
12555  /** Used to map Latin Unicode letters to basic Latin letters. */
12556  var deburredLetters = {
12557    // Latin-1 Supplement block.
12558    '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
12559    '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
12560    '\xc7': 'C',  '\xe7': 'c',
12561    '\xd0': 'D',  '\xf0': 'd',
12562    '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
12563    '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
12564    '\xcc': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
12565    '\xec': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
12566    '\xd1': 'N',  '\xf1': 'n',
12567    '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
12568    '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
12569    '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
12570    '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
12571    '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
12572    '\xc6': 'Ae', '\xe6': 'ae',
12573    '\xde': 'Th', '\xfe': 'th',
12574    '\xdf': 'ss',
12575    // Latin Extended-A block.
12576    '\u0100': 'A',  '\u0102': 'A', '\u0104': 'A',
12577    '\u0101': 'a',  '\u0103': 'a', '\u0105': 'a',
12578    '\u0106': 'C',  '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
12579    '\u0107': 'c',  '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
12580    '\u010e': 'D',  '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
12581    '\u0112': 'E',  '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
12582    '\u0113': 'e',  '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
12583    '\u011c': 'G',  '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
12584    '\u011d': 'g',  '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
12585    '\u0124': 'H',  '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
12586    '\u0128': 'I',  '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
12587    '\u0129': 'i',  '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
12588    '\u0134': 'J',  '\u0135': 'j',
12589    '\u0136': 'K',  '\u0137': 'k', '\u0138': 'k',
12590    '\u0139': 'L',  '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
12591    '\u013a': 'l',  '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
12592    '\u0143': 'N',  '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
12593    '\u0144': 'n',  '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
12594    '\u014c': 'O',  '\u014e': 'O', '\u0150': 'O',
12595    '\u014d': 'o',  '\u014f': 'o', '\u0151': 'o',
12596    '\u0154': 'R',  '\u0156': 'R', '\u0158': 'R',
12597    '\u0155': 'r',  '\u0157': 'r', '\u0159': 'r',
12598    '\u015a': 'S',  '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
12599    '\u015b': 's',  '\u015d': 's', '\u015f': 's', '\u0161': 's',
12600    '\u0162': 'T',  '\u0164': 'T', '\u0166': 'T',
12601    '\u0163': 't',  '\u0165': 't', '\u0167': 't',
12602    '\u0168': 'U',  '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
12603    '\u0169': 'u',  '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
12604    '\u0174': 'W',  '\u0175': 'w',
12605    '\u0176': 'Y',  '\u0177': 'y', '\u0178': 'Y',
12606    '\u0179': 'Z',  '\u017b': 'Z', '\u017d': 'Z',
12607    '\u017a': 'z',  '\u017c': 'z', '\u017e': 'z',
12608    '\u0132': 'IJ', '\u0133': 'ij',
12609    '\u0152': 'Oe', '\u0153': 'oe',
12610    '\u0149': "'n", '\u017f': 's'
12611  };
12612
12613  /** Used to map characters to HTML entities. */
12614  var htmlEscapes = {
12615    '&': '&amp;',
12616    '<': '&lt;',
12617    '>': '&gt;',
12618    '"': '&quot;',
12619    "'": '&#39;'
12620  };
12621
12622  /** Used to map HTML entities to characters. */
12623  var htmlUnescapes = {
12624    '&amp;': '&',
12625    '&lt;': '<',
12626    '&gt;': '>',
12627    '&quot;': '"',
12628    '&#39;': "'"
12629  };
12630
12631  /** Used to escape characters for inclusion in compiled string literals. */
12632  var stringEscapes = {
12633    '\\': '\\',
12634    "'": "'",
12635    '\n': 'n',
12636    '\r': 'r',
12637    '\u2028': 'u2028',
12638    '\u2029': 'u2029'
12639  };
12640
12641  /** Built-in method references without a dependency on `root`. */
12642  var freeParseFloat = parseFloat,
12643      freeParseInt = parseInt;
12644
12645  /** Detect free variable `global` from Node.js. */
12646  var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
12647
12648  /** Detect free variable `self`. */
12649  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
12650
12651  /** Used as a reference to the global object. */
12652  var root = freeGlobal || freeSelf || Function('return this')();
12653
12654  /** Detect free variable `exports`. */
12655  var freeExports =  true && exports && !exports.nodeType && exports;
12656
12657  /** Detect free variable `module`. */
12658  var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
12659
12660  /** Detect the popular CommonJS extension `module.exports`. */
12661  var moduleExports = freeModule && freeModule.exports === freeExports;
12662
12663  /** Detect free variable `process` from Node.js. */
12664  var freeProcess = moduleExports && freeGlobal.process;
12665
12666  /** Used to access faster Node.js helpers. */
12667  var nodeUtil = (function() {
12668    try {
12669      // Use `util.types` for Node.js 10+.
12670      var types = freeModule && freeModule.require && freeModule.require('util').types;
12671
12672      if (types) {
12673        return types;
12674      }
12675
12676      // Legacy `process.binding('util')` for Node.js < 10.
12677      return freeProcess && freeProcess.binding && freeProcess.binding('util');
12678    } catch (e) {}
12679  }());
12680
12681  /* Node.js helper references. */
12682  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
12683      nodeIsDate = nodeUtil && nodeUtil.isDate,
12684      nodeIsMap = nodeUtil && nodeUtil.isMap,
12685      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
12686      nodeIsSet = nodeUtil && nodeUtil.isSet,
12687      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
12688
12689  /*--------------------------------------------------------------------------*/
12690
12691  /**
12692   * A faster alternative to `Function#apply`, this function invokes `func`
12693   * with the `this` binding of `thisArg` and the arguments of `args`.
12694   *
12695   * @private
12696   * @param {Function} func The function to invoke.
12697   * @param {*} thisArg The `this` binding of `func`.
12698   * @param {Array} args The arguments to invoke `func` with.
12699   * @returns {*} Returns the result of `func`.
12700   */
12701  function apply(func, thisArg, args) {
12702    switch (args.length) {
12703      case 0: return func.call(thisArg);
12704      case 1: return func.call(thisArg, args[0]);
12705      case 2: return func.call(thisArg, args[0], args[1]);
12706      case 3: return func.call(thisArg, args[0], args[1], args[2]);
12707    }
12708    return func.apply(thisArg, args);
12709  }
12710
12711  /**
12712   * A specialized version of `baseAggregator` for arrays.
12713   *
12714   * @private
12715   * @param {Array} [array] The array to iterate over.
12716   * @param {Function} setter The function to set `accumulator` values.
12717   * @param {Function} iteratee The iteratee to transform keys.
12718   * @param {Object} accumulator The initial aggregated object.
12719   * @returns {Function} Returns `accumulator`.
12720   */
12721  function arrayAggregator(array, setter, iteratee, accumulator) {
12722    var index = -1,
12723        length = array == null ? 0 : array.length;
12724
12725    while (++index < length) {
12726      var value = array[index];
12727      setter(accumulator, value, iteratee(value), array);
12728    }
12729    return accumulator;
12730  }
12731
12732  /**
12733   * A specialized version of `_.forEach` for arrays without support for
12734   * iteratee shorthands.
12735   *
12736   * @private
12737   * @param {Array} [array] The array to iterate over.
12738   * @param {Function} iteratee The function invoked per iteration.
12739   * @returns {Array} Returns `array`.
12740   */
12741  function arrayEach(array, iteratee) {
12742    var index = -1,
12743        length = array == null ? 0 : array.length;
12744
12745    while (++index < length) {
12746      if (iteratee(array[index], index, array) === false) {
12747        break;
12748      }
12749    }
12750    return array;
12751  }
12752
12753  /**
12754   * A specialized version of `_.forEachRight` for arrays without support for
12755   * iteratee shorthands.
12756   *
12757   * @private
12758   * @param {Array} [array] The array to iterate over.
12759   * @param {Function} iteratee The function invoked per iteration.
12760   * @returns {Array} Returns `array`.
12761   */
12762  function arrayEachRight(array, iteratee) {
12763    var length = array == null ? 0 : array.length;
12764
12765    while (length--) {
12766      if (iteratee(array[length], length, array) === false) {
12767        break;
12768      }
12769    }
12770    return array;
12771  }
12772
12773  /**
12774   * A specialized version of `_.every` for arrays without support for
12775   * iteratee shorthands.
12776   *
12777   * @private
12778   * @param {Array} [array] The array to iterate over.
12779   * @param {Function} predicate The function invoked per iteration.
12780   * @returns {boolean} Returns `true` if all elements pass the predicate check,
12781   *  else `false`.
12782   */
12783  function arrayEvery(array, predicate) {
12784    var index = -1,
12785        length = array == null ? 0 : array.length;
12786
12787    while (++index < length) {
12788      if (!predicate(array[index], index, array)) {
12789        return false;
12790      }
12791    }
12792    return true;
12793  }
12794
12795  /**
12796   * A specialized version of `_.filter` for arrays without support for
12797   * iteratee shorthands.
12798   *
12799   * @private
12800   * @param {Array} [array] The array to iterate over.
12801   * @param {Function} predicate The function invoked per iteration.
12802   * @returns {Array} Returns the new filtered array.
12803   */
12804  function arrayFilter(array, predicate) {
12805    var index = -1,
12806        length = array == null ? 0 : array.length,
12807        resIndex = 0,
12808        result = [];
12809
12810    while (++index < length) {
12811      var value = array[index];
12812      if (predicate(value, index, array)) {
12813        result[resIndex++] = value;
12814      }
12815    }
12816    return result;
12817  }
12818
12819  /**
12820   * A specialized version of `_.includes` for arrays without support for
12821   * specifying an index to search from.
12822   *
12823   * @private
12824   * @param {Array} [array] The array to inspect.
12825   * @param {*} target The value to search for.
12826   * @returns {boolean} Returns `true` if `target` is found, else `false`.
12827   */
12828  function arrayIncludes(array, value) {
12829    var length = array == null ? 0 : array.length;
12830    return !!length && baseIndexOf(array, value, 0) > -1;
12831  }
12832
12833  /**
12834   * This function is like `arrayIncludes` except that it accepts a comparator.
12835   *
12836   * @private
12837   * @param {Array} [array] The array to inspect.
12838   * @param {*} target The value to search for.
12839   * @param {Function} comparator The comparator invoked per element.
12840   * @returns {boolean} Returns `true` if `target` is found, else `false`.
12841   */
12842  function arrayIncludesWith(array, value, comparator) {
12843    var index = -1,
12844        length = array == null ? 0 : array.length;
12845
12846    while (++index < length) {
12847      if (comparator(value, array[index])) {
12848        return true;
12849      }
12850    }
12851    return false;
12852  }
12853
12854  /**
12855   * A specialized version of `_.map` for arrays without support for iteratee
12856   * shorthands.
12857   *
12858   * @private
12859   * @param {Array} [array] The array to iterate over.
12860   * @param {Function} iteratee The function invoked per iteration.
12861   * @returns {Array} Returns the new mapped array.
12862   */
12863  function arrayMap(array, iteratee) {
12864    var index = -1,
12865        length = array == null ? 0 : array.length,
12866        result = Array(length);
12867
12868    while (++index < length) {
12869      result[index] = iteratee(array[index], index, array);
12870    }
12871    return result;
12872  }
12873
12874  /**
12875   * Appends the elements of `values` to `array`.
12876   *
12877   * @private
12878   * @param {Array} array The array to modify.
12879   * @param {Array} values The values to append.
12880   * @returns {Array} Returns `array`.
12881   */
12882  function arrayPush(array, values) {
12883    var index = -1,
12884        length = values.length,
12885        offset = array.length;
12886
12887    while (++index < length) {
12888      array[offset + index] = values[index];
12889    }
12890    return array;
12891  }
12892
12893  /**
12894   * A specialized version of `_.reduce` for arrays without support for
12895   * iteratee shorthands.
12896   *
12897   * @private
12898   * @param {Array} [array] The array to iterate over.
12899   * @param {Function} iteratee The function invoked per iteration.
12900   * @param {*} [accumulator] The initial value.
12901   * @param {boolean} [initAccum] Specify using the first element of `array` as
12902   *  the initial value.
12903   * @returns {*} Returns the accumulated value.
12904   */
12905  function arrayReduce(array, iteratee, accumulator, initAccum) {
12906    var index = -1,
12907        length = array == null ? 0 : array.length;
12908
12909    if (initAccum && length) {
12910      accumulator = array[++index];
12911    }
12912    while (++index < length) {
12913      accumulator = iteratee(accumulator, array[index], index, array);
12914    }
12915    return accumulator;
12916  }
12917
12918  /**
12919   * A specialized version of `_.reduceRight` for arrays without support for
12920   * iteratee shorthands.
12921   *
12922   * @private
12923   * @param {Array} [array] The array to iterate over.
12924   * @param {Function} iteratee The function invoked per iteration.
12925   * @param {*} [accumulator] The initial value.
12926   * @param {boolean} [initAccum] Specify using the last element of `array` as
12927   *  the initial value.
12928   * @returns {*} Returns the accumulated value.
12929   */
12930  function arrayReduceRight(array, iteratee, accumulator, initAccum) {
12931    var length = array == null ? 0 : array.length;
12932    if (initAccum && length) {
12933      accumulator = array[--length];
12934    }
12935    while (length--) {
12936      accumulator = iteratee(accumulator, array[length], length, array);
12937    }
12938    return accumulator;
12939  }
12940
12941  /**
12942   * A specialized version of `_.some` for arrays without support for iteratee
12943   * shorthands.
12944   *
12945   * @private
12946   * @param {Array} [array] The array to iterate over.
12947   * @param {Function} predicate The function invoked per iteration.
12948   * @returns {boolean} Returns `true` if any element passes the predicate check,
12949   *  else `false`.
12950   */
12951  function arraySome(array, predicate) {
12952    var index = -1,
12953        length = array == null ? 0 : array.length;
12954
12955    while (++index < length) {
12956      if (predicate(array[index], index, array)) {
12957        return true;
12958      }
12959    }
12960    return false;
12961  }
12962
12963  /**
12964   * Gets the size of an ASCII `string`.
12965   *
12966   * @private
12967   * @param {string} string The string inspect.
12968   * @returns {number} Returns the string size.
12969   */
12970  var asciiSize = baseProperty('length');
12971
12972  /**
12973   * Converts an ASCII `string` to an array.
12974   *
12975   * @private
12976   * @param {string} string The string to convert.
12977   * @returns {Array} Returns the converted array.
12978   */
12979  function asciiToArray(string) {
12980    return string.split('');
12981  }
12982
12983  /**
12984   * Splits an ASCII `string` into an array of its words.
12985   *
12986   * @private
12987   * @param {string} The string to inspect.
12988   * @returns {Array} Returns the words of `string`.
12989   */
12990  function asciiWords(string) {
12991    return string.match(reAsciiWord) || [];
12992  }
12993
12994  /**
12995   * The base implementation of methods like `_.findKey` and `_.findLastKey`,
12996   * without support for iteratee shorthands, which iterates over `collection`
12997   * using `eachFunc`.
12998   *
12999   * @private
13000   * @param {Array|Object} collection The collection to inspect.
13001   * @param {Function} predicate The function invoked per iteration.
13002   * @param {Function} eachFunc The function to iterate over `collection`.
13003   * @returns {*} Returns the found element or its key, else `undefined`.
13004   */
13005  function baseFindKey(collection, predicate, eachFunc) {
13006    var result;
13007    eachFunc(collection, function(value, key, collection) {
13008      if (predicate(value, key, collection)) {
13009        result = key;
13010        return false;
13011      }
13012    });
13013    return result;
13014  }
13015
13016  /**
13017   * The base implementation of `_.findIndex` and `_.findLastIndex` without
13018   * support for iteratee shorthands.
13019   *
13020   * @private
13021   * @param {Array} array The array to inspect.
13022   * @param {Function} predicate The function invoked per iteration.
13023   * @param {number} fromIndex The index to search from.
13024   * @param {boolean} [fromRight] Specify iterating from right to left.
13025   * @returns {number} Returns the index of the matched value, else `-1`.
13026   */
13027  function baseFindIndex(array, predicate, fromIndex, fromRight) {
13028    var length = array.length,
13029        index = fromIndex + (fromRight ? 1 : -1);
13030
13031    while ((fromRight ? index-- : ++index < length)) {
13032      if (predicate(array[index], index, array)) {
13033        return index;
13034      }
13035    }
13036    return -1;
13037  }
13038
13039  /**
13040   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
13041   *
13042   * @private
13043   * @param {Array} array The array to inspect.
13044   * @param {*} value The value to search for.
13045   * @param {number} fromIndex The index to search from.
13046   * @returns {number} Returns the index of the matched value, else `-1`.
13047   */
13048  function baseIndexOf(array, value, fromIndex) {
13049    return value === value
13050      ? strictIndexOf(array, value, fromIndex)
13051      : baseFindIndex(array, baseIsNaN, fromIndex);
13052  }
13053
13054  /**
13055   * This function is like `baseIndexOf` except that it accepts a comparator.
13056   *
13057   * @private
13058   * @param {Array} array The array to inspect.
13059   * @param {*} value The value to search for.
13060   * @param {number} fromIndex The index to search from.
13061   * @param {Function} comparator The comparator invoked per element.
13062   * @returns {number} Returns the index of the matched value, else `-1`.
13063   */
13064  function baseIndexOfWith(array, value, fromIndex, comparator) {
13065    var index = fromIndex - 1,
13066        length = array.length;
13067
13068    while (++index < length) {
13069      if (comparator(array[index], value)) {
13070        return index;
13071      }
13072    }
13073    return -1;
13074  }
13075
13076  /**
13077   * The base implementation of `_.isNaN` without support for number objects.
13078   *
13079   * @private
13080   * @param {*} value The value to check.
13081   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
13082   */
13083  function baseIsNaN(value) {
13084    return value !== value;
13085  }
13086
13087  /**
13088   * The base implementation of `_.mean` and `_.meanBy` without support for
13089   * iteratee shorthands.
13090   *
13091   * @private
13092   * @param {Array} array The array to iterate over.
13093   * @param {Function} iteratee The function invoked per iteration.
13094   * @returns {number} Returns the mean.
13095   */
13096  function baseMean(array, iteratee) {
13097    var length = array == null ? 0 : array.length;
13098    return length ? (baseSum(array, iteratee) / length) : NAN;
13099  }
13100
13101  /**
13102   * The base implementation of `_.property` without support for deep paths.
13103   *
13104   * @private
13105   * @param {string} key The key of the property to get.
13106   * @returns {Function} Returns the new accessor function.
13107   */
13108  function baseProperty(key) {
13109    return function(object) {
13110      return object == null ? undefined : object[key];
13111    };
13112  }
13113
13114  /**
13115   * The base implementation of `_.propertyOf` without support for deep paths.
13116   *
13117   * @private
13118   * @param {Object} object The object to query.
13119   * @returns {Function} Returns the new accessor function.
13120   */
13121  function basePropertyOf(object) {
13122    return function(key) {
13123      return object == null ? undefined : object[key];
13124    };
13125  }
13126
13127  /**
13128   * The base implementation of `_.reduce` and `_.reduceRight`, without support
13129   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
13130   *
13131   * @private
13132   * @param {Array|Object} collection The collection to iterate over.
13133   * @param {Function} iteratee The function invoked per iteration.
13134   * @param {*} accumulator The initial value.
13135   * @param {boolean} initAccum Specify using the first or last element of
13136   *  `collection` as the initial value.
13137   * @param {Function} eachFunc The function to iterate over `collection`.
13138   * @returns {*} Returns the accumulated value.
13139   */
13140  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
13141    eachFunc(collection, function(value, index, collection) {
13142      accumulator = initAccum
13143        ? (initAccum = false, value)
13144        : iteratee(accumulator, value, index, collection);
13145    });
13146    return accumulator;
13147  }
13148
13149  /**
13150   * The base implementation of `_.sortBy` which uses `comparer` to define the
13151   * sort order of `array` and replaces criteria objects with their corresponding
13152   * values.
13153   *
13154   * @private
13155   * @param {Array} array The array to sort.
13156   * @param {Function} comparer The function to define sort order.
13157   * @returns {Array} Returns `array`.
13158   */
13159  function baseSortBy(array, comparer) {
13160    var length = array.length;
13161
13162    array.sort(comparer);
13163    while (length--) {
13164      array[length] = array[length].value;
13165    }
13166    return array;
13167  }
13168
13169  /**
13170   * The base implementation of `_.sum` and `_.sumBy` without support for
13171   * iteratee shorthands.
13172   *
13173   * @private
13174   * @param {Array} array The array to iterate over.
13175   * @param {Function} iteratee The function invoked per iteration.
13176   * @returns {number} Returns the sum.
13177   */
13178  function baseSum(array, iteratee) {
13179    var result,
13180        index = -1,
13181        length = array.length;
13182
13183    while (++index < length) {
13184      var current = iteratee(array[index]);
13185      if (current !== undefined) {
13186        result = result === undefined ? current : (result + current);
13187      }
13188    }
13189    return result;
13190  }
13191
13192  /**
13193   * The base implementation of `_.times` without support for iteratee shorthands
13194   * or max array length checks.
13195   *
13196   * @private
13197   * @param {number} n The number of times to invoke `iteratee`.
13198   * @param {Function} iteratee The function invoked per iteration.
13199   * @returns {Array} Returns the array of results.
13200   */
13201  function baseTimes(n, iteratee) {
13202    var index = -1,
13203        result = Array(n);
13204
13205    while (++index < n) {
13206      result[index] = iteratee(index);
13207    }
13208    return result;
13209  }
13210
13211  /**
13212   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
13213   * of key-value pairs for `object` corresponding to the property names of `props`.
13214   *
13215   * @private
13216   * @param {Object} object The object to query.
13217   * @param {Array} props The property names to get values for.
13218   * @returns {Object} Returns the key-value pairs.
13219   */
13220  function baseToPairs(object, props) {
13221    return arrayMap(props, function(key) {
13222      return [key, object[key]];
13223    });
13224  }
13225
13226  /**
13227   * The base implementation of `_.trim`.
13228   *
13229   * @private
13230   * @param {string} string The string to trim.
13231   * @returns {string} Returns the trimmed string.
13232   */
13233  function baseTrim(string) {
13234    return string
13235      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
13236      : string;
13237  }
13238
13239  /**
13240   * The base implementation of `_.unary` without support for storing metadata.
13241   *
13242   * @private
13243   * @param {Function} func The function to cap arguments for.
13244   * @returns {Function} Returns the new capped function.
13245   */
13246  function baseUnary(func) {
13247    return function(value) {
13248      return func(value);
13249    };
13250  }
13251
13252  /**
13253   * The base implementation of `_.values` and `_.valuesIn` which creates an
13254   * array of `object` property values corresponding to the property names
13255   * of `props`.
13256   *
13257   * @private
13258   * @param {Object} object The object to query.
13259   * @param {Array} props The property names to get values for.
13260   * @returns {Object} Returns the array of property values.
13261   */
13262  function baseValues(object, props) {
13263    return arrayMap(props, function(key) {
13264      return object[key];
13265    });
13266  }
13267
13268  /**
13269   * Checks if a `cache` value for `key` exists.
13270   *
13271   * @private
13272   * @param {Object} cache The cache to query.
13273   * @param {string} key The key of the entry to check.
13274   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
13275   */
13276  function cacheHas(cache, key) {
13277    return cache.has(key);
13278  }
13279
13280  /**
13281   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
13282   * that is not found in the character symbols.
13283   *
13284   * @private
13285   * @param {Array} strSymbols The string symbols to inspect.
13286   * @param {Array} chrSymbols The character symbols to find.
13287   * @returns {number} Returns the index of the first unmatched string symbol.
13288   */
13289  function charsStartIndex(strSymbols, chrSymbols) {
13290    var index = -1,
13291        length = strSymbols.length;
13292
13293    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
13294    return index;
13295  }
13296
13297  /**
13298   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
13299   * that is not found in the character symbols.
13300   *
13301   * @private
13302   * @param {Array} strSymbols The string symbols to inspect.
13303   * @param {Array} chrSymbols The character symbols to find.
13304   * @returns {number} Returns the index of the last unmatched string symbol.
13305   */
13306  function charsEndIndex(strSymbols, chrSymbols) {
13307    var index = strSymbols.length;
13308
13309    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
13310    return index;
13311  }
13312
13313  /**
13314   * Gets the number of `placeholder` occurrences in `array`.
13315   *
13316   * @private
13317   * @param {Array} array The array to inspect.
13318   * @param {*} placeholder The placeholder to search for.
13319   * @returns {number} Returns the placeholder count.
13320   */
13321  function countHolders(array, placeholder) {
13322    var length = array.length,
13323        result = 0;
13324
13325    while (length--) {
13326      if (array[length] === placeholder) {
13327        ++result;
13328      }
13329    }
13330    return result;
13331  }
13332
13333  /**
13334   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
13335   * letters to basic Latin letters.
13336   *
13337   * @private
13338   * @param {string} letter The matched letter to deburr.
13339   * @returns {string} Returns the deburred letter.
13340   */
13341  var deburrLetter = basePropertyOf(deburredLetters);
13342
13343  /**
13344   * Used by `_.escape` to convert characters to HTML entities.
13345   *
13346   * @private
13347   * @param {string} chr The matched character to escape.
13348   * @returns {string} Returns the escaped character.
13349   */
13350  var escapeHtmlChar = basePropertyOf(htmlEscapes);
13351
13352  /**
13353   * Used by `_.template` to escape characters for inclusion in compiled string literals.
13354   *
13355   * @private
13356   * @param {string} chr The matched character to escape.
13357   * @returns {string} Returns the escaped character.
13358   */
13359  function escapeStringChar(chr) {
13360    return '\\' + stringEscapes[chr];
13361  }
13362
13363  /**
13364   * Gets the value at `key` of `object`.
13365   *
13366   * @private
13367   * @param {Object} [object] The object to query.
13368   * @param {string} key The key of the property to get.
13369   * @returns {*} Returns the property value.
13370   */
13371  function getValue(object, key) {
13372    return object == null ? undefined : object[key];
13373  }
13374
13375  /**
13376   * Checks if `string` contains Unicode symbols.
13377   *
13378   * @private
13379   * @param {string} string The string to inspect.
13380   * @returns {boolean} Returns `true` if a symbol is found, else `false`.
13381   */
13382  function hasUnicode(string) {
13383    return reHasUnicode.test(string);
13384  }
13385
13386  /**
13387   * Checks if `string` contains a word composed of Unicode symbols.
13388   *
13389   * @private
13390   * @param {string} string The string to inspect.
13391   * @returns {boolean} Returns `true` if a word is found, else `false`.
13392   */
13393  function hasUnicodeWord(string) {
13394    return reHasUnicodeWord.test(string);
13395  }
13396
13397  /**
13398   * Converts `iterator` to an array.
13399   *
13400   * @private
13401   * @param {Object} iterator The iterator to convert.
13402   * @returns {Array} Returns the converted array.
13403   */
13404  function iteratorToArray(iterator) {
13405    var data,
13406        result = [];
13407
13408    while (!(data = iterator.next()).done) {
13409      result.push(data.value);
13410    }
13411    return result;
13412  }
13413
13414  /**
13415   * Converts `map` to its key-value pairs.
13416   *
13417   * @private
13418   * @param {Object} map The map to convert.
13419   * @returns {Array} Returns the key-value pairs.
13420   */
13421  function mapToArray(map) {
13422    var index = -1,
13423        result = Array(map.size);
13424
13425    map.forEach(function(value, key) {
13426      result[++index] = [key, value];
13427    });
13428    return result;
13429  }
13430
13431  /**
13432   * Creates a unary function that invokes `func` with its argument transformed.
13433   *
13434   * @private
13435   * @param {Function} func The function to wrap.
13436   * @param {Function} transform The argument transform.
13437   * @returns {Function} Returns the new function.
13438   */
13439  function overArg(func, transform) {
13440    return function(arg) {
13441      return func(transform(arg));
13442    };
13443  }
13444
13445  /**
13446   * Replaces all `placeholder` elements in `array` with an internal placeholder
13447   * and returns an array of their indexes.
13448   *
13449   * @private
13450   * @param {Array} array The array to modify.
13451   * @param {*} placeholder The placeholder to replace.
13452   * @returns {Array} Returns the new array of placeholder indexes.
13453   */
13454  function replaceHolders(array, placeholder) {
13455    var index = -1,
13456        length = array.length,
13457        resIndex = 0,
13458        result = [];
13459
13460    while (++index < length) {
13461      var value = array[index];
13462      if (value === placeholder || value === PLACEHOLDER) {
13463        array[index] = PLACEHOLDER;
13464        result[resIndex++] = index;
13465      }
13466    }
13467    return result;
13468  }
13469
13470  /**
13471   * Converts `set` to an array of its values.
13472   *
13473   * @private
13474   * @param {Object} set The set to convert.
13475   * @returns {Array} Returns the values.
13476   */
13477  function setToArray(set) {
13478    var index = -1,
13479        result = Array(set.size);
13480
13481    set.forEach(function(value) {
13482      result[++index] = value;
13483    });
13484    return result;
13485  }
13486
13487  /**
13488   * Converts `set` to its value-value pairs.
13489   *
13490   * @private
13491   * @param {Object} set The set to convert.
13492   * @returns {Array} Returns the value-value pairs.
13493   */
13494  function setToPairs(set) {
13495    var index = -1,
13496        result = Array(set.size);
13497
13498    set.forEach(function(value) {
13499      result[++index] = [value, value];
13500    });
13501    return result;
13502  }
13503
13504  /**
13505   * A specialized version of `_.indexOf` which performs strict equality
13506   * comparisons of values, i.e. `===`.
13507   *
13508   * @private
13509   * @param {Array} array The array to inspect.
13510   * @param {*} value The value to search for.
13511   * @param {number} fromIndex The index to search from.
13512   * @returns {number} Returns the index of the matched value, else `-1`.
13513   */
13514  function strictIndexOf(array, value, fromIndex) {
13515    var index = fromIndex - 1,
13516        length = array.length;
13517
13518    while (++index < length) {
13519      if (array[index] === value) {
13520        return index;
13521      }
13522    }
13523    return -1;
13524  }
13525
13526  /**
13527   * A specialized version of `_.lastIndexOf` which performs strict equality
13528   * comparisons of values, i.e. `===`.
13529   *
13530   * @private
13531   * @param {Array} array The array to inspect.
13532   * @param {*} value The value to search for.
13533   * @param {number} fromIndex The index to search from.
13534   * @returns {number} Returns the index of the matched value, else `-1`.
13535   */
13536  function strictLastIndexOf(array, value, fromIndex) {
13537    var index = fromIndex + 1;
13538    while (index--) {
13539      if (array[index] === value) {
13540        return index;
13541      }
13542    }
13543    return index;
13544  }
13545
13546  /**
13547   * Gets the number of symbols in `string`.
13548   *
13549   * @private
13550   * @param {string} string The string to inspect.
13551   * @returns {number} Returns the string size.
13552   */
13553  function stringSize(string) {
13554    return hasUnicode(string)
13555      ? unicodeSize(string)
13556      : asciiSize(string);
13557  }
13558
13559  /**
13560   * Converts `string` to an array.
13561   *
13562   * @private
13563   * @param {string} string The string to convert.
13564   * @returns {Array} Returns the converted array.
13565   */
13566  function stringToArray(string) {
13567    return hasUnicode(string)
13568      ? unicodeToArray(string)
13569      : asciiToArray(string);
13570  }
13571
13572  /**
13573   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
13574   * character of `string`.
13575   *
13576   * @private
13577   * @param {string} string The string to inspect.
13578   * @returns {number} Returns the index of the last non-whitespace character.
13579   */
13580  function trimmedEndIndex(string) {
13581    var index = string.length;
13582
13583    while (index-- && reWhitespace.test(string.charAt(index))) {}
13584    return index;
13585  }
13586
13587  /**
13588   * Used by `_.unescape` to convert HTML entities to characters.
13589   *
13590   * @private
13591   * @param {string} chr The matched character to unescape.
13592   * @returns {string} Returns the unescaped character.
13593   */
13594  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
13595
13596  /**
13597   * Gets the size of a Unicode `string`.
13598   *
13599   * @private
13600   * @param {string} string The string inspect.
13601   * @returns {number} Returns the string size.
13602   */
13603  function unicodeSize(string) {
13604    var result = reUnicode.lastIndex = 0;
13605    while (reUnicode.test(string)) {
13606      ++result;
13607    }
13608    return result;
13609  }
13610
13611  /**
13612   * Converts a Unicode `string` to an array.
13613   *
13614   * @private
13615   * @param {string} string The string to convert.
13616   * @returns {Array} Returns the converted array.
13617   */
13618  function unicodeToArray(string) {
13619    return string.match(reUnicode) || [];
13620  }
13621
13622  /**
13623   * Splits a Unicode `string` into an array of its words.
13624   *
13625   * @private
13626   * @param {string} The string to inspect.
13627   * @returns {Array} Returns the words of `string`.
13628   */
13629  function unicodeWords(string) {
13630    return string.match(reUnicodeWord) || [];
13631  }
13632
13633  /*--------------------------------------------------------------------------*/
13634
13635  /**
13636   * Create a new pristine `lodash` function using the `context` object.
13637   *
13638   * @static
13639   * @memberOf _
13640   * @since 1.1.0
13641   * @category Util
13642   * @param {Object} [context=root] The context object.
13643   * @returns {Function} Returns a new `lodash` function.
13644   * @example
13645   *
13646   * _.mixin({ 'foo': _.constant('foo') });
13647   *
13648   * var lodash = _.runInContext();
13649   * lodash.mixin({ 'bar': lodash.constant('bar') });
13650   *
13651   * _.isFunction(_.foo);
13652   * // => true
13653   * _.isFunction(_.bar);
13654   * // => false
13655   *
13656   * lodash.isFunction(lodash.foo);
13657   * // => false
13658   * lodash.isFunction(lodash.bar);
13659   * // => true
13660   *
13661   * // Create a suped-up `defer` in Node.js.
13662   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
13663   */
13664  var runInContext = (function runInContext(context) {
13665    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
13666
13667    /** Built-in constructor references. */
13668    var Array = context.Array,
13669        Date = context.Date,
13670        Error = context.Error,
13671        Function = context.Function,
13672        Math = context.Math,
13673        Object = context.Object,
13674        RegExp = context.RegExp,
13675        String = context.String,
13676        TypeError = context.TypeError;
13677
13678    /** Used for built-in method references. */
13679    var arrayProto = Array.prototype,
13680        funcProto = Function.prototype,
13681        objectProto = Object.prototype;
13682
13683    /** Used to detect overreaching core-js shims. */
13684    var coreJsData = context['__core-js_shared__'];
13685
13686    /** Used to resolve the decompiled source of functions. */
13687    var funcToString = funcProto.toString;
13688
13689    /** Used to check objects for own properties. */
13690    var hasOwnProperty = objectProto.hasOwnProperty;
13691
13692    /** Used to generate unique IDs. */
13693    var idCounter = 0;
13694
13695    /** Used to detect methods masquerading as native. */
13696    var maskSrcKey = (function() {
13697      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
13698      return uid ? ('Symbol(src)_1.' + uid) : '';
13699    }());
13700
13701    /**
13702     * Used to resolve the
13703     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
13704     * of values.
13705     */
13706    var nativeObjectToString = objectProto.toString;
13707
13708    /** Used to infer the `Object` constructor. */
13709    var objectCtorString = funcToString.call(Object);
13710
13711    /** Used to restore the original `_` reference in `_.noConflict`. */
13712    var oldDash = root._;
13713
13714    /** Used to detect if a method is native. */
13715    var reIsNative = RegExp('^' +
13716      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
13717      .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
13718    );
13719
13720    /** Built-in value references. */
13721    var Buffer = moduleExports ? context.Buffer : undefined,
13722        Symbol = context.Symbol,
13723        Uint8Array = context.Uint8Array,
13724        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
13725        getPrototype = overArg(Object.getPrototypeOf, Object),
13726        objectCreate = Object.create,
13727        propertyIsEnumerable = objectProto.propertyIsEnumerable,
13728        splice = arrayProto.splice,
13729        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
13730        symIterator = Symbol ? Symbol.iterator : undefined,
13731        symToStringTag = Symbol ? Symbol.toStringTag : undefined;
13732
13733    var defineProperty = (function() {
13734      try {
13735        var func = getNative(Object, 'defineProperty');
13736        func({}, '', {});
13737        return func;
13738      } catch (e) {}
13739    }());
13740
13741    /** Mocked built-ins. */
13742    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
13743        ctxNow = Date && Date.now !== root.Date.now && Date.now,
13744        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
13745
13746    /* Built-in method references for those with the same name as other `lodash` methods. */
13747    var nativeCeil = Math.ceil,
13748        nativeFloor = Math.floor,
13749        nativeGetSymbols = Object.getOwnPropertySymbols,
13750        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
13751        nativeIsFinite = context.isFinite,
13752        nativeJoin = arrayProto.join,
13753        nativeKeys = overArg(Object.keys, Object),
13754        nativeMax = Math.max,
13755        nativeMin = Math.min,
13756        nativeNow = Date.now,
13757        nativeParseInt = context.parseInt,
13758        nativeRandom = Math.random,
13759        nativeReverse = arrayProto.reverse;
13760
13761    /* Built-in method references that are verified to be native. */
13762    var DataView = getNative(context, 'DataView'),
13763        Map = getNative(context, 'Map'),
13764        Promise = getNative(context, 'Promise'),
13765        Set = getNative(context, 'Set'),
13766        WeakMap = getNative(context, 'WeakMap'),
13767        nativeCreate = getNative(Object, 'create');
13768
13769    /** Used to store function metadata. */
13770    var metaMap = WeakMap && new WeakMap;
13771
13772    /** Used to lookup unminified function names. */
13773    var realNames = {};
13774
13775    /** Used to detect maps, sets, and weakmaps. */
13776    var dataViewCtorString = toSource(DataView),
13777        mapCtorString = toSource(Map),
13778        promiseCtorString = toSource(Promise),
13779        setCtorString = toSource(Set),
13780        weakMapCtorString = toSource(WeakMap);
13781
13782    /** Used to convert symbols to primitives and strings. */
13783    var symbolProto = Symbol ? Symbol.prototype : undefined,
13784        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
13785        symbolToString = symbolProto ? symbolProto.toString : undefined;
13786
13787    /*------------------------------------------------------------------------*/
13788
13789    /**
13790     * Creates a `lodash` object which wraps `value` to enable implicit method
13791     * chain sequences. Methods that operate on and return arrays, collections,
13792     * and functions can be chained together. Methods that retrieve a single value
13793     * or may return a primitive value will automatically end the chain sequence
13794     * and return the unwrapped value. Otherwise, the value must be unwrapped
13795     * with `_#value`.
13796     *
13797     * Explicit chain sequences, which must be unwrapped with `_#value`, may be
13798     * enabled using `_.chain`.
13799     *
13800     * The execution of chained methods is lazy, that is, it's deferred until
13801     * `_#value` is implicitly or explicitly called.
13802     *
13803     * Lazy evaluation allows several methods to support shortcut fusion.
13804     * Shortcut fusion is an optimization to merge iteratee calls; this avoids
13805     * the creation of intermediate arrays and can greatly reduce the number of
13806     * iteratee executions. Sections of a chain sequence qualify for shortcut
13807     * fusion if the section is applied to an array and iteratees accept only
13808     * one argument. The heuristic for whether a section qualifies for shortcut
13809     * fusion is subject to change.
13810     *
13811     * Chaining is supported in custom builds as long as the `_#value` method is
13812     * directly or indirectly included in the build.
13813     *
13814     * In addition to lodash methods, wrappers have `Array` and `String` methods.
13815     *
13816     * The wrapper `Array` methods are:
13817     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
13818     *
13819     * The wrapper `String` methods are:
13820     * `replace` and `split`
13821     *
13822     * The wrapper methods that support shortcut fusion are:
13823     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
13824     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
13825     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
13826     *
13827     * The chainable wrapper methods are:
13828     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
13829     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
13830     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
13831     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
13832     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
13833     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
13834     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
13835     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
13836     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
13837     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
13838     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
13839     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
13840     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
13841     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
13842     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
13843     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
13844     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
13845     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
13846     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
13847     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
13848     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
13849     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
13850     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
13851     * `zipObject`, `zipObjectDeep`, and `zipWith`
13852     *
13853     * The wrapper methods that are **not** chainable by default are:
13854     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
13855     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
13856     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
13857     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
13858     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
13859     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
13860     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
13861     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
13862     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
13863     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
13864     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
13865     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
13866     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
13867     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
13868     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
13869     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
13870     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
13871     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
13872     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
13873     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
13874     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
13875     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
13876     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
13877     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
13878     * `upperFirst`, `value`, and `words`
13879     *
13880     * @name _
13881     * @constructor
13882     * @category Seq
13883     * @param {*} value The value to wrap in a `lodash` instance.
13884     * @returns {Object} Returns the new `lodash` wrapper instance.
13885     * @example
13886     *
13887     * function square(n) {
13888     *   return n * n;
13889     * }
13890     *
13891     * var wrapped = _([1, 2, 3]);
13892     *
13893     * // Returns an unwrapped value.
13894     * wrapped.reduce(_.add);
13895     * // => 6
13896     *
13897     * // Returns a wrapped value.
13898     * var squares = wrapped.map(square);
13899     *
13900     * _.isArray(squares);
13901     * // => false
13902     *
13903     * _.isArray(squares.value());
13904     * // => true
13905     */
13906    function lodash(value) {
13907      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
13908        if (value instanceof LodashWrapper) {
13909          return value;
13910        }
13911        if (hasOwnProperty.call(value, '__wrapped__')) {
13912          return wrapperClone(value);
13913        }
13914      }
13915      return new LodashWrapper(value);
13916    }
13917
13918    /**
13919     * The base implementation of `_.create` without support for assigning
13920     * properties to the created object.
13921     *
13922     * @private
13923     * @param {Object} proto The object to inherit from.
13924     * @returns {Object} Returns the new object.
13925     */
13926    var baseCreate = (function() {
13927      function object() {}
13928      return function(proto) {
13929        if (!isObject(proto)) {
13930          return {};
13931        }
13932        if (objectCreate) {
13933          return objectCreate(proto);
13934        }
13935        object.prototype = proto;
13936        var result = new object;
13937        object.prototype = undefined;
13938        return result;
13939      };
13940    }());
13941
13942    /**
13943     * The function whose prototype chain sequence wrappers inherit from.
13944     *
13945     * @private
13946     */
13947    function baseLodash() {
13948      // No operation performed.
13949    }
13950
13951    /**
13952     * The base constructor for creating `lodash` wrapper objects.
13953     *
13954     * @private
13955     * @param {*} value The value to wrap.
13956     * @param {boolean} [chainAll] Enable explicit method chain sequences.
13957     */
13958    function LodashWrapper(value, chainAll) {
13959      this.__wrapped__ = value;
13960      this.__actions__ = [];
13961      this.__chain__ = !!chainAll;
13962      this.__index__ = 0;
13963      this.__values__ = undefined;
13964    }
13965
13966    /**
13967     * By default, the template delimiters used by lodash are like those in
13968     * embedded Ruby (ERB) as well as ES2015 template strings. Change the
13969     * following template settings to use alternative delimiters.
13970     *
13971     * @static
13972     * @memberOf _
13973     * @type {Object}
13974     */
13975    lodash.templateSettings = {
13976
13977      /**
13978       * Used to detect `data` property values to be HTML-escaped.
13979       *
13980       * @memberOf _.templateSettings
13981       * @type {RegExp}
13982       */
13983      'escape': reEscape,
13984
13985      /**
13986       * Used to detect code to be evaluated.
13987       *
13988       * @memberOf _.templateSettings
13989       * @type {RegExp}
13990       */
13991      'evaluate': reEvaluate,
13992
13993      /**
13994       * Used to detect `data` property values to inject.
13995       *
13996       * @memberOf _.templateSettings
13997       * @type {RegExp}
13998       */
13999      'interpolate': reInterpolate,
14000
14001      /**
14002       * Used to reference the data object in the template text.
14003       *
14004       * @memberOf _.templateSettings
14005       * @type {string}
14006       */
14007      'variable': '',
14008
14009      /**
14010       * Used to import variables into the compiled template.
14011       *
14012       * @memberOf _.templateSettings
14013       * @type {Object}
14014       */
14015      'imports': {
14016
14017        /**
14018         * A reference to the `lodash` function.
14019         *
14020         * @memberOf _.templateSettings.imports
14021         * @type {Function}
14022         */
14023        '_': lodash
14024      }
14025    };
14026
14027    // Ensure wrappers are instances of `baseLodash`.
14028    lodash.prototype = baseLodash.prototype;
14029    lodash.prototype.constructor = lodash;
14030
14031    LodashWrapper.prototype = baseCreate(baseLodash.prototype);
14032    LodashWrapper.prototype.constructor = LodashWrapper;
14033
14034    /*------------------------------------------------------------------------*/
14035
14036    /**
14037     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
14038     *
14039     * @private
14040     * @constructor
14041     * @param {*} value The value to wrap.
14042     */
14043    function LazyWrapper(value) {
14044      this.__wrapped__ = value;
14045      this.__actions__ = [];
14046      this.__dir__ = 1;
14047      this.__filtered__ = false;
14048      this.__iteratees__ = [];
14049      this.__takeCount__ = MAX_ARRAY_LENGTH;
14050      this.__views__ = [];
14051    }
14052
14053    /**
14054     * Creates a clone of the lazy wrapper object.
14055     *
14056     * @private
14057     * @name clone
14058     * @memberOf LazyWrapper
14059     * @returns {Object} Returns the cloned `LazyWrapper` object.
14060     */
14061    function lazyClone() {
14062      var result = new LazyWrapper(this.__wrapped__);
14063      result.__actions__ = copyArray(this.__actions__);
14064      result.__dir__ = this.__dir__;
14065      result.__filtered__ = this.__filtered__;
14066      result.__iteratees__ = copyArray(this.__iteratees__);
14067      result.__takeCount__ = this.__takeCount__;
14068      result.__views__ = copyArray(this.__views__);
14069      return result;
14070    }
14071
14072    /**
14073     * Reverses the direction of lazy iteration.
14074     *
14075     * @private
14076     * @name reverse
14077     * @memberOf LazyWrapper
14078     * @returns {Object} Returns the new reversed `LazyWrapper` object.
14079     */
14080    function lazyReverse() {
14081      if (this.__filtered__) {
14082        var result = new LazyWrapper(this);
14083        result.__dir__ = -1;
14084        result.__filtered__ = true;
14085      } else {
14086        result = this.clone();
14087        result.__dir__ *= -1;
14088      }
14089      return result;
14090    }
14091
14092    /**
14093     * Extracts the unwrapped value from its lazy wrapper.
14094     *
14095     * @private
14096     * @name value
14097     * @memberOf LazyWrapper
14098     * @returns {*} Returns the unwrapped value.
14099     */
14100    function lazyValue() {
14101      var array = this.__wrapped__.value(),
14102          dir = this.__dir__,
14103          isArr = isArray(array),
14104          isRight = dir < 0,
14105          arrLength = isArr ? array.length : 0,
14106          view = getView(0, arrLength, this.__views__),
14107          start = view.start,
14108          end = view.end,
14109          length = end - start,
14110          index = isRight ? end : (start - 1),
14111          iteratees = this.__iteratees__,
14112          iterLength = iteratees.length,
14113          resIndex = 0,
14114          takeCount = nativeMin(length, this.__takeCount__);
14115
14116      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
14117        return baseWrapperValue(array, this.__actions__);
14118      }
14119      var result = [];
14120
14121      outer:
14122      while (length-- && resIndex < takeCount) {
14123        index += dir;
14124
14125        var iterIndex = -1,
14126            value = array[index];
14127
14128        while (++iterIndex < iterLength) {
14129          var data = iteratees[iterIndex],
14130              iteratee = data.iteratee,
14131              type = data.type,
14132              computed = iteratee(value);
14133
14134          if (type == LAZY_MAP_FLAG) {
14135            value = computed;
14136          } else if (!computed) {
14137            if (type == LAZY_FILTER_FLAG) {
14138              continue outer;
14139            } else {
14140              break outer;
14141            }
14142          }
14143        }
14144        result[resIndex++] = value;
14145      }
14146      return result;
14147    }
14148
14149    // Ensure `LazyWrapper` is an instance of `baseLodash`.
14150    LazyWrapper.prototype = baseCreate(baseLodash.prototype);
14151    LazyWrapper.prototype.constructor = LazyWrapper;
14152
14153    /*------------------------------------------------------------------------*/
14154
14155    /**
14156     * Creates a hash object.
14157     *
14158     * @private
14159     * @constructor
14160     * @param {Array} [entries] The key-value pairs to cache.
14161     */
14162    function Hash(entries) {
14163      var index = -1,
14164          length = entries == null ? 0 : entries.length;
14165
14166      this.clear();
14167      while (++index < length) {
14168        var entry = entries[index];
14169        this.set(entry[0], entry[1]);
14170      }
14171    }
14172
14173    /**
14174     * Removes all key-value entries from the hash.
14175     *
14176     * @private
14177     * @name clear
14178     * @memberOf Hash
14179     */
14180    function hashClear() {
14181      this.__data__ = nativeCreate ? nativeCreate(null) : {};
14182      this.size = 0;
14183    }
14184
14185    /**
14186     * Removes `key` and its value from the hash.
14187     *
14188     * @private
14189     * @name delete
14190     * @memberOf Hash
14191     * @param {Object} hash The hash to modify.
14192     * @param {string} key The key of the value to remove.
14193     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
14194     */
14195    function hashDelete(key) {
14196      var result = this.has(key) && delete this.__data__[key];
14197      this.size -= result ? 1 : 0;
14198      return result;
14199    }
14200
14201    /**
14202     * Gets the hash value for `key`.
14203     *
14204     * @private
14205     * @name get
14206     * @memberOf Hash
14207     * @param {string} key The key of the value to get.
14208     * @returns {*} Returns the entry value.
14209     */
14210    function hashGet(key) {
14211      var data = this.__data__;
14212      if (nativeCreate) {
14213        var result = data[key];
14214        return result === HASH_UNDEFINED ? undefined : result;
14215      }
14216      return hasOwnProperty.call(data, key) ? data[key] : undefined;
14217    }
14218
14219    /**
14220     * Checks if a hash value for `key` exists.
14221     *
14222     * @private
14223     * @name has
14224     * @memberOf Hash
14225     * @param {string} key The key of the entry to check.
14226     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
14227     */
14228    function hashHas(key) {
14229      var data = this.__data__;
14230      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
14231    }
14232
14233    /**
14234     * Sets the hash `key` to `value`.
14235     *
14236     * @private
14237     * @name set
14238     * @memberOf Hash
14239     * @param {string} key The key of the value to set.
14240     * @param {*} value The value to set.
14241     * @returns {Object} Returns the hash instance.
14242     */
14243    function hashSet(key, value) {
14244      var data = this.__data__;
14245      this.size += this.has(key) ? 0 : 1;
14246      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
14247      return this;
14248    }
14249
14250    // Add methods to `Hash`.
14251    Hash.prototype.clear = hashClear;
14252    Hash.prototype['delete'] = hashDelete;
14253    Hash.prototype.get = hashGet;
14254    Hash.prototype.has = hashHas;
14255    Hash.prototype.set = hashSet;
14256
14257    /*------------------------------------------------------------------------*/
14258
14259    /**
14260     * Creates an list cache object.
14261     *
14262     * @private
14263     * @constructor
14264     * @param {Array} [entries] The key-value pairs to cache.
14265     */
14266    function ListCache(entries) {
14267      var index = -1,
14268          length = entries == null ? 0 : entries.length;
14269
14270      this.clear();
14271      while (++index < length) {
14272        var entry = entries[index];
14273        this.set(entry[0], entry[1]);
14274      }
14275    }
14276
14277    /**
14278     * Removes all key-value entries from the list cache.
14279     *
14280     * @private
14281     * @name clear
14282     * @memberOf ListCache
14283     */
14284    function listCacheClear() {
14285      this.__data__ = [];
14286      this.size = 0;
14287    }
14288
14289    /**
14290     * Removes `key` and its value from the list cache.
14291     *
14292     * @private
14293     * @name delete
14294     * @memberOf ListCache
14295     * @param {string} key The key of the value to remove.
14296     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
14297     */
14298    function listCacheDelete(key) {
14299      var data = this.__data__,
14300          index = assocIndexOf(data, key);
14301
14302      if (index < 0) {
14303        return false;
14304      }
14305      var lastIndex = data.length - 1;
14306      if (index == lastIndex) {
14307        data.pop();
14308      } else {
14309        splice.call(data, index, 1);
14310      }
14311      --this.size;
14312      return true;
14313    }
14314
14315    /**
14316     * Gets the list cache value for `key`.
14317     *
14318     * @private
14319     * @name get
14320     * @memberOf ListCache
14321     * @param {string} key The key of the value to get.
14322     * @returns {*} Returns the entry value.
14323     */
14324    function listCacheGet(key) {
14325      var data = this.__data__,
14326          index = assocIndexOf(data, key);
14327
14328      return index < 0 ? undefined : data[index][1];
14329    }
14330
14331    /**
14332     * Checks if a list cache value for `key` exists.
14333     *
14334     * @private
14335     * @name has
14336     * @memberOf ListCache
14337     * @param {string} key The key of the entry to check.
14338     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
14339     */
14340    function listCacheHas(key) {
14341      return assocIndexOf(this.__data__, key) > -1;
14342    }
14343
14344    /**
14345     * Sets the list cache `key` to `value`.
14346     *
14347     * @private
14348     * @name set
14349     * @memberOf ListCache
14350     * @param {string} key The key of the value to set.
14351     * @param {*} value The value to set.
14352     * @returns {Object} Returns the list cache instance.
14353     */
14354    function listCacheSet(key, value) {
14355      var data = this.__data__,
14356          index = assocIndexOf(data, key);
14357
14358      if (index < 0) {
14359        ++this.size;
14360        data.push([key, value]);
14361      } else {
14362        data[index][1] = value;
14363      }
14364      return this;
14365    }
14366
14367    // Add methods to `ListCache`.
14368    ListCache.prototype.clear = listCacheClear;
14369    ListCache.prototype['delete'] = listCacheDelete;
14370    ListCache.prototype.get = listCacheGet;
14371    ListCache.prototype.has = listCacheHas;
14372    ListCache.prototype.set = listCacheSet;
14373
14374    /*------------------------------------------------------------------------*/
14375
14376    /**
14377     * Creates a map cache object to store key-value pairs.
14378     *
14379     * @private
14380     * @constructor
14381     * @param {Array} [entries] The key-value pairs to cache.
14382     */
14383    function MapCache(entries) {
14384      var index = -1,
14385          length = entries == null ? 0 : entries.length;
14386
14387      this.clear();
14388      while (++index < length) {
14389        var entry = entries[index];
14390        this.set(entry[0], entry[1]);
14391      }
14392    }
14393
14394    /**
14395     * Removes all key-value entries from the map.
14396     *
14397     * @private
14398     * @name clear
14399     * @memberOf MapCache
14400     */
14401    function mapCacheClear() {
14402      this.size = 0;
14403      this.__data__ = {
14404        'hash': new Hash,
14405        'map': new (Map || ListCache),
14406        'string': new Hash
14407      };
14408    }
14409
14410    /**
14411     * Removes `key` and its value from the map.
14412     *
14413     * @private
14414     * @name delete
14415     * @memberOf MapCache
14416     * @param {string} key The key of the value to remove.
14417     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
14418     */
14419    function mapCacheDelete(key) {
14420      var result = getMapData(this, key)['delete'](key);
14421      this.size -= result ? 1 : 0;
14422      return result;
14423    }
14424
14425    /**
14426     * Gets the map value for `key`.
14427     *
14428     * @private
14429     * @name get
14430     * @memberOf MapCache
14431     * @param {string} key The key of the value to get.
14432     * @returns {*} Returns the entry value.
14433     */
14434    function mapCacheGet(key) {
14435      return getMapData(this, key).get(key);
14436    }
14437
14438    /**
14439     * Checks if a map value for `key` exists.
14440     *
14441     * @private
14442     * @name has
14443     * @memberOf MapCache
14444     * @param {string} key The key of the entry to check.
14445     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
14446     */
14447    function mapCacheHas(key) {
14448      return getMapData(this, key).has(key);
14449    }
14450
14451    /**
14452     * Sets the map `key` to `value`.
14453     *
14454     * @private
14455     * @name set
14456     * @memberOf MapCache
14457     * @param {string} key The key of the value to set.
14458     * @param {*} value The value to set.
14459     * @returns {Object} Returns the map cache instance.
14460     */
14461    function mapCacheSet(key, value) {
14462      var data = getMapData(this, key),
14463          size = data.size;
14464
14465      data.set(key, value);
14466      this.size += data.size == size ? 0 : 1;
14467      return this;
14468    }
14469
14470    // Add methods to `MapCache`.
14471    MapCache.prototype.clear = mapCacheClear;
14472    MapCache.prototype['delete'] = mapCacheDelete;
14473    MapCache.prototype.get = mapCacheGet;
14474    MapCache.prototype.has = mapCacheHas;
14475    MapCache.prototype.set = mapCacheSet;
14476
14477    /*------------------------------------------------------------------------*/
14478
14479    /**
14480     *
14481     * Creates an array cache object to store unique values.
14482     *
14483     * @private
14484     * @constructor
14485     * @param {Array} [values] The values to cache.
14486     */
14487    function SetCache(values) {
14488      var index = -1,
14489          length = values == null ? 0 : values.length;
14490
14491      this.__data__ = new MapCache;
14492      while (++index < length) {
14493        this.add(values[index]);
14494      }
14495    }
14496
14497    /**
14498     * Adds `value` to the array cache.
14499     *
14500     * @private
14501     * @name add
14502     * @memberOf SetCache
14503     * @alias push
14504     * @param {*} value The value to cache.
14505     * @returns {Object} Returns the cache instance.
14506     */
14507    function setCacheAdd(value) {
14508      this.__data__.set(value, HASH_UNDEFINED);
14509      return this;
14510    }
14511
14512    /**
14513     * Checks if `value` is in the array cache.
14514     *
14515     * @private
14516     * @name has
14517     * @memberOf SetCache
14518     * @param {*} value The value to search for.
14519     * @returns {number} Returns `true` if `value` is found, else `false`.
14520     */
14521    function setCacheHas(value) {
14522      return this.__data__.has(value);
14523    }
14524
14525    // Add methods to `SetCache`.
14526    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
14527    SetCache.prototype.has = setCacheHas;
14528
14529    /*------------------------------------------------------------------------*/
14530
14531    /**
14532     * Creates a stack cache object to store key-value pairs.
14533     *
14534     * @private
14535     * @constructor
14536     * @param {Array} [entries] The key-value pairs to cache.
14537     */
14538    function Stack(entries) {
14539      var data = this.__data__ = new ListCache(entries);
14540      this.size = data.size;
14541    }
14542
14543    /**
14544     * Removes all key-value entries from the stack.
14545     *
14546     * @private
14547     * @name clear
14548     * @memberOf Stack
14549     */
14550    function stackClear() {
14551      this.__data__ = new ListCache;
14552      this.size = 0;
14553    }
14554
14555    /**
14556     * Removes `key` and its value from the stack.
14557     *
14558     * @private
14559     * @name delete
14560     * @memberOf Stack
14561     * @param {string} key The key of the value to remove.
14562     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
14563     */
14564    function stackDelete(key) {
14565      var data = this.__data__,
14566          result = data['delete'](key);
14567
14568      this.size = data.size;
14569      return result;
14570    }
14571
14572    /**
14573     * Gets the stack value for `key`.
14574     *
14575     * @private
14576     * @name get
14577     * @memberOf Stack
14578     * @param {string} key The key of the value to get.
14579     * @returns {*} Returns the entry value.
14580     */
14581    function stackGet(key) {
14582      return this.__data__.get(key);
14583    }
14584
14585    /**
14586     * Checks if a stack value for `key` exists.
14587     *
14588     * @private
14589     * @name has
14590     * @memberOf Stack
14591     * @param {string} key The key of the entry to check.
14592     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
14593     */
14594    function stackHas(key) {
14595      return this.__data__.has(key);
14596    }
14597
14598    /**
14599     * Sets the stack `key` to `value`.
14600     *
14601     * @private
14602     * @name set
14603     * @memberOf Stack
14604     * @param {string} key The key of the value to set.
14605     * @param {*} value The value to set.
14606     * @returns {Object} Returns the stack cache instance.
14607     */
14608    function stackSet(key, value) {
14609      var data = this.__data__;
14610      if (data instanceof ListCache) {
14611        var pairs = data.__data__;
14612        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
14613          pairs.push([key, value]);
14614          this.size = ++data.size;
14615          return this;
14616        }
14617        data = this.__data__ = new MapCache(pairs);
14618      }
14619      data.set(key, value);
14620      this.size = data.size;
14621      return this;
14622    }
14623
14624    // Add methods to `Stack`.
14625    Stack.prototype.clear = stackClear;
14626    Stack.prototype['delete'] = stackDelete;
14627    Stack.prototype.get = stackGet;
14628    Stack.prototype.has = stackHas;
14629    Stack.prototype.set = stackSet;
14630
14631    /*------------------------------------------------------------------------*/
14632
14633    /**
14634     * Creates an array of the enumerable property names of the array-like `value`.
14635     *
14636     * @private
14637     * @param {*} value The value to query.
14638     * @param {boolean} inherited Specify returning inherited property names.
14639     * @returns {Array} Returns the array of property names.
14640     */
14641    function arrayLikeKeys(value, inherited) {
14642      var isArr = isArray(value),
14643          isArg = !isArr && isArguments(value),
14644          isBuff = !isArr && !isArg && isBuffer(value),
14645          isType = !isArr && !isArg && !isBuff && isTypedArray(value),
14646          skipIndexes = isArr || isArg || isBuff || isType,
14647          result = skipIndexes ? baseTimes(value.length, String) : [],
14648          length = result.length;
14649
14650      for (var key in value) {
14651        if ((inherited || hasOwnProperty.call(value, key)) &&
14652            !(skipIndexes && (
14653               // Safari 9 has enumerable `arguments.length` in strict mode.
14654               key == 'length' ||
14655               // Node.js 0.10 has enumerable non-index properties on buffers.
14656               (isBuff && (key == 'offset' || key == 'parent')) ||
14657               // PhantomJS 2 has enumerable non-index properties on typed arrays.
14658               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
14659               // Skip index properties.
14660               isIndex(key, length)
14661            ))) {
14662          result.push(key);
14663        }
14664      }
14665      return result;
14666    }
14667
14668    /**
14669     * A specialized version of `_.sample` for arrays.
14670     *
14671     * @private
14672     * @param {Array} array The array to sample.
14673     * @returns {*} Returns the random element.
14674     */
14675    function arraySample(array) {
14676      var length = array.length;
14677      return length ? array[baseRandom(0, length - 1)] : undefined;
14678    }
14679
14680    /**
14681     * A specialized version of `_.sampleSize` for arrays.
14682     *
14683     * @private
14684     * @param {Array} array The array to sample.
14685     * @param {number} n The number of elements to sample.
14686     * @returns {Array} Returns the random elements.
14687     */
14688    function arraySampleSize(array, n) {
14689      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
14690    }
14691
14692    /**
14693     * A specialized version of `_.shuffle` for arrays.
14694     *
14695     * @private
14696     * @param {Array} array The array to shuffle.
14697     * @returns {Array} Returns the new shuffled array.
14698     */
14699    function arrayShuffle(array) {
14700      return shuffleSelf(copyArray(array));
14701    }
14702
14703    /**
14704     * This function is like `assignValue` except that it doesn't assign
14705     * `undefined` values.
14706     *
14707     * @private
14708     * @param {Object} object The object to modify.
14709     * @param {string} key The key of the property to assign.
14710     * @param {*} value The value to assign.
14711     */
14712    function assignMergeValue(object, key, value) {
14713      if ((value !== undefined && !eq(object[key], value)) ||
14714          (value === undefined && !(key in object))) {
14715        baseAssignValue(object, key, value);
14716      }
14717    }
14718
14719    /**
14720     * Assigns `value` to `key` of `object` if the existing value is not equivalent
14721     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
14722     * for equality comparisons.
14723     *
14724     * @private
14725     * @param {Object} object The object to modify.
14726     * @param {string} key The key of the property to assign.
14727     * @param {*} value The value to assign.
14728     */
14729    function assignValue(object, key, value) {
14730      var objValue = object[key];
14731      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
14732          (value === undefined && !(key in object))) {
14733        baseAssignValue(object, key, value);
14734      }
14735    }
14736
14737    /**
14738     * Gets the index at which the `key` is found in `array` of key-value pairs.
14739     *
14740     * @private
14741     * @param {Array} array The array to inspect.
14742     * @param {*} key The key to search for.
14743     * @returns {number} Returns the index of the matched value, else `-1`.
14744     */
14745    function assocIndexOf(array, key) {
14746      var length = array.length;
14747      while (length--) {
14748        if (eq(array[length][0], key)) {
14749          return length;
14750        }
14751      }
14752      return -1;
14753    }
14754
14755    /**
14756     * Aggregates elements of `collection` on `accumulator` with keys transformed
14757     * by `iteratee` and values set by `setter`.
14758     *
14759     * @private
14760     * @param {Array|Object} collection The collection to iterate over.
14761     * @param {Function} setter The function to set `accumulator` values.
14762     * @param {Function} iteratee The iteratee to transform keys.
14763     * @param {Object} accumulator The initial aggregated object.
14764     * @returns {Function} Returns `accumulator`.
14765     */
14766    function baseAggregator(collection, setter, iteratee, accumulator) {
14767      baseEach(collection, function(value, key, collection) {
14768        setter(accumulator, value, iteratee(value), collection);
14769      });
14770      return accumulator;
14771    }
14772
14773    /**
14774     * The base implementation of `_.assign` without support for multiple sources
14775     * or `customizer` functions.
14776     *
14777     * @private
14778     * @param {Object} object The destination object.
14779     * @param {Object} source The source object.
14780     * @returns {Object} Returns `object`.
14781     */
14782    function baseAssign(object, source) {
14783      return object && copyObject(source, keys(source), object);
14784    }
14785
14786    /**
14787     * The base implementation of `_.assignIn` without support for multiple sources
14788     * or `customizer` functions.
14789     *
14790     * @private
14791     * @param {Object} object The destination object.
14792     * @param {Object} source The source object.
14793     * @returns {Object} Returns `object`.
14794     */
14795    function baseAssignIn(object, source) {
14796      return object && copyObject(source, keysIn(source), object);
14797    }
14798
14799    /**
14800     * The base implementation of `assignValue` and `assignMergeValue` without
14801     * value checks.
14802     *
14803     * @private
14804     * @param {Object} object The object to modify.
14805     * @param {string} key The key of the property to assign.
14806     * @param {*} value The value to assign.
14807     */
14808    function baseAssignValue(object, key, value) {
14809      if (key == '__proto__' && defineProperty) {
14810        defineProperty(object, key, {
14811          'configurable': true,
14812          'enumerable': true,
14813          'value': value,
14814          'writable': true
14815        });
14816      } else {
14817        object[key] = value;
14818      }
14819    }
14820
14821    /**
14822     * The base implementation of `_.at` without support for individual paths.
14823     *
14824     * @private
14825     * @param {Object} object The object to iterate over.
14826     * @param {string[]} paths The property paths to pick.
14827     * @returns {Array} Returns the picked elements.
14828     */
14829    function baseAt(object, paths) {
14830      var index = -1,
14831          length = paths.length,
14832          result = Array(length),
14833          skip = object == null;
14834
14835      while (++index < length) {
14836        result[index] = skip ? undefined : get(object, paths[index]);
14837      }
14838      return result;
14839    }
14840
14841    /**
14842     * The base implementation of `_.clamp` which doesn't coerce arguments.
14843     *
14844     * @private
14845     * @param {number} number The number to clamp.
14846     * @param {number} [lower] The lower bound.
14847     * @param {number} upper The upper bound.
14848     * @returns {number} Returns the clamped number.
14849     */
14850    function baseClamp(number, lower, upper) {
14851      if (number === number) {
14852        if (upper !== undefined) {
14853          number = number <= upper ? number : upper;
14854        }
14855        if (lower !== undefined) {
14856          number = number >= lower ? number : lower;
14857        }
14858      }
14859      return number;
14860    }
14861
14862    /**
14863     * The base implementation of `_.clone` and `_.cloneDeep` which tracks
14864     * traversed objects.
14865     *
14866     * @private
14867     * @param {*} value The value to clone.
14868     * @param {boolean} bitmask The bitmask flags.
14869     *  1 - Deep clone
14870     *  2 - Flatten inherited properties
14871     *  4 - Clone symbols
14872     * @param {Function} [customizer] The function to customize cloning.
14873     * @param {string} [key] The key of `value`.
14874     * @param {Object} [object] The parent object of `value`.
14875     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
14876     * @returns {*} Returns the cloned value.
14877     */
14878    function baseClone(value, bitmask, customizer, key, object, stack) {
14879      var result,
14880          isDeep = bitmask & CLONE_DEEP_FLAG,
14881          isFlat = bitmask & CLONE_FLAT_FLAG,
14882          isFull = bitmask & CLONE_SYMBOLS_FLAG;
14883
14884      if (customizer) {
14885        result = object ? customizer(value, key, object, stack) : customizer(value);
14886      }
14887      if (result !== undefined) {
14888        return result;
14889      }
14890      if (!isObject(value)) {
14891        return value;
14892      }
14893      var isArr = isArray(value);
14894      if (isArr) {
14895        result = initCloneArray(value);
14896        if (!isDeep) {
14897          return copyArray(value, result);
14898        }
14899      } else {
14900        var tag = getTag(value),
14901            isFunc = tag == funcTag || tag == genTag;
14902
14903        if (isBuffer(value)) {
14904          return cloneBuffer(value, isDeep);
14905        }
14906        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
14907          result = (isFlat || isFunc) ? {} : initCloneObject(value);
14908          if (!isDeep) {
14909            return isFlat
14910              ? copySymbolsIn(value, baseAssignIn(result, value))
14911              : copySymbols(value, baseAssign(result, value));
14912          }
14913        } else {
14914          if (!cloneableTags[tag]) {
14915            return object ? value : {};
14916          }
14917          result = initCloneByTag(value, tag, isDeep);
14918        }
14919      }
14920      // Check for circular references and return its corresponding clone.
14921      stack || (stack = new Stack);
14922      var stacked = stack.get(value);
14923      if (stacked) {
14924        return stacked;
14925      }
14926      stack.set(value, result);
14927
14928      if (isSet(value)) {
14929        value.forEach(function(subValue) {
14930          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
14931        });
14932      } else if (isMap(value)) {
14933        value.forEach(function(subValue, key) {
14934          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
14935        });
14936      }
14937
14938      var keysFunc = isFull
14939        ? (isFlat ? getAllKeysIn : getAllKeys)
14940        : (isFlat ? keysIn : keys);
14941
14942      var props = isArr ? undefined : keysFunc(value);
14943      arrayEach(props || value, function(subValue, key) {
14944        if (props) {
14945          key = subValue;
14946          subValue = value[key];
14947        }
14948        // Recursively populate clone (susceptible to call stack limits).
14949        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
14950      });
14951      return result;
14952    }
14953
14954    /**
14955     * The base implementation of `_.conforms` which doesn't clone `source`.
14956     *
14957     * @private
14958     * @param {Object} source The object of property predicates to conform to.
14959     * @returns {Function} Returns the new spec function.
14960     */
14961    function baseConforms(source) {
14962      var props = keys(source);
14963      return function(object) {
14964        return baseConformsTo(object, source, props);
14965      };
14966    }
14967
14968    /**
14969     * The base implementation of `_.conformsTo` which accepts `props` to check.
14970     *
14971     * @private
14972     * @param {Object} object The object to inspect.
14973     * @param {Object} source The object of property predicates to conform to.
14974     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
14975     */
14976    function baseConformsTo(object, source, props) {
14977      var length = props.length;
14978      if (object == null) {
14979        return !length;
14980      }
14981      object = Object(object);
14982      while (length--) {
14983        var key = props[length],
14984            predicate = source[key],
14985            value = object[key];
14986
14987        if ((value === undefined && !(key in object)) || !predicate(value)) {
14988          return false;
14989        }
14990      }
14991      return true;
14992    }
14993
14994    /**
14995     * The base implementation of `_.delay` and `_.defer` which accepts `args`
14996     * to provide to `func`.
14997     *
14998     * @private
14999     * @param {Function} func The function to delay.
15000     * @param {number} wait The number of milliseconds to delay invocation.
15001     * @param {Array} args The arguments to provide to `func`.
15002     * @returns {number|Object} Returns the timer id or timeout object.
15003     */
15004    function baseDelay(func, wait, args) {
15005      if (typeof func != 'function') {
15006        throw new TypeError(FUNC_ERROR_TEXT);
15007      }
15008      return setTimeout(function() { func.apply(undefined, args); }, wait);
15009    }
15010
15011    /**
15012     * The base implementation of methods like `_.difference` without support
15013     * for excluding multiple arrays or iteratee shorthands.
15014     *
15015     * @private
15016     * @param {Array} array The array to inspect.
15017     * @param {Array} values The values to exclude.
15018     * @param {Function} [iteratee] The iteratee invoked per element.
15019     * @param {Function} [comparator] The comparator invoked per element.
15020     * @returns {Array} Returns the new array of filtered values.
15021     */
15022    function baseDifference(array, values, iteratee, comparator) {
15023      var index = -1,
15024          includes = arrayIncludes,
15025          isCommon = true,
15026          length = array.length,
15027          result = [],
15028          valuesLength = values.length;
15029
15030      if (!length) {
15031        return result;
15032      }
15033      if (iteratee) {
15034        values = arrayMap(values, baseUnary(iteratee));
15035      }
15036      if (comparator) {
15037        includes = arrayIncludesWith;
15038        isCommon = false;
15039      }
15040      else if (values.length >= LARGE_ARRAY_SIZE) {
15041        includes = cacheHas;
15042        isCommon = false;
15043        values = new SetCache(values);
15044      }
15045      outer:
15046      while (++index < length) {
15047        var value = array[index],
15048            computed = iteratee == null ? value : iteratee(value);
15049
15050        value = (comparator || value !== 0) ? value : 0;
15051        if (isCommon && computed === computed) {
15052          var valuesIndex = valuesLength;
15053          while (valuesIndex--) {
15054            if (values[valuesIndex] === computed) {
15055              continue outer;
15056            }
15057          }
15058          result.push(value);
15059        }
15060        else if (!includes(values, computed, comparator)) {
15061          result.push(value);
15062        }
15063      }
15064      return result;
15065    }
15066
15067    /**
15068     * The base implementation of `_.forEach` without support for iteratee shorthands.
15069     *
15070     * @private
15071     * @param {Array|Object} collection The collection to iterate over.
15072     * @param {Function} iteratee The function invoked per iteration.
15073     * @returns {Array|Object} Returns `collection`.
15074     */
15075    var baseEach = createBaseEach(baseForOwn);
15076
15077    /**
15078     * The base implementation of `_.forEachRight` without support for iteratee shorthands.
15079     *
15080     * @private
15081     * @param {Array|Object} collection The collection to iterate over.
15082     * @param {Function} iteratee The function invoked per iteration.
15083     * @returns {Array|Object} Returns `collection`.
15084     */
15085    var baseEachRight = createBaseEach(baseForOwnRight, true);
15086
15087    /**
15088     * The base implementation of `_.every` without support for iteratee shorthands.
15089     *
15090     * @private
15091     * @param {Array|Object} collection The collection to iterate over.
15092     * @param {Function} predicate The function invoked per iteration.
15093     * @returns {boolean} Returns `true` if all elements pass the predicate check,
15094     *  else `false`
15095     */
15096    function baseEvery(collection, predicate) {
15097      var result = true;
15098      baseEach(collection, function(value, index, collection) {
15099        result = !!predicate(value, index, collection);
15100        return result;
15101      });
15102      return result;
15103    }
15104
15105    /**
15106     * The base implementation of methods like `_.max` and `_.min` which accepts a
15107     * `comparator` to determine the extremum value.
15108     *
15109     * @private
15110     * @param {Array} array The array to iterate over.
15111     * @param {Function} iteratee The iteratee invoked per iteration.
15112     * @param {Function} comparator The comparator used to compare values.
15113     * @returns {*} Returns the extremum value.
15114     */
15115    function baseExtremum(array, iteratee, comparator) {
15116      var index = -1,
15117          length = array.length;
15118
15119      while (++index < length) {
15120        var value = array[index],
15121            current = iteratee(value);
15122
15123        if (current != null && (computed === undefined
15124              ? (current === current && !isSymbol(current))
15125              : comparator(current, computed)
15126            )) {
15127          var computed = current,
15128              result = value;
15129        }
15130      }
15131      return result;
15132    }
15133
15134    /**
15135     * The base implementation of `_.fill` without an iteratee call guard.
15136     *
15137     * @private
15138     * @param {Array} array The array to fill.
15139     * @param {*} value The value to fill `array` with.
15140     * @param {number} [start=0] The start position.
15141     * @param {number} [end=array.length] The end position.
15142     * @returns {Array} Returns `array`.
15143     */
15144    function baseFill(array, value, start, end) {
15145      var length = array.length;
15146
15147      start = toInteger(start);
15148      if (start < 0) {
15149        start = -start > length ? 0 : (length + start);
15150      }
15151      end = (end === undefined || end > length) ? length : toInteger(end);
15152      if (end < 0) {
15153        end += length;
15154      }
15155      end = start > end ? 0 : toLength(end);
15156      while (start < end) {
15157        array[start++] = value;
15158      }
15159      return array;
15160    }
15161
15162    /**
15163     * The base implementation of `_.filter` without support for iteratee shorthands.
15164     *
15165     * @private
15166     * @param {Array|Object} collection The collection to iterate over.
15167     * @param {Function} predicate The function invoked per iteration.
15168     * @returns {Array} Returns the new filtered array.
15169     */
15170    function baseFilter(collection, predicate) {
15171      var result = [];
15172      baseEach(collection, function(value, index, collection) {
15173        if (predicate(value, index, collection)) {
15174          result.push(value);
15175        }
15176      });
15177      return result;
15178    }
15179
15180    /**
15181     * The base implementation of `_.flatten` with support for restricting flattening.
15182     *
15183     * @private
15184     * @param {Array} array The array to flatten.
15185     * @param {number} depth The maximum recursion depth.
15186     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
15187     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
15188     * @param {Array} [result=[]] The initial result value.
15189     * @returns {Array} Returns the new flattened array.
15190     */
15191    function baseFlatten(array, depth, predicate, isStrict, result) {
15192      var index = -1,
15193          length = array.length;
15194
15195      predicate || (predicate = isFlattenable);
15196      result || (result = []);
15197
15198      while (++index < length) {
15199        var value = array[index];
15200        if (depth > 0 && predicate(value)) {
15201          if (depth > 1) {
15202            // Recursively flatten arrays (susceptible to call stack limits).
15203            baseFlatten(value, depth - 1, predicate, isStrict, result);
15204          } else {
15205            arrayPush(result, value);
15206          }
15207        } else if (!isStrict) {
15208          result[result.length] = value;
15209        }
15210      }
15211      return result;
15212    }
15213
15214    /**
15215     * The base implementation of `baseForOwn` which iterates over `object`
15216     * properties returned by `keysFunc` and invokes `iteratee` for each property.
15217     * Iteratee functions may exit iteration early by explicitly returning `false`.
15218     *
15219     * @private
15220     * @param {Object} object The object to iterate over.
15221     * @param {Function} iteratee The function invoked per iteration.
15222     * @param {Function} keysFunc The function to get the keys of `object`.
15223     * @returns {Object} Returns `object`.
15224     */
15225    var baseFor = createBaseFor();
15226
15227    /**
15228     * This function is like `baseFor` except that it iterates over properties
15229     * in the opposite order.
15230     *
15231     * @private
15232     * @param {Object} object The object to iterate over.
15233     * @param {Function} iteratee The function invoked per iteration.
15234     * @param {Function} keysFunc The function to get the keys of `object`.
15235     * @returns {Object} Returns `object`.
15236     */
15237    var baseForRight = createBaseFor(true);
15238
15239    /**
15240     * The base implementation of `_.forOwn` without support for iteratee shorthands.
15241     *
15242     * @private
15243     * @param {Object} object The object to iterate over.
15244     * @param {Function} iteratee The function invoked per iteration.
15245     * @returns {Object} Returns `object`.
15246     */
15247    function baseForOwn(object, iteratee) {
15248      return object && baseFor(object, iteratee, keys);
15249    }
15250
15251    /**
15252     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
15253     *
15254     * @private
15255     * @param {Object} object The object to iterate over.
15256     * @param {Function} iteratee The function invoked per iteration.
15257     * @returns {Object} Returns `object`.
15258     */
15259    function baseForOwnRight(object, iteratee) {
15260      return object && baseForRight(object, iteratee, keys);
15261    }
15262
15263    /**
15264     * The base implementation of `_.functions` which creates an array of
15265     * `object` function property names filtered from `props`.
15266     *
15267     * @private
15268     * @param {Object} object The object to inspect.
15269     * @param {Array} props The property names to filter.
15270     * @returns {Array} Returns the function names.
15271     */
15272    function baseFunctions(object, props) {
15273      return arrayFilter(props, function(key) {
15274        return isFunction(object[key]);
15275      });
15276    }
15277
15278    /**
15279     * The base implementation of `_.get` without support for default values.
15280     *
15281     * @private
15282     * @param {Object} object The object to query.
15283     * @param {Array|string} path The path of the property to get.
15284     * @returns {*} Returns the resolved value.
15285     */
15286    function baseGet(object, path) {
15287      path = castPath(path, object);
15288
15289      var index = 0,
15290          length = path.length;
15291
15292      while (object != null && index < length) {
15293        object = object[toKey(path[index++])];
15294      }
15295      return (index && index == length) ? object : undefined;
15296    }
15297
15298    /**
15299     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
15300     * `keysFunc` and `symbolsFunc` to get the enumerable property names and
15301     * symbols of `object`.
15302     *
15303     * @private
15304     * @param {Object} object The object to query.
15305     * @param {Function} keysFunc The function to get the keys of `object`.
15306     * @param {Function} symbolsFunc The function to get the symbols of `object`.
15307     * @returns {Array} Returns the array of property names and symbols.
15308     */
15309    function baseGetAllKeys(object, keysFunc, symbolsFunc) {
15310      var result = keysFunc(object);
15311      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
15312    }
15313
15314    /**
15315     * The base implementation of `getTag` without fallbacks for buggy environments.
15316     *
15317     * @private
15318     * @param {*} value The value to query.
15319     * @returns {string} Returns the `toStringTag`.
15320     */
15321    function baseGetTag(value) {
15322      if (value == null) {
15323        return value === undefined ? undefinedTag : nullTag;
15324      }
15325      return (symToStringTag && symToStringTag in Object(value))
15326        ? getRawTag(value)
15327        : objectToString(value);
15328    }
15329
15330    /**
15331     * The base implementation of `_.gt` which doesn't coerce arguments.
15332     *
15333     * @private
15334     * @param {*} value The value to compare.
15335     * @param {*} other The other value to compare.
15336     * @returns {boolean} Returns `true` if `value` is greater than `other`,
15337     *  else `false`.
15338     */
15339    function baseGt(value, other) {
15340      return value > other;
15341    }
15342
15343    /**
15344     * The base implementation of `_.has` without support for deep paths.
15345     *
15346     * @private
15347     * @param {Object} [object] The object to query.
15348     * @param {Array|string} key The key to check.
15349     * @returns {boolean} Returns `true` if `key` exists, else `false`.
15350     */
15351    function baseHas(object, key) {
15352      return object != null && hasOwnProperty.call(object, key);
15353    }
15354
15355    /**
15356     * The base implementation of `_.hasIn` without support for deep paths.
15357     *
15358     * @private
15359     * @param {Object} [object] The object to query.
15360     * @param {Array|string} key The key to check.
15361     * @returns {boolean} Returns `true` if `key` exists, else `false`.
15362     */
15363    function baseHasIn(object, key) {
15364      return object != null && key in Object(object);
15365    }
15366
15367    /**
15368     * The base implementation of `_.inRange` which doesn't coerce arguments.
15369     *
15370     * @private
15371     * @param {number} number The number to check.
15372     * @param {number} start The start of the range.
15373     * @param {number} end The end of the range.
15374     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
15375     */
15376    function baseInRange(number, start, end) {
15377      return number >= nativeMin(start, end) && number < nativeMax(start, end);
15378    }
15379
15380    /**
15381     * The base implementation of methods like `_.intersection`, without support
15382     * for iteratee shorthands, that accepts an array of arrays to inspect.
15383     *
15384     * @private
15385     * @param {Array} arrays The arrays to inspect.
15386     * @param {Function} [iteratee] The iteratee invoked per element.
15387     * @param {Function} [comparator] The comparator invoked per element.
15388     * @returns {Array} Returns the new array of shared values.
15389     */
15390    function baseIntersection(arrays, iteratee, comparator) {
15391      var includes = comparator ? arrayIncludesWith : arrayIncludes,
15392          length = arrays[0].length,
15393          othLength = arrays.length,
15394          othIndex = othLength,
15395          caches = Array(othLength),
15396          maxLength = Infinity,
15397          result = [];
15398
15399      while (othIndex--) {
15400        var array = arrays[othIndex];
15401        if (othIndex && iteratee) {
15402          array = arrayMap(array, baseUnary(iteratee));
15403        }
15404        maxLength = nativeMin(array.length, maxLength);
15405        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
15406          ? new SetCache(othIndex && array)
15407          : undefined;
15408      }
15409      array = arrays[0];
15410
15411      var index = -1,
15412          seen = caches[0];
15413
15414      outer:
15415      while (++index < length && result.length < maxLength) {
15416        var value = array[index],
15417            computed = iteratee ? iteratee(value) : value;
15418
15419        value = (comparator || value !== 0) ? value : 0;
15420        if (!(seen
15421              ? cacheHas(seen, computed)
15422              : includes(result, computed, comparator)
15423            )) {
15424          othIndex = othLength;
15425          while (--othIndex) {
15426            var cache = caches[othIndex];
15427            if (!(cache
15428                  ? cacheHas(cache, computed)
15429                  : includes(arrays[othIndex], computed, comparator))
15430                ) {
15431              continue outer;
15432            }
15433          }
15434          if (seen) {
15435            seen.push(computed);
15436          }
15437          result.push(value);
15438        }
15439      }
15440      return result;
15441    }
15442
15443    /**
15444     * The base implementation of `_.invert` and `_.invertBy` which inverts
15445     * `object` with values transformed by `iteratee` and set by `setter`.
15446     *
15447     * @private
15448     * @param {Object} object The object to iterate over.
15449     * @param {Function} setter The function to set `accumulator` values.
15450     * @param {Function} iteratee The iteratee to transform values.
15451     * @param {Object} accumulator The initial inverted object.
15452     * @returns {Function} Returns `accumulator`.
15453     */
15454    function baseInverter(object, setter, iteratee, accumulator) {
15455      baseForOwn(object, function(value, key, object) {
15456        setter(accumulator, iteratee(value), key, object);
15457      });
15458      return accumulator;
15459    }
15460
15461    /**
15462     * The base implementation of `_.invoke` without support for individual
15463     * method arguments.
15464     *
15465     * @private
15466     * @param {Object} object The object to query.
15467     * @param {Array|string} path The path of the method to invoke.
15468     * @param {Array} args The arguments to invoke the method with.
15469     * @returns {*} Returns the result of the invoked method.
15470     */
15471    function baseInvoke(object, path, args) {
15472      path = castPath(path, object);
15473      object = parent(object, path);
15474      var func = object == null ? object : object[toKey(last(path))];
15475      return func == null ? undefined : apply(func, object, args);
15476    }
15477
15478    /**
15479     * The base implementation of `_.isArguments`.
15480     *
15481     * @private
15482     * @param {*} value The value to check.
15483     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
15484     */
15485    function baseIsArguments(value) {
15486      return isObjectLike(value) && baseGetTag(value) == argsTag;
15487    }
15488
15489    /**
15490     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
15491     *
15492     * @private
15493     * @param {*} value The value to check.
15494     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
15495     */
15496    function baseIsArrayBuffer(value) {
15497      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
15498    }
15499
15500    /**
15501     * The base implementation of `_.isDate` without Node.js optimizations.
15502     *
15503     * @private
15504     * @param {*} value The value to check.
15505     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
15506     */
15507    function baseIsDate(value) {
15508      return isObjectLike(value) && baseGetTag(value) == dateTag;
15509    }
15510
15511    /**
15512     * The base implementation of `_.isEqual` which supports partial comparisons
15513     * and tracks traversed objects.
15514     *
15515     * @private
15516     * @param {*} value The value to compare.
15517     * @param {*} other The other value to compare.
15518     * @param {boolean} bitmask The bitmask flags.
15519     *  1 - Unordered comparison
15520     *  2 - Partial comparison
15521     * @param {Function} [customizer] The function to customize comparisons.
15522     * @param {Object} [stack] Tracks traversed `value` and `other` objects.
15523     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
15524     */
15525    function baseIsEqual(value, other, bitmask, customizer, stack) {
15526      if (value === other) {
15527        return true;
15528      }
15529      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
15530        return value !== value && other !== other;
15531      }
15532      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
15533    }
15534
15535    /**
15536     * A specialized version of `baseIsEqual` for arrays and objects which performs
15537     * deep comparisons and tracks traversed objects enabling objects with circular
15538     * references to be compared.
15539     *
15540     * @private
15541     * @param {Object} object The object to compare.
15542     * @param {Object} other The other object to compare.
15543     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
15544     * @param {Function} customizer The function to customize comparisons.
15545     * @param {Function} equalFunc The function to determine equivalents of values.
15546     * @param {Object} [stack] Tracks traversed `object` and `other` objects.
15547     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
15548     */
15549    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
15550      var objIsArr = isArray(object),
15551          othIsArr = isArray(other),
15552          objTag = objIsArr ? arrayTag : getTag(object),
15553          othTag = othIsArr ? arrayTag : getTag(other);
15554
15555      objTag = objTag == argsTag ? objectTag : objTag;
15556      othTag = othTag == argsTag ? objectTag : othTag;
15557
15558      var objIsObj = objTag == objectTag,
15559          othIsObj = othTag == objectTag,
15560          isSameTag = objTag == othTag;
15561
15562      if (isSameTag && isBuffer(object)) {
15563        if (!isBuffer(other)) {
15564          return false;
15565        }
15566        objIsArr = true;
15567        objIsObj = false;
15568      }
15569      if (isSameTag && !objIsObj) {
15570        stack || (stack = new Stack);
15571        return (objIsArr || isTypedArray(object))
15572          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
15573          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
15574      }
15575      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
15576        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
15577            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
15578
15579        if (objIsWrapped || othIsWrapped) {
15580          var objUnwrapped = objIsWrapped ? object.value() : object,
15581              othUnwrapped = othIsWrapped ? other.value() : other;
15582
15583          stack || (stack = new Stack);
15584          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
15585        }
15586      }
15587      if (!isSameTag) {
15588        return false;
15589      }
15590      stack || (stack = new Stack);
15591      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
15592    }
15593
15594    /**
15595     * The base implementation of `_.isMap` without Node.js optimizations.
15596     *
15597     * @private
15598     * @param {*} value The value to check.
15599     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
15600     */
15601    function baseIsMap(value) {
15602      return isObjectLike(value) && getTag(value) == mapTag;
15603    }
15604
15605    /**
15606     * The base implementation of `_.isMatch` without support for iteratee shorthands.
15607     *
15608     * @private
15609     * @param {Object} object The object to inspect.
15610     * @param {Object} source The object of property values to match.
15611     * @param {Array} matchData The property names, values, and compare flags to match.
15612     * @param {Function} [customizer] The function to customize comparisons.
15613     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
15614     */
15615    function baseIsMatch(object, source, matchData, customizer) {
15616      var index = matchData.length,
15617          length = index,
15618          noCustomizer = !customizer;
15619
15620      if (object == null) {
15621        return !length;
15622      }
15623      object = Object(object);
15624      while (index--) {
15625        var data = matchData[index];
15626        if ((noCustomizer && data[2])
15627              ? data[1] !== object[data[0]]
15628              : !(data[0] in object)
15629            ) {
15630          return false;
15631        }
15632      }
15633      while (++index < length) {
15634        data = matchData[index];
15635        var key = data[0],
15636            objValue = object[key],
15637            srcValue = data[1];
15638
15639        if (noCustomizer && data[2]) {
15640          if (objValue === undefined && !(key in object)) {
15641            return false;
15642          }
15643        } else {
15644          var stack = new Stack;
15645          if (customizer) {
15646            var result = customizer(objValue, srcValue, key, object, source, stack);
15647          }
15648          if (!(result === undefined
15649                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
15650                : result
15651              )) {
15652            return false;
15653          }
15654        }
15655      }
15656      return true;
15657    }
15658
15659    /**
15660     * The base implementation of `_.isNative` without bad shim checks.
15661     *
15662     * @private
15663     * @param {*} value The value to check.
15664     * @returns {boolean} Returns `true` if `value` is a native function,
15665     *  else `false`.
15666     */
15667    function baseIsNative(value) {
15668      if (!isObject(value) || isMasked(value)) {
15669        return false;
15670      }
15671      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
15672      return pattern.test(toSource(value));
15673    }
15674
15675    /**
15676     * The base implementation of `_.isRegExp` without Node.js optimizations.
15677     *
15678     * @private
15679     * @param {*} value The value to check.
15680     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
15681     */
15682    function baseIsRegExp(value) {
15683      return isObjectLike(value) && baseGetTag(value) == regexpTag;
15684    }
15685
15686    /**
15687     * The base implementation of `_.isSet` without Node.js optimizations.
15688     *
15689     * @private
15690     * @param {*} value The value to check.
15691     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
15692     */
15693    function baseIsSet(value) {
15694      return isObjectLike(value) && getTag(value) == setTag;
15695    }
15696
15697    /**
15698     * The base implementation of `_.isTypedArray` without Node.js optimizations.
15699     *
15700     * @private
15701     * @param {*} value The value to check.
15702     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
15703     */
15704    function baseIsTypedArray(value) {
15705      return isObjectLike(value) &&
15706        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
15707    }
15708
15709    /**
15710     * The base implementation of `_.iteratee`.
15711     *
15712     * @private
15713     * @param {*} [value=_.identity] The value to convert to an iteratee.
15714     * @returns {Function} Returns the iteratee.
15715     */
15716    function baseIteratee(value) {
15717      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
15718      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
15719      if (typeof value == 'function') {
15720        return value;
15721      }
15722      if (value == null) {
15723        return identity;
15724      }
15725      if (typeof value == 'object') {
15726        return isArray(value)
15727          ? baseMatchesProperty(value[0], value[1])
15728          : baseMatches(value);
15729      }
15730      return property(value);
15731    }
15732
15733    /**
15734     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
15735     *
15736     * @private
15737     * @param {Object} object The object to query.
15738     * @returns {Array} Returns the array of property names.
15739     */
15740    function baseKeys(object) {
15741      if (!isPrototype(object)) {
15742        return nativeKeys(object);
15743      }
15744      var result = [];
15745      for (var key in Object(object)) {
15746        if (hasOwnProperty.call(object, key) && key != 'constructor') {
15747          result.push(key);
15748        }
15749      }
15750      return result;
15751    }
15752
15753    /**
15754     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
15755     *
15756     * @private
15757     * @param {Object} object The object to query.
15758     * @returns {Array} Returns the array of property names.
15759     */
15760    function baseKeysIn(object) {
15761      if (!isObject(object)) {
15762        return nativeKeysIn(object);
15763      }
15764      var isProto = isPrototype(object),
15765          result = [];
15766
15767      for (var key in object) {
15768        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
15769          result.push(key);
15770        }
15771      }
15772      return result;
15773    }
15774
15775    /**
15776     * The base implementation of `_.lt` which doesn't coerce arguments.
15777     *
15778     * @private
15779     * @param {*} value The value to compare.
15780     * @param {*} other The other value to compare.
15781     * @returns {boolean} Returns `true` if `value` is less than `other`,
15782     *  else `false`.
15783     */
15784    function baseLt(value, other) {
15785      return value < other;
15786    }
15787
15788    /**
15789     * The base implementation of `_.map` without support for iteratee shorthands.
15790     *
15791     * @private
15792     * @param {Array|Object} collection The collection to iterate over.
15793     * @param {Function} iteratee The function invoked per iteration.
15794     * @returns {Array} Returns the new mapped array.
15795     */
15796    function baseMap(collection, iteratee) {
15797      var index = -1,
15798          result = isArrayLike(collection) ? Array(collection.length) : [];
15799
15800      baseEach(collection, function(value, key, collection) {
15801        result[++index] = iteratee(value, key, collection);
15802      });
15803      return result;
15804    }
15805
15806    /**
15807     * The base implementation of `_.matches` which doesn't clone `source`.
15808     *
15809     * @private
15810     * @param {Object} source The object of property values to match.
15811     * @returns {Function} Returns the new spec function.
15812     */
15813    function baseMatches(source) {
15814      var matchData = getMatchData(source);
15815      if (matchData.length == 1 && matchData[0][2]) {
15816        return matchesStrictComparable(matchData[0][0], matchData[0][1]);
15817      }
15818      return function(object) {
15819        return object === source || baseIsMatch(object, source, matchData);
15820      };
15821    }
15822
15823    /**
15824     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
15825     *
15826     * @private
15827     * @param {string} path The path of the property to get.
15828     * @param {*} srcValue The value to match.
15829     * @returns {Function} Returns the new spec function.
15830     */
15831    function baseMatchesProperty(path, srcValue) {
15832      if (isKey(path) && isStrictComparable(srcValue)) {
15833        return matchesStrictComparable(toKey(path), srcValue);
15834      }
15835      return function(object) {
15836        var objValue = get(object, path);
15837        return (objValue === undefined && objValue === srcValue)
15838          ? hasIn(object, path)
15839          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
15840      };
15841    }
15842
15843    /**
15844     * The base implementation of `_.merge` without support for multiple sources.
15845     *
15846     * @private
15847     * @param {Object} object The destination object.
15848     * @param {Object} source The source object.
15849     * @param {number} srcIndex The index of `source`.
15850     * @param {Function} [customizer] The function to customize merged values.
15851     * @param {Object} [stack] Tracks traversed source values and their merged
15852     *  counterparts.
15853     */
15854    function baseMerge(object, source, srcIndex, customizer, stack) {
15855      if (object === source) {
15856        return;
15857      }
15858      baseFor(source, function(srcValue, key) {
15859        stack || (stack = new Stack);
15860        if (isObject(srcValue)) {
15861          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
15862        }
15863        else {
15864          var newValue = customizer
15865            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
15866            : undefined;
15867
15868          if (newValue === undefined) {
15869            newValue = srcValue;
15870          }
15871          assignMergeValue(object, key, newValue);
15872        }
15873      }, keysIn);
15874    }
15875
15876    /**
15877     * A specialized version of `baseMerge` for arrays and objects which performs
15878     * deep merges and tracks traversed objects enabling objects with circular
15879     * references to be merged.
15880     *
15881     * @private
15882     * @param {Object} object The destination object.
15883     * @param {Object} source The source object.
15884     * @param {string} key The key of the value to merge.
15885     * @param {number} srcIndex The index of `source`.
15886     * @param {Function} mergeFunc The function to merge values.
15887     * @param {Function} [customizer] The function to customize assigned values.
15888     * @param {Object} [stack] Tracks traversed source values and their merged
15889     *  counterparts.
15890     */
15891    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
15892      var objValue = safeGet(object, key),
15893          srcValue = safeGet(source, key),
15894          stacked = stack.get(srcValue);
15895
15896      if (stacked) {
15897        assignMergeValue(object, key, stacked);
15898        return;
15899      }
15900      var newValue = customizer
15901        ? customizer(objValue, srcValue, (key + ''), object, source, stack)
15902        : undefined;
15903
15904      var isCommon = newValue === undefined;
15905
15906      if (isCommon) {
15907        var isArr = isArray(srcValue),
15908            isBuff = !isArr && isBuffer(srcValue),
15909            isTyped = !isArr && !isBuff && isTypedArray(srcValue);
15910
15911        newValue = srcValue;
15912        if (isArr || isBuff || isTyped) {
15913          if (isArray(objValue)) {
15914            newValue = objValue;
15915          }
15916          else if (isArrayLikeObject(objValue)) {
15917            newValue = copyArray(objValue);
15918          }
15919          else if (isBuff) {
15920            isCommon = false;
15921            newValue = cloneBuffer(srcValue, true);
15922          }
15923          else if (isTyped) {
15924            isCommon = false;
15925            newValue = cloneTypedArray(srcValue, true);
15926          }
15927          else {
15928            newValue = [];
15929          }
15930        }
15931        else if (isPlainObject(srcValue) || isArguments(srcValue)) {
15932          newValue = objValue;
15933          if (isArguments(objValue)) {
15934            newValue = toPlainObject(objValue);
15935          }
15936          else if (!isObject(objValue) || isFunction(objValue)) {
15937            newValue = initCloneObject(srcValue);
15938          }
15939        }
15940        else {
15941          isCommon = false;
15942        }
15943      }
15944      if (isCommon) {
15945        // Recursively merge objects and arrays (susceptible to call stack limits).
15946        stack.set(srcValue, newValue);
15947        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
15948        stack['delete'](srcValue);
15949      }
15950      assignMergeValue(object, key, newValue);
15951    }
15952
15953    /**
15954     * The base implementation of `_.nth` which doesn't coerce arguments.
15955     *
15956     * @private
15957     * @param {Array} array The array to query.
15958     * @param {number} n The index of the element to return.
15959     * @returns {*} Returns the nth element of `array`.
15960     */
15961    function baseNth(array, n) {
15962      var length = array.length;
15963      if (!length) {
15964        return;
15965      }
15966      n += n < 0 ? length : 0;
15967      return isIndex(n, length) ? array[n] : undefined;
15968    }
15969
15970    /**
15971     * The base implementation of `_.orderBy` without param guards.
15972     *
15973     * @private
15974     * @param {Array|Object} collection The collection to iterate over.
15975     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
15976     * @param {string[]} orders The sort orders of `iteratees`.
15977     * @returns {Array} Returns the new sorted array.
15978     */
15979    function baseOrderBy(collection, iteratees, orders) {
15980      if (iteratees.length) {
15981        iteratees = arrayMap(iteratees, function(iteratee) {
15982          if (isArray(iteratee)) {
15983            return function(value) {
15984              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
15985            }
15986          }
15987          return iteratee;
15988        });
15989      } else {
15990        iteratees = [identity];
15991      }
15992
15993      var index = -1;
15994      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
15995
15996      var result = baseMap(collection, function(value, key, collection) {
15997        var criteria = arrayMap(iteratees, function(iteratee) {
15998          return iteratee(value);
15999        });
16000        return { 'criteria': criteria, 'index': ++index, 'value': value };
16001      });
16002
16003      return baseSortBy(result, function(object, other) {
16004        return compareMultiple(object, other, orders);
16005      });
16006    }
16007
16008    /**
16009     * The base implementation of `_.pick` without support for individual
16010     * property identifiers.
16011     *
16012     * @private
16013     * @param {Object} object The source object.
16014     * @param {string[]} paths The property paths to pick.
16015     * @returns {Object} Returns the new object.
16016     */
16017    function basePick(object, paths) {
16018      return basePickBy(object, paths, function(value, path) {
16019        return hasIn(object, path);
16020      });
16021    }
16022
16023    /**
16024     * The base implementation of  `_.pickBy` without support for iteratee shorthands.
16025     *
16026     * @private
16027     * @param {Object} object The source object.
16028     * @param {string[]} paths The property paths to pick.
16029     * @param {Function} predicate The function invoked per property.
16030     * @returns {Object} Returns the new object.
16031     */
16032    function basePickBy(object, paths, predicate) {
16033      var index = -1,
16034          length = paths.length,
16035          result = {};
16036
16037      while (++index < length) {
16038        var path = paths[index],
16039            value = baseGet(object, path);
16040
16041        if (predicate(value, path)) {
16042          baseSet(result, castPath(path, object), value);
16043        }
16044      }
16045      return result;
16046    }
16047
16048    /**
16049     * A specialized version of `baseProperty` which supports deep paths.
16050     *
16051     * @private
16052     * @param {Array|string} path The path of the property to get.
16053     * @returns {Function} Returns the new accessor function.
16054     */
16055    function basePropertyDeep(path) {
16056      return function(object) {
16057        return baseGet(object, path);
16058      };
16059    }
16060
16061    /**
16062     * The base implementation of `_.pullAllBy` without support for iteratee
16063     * shorthands.
16064     *
16065     * @private
16066     * @param {Array} array The array to modify.
16067     * @param {Array} values The values to remove.
16068     * @param {Function} [iteratee] The iteratee invoked per element.
16069     * @param {Function} [comparator] The comparator invoked per element.
16070     * @returns {Array} Returns `array`.
16071     */
16072    function basePullAll(array, values, iteratee, comparator) {
16073      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
16074          index = -1,
16075          length = values.length,
16076          seen = array;
16077
16078      if (array === values) {
16079        values = copyArray(values);
16080      }
16081      if (iteratee) {
16082        seen = arrayMap(array, baseUnary(iteratee));
16083      }
16084      while (++index < length) {
16085        var fromIndex = 0,
16086            value = values[index],
16087            computed = iteratee ? iteratee(value) : value;
16088
16089        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
16090          if (seen !== array) {
16091            splice.call(seen, fromIndex, 1);
16092          }
16093          splice.call(array, fromIndex, 1);
16094        }
16095      }
16096      return array;
16097    }
16098
16099    /**
16100     * The base implementation of `_.pullAt` without support for individual
16101     * indexes or capturing the removed elements.
16102     *
16103     * @private
16104     * @param {Array} array The array to modify.
16105     * @param {number[]} indexes The indexes of elements to remove.
16106     * @returns {Array} Returns `array`.
16107     */
16108    function basePullAt(array, indexes) {
16109      var length = array ? indexes.length : 0,
16110          lastIndex = length - 1;
16111
16112      while (length--) {
16113        var index = indexes[length];
16114        if (length == lastIndex || index !== previous) {
16115          var previous = index;
16116          if (isIndex(index)) {
16117            splice.call(array, index, 1);
16118          } else {
16119            baseUnset(array, index);
16120          }
16121        }
16122      }
16123      return array;
16124    }
16125
16126    /**
16127     * The base implementation of `_.random` without support for returning
16128     * floating-point numbers.
16129     *
16130     * @private
16131     * @param {number} lower The lower bound.
16132     * @param {number} upper The upper bound.
16133     * @returns {number} Returns the random number.
16134     */
16135    function baseRandom(lower, upper) {
16136      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
16137    }
16138
16139    /**
16140     * The base implementation of `_.range` and `_.rangeRight` which doesn't
16141     * coerce arguments.
16142     *
16143     * @private
16144     * @param {number} start The start of the range.
16145     * @param {number} end The end of the range.
16146     * @param {number} step The value to increment or decrement by.
16147     * @param {boolean} [fromRight] Specify iterating from right to left.
16148     * @returns {Array} Returns the range of numbers.
16149     */
16150    function baseRange(start, end, step, fromRight) {
16151      var index = -1,
16152          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
16153          result = Array(length);
16154
16155      while (length--) {
16156        result[fromRight ? length : ++index] = start;
16157        start += step;
16158      }
16159      return result;
16160    }
16161
16162    /**
16163     * The base implementation of `_.repeat` which doesn't coerce arguments.
16164     *
16165     * @private
16166     * @param {string} string The string to repeat.
16167     * @param {number} n The number of times to repeat the string.
16168     * @returns {string} Returns the repeated string.
16169     */
16170    function baseRepeat(string, n) {
16171      var result = '';
16172      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
16173        return result;
16174      }
16175      // Leverage the exponentiation by squaring algorithm for a faster repeat.
16176      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
16177      do {
16178        if (n % 2) {
16179          result += string;
16180        }
16181        n = nativeFloor(n / 2);
16182        if (n) {
16183          string += string;
16184        }
16185      } while (n);
16186
16187      return result;
16188    }
16189
16190    /**
16191     * The base implementation of `_.rest` which doesn't validate or coerce arguments.
16192     *
16193     * @private
16194     * @param {Function} func The function to apply a rest parameter to.
16195     * @param {number} [start=func.length-1] The start position of the rest parameter.
16196     * @returns {Function} Returns the new function.
16197     */
16198    function baseRest(func, start) {
16199      return setToString(overRest(func, start, identity), func + '');
16200    }
16201
16202    /**
16203     * The base implementation of `_.sample`.
16204     *
16205     * @private
16206     * @param {Array|Object} collection The collection to sample.
16207     * @returns {*} Returns the random element.
16208     */
16209    function baseSample(collection) {
16210      return arraySample(values(collection));
16211    }
16212
16213    /**
16214     * The base implementation of `_.sampleSize` without param guards.
16215     *
16216     * @private
16217     * @param {Array|Object} collection The collection to sample.
16218     * @param {number} n The number of elements to sample.
16219     * @returns {Array} Returns the random elements.
16220     */
16221    function baseSampleSize(collection, n) {
16222      var array = values(collection);
16223      return shuffleSelf(array, baseClamp(n, 0, array.length));
16224    }
16225
16226    /**
16227     * The base implementation of `_.set`.
16228     *
16229     * @private
16230     * @param {Object} object The object to modify.
16231     * @param {Array|string} path The path of the property to set.
16232     * @param {*} value The value to set.
16233     * @param {Function} [customizer] The function to customize path creation.
16234     * @returns {Object} Returns `object`.
16235     */
16236    function baseSet(object, path, value, customizer) {
16237      if (!isObject(object)) {
16238        return object;
16239      }
16240      path = castPath(path, object);
16241
16242      var index = -1,
16243          length = path.length,
16244          lastIndex = length - 1,
16245          nested = object;
16246
16247      while (nested != null && ++index < length) {
16248        var key = toKey(path[index]),
16249            newValue = value;
16250
16251        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
16252          return object;
16253        }
16254
16255        if (index != lastIndex) {
16256          var objValue = nested[key];
16257          newValue = customizer ? customizer(objValue, key, nested) : undefined;
16258          if (newValue === undefined) {
16259            newValue = isObject(objValue)
16260              ? objValue
16261              : (isIndex(path[index + 1]) ? [] : {});
16262          }
16263        }
16264        assignValue(nested, key, newValue);
16265        nested = nested[key];
16266      }
16267      return object;
16268    }
16269
16270    /**
16271     * The base implementation of `setData` without support for hot loop shorting.
16272     *
16273     * @private
16274     * @param {Function} func The function to associate metadata with.
16275     * @param {*} data The metadata.
16276     * @returns {Function} Returns `func`.
16277     */
16278    var baseSetData = !metaMap ? identity : function(func, data) {
16279      metaMap.set(func, data);
16280      return func;
16281    };
16282
16283    /**
16284     * The base implementation of `setToString` without support for hot loop shorting.
16285     *
16286     * @private
16287     * @param {Function} func The function to modify.
16288     * @param {Function} string The `toString` result.
16289     * @returns {Function} Returns `func`.
16290     */
16291    var baseSetToString = !defineProperty ? identity : function(func, string) {
16292      return defineProperty(func, 'toString', {
16293        'configurable': true,
16294        'enumerable': false,
16295        'value': constant(string),
16296        'writable': true
16297      });
16298    };
16299
16300    /**
16301     * The base implementation of `_.shuffle`.
16302     *
16303     * @private
16304     * @param {Array|Object} collection The collection to shuffle.
16305     * @returns {Array} Returns the new shuffled array.
16306     */
16307    function baseShuffle(collection) {
16308      return shuffleSelf(values(collection));
16309    }
16310
16311    /**
16312     * The base implementation of `_.slice` without an iteratee call guard.
16313     *
16314     * @private
16315     * @param {Array} array The array to slice.
16316     * @param {number} [start=0] The start position.
16317     * @param {number} [end=array.length] The end position.
16318     * @returns {Array} Returns the slice of `array`.
16319     */
16320    function baseSlice(array, start, end) {
16321      var index = -1,
16322          length = array.length;
16323
16324      if (start < 0) {
16325        start = -start > length ? 0 : (length + start);
16326      }
16327      end = end > length ? length : end;
16328      if (end < 0) {
16329        end += length;
16330      }
16331      length = start > end ? 0 : ((end - start) >>> 0);
16332      start >>>= 0;
16333
16334      var result = Array(length);
16335      while (++index < length) {
16336        result[index] = array[index + start];
16337      }
16338      return result;
16339    }
16340
16341    /**
16342     * The base implementation of `_.some` without support for iteratee shorthands.
16343     *
16344     * @private
16345     * @param {Array|Object} collection The collection to iterate over.
16346     * @param {Function} predicate The function invoked per iteration.
16347     * @returns {boolean} Returns `true` if any element passes the predicate check,
16348     *  else `false`.
16349     */
16350    function baseSome(collection, predicate) {
16351      var result;
16352
16353      baseEach(collection, function(value, index, collection) {
16354        result = predicate(value, index, collection);
16355        return !result;
16356      });
16357      return !!result;
16358    }
16359
16360    /**
16361     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
16362     * performs a binary search of `array` to determine the index at which `value`
16363     * should be inserted into `array` in order to maintain its sort order.
16364     *
16365     * @private
16366     * @param {Array} array The sorted array to inspect.
16367     * @param {*} value The value to evaluate.
16368     * @param {boolean} [retHighest] Specify returning the highest qualified index.
16369     * @returns {number} Returns the index at which `value` should be inserted
16370     *  into `array`.
16371     */
16372    function baseSortedIndex(array, value, retHighest) {
16373      var low = 0,
16374          high = array == null ? low : array.length;
16375
16376      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
16377        while (low < high) {
16378          var mid = (low + high) >>> 1,
16379              computed = array[mid];
16380
16381          if (computed !== null && !isSymbol(computed) &&
16382              (retHighest ? (computed <= value) : (computed < value))) {
16383            low = mid + 1;
16384          } else {
16385            high = mid;
16386          }
16387        }
16388        return high;
16389      }
16390      return baseSortedIndexBy(array, value, identity, retHighest);
16391    }
16392
16393    /**
16394     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
16395     * which invokes `iteratee` for `value` and each element of `array` to compute
16396     * their sort ranking. The iteratee is invoked with one argument; (value).
16397     *
16398     * @private
16399     * @param {Array} array The sorted array to inspect.
16400     * @param {*} value The value to evaluate.
16401     * @param {Function} iteratee The iteratee invoked per element.
16402     * @param {boolean} [retHighest] Specify returning the highest qualified index.
16403     * @returns {number} Returns the index at which `value` should be inserted
16404     *  into `array`.
16405     */
16406    function baseSortedIndexBy(array, value, iteratee, retHighest) {
16407      var low = 0,
16408          high = array == null ? 0 : array.length;
16409      if (high === 0) {
16410        return 0;
16411      }
16412
16413      value = iteratee(value);
16414      var valIsNaN = value !== value,
16415          valIsNull = value === null,
16416          valIsSymbol = isSymbol(value),
16417          valIsUndefined = value === undefined;
16418
16419      while (low < high) {
16420        var mid = nativeFloor((low + high) / 2),
16421            computed = iteratee(array[mid]),
16422            othIsDefined = computed !== undefined,
16423            othIsNull = computed === null,
16424            othIsReflexive = computed === computed,
16425            othIsSymbol = isSymbol(computed);
16426
16427        if (valIsNaN) {
16428          var setLow = retHighest || othIsReflexive;
16429        } else if (valIsUndefined) {
16430          setLow = othIsReflexive && (retHighest || othIsDefined);
16431        } else if (valIsNull) {
16432          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
16433        } else if (valIsSymbol) {
16434          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
16435        } else if (othIsNull || othIsSymbol) {
16436          setLow = false;
16437        } else {
16438          setLow = retHighest ? (computed <= value) : (computed < value);
16439        }
16440        if (setLow) {
16441          low = mid + 1;
16442        } else {
16443          high = mid;
16444        }
16445      }
16446      return nativeMin(high, MAX_ARRAY_INDEX);
16447    }
16448
16449    /**
16450     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
16451     * support for iteratee shorthands.
16452     *
16453     * @private
16454     * @param {Array} array The array to inspect.
16455     * @param {Function} [iteratee] The iteratee invoked per element.
16456     * @returns {Array} Returns the new duplicate free array.
16457     */
16458    function baseSortedUniq(array, iteratee) {
16459      var index = -1,
16460          length = array.length,
16461          resIndex = 0,
16462          result = [];
16463
16464      while (++index < length) {
16465        var value = array[index],
16466            computed = iteratee ? iteratee(value) : value;
16467
16468        if (!index || !eq(computed, seen)) {
16469          var seen = computed;
16470          result[resIndex++] = value === 0 ? 0 : value;
16471        }
16472      }
16473      return result;
16474    }
16475
16476    /**
16477     * The base implementation of `_.toNumber` which doesn't ensure correct
16478     * conversions of binary, hexadecimal, or octal string values.
16479     *
16480     * @private
16481     * @param {*} value The value to process.
16482     * @returns {number} Returns the number.
16483     */
16484    function baseToNumber(value) {
16485      if (typeof value == 'number') {
16486        return value;
16487      }
16488      if (isSymbol(value)) {
16489        return NAN;
16490      }
16491      return +value;
16492    }
16493
16494    /**
16495     * The base implementation of `_.toString` which doesn't convert nullish
16496     * values to empty strings.
16497     *
16498     * @private
16499     * @param {*} value The value to process.
16500     * @returns {string} Returns the string.
16501     */
16502    function baseToString(value) {
16503      // Exit early for strings to avoid a performance hit in some environments.
16504      if (typeof value == 'string') {
16505        return value;
16506      }
16507      if (isArray(value)) {
16508        // Recursively convert values (susceptible to call stack limits).
16509        return arrayMap(value, baseToString) + '';
16510      }
16511      if (isSymbol(value)) {
16512        return symbolToString ? symbolToString.call(value) : '';
16513      }
16514      var result = (value + '');
16515      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
16516    }
16517
16518    /**
16519     * The base implementation of `_.uniqBy` without support for iteratee shorthands.
16520     *
16521     * @private
16522     * @param {Array} array The array to inspect.
16523     * @param {Function} [iteratee] The iteratee invoked per element.
16524     * @param {Function} [comparator] The comparator invoked per element.
16525     * @returns {Array} Returns the new duplicate free array.
16526     */
16527    function baseUniq(array, iteratee, comparator) {
16528      var index = -1,
16529          includes = arrayIncludes,
16530          length = array.length,
16531          isCommon = true,
16532          result = [],
16533          seen = result;
16534
16535      if (comparator) {
16536        isCommon = false;
16537        includes = arrayIncludesWith;
16538      }
16539      else if (length >= LARGE_ARRAY_SIZE) {
16540        var set = iteratee ? null : createSet(array);
16541        if (set) {
16542          return setToArray(set);
16543        }
16544        isCommon = false;
16545        includes = cacheHas;
16546        seen = new SetCache;
16547      }
16548      else {
16549        seen = iteratee ? [] : result;
16550      }
16551      outer:
16552      while (++index < length) {
16553        var value = array[index],
16554            computed = iteratee ? iteratee(value) : value;
16555
16556        value = (comparator || value !== 0) ? value : 0;
16557        if (isCommon && computed === computed) {
16558          var seenIndex = seen.length;
16559          while (seenIndex--) {
16560            if (seen[seenIndex] === computed) {
16561              continue outer;
16562            }
16563          }
16564          if (iteratee) {
16565            seen.push(computed);
16566          }
16567          result.push(value);
16568        }
16569        else if (!includes(seen, computed, comparator)) {
16570          if (seen !== result) {
16571            seen.push(computed);
16572          }
16573          result.push(value);
16574        }
16575      }
16576      return result;
16577    }
16578
16579    /**
16580     * The base implementation of `_.unset`.
16581     *
16582     * @private
16583     * @param {Object} object The object to modify.
16584     * @param {Array|string} path The property path to unset.
16585     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
16586     */
16587    function baseUnset(object, path) {
16588      path = castPath(path, object);
16589      object = parent(object, path);
16590      return object == null || delete object[toKey(last(path))];
16591    }
16592
16593    /**
16594     * The base implementation of `_.update`.
16595     *
16596     * @private
16597     * @param {Object} object The object to modify.
16598     * @param {Array|string} path The path of the property to update.
16599     * @param {Function} updater The function to produce the updated value.
16600     * @param {Function} [customizer] The function to customize path creation.
16601     * @returns {Object} Returns `object`.
16602     */
16603    function baseUpdate(object, path, updater, customizer) {
16604      return baseSet(object, path, updater(baseGet(object, path)), customizer);
16605    }
16606
16607    /**
16608     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
16609     * without support for iteratee shorthands.
16610     *
16611     * @private
16612     * @param {Array} array The array to query.
16613     * @param {Function} predicate The function invoked per iteration.
16614     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
16615     * @param {boolean} [fromRight] Specify iterating from right to left.
16616     * @returns {Array} Returns the slice of `array`.
16617     */
16618    function baseWhile(array, predicate, isDrop, fromRight) {
16619      var length = array.length,
16620          index = fromRight ? length : -1;
16621
16622      while ((fromRight ? index-- : ++index < length) &&
16623        predicate(array[index], index, array)) {}
16624
16625      return isDrop
16626        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
16627        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
16628    }
16629
16630    /**
16631     * The base implementation of `wrapperValue` which returns the result of
16632     * performing a sequence of actions on the unwrapped `value`, where each
16633     * successive action is supplied the return value of the previous.
16634     *
16635     * @private
16636     * @param {*} value The unwrapped value.
16637     * @param {Array} actions Actions to perform to resolve the unwrapped value.
16638     * @returns {*} Returns the resolved value.
16639     */
16640    function baseWrapperValue(value, actions) {
16641      var result = value;
16642      if (result instanceof LazyWrapper) {
16643        result = result.value();
16644      }
16645      return arrayReduce(actions, function(result, action) {
16646        return action.func.apply(action.thisArg, arrayPush([result], action.args));
16647      }, result);
16648    }
16649
16650    /**
16651     * The base implementation of methods like `_.xor`, without support for
16652     * iteratee shorthands, that accepts an array of arrays to inspect.
16653     *
16654     * @private
16655     * @param {Array} arrays The arrays to inspect.
16656     * @param {Function} [iteratee] The iteratee invoked per element.
16657     * @param {Function} [comparator] The comparator invoked per element.
16658     * @returns {Array} Returns the new array of values.
16659     */
16660    function baseXor(arrays, iteratee, comparator) {
16661      var length = arrays.length;
16662      if (length < 2) {
16663        return length ? baseUniq(arrays[0]) : [];
16664      }
16665      var index = -1,
16666          result = Array(length);
16667
16668      while (++index < length) {
16669        var array = arrays[index],
16670            othIndex = -1;
16671
16672        while (++othIndex < length) {
16673          if (othIndex != index) {
16674            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
16675          }
16676        }
16677      }
16678      return baseUniq(baseFlatten(result, 1), iteratee, comparator);
16679    }
16680
16681    /**
16682     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
16683     *
16684     * @private
16685     * @param {Array} props The property identifiers.
16686     * @param {Array} values The property values.
16687     * @param {Function} assignFunc The function to assign values.
16688     * @returns {Object} Returns the new object.
16689     */
16690    function baseZipObject(props, values, assignFunc) {
16691      var index = -1,
16692          length = props.length,
16693          valsLength = values.length,
16694          result = {};
16695
16696      while (++index < length) {
16697        var value = index < valsLength ? values[index] : undefined;
16698        assignFunc(result, props[index], value);
16699      }
16700      return result;
16701    }
16702
16703    /**
16704     * Casts `value` to an empty array if it's not an array like object.
16705     *
16706     * @private
16707     * @param {*} value The value to inspect.
16708     * @returns {Array|Object} Returns the cast array-like object.
16709     */
16710    function castArrayLikeObject(value) {
16711      return isArrayLikeObject(value) ? value : [];
16712    }
16713
16714    /**
16715     * Casts `value` to `identity` if it's not a function.
16716     *
16717     * @private
16718     * @param {*} value The value to inspect.
16719     * @returns {Function} Returns cast function.
16720     */
16721    function castFunction(value) {
16722      return typeof value == 'function' ? value : identity;
16723    }
16724
16725    /**
16726     * Casts `value` to a path array if it's not one.
16727     *
16728     * @private
16729     * @param {*} value The value to inspect.
16730     * @param {Object} [object] The object to query keys on.
16731     * @returns {Array} Returns the cast property path array.
16732     */
16733    function castPath(value, object) {
16734      if (isArray(value)) {
16735        return value;
16736      }
16737      return isKey(value, object) ? [value] : stringToPath(toString(value));
16738    }
16739
16740    /**
16741     * A `baseRest` alias which can be replaced with `identity` by module
16742     * replacement plugins.
16743     *
16744     * @private
16745     * @type {Function}
16746     * @param {Function} func The function to apply a rest parameter to.
16747     * @returns {Function} Returns the new function.
16748     */
16749    var castRest = baseRest;
16750
16751    /**
16752     * Casts `array` to a slice if it's needed.
16753     *
16754     * @private
16755     * @param {Array} array The array to inspect.
16756     * @param {number} start The start position.
16757     * @param {number} [end=array.length] The end position.
16758     * @returns {Array} Returns the cast slice.
16759     */
16760    function castSlice(array, start, end) {
16761      var length = array.length;
16762      end = end === undefined ? length : end;
16763      return (!start && end >= length) ? array : baseSlice(array, start, end);
16764    }
16765
16766    /**
16767     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
16768     *
16769     * @private
16770     * @param {number|Object} id The timer id or timeout object of the timer to clear.
16771     */
16772    var clearTimeout = ctxClearTimeout || function(id) {
16773      return root.clearTimeout(id);
16774    };
16775
16776    /**
16777     * Creates a clone of  `buffer`.
16778     *
16779     * @private
16780     * @param {Buffer} buffer The buffer to clone.
16781     * @param {boolean} [isDeep] Specify a deep clone.
16782     * @returns {Buffer} Returns the cloned buffer.
16783     */
16784    function cloneBuffer(buffer, isDeep) {
16785      if (isDeep) {
16786        return buffer.slice();
16787      }
16788      var length = buffer.length,
16789          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
16790
16791      buffer.copy(result);
16792      return result;
16793    }
16794
16795    /**
16796     * Creates a clone of `arrayBuffer`.
16797     *
16798     * @private
16799     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
16800     * @returns {ArrayBuffer} Returns the cloned array buffer.
16801     */
16802    function cloneArrayBuffer(arrayBuffer) {
16803      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
16804      new Uint8Array(result).set(new Uint8Array(arrayBuffer));
16805      return result;
16806    }
16807
16808    /**
16809     * Creates a clone of `dataView`.
16810     *
16811     * @private
16812     * @param {Object} dataView The data view to clone.
16813     * @param {boolean} [isDeep] Specify a deep clone.
16814     * @returns {Object} Returns the cloned data view.
16815     */
16816    function cloneDataView(dataView, isDeep) {
16817      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
16818      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
16819    }
16820
16821    /**
16822     * Creates a clone of `regexp`.
16823     *
16824     * @private
16825     * @param {Object} regexp The regexp to clone.
16826     * @returns {Object} Returns the cloned regexp.
16827     */
16828    function cloneRegExp(regexp) {
16829      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
16830      result.lastIndex = regexp.lastIndex;
16831      return result;
16832    }
16833
16834    /**
16835     * Creates a clone of the `symbol` object.
16836     *
16837     * @private
16838     * @param {Object} symbol The symbol object to clone.
16839     * @returns {Object} Returns the cloned symbol object.
16840     */
16841    function cloneSymbol(symbol) {
16842      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
16843    }
16844
16845    /**
16846     * Creates a clone of `typedArray`.
16847     *
16848     * @private
16849     * @param {Object} typedArray The typed array to clone.
16850     * @param {boolean} [isDeep] Specify a deep clone.
16851     * @returns {Object} Returns the cloned typed array.
16852     */
16853    function cloneTypedArray(typedArray, isDeep) {
16854      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
16855      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
16856    }
16857
16858    /**
16859     * Compares values to sort them in ascending order.
16860     *
16861     * @private
16862     * @param {*} value The value to compare.
16863     * @param {*} other The other value to compare.
16864     * @returns {number} Returns the sort order indicator for `value`.
16865     */
16866    function compareAscending(value, other) {
16867      if (value !== other) {
16868        var valIsDefined = value !== undefined,
16869            valIsNull = value === null,
16870            valIsReflexive = value === value,
16871            valIsSymbol = isSymbol(value);
16872
16873        var othIsDefined = other !== undefined,
16874            othIsNull = other === null,
16875            othIsReflexive = other === other,
16876            othIsSymbol = isSymbol(other);
16877
16878        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
16879            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
16880            (valIsNull && othIsDefined && othIsReflexive) ||
16881            (!valIsDefined && othIsReflexive) ||
16882            !valIsReflexive) {
16883          return 1;
16884        }
16885        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
16886            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
16887            (othIsNull && valIsDefined && valIsReflexive) ||
16888            (!othIsDefined && valIsReflexive) ||
16889            !othIsReflexive) {
16890          return -1;
16891        }
16892      }
16893      return 0;
16894    }
16895
16896    /**
16897     * Used by `_.orderBy` to compare multiple properties of a value to another
16898     * and stable sort them.
16899     *
16900     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
16901     * specify an order of "desc" for descending or "asc" for ascending sort order
16902     * of corresponding values.
16903     *
16904     * @private
16905     * @param {Object} object The object to compare.
16906     * @param {Object} other The other object to compare.
16907     * @param {boolean[]|string[]} orders The order to sort by for each property.
16908     * @returns {number} Returns the sort order indicator for `object`.
16909     */
16910    function compareMultiple(object, other, orders) {
16911      var index = -1,
16912          objCriteria = object.criteria,
16913          othCriteria = other.criteria,
16914          length = objCriteria.length,
16915          ordersLength = orders.length;
16916
16917      while (++index < length) {
16918        var result = compareAscending(objCriteria[index], othCriteria[index]);
16919        if (result) {
16920          if (index >= ordersLength) {
16921            return result;
16922          }
16923          var order = orders[index];
16924          return result * (order == 'desc' ? -1 : 1);
16925        }
16926      }
16927      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
16928      // that causes it, under certain circumstances, to provide the same value for
16929      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
16930      // for more details.
16931      //
16932      // This also ensures a stable sort in V8 and other engines.
16933      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
16934      return object.index - other.index;
16935    }
16936
16937    /**
16938     * Creates an array that is the composition of partially applied arguments,
16939     * placeholders, and provided arguments into a single array of arguments.
16940     *
16941     * @private
16942     * @param {Array} args The provided arguments.
16943     * @param {Array} partials The arguments to prepend to those provided.
16944     * @param {Array} holders The `partials` placeholder indexes.
16945     * @params {boolean} [isCurried] Specify composing for a curried function.
16946     * @returns {Array} Returns the new array of composed arguments.
16947     */
16948    function composeArgs(args, partials, holders, isCurried) {
16949      var argsIndex = -1,
16950          argsLength = args.length,
16951          holdersLength = holders.length,
16952          leftIndex = -1,
16953          leftLength = partials.length,
16954          rangeLength = nativeMax(argsLength - holdersLength, 0),
16955          result = Array(leftLength + rangeLength),
16956          isUncurried = !isCurried;
16957
16958      while (++leftIndex < leftLength) {
16959        result[leftIndex] = partials[leftIndex];
16960      }
16961      while (++argsIndex < holdersLength) {
16962        if (isUncurried || argsIndex < argsLength) {
16963          result[holders[argsIndex]] = args[argsIndex];
16964        }
16965      }
16966      while (rangeLength--) {
16967        result[leftIndex++] = args[argsIndex++];
16968      }
16969      return result;
16970    }
16971
16972    /**
16973     * This function is like `composeArgs` except that the arguments composition
16974     * is tailored for `_.partialRight`.
16975     *
16976     * @private
16977     * @param {Array} args The provided arguments.
16978     * @param {Array} partials The arguments to append to those provided.
16979     * @param {Array} holders The `partials` placeholder indexes.
16980     * @params {boolean} [isCurried] Specify composing for a curried function.
16981     * @returns {Array} Returns the new array of composed arguments.
16982     */
16983    function composeArgsRight(args, partials, holders, isCurried) {
16984      var argsIndex = -1,
16985          argsLength = args.length,
16986          holdersIndex = -1,
16987          holdersLength = holders.length,
16988          rightIndex = -1,
16989          rightLength = partials.length,
16990          rangeLength = nativeMax(argsLength - holdersLength, 0),
16991          result = Array(rangeLength + rightLength),
16992          isUncurried = !isCurried;
16993
16994      while (++argsIndex < rangeLength) {
16995        result[argsIndex] = args[argsIndex];
16996      }
16997      var offset = argsIndex;
16998      while (++rightIndex < rightLength) {
16999        result[offset + rightIndex] = partials[rightIndex];
17000      }
17001      while (++holdersIndex < holdersLength) {
17002        if (isUncurried || argsIndex < argsLength) {
17003          result[offset + holders[holdersIndex]] = args[argsIndex++];
17004        }
17005      }
17006      return result;
17007    }
17008
17009    /**
17010     * Copies the values of `source` to `array`.
17011     *
17012     * @private
17013     * @param {Array} source The array to copy values from.
17014     * @param {Array} [array=[]] The array to copy values to.
17015     * @returns {Array} Returns `array`.
17016     */
17017    function copyArray(source, array) {
17018      var index = -1,
17019          length = source.length;
17020
17021      array || (array = Array(length));
17022      while (++index < length) {
17023        array[index] = source[index];
17024      }
17025      return array;
17026    }
17027
17028    /**
17029     * Copies properties of `source` to `object`.
17030     *
17031     * @private
17032     * @param {Object} source The object to copy properties from.
17033     * @param {Array} props The property identifiers to copy.
17034     * @param {Object} [object={}] The object to copy properties to.
17035     * @param {Function} [customizer] The function to customize copied values.
17036     * @returns {Object} Returns `object`.
17037     */
17038    function copyObject(source, props, object, customizer) {
17039      var isNew = !object;
17040      object || (object = {});
17041
17042      var index = -1,
17043          length = props.length;
17044
17045      while (++index < length) {
17046        var key = props[index];
17047
17048        var newValue = customizer
17049          ? customizer(object[key], source[key], key, object, source)
17050          : undefined;
17051
17052        if (newValue === undefined) {
17053          newValue = source[key];
17054        }
17055        if (isNew) {
17056          baseAssignValue(object, key, newValue);
17057        } else {
17058          assignValue(object, key, newValue);
17059        }
17060      }
17061      return object;
17062    }
17063
17064    /**
17065     * Copies own symbols of `source` to `object`.
17066     *
17067     * @private
17068     * @param {Object} source The object to copy symbols from.
17069     * @param {Object} [object={}] The object to copy symbols to.
17070     * @returns {Object} Returns `object`.
17071     */
17072    function copySymbols(source, object) {
17073      return copyObject(source, getSymbols(source), object);
17074    }
17075
17076    /**
17077     * Copies own and inherited symbols of `source` to `object`.
17078     *
17079     * @private
17080     * @param {Object} source The object to copy symbols from.
17081     * @param {Object} [object={}] The object to copy symbols to.
17082     * @returns {Object} Returns `object`.
17083     */
17084    function copySymbolsIn(source, object) {
17085      return copyObject(source, getSymbolsIn(source), object);
17086    }
17087
17088    /**
17089     * Creates a function like `_.groupBy`.
17090     *
17091     * @private
17092     * @param {Function} setter The function to set accumulator values.
17093     * @param {Function} [initializer] The accumulator object initializer.
17094     * @returns {Function} Returns the new aggregator function.
17095     */
17096    function createAggregator(setter, initializer) {
17097      return function(collection, iteratee) {
17098        var func = isArray(collection) ? arrayAggregator : baseAggregator,
17099            accumulator = initializer ? initializer() : {};
17100
17101        return func(collection, setter, getIteratee(iteratee, 2), accumulator);
17102      };
17103    }
17104
17105    /**
17106     * Creates a function like `_.assign`.
17107     *
17108     * @private
17109     * @param {Function} assigner The function to assign values.
17110     * @returns {Function} Returns the new assigner function.
17111     */
17112    function createAssigner(assigner) {
17113      return baseRest(function(object, sources) {
17114        var index = -1,
17115            length = sources.length,
17116            customizer = length > 1 ? sources[length - 1] : undefined,
17117            guard = length > 2 ? sources[2] : undefined;
17118
17119        customizer = (assigner.length > 3 && typeof customizer == 'function')
17120          ? (length--, customizer)
17121          : undefined;
17122
17123        if (guard && isIterateeCall(sources[0], sources[1], guard)) {
17124          customizer = length < 3 ? undefined : customizer;
17125          length = 1;
17126        }
17127        object = Object(object);
17128        while (++index < length) {
17129          var source = sources[index];
17130          if (source) {
17131            assigner(object, source, index, customizer);
17132          }
17133        }
17134        return object;
17135      });
17136    }
17137
17138    /**
17139     * Creates a `baseEach` or `baseEachRight` function.
17140     *
17141     * @private
17142     * @param {Function} eachFunc The function to iterate over a collection.
17143     * @param {boolean} [fromRight] Specify iterating from right to left.
17144     * @returns {Function} Returns the new base function.
17145     */
17146    function createBaseEach(eachFunc, fromRight) {
17147      return function(collection, iteratee) {
17148        if (collection == null) {
17149          return collection;
17150        }
17151        if (!isArrayLike(collection)) {
17152          return eachFunc(collection, iteratee);
17153        }
17154        var length = collection.length,
17155            index = fromRight ? length : -1,
17156            iterable = Object(collection);
17157
17158        while ((fromRight ? index-- : ++index < length)) {
17159          if (iteratee(iterable[index], index, iterable) === false) {
17160            break;
17161          }
17162        }
17163        return collection;
17164      };
17165    }
17166
17167    /**
17168     * Creates a base function for methods like `_.forIn` and `_.forOwn`.
17169     *
17170     * @private
17171     * @param {boolean} [fromRight] Specify iterating from right to left.
17172     * @returns {Function} Returns the new base function.
17173     */
17174    function createBaseFor(fromRight) {
17175      return function(object, iteratee, keysFunc) {
17176        var index = -1,
17177            iterable = Object(object),
17178            props = keysFunc(object),
17179            length = props.length;
17180
17181        while (length--) {
17182          var key = props[fromRight ? length : ++index];
17183          if (iteratee(iterable[key], key, iterable) === false) {
17184            break;
17185          }
17186        }
17187        return object;
17188      };
17189    }
17190
17191    /**
17192     * Creates a function that wraps `func` to invoke it with the optional `this`
17193     * binding of `thisArg`.
17194     *
17195     * @private
17196     * @param {Function} func The function to wrap.
17197     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
17198     * @param {*} [thisArg] The `this` binding of `func`.
17199     * @returns {Function} Returns the new wrapped function.
17200     */
17201    function createBind(func, bitmask, thisArg) {
17202      var isBind = bitmask & WRAP_BIND_FLAG,
17203          Ctor = createCtor(func);
17204
17205      function wrapper() {
17206        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
17207        return fn.apply(isBind ? thisArg : this, arguments);
17208      }
17209      return wrapper;
17210    }
17211
17212    /**
17213     * Creates a function like `_.lowerFirst`.
17214     *
17215     * @private
17216     * @param {string} methodName The name of the `String` case method to use.
17217     * @returns {Function} Returns the new case function.
17218     */
17219    function createCaseFirst(methodName) {
17220      return function(string) {
17221        string = toString(string);
17222
17223        var strSymbols = hasUnicode(string)
17224          ? stringToArray(string)
17225          : undefined;
17226
17227        var chr = strSymbols
17228          ? strSymbols[0]
17229          : string.charAt(0);
17230
17231        var trailing = strSymbols
17232          ? castSlice(strSymbols, 1).join('')
17233          : string.slice(1);
17234
17235        return chr[methodName]() + trailing;
17236      };
17237    }
17238
17239    /**
17240     * Creates a function like `_.camelCase`.
17241     *
17242     * @private
17243     * @param {Function} callback The function to combine each word.
17244     * @returns {Function} Returns the new compounder function.
17245     */
17246    function createCompounder(callback) {
17247      return function(string) {
17248        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
17249      };
17250    }
17251
17252    /**
17253     * Creates a function that produces an instance of `Ctor` regardless of
17254     * whether it was invoked as part of a `new` expression or by `call` or `apply`.
17255     *
17256     * @private
17257     * @param {Function} Ctor The constructor to wrap.
17258     * @returns {Function} Returns the new wrapped function.
17259     */
17260    function createCtor(Ctor) {
17261      return function() {
17262        // Use a `switch` statement to work with class constructors. See
17263        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
17264        // for more details.
17265        var args = arguments;
17266        switch (args.length) {
17267          case 0: return new Ctor;
17268          case 1: return new Ctor(args[0]);
17269          case 2: return new Ctor(args[0], args[1]);
17270          case 3: return new Ctor(args[0], args[1], args[2]);
17271          case 4: return new Ctor(args[0], args[1], args[2], args[3]);
17272          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
17273          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
17274          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
17275        }
17276        var thisBinding = baseCreate(Ctor.prototype),
17277            result = Ctor.apply(thisBinding, args);
17278
17279        // Mimic the constructor's `return` behavior.
17280        // See https://es5.github.io/#x13.2.2 for more details.
17281        return isObject(result) ? result : thisBinding;
17282      };
17283    }
17284
17285    /**
17286     * Creates a function that wraps `func` to enable currying.
17287     *
17288     * @private
17289     * @param {Function} func The function to wrap.
17290     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
17291     * @param {number} arity The arity of `func`.
17292     * @returns {Function} Returns the new wrapped function.
17293     */
17294    function createCurry(func, bitmask, arity) {
17295      var Ctor = createCtor(func);
17296
17297      function wrapper() {
17298        var length = arguments.length,
17299            args = Array(length),
17300            index = length,
17301            placeholder = getHolder(wrapper);
17302
17303        while (index--) {
17304          args[index] = arguments[index];
17305        }
17306        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
17307          ? []
17308          : replaceHolders(args, placeholder);
17309
17310        length -= holders.length;
17311        if (length < arity) {
17312          return createRecurry(
17313            func, bitmask, createHybrid, wrapper.placeholder, undefined,
17314            args, holders, undefined, undefined, arity - length);
17315        }
17316        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
17317        return apply(fn, this, args);
17318      }
17319      return wrapper;
17320    }
17321
17322    /**
17323     * Creates a `_.find` or `_.findLast` function.
17324     *
17325     * @private
17326     * @param {Function} findIndexFunc The function to find the collection index.
17327     * @returns {Function} Returns the new find function.
17328     */
17329    function createFind(findIndexFunc) {
17330      return function(collection, predicate, fromIndex) {
17331        var iterable = Object(collection);
17332        if (!isArrayLike(collection)) {
17333          var iteratee = getIteratee(predicate, 3);
17334          collection = keys(collection);
17335          predicate = function(key) { return iteratee(iterable[key], key, iterable); };
17336        }
17337        var index = findIndexFunc(collection, predicate, fromIndex);
17338        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
17339      };
17340    }
17341
17342    /**
17343     * Creates a `_.flow` or `_.flowRight` function.
17344     *
17345     * @private
17346     * @param {boolean} [fromRight] Specify iterating from right to left.
17347     * @returns {Function} Returns the new flow function.
17348     */
17349    function createFlow(fromRight) {
17350      return flatRest(function(funcs) {
17351        var length = funcs.length,
17352            index = length,
17353            prereq = LodashWrapper.prototype.thru;
17354
17355        if (fromRight) {
17356          funcs.reverse();
17357        }
17358        while (index--) {
17359          var func = funcs[index];
17360          if (typeof func != 'function') {
17361            throw new TypeError(FUNC_ERROR_TEXT);
17362          }
17363          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
17364            var wrapper = new LodashWrapper([], true);
17365          }
17366        }
17367        index = wrapper ? index : length;
17368        while (++index < length) {
17369          func = funcs[index];
17370
17371          var funcName = getFuncName(func),
17372              data = funcName == 'wrapper' ? getData(func) : undefined;
17373
17374          if (data && isLaziable(data[0]) &&
17375                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
17376                !data[4].length && data[9] == 1
17377              ) {
17378            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
17379          } else {
17380            wrapper = (func.length == 1 && isLaziable(func))
17381              ? wrapper[funcName]()
17382              : wrapper.thru(func);
17383          }
17384        }
17385        return function() {
17386          var args = arguments,
17387              value = args[0];
17388
17389          if (wrapper && args.length == 1 && isArray(value)) {
17390            return wrapper.plant(value).value();
17391          }
17392          var index = 0,
17393              result = length ? funcs[index].apply(this, args) : value;
17394
17395          while (++index < length) {
17396            result = funcs[index].call(this, result);
17397          }
17398          return result;
17399        };
17400      });
17401    }
17402
17403    /**
17404     * Creates a function that wraps `func` to invoke it with optional `this`
17405     * binding of `thisArg`, partial application, and currying.
17406     *
17407     * @private
17408     * @param {Function|string} func The function or method name to wrap.
17409     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
17410     * @param {*} [thisArg] The `this` binding of `func`.
17411     * @param {Array} [partials] The arguments to prepend to those provided to
17412     *  the new function.
17413     * @param {Array} [holders] The `partials` placeholder indexes.
17414     * @param {Array} [partialsRight] The arguments to append to those provided
17415     *  to the new function.
17416     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
17417     * @param {Array} [argPos] The argument positions of the new function.
17418     * @param {number} [ary] The arity cap of `func`.
17419     * @param {number} [arity] The arity of `func`.
17420     * @returns {Function} Returns the new wrapped function.
17421     */
17422    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
17423      var isAry = bitmask & WRAP_ARY_FLAG,
17424          isBind = bitmask & WRAP_BIND_FLAG,
17425          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
17426          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
17427          isFlip = bitmask & WRAP_FLIP_FLAG,
17428          Ctor = isBindKey ? undefined : createCtor(func);
17429
17430      function wrapper() {
17431        var length = arguments.length,
17432            args = Array(length),
17433            index = length;
17434
17435        while (index--) {
17436          args[index] = arguments[index];
17437        }
17438        if (isCurried) {
17439          var placeholder = getHolder(wrapper),
17440              holdersCount = countHolders(args, placeholder);
17441        }
17442        if (partials) {
17443          args = composeArgs(args, partials, holders, isCurried);
17444        }
17445        if (partialsRight) {
17446          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
17447        }
17448        length -= holdersCount;
17449        if (isCurried && length < arity) {
17450          var newHolders = replaceHolders(args, placeholder);
17451          return createRecurry(
17452            func, bitmask, createHybrid, wrapper.placeholder, thisArg,
17453            args, newHolders, argPos, ary, arity - length
17454          );
17455        }
17456        var thisBinding = isBind ? thisArg : this,
17457            fn = isBindKey ? thisBinding[func] : func;
17458
17459        length = args.length;
17460        if (argPos) {
17461          args = reorder(args, argPos);
17462        } else if (isFlip && length > 1) {
17463          args.reverse();
17464        }
17465        if (isAry && ary < length) {
17466          args.length = ary;
17467        }
17468        if (this && this !== root && this instanceof wrapper) {
17469          fn = Ctor || createCtor(fn);
17470        }
17471        return fn.apply(thisBinding, args);
17472      }
17473      return wrapper;
17474    }
17475
17476    /**
17477     * Creates a function like `_.invertBy`.
17478     *
17479     * @private
17480     * @param {Function} setter The function to set accumulator values.
17481     * @param {Function} toIteratee The function to resolve iteratees.
17482     * @returns {Function} Returns the new inverter function.
17483     */
17484    function createInverter(setter, toIteratee) {
17485      return function(object, iteratee) {
17486        return baseInverter(object, setter, toIteratee(iteratee), {});
17487      };
17488    }
17489
17490    /**
17491     * Creates a function that performs a mathematical operation on two values.
17492     *
17493     * @private
17494     * @param {Function} operator The function to perform the operation.
17495     * @param {number} [defaultValue] The value used for `undefined` arguments.
17496     * @returns {Function} Returns the new mathematical operation function.
17497     */
17498    function createMathOperation(operator, defaultValue) {
17499      return function(value, other) {
17500        var result;
17501        if (value === undefined && other === undefined) {
17502          return defaultValue;
17503        }
17504        if (value !== undefined) {
17505          result = value;
17506        }
17507        if (other !== undefined) {
17508          if (result === undefined) {
17509            return other;
17510          }
17511          if (typeof value == 'string' || typeof other == 'string') {
17512            value = baseToString(value);
17513            other = baseToString(other);
17514          } else {
17515            value = baseToNumber(value);
17516            other = baseToNumber(other);
17517          }
17518          result = operator(value, other);
17519        }
17520        return result;
17521      };
17522    }
17523
17524    /**
17525     * Creates a function like `_.over`.
17526     *
17527     * @private
17528     * @param {Function} arrayFunc The function to iterate over iteratees.
17529     * @returns {Function} Returns the new over function.
17530     */
17531    function createOver(arrayFunc) {
17532      return flatRest(function(iteratees) {
17533        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
17534        return baseRest(function(args) {
17535          var thisArg = this;
17536          return arrayFunc(iteratees, function(iteratee) {
17537            return apply(iteratee, thisArg, args);
17538          });
17539        });
17540      });
17541    }
17542
17543    /**
17544     * Creates the padding for `string` based on `length`. The `chars` string
17545     * is truncated if the number of characters exceeds `length`.
17546     *
17547     * @private
17548     * @param {number} length The padding length.
17549     * @param {string} [chars=' '] The string used as padding.
17550     * @returns {string} Returns the padding for `string`.
17551     */
17552    function createPadding(length, chars) {
17553      chars = chars === undefined ? ' ' : baseToString(chars);
17554
17555      var charsLength = chars.length;
17556      if (charsLength < 2) {
17557        return charsLength ? baseRepeat(chars, length) : chars;
17558      }
17559      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
17560      return hasUnicode(chars)
17561        ? castSlice(stringToArray(result), 0, length).join('')
17562        : result.slice(0, length);
17563    }
17564
17565    /**
17566     * Creates a function that wraps `func` to invoke it with the `this` binding
17567     * of `thisArg` and `partials` prepended to the arguments it receives.
17568     *
17569     * @private
17570     * @param {Function} func The function to wrap.
17571     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
17572     * @param {*} thisArg The `this` binding of `func`.
17573     * @param {Array} partials The arguments to prepend to those provided to
17574     *  the new function.
17575     * @returns {Function} Returns the new wrapped function.
17576     */
17577    function createPartial(func, bitmask, thisArg, partials) {
17578      var isBind = bitmask & WRAP_BIND_FLAG,
17579          Ctor = createCtor(func);
17580
17581      function wrapper() {
17582        var argsIndex = -1,
17583            argsLength = arguments.length,
17584            leftIndex = -1,
17585            leftLength = partials.length,
17586            args = Array(leftLength + argsLength),
17587            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
17588
17589        while (++leftIndex < leftLength) {
17590          args[leftIndex] = partials[leftIndex];
17591        }
17592        while (argsLength--) {
17593          args[leftIndex++] = arguments[++argsIndex];
17594        }
17595        return apply(fn, isBind ? thisArg : this, args);
17596      }
17597      return wrapper;
17598    }
17599
17600    /**
17601     * Creates a `_.range` or `_.rangeRight` function.
17602     *
17603     * @private
17604     * @param {boolean} [fromRight] Specify iterating from right to left.
17605     * @returns {Function} Returns the new range function.
17606     */
17607    function createRange(fromRight) {
17608      return function(start, end, step) {
17609        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
17610          end = step = undefined;
17611        }
17612        // Ensure the sign of `-0` is preserved.
17613        start = toFinite(start);
17614        if (end === undefined) {
17615          end = start;
17616          start = 0;
17617        } else {
17618          end = toFinite(end);
17619        }
17620        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
17621        return baseRange(start, end, step, fromRight);
17622      };
17623    }
17624
17625    /**
17626     * Creates a function that performs a relational operation on two values.
17627     *
17628     * @private
17629     * @param {Function} operator The function to perform the operation.
17630     * @returns {Function} Returns the new relational operation function.
17631     */
17632    function createRelationalOperation(operator) {
17633      return function(value, other) {
17634        if (!(typeof value == 'string' && typeof other == 'string')) {
17635          value = toNumber(value);
17636          other = toNumber(other);
17637        }
17638        return operator(value, other);
17639      };
17640    }
17641
17642    /**
17643     * Creates a function that wraps `func` to continue currying.
17644     *
17645     * @private
17646     * @param {Function} func The function to wrap.
17647     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
17648     * @param {Function} wrapFunc The function to create the `func` wrapper.
17649     * @param {*} placeholder The placeholder value.
17650     * @param {*} [thisArg] The `this` binding of `func`.
17651     * @param {Array} [partials] The arguments to prepend to those provided to
17652     *  the new function.
17653     * @param {Array} [holders] The `partials` placeholder indexes.
17654     * @param {Array} [argPos] The argument positions of the new function.
17655     * @param {number} [ary] The arity cap of `func`.
17656     * @param {number} [arity] The arity of `func`.
17657     * @returns {Function} Returns the new wrapped function.
17658     */
17659    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
17660      var isCurry = bitmask & WRAP_CURRY_FLAG,
17661          newHolders = isCurry ? holders : undefined,
17662          newHoldersRight = isCurry ? undefined : holders,
17663          newPartials = isCurry ? partials : undefined,
17664          newPartialsRight = isCurry ? undefined : partials;
17665
17666      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
17667      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
17668
17669      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
17670        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
17671      }
17672      var newData = [
17673        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
17674        newHoldersRight, argPos, ary, arity
17675      ];
17676
17677      var result = wrapFunc.apply(undefined, newData);
17678      if (isLaziable(func)) {
17679        setData(result, newData);
17680      }
17681      result.placeholder = placeholder;
17682      return setWrapToString(result, func, bitmask);
17683    }
17684
17685    /**
17686     * Creates a function like `_.round`.
17687     *
17688     * @private
17689     * @param {string} methodName The name of the `Math` method to use when rounding.
17690     * @returns {Function} Returns the new round function.
17691     */
17692    function createRound(methodName) {
17693      var func = Math[methodName];
17694      return function(number, precision) {
17695        number = toNumber(number);
17696        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
17697        if (precision && nativeIsFinite(number)) {
17698          // Shift with exponential notation to avoid floating-point issues.
17699          // See [MDN](https://mdn.io/round#Examples) for more details.
17700          var pair = (toString(number) + 'e').split('e'),
17701              value = func(pair[0] + 'e' + (+pair[1] + precision));
17702
17703          pair = (toString(value) + 'e').split('e');
17704          return +(pair[0] + 'e' + (+pair[1] - precision));
17705        }
17706        return func(number);
17707      };
17708    }
17709
17710    /**
17711     * Creates a set object of `values`.
17712     *
17713     * @private
17714     * @param {Array} values The values to add to the set.
17715     * @returns {Object} Returns the new set.
17716     */
17717    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
17718      return new Set(values);
17719    };
17720
17721    /**
17722     * Creates a `_.toPairs` or `_.toPairsIn` function.
17723     *
17724     * @private
17725     * @param {Function} keysFunc The function to get the keys of a given object.
17726     * @returns {Function} Returns the new pairs function.
17727     */
17728    function createToPairs(keysFunc) {
17729      return function(object) {
17730        var tag = getTag(object);
17731        if (tag == mapTag) {
17732          return mapToArray(object);
17733        }
17734        if (tag == setTag) {
17735          return setToPairs(object);
17736        }
17737        return baseToPairs(object, keysFunc(object));
17738      };
17739    }
17740
17741    /**
17742     * Creates a function that either curries or invokes `func` with optional
17743     * `this` binding and partially applied arguments.
17744     *
17745     * @private
17746     * @param {Function|string} func The function or method name to wrap.
17747     * @param {number} bitmask The bitmask flags.
17748     *    1 - `_.bind`
17749     *    2 - `_.bindKey`
17750     *    4 - `_.curry` or `_.curryRight` of a bound function
17751     *    8 - `_.curry`
17752     *   16 - `_.curryRight`
17753     *   32 - `_.partial`
17754     *   64 - `_.partialRight`
17755     *  128 - `_.rearg`
17756     *  256 - `_.ary`
17757     *  512 - `_.flip`
17758     * @param {*} [thisArg] The `this` binding of `func`.
17759     * @param {Array} [partials] The arguments to be partially applied.
17760     * @param {Array} [holders] The `partials` placeholder indexes.
17761     * @param {Array} [argPos] The argument positions of the new function.
17762     * @param {number} [ary] The arity cap of `func`.
17763     * @param {number} [arity] The arity of `func`.
17764     * @returns {Function} Returns the new wrapped function.
17765     */
17766    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
17767      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
17768      if (!isBindKey && typeof func != 'function') {
17769        throw new TypeError(FUNC_ERROR_TEXT);
17770      }
17771      var length = partials ? partials.length : 0;
17772      if (!length) {
17773        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
17774        partials = holders = undefined;
17775      }
17776      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
17777      arity = arity === undefined ? arity : toInteger(arity);
17778      length -= holders ? holders.length : 0;
17779
17780      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
17781        var partialsRight = partials,
17782            holdersRight = holders;
17783
17784        partials = holders = undefined;
17785      }
17786      var data = isBindKey ? undefined : getData(func);
17787
17788      var newData = [
17789        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
17790        argPos, ary, arity
17791      ];
17792
17793      if (data) {
17794        mergeData(newData, data);
17795      }
17796      func = newData[0];
17797      bitmask = newData[1];
17798      thisArg = newData[2];
17799      partials = newData[3];
17800      holders = newData[4];
17801      arity = newData[9] = newData[9] === undefined
17802        ? (isBindKey ? 0 : func.length)
17803        : nativeMax(newData[9] - length, 0);
17804
17805      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
17806        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
17807      }
17808      if (!bitmask || bitmask == WRAP_BIND_FLAG) {
17809        var result = createBind(func, bitmask, thisArg);
17810      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
17811        result = createCurry(func, bitmask, arity);
17812      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
17813        result = createPartial(func, bitmask, thisArg, partials);
17814      } else {
17815        result = createHybrid.apply(undefined, newData);
17816      }
17817      var setter = data ? baseSetData : setData;
17818      return setWrapToString(setter(result, newData), func, bitmask);
17819    }
17820
17821    /**
17822     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
17823     * of source objects to the destination object for all destination properties
17824     * that resolve to `undefined`.
17825     *
17826     * @private
17827     * @param {*} objValue The destination value.
17828     * @param {*} srcValue The source value.
17829     * @param {string} key The key of the property to assign.
17830     * @param {Object} object The parent object of `objValue`.
17831     * @returns {*} Returns the value to assign.
17832     */
17833    function customDefaultsAssignIn(objValue, srcValue, key, object) {
17834      if (objValue === undefined ||
17835          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
17836        return srcValue;
17837      }
17838      return objValue;
17839    }
17840
17841    /**
17842     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
17843     * objects into destination objects that are passed thru.
17844     *
17845     * @private
17846     * @param {*} objValue The destination value.
17847     * @param {*} srcValue The source value.
17848     * @param {string} key The key of the property to merge.
17849     * @param {Object} object The parent object of `objValue`.
17850     * @param {Object} source The parent object of `srcValue`.
17851     * @param {Object} [stack] Tracks traversed source values and their merged
17852     *  counterparts.
17853     * @returns {*} Returns the value to assign.
17854     */
17855    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
17856      if (isObject(objValue) && isObject(srcValue)) {
17857        // Recursively merge objects and arrays (susceptible to call stack limits).
17858        stack.set(srcValue, objValue);
17859        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
17860        stack['delete'](srcValue);
17861      }
17862      return objValue;
17863    }
17864
17865    /**
17866     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
17867     * objects.
17868     *
17869     * @private
17870     * @param {*} value The value to inspect.
17871     * @param {string} key The key of the property to inspect.
17872     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
17873     */
17874    function customOmitClone(value) {
17875      return isPlainObject(value) ? undefined : value;
17876    }
17877
17878    /**
17879     * A specialized version of `baseIsEqualDeep` for arrays with support for
17880     * partial deep comparisons.
17881     *
17882     * @private
17883     * @param {Array} array The array to compare.
17884     * @param {Array} other The other array to compare.
17885     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
17886     * @param {Function} customizer The function to customize comparisons.
17887     * @param {Function} equalFunc The function to determine equivalents of values.
17888     * @param {Object} stack Tracks traversed `array` and `other` objects.
17889     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
17890     */
17891    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
17892      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
17893          arrLength = array.length,
17894          othLength = other.length;
17895
17896      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
17897        return false;
17898      }
17899      // Check that cyclic values are equal.
17900      var arrStacked = stack.get(array);
17901      var othStacked = stack.get(other);
17902      if (arrStacked && othStacked) {
17903        return arrStacked == other && othStacked == array;
17904      }
17905      var index = -1,
17906          result = true,
17907          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
17908
17909      stack.set(array, other);
17910      stack.set(other, array);
17911
17912      // Ignore non-index properties.
17913      while (++index < arrLength) {
17914        var arrValue = array[index],
17915            othValue = other[index];
17916
17917        if (customizer) {
17918          var compared = isPartial
17919            ? customizer(othValue, arrValue, index, other, array, stack)
17920            : customizer(arrValue, othValue, index, array, other, stack);
17921        }
17922        if (compared !== undefined) {
17923          if (compared) {
17924            continue;
17925          }
17926          result = false;
17927          break;
17928        }
17929        // Recursively compare arrays (susceptible to call stack limits).
17930        if (seen) {
17931          if (!arraySome(other, function(othValue, othIndex) {
17932                if (!cacheHas(seen, othIndex) &&
17933                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
17934                  return seen.push(othIndex);
17935                }
17936              })) {
17937            result = false;
17938            break;
17939          }
17940        } else if (!(
17941              arrValue === othValue ||
17942                equalFunc(arrValue, othValue, bitmask, customizer, stack)
17943            )) {
17944          result = false;
17945          break;
17946        }
17947      }
17948      stack['delete'](array);
17949      stack['delete'](other);
17950      return result;
17951    }
17952
17953    /**
17954     * A specialized version of `baseIsEqualDeep` for comparing objects of
17955     * the same `toStringTag`.
17956     *
17957     * **Note:** This function only supports comparing values with tags of
17958     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
17959     *
17960     * @private
17961     * @param {Object} object The object to compare.
17962     * @param {Object} other The other object to compare.
17963     * @param {string} tag The `toStringTag` of the objects to compare.
17964     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
17965     * @param {Function} customizer The function to customize comparisons.
17966     * @param {Function} equalFunc The function to determine equivalents of values.
17967     * @param {Object} stack Tracks traversed `object` and `other` objects.
17968     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
17969     */
17970    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
17971      switch (tag) {
17972        case dataViewTag:
17973          if ((object.byteLength != other.byteLength) ||
17974              (object.byteOffset != other.byteOffset)) {
17975            return false;
17976          }
17977          object = object.buffer;
17978          other = other.buffer;
17979
17980        case arrayBufferTag:
17981          if ((object.byteLength != other.byteLength) ||
17982              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
17983            return false;
17984          }
17985          return true;
17986
17987        case boolTag:
17988        case dateTag:
17989        case numberTag:
17990          // Coerce booleans to `1` or `0` and dates to milliseconds.
17991          // Invalid dates are coerced to `NaN`.
17992          return eq(+object, +other);
17993
17994        case errorTag:
17995          return object.name == other.name && object.message == other.message;
17996
17997        case regexpTag:
17998        case stringTag:
17999          // Coerce regexes to strings and treat strings, primitives and objects,
18000          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
18001          // for more details.
18002          return object == (other + '');
18003
18004        case mapTag:
18005          var convert = mapToArray;
18006
18007        case setTag:
18008          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
18009          convert || (convert = setToArray);
18010
18011          if (object.size != other.size && !isPartial) {
18012            return false;
18013          }
18014          // Assume cyclic values are equal.
18015          var stacked = stack.get(object);
18016          if (stacked) {
18017            return stacked == other;
18018          }
18019          bitmask |= COMPARE_UNORDERED_FLAG;
18020
18021          // Recursively compare objects (susceptible to call stack limits).
18022          stack.set(object, other);
18023          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
18024          stack['delete'](object);
18025          return result;
18026
18027        case symbolTag:
18028          if (symbolValueOf) {
18029            return symbolValueOf.call(object) == symbolValueOf.call(other);
18030          }
18031      }
18032      return false;
18033    }
18034
18035    /**
18036     * A specialized version of `baseIsEqualDeep` for objects with support for
18037     * partial deep comparisons.
18038     *
18039     * @private
18040     * @param {Object} object The object to compare.
18041     * @param {Object} other The other object to compare.
18042     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
18043     * @param {Function} customizer The function to customize comparisons.
18044     * @param {Function} equalFunc The function to determine equivalents of values.
18045     * @param {Object} stack Tracks traversed `object` and `other` objects.
18046     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
18047     */
18048    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
18049      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
18050          objProps = getAllKeys(object),
18051          objLength = objProps.length,
18052          othProps = getAllKeys(other),
18053          othLength = othProps.length;
18054
18055      if (objLength != othLength && !isPartial) {
18056        return false;
18057      }
18058      var index = objLength;
18059      while (index--) {
18060        var key = objProps[index];
18061        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
18062          return false;
18063        }
18064      }
18065      // Check that cyclic values are equal.
18066      var objStacked = stack.get(object);
18067      var othStacked = stack.get(other);
18068      if (objStacked && othStacked) {
18069        return objStacked == other && othStacked == object;
18070      }
18071      var result = true;
18072      stack.set(object, other);
18073      stack.set(other, object);
18074
18075      var skipCtor = isPartial;
18076      while (++index < objLength) {
18077        key = objProps[index];
18078        var objValue = object[key],
18079            othValue = other[key];
18080
18081        if (customizer) {
18082          var compared = isPartial
18083            ? customizer(othValue, objValue, key, other, object, stack)
18084            : customizer(objValue, othValue, key, object, other, stack);
18085        }
18086        // Recursively compare objects (susceptible to call stack limits).
18087        if (!(compared === undefined
18088              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
18089              : compared
18090            )) {
18091          result = false;
18092          break;
18093        }
18094        skipCtor || (skipCtor = key == 'constructor');
18095      }
18096      if (result && !skipCtor) {
18097        var objCtor = object.constructor,
18098            othCtor = other.constructor;
18099
18100        // Non `Object` object instances with different constructors are not equal.
18101        if (objCtor != othCtor &&
18102            ('constructor' in object && 'constructor' in other) &&
18103            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
18104              typeof othCtor == 'function' && othCtor instanceof othCtor)) {
18105          result = false;
18106        }
18107      }
18108      stack['delete'](object);
18109      stack['delete'](other);
18110      return result;
18111    }
18112
18113    /**
18114     * A specialized version of `baseRest` which flattens the rest array.
18115     *
18116     * @private
18117     * @param {Function} func The function to apply a rest parameter to.
18118     * @returns {Function} Returns the new function.
18119     */
18120    function flatRest(func) {
18121      return setToString(overRest(func, undefined, flatten), func + '');
18122    }
18123
18124    /**
18125     * Creates an array of own enumerable property names and symbols of `object`.
18126     *
18127     * @private
18128     * @param {Object} object The object to query.
18129     * @returns {Array} Returns the array of property names and symbols.
18130     */
18131    function getAllKeys(object) {
18132      return baseGetAllKeys(object, keys, getSymbols);
18133    }
18134
18135    /**
18136     * Creates an array of own and inherited enumerable property names and
18137     * symbols of `object`.
18138     *
18139     * @private
18140     * @param {Object} object The object to query.
18141     * @returns {Array} Returns the array of property names and symbols.
18142     */
18143    function getAllKeysIn(object) {
18144      return baseGetAllKeys(object, keysIn, getSymbolsIn);
18145    }
18146
18147    /**
18148     * Gets metadata for `func`.
18149     *
18150     * @private
18151     * @param {Function} func The function to query.
18152     * @returns {*} Returns the metadata for `func`.
18153     */
18154    var getData = !metaMap ? noop : function(func) {
18155      return metaMap.get(func);
18156    };
18157
18158    /**
18159     * Gets the name of `func`.
18160     *
18161     * @private
18162     * @param {Function} func The function to query.
18163     * @returns {string} Returns the function name.
18164     */
18165    function getFuncName(func) {
18166      var result = (func.name + ''),
18167          array = realNames[result],
18168          length = hasOwnProperty.call(realNames, result) ? array.length : 0;
18169
18170      while (length--) {
18171        var data = array[length],
18172            otherFunc = data.func;
18173        if (otherFunc == null || otherFunc == func) {
18174          return data.name;
18175        }
18176      }
18177      return result;
18178    }
18179
18180    /**
18181     * Gets the argument placeholder value for `func`.
18182     *
18183     * @private
18184     * @param {Function} func The function to inspect.
18185     * @returns {*} Returns the placeholder value.
18186     */
18187    function getHolder(func) {
18188      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
18189      return object.placeholder;
18190    }
18191
18192    /**
18193     * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
18194     * this function returns the custom method, otherwise it returns `baseIteratee`.
18195     * If arguments are provided, the chosen function is invoked with them and
18196     * its result is returned.
18197     *
18198     * @private
18199     * @param {*} [value] The value to convert to an iteratee.
18200     * @param {number} [arity] The arity of the created iteratee.
18201     * @returns {Function} Returns the chosen function or its result.
18202     */
18203    function getIteratee() {
18204      var result = lodash.iteratee || iteratee;
18205      result = result === iteratee ? baseIteratee : result;
18206      return arguments.length ? result(arguments[0], arguments[1]) : result;
18207    }
18208
18209    /**
18210     * Gets the data for `map`.
18211     *
18212     * @private
18213     * @param {Object} map The map to query.
18214     * @param {string} key The reference key.
18215     * @returns {*} Returns the map data.
18216     */
18217    function getMapData(map, key) {
18218      var data = map.__data__;
18219      return isKeyable(key)
18220        ? data[typeof key == 'string' ? 'string' : 'hash']
18221        : data.map;
18222    }
18223
18224    /**
18225     * Gets the property names, values, and compare flags of `object`.
18226     *
18227     * @private
18228     * @param {Object} object The object to query.
18229     * @returns {Array} Returns the match data of `object`.
18230     */
18231    function getMatchData(object) {
18232      var result = keys(object),
18233          length = result.length;
18234
18235      while (length--) {
18236        var key = result[length],
18237            value = object[key];
18238
18239        result[length] = [key, value, isStrictComparable(value)];
18240      }
18241      return result;
18242    }
18243
18244    /**
18245     * Gets the native function at `key` of `object`.
18246     *
18247     * @private
18248     * @param {Object} object The object to query.
18249     * @param {string} key The key of the method to get.
18250     * @returns {*} Returns the function if it's native, else `undefined`.
18251     */
18252    function getNative(object, key) {
18253      var value = getValue(object, key);
18254      return baseIsNative(value) ? value : undefined;
18255    }
18256
18257    /**
18258     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
18259     *
18260     * @private
18261     * @param {*} value The value to query.
18262     * @returns {string} Returns the raw `toStringTag`.
18263     */
18264    function getRawTag(value) {
18265      var isOwn = hasOwnProperty.call(value, symToStringTag),
18266          tag = value[symToStringTag];
18267
18268      try {
18269        value[symToStringTag] = undefined;
18270        var unmasked = true;
18271      } catch (e) {}
18272
18273      var result = nativeObjectToString.call(value);
18274      if (unmasked) {
18275        if (isOwn) {
18276          value[symToStringTag] = tag;
18277        } else {
18278          delete value[symToStringTag];
18279        }
18280      }
18281      return result;
18282    }
18283
18284    /**
18285     * Creates an array of the own enumerable symbols of `object`.
18286     *
18287     * @private
18288     * @param {Object} object The object to query.
18289     * @returns {Array} Returns the array of symbols.
18290     */
18291    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
18292      if (object == null) {
18293        return [];
18294      }
18295      object = Object(object);
18296      return arrayFilter(nativeGetSymbols(object), function(symbol) {
18297        return propertyIsEnumerable.call(object, symbol);
18298      });
18299    };
18300
18301    /**
18302     * Creates an array of the own and inherited enumerable symbols of `object`.
18303     *
18304     * @private
18305     * @param {Object} object The object to query.
18306     * @returns {Array} Returns the array of symbols.
18307     */
18308    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
18309      var result = [];
18310      while (object) {
18311        arrayPush(result, getSymbols(object));
18312        object = getPrototype(object);
18313      }
18314      return result;
18315    };
18316
18317    /**
18318     * Gets the `toStringTag` of `value`.
18319     *
18320     * @private
18321     * @param {*} value The value to query.
18322     * @returns {string} Returns the `toStringTag`.
18323     */
18324    var getTag = baseGetTag;
18325
18326    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
18327    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
18328        (Map && getTag(new Map) != mapTag) ||
18329        (Promise && getTag(Promise.resolve()) != promiseTag) ||
18330        (Set && getTag(new Set) != setTag) ||
18331        (WeakMap && getTag(new WeakMap) != weakMapTag)) {
18332      getTag = function(value) {
18333        var result = baseGetTag(value),
18334            Ctor = result == objectTag ? value.constructor : undefined,
18335            ctorString = Ctor ? toSource(Ctor) : '';
18336
18337        if (ctorString) {
18338          switch (ctorString) {
18339            case dataViewCtorString: return dataViewTag;
18340            case mapCtorString: return mapTag;
18341            case promiseCtorString: return promiseTag;
18342            case setCtorString: return setTag;
18343            case weakMapCtorString: return weakMapTag;
18344          }
18345        }
18346        return result;
18347      };
18348    }
18349
18350    /**
18351     * Gets the view, applying any `transforms` to the `start` and `end` positions.
18352     *
18353     * @private
18354     * @param {number} start The start of the view.
18355     * @param {number} end The end of the view.
18356     * @param {Array} transforms The transformations to apply to the view.
18357     * @returns {Object} Returns an object containing the `start` and `end`
18358     *  positions of the view.
18359     */
18360    function getView(start, end, transforms) {
18361      var index = -1,
18362          length = transforms.length;
18363
18364      while (++index < length) {
18365        var data = transforms[index],
18366            size = data.size;
18367
18368        switch (data.type) {
18369          case 'drop':      start += size; break;
18370          case 'dropRight': end -= size; break;
18371          case 'take':      end = nativeMin(end, start + size); break;
18372          case 'takeRight': start = nativeMax(start, end - size); break;
18373        }
18374      }
18375      return { 'start': start, 'end': end };
18376    }
18377
18378    /**
18379     * Extracts wrapper details from the `source` body comment.
18380     *
18381     * @private
18382     * @param {string} source The source to inspect.
18383     * @returns {Array} Returns the wrapper details.
18384     */
18385    function getWrapDetails(source) {
18386      var match = source.match(reWrapDetails);
18387      return match ? match[1].split(reSplitDetails) : [];
18388    }
18389
18390    /**
18391     * Checks if `path` exists on `object`.
18392     *
18393     * @private
18394     * @param {Object} object The object to query.
18395     * @param {Array|string} path The path to check.
18396     * @param {Function} hasFunc The function to check properties.
18397     * @returns {boolean} Returns `true` if `path` exists, else `false`.
18398     */
18399    function hasPath(object, path, hasFunc) {
18400      path = castPath(path, object);
18401
18402      var index = -1,
18403          length = path.length,
18404          result = false;
18405
18406      while (++index < length) {
18407        var key = toKey(path[index]);
18408        if (!(result = object != null && hasFunc(object, key))) {
18409          break;
18410        }
18411        object = object[key];
18412      }
18413      if (result || ++index != length) {
18414        return result;
18415      }
18416      length = object == null ? 0 : object.length;
18417      return !!length && isLength(length) && isIndex(key, length) &&
18418        (isArray(object) || isArguments(object));
18419    }
18420
18421    /**
18422     * Initializes an array clone.
18423     *
18424     * @private
18425     * @param {Array} array The array to clone.
18426     * @returns {Array} Returns the initialized clone.
18427     */
18428    function initCloneArray(array) {
18429      var length = array.length,
18430          result = new array.constructor(length);
18431
18432      // Add properties assigned by `RegExp#exec`.
18433      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
18434        result.index = array.index;
18435        result.input = array.input;
18436      }
18437      return result;
18438    }
18439
18440    /**
18441     * Initializes an object clone.
18442     *
18443     * @private
18444     * @param {Object} object The object to clone.
18445     * @returns {Object} Returns the initialized clone.
18446     */
18447    function initCloneObject(object) {
18448      return (typeof object.constructor == 'function' && !isPrototype(object))
18449        ? baseCreate(getPrototype(object))
18450        : {};
18451    }
18452
18453    /**
18454     * Initializes an object clone based on its `toStringTag`.
18455     *
18456     * **Note:** This function only supports cloning values with tags of
18457     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
18458     *
18459     * @private
18460     * @param {Object} object The object to clone.
18461     * @param {string} tag The `toStringTag` of the object to clone.
18462     * @param {boolean} [isDeep] Specify a deep clone.
18463     * @returns {Object} Returns the initialized clone.
18464     */
18465    function initCloneByTag(object, tag, isDeep) {
18466      var Ctor = object.constructor;
18467      switch (tag) {
18468        case arrayBufferTag:
18469          return cloneArrayBuffer(object);
18470
18471        case boolTag:
18472        case dateTag:
18473          return new Ctor(+object);
18474
18475        case dataViewTag:
18476          return cloneDataView(object, isDeep);
18477
18478        case float32Tag: case float64Tag:
18479        case int8Tag: case int16Tag: case int32Tag:
18480        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
18481          return cloneTypedArray(object, isDeep);
18482
18483        case mapTag:
18484          return new Ctor;
18485
18486        case numberTag:
18487        case stringTag:
18488          return new Ctor(object);
18489
18490        case regexpTag:
18491          return cloneRegExp(object);
18492
18493        case setTag:
18494          return new Ctor;
18495
18496        case symbolTag:
18497          return cloneSymbol(object);
18498      }
18499    }
18500
18501    /**
18502     * Inserts wrapper `details` in a comment at the top of the `source` body.
18503     *
18504     * @private
18505     * @param {string} source The source to modify.
18506     * @returns {Array} details The details to insert.
18507     * @returns {string} Returns the modified source.
18508     */
18509    function insertWrapDetails(source, details) {
18510      var length = details.length;
18511      if (!length) {
18512        return source;
18513      }
18514      var lastIndex = length - 1;
18515      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
18516      details = details.join(length > 2 ? ', ' : ' ');
18517      return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
18518    }
18519
18520    /**
18521     * Checks if `value` is a flattenable `arguments` object or array.
18522     *
18523     * @private
18524     * @param {*} value The value to check.
18525     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
18526     */
18527    function isFlattenable(value) {
18528      return isArray(value) || isArguments(value) ||
18529        !!(spreadableSymbol && value && value[spreadableSymbol]);
18530    }
18531
18532    /**
18533     * Checks if `value` is a valid array-like index.
18534     *
18535     * @private
18536     * @param {*} value The value to check.
18537     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
18538     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
18539     */
18540    function isIndex(value, length) {
18541      var type = typeof value;
18542      length = length == null ? MAX_SAFE_INTEGER : length;
18543
18544      return !!length &&
18545        (type == 'number' ||
18546          (type != 'symbol' && reIsUint.test(value))) &&
18547            (value > -1 && value % 1 == 0 && value < length);
18548    }
18549
18550    /**
18551     * Checks if the given arguments are from an iteratee call.
18552     *
18553     * @private
18554     * @param {*} value The potential iteratee value argument.
18555     * @param {*} index The potential iteratee index or key argument.
18556     * @param {*} object The potential iteratee object argument.
18557     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
18558     *  else `false`.
18559     */
18560    function isIterateeCall(value, index, object) {
18561      if (!isObject(object)) {
18562        return false;
18563      }
18564      var type = typeof index;
18565      if (type == 'number'
18566            ? (isArrayLike(object) && isIndex(index, object.length))
18567            : (type == 'string' && index in object)
18568          ) {
18569        return eq(object[index], value);
18570      }
18571      return false;
18572    }
18573
18574    /**
18575     * Checks if `value` is a property name and not a property path.
18576     *
18577     * @private
18578     * @param {*} value The value to check.
18579     * @param {Object} [object] The object to query keys on.
18580     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
18581     */
18582    function isKey(value, object) {
18583      if (isArray(value)) {
18584        return false;
18585      }
18586      var type = typeof value;
18587      if (type == 'number' || type == 'symbol' || type == 'boolean' ||
18588          value == null || isSymbol(value)) {
18589        return true;
18590      }
18591      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
18592        (object != null && value in Object(object));
18593    }
18594
18595    /**
18596     * Checks if `value` is suitable for use as unique object key.
18597     *
18598     * @private
18599     * @param {*} value The value to check.
18600     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
18601     */
18602    function isKeyable(value) {
18603      var type = typeof value;
18604      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
18605        ? (value !== '__proto__')
18606        : (value === null);
18607    }
18608
18609    /**
18610     * Checks if `func` has a lazy counterpart.
18611     *
18612     * @private
18613     * @param {Function} func The function to check.
18614     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
18615     *  else `false`.
18616     */
18617    function isLaziable(func) {
18618      var funcName = getFuncName(func),
18619          other = lodash[funcName];
18620
18621      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
18622        return false;
18623      }
18624      if (func === other) {
18625        return true;
18626      }
18627      var data = getData(other);
18628      return !!data && func === data[0];
18629    }
18630
18631    /**
18632     * Checks if `func` has its source masked.
18633     *
18634     * @private
18635     * @param {Function} func The function to check.
18636     * @returns {boolean} Returns `true` if `func` is masked, else `false`.
18637     */
18638    function isMasked(func) {
18639      return !!maskSrcKey && (maskSrcKey in func);
18640    }
18641
18642    /**
18643     * Checks if `func` is capable of being masked.
18644     *
18645     * @private
18646     * @param {*} value The value to check.
18647     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
18648     */
18649    var isMaskable = coreJsData ? isFunction : stubFalse;
18650
18651    /**
18652     * Checks if `value` is likely a prototype object.
18653     *
18654     * @private
18655     * @param {*} value The value to check.
18656     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
18657     */
18658    function isPrototype(value) {
18659      var Ctor = value && value.constructor,
18660          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
18661
18662      return value === proto;
18663    }
18664
18665    /**
18666     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
18667     *
18668     * @private
18669     * @param {*} value The value to check.
18670     * @returns {boolean} Returns `true` if `value` if suitable for strict
18671     *  equality comparisons, else `false`.
18672     */
18673    function isStrictComparable(value) {
18674      return value === value && !isObject(value);
18675    }
18676
18677    /**
18678     * A specialized version of `matchesProperty` for source values suitable
18679     * for strict equality comparisons, i.e. `===`.
18680     *
18681     * @private
18682     * @param {string} key The key of the property to get.
18683     * @param {*} srcValue The value to match.
18684     * @returns {Function} Returns the new spec function.
18685     */
18686    function matchesStrictComparable(key, srcValue) {
18687      return function(object) {
18688        if (object == null) {
18689          return false;
18690        }
18691        return object[key] === srcValue &&
18692          (srcValue !== undefined || (key in Object(object)));
18693      };
18694    }
18695
18696    /**
18697     * A specialized version of `_.memoize` which clears the memoized function's
18698     * cache when it exceeds `MAX_MEMOIZE_SIZE`.
18699     *
18700     * @private
18701     * @param {Function} func The function to have its output memoized.
18702     * @returns {Function} Returns the new memoized function.
18703     */
18704    function memoizeCapped(func) {
18705      var result = memoize(func, function(key) {
18706        if (cache.size === MAX_MEMOIZE_SIZE) {
18707          cache.clear();
18708        }
18709        return key;
18710      });
18711
18712      var cache = result.cache;
18713      return result;
18714    }
18715
18716    /**
18717     * Merges the function metadata of `source` into `data`.
18718     *
18719     * Merging metadata reduces the number of wrappers used to invoke a function.
18720     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
18721     * may be applied regardless of execution order. Methods like `_.ary` and
18722     * `_.rearg` modify function arguments, making the order in which they are
18723     * executed important, preventing the merging of metadata. However, we make
18724     * an exception for a safe combined case where curried functions have `_.ary`
18725     * and or `_.rearg` applied.
18726     *
18727     * @private
18728     * @param {Array} data The destination metadata.
18729     * @param {Array} source The source metadata.
18730     * @returns {Array} Returns `data`.
18731     */
18732    function mergeData(data, source) {
18733      var bitmask = data[1],
18734          srcBitmask = source[1],
18735          newBitmask = bitmask | srcBitmask,
18736          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
18737
18738      var isCombo =
18739        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
18740        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
18741        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
18742
18743      // Exit early if metadata can't be merged.
18744      if (!(isCommon || isCombo)) {
18745        return data;
18746      }
18747      // Use source `thisArg` if available.
18748      if (srcBitmask & WRAP_BIND_FLAG) {
18749        data[2] = source[2];
18750        // Set when currying a bound function.
18751        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
18752      }
18753      // Compose partial arguments.
18754      var value = source[3];
18755      if (value) {
18756        var partials = data[3];
18757        data[3] = partials ? composeArgs(partials, value, source[4]) : value;
18758        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
18759      }
18760      // Compose partial right arguments.
18761      value = source[5];
18762      if (value) {
18763        partials = data[5];
18764        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
18765        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
18766      }
18767      // Use source `argPos` if available.
18768      value = source[7];
18769      if (value) {
18770        data[7] = value;
18771      }
18772      // Use source `ary` if it's smaller.
18773      if (srcBitmask & WRAP_ARY_FLAG) {
18774        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
18775      }
18776      // Use source `arity` if one is not provided.
18777      if (data[9] == null) {
18778        data[9] = source[9];
18779      }
18780      // Use source `func` and merge bitmasks.
18781      data[0] = source[0];
18782      data[1] = newBitmask;
18783
18784      return data;
18785    }
18786
18787    /**
18788     * This function is like
18789     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
18790     * except that it includes inherited enumerable properties.
18791     *
18792     * @private
18793     * @param {Object} object The object to query.
18794     * @returns {Array} Returns the array of property names.
18795     */
18796    function nativeKeysIn(object) {
18797      var result = [];
18798      if (object != null) {
18799        for (var key in Object(object)) {
18800          result.push(key);
18801        }
18802      }
18803      return result;
18804    }
18805
18806    /**
18807     * Converts `value` to a string using `Object.prototype.toString`.
18808     *
18809     * @private
18810     * @param {*} value The value to convert.
18811     * @returns {string} Returns the converted string.
18812     */
18813    function objectToString(value) {
18814      return nativeObjectToString.call(value);
18815    }
18816
18817    /**
18818     * A specialized version of `baseRest` which transforms the rest array.
18819     *
18820     * @private
18821     * @param {Function} func The function to apply a rest parameter to.
18822     * @param {number} [start=func.length-1] The start position of the rest parameter.
18823     * @param {Function} transform The rest array transform.
18824     * @returns {Function} Returns the new function.
18825     */
18826    function overRest(func, start, transform) {
18827      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
18828      return function() {
18829        var args = arguments,
18830            index = -1,
18831            length = nativeMax(args.length - start, 0),
18832            array = Array(length);
18833
18834        while (++index < length) {
18835          array[index] = args[start + index];
18836        }
18837        index = -1;
18838        var otherArgs = Array(start + 1);
18839        while (++index < start) {
18840          otherArgs[index] = args[index];
18841        }
18842        otherArgs[start] = transform(array);
18843        return apply(func, this, otherArgs);
18844      };
18845    }
18846
18847    /**
18848     * Gets the parent value at `path` of `object`.
18849     *
18850     * @private
18851     * @param {Object} object The object to query.
18852     * @param {Array} path The path to get the parent value of.
18853     * @returns {*} Returns the parent value.
18854     */
18855    function parent(object, path) {
18856      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
18857    }
18858
18859    /**
18860     * Reorder `array` according to the specified indexes where the element at
18861     * the first index is assigned as the first element, the element at
18862     * the second index is assigned as the second element, and so on.
18863     *
18864     * @private
18865     * @param {Array} array The array to reorder.
18866     * @param {Array} indexes The arranged array indexes.
18867     * @returns {Array} Returns `array`.
18868     */
18869    function reorder(array, indexes) {
18870      var arrLength = array.length,
18871          length = nativeMin(indexes.length, arrLength),
18872          oldArray = copyArray(array);
18873
18874      while (length--) {
18875        var index = indexes[length];
18876        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
18877      }
18878      return array;
18879    }
18880
18881    /**
18882     * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
18883     *
18884     * @private
18885     * @param {Object} object The object to query.
18886     * @param {string} key The key of the property to get.
18887     * @returns {*} Returns the property value.
18888     */
18889    function safeGet(object, key) {
18890      if (key === 'constructor' && typeof object[key] === 'function') {
18891        return;
18892      }
18893
18894      if (key == '__proto__') {
18895        return;
18896      }
18897
18898      return object[key];
18899    }
18900
18901    /**
18902     * Sets metadata for `func`.
18903     *
18904     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
18905     * period of time, it will trip its breaker and transition to an identity
18906     * function to avoid garbage collection pauses in V8. See
18907     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
18908     * for more details.
18909     *
18910     * @private
18911     * @param {Function} func The function to associate metadata with.
18912     * @param {*} data The metadata.
18913     * @returns {Function} Returns `func`.
18914     */
18915    var setData = shortOut(baseSetData);
18916
18917    /**
18918     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
18919     *
18920     * @private
18921     * @param {Function} func The function to delay.
18922     * @param {number} wait The number of milliseconds to delay invocation.
18923     * @returns {number|Object} Returns the timer id or timeout object.
18924     */
18925    var setTimeout = ctxSetTimeout || function(func, wait) {
18926      return root.setTimeout(func, wait);
18927    };
18928
18929    /**
18930     * Sets the `toString` method of `func` to return `string`.
18931     *
18932     * @private
18933     * @param {Function} func The function to modify.
18934     * @param {Function} string The `toString` result.
18935     * @returns {Function} Returns `func`.
18936     */
18937    var setToString = shortOut(baseSetToString);
18938
18939    /**
18940     * Sets the `toString` method of `wrapper` to mimic the source of `reference`
18941     * with wrapper details in a comment at the top of the source body.
18942     *
18943     * @private
18944     * @param {Function} wrapper The function to modify.
18945     * @param {Function} reference The reference function.
18946     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
18947     * @returns {Function} Returns `wrapper`.
18948     */
18949    function setWrapToString(wrapper, reference, bitmask) {
18950      var source = (reference + '');
18951      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
18952    }
18953
18954    /**
18955     * Creates a function that'll short out and invoke `identity` instead
18956     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
18957     * milliseconds.
18958     *
18959     * @private
18960     * @param {Function} func The function to restrict.
18961     * @returns {Function} Returns the new shortable function.
18962     */
18963    function shortOut(func) {
18964      var count = 0,
18965          lastCalled = 0;
18966
18967      return function() {
18968        var stamp = nativeNow(),
18969            remaining = HOT_SPAN - (stamp - lastCalled);
18970
18971        lastCalled = stamp;
18972        if (remaining > 0) {
18973          if (++count >= HOT_COUNT) {
18974            return arguments[0];
18975          }
18976        } else {
18977          count = 0;
18978        }
18979        return func.apply(undefined, arguments);
18980      };
18981    }
18982
18983    /**
18984     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
18985     *
18986     * @private
18987     * @param {Array} array The array to shuffle.
18988     * @param {number} [size=array.length] The size of `array`.
18989     * @returns {Array} Returns `array`.
18990     */
18991    function shuffleSelf(array, size) {
18992      var index = -1,
18993          length = array.length,
18994          lastIndex = length - 1;
18995
18996      size = size === undefined ? length : size;
18997      while (++index < size) {
18998        var rand = baseRandom(index, lastIndex),
18999            value = array[rand];
19000
19001        array[rand] = array[index];
19002        array[index] = value;
19003      }
19004      array.length = size;
19005      return array;
19006    }
19007
19008    /**
19009     * Converts `string` to a property path array.
19010     *
19011     * @private
19012     * @param {string} string The string to convert.
19013     * @returns {Array} Returns the property path array.
19014     */
19015    var stringToPath = memoizeCapped(function(string) {
19016      var result = [];
19017      if (string.charCodeAt(0) === 46 /* . */) {
19018        result.push('');
19019      }
19020      string.replace(rePropName, function(match, number, quote, subString) {
19021        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
19022      });
19023      return result;
19024    });
19025
19026    /**
19027     * Converts `value` to a string key if it's not a string or symbol.
19028     *
19029     * @private
19030     * @param {*} value The value to inspect.
19031     * @returns {string|symbol} Returns the key.
19032     */
19033    function toKey(value) {
19034      if (typeof value == 'string' || isSymbol(value)) {
19035        return value;
19036      }
19037      var result = (value + '');
19038      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
19039    }
19040
19041    /**
19042     * Converts `func` to its source code.
19043     *
19044     * @private
19045     * @param {Function} func The function to convert.
19046     * @returns {string} Returns the source code.
19047     */
19048    function toSource(func) {
19049      if (func != null) {
19050        try {
19051          return funcToString.call(func);
19052        } catch (e) {}
19053        try {
19054          return (func + '');
19055        } catch (e) {}
19056      }
19057      return '';
19058    }
19059
19060    /**
19061     * Updates wrapper `details` based on `bitmask` flags.
19062     *
19063     * @private
19064     * @returns {Array} details The details to modify.
19065     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
19066     * @returns {Array} Returns `details`.
19067     */
19068    function updateWrapDetails(details, bitmask) {
19069      arrayEach(wrapFlags, function(pair) {
19070        var value = '_.' + pair[0];
19071        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
19072          details.push(value);
19073        }
19074      });
19075      return details.sort();
19076    }
19077
19078    /**
19079     * Creates a clone of `wrapper`.
19080     *
19081     * @private
19082     * @param {Object} wrapper The wrapper to clone.
19083     * @returns {Object} Returns the cloned wrapper.
19084     */
19085    function wrapperClone(wrapper) {
19086      if (wrapper instanceof LazyWrapper) {
19087        return wrapper.clone();
19088      }
19089      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
19090      result.__actions__ = copyArray(wrapper.__actions__);
19091      result.__index__  = wrapper.__index__;
19092      result.__values__ = wrapper.__values__;
19093      return result;
19094    }
19095
19096    /*------------------------------------------------------------------------*/
19097
19098    /**
19099     * Creates an array of elements split into groups the length of `size`.
19100     * If `array` can't be split evenly, the final chunk will be the remaining
19101     * elements.
19102     *
19103     * @static
19104     * @memberOf _
19105     * @since 3.0.0
19106     * @category Array
19107     * @param {Array} array The array to process.
19108     * @param {number} [size=1] The length of each chunk
19109     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
19110     * @returns {Array} Returns the new array of chunks.
19111     * @example
19112     *
19113     * _.chunk(['a', 'b', 'c', 'd'], 2);
19114     * // => [['a', 'b'], ['c', 'd']]
19115     *
19116     * _.chunk(['a', 'b', 'c', 'd'], 3);
19117     * // => [['a', 'b', 'c'], ['d']]
19118     */
19119    function chunk(array, size, guard) {
19120      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
19121        size = 1;
19122      } else {
19123        size = nativeMax(toInteger(size), 0);
19124      }
19125      var length = array == null ? 0 : array.length;
19126      if (!length || size < 1) {
19127        return [];
19128      }
19129      var index = 0,
19130          resIndex = 0,
19131          result = Array(nativeCeil(length / size));
19132
19133      while (index < length) {
19134        result[resIndex++] = baseSlice(array, index, (index += size));
19135      }
19136      return result;
19137    }
19138
19139    /**
19140     * Creates an array with all falsey values removed. The values `false`, `null`,
19141     * `0`, `""`, `undefined`, and `NaN` are falsey.
19142     *
19143     * @static
19144     * @memberOf _
19145     * @since 0.1.0
19146     * @category Array
19147     * @param {Array} array The array to compact.
19148     * @returns {Array} Returns the new array of filtered values.
19149     * @example
19150     *
19151     * _.compact([0, 1, false, 2, '', 3]);
19152     * // => [1, 2, 3]
19153     */
19154    function compact(array) {
19155      var index = -1,
19156          length = array == null ? 0 : array.length,
19157          resIndex = 0,
19158          result = [];
19159
19160      while (++index < length) {
19161        var value = array[index];
19162        if (value) {
19163          result[resIndex++] = value;
19164        }
19165      }
19166      return result;
19167    }
19168
19169    /**
19170     * Creates a new array concatenating `array` with any additional arrays
19171     * and/or values.
19172     *
19173     * @static
19174     * @memberOf _
19175     * @since 4.0.0
19176     * @category Array
19177     * @param {Array} array The array to concatenate.
19178     * @param {...*} [values] The values to concatenate.
19179     * @returns {Array} Returns the new concatenated array.
19180     * @example
19181     *
19182     * var array = [1];
19183     * var other = _.concat(array, 2, [3], [[4]]);
19184     *
19185     * console.log(other);
19186     * // => [1, 2, 3, [4]]
19187     *
19188     * console.log(array);
19189     * // => [1]
19190     */
19191    function concat() {
19192      var length = arguments.length;
19193      if (!length) {
19194        return [];
19195      }
19196      var args = Array(length - 1),
19197          array = arguments[0],
19198          index = length;
19199
19200      while (index--) {
19201        args[index - 1] = arguments[index];
19202      }
19203      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
19204    }
19205
19206    /**
19207     * Creates an array of `array` values not included in the other given arrays
19208     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
19209     * for equality comparisons. The order and references of result values are
19210     * determined by the first array.
19211     *
19212     * **Note:** Unlike `_.pullAll`, this method returns a new array.
19213     *
19214     * @static
19215     * @memberOf _
19216     * @since 0.1.0
19217     * @category Array
19218     * @param {Array} array The array to inspect.
19219     * @param {...Array} [values] The values to exclude.
19220     * @returns {Array} Returns the new array of filtered values.
19221     * @see _.without, _.xor
19222     * @example
19223     *
19224     * _.difference([2, 1], [2, 3]);
19225     * // => [1]
19226     */
19227    var difference = baseRest(function(array, values) {
19228      return isArrayLikeObject(array)
19229        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
19230        : [];
19231    });
19232
19233    /**
19234     * This method is like `_.difference` except that it accepts `iteratee` which
19235     * is invoked for each element of `array` and `values` to generate the criterion
19236     * by which they're compared. The order and references of result values are
19237     * determined by the first array. The iteratee is invoked with one argument:
19238     * (value).
19239     *
19240     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
19241     *
19242     * @static
19243     * @memberOf _
19244     * @since 4.0.0
19245     * @category Array
19246     * @param {Array} array The array to inspect.
19247     * @param {...Array} [values] The values to exclude.
19248     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
19249     * @returns {Array} Returns the new array of filtered values.
19250     * @example
19251     *
19252     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
19253     * // => [1.2]
19254     *
19255     * // The `_.property` iteratee shorthand.
19256     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
19257     * // => [{ 'x': 2 }]
19258     */
19259    var differenceBy = baseRest(function(array, values) {
19260      var iteratee = last(values);
19261      if (isArrayLikeObject(iteratee)) {
19262        iteratee = undefined;
19263      }
19264      return isArrayLikeObject(array)
19265        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
19266        : [];
19267    });
19268
19269    /**
19270     * This method is like `_.difference` except that it accepts `comparator`
19271     * which is invoked to compare elements of `array` to `values`. The order and
19272     * references of result values are determined by the first array. The comparator
19273     * is invoked with two arguments: (arrVal, othVal).
19274     *
19275     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
19276     *
19277     * @static
19278     * @memberOf _
19279     * @since 4.0.0
19280     * @category Array
19281     * @param {Array} array The array to inspect.
19282     * @param {...Array} [values] The values to exclude.
19283     * @param {Function} [comparator] The comparator invoked per element.
19284     * @returns {Array} Returns the new array of filtered values.
19285     * @example
19286     *
19287     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
19288     *
19289     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
19290     * // => [{ 'x': 2, 'y': 1 }]
19291     */
19292    var differenceWith = baseRest(function(array, values) {
19293      var comparator = last(values);
19294      if (isArrayLikeObject(comparator)) {
19295        comparator = undefined;
19296      }
19297      return isArrayLikeObject(array)
19298        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
19299        : [];
19300    });
19301
19302    /**
19303     * Creates a slice of `array` with `n` elements dropped from the beginning.
19304     *
19305     * @static
19306     * @memberOf _
19307     * @since 0.5.0
19308     * @category Array
19309     * @param {Array} array The array to query.
19310     * @param {number} [n=1] The number of elements to drop.
19311     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
19312     * @returns {Array} Returns the slice of `array`.
19313     * @example
19314     *
19315     * _.drop([1, 2, 3]);
19316     * // => [2, 3]
19317     *
19318     * _.drop([1, 2, 3], 2);
19319     * // => [3]
19320     *
19321     * _.drop([1, 2, 3], 5);
19322     * // => []
19323     *
19324     * _.drop([1, 2, 3], 0);
19325     * // => [1, 2, 3]
19326     */
19327    function drop(array, n, guard) {
19328      var length = array == null ? 0 : array.length;
19329      if (!length) {
19330        return [];
19331      }
19332      n = (guard || n === undefined) ? 1 : toInteger(n);
19333      return baseSlice(array, n < 0 ? 0 : n, length);
19334    }
19335
19336    /**
19337     * Creates a slice of `array` with `n` elements dropped from the end.
19338     *
19339     * @static
19340     * @memberOf _
19341     * @since 3.0.0
19342     * @category Array
19343     * @param {Array} array The array to query.
19344     * @param {number} [n=1] The number of elements to drop.
19345     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
19346     * @returns {Array} Returns the slice of `array`.
19347     * @example
19348     *
19349     * _.dropRight([1, 2, 3]);
19350     * // => [1, 2]
19351     *
19352     * _.dropRight([1, 2, 3], 2);
19353     * // => [1]
19354     *
19355     * _.dropRight([1, 2, 3], 5);
19356     * // => []
19357     *
19358     * _.dropRight([1, 2, 3], 0);
19359     * // => [1, 2, 3]
19360     */
19361    function dropRight(array, n, guard) {
19362      var length = array == null ? 0 : array.length;
19363      if (!length) {
19364        return [];
19365      }
19366      n = (guard || n === undefined) ? 1 : toInteger(n);
19367      n = length - n;
19368      return baseSlice(array, 0, n < 0 ? 0 : n);
19369    }
19370
19371    /**
19372     * Creates a slice of `array` excluding elements dropped from the end.
19373     * Elements are dropped until `predicate` returns falsey. The predicate is
19374     * invoked with three arguments: (value, index, array).
19375     *
19376     * @static
19377     * @memberOf _
19378     * @since 3.0.0
19379     * @category Array
19380     * @param {Array} array The array to query.
19381     * @param {Function} [predicate=_.identity] The function invoked per iteration.
19382     * @returns {Array} Returns the slice of `array`.
19383     * @example
19384     *
19385     * var users = [
19386     *   { 'user': 'barney',  'active': true },
19387     *   { 'user': 'fred',    'active': false },
19388     *   { 'user': 'pebbles', 'active': false }
19389     * ];
19390     *
19391     * _.dropRightWhile(users, function(o) { return !o.active; });
19392     * // => objects for ['barney']
19393     *
19394     * // The `_.matches` iteratee shorthand.
19395     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
19396     * // => objects for ['barney', 'fred']
19397     *
19398     * // The `_.matchesProperty` iteratee shorthand.
19399     * _.dropRightWhile(users, ['active', false]);
19400     * // => objects for ['barney']
19401     *
19402     * // The `_.property` iteratee shorthand.
19403     * _.dropRightWhile(users, 'active');
19404     * // => objects for ['barney', 'fred', 'pebbles']
19405     */
19406    function dropRightWhile(array, predicate) {
19407      return (array && array.length)
19408        ? baseWhile(array, getIteratee(predicate, 3), true, true)
19409        : [];
19410    }
19411
19412    /**
19413     * Creates a slice of `array` excluding elements dropped from the beginning.
19414     * Elements are dropped until `predicate` returns falsey. The predicate is
19415     * invoked with three arguments: (value, index, array).
19416     *
19417     * @static
19418     * @memberOf _
19419     * @since 3.0.0
19420     * @category Array
19421     * @param {Array} array The array to query.
19422     * @param {Function} [predicate=_.identity] The function invoked per iteration.
19423     * @returns {Array} Returns the slice of `array`.
19424     * @example
19425     *
19426     * var users = [
19427     *   { 'user': 'barney',  'active': false },
19428     *   { 'user': 'fred',    'active': false },
19429     *   { 'user': 'pebbles', 'active': true }
19430     * ];
19431     *
19432     * _.dropWhile(users, function(o) { return !o.active; });
19433     * // => objects for ['pebbles']
19434     *
19435     * // The `_.matches` iteratee shorthand.
19436     * _.dropWhile(users, { 'user': 'barney', 'active': false });
19437     * // => objects for ['fred', 'pebbles']
19438     *
19439     * // The `_.matchesProperty` iteratee shorthand.
19440     * _.dropWhile(users, ['active', false]);
19441     * // => objects for ['pebbles']
19442     *
19443     * // The `_.property` iteratee shorthand.
19444     * _.dropWhile(users, 'active');
19445     * // => objects for ['barney', 'fred', 'pebbles']
19446     */
19447    function dropWhile(array, predicate) {
19448      return (array && array.length)
19449        ? baseWhile(array, getIteratee(predicate, 3), true)
19450        : [];
19451    }
19452
19453    /**
19454     * Fills elements of `array` with `value` from `start` up to, but not
19455     * including, `end`.
19456     *
19457     * **Note:** This method mutates `array`.
19458     *
19459     * @static
19460     * @memberOf _
19461     * @since 3.2.0
19462     * @category Array
19463     * @param {Array} array The array to fill.
19464     * @param {*} value The value to fill `array` with.
19465     * @param {number} [start=0] The start position.
19466     * @param {number} [end=array.length] The end position.
19467     * @returns {Array} Returns `array`.
19468     * @example
19469     *
19470     * var array = [1, 2, 3];
19471     *
19472     * _.fill(array, 'a');
19473     * console.log(array);
19474     * // => ['a', 'a', 'a']
19475     *
19476     * _.fill(Array(3), 2);
19477     * // => [2, 2, 2]
19478     *
19479     * _.fill([4, 6, 8, 10], '*', 1, 3);
19480     * // => [4, '*', '*', 10]
19481     */
19482    function fill(array, value, start, end) {
19483      var length = array == null ? 0 : array.length;
19484      if (!length) {
19485        return [];
19486      }
19487      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
19488        start = 0;
19489        end = length;
19490      }
19491      return baseFill(array, value, start, end);
19492    }
19493
19494    /**
19495     * This method is like `_.find` except that it returns the index of the first
19496     * element `predicate` returns truthy for instead of the element itself.
19497     *
19498     * @static
19499     * @memberOf _
19500     * @since 1.1.0
19501     * @category Array
19502     * @param {Array} array The array to inspect.
19503     * @param {Function} [predicate=_.identity] The function invoked per iteration.
19504     * @param {number} [fromIndex=0] The index to search from.
19505     * @returns {number} Returns the index of the found element, else `-1`.
19506     * @example
19507     *
19508     * var users = [
19509     *   { 'user': 'barney',  'active': false },
19510     *   { 'user': 'fred',    'active': false },
19511     *   { 'user': 'pebbles', 'active': true }
19512     * ];
19513     *
19514     * _.findIndex(users, function(o) { return o.user == 'barney'; });
19515     * // => 0
19516     *
19517     * // The `_.matches` iteratee shorthand.
19518     * _.findIndex(users, { 'user': 'fred', 'active': false });
19519     * // => 1
19520     *
19521     * // The `_.matchesProperty` iteratee shorthand.
19522     * _.findIndex(users, ['active', false]);
19523     * // => 0
19524     *
19525     * // The `_.property` iteratee shorthand.
19526     * _.findIndex(users, 'active');
19527     * // => 2
19528     */
19529    function findIndex(array, predicate, fromIndex) {
19530      var length = array == null ? 0 : array.length;
19531      if (!length) {
19532        return -1;
19533      }
19534      var index = fromIndex == null ? 0 : toInteger(fromIndex);
19535      if (index < 0) {
19536        index = nativeMax(length + index, 0);
19537      }
19538      return baseFindIndex(array, getIteratee(predicate, 3), index);
19539    }
19540
19541    /**
19542     * This method is like `_.findIndex` except that it iterates over elements
19543     * of `collection` from right to left.
19544     *
19545     * @static
19546     * @memberOf _
19547     * @since 2.0.0
19548     * @category Array
19549     * @param {Array} array The array to inspect.
19550     * @param {Function} [predicate=_.identity] The function invoked per iteration.
19551     * @param {number} [fromIndex=array.length-1] The index to search from.
19552     * @returns {number} Returns the index of the found element, else `-1`.
19553     * @example
19554     *
19555     * var users = [
19556     *   { 'user': 'barney',  'active': true },
19557     *   { 'user': 'fred',    'active': false },
19558     *   { 'user': 'pebbles', 'active': false }
19559     * ];
19560     *
19561     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
19562     * // => 2
19563     *
19564     * // The `_.matches` iteratee shorthand.
19565     * _.findLastIndex(users, { 'user': 'barney', 'active': true });
19566     * // => 0
19567     *
19568     * // The `_.matchesProperty` iteratee shorthand.
19569     * _.findLastIndex(users, ['active', false]);
19570     * // => 2
19571     *
19572     * // The `_.property` iteratee shorthand.
19573     * _.findLastIndex(users, 'active');
19574     * // => 0
19575     */
19576    function findLastIndex(array, predicate, fromIndex) {
19577      var length = array == null ? 0 : array.length;
19578      if (!length) {
19579        return -1;
19580      }
19581      var index = length - 1;
19582      if (fromIndex !== undefined) {
19583        index = toInteger(fromIndex);
19584        index = fromIndex < 0
19585          ? nativeMax(length + index, 0)
19586          : nativeMin(index, length - 1);
19587      }
19588      return baseFindIndex(array, getIteratee(predicate, 3), index, true);
19589    }
19590
19591    /**
19592     * Flattens `array` a single level deep.
19593     *
19594     * @static
19595     * @memberOf _
19596     * @since 0.1.0
19597     * @category Array
19598     * @param {Array} array The array to flatten.
19599     * @returns {Array} Returns the new flattened array.
19600     * @example
19601     *
19602     * _.flatten([1, [2, [3, [4]], 5]]);
19603     * // => [1, 2, [3, [4]], 5]
19604     */
19605    function flatten(array) {
19606      var length = array == null ? 0 : array.length;
19607      return length ? baseFlatten(array, 1) : [];
19608    }
19609
19610    /**
19611     * Recursively flattens `array`.
19612     *
19613     * @static
19614     * @memberOf _
19615     * @since 3.0.0
19616     * @category Array
19617     * @param {Array} array The array to flatten.
19618     * @returns {Array} Returns the new flattened array.
19619     * @example
19620     *
19621     * _.flattenDeep([1, [2, [3, [4]], 5]]);
19622     * // => [1, 2, 3, 4, 5]
19623     */
19624    function flattenDeep(array) {
19625      var length = array == null ? 0 : array.length;
19626      return length ? baseFlatten(array, INFINITY) : [];
19627    }
19628
19629    /**
19630     * Recursively flatten `array` up to `depth` times.
19631     *
19632     * @static
19633     * @memberOf _
19634     * @since 4.4.0
19635     * @category Array
19636     * @param {Array} array The array to flatten.
19637     * @param {number} [depth=1] The maximum recursion depth.
19638     * @returns {Array} Returns the new flattened array.
19639     * @example
19640     *
19641     * var array = [1, [2, [3, [4]], 5]];
19642     *
19643     * _.flattenDepth(array, 1);
19644     * // => [1, 2, [3, [4]], 5]
19645     *
19646     * _.flattenDepth(array, 2);
19647     * // => [1, 2, 3, [4], 5]
19648     */
19649    function flattenDepth(array, depth) {
19650      var length = array == null ? 0 : array.length;
19651      if (!length) {
19652        return [];
19653      }
19654      depth = depth === undefined ? 1 : toInteger(depth);
19655      return baseFlatten(array, depth);
19656    }
19657
19658    /**
19659     * The inverse of `_.toPairs`; this method returns an object composed
19660     * from key-value `pairs`.
19661     *
19662     * @static
19663     * @memberOf _
19664     * @since 4.0.0
19665     * @category Array
19666     * @param {Array} pairs The key-value pairs.
19667     * @returns {Object} Returns the new object.
19668     * @example
19669     *
19670     * _.fromPairs([['a', 1], ['b', 2]]);
19671     * // => { 'a': 1, 'b': 2 }
19672     */
19673    function fromPairs(pairs) {
19674      var index = -1,
19675          length = pairs == null ? 0 : pairs.length,
19676          result = {};
19677
19678      while (++index < length) {
19679        var pair = pairs[index];
19680        result[pair[0]] = pair[1];
19681      }
19682      return result;
19683    }
19684
19685    /**
19686     * Gets the first element of `array`.
19687     *
19688     * @static
19689     * @memberOf _
19690     * @since 0.1.0
19691     * @alias first
19692     * @category Array
19693     * @param {Array} array The array to query.
19694     * @returns {*} Returns the first element of `array`.
19695     * @example
19696     *
19697     * _.head([1, 2, 3]);
19698     * // => 1
19699     *
19700     * _.head([]);
19701     * // => undefined
19702     */
19703    function head(array) {
19704      return (array && array.length) ? array[0] : undefined;
19705    }
19706
19707    /**
19708     * Gets the index at which the first occurrence of `value` is found in `array`
19709     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
19710     * for equality comparisons. If `fromIndex` is negative, it's used as the
19711     * offset from the end of `array`.
19712     *
19713     * @static
19714     * @memberOf _
19715     * @since 0.1.0
19716     * @category Array
19717     * @param {Array} array The array to inspect.
19718     * @param {*} value The value to search for.
19719     * @param {number} [fromIndex=0] The index to search from.
19720     * @returns {number} Returns the index of the matched value, else `-1`.
19721     * @example
19722     *
19723     * _.indexOf([1, 2, 1, 2], 2);
19724     * // => 1
19725     *
19726     * // Search from the `fromIndex`.
19727     * _.indexOf([1, 2, 1, 2], 2, 2);
19728     * // => 3
19729     */
19730    function indexOf(array, value, fromIndex) {
19731      var length = array == null ? 0 : array.length;
19732      if (!length) {
19733        return -1;
19734      }
19735      var index = fromIndex == null ? 0 : toInteger(fromIndex);
19736      if (index < 0) {
19737        index = nativeMax(length + index, 0);
19738      }
19739      return baseIndexOf(array, value, index);
19740    }
19741
19742    /**
19743     * Gets all but the last element of `array`.
19744     *
19745     * @static
19746     * @memberOf _
19747     * @since 0.1.0
19748     * @category Array
19749     * @param {Array} array The array to query.
19750     * @returns {Array} Returns the slice of `array`.
19751     * @example
19752     *
19753     * _.initial([1, 2, 3]);
19754     * // => [1, 2]
19755     */
19756    function initial(array) {
19757      var length = array == null ? 0 : array.length;
19758      return length ? baseSlice(array, 0, -1) : [];
19759    }
19760
19761    /**
19762     * Creates an array of unique values that are included in all given arrays
19763     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
19764     * for equality comparisons. The order and references of result values are
19765     * determined by the first array.
19766     *
19767     * @static
19768     * @memberOf _
19769     * @since 0.1.0
19770     * @category Array
19771     * @param {...Array} [arrays] The arrays to inspect.
19772     * @returns {Array} Returns the new array of intersecting values.
19773     * @example
19774     *
19775     * _.intersection([2, 1], [2, 3]);
19776     * // => [2]
19777     */
19778    var intersection = baseRest(function(arrays) {
19779      var mapped = arrayMap(arrays, castArrayLikeObject);
19780      return (mapped.length && mapped[0] === arrays[0])
19781        ? baseIntersection(mapped)
19782        : [];
19783    });
19784
19785    /**
19786     * This method is like `_.intersection` except that it accepts `iteratee`
19787     * which is invoked for each element of each `arrays` to generate the criterion
19788     * by which they're compared. The order and references of result values are
19789     * determined by the first array. The iteratee is invoked with one argument:
19790     * (value).
19791     *
19792     * @static
19793     * @memberOf _
19794     * @since 4.0.0
19795     * @category Array
19796     * @param {...Array} [arrays] The arrays to inspect.
19797     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
19798     * @returns {Array} Returns the new array of intersecting values.
19799     * @example
19800     *
19801     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
19802     * // => [2.1]
19803     *
19804     * // The `_.property` iteratee shorthand.
19805     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
19806     * // => [{ 'x': 1 }]
19807     */
19808    var intersectionBy = baseRest(function(arrays) {
19809      var iteratee = last(arrays),
19810          mapped = arrayMap(arrays, castArrayLikeObject);
19811
19812      if (iteratee === last(mapped)) {
19813        iteratee = undefined;
19814      } else {
19815        mapped.pop();
19816      }
19817      return (mapped.length && mapped[0] === arrays[0])
19818        ? baseIntersection(mapped, getIteratee(iteratee, 2))
19819        : [];
19820    });
19821
19822    /**
19823     * This method is like `_.intersection` except that it accepts `comparator`
19824     * which is invoked to compare elements of `arrays`. The order and references
19825     * of result values are determined by the first array. The comparator is
19826     * invoked with two arguments: (arrVal, othVal).
19827     *
19828     * @static
19829     * @memberOf _
19830     * @since 4.0.0
19831     * @category Array
19832     * @param {...Array} [arrays] The arrays to inspect.
19833     * @param {Function} [comparator] The comparator invoked per element.
19834     * @returns {Array} Returns the new array of intersecting values.
19835     * @example
19836     *
19837     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
19838     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
19839     *
19840     * _.intersectionWith(objects, others, _.isEqual);
19841     * // => [{ 'x': 1, 'y': 2 }]
19842     */
19843    var intersectionWith = baseRest(function(arrays) {
19844      var comparator = last(arrays),
19845          mapped = arrayMap(arrays, castArrayLikeObject);
19846
19847      comparator = typeof comparator == 'function' ? comparator : undefined;
19848      if (comparator) {
19849        mapped.pop();
19850      }
19851      return (mapped.length && mapped[0] === arrays[0])
19852        ? baseIntersection(mapped, undefined, comparator)
19853        : [];
19854    });
19855
19856    /**
19857     * Converts all elements in `array` into a string separated by `separator`.
19858     *
19859     * @static
19860     * @memberOf _
19861     * @since 4.0.0
19862     * @category Array
19863     * @param {Array} array The array to convert.
19864     * @param {string} [separator=','] The element separator.
19865     * @returns {string} Returns the joined string.
19866     * @example
19867     *
19868     * _.join(['a', 'b', 'c'], '~');
19869     * // => 'a~b~c'
19870     */
19871    function join(array, separator) {
19872      return array == null ? '' : nativeJoin.call(array, separator);
19873    }
19874
19875    /**
19876     * Gets the last element of `array`.
19877     *
19878     * @static
19879     * @memberOf _
19880     * @since 0.1.0
19881     * @category Array
19882     * @param {Array} array The array to query.
19883     * @returns {*} Returns the last element of `array`.
19884     * @example
19885     *
19886     * _.last([1, 2, 3]);
19887     * // => 3
19888     */
19889    function last(array) {
19890      var length = array == null ? 0 : array.length;
19891      return length ? array[length - 1] : undefined;
19892    }
19893
19894    /**
19895     * This method is like `_.indexOf` except that it iterates over elements of
19896     * `array` from right to left.
19897     *
19898     * @static
19899     * @memberOf _
19900     * @since 0.1.0
19901     * @category Array
19902     * @param {Array} array The array to inspect.
19903     * @param {*} value The value to search for.
19904     * @param {number} [fromIndex=array.length-1] The index to search from.
19905     * @returns {number} Returns the index of the matched value, else `-1`.
19906     * @example
19907     *
19908     * _.lastIndexOf([1, 2, 1, 2], 2);
19909     * // => 3
19910     *
19911     * // Search from the `fromIndex`.
19912     * _.lastIndexOf([1, 2, 1, 2], 2, 2);
19913     * // => 1
19914     */
19915    function lastIndexOf(array, value, fromIndex) {
19916      var length = array == null ? 0 : array.length;
19917      if (!length) {
19918        return -1;
19919      }
19920      var index = length;
19921      if (fromIndex !== undefined) {
19922        index = toInteger(fromIndex);
19923        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
19924      }
19925      return value === value
19926        ? strictLastIndexOf(array, value, index)
19927        : baseFindIndex(array, baseIsNaN, index, true);
19928    }
19929
19930    /**
19931     * Gets the element at index `n` of `array`. If `n` is negative, the nth
19932     * element from the end is returned.
19933     *
19934     * @static
19935     * @memberOf _
19936     * @since 4.11.0
19937     * @category Array
19938     * @param {Array} array The array to query.
19939     * @param {number} [n=0] The index of the element to return.
19940     * @returns {*} Returns the nth element of `array`.
19941     * @example
19942     *
19943     * var array = ['a', 'b', 'c', 'd'];
19944     *
19945     * _.nth(array, 1);
19946     * // => 'b'
19947     *
19948     * _.nth(array, -2);
19949     * // => 'c';
19950     */
19951    function nth(array, n) {
19952      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
19953    }
19954
19955    /**
19956     * Removes all given values from `array` using
19957     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
19958     * for equality comparisons.
19959     *
19960     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
19961     * to remove elements from an array by predicate.
19962     *
19963     * @static
19964     * @memberOf _
19965     * @since 2.0.0
19966     * @category Array
19967     * @param {Array} array The array to modify.
19968     * @param {...*} [values] The values to remove.
19969     * @returns {Array} Returns `array`.
19970     * @example
19971     *
19972     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
19973     *
19974     * _.pull(array, 'a', 'c');
19975     * console.log(array);
19976     * // => ['b', 'b']
19977     */
19978    var pull = baseRest(pullAll);
19979
19980    /**
19981     * This method is like `_.pull` except that it accepts an array of values to remove.
19982     *
19983     * **Note:** Unlike `_.difference`, this method mutates `array`.
19984     *
19985     * @static
19986     * @memberOf _
19987     * @since 4.0.0
19988     * @category Array
19989     * @param {Array} array The array to modify.
19990     * @param {Array} values The values to remove.
19991     * @returns {Array} Returns `array`.
19992     * @example
19993     *
19994     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
19995     *
19996     * _.pullAll(array, ['a', 'c']);
19997     * console.log(array);
19998     * // => ['b', 'b']
19999     */
20000    function pullAll(array, values) {
20001      return (array && array.length && values && values.length)
20002        ? basePullAll(array, values)
20003        : array;
20004    }
20005
20006    /**
20007     * This method is like `_.pullAll` except that it accepts `iteratee` which is
20008     * invoked for each element of `array` and `values` to generate the criterion
20009     * by which they're compared. The iteratee is invoked with one argument: (value).
20010     *
20011     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
20012     *
20013     * @static
20014     * @memberOf _
20015     * @since 4.0.0
20016     * @category Array
20017     * @param {Array} array The array to modify.
20018     * @param {Array} values The values to remove.
20019     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
20020     * @returns {Array} Returns `array`.
20021     * @example
20022     *
20023     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
20024     *
20025     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
20026     * console.log(array);
20027     * // => [{ 'x': 2 }]
20028     */
20029    function pullAllBy(array, values, iteratee) {
20030      return (array && array.length && values && values.length)
20031        ? basePullAll(array, values, getIteratee(iteratee, 2))
20032        : array;
20033    }
20034
20035    /**
20036     * This method is like `_.pullAll` except that it accepts `comparator` which
20037     * is invoked to compare elements of `array` to `values`. The comparator is
20038     * invoked with two arguments: (arrVal, othVal).
20039     *
20040     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
20041     *
20042     * @static
20043     * @memberOf _
20044     * @since 4.6.0
20045     * @category Array
20046     * @param {Array} array The array to modify.
20047     * @param {Array} values The values to remove.
20048     * @param {Function} [comparator] The comparator invoked per element.
20049     * @returns {Array} Returns `array`.
20050     * @example
20051     *
20052     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
20053     *
20054     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
20055     * console.log(array);
20056     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
20057     */
20058    function pullAllWith(array, values, comparator) {
20059      return (array && array.length && values && values.length)
20060        ? basePullAll(array, values, undefined, comparator)
20061        : array;
20062    }
20063
20064    /**
20065     * Removes elements from `array` corresponding to `indexes` and returns an
20066     * array of removed elements.
20067     *
20068     * **Note:** Unlike `_.at`, this method mutates `array`.
20069     *
20070     * @static
20071     * @memberOf _
20072     * @since 3.0.0
20073     * @category Array
20074     * @param {Array} array The array to modify.
20075     * @param {...(number|number[])} [indexes] The indexes of elements to remove.
20076     * @returns {Array} Returns the new array of removed elements.
20077     * @example
20078     *
20079     * var array = ['a', 'b', 'c', 'd'];
20080     * var pulled = _.pullAt(array, [1, 3]);
20081     *
20082     * console.log(array);
20083     * // => ['a', 'c']
20084     *
20085     * console.log(pulled);
20086     * // => ['b', 'd']
20087     */
20088    var pullAt = flatRest(function(array, indexes) {
20089      var length = array == null ? 0 : array.length,
20090          result = baseAt(array, indexes);
20091
20092      basePullAt(array, arrayMap(indexes, function(index) {
20093        return isIndex(index, length) ? +index : index;
20094      }).sort(compareAscending));
20095
20096      return result;
20097    });
20098
20099    /**
20100     * Removes all elements from `array` that `predicate` returns truthy for
20101     * and returns an array of the removed elements. The predicate is invoked
20102     * with three arguments: (value, index, array).
20103     *
20104     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
20105     * to pull elements from an array by value.
20106     *
20107     * @static
20108     * @memberOf _
20109     * @since 2.0.0
20110     * @category Array
20111     * @param {Array} array The array to modify.
20112     * @param {Function} [predicate=_.identity] The function invoked per iteration.
20113     * @returns {Array} Returns the new array of removed elements.
20114     * @example
20115     *
20116     * var array = [1, 2, 3, 4];
20117     * var evens = _.remove(array, function(n) {
20118     *   return n % 2 == 0;
20119     * });
20120     *
20121     * console.log(array);
20122     * // => [1, 3]
20123     *
20124     * console.log(evens);
20125     * // => [2, 4]
20126     */
20127    function remove(array, predicate) {
20128      var result = [];
20129      if (!(array && array.length)) {
20130        return result;
20131      }
20132      var index = -1,
20133          indexes = [],
20134          length = array.length;
20135
20136      predicate = getIteratee(predicate, 3);
20137      while (++index < length) {
20138        var value = array[index];
20139        if (predicate(value, index, array)) {
20140          result.push(value);
20141          indexes.push(index);
20142        }
20143      }
20144      basePullAt(array, indexes);
20145      return result;
20146    }
20147
20148    /**
20149     * Reverses `array` so that the first element becomes the last, the second
20150     * element becomes the second to last, and so on.
20151     *
20152     * **Note:** This method mutates `array` and is based on
20153     * [`Array#reverse`](https://mdn.io/Array/reverse).
20154     *
20155     * @static
20156     * @memberOf _
20157     * @since 4.0.0
20158     * @category Array
20159     * @param {Array} array The array to modify.
20160     * @returns {Array} Returns `array`.
20161     * @example
20162     *
20163     * var array = [1, 2, 3];
20164     *
20165     * _.reverse(array);
20166     * // => [3, 2, 1]
20167     *
20168     * console.log(array);
20169     * // => [3, 2, 1]
20170     */
20171    function reverse(array) {
20172      return array == null ? array : nativeReverse.call(array);
20173    }
20174
20175    /**
20176     * Creates a slice of `array` from `start` up to, but not including, `end`.
20177     *
20178     * **Note:** This method is used instead of
20179     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
20180     * returned.
20181     *
20182     * @static
20183     * @memberOf _
20184     * @since 3.0.0
20185     * @category Array
20186     * @param {Array} array The array to slice.
20187     * @param {number} [start=0] The start position.
20188     * @param {number} [end=array.length] The end position.
20189     * @returns {Array} Returns the slice of `array`.
20190     */
20191    function slice(array, start, end) {
20192      var length = array == null ? 0 : array.length;
20193      if (!length) {
20194        return [];
20195      }
20196      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
20197        start = 0;
20198        end = length;
20199      }
20200      else {
20201        start = start == null ? 0 : toInteger(start);
20202        end = end === undefined ? length : toInteger(end);
20203      }
20204      return baseSlice(array, start, end);
20205    }
20206
20207    /**
20208     * Uses a binary search to determine the lowest index at which `value`
20209     * should be inserted into `array` in order to maintain its sort order.
20210     *
20211     * @static
20212     * @memberOf _
20213     * @since 0.1.0
20214     * @category Array
20215     * @param {Array} array The sorted array to inspect.
20216     * @param {*} value The value to evaluate.
20217     * @returns {number} Returns the index at which `value` should be inserted
20218     *  into `array`.
20219     * @example
20220     *
20221     * _.sortedIndex([30, 50], 40);
20222     * // => 1
20223     */
20224    function sortedIndex(array, value) {
20225      return baseSortedIndex(array, value);
20226    }
20227
20228    /**
20229     * This method is like `_.sortedIndex` except that it accepts `iteratee`
20230     * which is invoked for `value` and each element of `array` to compute their
20231     * sort ranking. The iteratee is invoked with one argument: (value).
20232     *
20233     * @static
20234     * @memberOf _
20235     * @since 4.0.0
20236     * @category Array
20237     * @param {Array} array The sorted array to inspect.
20238     * @param {*} value The value to evaluate.
20239     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
20240     * @returns {number} Returns the index at which `value` should be inserted
20241     *  into `array`.
20242     * @example
20243     *
20244     * var objects = [{ 'x': 4 }, { 'x': 5 }];
20245     *
20246     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
20247     * // => 0
20248     *
20249     * // The `_.property` iteratee shorthand.
20250     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
20251     * // => 0
20252     */
20253    function sortedIndexBy(array, value, iteratee) {
20254      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
20255    }
20256
20257    /**
20258     * This method is like `_.indexOf` except that it performs a binary
20259     * search on a sorted `array`.
20260     *
20261     * @static
20262     * @memberOf _
20263     * @since 4.0.0
20264     * @category Array
20265     * @param {Array} array The array to inspect.
20266     * @param {*} value The value to search for.
20267     * @returns {number} Returns the index of the matched value, else `-1`.
20268     * @example
20269     *
20270     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
20271     * // => 1
20272     */
20273    function sortedIndexOf(array, value) {
20274      var length = array == null ? 0 : array.length;
20275      if (length) {
20276        var index = baseSortedIndex(array, value);
20277        if (index < length && eq(array[index], value)) {
20278          return index;
20279        }
20280      }
20281      return -1;
20282    }
20283
20284    /**
20285     * This method is like `_.sortedIndex` except that it returns the highest
20286     * index at which `value` should be inserted into `array` in order to
20287     * maintain its sort order.
20288     *
20289     * @static
20290     * @memberOf _
20291     * @since 3.0.0
20292     * @category Array
20293     * @param {Array} array The sorted array to inspect.
20294     * @param {*} value The value to evaluate.
20295     * @returns {number} Returns the index at which `value` should be inserted
20296     *  into `array`.
20297     * @example
20298     *
20299     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
20300     * // => 4
20301     */
20302    function sortedLastIndex(array, value) {
20303      return baseSortedIndex(array, value, true);
20304    }
20305
20306    /**
20307     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
20308     * which is invoked for `value` and each element of `array` to compute their
20309     * sort ranking. The iteratee is invoked with one argument: (value).
20310     *
20311     * @static
20312     * @memberOf _
20313     * @since 4.0.0
20314     * @category Array
20315     * @param {Array} array The sorted array to inspect.
20316     * @param {*} value The value to evaluate.
20317     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
20318     * @returns {number} Returns the index at which `value` should be inserted
20319     *  into `array`.
20320     * @example
20321     *
20322     * var objects = [{ 'x': 4 }, { 'x': 5 }];
20323     *
20324     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
20325     * // => 1
20326     *
20327     * // The `_.property` iteratee shorthand.
20328     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
20329     * // => 1
20330     */
20331    function sortedLastIndexBy(array, value, iteratee) {
20332      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
20333    }
20334
20335    /**
20336     * This method is like `_.lastIndexOf` except that it performs a binary
20337     * search on a sorted `array`.
20338     *
20339     * @static
20340     * @memberOf _
20341     * @since 4.0.0
20342     * @category Array
20343     * @param {Array} array The array to inspect.
20344     * @param {*} value The value to search for.
20345     * @returns {number} Returns the index of the matched value, else `-1`.
20346     * @example
20347     *
20348     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
20349     * // => 3
20350     */
20351    function sortedLastIndexOf(array, value) {
20352      var length = array == null ? 0 : array.length;
20353      if (length) {
20354        var index = baseSortedIndex(array, value, true) - 1;
20355        if (eq(array[index], value)) {
20356          return index;
20357        }
20358      }
20359      return -1;
20360    }
20361
20362    /**
20363     * This method is like `_.uniq` except that it's designed and optimized
20364     * for sorted arrays.
20365     *
20366     * @static
20367     * @memberOf _
20368     * @since 4.0.0
20369     * @category Array
20370     * @param {Array} array The array to inspect.
20371     * @returns {Array} Returns the new duplicate free array.
20372     * @example
20373     *
20374     * _.sortedUniq([1, 1, 2]);
20375     * // => [1, 2]
20376     */
20377    function sortedUniq(array) {
20378      return (array && array.length)
20379        ? baseSortedUniq(array)
20380        : [];
20381    }
20382
20383    /**
20384     * This method is like `_.uniqBy` except that it's designed and optimized
20385     * for sorted arrays.
20386     *
20387     * @static
20388     * @memberOf _
20389     * @since 4.0.0
20390     * @category Array
20391     * @param {Array} array The array to inspect.
20392     * @param {Function} [iteratee] The iteratee invoked per element.
20393     * @returns {Array} Returns the new duplicate free array.
20394     * @example
20395     *
20396     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
20397     * // => [1.1, 2.3]
20398     */
20399    function sortedUniqBy(array, iteratee) {
20400      return (array && array.length)
20401        ? baseSortedUniq(array, getIteratee(iteratee, 2))
20402        : [];
20403    }
20404
20405    /**
20406     * Gets all but the first element of `array`.
20407     *
20408     * @static
20409     * @memberOf _
20410     * @since 4.0.0
20411     * @category Array
20412     * @param {Array} array The array to query.
20413     * @returns {Array} Returns the slice of `array`.
20414     * @example
20415     *
20416     * _.tail([1, 2, 3]);
20417     * // => [2, 3]
20418     */
20419    function tail(array) {
20420      var length = array == null ? 0 : array.length;
20421      return length ? baseSlice(array, 1, length) : [];
20422    }
20423
20424    /**
20425     * Creates a slice of `array` with `n` elements taken from the beginning.
20426     *
20427     * @static
20428     * @memberOf _
20429     * @since 0.1.0
20430     * @category Array
20431     * @param {Array} array The array to query.
20432     * @param {number} [n=1] The number of elements to take.
20433     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
20434     * @returns {Array} Returns the slice of `array`.
20435     * @example
20436     *
20437     * _.take([1, 2, 3]);
20438     * // => [1]
20439     *
20440     * _.take([1, 2, 3], 2);
20441     * // => [1, 2]
20442     *
20443     * _.take([1, 2, 3], 5);
20444     * // => [1, 2, 3]
20445     *
20446     * _.take([1, 2, 3], 0);
20447     * // => []
20448     */
20449    function take(array, n, guard) {
20450      if (!(array && array.length)) {
20451        return [];
20452      }
20453      n = (guard || n === undefined) ? 1 : toInteger(n);
20454      return baseSlice(array, 0, n < 0 ? 0 : n);
20455    }
20456
20457    /**
20458     * Creates a slice of `array` with `n` elements taken from the end.
20459     *
20460     * @static
20461     * @memberOf _
20462     * @since 3.0.0
20463     * @category Array
20464     * @param {Array} array The array to query.
20465     * @param {number} [n=1] The number of elements to take.
20466     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
20467     * @returns {Array} Returns the slice of `array`.
20468     * @example
20469     *
20470     * _.takeRight([1, 2, 3]);
20471     * // => [3]
20472     *
20473     * _.takeRight([1, 2, 3], 2);
20474     * // => [2, 3]
20475     *
20476     * _.takeRight([1, 2, 3], 5);
20477     * // => [1, 2, 3]
20478     *
20479     * _.takeRight([1, 2, 3], 0);
20480     * // => []
20481     */
20482    function takeRight(array, n, guard) {
20483      var length = array == null ? 0 : array.length;
20484      if (!length) {
20485        return [];
20486      }
20487      n = (guard || n === undefined) ? 1 : toInteger(n);
20488      n = length - n;
20489      return baseSlice(array, n < 0 ? 0 : n, length);
20490    }
20491
20492    /**
20493     * Creates a slice of `array` with elements taken from the end. Elements are
20494     * taken until `predicate` returns falsey. The predicate is invoked with
20495     * three arguments: (value, index, array).
20496     *
20497     * @static
20498     * @memberOf _
20499     * @since 3.0.0
20500     * @category Array
20501     * @param {Array} array The array to query.
20502     * @param {Function} [predicate=_.identity] The function invoked per iteration.
20503     * @returns {Array} Returns the slice of `array`.
20504     * @example
20505     *
20506     * var users = [
20507     *   { 'user': 'barney',  'active': true },
20508     *   { 'user': 'fred',    'active': false },
20509     *   { 'user': 'pebbles', 'active': false }
20510     * ];
20511     *
20512     * _.takeRightWhile(users, function(o) { return !o.active; });
20513     * // => objects for ['fred', 'pebbles']
20514     *
20515     * // The `_.matches` iteratee shorthand.
20516     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
20517     * // => objects for ['pebbles']
20518     *
20519     * // The `_.matchesProperty` iteratee shorthand.
20520     * _.takeRightWhile(users, ['active', false]);
20521     * // => objects for ['fred', 'pebbles']
20522     *
20523     * // The `_.property` iteratee shorthand.
20524     * _.takeRightWhile(users, 'active');
20525     * // => []
20526     */
20527    function takeRightWhile(array, predicate) {
20528      return (array && array.length)
20529        ? baseWhile(array, getIteratee(predicate, 3), false, true)
20530        : [];
20531    }
20532
20533    /**
20534     * Creates a slice of `array` with elements taken from the beginning. Elements
20535     * are taken until `predicate` returns falsey. The predicate is invoked with
20536     * three arguments: (value, index, array).
20537     *
20538     * @static
20539     * @memberOf _
20540     * @since 3.0.0
20541     * @category Array
20542     * @param {Array} array The array to query.
20543     * @param {Function} [predicate=_.identity] The function invoked per iteration.
20544     * @returns {Array} Returns the slice of `array`.
20545     * @example
20546     *
20547     * var users = [
20548     *   { 'user': 'barney',  'active': false },
20549     *   { 'user': 'fred',    'active': false },
20550     *   { 'user': 'pebbles', 'active': true }
20551     * ];
20552     *
20553     * _.takeWhile(users, function(o) { return !o.active; });
20554     * // => objects for ['barney', 'fred']
20555     *
20556     * // The `_.matches` iteratee shorthand.
20557     * _.takeWhile(users, { 'user': 'barney', 'active': false });
20558     * // => objects for ['barney']
20559     *
20560     * // The `_.matchesProperty` iteratee shorthand.
20561     * _.takeWhile(users, ['active', false]);
20562     * // => objects for ['barney', 'fred']
20563     *
20564     * // The `_.property` iteratee shorthand.
20565     * _.takeWhile(users, 'active');
20566     * // => []
20567     */
20568    function takeWhile(array, predicate) {
20569      return (array && array.length)
20570        ? baseWhile(array, getIteratee(predicate, 3))
20571        : [];
20572    }
20573
20574    /**
20575     * Creates an array of unique values, in order, from all given arrays using
20576     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
20577     * for equality comparisons.
20578     *
20579     * @static
20580     * @memberOf _
20581     * @since 0.1.0
20582     * @category Array
20583     * @param {...Array} [arrays] The arrays to inspect.
20584     * @returns {Array} Returns the new array of combined values.
20585     * @example
20586     *
20587     * _.union([2], [1, 2]);
20588     * // => [2, 1]
20589     */
20590    var union = baseRest(function(arrays) {
20591      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
20592    });
20593
20594    /**
20595     * This method is like `_.union` except that it accepts `iteratee` which is
20596     * invoked for each element of each `arrays` to generate the criterion by
20597     * which uniqueness is computed. Result values are chosen from the first
20598     * array in which the value occurs. The iteratee is invoked with one argument:
20599     * (value).
20600     *
20601     * @static
20602     * @memberOf _
20603     * @since 4.0.0
20604     * @category Array
20605     * @param {...Array} [arrays] The arrays to inspect.
20606     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
20607     * @returns {Array} Returns the new array of combined values.
20608     * @example
20609     *
20610     * _.unionBy([2.1], [1.2, 2.3], Math.floor);
20611     * // => [2.1, 1.2]
20612     *
20613     * // The `_.property` iteratee shorthand.
20614     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
20615     * // => [{ 'x': 1 }, { 'x': 2 }]
20616     */
20617    var unionBy = baseRest(function(arrays) {
20618      var iteratee = last(arrays);
20619      if (isArrayLikeObject(iteratee)) {
20620        iteratee = undefined;
20621      }
20622      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
20623    });
20624
20625    /**
20626     * This method is like `_.union` except that it accepts `comparator` which
20627     * is invoked to compare elements of `arrays`. Result values are chosen from
20628     * the first array in which the value occurs. The comparator is invoked
20629     * with two arguments: (arrVal, othVal).
20630     *
20631     * @static
20632     * @memberOf _
20633     * @since 4.0.0
20634     * @category Array
20635     * @param {...Array} [arrays] The arrays to inspect.
20636     * @param {Function} [comparator] The comparator invoked per element.
20637     * @returns {Array} Returns the new array of combined values.
20638     * @example
20639     *
20640     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
20641     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
20642     *
20643     * _.unionWith(objects, others, _.isEqual);
20644     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
20645     */
20646    var unionWith = baseRest(function(arrays) {
20647      var comparator = last(arrays);
20648      comparator = typeof comparator == 'function' ? comparator : undefined;
20649      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
20650    });
20651
20652    /**
20653     * Creates a duplicate-free version of an array, using
20654     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
20655     * for equality comparisons, in which only the first occurrence of each element
20656     * is kept. The order of result values is determined by the order they occur
20657     * in the array.
20658     *
20659     * @static
20660     * @memberOf _
20661     * @since 0.1.0
20662     * @category Array
20663     * @param {Array} array The array to inspect.
20664     * @returns {Array} Returns the new duplicate free array.
20665     * @example
20666     *
20667     * _.uniq([2, 1, 2]);
20668     * // => [2, 1]
20669     */
20670    function uniq(array) {
20671      return (array && array.length) ? baseUniq(array) : [];
20672    }
20673
20674    /**
20675     * This method is like `_.uniq` except that it accepts `iteratee` which is
20676     * invoked for each element in `array` to generate the criterion by which
20677     * uniqueness is computed. The order of result values is determined by the
20678     * order they occur in the array. The iteratee is invoked with one argument:
20679     * (value).
20680     *
20681     * @static
20682     * @memberOf _
20683     * @since 4.0.0
20684     * @category Array
20685     * @param {Array} array The array to inspect.
20686     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
20687     * @returns {Array} Returns the new duplicate free array.
20688     * @example
20689     *
20690     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
20691     * // => [2.1, 1.2]
20692     *
20693     * // The `_.property` iteratee shorthand.
20694     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
20695     * // => [{ 'x': 1 }, { 'x': 2 }]
20696     */
20697    function uniqBy(array, iteratee) {
20698      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
20699    }
20700
20701    /**
20702     * This method is like `_.uniq` except that it accepts `comparator` which
20703     * is invoked to compare elements of `array`. The order of result values is
20704     * determined by the order they occur in the array.The comparator is invoked
20705     * with two arguments: (arrVal, othVal).
20706     *
20707     * @static
20708     * @memberOf _
20709     * @since 4.0.0
20710     * @category Array
20711     * @param {Array} array The array to inspect.
20712     * @param {Function} [comparator] The comparator invoked per element.
20713     * @returns {Array} Returns the new duplicate free array.
20714     * @example
20715     *
20716     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
20717     *
20718     * _.uniqWith(objects, _.isEqual);
20719     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
20720     */
20721    function uniqWith(array, comparator) {
20722      comparator = typeof comparator == 'function' ? comparator : undefined;
20723      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
20724    }
20725
20726    /**
20727     * This method is like `_.zip` except that it accepts an array of grouped
20728     * elements and creates an array regrouping the elements to their pre-zip
20729     * configuration.
20730     *
20731     * @static
20732     * @memberOf _
20733     * @since 1.2.0
20734     * @category Array
20735     * @param {Array} array The array of grouped elements to process.
20736     * @returns {Array} Returns the new array of regrouped elements.
20737     * @example
20738     *
20739     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
20740     * // => [['a', 1, true], ['b', 2, false]]
20741     *
20742     * _.unzip(zipped);
20743     * // => [['a', 'b'], [1, 2], [true, false]]
20744     */
20745    function unzip(array) {
20746      if (!(array && array.length)) {
20747        return [];
20748      }
20749      var length = 0;
20750      array = arrayFilter(array, function(group) {
20751        if (isArrayLikeObject(group)) {
20752          length = nativeMax(group.length, length);
20753          return true;
20754        }
20755      });
20756      return baseTimes(length, function(index) {
20757        return arrayMap(array, baseProperty(index));
20758      });
20759    }
20760
20761    /**
20762     * This method is like `_.unzip` except that it accepts `iteratee` to specify
20763     * how regrouped values should be combined. The iteratee is invoked with the
20764     * elements of each group: (...group).
20765     *
20766     * @static
20767     * @memberOf _
20768     * @since 3.8.0
20769     * @category Array
20770     * @param {Array} array The array of grouped elements to process.
20771     * @param {Function} [iteratee=_.identity] The function to combine
20772     *  regrouped values.
20773     * @returns {Array} Returns the new array of regrouped elements.
20774     * @example
20775     *
20776     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
20777     * // => [[1, 10, 100], [2, 20, 200]]
20778     *
20779     * _.unzipWith(zipped, _.add);
20780     * // => [3, 30, 300]
20781     */
20782    function unzipWith(array, iteratee) {
20783      if (!(array && array.length)) {
20784        return [];
20785      }
20786      var result = unzip(array);
20787      if (iteratee == null) {
20788        return result;
20789      }
20790      return arrayMap(result, function(group) {
20791        return apply(iteratee, undefined, group);
20792      });
20793    }
20794
20795    /**
20796     * Creates an array excluding all given values using
20797     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
20798     * for equality comparisons.
20799     *
20800     * **Note:** Unlike `_.pull`, this method returns a new array.
20801     *
20802     * @static
20803     * @memberOf _
20804     * @since 0.1.0
20805     * @category Array
20806     * @param {Array} array The array to inspect.
20807     * @param {...*} [values] The values to exclude.
20808     * @returns {Array} Returns the new array of filtered values.
20809     * @see _.difference, _.xor
20810     * @example
20811     *
20812     * _.without([2, 1, 2, 3], 1, 2);
20813     * // => [3]
20814     */
20815    var without = baseRest(function(array, values) {
20816      return isArrayLikeObject(array)
20817        ? baseDifference(array, values)
20818        : [];
20819    });
20820
20821    /**
20822     * Creates an array of unique values that is the
20823     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
20824     * of the given arrays. The order of result values is determined by the order
20825     * they occur in the arrays.
20826     *
20827     * @static
20828     * @memberOf _
20829     * @since 2.4.0
20830     * @category Array
20831     * @param {...Array} [arrays] The arrays to inspect.
20832     * @returns {Array} Returns the new array of filtered values.
20833     * @see _.difference, _.without
20834     * @example
20835     *
20836     * _.xor([2, 1], [2, 3]);
20837     * // => [1, 3]
20838     */
20839    var xor = baseRest(function(arrays) {
20840      return baseXor(arrayFilter(arrays, isArrayLikeObject));
20841    });
20842
20843    /**
20844     * This method is like `_.xor` except that it accepts `iteratee` which is
20845     * invoked for each element of each `arrays` to generate the criterion by
20846     * which by which they're compared. The order of result values is determined
20847     * by the order they occur in the arrays. The iteratee is invoked with one
20848     * argument: (value).
20849     *
20850     * @static
20851     * @memberOf _
20852     * @since 4.0.0
20853     * @category Array
20854     * @param {...Array} [arrays] The arrays to inspect.
20855     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
20856     * @returns {Array} Returns the new array of filtered values.
20857     * @example
20858     *
20859     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
20860     * // => [1.2, 3.4]
20861     *
20862     * // The `_.property` iteratee shorthand.
20863     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
20864     * // => [{ 'x': 2 }]
20865     */
20866    var xorBy = baseRest(function(arrays) {
20867      var iteratee = last(arrays);
20868      if (isArrayLikeObject(iteratee)) {
20869        iteratee = undefined;
20870      }
20871      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
20872    });
20873
20874    /**
20875     * This method is like `_.xor` except that it accepts `comparator` which is
20876     * invoked to compare elements of `arrays`. The order of result values is
20877     * determined by the order they occur in the arrays. The comparator is invoked
20878     * with two arguments: (arrVal, othVal).
20879     *
20880     * @static
20881     * @memberOf _
20882     * @since 4.0.0
20883     * @category Array
20884     * @param {...Array} [arrays] The arrays to inspect.
20885     * @param {Function} [comparator] The comparator invoked per element.
20886     * @returns {Array} Returns the new array of filtered values.
20887     * @example
20888     *
20889     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
20890     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
20891     *
20892     * _.xorWith(objects, others, _.isEqual);
20893     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
20894     */
20895    var xorWith = baseRest(function(arrays) {
20896      var comparator = last(arrays);
20897      comparator = typeof comparator == 'function' ? comparator : undefined;
20898      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
20899    });
20900
20901    /**
20902     * Creates an array of grouped elements, the first of which contains the
20903     * first elements of the given arrays, the second of which contains the
20904     * second elements of the given arrays, and so on.
20905     *
20906     * @static
20907     * @memberOf _
20908     * @since 0.1.0
20909     * @category Array
20910     * @param {...Array} [arrays] The arrays to process.
20911     * @returns {Array} Returns the new array of grouped elements.
20912     * @example
20913     *
20914     * _.zip(['a', 'b'], [1, 2], [true, false]);
20915     * // => [['a', 1, true], ['b', 2, false]]
20916     */
20917    var zip = baseRest(unzip);
20918
20919    /**
20920     * This method is like `_.fromPairs` except that it accepts two arrays,
20921     * one of property identifiers and one of corresponding values.
20922     *
20923     * @static
20924     * @memberOf _
20925     * @since 0.4.0
20926     * @category Array
20927     * @param {Array} [props=[]] The property identifiers.
20928     * @param {Array} [values=[]] The property values.
20929     * @returns {Object} Returns the new object.
20930     * @example
20931     *
20932     * _.zipObject(['a', 'b'], [1, 2]);
20933     * // => { 'a': 1, 'b': 2 }
20934     */
20935    function zipObject(props, values) {
20936      return baseZipObject(props || [], values || [], assignValue);
20937    }
20938
20939    /**
20940     * This method is like `_.zipObject` except that it supports property paths.
20941     *
20942     * @static
20943     * @memberOf _
20944     * @since 4.1.0
20945     * @category Array
20946     * @param {Array} [props=[]] The property identifiers.
20947     * @param {Array} [values=[]] The property values.
20948     * @returns {Object} Returns the new object.
20949     * @example
20950     *
20951     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
20952     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
20953     */
20954    function zipObjectDeep(props, values) {
20955      return baseZipObject(props || [], values || [], baseSet);
20956    }
20957
20958    /**
20959     * This method is like `_.zip` except that it accepts `iteratee` to specify
20960     * how grouped values should be combined. The iteratee is invoked with the
20961     * elements of each group: (...group).
20962     *
20963     * @static
20964     * @memberOf _
20965     * @since 3.8.0
20966     * @category Array
20967     * @param {...Array} [arrays] The arrays to process.
20968     * @param {Function} [iteratee=_.identity] The function to combine
20969     *  grouped values.
20970     * @returns {Array} Returns the new array of grouped elements.
20971     * @example
20972     *
20973     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
20974     *   return a + b + c;
20975     * });
20976     * // => [111, 222]
20977     */
20978    var zipWith = baseRest(function(arrays) {
20979      var length = arrays.length,
20980          iteratee = length > 1 ? arrays[length - 1] : undefined;
20981
20982      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
20983      return unzipWith(arrays, iteratee);
20984    });
20985
20986    /*------------------------------------------------------------------------*/
20987
20988    /**
20989     * Creates a `lodash` wrapper instance that wraps `value` with explicit method
20990     * chain sequences enabled. The result of such sequences must be unwrapped
20991     * with `_#value`.
20992     *
20993     * @static
20994     * @memberOf _
20995     * @since 1.3.0
20996     * @category Seq
20997     * @param {*} value The value to wrap.
20998     * @returns {Object} Returns the new `lodash` wrapper instance.
20999     * @example
21000     *
21001     * var users = [
21002     *   { 'user': 'barney',  'age': 36 },
21003     *   { 'user': 'fred',    'age': 40 },
21004     *   { 'user': 'pebbles', 'age': 1 }
21005     * ];
21006     *
21007     * var youngest = _
21008     *   .chain(users)
21009     *   .sortBy('age')
21010     *   .map(function(o) {
21011     *     return o.user + ' is ' + o.age;
21012     *   })
21013     *   .head()
21014     *   .value();
21015     * // => 'pebbles is 1'
21016     */
21017    function chain(value) {
21018      var result = lodash(value);
21019      result.__chain__ = true;
21020      return result;
21021    }
21022
21023    /**
21024     * This method invokes `interceptor` and returns `value`. The interceptor
21025     * is invoked with one argument; (value). The purpose of this method is to
21026     * "tap into" a method chain sequence in order to modify intermediate results.
21027     *
21028     * @static
21029     * @memberOf _
21030     * @since 0.1.0
21031     * @category Seq
21032     * @param {*} value The value to provide to `interceptor`.
21033     * @param {Function} interceptor The function to invoke.
21034     * @returns {*} Returns `value`.
21035     * @example
21036     *
21037     * _([1, 2, 3])
21038     *  .tap(function(array) {
21039     *    // Mutate input array.
21040     *    array.pop();
21041     *  })
21042     *  .reverse()
21043     *  .value();
21044     * // => [2, 1]
21045     */
21046    function tap(value, interceptor) {
21047      interceptor(value);
21048      return value;
21049    }
21050
21051    /**
21052     * This method is like `_.tap` except that it returns the result of `interceptor`.
21053     * The purpose of this method is to "pass thru" values replacing intermediate
21054     * results in a method chain sequence.
21055     *
21056     * @static
21057     * @memberOf _
21058     * @since 3.0.0
21059     * @category Seq
21060     * @param {*} value The value to provide to `interceptor`.
21061     * @param {Function} interceptor The function to invoke.
21062     * @returns {*} Returns the result of `interceptor`.
21063     * @example
21064     *
21065     * _('  abc  ')
21066     *  .chain()
21067     *  .trim()
21068     *  .thru(function(value) {
21069     *    return [value];
21070     *  })
21071     *  .value();
21072     * // => ['abc']
21073     */
21074    function thru(value, interceptor) {
21075      return interceptor(value);
21076    }
21077
21078    /**
21079     * This method is the wrapper version of `_.at`.
21080     *
21081     * @name at
21082     * @memberOf _
21083     * @since 1.0.0
21084     * @category Seq
21085     * @param {...(string|string[])} [paths] The property paths to pick.
21086     * @returns {Object} Returns the new `lodash` wrapper instance.
21087     * @example
21088     *
21089     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
21090     *
21091     * _(object).at(['a[0].b.c', 'a[1]']).value();
21092     * // => [3, 4]
21093     */
21094    var wrapperAt = flatRest(function(paths) {
21095      var length = paths.length,
21096          start = length ? paths[0] : 0,
21097          value = this.__wrapped__,
21098          interceptor = function(object) { return baseAt(object, paths); };
21099
21100      if (length > 1 || this.__actions__.length ||
21101          !(value instanceof LazyWrapper) || !isIndex(start)) {
21102        return this.thru(interceptor);
21103      }
21104      value = value.slice(start, +start + (length ? 1 : 0));
21105      value.__actions__.push({
21106        'func': thru,
21107        'args': [interceptor],
21108        'thisArg': undefined
21109      });
21110      return new LodashWrapper(value, this.__chain__).thru(function(array) {
21111        if (length && !array.length) {
21112          array.push(undefined);
21113        }
21114        return array;
21115      });
21116    });
21117
21118    /**
21119     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
21120     *
21121     * @name chain
21122     * @memberOf _
21123     * @since 0.1.0
21124     * @category Seq
21125     * @returns {Object} Returns the new `lodash` wrapper instance.
21126     * @example
21127     *
21128     * var users = [
21129     *   { 'user': 'barney', 'age': 36 },
21130     *   { 'user': 'fred',   'age': 40 }
21131     * ];
21132     *
21133     * // A sequence without explicit chaining.
21134     * _(users).head();
21135     * // => { 'user': 'barney', 'age': 36 }
21136     *
21137     * // A sequence with explicit chaining.
21138     * _(users)
21139     *   .chain()
21140     *   .head()
21141     *   .pick('user')
21142     *   .value();
21143     * // => { 'user': 'barney' }
21144     */
21145    function wrapperChain() {
21146      return chain(this);
21147    }
21148
21149    /**
21150     * Executes the chain sequence and returns the wrapped result.
21151     *
21152     * @name commit
21153     * @memberOf _
21154     * @since 3.2.0
21155     * @category Seq
21156     * @returns {Object} Returns the new `lodash` wrapper instance.
21157     * @example
21158     *
21159     * var array = [1, 2];
21160     * var wrapped = _(array).push(3);
21161     *
21162     * console.log(array);
21163     * // => [1, 2]
21164     *
21165     * wrapped = wrapped.commit();
21166     * console.log(array);
21167     * // => [1, 2, 3]
21168     *
21169     * wrapped.last();
21170     * // => 3
21171     *
21172     * console.log(array);
21173     * // => [1, 2, 3]
21174     */
21175    function wrapperCommit() {
21176      return new LodashWrapper(this.value(), this.__chain__);
21177    }
21178
21179    /**
21180     * Gets the next value on a wrapped object following the
21181     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
21182     *
21183     * @name next
21184     * @memberOf _
21185     * @since 4.0.0
21186     * @category Seq
21187     * @returns {Object} Returns the next iterator value.
21188     * @example
21189     *
21190     * var wrapped = _([1, 2]);
21191     *
21192     * wrapped.next();
21193     * // => { 'done': false, 'value': 1 }
21194     *
21195     * wrapped.next();
21196     * // => { 'done': false, 'value': 2 }
21197     *
21198     * wrapped.next();
21199     * // => { 'done': true, 'value': undefined }
21200     */
21201    function wrapperNext() {
21202      if (this.__values__ === undefined) {
21203        this.__values__ = toArray(this.value());
21204      }
21205      var done = this.__index__ >= this.__values__.length,
21206          value = done ? undefined : this.__values__[this.__index__++];
21207
21208      return { 'done': done, 'value': value };
21209    }
21210
21211    /**
21212     * Enables the wrapper to be iterable.
21213     *
21214     * @name Symbol.iterator
21215     * @memberOf _
21216     * @since 4.0.0
21217     * @category Seq
21218     * @returns {Object} Returns the wrapper object.
21219     * @example
21220     *
21221     * var wrapped = _([1, 2]);
21222     *
21223     * wrapped[Symbol.iterator]() === wrapped;
21224     * // => true
21225     *
21226     * Array.from(wrapped);
21227     * // => [1, 2]
21228     */
21229    function wrapperToIterator() {
21230      return this;
21231    }
21232
21233    /**
21234     * Creates a clone of the chain sequence planting `value` as the wrapped value.
21235     *
21236     * @name plant
21237     * @memberOf _
21238     * @since 3.2.0
21239     * @category Seq
21240     * @param {*} value The value to plant.
21241     * @returns {Object} Returns the new `lodash` wrapper instance.
21242     * @example
21243     *
21244     * function square(n) {
21245     *   return n * n;
21246     * }
21247     *
21248     * var wrapped = _([1, 2]).map(square);
21249     * var other = wrapped.plant([3, 4]);
21250     *
21251     * other.value();
21252     * // => [9, 16]
21253     *
21254     * wrapped.value();
21255     * // => [1, 4]
21256     */
21257    function wrapperPlant(value) {
21258      var result,
21259          parent = this;
21260
21261      while (parent instanceof baseLodash) {
21262        var clone = wrapperClone(parent);
21263        clone.__index__ = 0;
21264        clone.__values__ = undefined;
21265        if (result) {
21266          previous.__wrapped__ = clone;
21267        } else {
21268          result = clone;
21269        }
21270        var previous = clone;
21271        parent = parent.__wrapped__;
21272      }
21273      previous.__wrapped__ = value;
21274      return result;
21275    }
21276
21277    /**
21278     * This method is the wrapper version of `_.reverse`.
21279     *
21280     * **Note:** This method mutates the wrapped array.
21281     *
21282     * @name reverse
21283     * @memberOf _
21284     * @since 0.1.0
21285     * @category Seq
21286     * @returns {Object} Returns the new `lodash` wrapper instance.
21287     * @example
21288     *
21289     * var array = [1, 2, 3];
21290     *
21291     * _(array).reverse().value()
21292     * // => [3, 2, 1]
21293     *
21294     * console.log(array);
21295     * // => [3, 2, 1]
21296     */
21297    function wrapperReverse() {
21298      var value = this.__wrapped__;
21299      if (value instanceof LazyWrapper) {
21300        var wrapped = value;
21301        if (this.__actions__.length) {
21302          wrapped = new LazyWrapper(this);
21303        }
21304        wrapped = wrapped.reverse();
21305        wrapped.__actions__.push({
21306          'func': thru,
21307          'args': [reverse],
21308          'thisArg': undefined
21309        });
21310        return new LodashWrapper(wrapped, this.__chain__);
21311      }
21312      return this.thru(reverse);
21313    }
21314
21315    /**
21316     * Executes the chain sequence to resolve the unwrapped value.
21317     *
21318     * @name value
21319     * @memberOf _
21320     * @since 0.1.0
21321     * @alias toJSON, valueOf
21322     * @category Seq
21323     * @returns {*} Returns the resolved unwrapped value.
21324     * @example
21325     *
21326     * _([1, 2, 3]).value();
21327     * // => [1, 2, 3]
21328     */
21329    function wrapperValue() {
21330      return baseWrapperValue(this.__wrapped__, this.__actions__);
21331    }
21332
21333    /*------------------------------------------------------------------------*/
21334
21335    /**
21336     * Creates an object composed of keys generated from the results of running
21337     * each element of `collection` thru `iteratee`. The corresponding value of
21338     * each key is the number of times the key was returned by `iteratee`. The
21339     * iteratee is invoked with one argument: (value).
21340     *
21341     * @static
21342     * @memberOf _
21343     * @since 0.5.0
21344     * @category Collection
21345     * @param {Array|Object} collection The collection to iterate over.
21346     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
21347     * @returns {Object} Returns the composed aggregate object.
21348     * @example
21349     *
21350     * _.countBy([6.1, 4.2, 6.3], Math.floor);
21351     * // => { '4': 1, '6': 2 }
21352     *
21353     * // The `_.property` iteratee shorthand.
21354     * _.countBy(['one', 'two', 'three'], 'length');
21355     * // => { '3': 2, '5': 1 }
21356     */
21357    var countBy = createAggregator(function(result, value, key) {
21358      if (hasOwnProperty.call(result, key)) {
21359        ++result[key];
21360      } else {
21361        baseAssignValue(result, key, 1);
21362      }
21363    });
21364
21365    /**
21366     * Checks if `predicate` returns truthy for **all** elements of `collection`.
21367     * Iteration is stopped once `predicate` returns falsey. The predicate is
21368     * invoked with three arguments: (value, index|key, collection).
21369     *
21370     * **Note:** This method returns `true` for
21371     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
21372     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
21373     * elements of empty collections.
21374     *
21375     * @static
21376     * @memberOf _
21377     * @since 0.1.0
21378     * @category Collection
21379     * @param {Array|Object} collection The collection to iterate over.
21380     * @param {Function} [predicate=_.identity] The function invoked per iteration.
21381     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
21382     * @returns {boolean} Returns `true` if all elements pass the predicate check,
21383     *  else `false`.
21384     * @example
21385     *
21386     * _.every([true, 1, null, 'yes'], Boolean);
21387     * // => false
21388     *
21389     * var users = [
21390     *   { 'user': 'barney', 'age': 36, 'active': false },
21391     *   { 'user': 'fred',   'age': 40, 'active': false }
21392     * ];
21393     *
21394     * // The `_.matches` iteratee shorthand.
21395     * _.every(users, { 'user': 'barney', 'active': false });
21396     * // => false
21397     *
21398     * // The `_.matchesProperty` iteratee shorthand.
21399     * _.every(users, ['active', false]);
21400     * // => true
21401     *
21402     * // The `_.property` iteratee shorthand.
21403     * _.every(users, 'active');
21404     * // => false
21405     */
21406    function every(collection, predicate, guard) {
21407      var func = isArray(collection) ? arrayEvery : baseEvery;
21408      if (guard && isIterateeCall(collection, predicate, guard)) {
21409        predicate = undefined;
21410      }
21411      return func(collection, getIteratee(predicate, 3));
21412    }
21413
21414    /**
21415     * Iterates over elements of `collection`, returning an array of all elements
21416     * `predicate` returns truthy for. The predicate is invoked with three
21417     * arguments: (value, index|key, collection).
21418     *
21419     * **Note:** Unlike `_.remove`, this method returns a new array.
21420     *
21421     * @static
21422     * @memberOf _
21423     * @since 0.1.0
21424     * @category Collection
21425     * @param {Array|Object} collection The collection to iterate over.
21426     * @param {Function} [predicate=_.identity] The function invoked per iteration.
21427     * @returns {Array} Returns the new filtered array.
21428     * @see _.reject
21429     * @example
21430     *
21431     * var users = [
21432     *   { 'user': 'barney', 'age': 36, 'active': true },
21433     *   { 'user': 'fred',   'age': 40, 'active': false }
21434     * ];
21435     *
21436     * _.filter(users, function(o) { return !o.active; });
21437     * // => objects for ['fred']
21438     *
21439     * // The `_.matches` iteratee shorthand.
21440     * _.filter(users, { 'age': 36, 'active': true });
21441     * // => objects for ['barney']
21442     *
21443     * // The `_.matchesProperty` iteratee shorthand.
21444     * _.filter(users, ['active', false]);
21445     * // => objects for ['fred']
21446     *
21447     * // The `_.property` iteratee shorthand.
21448     * _.filter(users, 'active');
21449     * // => objects for ['barney']
21450     *
21451     * // Combining several predicates using `_.overEvery` or `_.overSome`.
21452     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
21453     * // => objects for ['fred', 'barney']
21454     */
21455    function filter(collection, predicate) {
21456      var func = isArray(collection) ? arrayFilter : baseFilter;
21457      return func(collection, getIteratee(predicate, 3));
21458    }
21459
21460    /**
21461     * Iterates over elements of `collection`, returning the first element
21462     * `predicate` returns truthy for. The predicate is invoked with three
21463     * arguments: (value, index|key, collection).
21464     *
21465     * @static
21466     * @memberOf _
21467     * @since 0.1.0
21468     * @category Collection
21469     * @param {Array|Object} collection The collection to inspect.
21470     * @param {Function} [predicate=_.identity] The function invoked per iteration.
21471     * @param {number} [fromIndex=0] The index to search from.
21472     * @returns {*} Returns the matched element, else `undefined`.
21473     * @example
21474     *
21475     * var users = [
21476     *   { 'user': 'barney',  'age': 36, 'active': true },
21477     *   { 'user': 'fred',    'age': 40, 'active': false },
21478     *   { 'user': 'pebbles', 'age': 1,  'active': true }
21479     * ];
21480     *
21481     * _.find(users, function(o) { return o.age < 40; });
21482     * // => object for 'barney'
21483     *
21484     * // The `_.matches` iteratee shorthand.
21485     * _.find(users, { 'age': 1, 'active': true });
21486     * // => object for 'pebbles'
21487     *
21488     * // The `_.matchesProperty` iteratee shorthand.
21489     * _.find(users, ['active', false]);
21490     * // => object for 'fred'
21491     *
21492     * // The `_.property` iteratee shorthand.
21493     * _.find(users, 'active');
21494     * // => object for 'barney'
21495     */
21496    var find = createFind(findIndex);
21497
21498    /**
21499     * This method is like `_.find` except that it iterates over elements of
21500     * `collection` from right to left.
21501     *
21502     * @static
21503     * @memberOf _
21504     * @since 2.0.0
21505     * @category Collection
21506     * @param {Array|Object} collection The collection to inspect.
21507     * @param {Function} [predicate=_.identity] The function invoked per iteration.
21508     * @param {number} [fromIndex=collection.length-1] The index to search from.
21509     * @returns {*} Returns the matched element, else `undefined`.
21510     * @example
21511     *
21512     * _.findLast([1, 2, 3, 4], function(n) {
21513     *   return n % 2 == 1;
21514     * });
21515     * // => 3
21516     */
21517    var findLast = createFind(findLastIndex);
21518
21519    /**
21520     * Creates a flattened array of values by running each element in `collection`
21521     * thru `iteratee` and flattening the mapped results. The iteratee is invoked
21522     * with three arguments: (value, index|key, collection).
21523     *
21524     * @static
21525     * @memberOf _
21526     * @since 4.0.0
21527     * @category Collection
21528     * @param {Array|Object} collection The collection to iterate over.
21529     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
21530     * @returns {Array} Returns the new flattened array.
21531     * @example
21532     *
21533     * function duplicate(n) {
21534     *   return [n, n];
21535     * }
21536     *
21537     * _.flatMap([1, 2], duplicate);
21538     * // => [1, 1, 2, 2]
21539     */
21540    function flatMap(collection, iteratee) {
21541      return baseFlatten(map(collection, iteratee), 1);
21542    }
21543
21544    /**
21545     * This method is like `_.flatMap` except that it recursively flattens the
21546     * mapped results.
21547     *
21548     * @static
21549     * @memberOf _
21550     * @since 4.7.0
21551     * @category Collection
21552     * @param {Array|Object} collection The collection to iterate over.
21553     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
21554     * @returns {Array} Returns the new flattened array.
21555     * @example
21556     *
21557     * function duplicate(n) {
21558     *   return [[[n, n]]];
21559     * }
21560     *
21561     * _.flatMapDeep([1, 2], duplicate);
21562     * // => [1, 1, 2, 2]
21563     */
21564    function flatMapDeep(collection, iteratee) {
21565      return baseFlatten(map(collection, iteratee), INFINITY);
21566    }
21567
21568    /**
21569     * This method is like `_.flatMap` except that it recursively flattens the
21570     * mapped results up to `depth` times.
21571     *
21572     * @static
21573     * @memberOf _
21574     * @since 4.7.0
21575     * @category Collection
21576     * @param {Array|Object} collection The collection to iterate over.
21577     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
21578     * @param {number} [depth=1] The maximum recursion depth.
21579     * @returns {Array} Returns the new flattened array.
21580     * @example
21581     *
21582     * function duplicate(n) {
21583     *   return [[[n, n]]];
21584     * }
21585     *
21586     * _.flatMapDepth([1, 2], duplicate, 2);
21587     * // => [[1, 1], [2, 2]]
21588     */
21589    function flatMapDepth(collection, iteratee, depth) {
21590      depth = depth === undefined ? 1 : toInteger(depth);
21591      return baseFlatten(map(collection, iteratee), depth);
21592    }
21593
21594    /**
21595     * Iterates over elements of `collection` and invokes `iteratee` for each element.
21596     * The iteratee is invoked with three arguments: (value, index|key, collection).
21597     * Iteratee functions may exit iteration early by explicitly returning `false`.
21598     *
21599     * **Note:** As with other "Collections" methods, objects with a "length"
21600     * property are iterated like arrays. To avoid this behavior use `_.forIn`
21601     * or `_.forOwn` for object iteration.
21602     *
21603     * @static
21604     * @memberOf _
21605     * @since 0.1.0
21606     * @alias each
21607     * @category Collection
21608     * @param {Array|Object} collection The collection to iterate over.
21609     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
21610     * @returns {Array|Object} Returns `collection`.
21611     * @see _.forEachRight
21612     * @example
21613     *
21614     * _.forEach([1, 2], function(value) {
21615     *   console.log(value);
21616     * });
21617     * // => Logs `1` then `2`.
21618     *
21619     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
21620     *   console.log(key);
21621     * });
21622     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
21623     */
21624    function forEach(collection, iteratee) {
21625      var func = isArray(collection) ? arrayEach : baseEach;
21626      return func(collection, getIteratee(iteratee, 3));
21627    }
21628
21629    /**
21630     * This method is like `_.forEach` except that it iterates over elements of
21631     * `collection` from right to left.
21632     *
21633     * @static
21634     * @memberOf _
21635     * @since 2.0.0
21636     * @alias eachRight
21637     * @category Collection
21638     * @param {Array|Object} collection The collection to iterate over.
21639     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
21640     * @returns {Array|Object} Returns `collection`.
21641     * @see _.forEach
21642     * @example
21643     *
21644     * _.forEachRight([1, 2], function(value) {
21645     *   console.log(value);
21646     * });
21647     * // => Logs `2` then `1`.
21648     */
21649    function forEachRight(collection, iteratee) {
21650      var func = isArray(collection) ? arrayEachRight : baseEachRight;
21651      return func(collection, getIteratee(iteratee, 3));
21652    }
21653
21654    /**
21655     * Creates an object composed of keys generated from the results of running
21656     * each element of `collection` thru `iteratee`. The order of grouped values
21657     * is determined by the order they occur in `collection`. The corresponding
21658     * value of each key is an array of elements responsible for generating the
21659     * key. The iteratee is invoked with one argument: (value).
21660     *
21661     * @static
21662     * @memberOf _
21663     * @since 0.1.0
21664     * @category Collection
21665     * @param {Array|Object} collection The collection to iterate over.
21666     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
21667     * @returns {Object} Returns the composed aggregate object.
21668     * @example
21669     *
21670     * _.groupBy([6.1, 4.2, 6.3], Math.floor);
21671     * // => { '4': [4.2], '6': [6.1, 6.3] }
21672     *
21673     * // The `_.property` iteratee shorthand.
21674     * _.groupBy(['one', 'two', 'three'], 'length');
21675     * // => { '3': ['one', 'two'], '5': ['three'] }
21676     */
21677    var groupBy = createAggregator(function(result, value, key) {
21678      if (hasOwnProperty.call(result, key)) {
21679        result[key].push(value);
21680      } else {
21681        baseAssignValue(result, key, [value]);
21682      }
21683    });
21684
21685    /**
21686     * Checks if `value` is in `collection`. If `collection` is a string, it's
21687     * checked for a substring of `value`, otherwise
21688     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
21689     * is used for equality comparisons. If `fromIndex` is negative, it's used as
21690     * the offset from the end of `collection`.
21691     *
21692     * @static
21693     * @memberOf _
21694     * @since 0.1.0
21695     * @category Collection
21696     * @param {Array|Object|string} collection The collection to inspect.
21697     * @param {*} value The value to search for.
21698     * @param {number} [fromIndex=0] The index to search from.
21699     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
21700     * @returns {boolean} Returns `true` if `value` is found, else `false`.
21701     * @example
21702     *
21703     * _.includes([1, 2, 3], 1);
21704     * // => true
21705     *
21706     * _.includes([1, 2, 3], 1, 2);
21707     * // => false
21708     *
21709     * _.includes({ 'a': 1, 'b': 2 }, 1);
21710     * // => true
21711     *
21712     * _.includes('abcd', 'bc');
21713     * // => true
21714     */
21715    function includes(collection, value, fromIndex, guard) {
21716      collection = isArrayLike(collection) ? collection : values(collection);
21717      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
21718
21719      var length = collection.length;
21720      if (fromIndex < 0) {
21721        fromIndex = nativeMax(length + fromIndex, 0);
21722      }
21723      return isString(collection)
21724        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
21725        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
21726    }
21727
21728    /**
21729     * Invokes the method at `path` of each element in `collection`, returning
21730     * an array of the results of each invoked method. Any additional arguments
21731     * are provided to each invoked method. If `path` is a function, it's invoked
21732     * for, and `this` bound to, each element in `collection`.
21733     *
21734     * @static
21735     * @memberOf _
21736     * @since 4.0.0
21737     * @category Collection
21738     * @param {Array|Object} collection The collection to iterate over.
21739     * @param {Array|Function|string} path The path of the method to invoke or
21740     *  the function invoked per iteration.
21741     * @param {...*} [args] The arguments to invoke each method with.
21742     * @returns {Array} Returns the array of results.
21743     * @example
21744     *
21745     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
21746     * // => [[1, 5, 7], [1, 2, 3]]
21747     *
21748     * _.invokeMap([123, 456], String.prototype.split, '');
21749     * // => [['1', '2', '3'], ['4', '5', '6']]
21750     */
21751    var invokeMap = baseRest(function(collection, path, args) {
21752      var index = -1,
21753          isFunc = typeof path == 'function',
21754          result = isArrayLike(collection) ? Array(collection.length) : [];
21755
21756      baseEach(collection, function(value) {
21757        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
21758      });
21759      return result;
21760    });
21761
21762    /**
21763     * Creates an object composed of keys generated from the results of running
21764     * each element of `collection` thru `iteratee`. The corresponding value of
21765     * each key is the last element responsible for generating the key. The
21766     * iteratee is invoked with one argument: (value).
21767     *
21768     * @static
21769     * @memberOf _
21770     * @since 4.0.0
21771     * @category Collection
21772     * @param {Array|Object} collection The collection to iterate over.
21773     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
21774     * @returns {Object} Returns the composed aggregate object.
21775     * @example
21776     *
21777     * var array = [
21778     *   { 'dir': 'left', 'code': 97 },
21779     *   { 'dir': 'right', 'code': 100 }
21780     * ];
21781     *
21782     * _.keyBy(array, function(o) {
21783     *   return String.fromCharCode(o.code);
21784     * });
21785     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
21786     *
21787     * _.keyBy(array, 'dir');
21788     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
21789     */
21790    var keyBy = createAggregator(function(result, value, key) {
21791      baseAssignValue(result, key, value);
21792    });
21793
21794    /**
21795     * Creates an array of values by running each element in `collection` thru
21796     * `iteratee`. The iteratee is invoked with three arguments:
21797     * (value, index|key, collection).
21798     *
21799     * Many lodash methods are guarded to work as iteratees for methods like
21800     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
21801     *
21802     * The guarded methods are:
21803     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
21804     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
21805     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
21806     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
21807     *
21808     * @static
21809     * @memberOf _
21810     * @since 0.1.0
21811     * @category Collection
21812     * @param {Array|Object} collection The collection to iterate over.
21813     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
21814     * @returns {Array} Returns the new mapped array.
21815     * @example
21816     *
21817     * function square(n) {
21818     *   return n * n;
21819     * }
21820     *
21821     * _.map([4, 8], square);
21822     * // => [16, 64]
21823     *
21824     * _.map({ 'a': 4, 'b': 8 }, square);
21825     * // => [16, 64] (iteration order is not guaranteed)
21826     *
21827     * var users = [
21828     *   { 'user': 'barney' },
21829     *   { 'user': 'fred' }
21830     * ];
21831     *
21832     * // The `_.property` iteratee shorthand.
21833     * _.map(users, 'user');
21834     * // => ['barney', 'fred']
21835     */
21836    function map(collection, iteratee) {
21837      var func = isArray(collection) ? arrayMap : baseMap;
21838      return func(collection, getIteratee(iteratee, 3));
21839    }
21840
21841    /**
21842     * This method is like `_.sortBy` except that it allows specifying the sort
21843     * orders of the iteratees to sort by. If `orders` is unspecified, all values
21844     * are sorted in ascending order. Otherwise, specify an order of "desc" for
21845     * descending or "asc" for ascending sort order of corresponding values.
21846     *
21847     * @static
21848     * @memberOf _
21849     * @since 4.0.0
21850     * @category Collection
21851     * @param {Array|Object} collection The collection to iterate over.
21852     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
21853     *  The iteratees to sort by.
21854     * @param {string[]} [orders] The sort orders of `iteratees`.
21855     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
21856     * @returns {Array} Returns the new sorted array.
21857     * @example
21858     *
21859     * var users = [
21860     *   { 'user': 'fred',   'age': 48 },
21861     *   { 'user': 'barney', 'age': 34 },
21862     *   { 'user': 'fred',   'age': 40 },
21863     *   { 'user': 'barney', 'age': 36 }
21864     * ];
21865     *
21866     * // Sort by `user` in ascending order and by `age` in descending order.
21867     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
21868     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
21869     */
21870    function orderBy(collection, iteratees, orders, guard) {
21871      if (collection == null) {
21872        return [];
21873      }
21874      if (!isArray(iteratees)) {
21875        iteratees = iteratees == null ? [] : [iteratees];
21876      }
21877      orders = guard ? undefined : orders;
21878      if (!isArray(orders)) {
21879        orders = orders == null ? [] : [orders];
21880      }
21881      return baseOrderBy(collection, iteratees, orders);
21882    }
21883
21884    /**
21885     * Creates an array of elements split into two groups, the first of which
21886     * contains elements `predicate` returns truthy for, the second of which
21887     * contains elements `predicate` returns falsey for. The predicate is
21888     * invoked with one argument: (value).
21889     *
21890     * @static
21891     * @memberOf _
21892     * @since 3.0.0
21893     * @category Collection
21894     * @param {Array|Object} collection The collection to iterate over.
21895     * @param {Function} [predicate=_.identity] The function invoked per iteration.
21896     * @returns {Array} Returns the array of grouped elements.
21897     * @example
21898     *
21899     * var users = [
21900     *   { 'user': 'barney',  'age': 36, 'active': false },
21901     *   { 'user': 'fred',    'age': 40, 'active': true },
21902     *   { 'user': 'pebbles', 'age': 1,  'active': false }
21903     * ];
21904     *
21905     * _.partition(users, function(o) { return o.active; });
21906     * // => objects for [['fred'], ['barney', 'pebbles']]
21907     *
21908     * // The `_.matches` iteratee shorthand.
21909     * _.partition(users, { 'age': 1, 'active': false });
21910     * // => objects for [['pebbles'], ['barney', 'fred']]
21911     *
21912     * // The `_.matchesProperty` iteratee shorthand.
21913     * _.partition(users, ['active', false]);
21914     * // => objects for [['barney', 'pebbles'], ['fred']]
21915     *
21916     * // The `_.property` iteratee shorthand.
21917     * _.partition(users, 'active');
21918     * // => objects for [['fred'], ['barney', 'pebbles']]
21919     */
21920    var partition = createAggregator(function(result, value, key) {
21921      result[key ? 0 : 1].push(value);
21922    }, function() { return [[], []]; });
21923
21924    /**
21925     * Reduces `collection` to a value which is the accumulated result of running
21926     * each element in `collection` thru `iteratee`, where each successive
21927     * invocation is supplied the return value of the previous. If `accumulator`
21928     * is not given, the first element of `collection` is used as the initial
21929     * value. The iteratee is invoked with four arguments:
21930     * (accumulator, value, index|key, collection).
21931     *
21932     * Many lodash methods are guarded to work as iteratees for methods like
21933     * `_.reduce`, `_.reduceRight`, and `_.transform`.
21934     *
21935     * The guarded methods are:
21936     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
21937     * and `sortBy`
21938     *
21939     * @static
21940     * @memberOf _
21941     * @since 0.1.0
21942     * @category Collection
21943     * @param {Array|Object} collection The collection to iterate over.
21944     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
21945     * @param {*} [accumulator] The initial value.
21946     * @returns {*} Returns the accumulated value.
21947     * @see _.reduceRight
21948     * @example
21949     *
21950     * _.reduce([1, 2], function(sum, n) {
21951     *   return sum + n;
21952     * }, 0);
21953     * // => 3
21954     *
21955     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
21956     *   (result[value] || (result[value] = [])).push(key);
21957     *   return result;
21958     * }, {});
21959     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
21960     */
21961    function reduce(collection, iteratee, accumulator) {
21962      var func = isArray(collection) ? arrayReduce : baseReduce,
21963          initAccum = arguments.length < 3;
21964
21965      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
21966    }
21967
21968    /**
21969     * This method is like `_.reduce` except that it iterates over elements of
21970     * `collection` from right to left.
21971     *
21972     * @static
21973     * @memberOf _
21974     * @since 0.1.0
21975     * @category Collection
21976     * @param {Array|Object} collection The collection to iterate over.
21977     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
21978     * @param {*} [accumulator] The initial value.
21979     * @returns {*} Returns the accumulated value.
21980     * @see _.reduce
21981     * @example
21982     *
21983     * var array = [[0, 1], [2, 3], [4, 5]];
21984     *
21985     * _.reduceRight(array, function(flattened, other) {
21986     *   return flattened.concat(other);
21987     * }, []);
21988     * // => [4, 5, 2, 3, 0, 1]
21989     */
21990    function reduceRight(collection, iteratee, accumulator) {
21991      var func = isArray(collection) ? arrayReduceRight : baseReduce,
21992          initAccum = arguments.length < 3;
21993
21994      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
21995    }
21996
21997    /**
21998     * The opposite of `_.filter`; this method returns the elements of `collection`
21999     * that `predicate` does **not** return truthy for.
22000     *
22001     * @static
22002     * @memberOf _
22003     * @since 0.1.0
22004     * @category Collection
22005     * @param {Array|Object} collection The collection to iterate over.
22006     * @param {Function} [predicate=_.identity] The function invoked per iteration.
22007     * @returns {Array} Returns the new filtered array.
22008     * @see _.filter
22009     * @example
22010     *
22011     * var users = [
22012     *   { 'user': 'barney', 'age': 36, 'active': false },
22013     *   { 'user': 'fred',   'age': 40, 'active': true }
22014     * ];
22015     *
22016     * _.reject(users, function(o) { return !o.active; });
22017     * // => objects for ['fred']
22018     *
22019     * // The `_.matches` iteratee shorthand.
22020     * _.reject(users, { 'age': 40, 'active': true });
22021     * // => objects for ['barney']
22022     *
22023     * // The `_.matchesProperty` iteratee shorthand.
22024     * _.reject(users, ['active', false]);
22025     * // => objects for ['fred']
22026     *
22027     * // The `_.property` iteratee shorthand.
22028     * _.reject(users, 'active');
22029     * // => objects for ['barney']
22030     */
22031    function reject(collection, predicate) {
22032      var func = isArray(collection) ? arrayFilter : baseFilter;
22033      return func(collection, negate(getIteratee(predicate, 3)));
22034    }
22035
22036    /**
22037     * Gets a random element from `collection`.
22038     *
22039     * @static
22040     * @memberOf _
22041     * @since 2.0.0
22042     * @category Collection
22043     * @param {Array|Object} collection The collection to sample.
22044     * @returns {*} Returns the random element.
22045     * @example
22046     *
22047     * _.sample([1, 2, 3, 4]);
22048     * // => 2
22049     */
22050    function sample(collection) {
22051      var func = isArray(collection) ? arraySample : baseSample;
22052      return func(collection);
22053    }
22054
22055    /**
22056     * Gets `n` random elements at unique keys from `collection` up to the
22057     * size of `collection`.
22058     *
22059     * @static
22060     * @memberOf _
22061     * @since 4.0.0
22062     * @category Collection
22063     * @param {Array|Object} collection The collection to sample.
22064     * @param {number} [n=1] The number of elements to sample.
22065     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
22066     * @returns {Array} Returns the random elements.
22067     * @example
22068     *
22069     * _.sampleSize([1, 2, 3], 2);
22070     * // => [3, 1]
22071     *
22072     * _.sampleSize([1, 2, 3], 4);
22073     * // => [2, 3, 1]
22074     */
22075    function sampleSize(collection, n, guard) {
22076      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
22077        n = 1;
22078      } else {
22079        n = toInteger(n);
22080      }
22081      var func = isArray(collection) ? arraySampleSize : baseSampleSize;
22082      return func(collection, n);
22083    }
22084
22085    /**
22086     * Creates an array of shuffled values, using a version of the
22087     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
22088     *
22089     * @static
22090     * @memberOf _
22091     * @since 0.1.0
22092     * @category Collection
22093     * @param {Array|Object} collection The collection to shuffle.
22094     * @returns {Array} Returns the new shuffled array.
22095     * @example
22096     *
22097     * _.shuffle([1, 2, 3, 4]);
22098     * // => [4, 1, 3, 2]
22099     */
22100    function shuffle(collection) {
22101      var func = isArray(collection) ? arrayShuffle : baseShuffle;
22102      return func(collection);
22103    }
22104
22105    /**
22106     * Gets the size of `collection` by returning its length for array-like
22107     * values or the number of own enumerable string keyed properties for objects.
22108     *
22109     * @static
22110     * @memberOf _
22111     * @since 0.1.0
22112     * @category Collection
22113     * @param {Array|Object|string} collection The collection to inspect.
22114     * @returns {number} Returns the collection size.
22115     * @example
22116     *
22117     * _.size([1, 2, 3]);
22118     * // => 3
22119     *
22120     * _.size({ 'a': 1, 'b': 2 });
22121     * // => 2
22122     *
22123     * _.size('pebbles');
22124     * // => 7
22125     */
22126    function size(collection) {
22127      if (collection == null) {
22128        return 0;
22129      }
22130      if (isArrayLike(collection)) {
22131        return isString(collection) ? stringSize(collection) : collection.length;
22132      }
22133      var tag = getTag(collection);
22134      if (tag == mapTag || tag == setTag) {
22135        return collection.size;
22136      }
22137      return baseKeys(collection).length;
22138    }
22139
22140    /**
22141     * Checks if `predicate` returns truthy for **any** element of `collection`.
22142     * Iteration is stopped once `predicate` returns truthy. The predicate is
22143     * invoked with three arguments: (value, index|key, collection).
22144     *
22145     * @static
22146     * @memberOf _
22147     * @since 0.1.0
22148     * @category Collection
22149     * @param {Array|Object} collection The collection to iterate over.
22150     * @param {Function} [predicate=_.identity] The function invoked per iteration.
22151     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
22152     * @returns {boolean} Returns `true` if any element passes the predicate check,
22153     *  else `false`.
22154     * @example
22155     *
22156     * _.some([null, 0, 'yes', false], Boolean);
22157     * // => true
22158     *
22159     * var users = [
22160     *   { 'user': 'barney', 'active': true },
22161     *   { 'user': 'fred',   'active': false }
22162     * ];
22163     *
22164     * // The `_.matches` iteratee shorthand.
22165     * _.some(users, { 'user': 'barney', 'active': false });
22166     * // => false
22167     *
22168     * // The `_.matchesProperty` iteratee shorthand.
22169     * _.some(users, ['active', false]);
22170     * // => true
22171     *
22172     * // The `_.property` iteratee shorthand.
22173     * _.some(users, 'active');
22174     * // => true
22175     */
22176    function some(collection, predicate, guard) {
22177      var func = isArray(collection) ? arraySome : baseSome;
22178      if (guard && isIterateeCall(collection, predicate, guard)) {
22179        predicate = undefined;
22180      }
22181      return func(collection, getIteratee(predicate, 3));
22182    }
22183
22184    /**
22185     * Creates an array of elements, sorted in ascending order by the results of
22186     * running each element in a collection thru each iteratee. This method
22187     * performs a stable sort, that is, it preserves the original sort order of
22188     * equal elements. The iteratees are invoked with one argument: (value).
22189     *
22190     * @static
22191     * @memberOf _
22192     * @since 0.1.0
22193     * @category Collection
22194     * @param {Array|Object} collection The collection to iterate over.
22195     * @param {...(Function|Function[])} [iteratees=[_.identity]]
22196     *  The iteratees to sort by.
22197     * @returns {Array} Returns the new sorted array.
22198     * @example
22199     *
22200     * var users = [
22201     *   { 'user': 'fred',   'age': 48 },
22202     *   { 'user': 'barney', 'age': 36 },
22203     *   { 'user': 'fred',   'age': 30 },
22204     *   { 'user': 'barney', 'age': 34 }
22205     * ];
22206     *
22207     * _.sortBy(users, [function(o) { return o.user; }]);
22208     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
22209     *
22210     * _.sortBy(users, ['user', 'age']);
22211     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
22212     */
22213    var sortBy = baseRest(function(collection, iteratees) {
22214      if (collection == null) {
22215        return [];
22216      }
22217      var length = iteratees.length;
22218      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
22219        iteratees = [];
22220      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
22221        iteratees = [iteratees[0]];
22222      }
22223      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
22224    });
22225
22226    /*------------------------------------------------------------------------*/
22227
22228    /**
22229     * Gets the timestamp of the number of milliseconds that have elapsed since
22230     * the Unix epoch (1 January 1970 00:00:00 UTC).
22231     *
22232     * @static
22233     * @memberOf _
22234     * @since 2.4.0
22235     * @category Date
22236     * @returns {number} Returns the timestamp.
22237     * @example
22238     *
22239     * _.defer(function(stamp) {
22240     *   console.log(_.now() - stamp);
22241     * }, _.now());
22242     * // => Logs the number of milliseconds it took for the deferred invocation.
22243     */
22244    var now = ctxNow || function() {
22245      return root.Date.now();
22246    };
22247
22248    /*------------------------------------------------------------------------*/
22249
22250    /**
22251     * The opposite of `_.before`; this method creates a function that invokes
22252     * `func` once it's called `n` or more times.
22253     *
22254     * @static
22255     * @memberOf _
22256     * @since 0.1.0
22257     * @category Function
22258     * @param {number} n The number of calls before `func` is invoked.
22259     * @param {Function} func The function to restrict.
22260     * @returns {Function} Returns the new restricted function.
22261     * @example
22262     *
22263     * var saves = ['profile', 'settings'];
22264     *
22265     * var done = _.after(saves.length, function() {
22266     *   console.log('done saving!');
22267     * });
22268     *
22269     * _.forEach(saves, function(type) {
22270     *   asyncSave({ 'type': type, 'complete': done });
22271     * });
22272     * // => Logs 'done saving!' after the two async saves have completed.
22273     */
22274    function after(n, func) {
22275      if (typeof func != 'function') {
22276        throw new TypeError(FUNC_ERROR_TEXT);
22277      }
22278      n = toInteger(n);
22279      return function() {
22280        if (--n < 1) {
22281          return func.apply(this, arguments);
22282        }
22283      };
22284    }
22285
22286    /**
22287     * Creates a function that invokes `func`, with up to `n` arguments,
22288     * ignoring any additional arguments.
22289     *
22290     * @static
22291     * @memberOf _
22292     * @since 3.0.0
22293     * @category Function
22294     * @param {Function} func The function to cap arguments for.
22295     * @param {number} [n=func.length] The arity cap.
22296     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
22297     * @returns {Function} Returns the new capped function.
22298     * @example
22299     *
22300     * _.map(['6', '8', '10'], _.ary(parseInt, 1));
22301     * // => [6, 8, 10]
22302     */
22303    function ary(func, n, guard) {
22304      n = guard ? undefined : n;
22305      n = (func && n == null) ? func.length : n;
22306      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
22307    }
22308
22309    /**
22310     * Creates a function that invokes `func`, with the `this` binding and arguments
22311     * of the created function, while it's called less than `n` times. Subsequent
22312     * calls to the created function return the result of the last `func` invocation.
22313     *
22314     * @static
22315     * @memberOf _
22316     * @since 3.0.0
22317     * @category Function
22318     * @param {number} n The number of calls at which `func` is no longer invoked.
22319     * @param {Function} func The function to restrict.
22320     * @returns {Function} Returns the new restricted function.
22321     * @example
22322     *
22323     * jQuery(element).on('click', _.before(5, addContactToList));
22324     * // => Allows adding up to 4 contacts to the list.
22325     */
22326    function before(n, func) {
22327      var result;
22328      if (typeof func != 'function') {
22329        throw new TypeError(FUNC_ERROR_TEXT);
22330      }
22331      n = toInteger(n);
22332      return function() {
22333        if (--n > 0) {
22334          result = func.apply(this, arguments);
22335        }
22336        if (n <= 1) {
22337          func = undefined;
22338        }
22339        return result;
22340      };
22341    }
22342
22343    /**
22344     * Creates a function that invokes `func` with the `this` binding of `thisArg`
22345     * and `partials` prepended to the arguments it receives.
22346     *
22347     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
22348     * may be used as a placeholder for partially applied arguments.
22349     *
22350     * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
22351     * property of bound functions.
22352     *
22353     * @static
22354     * @memberOf _
22355     * @since 0.1.0
22356     * @category Function
22357     * @param {Function} func The function to bind.
22358     * @param {*} thisArg The `this` binding of `func`.
22359     * @param {...*} [partials] The arguments to be partially applied.
22360     * @returns {Function} Returns the new bound function.
22361     * @example
22362     *
22363     * function greet(greeting, punctuation) {
22364     *   return greeting + ' ' + this.user + punctuation;
22365     * }
22366     *
22367     * var object = { 'user': 'fred' };
22368     *
22369     * var bound = _.bind(greet, object, 'hi');
22370     * bound('!');
22371     * // => 'hi fred!'
22372     *
22373     * // Bound with placeholders.
22374     * var bound = _.bind(greet, object, _, '!');
22375     * bound('hi');
22376     * // => 'hi fred!'
22377     */
22378    var bind = baseRest(function(func, thisArg, partials) {
22379      var bitmask = WRAP_BIND_FLAG;
22380      if (partials.length) {
22381        var holders = replaceHolders(partials, getHolder(bind));
22382        bitmask |= WRAP_PARTIAL_FLAG;
22383      }
22384      return createWrap(func, bitmask, thisArg, partials, holders);
22385    });
22386
22387    /**
22388     * Creates a function that invokes the method at `object[key]` with `partials`
22389     * prepended to the arguments it receives.
22390     *
22391     * This method differs from `_.bind` by allowing bound functions to reference
22392     * methods that may be redefined or don't yet exist. See
22393     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
22394     * for more details.
22395     *
22396     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
22397     * builds, may be used as a placeholder for partially applied arguments.
22398     *
22399     * @static
22400     * @memberOf _
22401     * @since 0.10.0
22402     * @category Function
22403     * @param {Object} object The object to invoke the method on.
22404     * @param {string} key The key of the method.
22405     * @param {...*} [partials] The arguments to be partially applied.
22406     * @returns {Function} Returns the new bound function.
22407     * @example
22408     *
22409     * var object = {
22410     *   'user': 'fred',
22411     *   'greet': function(greeting, punctuation) {
22412     *     return greeting + ' ' + this.user + punctuation;
22413     *   }
22414     * };
22415     *
22416     * var bound = _.bindKey(object, 'greet', 'hi');
22417     * bound('!');
22418     * // => 'hi fred!'
22419     *
22420     * object.greet = function(greeting, punctuation) {
22421     *   return greeting + 'ya ' + this.user + punctuation;
22422     * };
22423     *
22424     * bound('!');
22425     * // => 'hiya fred!'
22426     *
22427     * // Bound with placeholders.
22428     * var bound = _.bindKey(object, 'greet', _, '!');
22429     * bound('hi');
22430     * // => 'hiya fred!'
22431     */
22432    var bindKey = baseRest(function(object, key, partials) {
22433      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
22434      if (partials.length) {
22435        var holders = replaceHolders(partials, getHolder(bindKey));
22436        bitmask |= WRAP_PARTIAL_FLAG;
22437      }
22438      return createWrap(key, bitmask, object, partials, holders);
22439    });
22440
22441    /**
22442     * Creates a function that accepts arguments of `func` and either invokes
22443     * `func` returning its result, if at least `arity` number of arguments have
22444     * been provided, or returns a function that accepts the remaining `func`
22445     * arguments, and so on. The arity of `func` may be specified if `func.length`
22446     * is not sufficient.
22447     *
22448     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
22449     * may be used as a placeholder for provided arguments.
22450     *
22451     * **Note:** This method doesn't set the "length" property of curried functions.
22452     *
22453     * @static
22454     * @memberOf _
22455     * @since 2.0.0
22456     * @category Function
22457     * @param {Function} func The function to curry.
22458     * @param {number} [arity=func.length] The arity of `func`.
22459     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
22460     * @returns {Function} Returns the new curried function.
22461     * @example
22462     *
22463     * var abc = function(a, b, c) {
22464     *   return [a, b, c];
22465     * };
22466     *
22467     * var curried = _.curry(abc);
22468     *
22469     * curried(1)(2)(3);
22470     * // => [1, 2, 3]
22471     *
22472     * curried(1, 2)(3);
22473     * // => [1, 2, 3]
22474     *
22475     * curried(1, 2, 3);
22476     * // => [1, 2, 3]
22477     *
22478     * // Curried with placeholders.
22479     * curried(1)(_, 3)(2);
22480     * // => [1, 2, 3]
22481     */
22482    function curry(func, arity, guard) {
22483      arity = guard ? undefined : arity;
22484      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
22485      result.placeholder = curry.placeholder;
22486      return result;
22487    }
22488
22489    /**
22490     * This method is like `_.curry` except that arguments are applied to `func`
22491     * in the manner of `_.partialRight` instead of `_.partial`.
22492     *
22493     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
22494     * builds, may be used as a placeholder for provided arguments.
22495     *
22496     * **Note:** This method doesn't set the "length" property of curried functions.
22497     *
22498     * @static
22499     * @memberOf _
22500     * @since 3.0.0
22501     * @category Function
22502     * @param {Function} func The function to curry.
22503     * @param {number} [arity=func.length] The arity of `func`.
22504     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
22505     * @returns {Function} Returns the new curried function.
22506     * @example
22507     *
22508     * var abc = function(a, b, c) {
22509     *   return [a, b, c];
22510     * };
22511     *
22512     * var curried = _.curryRight(abc);
22513     *
22514     * curried(3)(2)(1);
22515     * // => [1, 2, 3]
22516     *
22517     * curried(2, 3)(1);
22518     * // => [1, 2, 3]
22519     *
22520     * curried(1, 2, 3);
22521     * // => [1, 2, 3]
22522     *
22523     * // Curried with placeholders.
22524     * curried(3)(1, _)(2);
22525     * // => [1, 2, 3]
22526     */
22527    function curryRight(func, arity, guard) {
22528      arity = guard ? undefined : arity;
22529      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
22530      result.placeholder = curryRight.placeholder;
22531      return result;
22532    }
22533
22534    /**
22535     * Creates a debounced function that delays invoking `func` until after `wait`
22536     * milliseconds have elapsed since the last time the debounced function was
22537     * invoked. The debounced function comes with a `cancel` method to cancel
22538     * delayed `func` invocations and a `flush` method to immediately invoke them.
22539     * Provide `options` to indicate whether `func` should be invoked on the
22540     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
22541     * with the last arguments provided to the debounced function. Subsequent
22542     * calls to the debounced function return the result of the last `func`
22543     * invocation.
22544     *
22545     * **Note:** If `leading` and `trailing` options are `true`, `func` is
22546     * invoked on the trailing edge of the timeout only if the debounced function
22547     * is invoked more than once during the `wait` timeout.
22548     *
22549     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
22550     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
22551     *
22552     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
22553     * for details over the differences between `_.debounce` and `_.throttle`.
22554     *
22555     * @static
22556     * @memberOf _
22557     * @since 0.1.0
22558     * @category Function
22559     * @param {Function} func The function to debounce.
22560     * @param {number} [wait=0] The number of milliseconds to delay.
22561     * @param {Object} [options={}] The options object.
22562     * @param {boolean} [options.leading=false]
22563     *  Specify invoking on the leading edge of the timeout.
22564     * @param {number} [options.maxWait]
22565     *  The maximum time `func` is allowed to be delayed before it's invoked.
22566     * @param {boolean} [options.trailing=true]
22567     *  Specify invoking on the trailing edge of the timeout.
22568     * @returns {Function} Returns the new debounced function.
22569     * @example
22570     *
22571     * // Avoid costly calculations while the window size is in flux.
22572     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
22573     *
22574     * // Invoke `sendMail` when clicked, debouncing subsequent calls.
22575     * jQuery(element).on('click', _.debounce(sendMail, 300, {
22576     *   'leading': true,
22577     *   'trailing': false
22578     * }));
22579     *
22580     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
22581     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
22582     * var source = new EventSource('/stream');
22583     * jQuery(source).on('message', debounced);
22584     *
22585     * // Cancel the trailing debounced invocation.
22586     * jQuery(window).on('popstate', debounced.cancel);
22587     */
22588    function debounce(func, wait, options) {
22589      var lastArgs,
22590          lastThis,
22591          maxWait,
22592          result,
22593          timerId,
22594          lastCallTime,
22595          lastInvokeTime = 0,
22596          leading = false,
22597          maxing = false,
22598          trailing = true;
22599
22600      if (typeof func != 'function') {
22601        throw new TypeError(FUNC_ERROR_TEXT);
22602      }
22603      wait = toNumber(wait) || 0;
22604      if (isObject(options)) {
22605        leading = !!options.leading;
22606        maxing = 'maxWait' in options;
22607        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
22608        trailing = 'trailing' in options ? !!options.trailing : trailing;
22609      }
22610
22611      function invokeFunc(time) {
22612        var args = lastArgs,
22613            thisArg = lastThis;
22614
22615        lastArgs = lastThis = undefined;
22616        lastInvokeTime = time;
22617        result = func.apply(thisArg, args);
22618        return result;
22619      }
22620
22621      function leadingEdge(time) {
22622        // Reset any `maxWait` timer.
22623        lastInvokeTime = time;
22624        // Start the timer for the trailing edge.
22625        timerId = setTimeout(timerExpired, wait);
22626        // Invoke the leading edge.
22627        return leading ? invokeFunc(time) : result;
22628      }
22629
22630      function remainingWait(time) {
22631        var timeSinceLastCall = time - lastCallTime,
22632            timeSinceLastInvoke = time - lastInvokeTime,
22633            timeWaiting = wait - timeSinceLastCall;
22634
22635        return maxing
22636          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
22637          : timeWaiting;
22638      }
22639
22640      function shouldInvoke(time) {
22641        var timeSinceLastCall = time - lastCallTime,
22642            timeSinceLastInvoke = time - lastInvokeTime;
22643
22644        // Either this is the first call, activity has stopped and we're at the
22645        // trailing edge, the system time has gone backwards and we're treating
22646        // it as the trailing edge, or we've hit the `maxWait` limit.
22647        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
22648          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
22649      }
22650
22651      function timerExpired() {
22652        var time = now();
22653        if (shouldInvoke(time)) {
22654          return trailingEdge(time);
22655        }
22656        // Restart the timer.
22657        timerId = setTimeout(timerExpired, remainingWait(time));
22658      }
22659
22660      function trailingEdge(time) {
22661        timerId = undefined;
22662
22663        // Only invoke if we have `lastArgs` which means `func` has been
22664        // debounced at least once.
22665        if (trailing && lastArgs) {
22666          return invokeFunc(time);
22667        }
22668        lastArgs = lastThis = undefined;
22669        return result;
22670      }
22671
22672      function cancel() {
22673        if (timerId !== undefined) {
22674          clearTimeout(timerId);
22675        }
22676        lastInvokeTime = 0;
22677        lastArgs = lastCallTime = lastThis = timerId = undefined;
22678      }
22679
22680      function flush() {
22681        return timerId === undefined ? result : trailingEdge(now());
22682      }
22683
22684      function debounced() {
22685        var time = now(),
22686            isInvoking = shouldInvoke(time);
22687
22688        lastArgs = arguments;
22689        lastThis = this;
22690        lastCallTime = time;
22691
22692        if (isInvoking) {
22693          if (timerId === undefined) {
22694            return leadingEdge(lastCallTime);
22695          }
22696          if (maxing) {
22697            // Handle invocations in a tight loop.
22698            clearTimeout(timerId);
22699            timerId = setTimeout(timerExpired, wait);
22700            return invokeFunc(lastCallTime);
22701          }
22702        }
22703        if (timerId === undefined) {
22704          timerId = setTimeout(timerExpired, wait);
22705        }
22706        return result;
22707      }
22708      debounced.cancel = cancel;
22709      debounced.flush = flush;
22710      return debounced;
22711    }
22712
22713    /**
22714     * Defers invoking the `func` until the current call stack has cleared. Any
22715     * additional arguments are provided to `func` when it's invoked.
22716     *
22717     * @static
22718     * @memberOf _
22719     * @since 0.1.0
22720     * @category Function
22721     * @param {Function} func The function to defer.
22722     * @param {...*} [args] The arguments to invoke `func` with.
22723     * @returns {number} Returns the timer id.
22724     * @example
22725     *
22726     * _.defer(function(text) {
22727     *   console.log(text);
22728     * }, 'deferred');
22729     * // => Logs 'deferred' after one millisecond.
22730     */
22731    var defer = baseRest(function(func, args) {
22732      return baseDelay(func, 1, args);
22733    });
22734
22735    /**
22736     * Invokes `func` after `wait` milliseconds. Any additional arguments are
22737     * provided to `func` when it's invoked.
22738     *
22739     * @static
22740     * @memberOf _
22741     * @since 0.1.0
22742     * @category Function
22743     * @param {Function} func The function to delay.
22744     * @param {number} wait The number of milliseconds to delay invocation.
22745     * @param {...*} [args] The arguments to invoke `func` with.
22746     * @returns {number} Returns the timer id.
22747     * @example
22748     *
22749     * _.delay(function(text) {
22750     *   console.log(text);
22751     * }, 1000, 'later');
22752     * // => Logs 'later' after one second.
22753     */
22754    var delay = baseRest(function(func, wait, args) {
22755      return baseDelay(func, toNumber(wait) || 0, args);
22756    });
22757
22758    /**
22759     * Creates a function that invokes `func` with arguments reversed.
22760     *
22761     * @static
22762     * @memberOf _
22763     * @since 4.0.0
22764     * @category Function
22765     * @param {Function} func The function to flip arguments for.
22766     * @returns {Function} Returns the new flipped function.
22767     * @example
22768     *
22769     * var flipped = _.flip(function() {
22770     *   return _.toArray(arguments);
22771     * });
22772     *
22773     * flipped('a', 'b', 'c', 'd');
22774     * // => ['d', 'c', 'b', 'a']
22775     */
22776    function flip(func) {
22777      return createWrap(func, WRAP_FLIP_FLAG);
22778    }
22779
22780    /**
22781     * Creates a function that memoizes the result of `func`. If `resolver` is
22782     * provided, it determines the cache key for storing the result based on the
22783     * arguments provided to the memoized function. By default, the first argument
22784     * provided to the memoized function is used as the map cache key. The `func`
22785     * is invoked with the `this` binding of the memoized function.
22786     *
22787     * **Note:** The cache is exposed as the `cache` property on the memoized
22788     * function. Its creation may be customized by replacing the `_.memoize.Cache`
22789     * constructor with one whose instances implement the
22790     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
22791     * method interface of `clear`, `delete`, `get`, `has`, and `set`.
22792     *
22793     * @static
22794     * @memberOf _
22795     * @since 0.1.0
22796     * @category Function
22797     * @param {Function} func The function to have its output memoized.
22798     * @param {Function} [resolver] The function to resolve the cache key.
22799     * @returns {Function} Returns the new memoized function.
22800     * @example
22801     *
22802     * var object = { 'a': 1, 'b': 2 };
22803     * var other = { 'c': 3, 'd': 4 };
22804     *
22805     * var values = _.memoize(_.values);
22806     * values(object);
22807     * // => [1, 2]
22808     *
22809     * values(other);
22810     * // => [3, 4]
22811     *
22812     * object.a = 2;
22813     * values(object);
22814     * // => [1, 2]
22815     *
22816     * // Modify the result cache.
22817     * values.cache.set(object, ['a', 'b']);
22818     * values(object);
22819     * // => ['a', 'b']
22820     *
22821     * // Replace `_.memoize.Cache`.
22822     * _.memoize.Cache = WeakMap;
22823     */
22824    function memoize(func, resolver) {
22825      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
22826        throw new TypeError(FUNC_ERROR_TEXT);
22827      }
22828      var memoized = function() {
22829        var args = arguments,
22830            key = resolver ? resolver.apply(this, args) : args[0],
22831            cache = memoized.cache;
22832
22833        if (cache.has(key)) {
22834          return cache.get(key);
22835        }
22836        var result = func.apply(this, args);
22837        memoized.cache = cache.set(key, result) || cache;
22838        return result;
22839      };
22840      memoized.cache = new (memoize.Cache || MapCache);
22841      return memoized;
22842    }
22843
22844    // Expose `MapCache`.
22845    memoize.Cache = MapCache;
22846
22847    /**
22848     * Creates a function that negates the result of the predicate `func`. The
22849     * `func` predicate is invoked with the `this` binding and arguments of the
22850     * created function.
22851     *
22852     * @static
22853     * @memberOf _
22854     * @since 3.0.0
22855     * @category Function
22856     * @param {Function} predicate The predicate to negate.
22857     * @returns {Function} Returns the new negated function.
22858     * @example
22859     *
22860     * function isEven(n) {
22861     *   return n % 2 == 0;
22862     * }
22863     *
22864     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
22865     * // => [1, 3, 5]
22866     */
22867    function negate(predicate) {
22868      if (typeof predicate != 'function') {
22869        throw new TypeError(FUNC_ERROR_TEXT);
22870      }
22871      return function() {
22872        var args = arguments;
22873        switch (args.length) {
22874          case 0: return !predicate.call(this);
22875          case 1: return !predicate.call(this, args[0]);
22876          case 2: return !predicate.call(this, args[0], args[1]);
22877          case 3: return !predicate.call(this, args[0], args[1], args[2]);
22878        }
22879        return !predicate.apply(this, args);
22880      };
22881    }
22882
22883    /**
22884     * Creates a function that is restricted to invoking `func` once. Repeat calls
22885     * to the function return the value of the first invocation. The `func` is
22886     * invoked with the `this` binding and arguments of the created function.
22887     *
22888     * @static
22889     * @memberOf _
22890     * @since 0.1.0
22891     * @category Function
22892     * @param {Function} func The function to restrict.
22893     * @returns {Function} Returns the new restricted function.
22894     * @example
22895     *
22896     * var initialize = _.once(createApplication);
22897     * initialize();
22898     * initialize();
22899     * // => `createApplication` is invoked once
22900     */
22901    function once(func) {
22902      return before(2, func);
22903    }
22904
22905    /**
22906     * Creates a function that invokes `func` with its arguments transformed.
22907     *
22908     * @static
22909     * @since 4.0.0
22910     * @memberOf _
22911     * @category Function
22912     * @param {Function} func The function to wrap.
22913     * @param {...(Function|Function[])} [transforms=[_.identity]]
22914     *  The argument transforms.
22915     * @returns {Function} Returns the new function.
22916     * @example
22917     *
22918     * function doubled(n) {
22919     *   return n * 2;
22920     * }
22921     *
22922     * function square(n) {
22923     *   return n * n;
22924     * }
22925     *
22926     * var func = _.overArgs(function(x, y) {
22927     *   return [x, y];
22928     * }, [square, doubled]);
22929     *
22930     * func(9, 3);
22931     * // => [81, 6]
22932     *
22933     * func(10, 5);
22934     * // => [100, 10]
22935     */
22936    var overArgs = castRest(function(func, transforms) {
22937      transforms = (transforms.length == 1 && isArray(transforms[0]))
22938        ? arrayMap(transforms[0], baseUnary(getIteratee()))
22939        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
22940
22941      var funcsLength = transforms.length;
22942      return baseRest(function(args) {
22943        var index = -1,
22944            length = nativeMin(args.length, funcsLength);
22945
22946        while (++index < length) {
22947          args[index] = transforms[index].call(this, args[index]);
22948        }
22949        return apply(func, this, args);
22950      });
22951    });
22952
22953    /**
22954     * Creates a function that invokes `func` with `partials` prepended to the
22955     * arguments it receives. This method is like `_.bind` except it does **not**
22956     * alter the `this` binding.
22957     *
22958     * The `_.partial.placeholder` value, which defaults to `_` in monolithic
22959     * builds, may be used as a placeholder for partially applied arguments.
22960     *
22961     * **Note:** This method doesn't set the "length" property of partially
22962     * applied functions.
22963     *
22964     * @static
22965     * @memberOf _
22966     * @since 0.2.0
22967     * @category Function
22968     * @param {Function} func The function to partially apply arguments to.
22969     * @param {...*} [partials] The arguments to be partially applied.
22970     * @returns {Function} Returns the new partially applied function.
22971     * @example
22972     *
22973     * function greet(greeting, name) {
22974     *   return greeting + ' ' + name;
22975     * }
22976     *
22977     * var sayHelloTo = _.partial(greet, 'hello');
22978     * sayHelloTo('fred');
22979     * // => 'hello fred'
22980     *
22981     * // Partially applied with placeholders.
22982     * var greetFred = _.partial(greet, _, 'fred');
22983     * greetFred('hi');
22984     * // => 'hi fred'
22985     */
22986    var partial = baseRest(function(func, partials) {
22987      var holders = replaceHolders(partials, getHolder(partial));
22988      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
22989    });
22990
22991    /**
22992     * This method is like `_.partial` except that partially applied arguments
22993     * are appended to the arguments it receives.
22994     *
22995     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
22996     * builds, may be used as a placeholder for partially applied arguments.
22997     *
22998     * **Note:** This method doesn't set the "length" property of partially
22999     * applied functions.
23000     *
23001     * @static
23002     * @memberOf _
23003     * @since 1.0.0
23004     * @category Function
23005     * @param {Function} func The function to partially apply arguments to.
23006     * @param {...*} [partials] The arguments to be partially applied.
23007     * @returns {Function} Returns the new partially applied function.
23008     * @example
23009     *
23010     * function greet(greeting, name) {
23011     *   return greeting + ' ' + name;
23012     * }
23013     *
23014     * var greetFred = _.partialRight(greet, 'fred');
23015     * greetFred('hi');
23016     * // => 'hi fred'
23017     *
23018     * // Partially applied with placeholders.
23019     * var sayHelloTo = _.partialRight(greet, 'hello', _);
23020     * sayHelloTo('fred');
23021     * // => 'hello fred'
23022     */
23023    var partialRight = baseRest(function(func, partials) {
23024      var holders = replaceHolders(partials, getHolder(partialRight));
23025      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
23026    });
23027
23028    /**
23029     * Creates a function that invokes `func` with arguments arranged according
23030     * to the specified `indexes` where the argument value at the first index is
23031     * provided as the first argument, the argument value at the second index is
23032     * provided as the second argument, and so on.
23033     *
23034     * @static
23035     * @memberOf _
23036     * @since 3.0.0
23037     * @category Function
23038     * @param {Function} func The function to rearrange arguments for.
23039     * @param {...(number|number[])} indexes The arranged argument indexes.
23040     * @returns {Function} Returns the new function.
23041     * @example
23042     *
23043     * var rearged = _.rearg(function(a, b, c) {
23044     *   return [a, b, c];
23045     * }, [2, 0, 1]);
23046     *
23047     * rearged('b', 'c', 'a')
23048     * // => ['a', 'b', 'c']
23049     */
23050    var rearg = flatRest(function(func, indexes) {
23051      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
23052    });
23053
23054    /**
23055     * Creates a function that invokes `func` with the `this` binding of the
23056     * created function and arguments from `start` and beyond provided as
23057     * an array.
23058     *
23059     * **Note:** This method is based on the
23060     * [rest parameter](https://mdn.io/rest_parameters).
23061     *
23062     * @static
23063     * @memberOf _
23064     * @since 4.0.0
23065     * @category Function
23066     * @param {Function} func The function to apply a rest parameter to.
23067     * @param {number} [start=func.length-1] The start position of the rest parameter.
23068     * @returns {Function} Returns the new function.
23069     * @example
23070     *
23071     * var say = _.rest(function(what, names) {
23072     *   return what + ' ' + _.initial(names).join(', ') +
23073     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);
23074     * });
23075     *
23076     * say('hello', 'fred', 'barney', 'pebbles');
23077     * // => 'hello fred, barney, & pebbles'
23078     */
23079    function rest(func, start) {
23080      if (typeof func != 'function') {
23081        throw new TypeError(FUNC_ERROR_TEXT);
23082      }
23083      start = start === undefined ? start : toInteger(start);
23084      return baseRest(func, start);
23085    }
23086
23087    /**
23088     * Creates a function that invokes `func` with the `this` binding of the
23089     * create function and an array of arguments much like
23090     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
23091     *
23092     * **Note:** This method is based on the
23093     * [spread operator](https://mdn.io/spread_operator).
23094     *
23095     * @static
23096     * @memberOf _
23097     * @since 3.2.0
23098     * @category Function
23099     * @param {Function} func The function to spread arguments over.
23100     * @param {number} [start=0] The start position of the spread.
23101     * @returns {Function} Returns the new function.
23102     * @example
23103     *
23104     * var say = _.spread(function(who, what) {
23105     *   return who + ' says ' + what;
23106     * });
23107     *
23108     * say(['fred', 'hello']);
23109     * // => 'fred says hello'
23110     *
23111     * var numbers = Promise.all([
23112     *   Promise.resolve(40),
23113     *   Promise.resolve(36)
23114     * ]);
23115     *
23116     * numbers.then(_.spread(function(x, y) {
23117     *   return x + y;
23118     * }));
23119     * // => a Promise of 76
23120     */
23121    function spread(func, start) {
23122      if (typeof func != 'function') {
23123        throw new TypeError(FUNC_ERROR_TEXT);
23124      }
23125      start = start == null ? 0 : nativeMax(toInteger(start), 0);
23126      return baseRest(function(args) {
23127        var array = args[start],
23128            otherArgs = castSlice(args, 0, start);
23129
23130        if (array) {
23131          arrayPush(otherArgs, array);
23132        }
23133        return apply(func, this, otherArgs);
23134      });
23135    }
23136
23137    /**
23138     * Creates a throttled function that only invokes `func` at most once per
23139     * every `wait` milliseconds. The throttled function comes with a `cancel`
23140     * method to cancel delayed `func` invocations and a `flush` method to
23141     * immediately invoke them. Provide `options` to indicate whether `func`
23142     * should be invoked on the leading and/or trailing edge of the `wait`
23143     * timeout. The `func` is invoked with the last arguments provided to the
23144     * throttled function. Subsequent calls to the throttled function return the
23145     * result of the last `func` invocation.
23146     *
23147     * **Note:** If `leading` and `trailing` options are `true`, `func` is
23148     * invoked on the trailing edge of the timeout only if the throttled function
23149     * is invoked more than once during the `wait` timeout.
23150     *
23151     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
23152     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
23153     *
23154     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
23155     * for details over the differences between `_.throttle` and `_.debounce`.
23156     *
23157     * @static
23158     * @memberOf _
23159     * @since 0.1.0
23160     * @category Function
23161     * @param {Function} func The function to throttle.
23162     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
23163     * @param {Object} [options={}] The options object.
23164     * @param {boolean} [options.leading=true]
23165     *  Specify invoking on the leading edge of the timeout.
23166     * @param {boolean} [options.trailing=true]
23167     *  Specify invoking on the trailing edge of the timeout.
23168     * @returns {Function} Returns the new throttled function.
23169     * @example
23170     *
23171     * // Avoid excessively updating the position while scrolling.
23172     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
23173     *
23174     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
23175     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
23176     * jQuery(element).on('click', throttled);
23177     *
23178     * // Cancel the trailing throttled invocation.
23179     * jQuery(window).on('popstate', throttled.cancel);
23180     */
23181    function throttle(func, wait, options) {
23182      var leading = true,
23183          trailing = true;
23184
23185      if (typeof func != 'function') {
23186        throw new TypeError(FUNC_ERROR_TEXT);
23187      }
23188      if (isObject(options)) {
23189        leading = 'leading' in options ? !!options.leading : leading;
23190        trailing = 'trailing' in options ? !!options.trailing : trailing;
23191      }
23192      return debounce(func, wait, {
23193        'leading': leading,
23194        'maxWait': wait,
23195        'trailing': trailing
23196      });
23197    }
23198
23199    /**
23200     * Creates a function that accepts up to one argument, ignoring any
23201     * additional arguments.
23202     *
23203     * @static
23204     * @memberOf _
23205     * @since 4.0.0
23206     * @category Function
23207     * @param {Function} func The function to cap arguments for.
23208     * @returns {Function} Returns the new capped function.
23209     * @example
23210     *
23211     * _.map(['6', '8', '10'], _.unary(parseInt));
23212     * // => [6, 8, 10]
23213     */
23214    function unary(func) {
23215      return ary(func, 1);
23216    }
23217
23218    /**
23219     * Creates a function that provides `value` to `wrapper` as its first
23220     * argument. Any additional arguments provided to the function are appended
23221     * to those provided to the `wrapper`. The wrapper is invoked with the `this`
23222     * binding of the created function.
23223     *
23224     * @static
23225     * @memberOf _
23226     * @since 0.1.0
23227     * @category Function
23228     * @param {*} value The value to wrap.
23229     * @param {Function} [wrapper=identity] The wrapper function.
23230     * @returns {Function} Returns the new function.
23231     * @example
23232     *
23233     * var p = _.wrap(_.escape, function(func, text) {
23234     *   return '<p>' + func(text) + '</p>';
23235     * });
23236     *
23237     * p('fred, barney, & pebbles');
23238     * // => '<p>fred, barney, &amp; pebbles</p>'
23239     */
23240    function wrap(value, wrapper) {
23241      return partial(castFunction(wrapper), value);
23242    }
23243
23244    /*------------------------------------------------------------------------*/
23245
23246    /**
23247     * Casts `value` as an array if it's not one.
23248     *
23249     * @static
23250     * @memberOf _
23251     * @since 4.4.0
23252     * @category Lang
23253     * @param {*} value The value to inspect.
23254     * @returns {Array} Returns the cast array.
23255     * @example
23256     *
23257     * _.castArray(1);
23258     * // => [1]
23259     *
23260     * _.castArray({ 'a': 1 });
23261     * // => [{ 'a': 1 }]
23262     *
23263     * _.castArray('abc');
23264     * // => ['abc']
23265     *
23266     * _.castArray(null);
23267     * // => [null]
23268     *
23269     * _.castArray(undefined);
23270     * // => [undefined]
23271     *
23272     * _.castArray();
23273     * // => []
23274     *
23275     * var array = [1, 2, 3];
23276     * console.log(_.castArray(array) === array);
23277     * // => true
23278     */
23279    function castArray() {
23280      if (!arguments.length) {
23281        return [];
23282      }
23283      var value = arguments[0];
23284      return isArray(value) ? value : [value];
23285    }
23286
23287    /**
23288     * Creates a shallow clone of `value`.
23289     *
23290     * **Note:** This method is loosely based on the
23291     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
23292     * and supports cloning arrays, array buffers, booleans, date objects, maps,
23293     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
23294     * arrays. The own enumerable properties of `arguments` objects are cloned
23295     * as plain objects. An empty object is returned for uncloneable values such
23296     * as error objects, functions, DOM nodes, and WeakMaps.
23297     *
23298     * @static
23299     * @memberOf _
23300     * @since 0.1.0
23301     * @category Lang
23302     * @param {*} value The value to clone.
23303     * @returns {*} Returns the cloned value.
23304     * @see _.cloneDeep
23305     * @example
23306     *
23307     * var objects = [{ 'a': 1 }, { 'b': 2 }];
23308     *
23309     * var shallow = _.clone(objects);
23310     * console.log(shallow[0] === objects[0]);
23311     * // => true
23312     */
23313    function clone(value) {
23314      return baseClone(value, CLONE_SYMBOLS_FLAG);
23315    }
23316
23317    /**
23318     * This method is like `_.clone` except that it accepts `customizer` which
23319     * is invoked to produce the cloned value. If `customizer` returns `undefined`,
23320     * cloning is handled by the method instead. The `customizer` is invoked with
23321     * up to four arguments; (value [, index|key, object, stack]).
23322     *
23323     * @static
23324     * @memberOf _
23325     * @since 4.0.0
23326     * @category Lang
23327     * @param {*} value The value to clone.
23328     * @param {Function} [customizer] The function to customize cloning.
23329     * @returns {*} Returns the cloned value.
23330     * @see _.cloneDeepWith
23331     * @example
23332     *
23333     * function customizer(value) {
23334     *   if (_.isElement(value)) {
23335     *     return value.cloneNode(false);
23336     *   }
23337     * }
23338     *
23339     * var el = _.cloneWith(document.body, customizer);
23340     *
23341     * console.log(el === document.body);
23342     * // => false
23343     * console.log(el.nodeName);
23344     * // => 'BODY'
23345     * console.log(el.childNodes.length);
23346     * // => 0
23347     */
23348    function cloneWith(value, customizer) {
23349      customizer = typeof customizer == 'function' ? customizer : undefined;
23350      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
23351    }
23352
23353    /**
23354     * This method is like `_.clone` except that it recursively clones `value`.
23355     *
23356     * @static
23357     * @memberOf _
23358     * @since 1.0.0
23359     * @category Lang
23360     * @param {*} value The value to recursively clone.
23361     * @returns {*} Returns the deep cloned value.
23362     * @see _.clone
23363     * @example
23364     *
23365     * var objects = [{ 'a': 1 }, { 'b': 2 }];
23366     *
23367     * var deep = _.cloneDeep(objects);
23368     * console.log(deep[0] === objects[0]);
23369     * // => false
23370     */
23371    function cloneDeep(value) {
23372      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
23373    }
23374
23375    /**
23376     * This method is like `_.cloneWith` except that it recursively clones `value`.
23377     *
23378     * @static
23379     * @memberOf _
23380     * @since 4.0.0
23381     * @category Lang
23382     * @param {*} value The value to recursively clone.
23383     * @param {Function} [customizer] The function to customize cloning.
23384     * @returns {*} Returns the deep cloned value.
23385     * @see _.cloneWith
23386     * @example
23387     *
23388     * function customizer(value) {
23389     *   if (_.isElement(value)) {
23390     *     return value.cloneNode(true);
23391     *   }
23392     * }
23393     *
23394     * var el = _.cloneDeepWith(document.body, customizer);
23395     *
23396     * console.log(el === document.body);
23397     * // => false
23398     * console.log(el.nodeName);
23399     * // => 'BODY'
23400     * console.log(el.childNodes.length);
23401     * // => 20
23402     */
23403    function cloneDeepWith(value, customizer) {
23404      customizer = typeof customizer == 'function' ? customizer : undefined;
23405      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
23406    }
23407
23408    /**
23409     * Checks if `object` conforms to `source` by invoking the predicate
23410     * properties of `source` with the corresponding property values of `object`.
23411     *
23412     * **Note:** This method is equivalent to `_.conforms` when `source` is
23413     * partially applied.
23414     *
23415     * @static
23416     * @memberOf _
23417     * @since 4.14.0
23418     * @category Lang
23419     * @param {Object} object The object to inspect.
23420     * @param {Object} source The object of property predicates to conform to.
23421     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
23422     * @example
23423     *
23424     * var object = { 'a': 1, 'b': 2 };
23425     *
23426     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
23427     * // => true
23428     *
23429     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
23430     * // => false
23431     */
23432    function conformsTo(object, source) {
23433      return source == null || baseConformsTo(object, source, keys(source));
23434    }
23435
23436    /**
23437     * Performs a
23438     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
23439     * comparison between two values to determine if they are equivalent.
23440     *
23441     * @static
23442     * @memberOf _
23443     * @since 4.0.0
23444     * @category Lang
23445     * @param {*} value The value to compare.
23446     * @param {*} other The other value to compare.
23447     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
23448     * @example
23449     *
23450     * var object = { 'a': 1 };
23451     * var other = { 'a': 1 };
23452     *
23453     * _.eq(object, object);
23454     * // => true
23455     *
23456     * _.eq(object, other);
23457     * // => false
23458     *
23459     * _.eq('a', 'a');
23460     * // => true
23461     *
23462     * _.eq('a', Object('a'));
23463     * // => false
23464     *
23465     * _.eq(NaN, NaN);
23466     * // => true
23467     */
23468    function eq(value, other) {
23469      return value === other || (value !== value && other !== other);
23470    }
23471
23472    /**
23473     * Checks if `value` is greater than `other`.
23474     *
23475     * @static
23476     * @memberOf _
23477     * @since 3.9.0
23478     * @category Lang
23479     * @param {*} value The value to compare.
23480     * @param {*} other The other value to compare.
23481     * @returns {boolean} Returns `true` if `value` is greater than `other`,
23482     *  else `false`.
23483     * @see _.lt
23484     * @example
23485     *
23486     * _.gt(3, 1);
23487     * // => true
23488     *
23489     * _.gt(3, 3);
23490     * // => false
23491     *
23492     * _.gt(1, 3);
23493     * // => false
23494     */
23495    var gt = createRelationalOperation(baseGt);
23496
23497    /**
23498     * Checks if `value` is greater than or equal to `other`.
23499     *
23500     * @static
23501     * @memberOf _
23502     * @since 3.9.0
23503     * @category Lang
23504     * @param {*} value The value to compare.
23505     * @param {*} other The other value to compare.
23506     * @returns {boolean} Returns `true` if `value` is greater than or equal to
23507     *  `other`, else `false`.
23508     * @see _.lte
23509     * @example
23510     *
23511     * _.gte(3, 1);
23512     * // => true
23513     *
23514     * _.gte(3, 3);
23515     * // => true
23516     *
23517     * _.gte(1, 3);
23518     * // => false
23519     */
23520    var gte = createRelationalOperation(function(value, other) {
23521      return value >= other;
23522    });
23523
23524    /**
23525     * Checks if `value` is likely an `arguments` object.
23526     *
23527     * @static
23528     * @memberOf _
23529     * @since 0.1.0
23530     * @category Lang
23531     * @param {*} value The value to check.
23532     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
23533     *  else `false`.
23534     * @example
23535     *
23536     * _.isArguments(function() { return arguments; }());
23537     * // => true
23538     *
23539     * _.isArguments([1, 2, 3]);
23540     * // => false
23541     */
23542    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
23543      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
23544        !propertyIsEnumerable.call(value, 'callee');
23545    };
23546
23547    /**
23548     * Checks if `value` is classified as an `Array` object.
23549     *
23550     * @static
23551     * @memberOf _
23552     * @since 0.1.0
23553     * @category Lang
23554     * @param {*} value The value to check.
23555     * @returns {boolean} Returns `true` if `value` is an array, else `false`.
23556     * @example
23557     *
23558     * _.isArray([1, 2, 3]);
23559     * // => true
23560     *
23561     * _.isArray(document.body.children);
23562     * // => false
23563     *
23564     * _.isArray('abc');
23565     * // => false
23566     *
23567     * _.isArray(_.noop);
23568     * // => false
23569     */
23570    var isArray = Array.isArray;
23571
23572    /**
23573     * Checks if `value` is classified as an `ArrayBuffer` object.
23574     *
23575     * @static
23576     * @memberOf _
23577     * @since 4.3.0
23578     * @category Lang
23579     * @param {*} value The value to check.
23580     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
23581     * @example
23582     *
23583     * _.isArrayBuffer(new ArrayBuffer(2));
23584     * // => true
23585     *
23586     * _.isArrayBuffer(new Array(2));
23587     * // => false
23588     */
23589    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
23590
23591    /**
23592     * Checks if `value` is array-like. A value is considered array-like if it's
23593     * not a function and has a `value.length` that's an integer greater than or
23594     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
23595     *
23596     * @static
23597     * @memberOf _
23598     * @since 4.0.0
23599     * @category Lang
23600     * @param {*} value The value to check.
23601     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
23602     * @example
23603     *
23604     * _.isArrayLike([1, 2, 3]);
23605     * // => true
23606     *
23607     * _.isArrayLike(document.body.children);
23608     * // => true
23609     *
23610     * _.isArrayLike('abc');
23611     * // => true
23612     *
23613     * _.isArrayLike(_.noop);
23614     * // => false
23615     */
23616    function isArrayLike(value) {
23617      return value != null && isLength(value.length) && !isFunction(value);
23618    }
23619
23620    /**
23621     * This method is like `_.isArrayLike` except that it also checks if `value`
23622     * is an object.
23623     *
23624     * @static
23625     * @memberOf _
23626     * @since 4.0.0
23627     * @category Lang
23628     * @param {*} value The value to check.
23629     * @returns {boolean} Returns `true` if `value` is an array-like object,
23630     *  else `false`.
23631     * @example
23632     *
23633     * _.isArrayLikeObject([1, 2, 3]);
23634     * // => true
23635     *
23636     * _.isArrayLikeObject(document.body.children);
23637     * // => true
23638     *
23639     * _.isArrayLikeObject('abc');
23640     * // => false
23641     *
23642     * _.isArrayLikeObject(_.noop);
23643     * // => false
23644     */
23645    function isArrayLikeObject(value) {
23646      return isObjectLike(value) && isArrayLike(value);
23647    }
23648
23649    /**
23650     * Checks if `value` is classified as a boolean primitive or object.
23651     *
23652     * @static
23653     * @memberOf _
23654     * @since 0.1.0
23655     * @category Lang
23656     * @param {*} value The value to check.
23657     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
23658     * @example
23659     *
23660     * _.isBoolean(false);
23661     * // => true
23662     *
23663     * _.isBoolean(null);
23664     * // => false
23665     */
23666    function isBoolean(value) {
23667      return value === true || value === false ||
23668        (isObjectLike(value) && baseGetTag(value) == boolTag);
23669    }
23670
23671    /**
23672     * Checks if `value` is a buffer.
23673     *
23674     * @static
23675     * @memberOf _
23676     * @since 4.3.0
23677     * @category Lang
23678     * @param {*} value The value to check.
23679     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
23680     * @example
23681     *
23682     * _.isBuffer(new Buffer(2));
23683     * // => true
23684     *
23685     * _.isBuffer(new Uint8Array(2));
23686     * // => false
23687     */
23688    var isBuffer = nativeIsBuffer || stubFalse;
23689
23690    /**
23691     * Checks if `value` is classified as a `Date` object.
23692     *
23693     * @static
23694     * @memberOf _
23695     * @since 0.1.0
23696     * @category Lang
23697     * @param {*} value The value to check.
23698     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
23699     * @example
23700     *
23701     * _.isDate(new Date);
23702     * // => true
23703     *
23704     * _.isDate('Mon April 23 2012');
23705     * // => false
23706     */
23707    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
23708
23709    /**
23710     * Checks if `value` is likely a DOM element.
23711     *
23712     * @static
23713     * @memberOf _
23714     * @since 0.1.0
23715     * @category Lang
23716     * @param {*} value The value to check.
23717     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
23718     * @example
23719     *
23720     * _.isElement(document.body);
23721     * // => true
23722     *
23723     * _.isElement('<body>');
23724     * // => false
23725     */
23726    function isElement(value) {
23727      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
23728    }
23729
23730    /**
23731     * Checks if `value` is an empty object, collection, map, or set.
23732     *
23733     * Objects are considered empty if they have no own enumerable string keyed
23734     * properties.
23735     *
23736     * Array-like values such as `arguments` objects, arrays, buffers, strings, or
23737     * jQuery-like collections are considered empty if they have a `length` of `0`.
23738     * Similarly, maps and sets are considered empty if they have a `size` of `0`.
23739     *
23740     * @static
23741     * @memberOf _
23742     * @since 0.1.0
23743     * @category Lang
23744     * @param {*} value The value to check.
23745     * @returns {boolean} Returns `true` if `value` is empty, else `false`.
23746     * @example
23747     *
23748     * _.isEmpty(null);
23749     * // => true
23750     *
23751     * _.isEmpty(true);
23752     * // => true
23753     *
23754     * _.isEmpty(1);
23755     * // => true
23756     *
23757     * _.isEmpty([1, 2, 3]);
23758     * // => false
23759     *
23760     * _.isEmpty({ 'a': 1 });
23761     * // => false
23762     */
23763    function isEmpty(value) {
23764      if (value == null) {
23765        return true;
23766      }
23767      if (isArrayLike(value) &&
23768          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
23769            isBuffer(value) || isTypedArray(value) || isArguments(value))) {
23770        return !value.length;
23771      }
23772      var tag = getTag(value);
23773      if (tag == mapTag || tag == setTag) {
23774        return !value.size;
23775      }
23776      if (isPrototype(value)) {
23777        return !baseKeys(value).length;
23778      }
23779      for (var key in value) {
23780        if (hasOwnProperty.call(value, key)) {
23781          return false;
23782        }
23783      }
23784      return true;
23785    }
23786
23787    /**
23788     * Performs a deep comparison between two values to determine if they are
23789     * equivalent.
23790     *
23791     * **Note:** This method supports comparing arrays, array buffers, booleans,
23792     * date objects, error objects, maps, numbers, `Object` objects, regexes,
23793     * sets, strings, symbols, and typed arrays. `Object` objects are compared
23794     * by their own, not inherited, enumerable properties. Functions and DOM
23795     * nodes are compared by strict equality, i.e. `===`.
23796     *
23797     * @static
23798     * @memberOf _
23799     * @since 0.1.0
23800     * @category Lang
23801     * @param {*} value The value to compare.
23802     * @param {*} other The other value to compare.
23803     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
23804     * @example
23805     *
23806     * var object = { 'a': 1 };
23807     * var other = { 'a': 1 };
23808     *
23809     * _.isEqual(object, other);
23810     * // => true
23811     *
23812     * object === other;
23813     * // => false
23814     */
23815    function isEqual(value, other) {
23816      return baseIsEqual(value, other);
23817    }
23818
23819    /**
23820     * This method is like `_.isEqual` except that it accepts `customizer` which
23821     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
23822     * are handled by the method instead. The `customizer` is invoked with up to
23823     * six arguments: (objValue, othValue [, index|key, object, other, stack]).
23824     *
23825     * @static
23826     * @memberOf _
23827     * @since 4.0.0
23828     * @category Lang
23829     * @param {*} value The value to compare.
23830     * @param {*} other The other value to compare.
23831     * @param {Function} [customizer] The function to customize comparisons.
23832     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
23833     * @example
23834     *
23835     * function isGreeting(value) {
23836     *   return /^h(?:i|ello)$/.test(value);
23837     * }
23838     *
23839     * function customizer(objValue, othValue) {
23840     *   if (isGreeting(objValue) && isGreeting(othValue)) {
23841     *     return true;
23842     *   }
23843     * }
23844     *
23845     * var array = ['hello', 'goodbye'];
23846     * var other = ['hi', 'goodbye'];
23847     *
23848     * _.isEqualWith(array, other, customizer);
23849     * // => true
23850     */
23851    function isEqualWith(value, other, customizer) {
23852      customizer = typeof customizer == 'function' ? customizer : undefined;
23853      var result = customizer ? customizer(value, other) : undefined;
23854      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
23855    }
23856
23857    /**
23858     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
23859     * `SyntaxError`, `TypeError`, or `URIError` object.
23860     *
23861     * @static
23862     * @memberOf _
23863     * @since 3.0.0
23864     * @category Lang
23865     * @param {*} value The value to check.
23866     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
23867     * @example
23868     *
23869     * _.isError(new Error);
23870     * // => true
23871     *
23872     * _.isError(Error);
23873     * // => false
23874     */
23875    function isError(value) {
23876      if (!isObjectLike(value)) {
23877        return false;
23878      }
23879      var tag = baseGetTag(value);
23880      return tag == errorTag || tag == domExcTag ||
23881        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
23882    }
23883
23884    /**
23885     * Checks if `value` is a finite primitive number.
23886     *
23887     * **Note:** This method is based on
23888     * [`Number.isFinite`](https://mdn.io/Number/isFinite).
23889     *
23890     * @static
23891     * @memberOf _
23892     * @since 0.1.0
23893     * @category Lang
23894     * @param {*} value The value to check.
23895     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
23896     * @example
23897     *
23898     * _.isFinite(3);
23899     * // => true
23900     *
23901     * _.isFinite(Number.MIN_VALUE);
23902     * // => true
23903     *
23904     * _.isFinite(Infinity);
23905     * // => false
23906     *
23907     * _.isFinite('3');
23908     * // => false
23909     */
23910    function isFinite(value) {
23911      return typeof value == 'number' && nativeIsFinite(value);
23912    }
23913
23914    /**
23915     * Checks if `value` is classified as a `Function` object.
23916     *
23917     * @static
23918     * @memberOf _
23919     * @since 0.1.0
23920     * @category Lang
23921     * @param {*} value The value to check.
23922     * @returns {boolean} Returns `true` if `value` is a function, else `false`.
23923     * @example
23924     *
23925     * _.isFunction(_);
23926     * // => true
23927     *
23928     * _.isFunction(/abc/);
23929     * // => false
23930     */
23931    function isFunction(value) {
23932      if (!isObject(value)) {
23933        return false;
23934      }
23935      // The use of `Object#toString` avoids issues with the `typeof` operator
23936      // in Safari 9 which returns 'object' for typed arrays and other constructors.
23937      var tag = baseGetTag(value);
23938      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
23939    }
23940
23941    /**
23942     * Checks if `value` is an integer.
23943     *
23944     * **Note:** This method is based on
23945     * [`Number.isInteger`](https://mdn.io/Number/isInteger).
23946     *
23947     * @static
23948     * @memberOf _
23949     * @since 4.0.0
23950     * @category Lang
23951     * @param {*} value The value to check.
23952     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
23953     * @example
23954     *
23955     * _.isInteger(3);
23956     * // => true
23957     *
23958     * _.isInteger(Number.MIN_VALUE);
23959     * // => false
23960     *
23961     * _.isInteger(Infinity);
23962     * // => false
23963     *
23964     * _.isInteger('3');
23965     * // => false
23966     */
23967    function isInteger(value) {
23968      return typeof value == 'number' && value == toInteger(value);
23969    }
23970
23971    /**
23972     * Checks if `value` is a valid array-like length.
23973     *
23974     * **Note:** This method is loosely based on
23975     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
23976     *
23977     * @static
23978     * @memberOf _
23979     * @since 4.0.0
23980     * @category Lang
23981     * @param {*} value The value to check.
23982     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
23983     * @example
23984     *
23985     * _.isLength(3);
23986     * // => true
23987     *
23988     * _.isLength(Number.MIN_VALUE);
23989     * // => false
23990     *
23991     * _.isLength(Infinity);
23992     * // => false
23993     *
23994     * _.isLength('3');
23995     * // => false
23996     */
23997    function isLength(value) {
23998      return typeof value == 'number' &&
23999        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
24000    }
24001
24002    /**
24003     * Checks if `value` is the
24004     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
24005     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
24006     *
24007     * @static
24008     * @memberOf _
24009     * @since 0.1.0
24010     * @category Lang
24011     * @param {*} value The value to check.
24012     * @returns {boolean} Returns `true` if `value` is an object, else `false`.
24013     * @example
24014     *
24015     * _.isObject({});
24016     * // => true
24017     *
24018     * _.isObject([1, 2, 3]);
24019     * // => true
24020     *
24021     * _.isObject(_.noop);
24022     * // => true
24023     *
24024     * _.isObject(null);
24025     * // => false
24026     */
24027    function isObject(value) {
24028      var type = typeof value;
24029      return value != null && (type == 'object' || type == 'function');
24030    }
24031
24032    /**
24033     * Checks if `value` is object-like. A value is object-like if it's not `null`
24034     * and has a `typeof` result of "object".
24035     *
24036     * @static
24037     * @memberOf _
24038     * @since 4.0.0
24039     * @category Lang
24040     * @param {*} value The value to check.
24041     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
24042     * @example
24043     *
24044     * _.isObjectLike({});
24045     * // => true
24046     *
24047     * _.isObjectLike([1, 2, 3]);
24048     * // => true
24049     *
24050     * _.isObjectLike(_.noop);
24051     * // => false
24052     *
24053     * _.isObjectLike(null);
24054     * // => false
24055     */
24056    function isObjectLike(value) {
24057      return value != null && typeof value == 'object';
24058    }
24059
24060    /**
24061     * Checks if `value` is classified as a `Map` object.
24062     *
24063     * @static
24064     * @memberOf _
24065     * @since 4.3.0
24066     * @category Lang
24067     * @param {*} value The value to check.
24068     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
24069     * @example
24070     *
24071     * _.isMap(new Map);
24072     * // => true
24073     *
24074     * _.isMap(new WeakMap);
24075     * // => false
24076     */
24077    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
24078
24079    /**
24080     * Performs a partial deep comparison between `object` and `source` to
24081     * determine if `object` contains equivalent property values.
24082     *
24083     * **Note:** This method is equivalent to `_.matches` when `source` is
24084     * partially applied.
24085     *
24086     * Partial comparisons will match empty array and empty object `source`
24087     * values against any array or object value, respectively. See `_.isEqual`
24088     * for a list of supported value comparisons.
24089     *
24090     * @static
24091     * @memberOf _
24092     * @since 3.0.0
24093     * @category Lang
24094     * @param {Object} object The object to inspect.
24095     * @param {Object} source The object of property values to match.
24096     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
24097     * @example
24098     *
24099     * var object = { 'a': 1, 'b': 2 };
24100     *
24101     * _.isMatch(object, { 'b': 2 });
24102     * // => true
24103     *
24104     * _.isMatch(object, { 'b': 1 });
24105     * // => false
24106     */
24107    function isMatch(object, source) {
24108      return object === source || baseIsMatch(object, source, getMatchData(source));
24109    }
24110
24111    /**
24112     * This method is like `_.isMatch` except that it accepts `customizer` which
24113     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
24114     * are handled by the method instead. The `customizer` is invoked with five
24115     * arguments: (objValue, srcValue, index|key, object, source).
24116     *
24117     * @static
24118     * @memberOf _
24119     * @since 4.0.0
24120     * @category Lang
24121     * @param {Object} object The object to inspect.
24122     * @param {Object} source The object of property values to match.
24123     * @param {Function} [customizer] The function to customize comparisons.
24124     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
24125     * @example
24126     *
24127     * function isGreeting(value) {
24128     *   return /^h(?:i|ello)$/.test(value);
24129     * }
24130     *
24131     * function customizer(objValue, srcValue) {
24132     *   if (isGreeting(objValue) && isGreeting(srcValue)) {
24133     *     return true;
24134     *   }
24135     * }
24136     *
24137     * var object = { 'greeting': 'hello' };
24138     * var source = { 'greeting': 'hi' };
24139     *
24140     * _.isMatchWith(object, source, customizer);
24141     * // => true
24142     */
24143    function isMatchWith(object, source, customizer) {
24144      customizer = typeof customizer == 'function' ? customizer : undefined;
24145      return baseIsMatch(object, source, getMatchData(source), customizer);
24146    }
24147
24148    /**
24149     * Checks if `value` is `NaN`.
24150     *
24151     * **Note:** This method is based on
24152     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
24153     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
24154     * `undefined` and other non-number values.
24155     *
24156     * @static
24157     * @memberOf _
24158     * @since 0.1.0
24159     * @category Lang
24160     * @param {*} value The value to check.
24161     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
24162     * @example
24163     *
24164     * _.isNaN(NaN);
24165     * // => true
24166     *
24167     * _.isNaN(new Number(NaN));
24168     * // => true
24169     *
24170     * isNaN(undefined);
24171     * // => true
24172     *
24173     * _.isNaN(undefined);
24174     * // => false
24175     */
24176    function isNaN(value) {
24177      // An `NaN` primitive is the only value that is not equal to itself.
24178      // Perform the `toStringTag` check first to avoid errors with some
24179      // ActiveX objects in IE.
24180      return isNumber(value) && value != +value;
24181    }
24182
24183    /**
24184     * Checks if `value` is a pristine native function.
24185     *
24186     * **Note:** This method can't reliably detect native functions in the presence
24187     * of the core-js package because core-js circumvents this kind of detection.
24188     * Despite multiple requests, the core-js maintainer has made it clear: any
24189     * attempt to fix the detection will be obstructed. As a result, we're left
24190     * with little choice but to throw an error. Unfortunately, this also affects
24191     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
24192     * which rely on core-js.
24193     *
24194     * @static
24195     * @memberOf _
24196     * @since 3.0.0
24197     * @category Lang
24198     * @param {*} value The value to check.
24199     * @returns {boolean} Returns `true` if `value` is a native function,
24200     *  else `false`.
24201     * @example
24202     *
24203     * _.isNative(Array.prototype.push);
24204     * // => true
24205     *
24206     * _.isNative(_);
24207     * // => false
24208     */
24209    function isNative(value) {
24210      if (isMaskable(value)) {
24211        throw new Error(CORE_ERROR_TEXT);
24212      }
24213      return baseIsNative(value);
24214    }
24215
24216    /**
24217     * Checks if `value` is `null`.
24218     *
24219     * @static
24220     * @memberOf _
24221     * @since 0.1.0
24222     * @category Lang
24223     * @param {*} value The value to check.
24224     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
24225     * @example
24226     *
24227     * _.isNull(null);
24228     * // => true
24229     *
24230     * _.isNull(void 0);
24231     * // => false
24232     */
24233    function isNull(value) {
24234      return value === null;
24235    }
24236
24237    /**
24238     * Checks if `value` is `null` or `undefined`.
24239     *
24240     * @static
24241     * @memberOf _
24242     * @since 4.0.0
24243     * @category Lang
24244     * @param {*} value The value to check.
24245     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
24246     * @example
24247     *
24248     * _.isNil(null);
24249     * // => true
24250     *
24251     * _.isNil(void 0);
24252     * // => true
24253     *
24254     * _.isNil(NaN);
24255     * // => false
24256     */
24257    function isNil(value) {
24258      return value == null;
24259    }
24260
24261    /**
24262     * Checks if `value` is classified as a `Number` primitive or object.
24263     *
24264     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
24265     * classified as numbers, use the `_.isFinite` method.
24266     *
24267     * @static
24268     * @memberOf _
24269     * @since 0.1.0
24270     * @category Lang
24271     * @param {*} value The value to check.
24272     * @returns {boolean} Returns `true` if `value` is a number, else `false`.
24273     * @example
24274     *
24275     * _.isNumber(3);
24276     * // => true
24277     *
24278     * _.isNumber(Number.MIN_VALUE);
24279     * // => true
24280     *
24281     * _.isNumber(Infinity);
24282     * // => true
24283     *
24284     * _.isNumber('3');
24285     * // => false
24286     */
24287    function isNumber(value) {
24288      return typeof value == 'number' ||
24289        (isObjectLike(value) && baseGetTag(value) == numberTag);
24290    }
24291
24292    /**
24293     * Checks if `value` is a plain object, that is, an object created by the
24294     * `Object` constructor or one with a `[[Prototype]]` of `null`.
24295     *
24296     * @static
24297     * @memberOf _
24298     * @since 0.8.0
24299     * @category Lang
24300     * @param {*} value The value to check.
24301     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
24302     * @example
24303     *
24304     * function Foo() {
24305     *   this.a = 1;
24306     * }
24307     *
24308     * _.isPlainObject(new Foo);
24309     * // => false
24310     *
24311     * _.isPlainObject([1, 2, 3]);
24312     * // => false
24313     *
24314     * _.isPlainObject({ 'x': 0, 'y': 0 });
24315     * // => true
24316     *
24317     * _.isPlainObject(Object.create(null));
24318     * // => true
24319     */
24320    function isPlainObject(value) {
24321      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
24322        return false;
24323      }
24324      var proto = getPrototype(value);
24325      if (proto === null) {
24326        return true;
24327      }
24328      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
24329      return typeof Ctor == 'function' && Ctor instanceof Ctor &&
24330        funcToString.call(Ctor) == objectCtorString;
24331    }
24332
24333    /**
24334     * Checks if `value` is classified as a `RegExp` object.
24335     *
24336     * @static
24337     * @memberOf _
24338     * @since 0.1.0
24339     * @category Lang
24340     * @param {*} value The value to check.
24341     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
24342     * @example
24343     *
24344     * _.isRegExp(/abc/);
24345     * // => true
24346     *
24347     * _.isRegExp('/abc/');
24348     * // => false
24349     */
24350    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
24351
24352    /**
24353     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
24354     * double precision number which isn't the result of a rounded unsafe integer.
24355     *
24356     * **Note:** This method is based on
24357     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
24358     *
24359     * @static
24360     * @memberOf _
24361     * @since 4.0.0
24362     * @category Lang
24363     * @param {*} value The value to check.
24364     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
24365     * @example
24366     *
24367     * _.isSafeInteger(3);
24368     * // => true
24369     *
24370     * _.isSafeInteger(Number.MIN_VALUE);
24371     * // => false
24372     *
24373     * _.isSafeInteger(Infinity);
24374     * // => false
24375     *
24376     * _.isSafeInteger('3');
24377     * // => false
24378     */
24379    function isSafeInteger(value) {
24380      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
24381    }
24382
24383    /**
24384     * Checks if `value` is classified as a `Set` object.
24385     *
24386     * @static
24387     * @memberOf _
24388     * @since 4.3.0
24389     * @category Lang
24390     * @param {*} value The value to check.
24391     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
24392     * @example
24393     *
24394     * _.isSet(new Set);
24395     * // => true
24396     *
24397     * _.isSet(new WeakSet);
24398     * // => false
24399     */
24400    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
24401
24402    /**
24403     * Checks if `value` is classified as a `String` primitive or object.
24404     *
24405     * @static
24406     * @since 0.1.0
24407     * @memberOf _
24408     * @category Lang
24409     * @param {*} value The value to check.
24410     * @returns {boolean} Returns `true` if `value` is a string, else `false`.
24411     * @example
24412     *
24413     * _.isString('abc');
24414     * // => true
24415     *
24416     * _.isString(1);
24417     * // => false
24418     */
24419    function isString(value) {
24420      return typeof value == 'string' ||
24421        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
24422    }
24423
24424    /**
24425     * Checks if `value` is classified as a `Symbol` primitive or object.
24426     *
24427     * @static
24428     * @memberOf _
24429     * @since 4.0.0
24430     * @category Lang
24431     * @param {*} value The value to check.
24432     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
24433     * @example
24434     *
24435     * _.isSymbol(Symbol.iterator);
24436     * // => true
24437     *
24438     * _.isSymbol('abc');
24439     * // => false
24440     */
24441    function isSymbol(value) {
24442      return typeof value == 'symbol' ||
24443        (isObjectLike(value) && baseGetTag(value) == symbolTag);
24444    }
24445
24446    /**
24447     * Checks if `value` is classified as a typed array.
24448     *
24449     * @static
24450     * @memberOf _
24451     * @since 3.0.0
24452     * @category Lang
24453     * @param {*} value The value to check.
24454     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
24455     * @example
24456     *
24457     * _.isTypedArray(new Uint8Array);
24458     * // => true
24459     *
24460     * _.isTypedArray([]);
24461     * // => false
24462     */
24463    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
24464
24465    /**
24466     * Checks if `value` is `undefined`.
24467     *
24468     * @static
24469     * @since 0.1.0
24470     * @memberOf _
24471     * @category Lang
24472     * @param {*} value The value to check.
24473     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
24474     * @example
24475     *
24476     * _.isUndefined(void 0);
24477     * // => true
24478     *
24479     * _.isUndefined(null);
24480     * // => false
24481     */
24482    function isUndefined(value) {
24483      return value === undefined;
24484    }
24485
24486    /**
24487     * Checks if `value` is classified as a `WeakMap` object.
24488     *
24489     * @static
24490     * @memberOf _
24491     * @since 4.3.0
24492     * @category Lang
24493     * @param {*} value The value to check.
24494     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
24495     * @example
24496     *
24497     * _.isWeakMap(new WeakMap);
24498     * // => true
24499     *
24500     * _.isWeakMap(new Map);
24501     * // => false
24502     */
24503    function isWeakMap(value) {
24504      return isObjectLike(value) && getTag(value) == weakMapTag;
24505    }
24506
24507    /**
24508     * Checks if `value` is classified as a `WeakSet` object.
24509     *
24510     * @static
24511     * @memberOf _
24512     * @since 4.3.0
24513     * @category Lang
24514     * @param {*} value The value to check.
24515     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
24516     * @example
24517     *
24518     * _.isWeakSet(new WeakSet);
24519     * // => true
24520     *
24521     * _.isWeakSet(new Set);
24522     * // => false
24523     */
24524    function isWeakSet(value) {
24525      return isObjectLike(value) && baseGetTag(value) == weakSetTag;
24526    }
24527
24528    /**
24529     * Checks if `value` is less than `other`.
24530     *
24531     * @static
24532     * @memberOf _
24533     * @since 3.9.0
24534     * @category Lang
24535     * @param {*} value The value to compare.
24536     * @param {*} other The other value to compare.
24537     * @returns {boolean} Returns `true` if `value` is less than `other`,
24538     *  else `false`.
24539     * @see _.gt
24540     * @example
24541     *
24542     * _.lt(1, 3);
24543     * // => true
24544     *
24545     * _.lt(3, 3);
24546     * // => false
24547     *
24548     * _.lt(3, 1);
24549     * // => false
24550     */
24551    var lt = createRelationalOperation(baseLt);
24552
24553    /**
24554     * Checks if `value` is less than or equal to `other`.
24555     *
24556     * @static
24557     * @memberOf _
24558     * @since 3.9.0
24559     * @category Lang
24560     * @param {*} value The value to compare.
24561     * @param {*} other The other value to compare.
24562     * @returns {boolean} Returns `true` if `value` is less than or equal to
24563     *  `other`, else `false`.
24564     * @see _.gte
24565     * @example
24566     *
24567     * _.lte(1, 3);
24568     * // => true
24569     *
24570     * _.lte(3, 3);
24571     * // => true
24572     *
24573     * _.lte(3, 1);
24574     * // => false
24575     */
24576    var lte = createRelationalOperation(function(value, other) {
24577      return value <= other;
24578    });
24579
24580    /**
24581     * Converts `value` to an array.
24582     *
24583     * @static
24584     * @since 0.1.0
24585     * @memberOf _
24586     * @category Lang
24587     * @param {*} value The value to convert.
24588     * @returns {Array} Returns the converted array.
24589     * @example
24590     *
24591     * _.toArray({ 'a': 1, 'b': 2 });
24592     * // => [1, 2]
24593     *
24594     * _.toArray('abc');
24595     * // => ['a', 'b', 'c']
24596     *
24597     * _.toArray(1);
24598     * // => []
24599     *
24600     * _.toArray(null);
24601     * // => []
24602     */
24603    function toArray(value) {
24604      if (!value) {
24605        return [];
24606      }
24607      if (isArrayLike(value)) {
24608        return isString(value) ? stringToArray(value) : copyArray(value);
24609      }
24610      if (symIterator && value[symIterator]) {
24611        return iteratorToArray(value[symIterator]());
24612      }
24613      var tag = getTag(value),
24614          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
24615
24616      return func(value);
24617    }
24618
24619    /**
24620     * Converts `value` to a finite number.
24621     *
24622     * @static
24623     * @memberOf _
24624     * @since 4.12.0
24625     * @category Lang
24626     * @param {*} value The value to convert.
24627     * @returns {number} Returns the converted number.
24628     * @example
24629     *
24630     * _.toFinite(3.2);
24631     * // => 3.2
24632     *
24633     * _.toFinite(Number.MIN_VALUE);
24634     * // => 5e-324
24635     *
24636     * _.toFinite(Infinity);
24637     * // => 1.7976931348623157e+308
24638     *
24639     * _.toFinite('3.2');
24640     * // => 3.2
24641     */
24642    function toFinite(value) {
24643      if (!value) {
24644        return value === 0 ? value : 0;
24645      }
24646      value = toNumber(value);
24647      if (value === INFINITY || value === -INFINITY) {
24648        var sign = (value < 0 ? -1 : 1);
24649        return sign * MAX_INTEGER;
24650      }
24651      return value === value ? value : 0;
24652    }
24653
24654    /**
24655     * Converts `value` to an integer.
24656     *
24657     * **Note:** This method is loosely based on
24658     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
24659     *
24660     * @static
24661     * @memberOf _
24662     * @since 4.0.0
24663     * @category Lang
24664     * @param {*} value The value to convert.
24665     * @returns {number} Returns the converted integer.
24666     * @example
24667     *
24668     * _.toInteger(3.2);
24669     * // => 3
24670     *
24671     * _.toInteger(Number.MIN_VALUE);
24672     * // => 0
24673     *
24674     * _.toInteger(Infinity);
24675     * // => 1.7976931348623157e+308
24676     *
24677     * _.toInteger('3.2');
24678     * // => 3
24679     */
24680    function toInteger(value) {
24681      var result = toFinite(value),
24682          remainder = result % 1;
24683
24684      return result === result ? (remainder ? result - remainder : result) : 0;
24685    }
24686
24687    /**
24688     * Converts `value` to an integer suitable for use as the length of an
24689     * array-like object.
24690     *
24691     * **Note:** This method is based on
24692     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
24693     *
24694     * @static
24695     * @memberOf _
24696     * @since 4.0.0
24697     * @category Lang
24698     * @param {*} value The value to convert.
24699     * @returns {number} Returns the converted integer.
24700     * @example
24701     *
24702     * _.toLength(3.2);
24703     * // => 3
24704     *
24705     * _.toLength(Number.MIN_VALUE);
24706     * // => 0
24707     *
24708     * _.toLength(Infinity);
24709     * // => 4294967295
24710     *
24711     * _.toLength('3.2');
24712     * // => 3
24713     */
24714    function toLength(value) {
24715      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
24716    }
24717
24718    /**
24719     * Converts `value` to a number.
24720     *
24721     * @static
24722     * @memberOf _
24723     * @since 4.0.0
24724     * @category Lang
24725     * @param {*} value The value to process.
24726     * @returns {number} Returns the number.
24727     * @example
24728     *
24729     * _.toNumber(3.2);
24730     * // => 3.2
24731     *
24732     * _.toNumber(Number.MIN_VALUE);
24733     * // => 5e-324
24734     *
24735     * _.toNumber(Infinity);
24736     * // => Infinity
24737     *
24738     * _.toNumber('3.2');
24739     * // => 3.2
24740     */
24741    function toNumber(value) {
24742      if (typeof value == 'number') {
24743        return value;
24744      }
24745      if (isSymbol(value)) {
24746        return NAN;
24747      }
24748      if (isObject(value)) {
24749        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
24750        value = isObject(other) ? (other + '') : other;
24751      }
24752      if (typeof value != 'string') {
24753        return value === 0 ? value : +value;
24754      }
24755      value = baseTrim(value);
24756      var isBinary = reIsBinary.test(value);
24757      return (isBinary || reIsOctal.test(value))
24758        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
24759        : (reIsBadHex.test(value) ? NAN : +value);
24760    }
24761
24762    /**
24763     * Converts `value` to a plain object flattening inherited enumerable string
24764     * keyed properties of `value` to own properties of the plain object.
24765     *
24766     * @static
24767     * @memberOf _
24768     * @since 3.0.0
24769     * @category Lang
24770     * @param {*} value The value to convert.
24771     * @returns {Object} Returns the converted plain object.
24772     * @example
24773     *
24774     * function Foo() {
24775     *   this.b = 2;
24776     * }
24777     *
24778     * Foo.prototype.c = 3;
24779     *
24780     * _.assign({ 'a': 1 }, new Foo);
24781     * // => { 'a': 1, 'b': 2 }
24782     *
24783     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
24784     * // => { 'a': 1, 'b': 2, 'c': 3 }
24785     */
24786    function toPlainObject(value) {
24787      return copyObject(value, keysIn(value));
24788    }
24789
24790    /**
24791     * Converts `value` to a safe integer. A safe integer can be compared and
24792     * represented correctly.
24793     *
24794     * @static
24795     * @memberOf _
24796     * @since 4.0.0
24797     * @category Lang
24798     * @param {*} value The value to convert.
24799     * @returns {number} Returns the converted integer.
24800     * @example
24801     *
24802     * _.toSafeInteger(3.2);
24803     * // => 3
24804     *
24805     * _.toSafeInteger(Number.MIN_VALUE);
24806     * // => 0
24807     *
24808     * _.toSafeInteger(Infinity);
24809     * // => 9007199254740991
24810     *
24811     * _.toSafeInteger('3.2');
24812     * // => 3
24813     */
24814    function toSafeInteger(value) {
24815      return value
24816        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
24817        : (value === 0 ? value : 0);
24818    }
24819
24820    /**
24821     * Converts `value` to a string. An empty string is returned for `null`
24822     * and `undefined` values. The sign of `-0` is preserved.
24823     *
24824     * @static
24825     * @memberOf _
24826     * @since 4.0.0
24827     * @category Lang
24828     * @param {*} value The value to convert.
24829     * @returns {string} Returns the converted string.
24830     * @example
24831     *
24832     * _.toString(null);
24833     * // => ''
24834     *
24835     * _.toString(-0);
24836     * // => '-0'
24837     *
24838     * _.toString([1, 2, 3]);
24839     * // => '1,2,3'
24840     */
24841    function toString(value) {
24842      return value == null ? '' : baseToString(value);
24843    }
24844
24845    /*------------------------------------------------------------------------*/
24846
24847    /**
24848     * Assigns own enumerable string keyed properties of source objects to the
24849     * destination object. Source objects are applied from left to right.
24850     * Subsequent sources overwrite property assignments of previous sources.
24851     *
24852     * **Note:** This method mutates `object` and is loosely based on
24853     * [`Object.assign`](https://mdn.io/Object/assign).
24854     *
24855     * @static
24856     * @memberOf _
24857     * @since 0.10.0
24858     * @category Object
24859     * @param {Object} object The destination object.
24860     * @param {...Object} [sources] The source objects.
24861     * @returns {Object} Returns `object`.
24862     * @see _.assignIn
24863     * @example
24864     *
24865     * function Foo() {
24866     *   this.a = 1;
24867     * }
24868     *
24869     * function Bar() {
24870     *   this.c = 3;
24871     * }
24872     *
24873     * Foo.prototype.b = 2;
24874     * Bar.prototype.d = 4;
24875     *
24876     * _.assign({ 'a': 0 }, new Foo, new Bar);
24877     * // => { 'a': 1, 'c': 3 }
24878     */
24879    var assign = createAssigner(function(object, source) {
24880      if (isPrototype(source) || isArrayLike(source)) {
24881        copyObject(source, keys(source), object);
24882        return;
24883      }
24884      for (var key in source) {
24885        if (hasOwnProperty.call(source, key)) {
24886          assignValue(object, key, source[key]);
24887        }
24888      }
24889    });
24890
24891    /**
24892     * This method is like `_.assign` except that it iterates over own and
24893     * inherited source properties.
24894     *
24895     * **Note:** This method mutates `object`.
24896     *
24897     * @static
24898     * @memberOf _
24899     * @since 4.0.0
24900     * @alias extend
24901     * @category Object
24902     * @param {Object} object The destination object.
24903     * @param {...Object} [sources] The source objects.
24904     * @returns {Object} Returns `object`.
24905     * @see _.assign
24906     * @example
24907     *
24908     * function Foo() {
24909     *   this.a = 1;
24910     * }
24911     *
24912     * function Bar() {
24913     *   this.c = 3;
24914     * }
24915     *
24916     * Foo.prototype.b = 2;
24917     * Bar.prototype.d = 4;
24918     *
24919     * _.assignIn({ 'a': 0 }, new Foo, new Bar);
24920     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
24921     */
24922    var assignIn = createAssigner(function(object, source) {
24923      copyObject(source, keysIn(source), object);
24924    });
24925
24926    /**
24927     * This method is like `_.assignIn` except that it accepts `customizer`
24928     * which is invoked to produce the assigned values. If `customizer` returns
24929     * `undefined`, assignment is handled by the method instead. The `customizer`
24930     * is invoked with five arguments: (objValue, srcValue, key, object, source).
24931     *
24932     * **Note:** This method mutates `object`.
24933     *
24934     * @static
24935     * @memberOf _
24936     * @since 4.0.0
24937     * @alias extendWith
24938     * @category Object
24939     * @param {Object} object The destination object.
24940     * @param {...Object} sources The source objects.
24941     * @param {Function} [customizer] The function to customize assigned values.
24942     * @returns {Object} Returns `object`.
24943     * @see _.assignWith
24944     * @example
24945     *
24946     * function customizer(objValue, srcValue) {
24947     *   return _.isUndefined(objValue) ? srcValue : objValue;
24948     * }
24949     *
24950     * var defaults = _.partialRight(_.assignInWith, customizer);
24951     *
24952     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
24953     * // => { 'a': 1, 'b': 2 }
24954     */
24955    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
24956      copyObject(source, keysIn(source), object, customizer);
24957    });
24958
24959    /**
24960     * This method is like `_.assign` except that it accepts `customizer`
24961     * which is invoked to produce the assigned values. If `customizer` returns
24962     * `undefined`, assignment is handled by the method instead. The `customizer`
24963     * is invoked with five arguments: (objValue, srcValue, key, object, source).
24964     *
24965     * **Note:** This method mutates `object`.
24966     *
24967     * @static
24968     * @memberOf _
24969     * @since 4.0.0
24970     * @category Object
24971     * @param {Object} object The destination object.
24972     * @param {...Object} sources The source objects.
24973     * @param {Function} [customizer] The function to customize assigned values.
24974     * @returns {Object} Returns `object`.
24975     * @see _.assignInWith
24976     * @example
24977     *
24978     * function customizer(objValue, srcValue) {
24979     *   return _.isUndefined(objValue) ? srcValue : objValue;
24980     * }
24981     *
24982     * var defaults = _.partialRight(_.assignWith, customizer);
24983     *
24984     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
24985     * // => { 'a': 1, 'b': 2 }
24986     */
24987    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
24988      copyObject(source, keys(source), object, customizer);
24989    });
24990
24991    /**
24992     * Creates an array of values corresponding to `paths` of `object`.
24993     *
24994     * @static
24995     * @memberOf _
24996     * @since 1.0.0
24997     * @category Object
24998     * @param {Object} object The object to iterate over.
24999     * @param {...(string|string[])} [paths] The property paths to pick.
25000     * @returns {Array} Returns the picked values.
25001     * @example
25002     *
25003     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
25004     *
25005     * _.at(object, ['a[0].b.c', 'a[1]']);
25006     * // => [3, 4]
25007     */
25008    var at = flatRest(baseAt);
25009
25010    /**
25011     * Creates an object that inherits from the `prototype` object. If a
25012     * `properties` object is given, its own enumerable string keyed properties
25013     * are assigned to the created object.
25014     *
25015     * @static
25016     * @memberOf _
25017     * @since 2.3.0
25018     * @category Object
25019     * @param {Object} prototype The object to inherit from.
25020     * @param {Object} [properties] The properties to assign to the object.
25021     * @returns {Object} Returns the new object.
25022     * @example
25023     *
25024     * function Shape() {
25025     *   this.x = 0;
25026     *   this.y = 0;
25027     * }
25028     *
25029     * function Circle() {
25030     *   Shape.call(this);
25031     * }
25032     *
25033     * Circle.prototype = _.create(Shape.prototype, {
25034     *   'constructor': Circle
25035     * });
25036     *
25037     * var circle = new Circle;
25038     * circle instanceof Circle;
25039     * // => true
25040     *
25041     * circle instanceof Shape;
25042     * // => true
25043     */
25044    function create(prototype, properties) {
25045      var result = baseCreate(prototype);
25046      return properties == null ? result : baseAssign(result, properties);
25047    }
25048
25049    /**
25050     * Assigns own and inherited enumerable string keyed properties of source
25051     * objects to the destination object for all destination properties that
25052     * resolve to `undefined`. Source objects are applied from left to right.
25053     * Once a property is set, additional values of the same property are ignored.
25054     *
25055     * **Note:** This method mutates `object`.
25056     *
25057     * @static
25058     * @since 0.1.0
25059     * @memberOf _
25060     * @category Object
25061     * @param {Object} object The destination object.
25062     * @param {...Object} [sources] The source objects.
25063     * @returns {Object} Returns `object`.
25064     * @see _.defaultsDeep
25065     * @example
25066     *
25067     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
25068     * // => { 'a': 1, 'b': 2 }
25069     */
25070    var defaults = baseRest(function(object, sources) {
25071      object = Object(object);
25072
25073      var index = -1;
25074      var length = sources.length;
25075      var guard = length > 2 ? sources[2] : undefined;
25076
25077      if (guard && isIterateeCall(sources[0], sources[1], guard)) {
25078        length = 1;
25079      }
25080
25081      while (++index < length) {
25082        var source = sources[index];
25083        var props = keysIn(source);
25084        var propsIndex = -1;
25085        var propsLength = props.length;
25086
25087        while (++propsIndex < propsLength) {
25088          var key = props[propsIndex];
25089          var value = object[key];
25090
25091          if (value === undefined ||
25092              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
25093            object[key] = source[key];
25094          }
25095        }
25096      }
25097
25098      return object;
25099    });
25100
25101    /**
25102     * This method is like `_.defaults` except that it recursively assigns
25103     * default properties.
25104     *
25105     * **Note:** This method mutates `object`.
25106     *
25107     * @static
25108     * @memberOf _
25109     * @since 3.10.0
25110     * @category Object
25111     * @param {Object} object The destination object.
25112     * @param {...Object} [sources] The source objects.
25113     * @returns {Object} Returns `object`.
25114     * @see _.defaults
25115     * @example
25116     *
25117     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
25118     * // => { 'a': { 'b': 2, 'c': 3 } }
25119     */
25120    var defaultsDeep = baseRest(function(args) {
25121      args.push(undefined, customDefaultsMerge);
25122      return apply(mergeWith, undefined, args);
25123    });
25124
25125    /**
25126     * This method is like `_.find` except that it returns the key of the first
25127     * element `predicate` returns truthy for instead of the element itself.
25128     *
25129     * @static
25130     * @memberOf _
25131     * @since 1.1.0
25132     * @category Object
25133     * @param {Object} object The object to inspect.
25134     * @param {Function} [predicate=_.identity] The function invoked per iteration.
25135     * @returns {string|undefined} Returns the key of the matched element,
25136     *  else `undefined`.
25137     * @example
25138     *
25139     * var users = {
25140     *   'barney':  { 'age': 36, 'active': true },
25141     *   'fred':    { 'age': 40, 'active': false },
25142     *   'pebbles': { 'age': 1,  'active': true }
25143     * };
25144     *
25145     * _.findKey(users, function(o) { return o.age < 40; });
25146     * // => 'barney' (iteration order is not guaranteed)
25147     *
25148     * // The `_.matches` iteratee shorthand.
25149     * _.findKey(users, { 'age': 1, 'active': true });
25150     * // => 'pebbles'
25151     *
25152     * // The `_.matchesProperty` iteratee shorthand.
25153     * _.findKey(users, ['active', false]);
25154     * // => 'fred'
25155     *
25156     * // The `_.property` iteratee shorthand.
25157     * _.findKey(users, 'active');
25158     * // => 'barney'
25159     */
25160    function findKey(object, predicate) {
25161      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
25162    }
25163
25164    /**
25165     * This method is like `_.findKey` except that it iterates over elements of
25166     * a collection in the opposite order.
25167     *
25168     * @static
25169     * @memberOf _
25170     * @since 2.0.0
25171     * @category Object
25172     * @param {Object} object The object to inspect.
25173     * @param {Function} [predicate=_.identity] The function invoked per iteration.
25174     * @returns {string|undefined} Returns the key of the matched element,
25175     *  else `undefined`.
25176     * @example
25177     *
25178     * var users = {
25179     *   'barney':  { 'age': 36, 'active': true },
25180     *   'fred':    { 'age': 40, 'active': false },
25181     *   'pebbles': { 'age': 1,  'active': true }
25182     * };
25183     *
25184     * _.findLastKey(users, function(o) { return o.age < 40; });
25185     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
25186     *
25187     * // The `_.matches` iteratee shorthand.
25188     * _.findLastKey(users, { 'age': 36, 'active': true });
25189     * // => 'barney'
25190     *
25191     * // The `_.matchesProperty` iteratee shorthand.
25192     * _.findLastKey(users, ['active', false]);
25193     * // => 'fred'
25194     *
25195     * // The `_.property` iteratee shorthand.
25196     * _.findLastKey(users, 'active');
25197     * // => 'pebbles'
25198     */
25199    function findLastKey(object, predicate) {
25200      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
25201    }
25202
25203    /**
25204     * Iterates over own and inherited enumerable string keyed properties of an
25205     * object and invokes `iteratee` for each property. The iteratee is invoked
25206     * with three arguments: (value, key, object). Iteratee functions may exit
25207     * iteration early by explicitly returning `false`.
25208     *
25209     * @static
25210     * @memberOf _
25211     * @since 0.3.0
25212     * @category Object
25213     * @param {Object} object The object to iterate over.
25214     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
25215     * @returns {Object} Returns `object`.
25216     * @see _.forInRight
25217     * @example
25218     *
25219     * function Foo() {
25220     *   this.a = 1;
25221     *   this.b = 2;
25222     * }
25223     *
25224     * Foo.prototype.c = 3;
25225     *
25226     * _.forIn(new Foo, function(value, key) {
25227     *   console.log(key);
25228     * });
25229     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
25230     */
25231    function forIn(object, iteratee) {
25232      return object == null
25233        ? object
25234        : baseFor(object, getIteratee(iteratee, 3), keysIn);
25235    }
25236
25237    /**
25238     * This method is like `_.forIn` except that it iterates over properties of
25239     * `object` in the opposite order.
25240     *
25241     * @static
25242     * @memberOf _
25243     * @since 2.0.0
25244     * @category Object
25245     * @param {Object} object The object to iterate over.
25246     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
25247     * @returns {Object} Returns `object`.
25248     * @see _.forIn
25249     * @example
25250     *
25251     * function Foo() {
25252     *   this.a = 1;
25253     *   this.b = 2;
25254     * }
25255     *
25256     * Foo.prototype.c = 3;
25257     *
25258     * _.forInRight(new Foo, function(value, key) {
25259     *   console.log(key);
25260     * });
25261     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
25262     */
25263    function forInRight(object, iteratee) {
25264      return object == null
25265        ? object
25266        : baseForRight(object, getIteratee(iteratee, 3), keysIn);
25267    }
25268
25269    /**
25270     * Iterates over own enumerable string keyed properties of an object and
25271     * invokes `iteratee` for each property. The iteratee is invoked with three
25272     * arguments: (value, key, object). Iteratee functions may exit iteration
25273     * early by explicitly returning `false`.
25274     *
25275     * @static
25276     * @memberOf _
25277     * @since 0.3.0
25278     * @category Object
25279     * @param {Object} object The object to iterate over.
25280     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
25281     * @returns {Object} Returns `object`.
25282     * @see _.forOwnRight
25283     * @example
25284     *
25285     * function Foo() {
25286     *   this.a = 1;
25287     *   this.b = 2;
25288     * }
25289     *
25290     * Foo.prototype.c = 3;
25291     *
25292     * _.forOwn(new Foo, function(value, key) {
25293     *   console.log(key);
25294     * });
25295     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
25296     */
25297    function forOwn(object, iteratee) {
25298      return object && baseForOwn(object, getIteratee(iteratee, 3));
25299    }
25300
25301    /**
25302     * This method is like `_.forOwn` except that it iterates over properties of
25303     * `object` in the opposite order.
25304     *
25305     * @static
25306     * @memberOf _
25307     * @since 2.0.0
25308     * @category Object
25309     * @param {Object} object The object to iterate over.
25310     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
25311     * @returns {Object} Returns `object`.
25312     * @see _.forOwn
25313     * @example
25314     *
25315     * function Foo() {
25316     *   this.a = 1;
25317     *   this.b = 2;
25318     * }
25319     *
25320     * Foo.prototype.c = 3;
25321     *
25322     * _.forOwnRight(new Foo, function(value, key) {
25323     *   console.log(key);
25324     * });
25325     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
25326     */
25327    function forOwnRight(object, iteratee) {
25328      return object && baseForOwnRight(object, getIteratee(iteratee, 3));
25329    }
25330
25331    /**
25332     * Creates an array of function property names from own enumerable properties
25333     * of `object`.
25334     *
25335     * @static
25336     * @since 0.1.0
25337     * @memberOf _
25338     * @category Object
25339     * @param {Object} object The object to inspect.
25340     * @returns {Array} Returns the function names.
25341     * @see _.functionsIn
25342     * @example
25343     *
25344     * function Foo() {
25345     *   this.a = _.constant('a');
25346     *   this.b = _.constant('b');
25347     * }
25348     *
25349     * Foo.prototype.c = _.constant('c');
25350     *
25351     * _.functions(new Foo);
25352     * // => ['a', 'b']
25353     */
25354    function functions(object) {
25355      return object == null ? [] : baseFunctions(object, keys(object));
25356    }
25357
25358    /**
25359     * Creates an array of function property names from own and inherited
25360     * enumerable properties of `object`.
25361     *
25362     * @static
25363     * @memberOf _
25364     * @since 4.0.0
25365     * @category Object
25366     * @param {Object} object The object to inspect.
25367     * @returns {Array} Returns the function names.
25368     * @see _.functions
25369     * @example
25370     *
25371     * function Foo() {
25372     *   this.a = _.constant('a');
25373     *   this.b = _.constant('b');
25374     * }
25375     *
25376     * Foo.prototype.c = _.constant('c');
25377     *
25378     * _.functionsIn(new Foo);
25379     * // => ['a', 'b', 'c']
25380     */
25381    function functionsIn(object) {
25382      return object == null ? [] : baseFunctions(object, keysIn(object));
25383    }
25384
25385    /**
25386     * Gets the value at `path` of `object`. If the resolved value is
25387     * `undefined`, the `defaultValue` is returned in its place.
25388     *
25389     * @static
25390     * @memberOf _
25391     * @since 3.7.0
25392     * @category Object
25393     * @param {Object} object The object to query.
25394     * @param {Array|string} path The path of the property to get.
25395     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
25396     * @returns {*} Returns the resolved value.
25397     * @example
25398     *
25399     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
25400     *
25401     * _.get(object, 'a[0].b.c');
25402     * // => 3
25403     *
25404     * _.get(object, ['a', '0', 'b', 'c']);
25405     * // => 3
25406     *
25407     * _.get(object, 'a.b.c', 'default');
25408     * // => 'default'
25409     */
25410    function get(object, path, defaultValue) {
25411      var result = object == null ? undefined : baseGet(object, path);
25412      return result === undefined ? defaultValue : result;
25413    }
25414
25415    /**
25416     * Checks if `path` is a direct property of `object`.
25417     *
25418     * @static
25419     * @since 0.1.0
25420     * @memberOf _
25421     * @category Object
25422     * @param {Object} object The object to query.
25423     * @param {Array|string} path The path to check.
25424     * @returns {boolean} Returns `true` if `path` exists, else `false`.
25425     * @example
25426     *
25427     * var object = { 'a': { 'b': 2 } };
25428     * var other = _.create({ 'a': _.create({ 'b': 2 }) });
25429     *
25430     * _.has(object, 'a');
25431     * // => true
25432     *
25433     * _.has(object, 'a.b');
25434     * // => true
25435     *
25436     * _.has(object, ['a', 'b']);
25437     * // => true
25438     *
25439     * _.has(other, 'a');
25440     * // => false
25441     */
25442    function has(object, path) {
25443      return object != null && hasPath(object, path, baseHas);
25444    }
25445
25446    /**
25447     * Checks if `path` is a direct or inherited property of `object`.
25448     *
25449     * @static
25450     * @memberOf _
25451     * @since 4.0.0
25452     * @category Object
25453     * @param {Object} object The object to query.
25454     * @param {Array|string} path The path to check.
25455     * @returns {boolean} Returns `true` if `path` exists, else `false`.
25456     * @example
25457     *
25458     * var object = _.create({ 'a': _.create({ 'b': 2 }) });
25459     *
25460     * _.hasIn(object, 'a');
25461     * // => true
25462     *
25463     * _.hasIn(object, 'a.b');
25464     * // => true
25465     *
25466     * _.hasIn(object, ['a', 'b']);
25467     * // => true
25468     *
25469     * _.hasIn(object, 'b');
25470     * // => false
25471     */
25472    function hasIn(object, path) {
25473      return object != null && hasPath(object, path, baseHasIn);
25474    }
25475
25476    /**
25477     * Creates an object composed of the inverted keys and values of `object`.
25478     * If `object` contains duplicate values, subsequent values overwrite
25479     * property assignments of previous values.
25480     *
25481     * @static
25482     * @memberOf _
25483     * @since 0.7.0
25484     * @category Object
25485     * @param {Object} object The object to invert.
25486     * @returns {Object} Returns the new inverted object.
25487     * @example
25488     *
25489     * var object = { 'a': 1, 'b': 2, 'c': 1 };
25490     *
25491     * _.invert(object);
25492     * // => { '1': 'c', '2': 'b' }
25493     */
25494    var invert = createInverter(function(result, value, key) {
25495      if (value != null &&
25496          typeof value.toString != 'function') {
25497        value = nativeObjectToString.call(value);
25498      }
25499
25500      result[value] = key;
25501    }, constant(identity));
25502
25503    /**
25504     * This method is like `_.invert` except that the inverted object is generated
25505     * from the results of running each element of `object` thru `iteratee`. The
25506     * corresponding inverted value of each inverted key is an array of keys
25507     * responsible for generating the inverted value. The iteratee is invoked
25508     * with one argument: (value).
25509     *
25510     * @static
25511     * @memberOf _
25512     * @since 4.1.0
25513     * @category Object
25514     * @param {Object} object The object to invert.
25515     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
25516     * @returns {Object} Returns the new inverted object.
25517     * @example
25518     *
25519     * var object = { 'a': 1, 'b': 2, 'c': 1 };
25520     *
25521     * _.invertBy(object);
25522     * // => { '1': ['a', 'c'], '2': ['b'] }
25523     *
25524     * _.invertBy(object, function(value) {
25525     *   return 'group' + value;
25526     * });
25527     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
25528     */
25529    var invertBy = createInverter(function(result, value, key) {
25530      if (value != null &&
25531          typeof value.toString != 'function') {
25532        value = nativeObjectToString.call(value);
25533      }
25534
25535      if (hasOwnProperty.call(result, value)) {
25536        result[value].push(key);
25537      } else {
25538        result[value] = [key];
25539      }
25540    }, getIteratee);
25541
25542    /**
25543     * Invokes the method at `path` of `object`.
25544     *
25545     * @static
25546     * @memberOf _
25547     * @since 4.0.0
25548     * @category Object
25549     * @param {Object} object The object to query.
25550     * @param {Array|string} path The path of the method to invoke.
25551     * @param {...*} [args] The arguments to invoke the method with.
25552     * @returns {*} Returns the result of the invoked method.
25553     * @example
25554     *
25555     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
25556     *
25557     * _.invoke(object, 'a[0].b.c.slice', 1, 3);
25558     * // => [2, 3]
25559     */
25560    var invoke = baseRest(baseInvoke);
25561
25562    /**
25563     * Creates an array of the own enumerable property names of `object`.
25564     *
25565     * **Note:** Non-object values are coerced to objects. See the
25566     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
25567     * for more details.
25568     *
25569     * @static
25570     * @since 0.1.0
25571     * @memberOf _
25572     * @category Object
25573     * @param {Object} object The object to query.
25574     * @returns {Array} Returns the array of property names.
25575     * @example
25576     *
25577     * function Foo() {
25578     *   this.a = 1;
25579     *   this.b = 2;
25580     * }
25581     *
25582     * Foo.prototype.c = 3;
25583     *
25584     * _.keys(new Foo);
25585     * // => ['a', 'b'] (iteration order is not guaranteed)
25586     *
25587     * _.keys('hi');
25588     * // => ['0', '1']
25589     */
25590    function keys(object) {
25591      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
25592    }
25593
25594    /**
25595     * Creates an array of the own and inherited enumerable property names of `object`.
25596     *
25597     * **Note:** Non-object values are coerced to objects.
25598     *
25599     * @static
25600     * @memberOf _
25601     * @since 3.0.0
25602     * @category Object
25603     * @param {Object} object The object to query.
25604     * @returns {Array} Returns the array of property names.
25605     * @example
25606     *
25607     * function Foo() {
25608     *   this.a = 1;
25609     *   this.b = 2;
25610     * }
25611     *
25612     * Foo.prototype.c = 3;
25613     *
25614     * _.keysIn(new Foo);
25615     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
25616     */
25617    function keysIn(object) {
25618      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
25619    }
25620
25621    /**
25622     * The opposite of `_.mapValues`; this method creates an object with the
25623     * same values as `object` and keys generated by running each own enumerable
25624     * string keyed property of `object` thru `iteratee`. The iteratee is invoked
25625     * with three arguments: (value, key, object).
25626     *
25627     * @static
25628     * @memberOf _
25629     * @since 3.8.0
25630     * @category Object
25631     * @param {Object} object The object to iterate over.
25632     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
25633     * @returns {Object} Returns the new mapped object.
25634     * @see _.mapValues
25635     * @example
25636     *
25637     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
25638     *   return key + value;
25639     * });
25640     * // => { 'a1': 1, 'b2': 2 }
25641     */
25642    function mapKeys(object, iteratee) {
25643      var result = {};
25644      iteratee = getIteratee(iteratee, 3);
25645
25646      baseForOwn(object, function(value, key, object) {
25647        baseAssignValue(result, iteratee(value, key, object), value);
25648      });
25649      return result;
25650    }
25651
25652    /**
25653     * Creates an object with the same keys as `object` and values generated
25654     * by running each own enumerable string keyed property of `object` thru
25655     * `iteratee`. The iteratee is invoked with three arguments:
25656     * (value, key, object).
25657     *
25658     * @static
25659     * @memberOf _
25660     * @since 2.4.0
25661     * @category Object
25662     * @param {Object} object The object to iterate over.
25663     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
25664     * @returns {Object} Returns the new mapped object.
25665     * @see _.mapKeys
25666     * @example
25667     *
25668     * var users = {
25669     *   'fred':    { 'user': 'fred',    'age': 40 },
25670     *   'pebbles': { 'user': 'pebbles', 'age': 1 }
25671     * };
25672     *
25673     * _.mapValues(users, function(o) { return o.age; });
25674     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
25675     *
25676     * // The `_.property` iteratee shorthand.
25677     * _.mapValues(users, 'age');
25678     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
25679     */
25680    function mapValues(object, iteratee) {
25681      var result = {};
25682      iteratee = getIteratee(iteratee, 3);
25683
25684      baseForOwn(object, function(value, key, object) {
25685        baseAssignValue(result, key, iteratee(value, key, object));
25686      });
25687      return result;
25688    }
25689
25690    /**
25691     * This method is like `_.assign` except that it recursively merges own and
25692     * inherited enumerable string keyed properties of source objects into the
25693     * destination object. Source properties that resolve to `undefined` are
25694     * skipped if a destination value exists. Array and plain object properties
25695     * are merged recursively. Other objects and value types are overridden by
25696     * assignment. Source objects are applied from left to right. Subsequent
25697     * sources overwrite property assignments of previous sources.
25698     *
25699     * **Note:** This method mutates `object`.
25700     *
25701     * @static
25702     * @memberOf _
25703     * @since 0.5.0
25704     * @category Object
25705     * @param {Object} object The destination object.
25706     * @param {...Object} [sources] The source objects.
25707     * @returns {Object} Returns `object`.
25708     * @example
25709     *
25710     * var object = {
25711     *   'a': [{ 'b': 2 }, { 'd': 4 }]
25712     * };
25713     *
25714     * var other = {
25715     *   'a': [{ 'c': 3 }, { 'e': 5 }]
25716     * };
25717     *
25718     * _.merge(object, other);
25719     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
25720     */
25721    var merge = createAssigner(function(object, source, srcIndex) {
25722      baseMerge(object, source, srcIndex);
25723    });
25724
25725    /**
25726     * This method is like `_.merge` except that it accepts `customizer` which
25727     * is invoked to produce the merged values of the destination and source
25728     * properties. If `customizer` returns `undefined`, merging is handled by the
25729     * method instead. The `customizer` is invoked with six arguments:
25730     * (objValue, srcValue, key, object, source, stack).
25731     *
25732     * **Note:** This method mutates `object`.
25733     *
25734     * @static
25735     * @memberOf _
25736     * @since 4.0.0
25737     * @category Object
25738     * @param {Object} object The destination object.
25739     * @param {...Object} sources The source objects.
25740     * @param {Function} customizer The function to customize assigned values.
25741     * @returns {Object} Returns `object`.
25742     * @example
25743     *
25744     * function customizer(objValue, srcValue) {
25745     *   if (_.isArray(objValue)) {
25746     *     return objValue.concat(srcValue);
25747     *   }
25748     * }
25749     *
25750     * var object = { 'a': [1], 'b': [2] };
25751     * var other = { 'a': [3], 'b': [4] };
25752     *
25753     * _.mergeWith(object, other, customizer);
25754     * // => { 'a': [1, 3], 'b': [2, 4] }
25755     */
25756    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
25757      baseMerge(object, source, srcIndex, customizer);
25758    });
25759
25760    /**
25761     * The opposite of `_.pick`; this method creates an object composed of the
25762     * own and inherited enumerable property paths of `object` that are not omitted.
25763     *
25764     * **Note:** This method is considerably slower than `_.pick`.
25765     *
25766     * @static
25767     * @since 0.1.0
25768     * @memberOf _
25769     * @category Object
25770     * @param {Object} object The source object.
25771     * @param {...(string|string[])} [paths] The property paths to omit.
25772     * @returns {Object} Returns the new object.
25773     * @example
25774     *
25775     * var object = { 'a': 1, 'b': '2', 'c': 3 };
25776     *
25777     * _.omit(object, ['a', 'c']);
25778     * // => { 'b': '2' }
25779     */
25780    var omit = flatRest(function(object, paths) {
25781      var result = {};
25782      if (object == null) {
25783        return result;
25784      }
25785      var isDeep = false;
25786      paths = arrayMap(paths, function(path) {
25787        path = castPath(path, object);
25788        isDeep || (isDeep = path.length > 1);
25789        return path;
25790      });
25791      copyObject(object, getAllKeysIn(object), result);
25792      if (isDeep) {
25793        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
25794      }
25795      var length = paths.length;
25796      while (length--) {
25797        baseUnset(result, paths[length]);
25798      }
25799      return result;
25800    });
25801
25802    /**
25803     * The opposite of `_.pickBy`; this method creates an object composed of
25804     * the own and inherited enumerable string keyed properties of `object` that
25805     * `predicate` doesn't return truthy for. The predicate is invoked with two
25806     * arguments: (value, key).
25807     *
25808     * @static
25809     * @memberOf _
25810     * @since 4.0.0
25811     * @category Object
25812     * @param {Object} object The source object.
25813     * @param {Function} [predicate=_.identity] The function invoked per property.
25814     * @returns {Object} Returns the new object.
25815     * @example
25816     *
25817     * var object = { 'a': 1, 'b': '2', 'c': 3 };
25818     *
25819     * _.omitBy(object, _.isNumber);
25820     * // => { 'b': '2' }
25821     */
25822    function omitBy(object, predicate) {
25823      return pickBy(object, negate(getIteratee(predicate)));
25824    }
25825
25826    /**
25827     * Creates an object composed of the picked `object` properties.
25828     *
25829     * @static
25830     * @since 0.1.0
25831     * @memberOf _
25832     * @category Object
25833     * @param {Object} object The source object.
25834     * @param {...(string|string[])} [paths] The property paths to pick.
25835     * @returns {Object} Returns the new object.
25836     * @example
25837     *
25838     * var object = { 'a': 1, 'b': '2', 'c': 3 };
25839     *
25840     * _.pick(object, ['a', 'c']);
25841     * // => { 'a': 1, 'c': 3 }
25842     */
25843    var pick = flatRest(function(object, paths) {
25844      return object == null ? {} : basePick(object, paths);
25845    });
25846
25847    /**
25848     * Creates an object composed of the `object` properties `predicate` returns
25849     * truthy for. The predicate is invoked with two arguments: (value, key).
25850     *
25851     * @static
25852     * @memberOf _
25853     * @since 4.0.0
25854     * @category Object
25855     * @param {Object} object The source object.
25856     * @param {Function} [predicate=_.identity] The function invoked per property.
25857     * @returns {Object} Returns the new object.
25858     * @example
25859     *
25860     * var object = { 'a': 1, 'b': '2', 'c': 3 };
25861     *
25862     * _.pickBy(object, _.isNumber);
25863     * // => { 'a': 1, 'c': 3 }
25864     */
25865    function pickBy(object, predicate) {
25866      if (object == null) {
25867        return {};
25868      }
25869      var props = arrayMap(getAllKeysIn(object), function(prop) {
25870        return [prop];
25871      });
25872      predicate = getIteratee(predicate);
25873      return basePickBy(object, props, function(value, path) {
25874        return predicate(value, path[0]);
25875      });
25876    }
25877
25878    /**
25879     * This method is like `_.get` except that if the resolved value is a
25880     * function it's invoked with the `this` binding of its parent object and
25881     * its result is returned.
25882     *
25883     * @static
25884     * @since 0.1.0
25885     * @memberOf _
25886     * @category Object
25887     * @param {Object} object The object to query.
25888     * @param {Array|string} path The path of the property to resolve.
25889     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
25890     * @returns {*} Returns the resolved value.
25891     * @example
25892     *
25893     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
25894     *
25895     * _.result(object, 'a[0].b.c1');
25896     * // => 3
25897     *
25898     * _.result(object, 'a[0].b.c2');
25899     * // => 4
25900     *
25901     * _.result(object, 'a[0].b.c3', 'default');
25902     * // => 'default'
25903     *
25904     * _.result(object, 'a[0].b.c3', _.constant('default'));
25905     * // => 'default'
25906     */
25907    function result(object, path, defaultValue) {
25908      path = castPath(path, object);
25909
25910      var index = -1,
25911          length = path.length;
25912
25913      // Ensure the loop is entered when path is empty.
25914      if (!length) {
25915        length = 1;
25916        object = undefined;
25917      }
25918      while (++index < length) {
25919        var value = object == null ? undefined : object[toKey(path[index])];
25920        if (value === undefined) {
25921          index = length;
25922          value = defaultValue;
25923        }
25924        object = isFunction(value) ? value.call(object) : value;
25925      }
25926      return object;
25927    }
25928
25929    /**
25930     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
25931     * it's created. Arrays are created for missing index properties while objects
25932     * are created for all other missing properties. Use `_.setWith` to customize
25933     * `path` creation.
25934     *
25935     * **Note:** This method mutates `object`.
25936     *
25937     * @static
25938     * @memberOf _
25939     * @since 3.7.0
25940     * @category Object
25941     * @param {Object} object The object to modify.
25942     * @param {Array|string} path The path of the property to set.
25943     * @param {*} value The value to set.
25944     * @returns {Object} Returns `object`.
25945     * @example
25946     *
25947     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
25948     *
25949     * _.set(object, 'a[0].b.c', 4);
25950     * console.log(object.a[0].b.c);
25951     * // => 4
25952     *
25953     * _.set(object, ['x', '0', 'y', 'z'], 5);
25954     * console.log(object.x[0].y.z);
25955     * // => 5
25956     */
25957    function set(object, path, value) {
25958      return object == null ? object : baseSet(object, path, value);
25959    }
25960
25961    /**
25962     * This method is like `_.set` except that it accepts `customizer` which is
25963     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
25964     * path creation is handled by the method instead. The `customizer` is invoked
25965     * with three arguments: (nsValue, key, nsObject).
25966     *
25967     * **Note:** This method mutates `object`.
25968     *
25969     * @static
25970     * @memberOf _
25971     * @since 4.0.0
25972     * @category Object
25973     * @param {Object} object The object to modify.
25974     * @param {Array|string} path The path of the property to set.
25975     * @param {*} value The value to set.
25976     * @param {Function} [customizer] The function to customize assigned values.
25977     * @returns {Object} Returns `object`.
25978     * @example
25979     *
25980     * var object = {};
25981     *
25982     * _.setWith(object, '[0][1]', 'a', Object);
25983     * // => { '0': { '1': 'a' } }
25984     */
25985    function setWith(object, path, value, customizer) {
25986      customizer = typeof customizer == 'function' ? customizer : undefined;
25987      return object == null ? object : baseSet(object, path, value, customizer);
25988    }
25989
25990    /**
25991     * Creates an array of own enumerable string keyed-value pairs for `object`
25992     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
25993     * entries are returned.
25994     *
25995     * @static
25996     * @memberOf _
25997     * @since 4.0.0
25998     * @alias entries
25999     * @category Object
26000     * @param {Object} object The object to query.
26001     * @returns {Array} Returns the key-value pairs.
26002     * @example
26003     *
26004     * function Foo() {
26005     *   this.a = 1;
26006     *   this.b = 2;
26007     * }
26008     *
26009     * Foo.prototype.c = 3;
26010     *
26011     * _.toPairs(new Foo);
26012     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
26013     */
26014    var toPairs = createToPairs(keys);
26015
26016    /**
26017     * Creates an array of own and inherited enumerable string keyed-value pairs
26018     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
26019     * or set, its entries are returned.
26020     *
26021     * @static
26022     * @memberOf _
26023     * @since 4.0.0
26024     * @alias entriesIn
26025     * @category Object
26026     * @param {Object} object The object to query.
26027     * @returns {Array} Returns the key-value pairs.
26028     * @example
26029     *
26030     * function Foo() {
26031     *   this.a = 1;
26032     *   this.b = 2;
26033     * }
26034     *
26035     * Foo.prototype.c = 3;
26036     *
26037     * _.toPairsIn(new Foo);
26038     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
26039     */
26040    var toPairsIn = createToPairs(keysIn);
26041
26042    /**
26043     * An alternative to `_.reduce`; this method transforms `object` to a new
26044     * `accumulator` object which is the result of running each of its own
26045     * enumerable string keyed properties thru `iteratee`, with each invocation
26046     * potentially mutating the `accumulator` object. If `accumulator` is not
26047     * provided, a new object with the same `[[Prototype]]` will be used. The
26048     * iteratee is invoked with four arguments: (accumulator, value, key, object).
26049     * Iteratee functions may exit iteration early by explicitly returning `false`.
26050     *
26051     * @static
26052     * @memberOf _
26053     * @since 1.3.0
26054     * @category Object
26055     * @param {Object} object The object to iterate over.
26056     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
26057     * @param {*} [accumulator] The custom accumulator value.
26058     * @returns {*} Returns the accumulated value.
26059     * @example
26060     *
26061     * _.transform([2, 3, 4], function(result, n) {
26062     *   result.push(n *= n);
26063     *   return n % 2 == 0;
26064     * }, []);
26065     * // => [4, 9]
26066     *
26067     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
26068     *   (result[value] || (result[value] = [])).push(key);
26069     * }, {});
26070     * // => { '1': ['a', 'c'], '2': ['b'] }
26071     */
26072    function transform(object, iteratee, accumulator) {
26073      var isArr = isArray(object),
26074          isArrLike = isArr || isBuffer(object) || isTypedArray(object);
26075
26076      iteratee = getIteratee(iteratee, 4);
26077      if (accumulator == null) {
26078        var Ctor = object && object.constructor;
26079        if (isArrLike) {
26080          accumulator = isArr ? new Ctor : [];
26081        }
26082        else if (isObject(object)) {
26083          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
26084        }
26085        else {
26086          accumulator = {};
26087        }
26088      }
26089      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
26090        return iteratee(accumulator, value, index, object);
26091      });
26092      return accumulator;
26093    }
26094
26095    /**
26096     * Removes the property at `path` of `object`.
26097     *
26098     * **Note:** This method mutates `object`.
26099     *
26100     * @static
26101     * @memberOf _
26102     * @since 4.0.0
26103     * @category Object
26104     * @param {Object} object The object to modify.
26105     * @param {Array|string} path The path of the property to unset.
26106     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
26107     * @example
26108     *
26109     * var object = { 'a': [{ 'b': { 'c': 7 } }] };
26110     * _.unset(object, 'a[0].b.c');
26111     * // => true
26112     *
26113     * console.log(object);
26114     * // => { 'a': [{ 'b': {} }] };
26115     *
26116     * _.unset(object, ['a', '0', 'b', 'c']);
26117     * // => true
26118     *
26119     * console.log(object);
26120     * // => { 'a': [{ 'b': {} }] };
26121     */
26122    function unset(object, path) {
26123      return object == null ? true : baseUnset(object, path);
26124    }
26125
26126    /**
26127     * This method is like `_.set` except that accepts `updater` to produce the
26128     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
26129     * is invoked with one argument: (value).
26130     *
26131     * **Note:** This method mutates `object`.
26132     *
26133     * @static
26134     * @memberOf _
26135     * @since 4.6.0
26136     * @category Object
26137     * @param {Object} object The object to modify.
26138     * @param {Array|string} path The path of the property to set.
26139     * @param {Function} updater The function to produce the updated value.
26140     * @returns {Object} Returns `object`.
26141     * @example
26142     *
26143     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
26144     *
26145     * _.update(object, 'a[0].b.c', function(n) { return n * n; });
26146     * console.log(object.a[0].b.c);
26147     * // => 9
26148     *
26149     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
26150     * console.log(object.x[0].y.z);
26151     * // => 0
26152     */
26153    function update(object, path, updater) {
26154      return object == null ? object : baseUpdate(object, path, castFunction(updater));
26155    }
26156
26157    /**
26158     * This method is like `_.update` except that it accepts `customizer` which is
26159     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
26160     * path creation is handled by the method instead. The `customizer` is invoked
26161     * with three arguments: (nsValue, key, nsObject).
26162     *
26163     * **Note:** This method mutates `object`.
26164     *
26165     * @static
26166     * @memberOf _
26167     * @since 4.6.0
26168     * @category Object
26169     * @param {Object} object The object to modify.
26170     * @param {Array|string} path The path of the property to set.
26171     * @param {Function} updater The function to produce the updated value.
26172     * @param {Function} [customizer] The function to customize assigned values.
26173     * @returns {Object} Returns `object`.
26174     * @example
26175     *
26176     * var object = {};
26177     *
26178     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
26179     * // => { '0': { '1': 'a' } }
26180     */
26181    function updateWith(object, path, updater, customizer) {
26182      customizer = typeof customizer == 'function' ? customizer : undefined;
26183      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
26184    }
26185
26186    /**
26187     * Creates an array of the own enumerable string keyed property values of `object`.
26188     *
26189     * **Note:** Non-object values are coerced to objects.
26190     *
26191     * @static
26192     * @since 0.1.0
26193     * @memberOf _
26194     * @category Object
26195     * @param {Object} object The object to query.
26196     * @returns {Array} Returns the array of property values.
26197     * @example
26198     *
26199     * function Foo() {
26200     *   this.a = 1;
26201     *   this.b = 2;
26202     * }
26203     *
26204     * Foo.prototype.c = 3;
26205     *
26206     * _.values(new Foo);
26207     * // => [1, 2] (iteration order is not guaranteed)
26208     *
26209     * _.values('hi');
26210     * // => ['h', 'i']
26211     */
26212    function values(object) {
26213      return object == null ? [] : baseValues(object, keys(object));
26214    }
26215
26216    /**
26217     * Creates an array of the own and inherited enumerable string keyed property
26218     * values of `object`.
26219     *
26220     * **Note:** Non-object values are coerced to objects.
26221     *
26222     * @static
26223     * @memberOf _
26224     * @since 3.0.0
26225     * @category Object
26226     * @param {Object} object The object to query.
26227     * @returns {Array} Returns the array of property values.
26228     * @example
26229     *
26230     * function Foo() {
26231     *   this.a = 1;
26232     *   this.b = 2;
26233     * }
26234     *
26235     * Foo.prototype.c = 3;
26236     *
26237     * _.valuesIn(new Foo);
26238     * // => [1, 2, 3] (iteration order is not guaranteed)
26239     */
26240    function valuesIn(object) {
26241      return object == null ? [] : baseValues(object, keysIn(object));
26242    }
26243
26244    /*------------------------------------------------------------------------*/
26245
26246    /**
26247     * Clamps `number` within the inclusive `lower` and `upper` bounds.
26248     *
26249     * @static
26250     * @memberOf _
26251     * @since 4.0.0
26252     * @category Number
26253     * @param {number} number The number to clamp.
26254     * @param {number} [lower] The lower bound.
26255     * @param {number} upper The upper bound.
26256     * @returns {number} Returns the clamped number.
26257     * @example
26258     *
26259     * _.clamp(-10, -5, 5);
26260     * // => -5
26261     *
26262     * _.clamp(10, -5, 5);
26263     * // => 5
26264     */
26265    function clamp(number, lower, upper) {
26266      if (upper === undefined) {
26267        upper = lower;
26268        lower = undefined;
26269      }
26270      if (upper !== undefined) {
26271        upper = toNumber(upper);
26272        upper = upper === upper ? upper : 0;
26273      }
26274      if (lower !== undefined) {
26275        lower = toNumber(lower);
26276        lower = lower === lower ? lower : 0;
26277      }
26278      return baseClamp(toNumber(number), lower, upper);
26279    }
26280
26281    /**
26282     * Checks if `n` is between `start` and up to, but not including, `end`. If
26283     * `end` is not specified, it's set to `start` with `start` then set to `0`.
26284     * If `start` is greater than `end` the params are swapped to support
26285     * negative ranges.
26286     *
26287     * @static
26288     * @memberOf _
26289     * @since 3.3.0
26290     * @category Number
26291     * @param {number} number The number to check.
26292     * @param {number} [start=0] The start of the range.
26293     * @param {number} end The end of the range.
26294     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
26295     * @see _.range, _.rangeRight
26296     * @example
26297     *
26298     * _.inRange(3, 2, 4);
26299     * // => true
26300     *
26301     * _.inRange(4, 8);
26302     * // => true
26303     *
26304     * _.inRange(4, 2);
26305     * // => false
26306     *
26307     * _.inRange(2, 2);
26308     * // => false
26309     *
26310     * _.inRange(1.2, 2);
26311     * // => true
26312     *
26313     * _.inRange(5.2, 4);
26314     * // => false
26315     *
26316     * _.inRange(-3, -2, -6);
26317     * // => true
26318     */
26319    function inRange(number, start, end) {
26320      start = toFinite(start);
26321      if (end === undefined) {
26322        end = start;
26323        start = 0;
26324      } else {
26325        end = toFinite(end);
26326      }
26327      number = toNumber(number);
26328      return baseInRange(number, start, end);
26329    }
26330
26331    /**
26332     * Produces a random number between the inclusive `lower` and `upper` bounds.
26333     * If only one argument is provided a number between `0` and the given number
26334     * is returned. If `floating` is `true`, or either `lower` or `upper` are
26335     * floats, a floating-point number is returned instead of an integer.
26336     *
26337     * **Note:** JavaScript follows the IEEE-754 standard for resolving
26338     * floating-point values which can produce unexpected results.
26339     *
26340     * @static
26341     * @memberOf _
26342     * @since 0.7.0
26343     * @category Number
26344     * @param {number} [lower=0] The lower bound.
26345     * @param {number} [upper=1] The upper bound.
26346     * @param {boolean} [floating] Specify returning a floating-point number.
26347     * @returns {number} Returns the random number.
26348     * @example
26349     *
26350     * _.random(0, 5);
26351     * // => an integer between 0 and 5
26352     *
26353     * _.random(5);
26354     * // => also an integer between 0 and 5
26355     *
26356     * _.random(5, true);
26357     * // => a floating-point number between 0 and 5
26358     *
26359     * _.random(1.2, 5.2);
26360     * // => a floating-point number between 1.2 and 5.2
26361     */
26362    function random(lower, upper, floating) {
26363      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
26364        upper = floating = undefined;
26365      }
26366      if (floating === undefined) {
26367        if (typeof upper == 'boolean') {
26368          floating = upper;
26369          upper = undefined;
26370        }
26371        else if (typeof lower == 'boolean') {
26372          floating = lower;
26373          lower = undefined;
26374        }
26375      }
26376      if (lower === undefined && upper === undefined) {
26377        lower = 0;
26378        upper = 1;
26379      }
26380      else {
26381        lower = toFinite(lower);
26382        if (upper === undefined) {
26383          upper = lower;
26384          lower = 0;
26385        } else {
26386          upper = toFinite(upper);
26387        }
26388      }
26389      if (lower > upper) {
26390        var temp = lower;
26391        lower = upper;
26392        upper = temp;
26393      }
26394      if (floating || lower % 1 || upper % 1) {
26395        var rand = nativeRandom();
26396        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
26397      }
26398      return baseRandom(lower, upper);
26399    }
26400
26401    /*------------------------------------------------------------------------*/
26402
26403    /**
26404     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
26405     *
26406     * @static
26407     * @memberOf _
26408     * @since 3.0.0
26409     * @category String
26410     * @param {string} [string=''] The string to convert.
26411     * @returns {string} Returns the camel cased string.
26412     * @example
26413     *
26414     * _.camelCase('Foo Bar');
26415     * // => 'fooBar'
26416     *
26417     * _.camelCase('--foo-bar--');
26418     * // => 'fooBar'
26419     *
26420     * _.camelCase('__FOO_BAR__');
26421     * // => 'fooBar'
26422     */
26423    var camelCase = createCompounder(function(result, word, index) {
26424      word = word.toLowerCase();
26425      return result + (index ? capitalize(word) : word);
26426    });
26427
26428    /**
26429     * Converts the first character of `string` to upper case and the remaining
26430     * to lower case.
26431     *
26432     * @static
26433     * @memberOf _
26434     * @since 3.0.0
26435     * @category String
26436     * @param {string} [string=''] The string to capitalize.
26437     * @returns {string} Returns the capitalized string.
26438     * @example
26439     *
26440     * _.capitalize('FRED');
26441     * // => 'Fred'
26442     */
26443    function capitalize(string) {
26444      return upperFirst(toString(string).toLowerCase());
26445    }
26446
26447    /**
26448     * Deburrs `string` by converting
26449     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
26450     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
26451     * letters to basic Latin letters and removing
26452     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
26453     *
26454     * @static
26455     * @memberOf _
26456     * @since 3.0.0
26457     * @category String
26458     * @param {string} [string=''] The string to deburr.
26459     * @returns {string} Returns the deburred string.
26460     * @example
26461     *
26462     * _.deburr('déjà vu');
26463     * // => 'deja vu'
26464     */
26465    function deburr(string) {
26466      string = toString(string);
26467      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
26468    }
26469
26470    /**
26471     * Checks if `string` ends with the given target string.
26472     *
26473     * @static
26474     * @memberOf _
26475     * @since 3.0.0
26476     * @category String
26477     * @param {string} [string=''] The string to inspect.
26478     * @param {string} [target] The string to search for.
26479     * @param {number} [position=string.length] The position to search up to.
26480     * @returns {boolean} Returns `true` if `string` ends with `target`,
26481     *  else `false`.
26482     * @example
26483     *
26484     * _.endsWith('abc', 'c');
26485     * // => true
26486     *
26487     * _.endsWith('abc', 'b');
26488     * // => false
26489     *
26490     * _.endsWith('abc', 'b', 2);
26491     * // => true
26492     */
26493    function endsWith(string, target, position) {
26494      string = toString(string);
26495      target = baseToString(target);
26496
26497      var length = string.length;
26498      position = position === undefined
26499        ? length
26500        : baseClamp(toInteger(position), 0, length);
26501
26502      var end = position;
26503      position -= target.length;
26504      return position >= 0 && string.slice(position, end) == target;
26505    }
26506
26507    /**
26508     * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
26509     * corresponding HTML entities.
26510     *
26511     * **Note:** No other characters are escaped. To escape additional
26512     * characters use a third-party library like [_he_](https://mths.be/he).
26513     *
26514     * Though the ">" character is escaped for symmetry, characters like
26515     * ">" and "/" don't need escaping in HTML and have no special meaning
26516     * unless they're part of a tag or unquoted attribute value. See
26517     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
26518     * (under "semi-related fun fact") for more details.
26519     *
26520     * When working with HTML you should always
26521     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
26522     * XSS vectors.
26523     *
26524     * @static
26525     * @since 0.1.0
26526     * @memberOf _
26527     * @category String
26528     * @param {string} [string=''] The string to escape.
26529     * @returns {string} Returns the escaped string.
26530     * @example
26531     *
26532     * _.escape('fred, barney, & pebbles');
26533     * // => 'fred, barney, &amp; pebbles'
26534     */
26535    function escape(string) {
26536      string = toString(string);
26537      return (string && reHasUnescapedHtml.test(string))
26538        ? string.replace(reUnescapedHtml, escapeHtmlChar)
26539        : string;
26540    }
26541
26542    /**
26543     * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
26544     * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
26545     *
26546     * @static
26547     * @memberOf _
26548     * @since 3.0.0
26549     * @category String
26550     * @param {string} [string=''] The string to escape.
26551     * @returns {string} Returns the escaped string.
26552     * @example
26553     *
26554     * _.escapeRegExp('[lodash](https://lodash.com/)');
26555     * // => '\[lodash\]\(https://lodash\.com/\)'
26556     */
26557    function escapeRegExp(string) {
26558      string = toString(string);
26559      return (string && reHasRegExpChar.test(string))
26560        ? string.replace(reRegExpChar, '\\$&')
26561        : string;
26562    }
26563
26564    /**
26565     * Converts `string` to
26566     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
26567     *
26568     * @static
26569     * @memberOf _
26570     * @since 3.0.0
26571     * @category String
26572     * @param {string} [string=''] The string to convert.
26573     * @returns {string} Returns the kebab cased string.
26574     * @example
26575     *
26576     * _.kebabCase('Foo Bar');
26577     * // => 'foo-bar'
26578     *
26579     * _.kebabCase('fooBar');
26580     * // => 'foo-bar'
26581     *
26582     * _.kebabCase('__FOO_BAR__');
26583     * // => 'foo-bar'
26584     */
26585    var kebabCase = createCompounder(function(result, word, index) {
26586      return result + (index ? '-' : '') + word.toLowerCase();
26587    });
26588
26589    /**
26590     * Converts `string`, as space separated words, to lower case.
26591     *
26592     * @static
26593     * @memberOf _
26594     * @since 4.0.0
26595     * @category String
26596     * @param {string} [string=''] The string to convert.
26597     * @returns {string} Returns the lower cased string.
26598     * @example
26599     *
26600     * _.lowerCase('--Foo-Bar--');
26601     * // => 'foo bar'
26602     *
26603     * _.lowerCase('fooBar');
26604     * // => 'foo bar'
26605     *
26606     * _.lowerCase('__FOO_BAR__');
26607     * // => 'foo bar'
26608     */
26609    var lowerCase = createCompounder(function(result, word, index) {
26610      return result + (index ? ' ' : '') + word.toLowerCase();
26611    });
26612
26613    /**
26614     * Converts the first character of `string` to lower case.
26615     *
26616     * @static
26617     * @memberOf _
26618     * @since 4.0.0
26619     * @category String
26620     * @param {string} [string=''] The string to convert.
26621     * @returns {string} Returns the converted string.
26622     * @example
26623     *
26624     * _.lowerFirst('Fred');
26625     * // => 'fred'
26626     *
26627     * _.lowerFirst('FRED');
26628     * // => 'fRED'
26629     */
26630    var lowerFirst = createCaseFirst('toLowerCase');
26631
26632    /**
26633     * Pads `string` on the left and right sides if it's shorter than `length`.
26634     * Padding characters are truncated if they can't be evenly divided by `length`.
26635     *
26636     * @static
26637     * @memberOf _
26638     * @since 3.0.0
26639     * @category String
26640     * @param {string} [string=''] The string to pad.
26641     * @param {number} [length=0] The padding length.
26642     * @param {string} [chars=' '] The string used as padding.
26643     * @returns {string} Returns the padded string.
26644     * @example
26645     *
26646     * _.pad('abc', 8);
26647     * // => '  abc   '
26648     *
26649     * _.pad('abc', 8, '_-');
26650     * // => '_-abc_-_'
26651     *
26652     * _.pad('abc', 3);
26653     * // => 'abc'
26654     */
26655    function pad(string, length, chars) {
26656      string = toString(string);
26657      length = toInteger(length);
26658
26659      var strLength = length ? stringSize(string) : 0;
26660      if (!length || strLength >= length) {
26661        return string;
26662      }
26663      var mid = (length - strLength) / 2;
26664      return (
26665        createPadding(nativeFloor(mid), chars) +
26666        string +
26667        createPadding(nativeCeil(mid), chars)
26668      );
26669    }
26670
26671    /**
26672     * Pads `string` on the right side if it's shorter than `length`. Padding
26673     * characters are truncated if they exceed `length`.
26674     *
26675     * @static
26676     * @memberOf _
26677     * @since 4.0.0
26678     * @category String
26679     * @param {string} [string=''] The string to pad.
26680     * @param {number} [length=0] The padding length.
26681     * @param {string} [chars=' '] The string used as padding.
26682     * @returns {string} Returns the padded string.
26683     * @example
26684     *
26685     * _.padEnd('abc', 6);
26686     * // => 'abc   '
26687     *
26688     * _.padEnd('abc', 6, '_-');
26689     * // => 'abc_-_'
26690     *
26691     * _.padEnd('abc', 3);
26692     * // => 'abc'
26693     */
26694    function padEnd(string, length, chars) {
26695      string = toString(string);
26696      length = toInteger(length);
26697
26698      var strLength = length ? stringSize(string) : 0;
26699      return (length && strLength < length)
26700        ? (string + createPadding(length - strLength, chars))
26701        : string;
26702    }
26703
26704    /**
26705     * Pads `string` on the left side if it's shorter than `length`. Padding
26706     * characters are truncated if they exceed `length`.
26707     *
26708     * @static
26709     * @memberOf _
26710     * @since 4.0.0
26711     * @category String
26712     * @param {string} [string=''] The string to pad.
26713     * @param {number} [length=0] The padding length.
26714     * @param {string} [chars=' '] The string used as padding.
26715     * @returns {string} Returns the padded string.
26716     * @example
26717     *
26718     * _.padStart('abc', 6);
26719     * // => '   abc'
26720     *
26721     * _.padStart('abc', 6, '_-');
26722     * // => '_-_abc'
26723     *
26724     * _.padStart('abc', 3);
26725     * // => 'abc'
26726     */
26727    function padStart(string, length, chars) {
26728      string = toString(string);
26729      length = toInteger(length);
26730
26731      var strLength = length ? stringSize(string) : 0;
26732      return (length && strLength < length)
26733        ? (createPadding(length - strLength, chars) + string)
26734        : string;
26735    }
26736
26737    /**
26738     * Converts `string` to an integer of the specified radix. If `radix` is
26739     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
26740     * hexadecimal, in which case a `radix` of `16` is used.
26741     *
26742     * **Note:** This method aligns with the
26743     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
26744     *
26745     * @static
26746     * @memberOf _
26747     * @since 1.1.0
26748     * @category String
26749     * @param {string} string The string to convert.
26750     * @param {number} [radix=10] The radix to interpret `value` by.
26751     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
26752     * @returns {number} Returns the converted integer.
26753     * @example
26754     *
26755     * _.parseInt('08');
26756     * // => 8
26757     *
26758     * _.map(['6', '08', '10'], _.parseInt);
26759     * // => [6, 8, 10]
26760     */
26761    function parseInt(string, radix, guard) {
26762      if (guard || radix == null) {
26763        radix = 0;
26764      } else if (radix) {
26765        radix = +radix;
26766      }
26767      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
26768    }
26769
26770    /**
26771     * Repeats the given string `n` times.
26772     *
26773     * @static
26774     * @memberOf _
26775     * @since 3.0.0
26776     * @category String
26777     * @param {string} [string=''] The string to repeat.
26778     * @param {number} [n=1] The number of times to repeat the string.
26779     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
26780     * @returns {string} Returns the repeated string.
26781     * @example
26782     *
26783     * _.repeat('*', 3);
26784     * // => '***'
26785     *
26786     * _.repeat('abc', 2);
26787     * // => 'abcabc'
26788     *
26789     * _.repeat('abc', 0);
26790     * // => ''
26791     */
26792    function repeat(string, n, guard) {
26793      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
26794        n = 1;
26795      } else {
26796        n = toInteger(n);
26797      }
26798      return baseRepeat(toString(string), n);
26799    }
26800
26801    /**
26802     * Replaces matches for `pattern` in `string` with `replacement`.
26803     *
26804     * **Note:** This method is based on
26805     * [`String#replace`](https://mdn.io/String/replace).
26806     *
26807     * @static
26808     * @memberOf _
26809     * @since 4.0.0
26810     * @category String
26811     * @param {string} [string=''] The string to modify.
26812     * @param {RegExp|string} pattern The pattern to replace.
26813     * @param {Function|string} replacement The match replacement.
26814     * @returns {string} Returns the modified string.
26815     * @example
26816     *
26817     * _.replace('Hi Fred', 'Fred', 'Barney');
26818     * // => 'Hi Barney'
26819     */
26820    function replace() {
26821      var args = arguments,
26822          string = toString(args[0]);
26823
26824      return args.length < 3 ? string : string.replace(args[1], args[2]);
26825    }
26826
26827    /**
26828     * Converts `string` to
26829     * [snake case](https://en.wikipedia.org/wiki/Snake_case).
26830     *
26831     * @static
26832     * @memberOf _
26833     * @since 3.0.0
26834     * @category String
26835     * @param {string} [string=''] The string to convert.
26836     * @returns {string} Returns the snake cased string.
26837     * @example
26838     *
26839     * _.snakeCase('Foo Bar');
26840     * // => 'foo_bar'
26841     *
26842     * _.snakeCase('fooBar');
26843     * // => 'foo_bar'
26844     *
26845     * _.snakeCase('--FOO-BAR--');
26846     * // => 'foo_bar'
26847     */
26848    var snakeCase = createCompounder(function(result, word, index) {
26849      return result + (index ? '_' : '') + word.toLowerCase();
26850    });
26851
26852    /**
26853     * Splits `string` by `separator`.
26854     *
26855     * **Note:** This method is based on
26856     * [`String#split`](https://mdn.io/String/split).
26857     *
26858     * @static
26859     * @memberOf _
26860     * @since 4.0.0
26861     * @category String
26862     * @param {string} [string=''] The string to split.
26863     * @param {RegExp|string} separator The separator pattern to split by.
26864     * @param {number} [limit] The length to truncate results to.
26865     * @returns {Array} Returns the string segments.
26866     * @example
26867     *
26868     * _.split('a-b-c', '-', 2);
26869     * // => ['a', 'b']
26870     */
26871    function split(string, separator, limit) {
26872      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
26873        separator = limit = undefined;
26874      }
26875      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
26876      if (!limit) {
26877        return [];
26878      }
26879      string = toString(string);
26880      if (string && (
26881            typeof separator == 'string' ||
26882            (separator != null && !isRegExp(separator))
26883          )) {
26884        separator = baseToString(separator);
26885        if (!separator && hasUnicode(string)) {
26886          return castSlice(stringToArray(string), 0, limit);
26887        }
26888      }
26889      return string.split(separator, limit);
26890    }
26891
26892    /**
26893     * Converts `string` to
26894     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
26895     *
26896     * @static
26897     * @memberOf _
26898     * @since 3.1.0
26899     * @category String
26900     * @param {string} [string=''] The string to convert.
26901     * @returns {string} Returns the start cased string.
26902     * @example
26903     *
26904     * _.startCase('--foo-bar--');
26905     * // => 'Foo Bar'
26906     *
26907     * _.startCase('fooBar');
26908     * // => 'Foo Bar'
26909     *
26910     * _.startCase('__FOO_BAR__');
26911     * // => 'FOO BAR'
26912     */
26913    var startCase = createCompounder(function(result, word, index) {
26914      return result + (index ? ' ' : '') + upperFirst(word);
26915    });
26916
26917    /**
26918     * Checks if `string` starts with the given target string.
26919     *
26920     * @static
26921     * @memberOf _
26922     * @since 3.0.0
26923     * @category String
26924     * @param {string} [string=''] The string to inspect.
26925     * @param {string} [target] The string to search for.
26926     * @param {number} [position=0] The position to search from.
26927     * @returns {boolean} Returns `true` if `string` starts with `target`,
26928     *  else `false`.
26929     * @example
26930     *
26931     * _.startsWith('abc', 'a');
26932     * // => true
26933     *
26934     * _.startsWith('abc', 'b');
26935     * // => false
26936     *
26937     * _.startsWith('abc', 'b', 1);
26938     * // => true
26939     */
26940    function startsWith(string, target, position) {
26941      string = toString(string);
26942      position = position == null
26943        ? 0
26944        : baseClamp(toInteger(position), 0, string.length);
26945
26946      target = baseToString(target);
26947      return string.slice(position, position + target.length) == target;
26948    }
26949
26950    /**
26951     * Creates a compiled template function that can interpolate data properties
26952     * in "interpolate" delimiters, HTML-escape interpolated data properties in
26953     * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
26954     * properties may be accessed as free variables in the template. If a setting
26955     * object is given, it takes precedence over `_.templateSettings` values.
26956     *
26957     * **Note:** In the development build `_.template` utilizes
26958     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
26959     * for easier debugging.
26960     *
26961     * For more information on precompiling templates see
26962     * [lodash's custom builds documentation](https://lodash.com/custom-builds).
26963     *
26964     * For more information on Chrome extension sandboxes see
26965     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
26966     *
26967     * @static
26968     * @since 0.1.0
26969     * @memberOf _
26970     * @category String
26971     * @param {string} [string=''] The template string.
26972     * @param {Object} [options={}] The options object.
26973     * @param {RegExp} [options.escape=_.templateSettings.escape]
26974     *  The HTML "escape" delimiter.
26975     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
26976     *  The "evaluate" delimiter.
26977     * @param {Object} [options.imports=_.templateSettings.imports]
26978     *  An object to import into the template as free variables.
26979     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
26980     *  The "interpolate" delimiter.
26981     * @param {string} [options.sourceURL='lodash.templateSources[n]']
26982     *  The sourceURL of the compiled template.
26983     * @param {string} [options.variable='obj']
26984     *  The data object variable name.
26985     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
26986     * @returns {Function} Returns the compiled template function.
26987     * @example
26988     *
26989     * // Use the "interpolate" delimiter to create a compiled template.
26990     * var compiled = _.template('hello <%= user %>!');
26991     * compiled({ 'user': 'fred' });
26992     * // => 'hello fred!'
26993     *
26994     * // Use the HTML "escape" delimiter to escape data property values.
26995     * var compiled = _.template('<b><%- value %></b>');
26996     * compiled({ 'value': '<script>' });
26997     * // => '<b>&lt;script&gt;</b>'
26998     *
26999     * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
27000     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
27001     * compiled({ 'users': ['fred', 'barney'] });
27002     * // => '<li>fred</li><li>barney</li>'
27003     *
27004     * // Use the internal `print` function in "evaluate" delimiters.
27005     * var compiled = _.template('<% print("hello " + user); %>!');
27006     * compiled({ 'user': 'barney' });
27007     * // => 'hello barney!'
27008     *
27009     * // Use the ES template literal delimiter as an "interpolate" delimiter.
27010     * // Disable support by replacing the "interpolate" delimiter.
27011     * var compiled = _.template('hello ${ user }!');
27012     * compiled({ 'user': 'pebbles' });
27013     * // => 'hello pebbles!'
27014     *
27015     * // Use backslashes to treat delimiters as plain text.
27016     * var compiled = _.template('<%= "\\<%- value %\\>" %>');
27017     * compiled({ 'value': 'ignored' });
27018     * // => '<%- value %>'
27019     *
27020     * // Use the `imports` option to import `jQuery` as `jq`.
27021     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
27022     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
27023     * compiled({ 'users': ['fred', 'barney'] });
27024     * // => '<li>fred</li><li>barney</li>'
27025     *
27026     * // Use the `sourceURL` option to specify a custom sourceURL for the template.
27027     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
27028     * compiled(data);
27029     * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
27030     *
27031     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
27032     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
27033     * compiled.source;
27034     * // => function(data) {
27035     * //   var __t, __p = '';
27036     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
27037     * //   return __p;
27038     * // }
27039     *
27040     * // Use custom template delimiters.
27041     * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
27042     * var compiled = _.template('hello {{ user }}!');
27043     * compiled({ 'user': 'mustache' });
27044     * // => 'hello mustache!'
27045     *
27046     * // Use the `source` property to inline compiled templates for meaningful
27047     * // line numbers in error messages and stack traces.
27048     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
27049     *   var JST = {\
27050     *     "main": ' + _.template(mainText).source + '\
27051     *   };\
27052     * ');
27053     */
27054    function template(string, options, guard) {
27055      // Based on John Resig's `tmpl` implementation
27056      // (http://ejohn.org/blog/javascript-micro-templating/)
27057      // and Laura Doktorova's doT.js (https://github.com/olado/doT).
27058      var settings = lodash.templateSettings;
27059
27060      if (guard && isIterateeCall(string, options, guard)) {
27061        options = undefined;
27062      }
27063      string = toString(string);
27064      options = assignInWith({}, options, settings, customDefaultsAssignIn);
27065
27066      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
27067          importsKeys = keys(imports),
27068          importsValues = baseValues(imports, importsKeys);
27069
27070      var isEscaping,
27071          isEvaluating,
27072          index = 0,
27073          interpolate = options.interpolate || reNoMatch,
27074          source = "__p += '";
27075
27076      // Compile the regexp to match each delimiter.
27077      var reDelimiters = RegExp(
27078        (options.escape || reNoMatch).source + '|' +
27079        interpolate.source + '|' +
27080        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
27081        (options.evaluate || reNoMatch).source + '|$'
27082      , 'g');
27083
27084      // Use a sourceURL for easier debugging.
27085      // The sourceURL gets injected into the source that's eval-ed, so be careful
27086      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
27087      // and escape the comment, thus injecting code that gets evaled.
27088      var sourceURL = '//# sourceURL=' +
27089        (hasOwnProperty.call(options, 'sourceURL')
27090          ? (options.sourceURL + '').replace(/\s/g, ' ')
27091          : ('lodash.templateSources[' + (++templateCounter) + ']')
27092        ) + '\n';
27093
27094      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
27095        interpolateValue || (interpolateValue = esTemplateValue);
27096
27097        // Escape characters that can't be included in string literals.
27098        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
27099
27100        // Replace delimiters with snippets.
27101        if (escapeValue) {
27102          isEscaping = true;
27103          source += "' +\n__e(" + escapeValue + ") +\n'";
27104        }
27105        if (evaluateValue) {
27106          isEvaluating = true;
27107          source += "';\n" + evaluateValue + ";\n__p += '";
27108        }
27109        if (interpolateValue) {
27110          source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
27111        }
27112        index = offset + match.length;
27113
27114        // The JS engine embedded in Adobe products needs `match` returned in
27115        // order to produce the correct `offset` value.
27116        return match;
27117      });
27118
27119      source += "';\n";
27120
27121      // If `variable` is not specified wrap a with-statement around the generated
27122      // code to add the data object to the top of the scope chain.
27123      var variable = hasOwnProperty.call(options, 'variable') && options.variable;
27124      if (!variable) {
27125        source = 'with (obj) {\n' + source + '\n}\n';
27126      }
27127      // Throw an error if a forbidden character was found in `variable`, to prevent
27128      // potential command injection attacks.
27129      else if (reForbiddenIdentifierChars.test(variable)) {
27130        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
27131      }
27132
27133      // Cleanup code by stripping empty strings.
27134      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
27135        .replace(reEmptyStringMiddle, '$1')
27136        .replace(reEmptyStringTrailing, '$1;');
27137
27138      // Frame code as the function body.
27139      source = 'function(' + (variable || 'obj') + ') {\n' +
27140        (variable
27141          ? ''
27142          : 'obj || (obj = {});\n'
27143        ) +
27144        "var __t, __p = ''" +
27145        (isEscaping
27146           ? ', __e = _.escape'
27147           : ''
27148        ) +
27149        (isEvaluating
27150          ? ', __j = Array.prototype.join;\n' +
27151            "function print() { __p += __j.call(arguments, '') }\n"
27152          : ';\n'
27153        ) +
27154        source +
27155        'return __p\n}';
27156
27157      var result = attempt(function() {
27158        return Function(importsKeys, sourceURL + 'return ' + source)
27159          .apply(undefined, importsValues);
27160      });
27161
27162      // Provide the compiled function's source by its `toString` method or
27163      // the `source` property as a convenience for inlining compiled templates.
27164      result.source = source;
27165      if (isError(result)) {
27166        throw result;
27167      }
27168      return result;
27169    }
27170
27171    /**
27172     * Converts `string`, as a whole, to lower case just like
27173     * [String#toLowerCase](https://mdn.io/toLowerCase).
27174     *
27175     * @static
27176     * @memberOf _
27177     * @since 4.0.0
27178     * @category String
27179     * @param {string} [string=''] The string to convert.
27180     * @returns {string} Returns the lower cased string.
27181     * @example
27182     *
27183     * _.toLower('--Foo-Bar--');
27184     * // => '--foo-bar--'
27185     *
27186     * _.toLower('fooBar');
27187     * // => 'foobar'
27188     *
27189     * _.toLower('__FOO_BAR__');
27190     * // => '__foo_bar__'
27191     */
27192    function toLower(value) {
27193      return toString(value).toLowerCase();
27194    }
27195
27196    /**
27197     * Converts `string`, as a whole, to upper case just like
27198     * [String#toUpperCase](https://mdn.io/toUpperCase).
27199     *
27200     * @static
27201     * @memberOf _
27202     * @since 4.0.0
27203     * @category String
27204     * @param {string} [string=''] The string to convert.
27205     * @returns {string} Returns the upper cased string.
27206     * @example
27207     *
27208     * _.toUpper('--foo-bar--');
27209     * // => '--FOO-BAR--'
27210     *
27211     * _.toUpper('fooBar');
27212     * // => 'FOOBAR'
27213     *
27214     * _.toUpper('__foo_bar__');
27215     * // => '__FOO_BAR__'
27216     */
27217    function toUpper(value) {
27218      return toString(value).toUpperCase();
27219    }
27220
27221    /**
27222     * Removes leading and trailing whitespace or specified characters from `string`.
27223     *
27224     * @static
27225     * @memberOf _
27226     * @since 3.0.0
27227     * @category String
27228     * @param {string} [string=''] The string to trim.
27229     * @param {string} [chars=whitespace] The characters to trim.
27230     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
27231     * @returns {string} Returns the trimmed string.
27232     * @example
27233     *
27234     * _.trim('  abc  ');
27235     * // => 'abc'
27236     *
27237     * _.trim('-_-abc-_-', '_-');
27238     * // => 'abc'
27239     *
27240     * _.map(['  foo  ', '  bar  '], _.trim);
27241     * // => ['foo', 'bar']
27242     */
27243    function trim(string, chars, guard) {
27244      string = toString(string);
27245      if (string && (guard || chars === undefined)) {
27246        return baseTrim(string);
27247      }
27248      if (!string || !(chars = baseToString(chars))) {
27249        return string;
27250      }
27251      var strSymbols = stringToArray(string),
27252          chrSymbols = stringToArray(chars),
27253          start = charsStartIndex(strSymbols, chrSymbols),
27254          end = charsEndIndex(strSymbols, chrSymbols) + 1;
27255
27256      return castSlice(strSymbols, start, end).join('');
27257    }
27258
27259    /**
27260     * Removes trailing whitespace or specified characters from `string`.
27261     *
27262     * @static
27263     * @memberOf _
27264     * @since 4.0.0
27265     * @category String
27266     * @param {string} [string=''] The string to trim.
27267     * @param {string} [chars=whitespace] The characters to trim.
27268     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
27269     * @returns {string} Returns the trimmed string.
27270     * @example
27271     *
27272     * _.trimEnd('  abc  ');
27273     * // => '  abc'
27274     *
27275     * _.trimEnd('-_-abc-_-', '_-');
27276     * // => '-_-abc'
27277     */
27278    function trimEnd(string, chars, guard) {
27279      string = toString(string);
27280      if (string && (guard || chars === undefined)) {
27281        return string.slice(0, trimmedEndIndex(string) + 1);
27282      }
27283      if (!string || !(chars = baseToString(chars))) {
27284        return string;
27285      }
27286      var strSymbols = stringToArray(string),
27287          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
27288
27289      return castSlice(strSymbols, 0, end).join('');
27290    }
27291
27292    /**
27293     * Removes leading whitespace or specified characters from `string`.
27294     *
27295     * @static
27296     * @memberOf _
27297     * @since 4.0.0
27298     * @category String
27299     * @param {string} [string=''] The string to trim.
27300     * @param {string} [chars=whitespace] The characters to trim.
27301     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
27302     * @returns {string} Returns the trimmed string.
27303     * @example
27304     *
27305     * _.trimStart('  abc  ');
27306     * // => 'abc  '
27307     *
27308     * _.trimStart('-_-abc-_-', '_-');
27309     * // => 'abc-_-'
27310     */
27311    function trimStart(string, chars, guard) {
27312      string = toString(string);
27313      if (string && (guard || chars === undefined)) {
27314        return string.replace(reTrimStart, '');
27315      }
27316      if (!string || !(chars = baseToString(chars))) {
27317        return string;
27318      }
27319      var strSymbols = stringToArray(string),
27320          start = charsStartIndex(strSymbols, stringToArray(chars));
27321
27322      return castSlice(strSymbols, start).join('');
27323    }
27324
27325    /**
27326     * Truncates `string` if it's longer than the given maximum string length.
27327     * The last characters of the truncated string are replaced with the omission
27328     * string which defaults to "...".
27329     *
27330     * @static
27331     * @memberOf _
27332     * @since 4.0.0
27333     * @category String
27334     * @param {string} [string=''] The string to truncate.
27335     * @param {Object} [options={}] The options object.
27336     * @param {number} [options.length=30] The maximum string length.
27337     * @param {string} [options.omission='...'] The string to indicate text is omitted.
27338     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
27339     * @returns {string} Returns the truncated string.
27340     * @example
27341     *
27342     * _.truncate('hi-diddly-ho there, neighborino');
27343     * // => 'hi-diddly-ho there, neighbo...'
27344     *
27345     * _.truncate('hi-diddly-ho there, neighborino', {
27346     *   'length': 24,
27347     *   'separator': ' '
27348     * });
27349     * // => 'hi-diddly-ho there,...'
27350     *
27351     * _.truncate('hi-diddly-ho there, neighborino', {
27352     *   'length': 24,
27353     *   'separator': /,? +/
27354     * });
27355     * // => 'hi-diddly-ho there...'
27356     *
27357     * _.truncate('hi-diddly-ho there, neighborino', {
27358     *   'omission': ' [...]'
27359     * });
27360     * // => 'hi-diddly-ho there, neig [...]'
27361     */
27362    function truncate(string, options) {
27363      var length = DEFAULT_TRUNC_LENGTH,
27364          omission = DEFAULT_TRUNC_OMISSION;
27365
27366      if (isObject(options)) {
27367        var separator = 'separator' in options ? options.separator : separator;
27368        length = 'length' in options ? toInteger(options.length) : length;
27369        omission = 'omission' in options ? baseToString(options.omission) : omission;
27370      }
27371      string = toString(string);
27372
27373      var strLength = string.length;
27374      if (hasUnicode(string)) {
27375        var strSymbols = stringToArray(string);
27376        strLength = strSymbols.length;
27377      }
27378      if (length >= strLength) {
27379        return string;
27380      }
27381      var end = length - stringSize(omission);
27382      if (end < 1) {
27383        return omission;
27384      }
27385      var result = strSymbols
27386        ? castSlice(strSymbols, 0, end).join('')
27387        : string.slice(0, end);
27388
27389      if (separator === undefined) {
27390        return result + omission;
27391      }
27392      if (strSymbols) {
27393        end += (result.length - end);
27394      }
27395      if (isRegExp(separator)) {
27396        if (string.slice(end).search(separator)) {
27397          var match,
27398              substring = result;
27399
27400          if (!separator.global) {
27401            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
27402          }
27403          separator.lastIndex = 0;
27404          while ((match = separator.exec(substring))) {
27405            var newEnd = match.index;
27406          }
27407          result = result.slice(0, newEnd === undefined ? end : newEnd);
27408        }
27409      } else if (string.indexOf(baseToString(separator), end) != end) {
27410        var index = result.lastIndexOf(separator);
27411        if (index > -1) {
27412          result = result.slice(0, index);
27413        }
27414      }
27415      return result + omission;
27416    }
27417
27418    /**
27419     * The inverse of `_.escape`; this method converts the HTML entities
27420     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
27421     * their corresponding characters.
27422     *
27423     * **Note:** No other HTML entities are unescaped. To unescape additional
27424     * HTML entities use a third-party library like [_he_](https://mths.be/he).
27425     *
27426     * @static
27427     * @memberOf _
27428     * @since 0.6.0
27429     * @category String
27430     * @param {string} [string=''] The string to unescape.
27431     * @returns {string} Returns the unescaped string.
27432     * @example
27433     *
27434     * _.unescape('fred, barney, &amp; pebbles');
27435     * // => 'fred, barney, & pebbles'
27436     */
27437    function unescape(string) {
27438      string = toString(string);
27439      return (string && reHasEscapedHtml.test(string))
27440        ? string.replace(reEscapedHtml, unescapeHtmlChar)
27441        : string;
27442    }
27443
27444    /**
27445     * Converts `string`, as space separated words, to upper case.
27446     *
27447     * @static
27448     * @memberOf _
27449     * @since 4.0.0
27450     * @category String
27451     * @param {string} [string=''] The string to convert.
27452     * @returns {string} Returns the upper cased string.
27453     * @example
27454     *
27455     * _.upperCase('--foo-bar');
27456     * // => 'FOO BAR'
27457     *
27458     * _.upperCase('fooBar');
27459     * // => 'FOO BAR'
27460     *
27461     * _.upperCase('__foo_bar__');
27462     * // => 'FOO BAR'
27463     */
27464    var upperCase = createCompounder(function(result, word, index) {
27465      return result + (index ? ' ' : '') + word.toUpperCase();
27466    });
27467
27468    /**
27469     * Converts the first character of `string` to upper case.
27470     *
27471     * @static
27472     * @memberOf _
27473     * @since 4.0.0
27474     * @category String
27475     * @param {string} [string=''] The string to convert.
27476     * @returns {string} Returns the converted string.
27477     * @example
27478     *
27479     * _.upperFirst('fred');
27480     * // => 'Fred'
27481     *
27482     * _.upperFirst('FRED');
27483     * // => 'FRED'
27484     */
27485    var upperFirst = createCaseFirst('toUpperCase');
27486
27487    /**
27488     * Splits `string` into an array of its words.
27489     *
27490     * @static
27491     * @memberOf _
27492     * @since 3.0.0
27493     * @category String
27494     * @param {string} [string=''] The string to inspect.
27495     * @param {RegExp|string} [pattern] The pattern to match words.
27496     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
27497     * @returns {Array} Returns the words of `string`.
27498     * @example
27499     *
27500     * _.words('fred, barney, & pebbles');
27501     * // => ['fred', 'barney', 'pebbles']
27502     *
27503     * _.words('fred, barney, & pebbles', /[^, ]+/g);
27504     * // => ['fred', 'barney', '&', 'pebbles']
27505     */
27506    function words(string, pattern, guard) {
27507      string = toString(string);
27508      pattern = guard ? undefined : pattern;
27509
27510      if (pattern === undefined) {
27511        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
27512      }
27513      return string.match(pattern) || [];
27514    }
27515
27516    /*------------------------------------------------------------------------*/
27517
27518    /**
27519     * Attempts to invoke `func`, returning either the result or the caught error
27520     * object. Any additional arguments are provided to `func` when it's invoked.
27521     *
27522     * @static
27523     * @memberOf _
27524     * @since 3.0.0
27525     * @category Util
27526     * @param {Function} func The function to attempt.
27527     * @param {...*} [args] The arguments to invoke `func` with.
27528     * @returns {*} Returns the `func` result or error object.
27529     * @example
27530     *
27531     * // Avoid throwing errors for invalid selectors.
27532     * var elements = _.attempt(function(selector) {
27533     *   return document.querySelectorAll(selector);
27534     * }, '>_>');
27535     *
27536     * if (_.isError(elements)) {
27537     *   elements = [];
27538     * }
27539     */
27540    var attempt = baseRest(function(func, args) {
27541      try {
27542        return apply(func, undefined, args);
27543      } catch (e) {
27544        return isError(e) ? e : new Error(e);
27545      }
27546    });
27547
27548    /**
27549     * Binds methods of an object to the object itself, overwriting the existing
27550     * method.
27551     *
27552     * **Note:** This method doesn't set the "length" property of bound functions.
27553     *
27554     * @static
27555     * @since 0.1.0
27556     * @memberOf _
27557     * @category Util
27558     * @param {Object} object The object to bind and assign the bound methods to.
27559     * @param {...(string|string[])} methodNames The object method names to bind.
27560     * @returns {Object} Returns `object`.
27561     * @example
27562     *
27563     * var view = {
27564     *   'label': 'docs',
27565     *   'click': function() {
27566     *     console.log('clicked ' + this.label);
27567     *   }
27568     * };
27569     *
27570     * _.bindAll(view, ['click']);
27571     * jQuery(element).on('click', view.click);
27572     * // => Logs 'clicked docs' when clicked.
27573     */
27574    var bindAll = flatRest(function(object, methodNames) {
27575      arrayEach(methodNames, function(key) {
27576        key = toKey(key);
27577        baseAssignValue(object, key, bind(object[key], object));
27578      });
27579      return object;
27580    });
27581
27582    /**
27583     * Creates a function that iterates over `pairs` and invokes the corresponding
27584     * function of the first predicate to return truthy. The predicate-function
27585     * pairs are invoked with the `this` binding and arguments of the created
27586     * function.
27587     *
27588     * @static
27589     * @memberOf _
27590     * @since 4.0.0
27591     * @category Util
27592     * @param {Array} pairs The predicate-function pairs.
27593     * @returns {Function} Returns the new composite function.
27594     * @example
27595     *
27596     * var func = _.cond([
27597     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],
27598     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
27599     *   [_.stubTrue,                      _.constant('no match')]
27600     * ]);
27601     *
27602     * func({ 'a': 1, 'b': 2 });
27603     * // => 'matches A'
27604     *
27605     * func({ 'a': 0, 'b': 1 });
27606     * // => 'matches B'
27607     *
27608     * func({ 'a': '1', 'b': '2' });
27609     * // => 'no match'
27610     */
27611    function cond(pairs) {
27612      var length = pairs == null ? 0 : pairs.length,
27613          toIteratee = getIteratee();
27614
27615      pairs = !length ? [] : arrayMap(pairs, function(pair) {
27616        if (typeof pair[1] != 'function') {
27617          throw new TypeError(FUNC_ERROR_TEXT);
27618        }
27619        return [toIteratee(pair[0]), pair[1]];
27620      });
27621
27622      return baseRest(function(args) {
27623        var index = -1;
27624        while (++index < length) {
27625          var pair = pairs[index];
27626          if (apply(pair[0], this, args)) {
27627            return apply(pair[1], this, args);
27628          }
27629        }
27630      });
27631    }
27632
27633    /**
27634     * Creates a function that invokes the predicate properties of `source` with
27635     * the corresponding property values of a given object, returning `true` if
27636     * all predicates return truthy, else `false`.
27637     *
27638     * **Note:** The created function is equivalent to `_.conformsTo` with
27639     * `source` partially applied.
27640     *
27641     * @static
27642     * @memberOf _
27643     * @since 4.0.0
27644     * @category Util
27645     * @param {Object} source The object of property predicates to conform to.
27646     * @returns {Function} Returns the new spec function.
27647     * @example
27648     *
27649     * var objects = [
27650     *   { 'a': 2, 'b': 1 },
27651     *   { 'a': 1, 'b': 2 }
27652     * ];
27653     *
27654     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
27655     * // => [{ 'a': 1, 'b': 2 }]
27656     */
27657    function conforms(source) {
27658      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
27659    }
27660
27661    /**
27662     * Creates a function that returns `value`.
27663     *
27664     * @static
27665     * @memberOf _
27666     * @since 2.4.0
27667     * @category Util
27668     * @param {*} value The value to return from the new function.
27669     * @returns {Function} Returns the new constant function.
27670     * @example
27671     *
27672     * var objects = _.times(2, _.constant({ 'a': 1 }));
27673     *
27674     * console.log(objects);
27675     * // => [{ 'a': 1 }, { 'a': 1 }]
27676     *
27677     * console.log(objects[0] === objects[1]);
27678     * // => true
27679     */
27680    function constant(value) {
27681      return function() {
27682        return value;
27683      };
27684    }
27685
27686    /**
27687     * Checks `value` to determine whether a default value should be returned in
27688     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
27689     * or `undefined`.
27690     *
27691     * @static
27692     * @memberOf _
27693     * @since 4.14.0
27694     * @category Util
27695     * @param {*} value The value to check.
27696     * @param {*} defaultValue The default value.
27697     * @returns {*} Returns the resolved value.
27698     * @example
27699     *
27700     * _.defaultTo(1, 10);
27701     * // => 1
27702     *
27703     * _.defaultTo(undefined, 10);
27704     * // => 10
27705     */
27706    function defaultTo(value, defaultValue) {
27707      return (value == null || value !== value) ? defaultValue : value;
27708    }
27709
27710    /**
27711     * Creates a function that returns the result of invoking the given functions
27712     * with the `this` binding of the created function, where each successive
27713     * invocation is supplied the return value of the previous.
27714     *
27715     * @static
27716     * @memberOf _
27717     * @since 3.0.0
27718     * @category Util
27719     * @param {...(Function|Function[])} [funcs] The functions to invoke.
27720     * @returns {Function} Returns the new composite function.
27721     * @see _.flowRight
27722     * @example
27723     *
27724     * function square(n) {
27725     *   return n * n;
27726     * }
27727     *
27728     * var addSquare = _.flow([_.add, square]);
27729     * addSquare(1, 2);
27730     * // => 9
27731     */
27732    var flow = createFlow();
27733
27734    /**
27735     * This method is like `_.flow` except that it creates a function that
27736     * invokes the given functions from right to left.
27737     *
27738     * @static
27739     * @since 3.0.0
27740     * @memberOf _
27741     * @category Util
27742     * @param {...(Function|Function[])} [funcs] The functions to invoke.
27743     * @returns {Function} Returns the new composite function.
27744     * @see _.flow
27745     * @example
27746     *
27747     * function square(n) {
27748     *   return n * n;
27749     * }
27750     *
27751     * var addSquare = _.flowRight([square, _.add]);
27752     * addSquare(1, 2);
27753     * // => 9
27754     */
27755    var flowRight = createFlow(true);
27756
27757    /**
27758     * This method returns the first argument it receives.
27759     *
27760     * @static
27761     * @since 0.1.0
27762     * @memberOf _
27763     * @category Util
27764     * @param {*} value Any value.
27765     * @returns {*} Returns `value`.
27766     * @example
27767     *
27768     * var object = { 'a': 1 };
27769     *
27770     * console.log(_.identity(object) === object);
27771     * // => true
27772     */
27773    function identity(value) {
27774      return value;
27775    }
27776
27777    /**
27778     * Creates a function that invokes `func` with the arguments of the created
27779     * function. If `func` is a property name, the created function returns the
27780     * property value for a given element. If `func` is an array or object, the
27781     * created function returns `true` for elements that contain the equivalent
27782     * source properties, otherwise it returns `false`.
27783     *
27784     * @static
27785     * @since 4.0.0
27786     * @memberOf _
27787     * @category Util
27788     * @param {*} [func=_.identity] The value to convert to a callback.
27789     * @returns {Function} Returns the callback.
27790     * @example
27791     *
27792     * var users = [
27793     *   { 'user': 'barney', 'age': 36, 'active': true },
27794     *   { 'user': 'fred',   'age': 40, 'active': false }
27795     * ];
27796     *
27797     * // The `_.matches` iteratee shorthand.
27798     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
27799     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
27800     *
27801     * // The `_.matchesProperty` iteratee shorthand.
27802     * _.filter(users, _.iteratee(['user', 'fred']));
27803     * // => [{ 'user': 'fred', 'age': 40 }]
27804     *
27805     * // The `_.property` iteratee shorthand.
27806     * _.map(users, _.iteratee('user'));
27807     * // => ['barney', 'fred']
27808     *
27809     * // Create custom iteratee shorthands.
27810     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
27811     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {
27812     *     return func.test(string);
27813     *   };
27814     * });
27815     *
27816     * _.filter(['abc', 'def'], /ef/);
27817     * // => ['def']
27818     */
27819    function iteratee(func) {
27820      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
27821    }
27822
27823    /**
27824     * Creates a function that performs a partial deep comparison between a given
27825     * object and `source`, returning `true` if the given object has equivalent
27826     * property values, else `false`.
27827     *
27828     * **Note:** The created function is equivalent to `_.isMatch` with `source`
27829     * partially applied.
27830     *
27831     * Partial comparisons will match empty array and empty object `source`
27832     * values against any array or object value, respectively. See `_.isEqual`
27833     * for a list of supported value comparisons.
27834     *
27835     * **Note:** Multiple values can be checked by combining several matchers
27836     * using `_.overSome`
27837     *
27838     * @static
27839     * @memberOf _
27840     * @since 3.0.0
27841     * @category Util
27842     * @param {Object} source The object of property values to match.
27843     * @returns {Function} Returns the new spec function.
27844     * @example
27845     *
27846     * var objects = [
27847     *   { 'a': 1, 'b': 2, 'c': 3 },
27848     *   { 'a': 4, 'b': 5, 'c': 6 }
27849     * ];
27850     *
27851     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
27852     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
27853     *
27854     * // Checking for several possible values
27855     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
27856     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
27857     */
27858    function matches(source) {
27859      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
27860    }
27861
27862    /**
27863     * Creates a function that performs a partial deep comparison between the
27864     * value at `path` of a given object to `srcValue`, returning `true` if the
27865     * object value is equivalent, else `false`.
27866     *
27867     * **Note:** Partial comparisons will match empty array and empty object
27868     * `srcValue` values against any array or object value, respectively. See
27869     * `_.isEqual` for a list of supported value comparisons.
27870     *
27871     * **Note:** Multiple values can be checked by combining several matchers
27872     * using `_.overSome`
27873     *
27874     * @static
27875     * @memberOf _
27876     * @since 3.2.0
27877     * @category Util
27878     * @param {Array|string} path The path of the property to get.
27879     * @param {*} srcValue The value to match.
27880     * @returns {Function} Returns the new spec function.
27881     * @example
27882     *
27883     * var objects = [
27884     *   { 'a': 1, 'b': 2, 'c': 3 },
27885     *   { 'a': 4, 'b': 5, 'c': 6 }
27886     * ];
27887     *
27888     * _.find(objects, _.matchesProperty('a', 4));
27889     * // => { 'a': 4, 'b': 5, 'c': 6 }
27890     *
27891     * // Checking for several possible values
27892     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
27893     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
27894     */
27895    function matchesProperty(path, srcValue) {
27896      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
27897    }
27898
27899    /**
27900     * Creates a function that invokes the method at `path` of a given object.
27901     * Any additional arguments are provided to the invoked method.
27902     *
27903     * @static
27904     * @memberOf _
27905     * @since 3.7.0
27906     * @category Util
27907     * @param {Array|string} path The path of the method to invoke.
27908     * @param {...*} [args] The arguments to invoke the method with.
27909     * @returns {Function} Returns the new invoker function.
27910     * @example
27911     *
27912     * var objects = [
27913     *   { 'a': { 'b': _.constant(2) } },
27914     *   { 'a': { 'b': _.constant(1) } }
27915     * ];
27916     *
27917     * _.map(objects, _.method('a.b'));
27918     * // => [2, 1]
27919     *
27920     * _.map(objects, _.method(['a', 'b']));
27921     * // => [2, 1]
27922     */
27923    var method = baseRest(function(path, args) {
27924      return function(object) {
27925        return baseInvoke(object, path, args);
27926      };
27927    });
27928
27929    /**
27930     * The opposite of `_.method`; this method creates a function that invokes
27931     * the method at a given path of `object`. Any additional arguments are
27932     * provided to the invoked method.
27933     *
27934     * @static
27935     * @memberOf _
27936     * @since 3.7.0
27937     * @category Util
27938     * @param {Object} object The object to query.
27939     * @param {...*} [args] The arguments to invoke the method with.
27940     * @returns {Function} Returns the new invoker function.
27941     * @example
27942     *
27943     * var array = _.times(3, _.constant),
27944     *     object = { 'a': array, 'b': array, 'c': array };
27945     *
27946     * _.map(['a[2]', 'c[0]'], _.methodOf(object));
27947     * // => [2, 0]
27948     *
27949     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
27950     * // => [2, 0]
27951     */
27952    var methodOf = baseRest(function(object, args) {
27953      return function(path) {
27954        return baseInvoke(object, path, args);
27955      };
27956    });
27957
27958    /**
27959     * Adds all own enumerable string keyed function properties of a source
27960     * object to the destination object. If `object` is a function, then methods
27961     * are added to its prototype as well.
27962     *
27963     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
27964     * avoid conflicts caused by modifying the original.
27965     *
27966     * @static
27967     * @since 0.1.0
27968     * @memberOf _
27969     * @category Util
27970     * @param {Function|Object} [object=lodash] The destination object.
27971     * @param {Object} source The object of functions to add.
27972     * @param {Object} [options={}] The options object.
27973     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
27974     * @returns {Function|Object} Returns `object`.
27975     * @example
27976     *
27977     * function vowels(string) {
27978     *   return _.filter(string, function(v) {
27979     *     return /[aeiou]/i.test(v);
27980     *   });
27981     * }
27982     *
27983     * _.mixin({ 'vowels': vowels });
27984     * _.vowels('fred');
27985     * // => ['e']
27986     *
27987     * _('fred').vowels().value();
27988     * // => ['e']
27989     *
27990     * _.mixin({ 'vowels': vowels }, { 'chain': false });
27991     * _('fred').vowels();
27992     * // => ['e']
27993     */
27994    function mixin(object, source, options) {
27995      var props = keys(source),
27996          methodNames = baseFunctions(source, props);
27997
27998      if (options == null &&
27999          !(isObject(source) && (methodNames.length || !props.length))) {
28000        options = source;
28001        source = object;
28002        object = this;
28003        methodNames = baseFunctions(source, keys(source));
28004      }
28005      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
28006          isFunc = isFunction(object);
28007
28008      arrayEach(methodNames, function(methodName) {
28009        var func = source[methodName];
28010        object[methodName] = func;
28011        if (isFunc) {
28012          object.prototype[methodName] = function() {
28013            var chainAll = this.__chain__;
28014            if (chain || chainAll) {
28015              var result = object(this.__wrapped__),
28016                  actions = result.__actions__ = copyArray(this.__actions__);
28017
28018              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
28019              result.__chain__ = chainAll;
28020              return result;
28021            }
28022            return func.apply(object, arrayPush([this.value()], arguments));
28023          };
28024        }
28025      });
28026
28027      return object;
28028    }
28029
28030    /**
28031     * Reverts the `_` variable to its previous value and returns a reference to
28032     * the `lodash` function.
28033     *
28034     * @static
28035     * @since 0.1.0
28036     * @memberOf _
28037     * @category Util
28038     * @returns {Function} Returns the `lodash` function.
28039     * @example
28040     *
28041     * var lodash = _.noConflict();
28042     */
28043    function noConflict() {
28044      if (root._ === this) {
28045        root._ = oldDash;
28046      }
28047      return this;
28048    }
28049
28050    /**
28051     * This method returns `undefined`.
28052     *
28053     * @static
28054     * @memberOf _
28055     * @since 2.3.0
28056     * @category Util
28057     * @example
28058     *
28059     * _.times(2, _.noop);
28060     * // => [undefined, undefined]
28061     */
28062    function noop() {
28063      // No operation performed.
28064    }
28065
28066    /**
28067     * Creates a function that gets the argument at index `n`. If `n` is negative,
28068     * the nth argument from the end is returned.
28069     *
28070     * @static
28071     * @memberOf _
28072     * @since 4.0.0
28073     * @category Util
28074     * @param {number} [n=0] The index of the argument to return.
28075     * @returns {Function} Returns the new pass-thru function.
28076     * @example
28077     *
28078     * var func = _.nthArg(1);
28079     * func('a', 'b', 'c', 'd');
28080     * // => 'b'
28081     *
28082     * var func = _.nthArg(-2);
28083     * func('a', 'b', 'c', 'd');
28084     * // => 'c'
28085     */
28086    function nthArg(n) {
28087      n = toInteger(n);
28088      return baseRest(function(args) {
28089        return baseNth(args, n);
28090      });
28091    }
28092
28093    /**
28094     * Creates a function that invokes `iteratees` with the arguments it receives
28095     * and returns their results.
28096     *
28097     * @static
28098     * @memberOf _
28099     * @since 4.0.0
28100     * @category Util
28101     * @param {...(Function|Function[])} [iteratees=[_.identity]]
28102     *  The iteratees to invoke.
28103     * @returns {Function} Returns the new function.
28104     * @example
28105     *
28106     * var func = _.over([Math.max, Math.min]);
28107     *
28108     * func(1, 2, 3, 4);
28109     * // => [4, 1]
28110     */
28111    var over = createOver(arrayMap);
28112
28113    /**
28114     * Creates a function that checks if **all** of the `predicates` return
28115     * truthy when invoked with the arguments it receives.
28116     *
28117     * Following shorthands are possible for providing predicates.
28118     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
28119     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
28120     *
28121     * @static
28122     * @memberOf _
28123     * @since 4.0.0
28124     * @category Util
28125     * @param {...(Function|Function[])} [predicates=[_.identity]]
28126     *  The predicates to check.
28127     * @returns {Function} Returns the new function.
28128     * @example
28129     *
28130     * var func = _.overEvery([Boolean, isFinite]);
28131     *
28132     * func('1');
28133     * // => true
28134     *
28135     * func(null);
28136     * // => false
28137     *
28138     * func(NaN);
28139     * // => false
28140     */
28141    var overEvery = createOver(arrayEvery);
28142
28143    /**
28144     * Creates a function that checks if **any** of the `predicates` return
28145     * truthy when invoked with the arguments it receives.
28146     *
28147     * Following shorthands are possible for providing predicates.
28148     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
28149     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
28150     *
28151     * @static
28152     * @memberOf _
28153     * @since 4.0.0
28154     * @category Util
28155     * @param {...(Function|Function[])} [predicates=[_.identity]]
28156     *  The predicates to check.
28157     * @returns {Function} Returns the new function.
28158     * @example
28159     *
28160     * var func = _.overSome([Boolean, isFinite]);
28161     *
28162     * func('1');
28163     * // => true
28164     *
28165     * func(null);
28166     * // => true
28167     *
28168     * func(NaN);
28169     * // => false
28170     *
28171     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
28172     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
28173     */
28174    var overSome = createOver(arraySome);
28175
28176    /**
28177     * Creates a function that returns the value at `path` of a given object.
28178     *
28179     * @static
28180     * @memberOf _
28181     * @since 2.4.0
28182     * @category Util
28183     * @param {Array|string} path The path of the property to get.
28184     * @returns {Function} Returns the new accessor function.
28185     * @example
28186     *
28187     * var objects = [
28188     *   { 'a': { 'b': 2 } },
28189     *   { 'a': { 'b': 1 } }
28190     * ];
28191     *
28192     * _.map(objects, _.property('a.b'));
28193     * // => [2, 1]
28194     *
28195     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
28196     * // => [1, 2]
28197     */
28198    function property(path) {
28199      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
28200    }
28201
28202    /**
28203     * The opposite of `_.property`; this method creates a function that returns
28204     * the value at a given path of `object`.
28205     *
28206     * @static
28207     * @memberOf _
28208     * @since 3.0.0
28209     * @category Util
28210     * @param {Object} object The object to query.
28211     * @returns {Function} Returns the new accessor function.
28212     * @example
28213     *
28214     * var array = [0, 1, 2],
28215     *     object = { 'a': array, 'b': array, 'c': array };
28216     *
28217     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
28218     * // => [2, 0]
28219     *
28220     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
28221     * // => [2, 0]
28222     */
28223    function propertyOf(object) {
28224      return function(path) {
28225        return object == null ? undefined : baseGet(object, path);
28226      };
28227    }
28228
28229    /**
28230     * Creates an array of numbers (positive and/or negative) progressing from
28231     * `start` up to, but not including, `end`. A step of `-1` is used if a negative
28232     * `start` is specified without an `end` or `step`. If `end` is not specified,
28233     * it's set to `start` with `start` then set to `0`.
28234     *
28235     * **Note:** JavaScript follows the IEEE-754 standard for resolving
28236     * floating-point values which can produce unexpected results.
28237     *
28238     * @static
28239     * @since 0.1.0
28240     * @memberOf _
28241     * @category Util
28242     * @param {number} [start=0] The start of the range.
28243     * @param {number} end The end of the range.
28244     * @param {number} [step=1] The value to increment or decrement by.
28245     * @returns {Array} Returns the range of numbers.
28246     * @see _.inRange, _.rangeRight
28247     * @example
28248     *
28249     * _.range(4);
28250     * // => [0, 1, 2, 3]
28251     *
28252     * _.range(-4);
28253     * // => [0, -1, -2, -3]
28254     *
28255     * _.range(1, 5);
28256     * // => [1, 2, 3, 4]
28257     *
28258     * _.range(0, 20, 5);
28259     * // => [0, 5, 10, 15]
28260     *
28261     * _.range(0, -4, -1);
28262     * // => [0, -1, -2, -3]
28263     *
28264     * _.range(1, 4, 0);
28265     * // => [1, 1, 1]
28266     *
28267     * _.range(0);
28268     * // => []
28269     */
28270    var range = createRange();
28271
28272    /**
28273     * This method is like `_.range` except that it populates values in
28274     * descending order.
28275     *
28276     * @static
28277     * @memberOf _
28278     * @since 4.0.0
28279     * @category Util
28280     * @param {number} [start=0] The start of the range.
28281     * @param {number} end The end of the range.
28282     * @param {number} [step=1] The value to increment or decrement by.
28283     * @returns {Array} Returns the range of numbers.
28284     * @see _.inRange, _.range
28285     * @example
28286     *
28287     * _.rangeRight(4);
28288     * // => [3, 2, 1, 0]
28289     *
28290     * _.rangeRight(-4);
28291     * // => [-3, -2, -1, 0]
28292     *
28293     * _.rangeRight(1, 5);
28294     * // => [4, 3, 2, 1]
28295     *
28296     * _.rangeRight(0, 20, 5);
28297     * // => [15, 10, 5, 0]
28298     *
28299     * _.rangeRight(0, -4, -1);
28300     * // => [-3, -2, -1, 0]
28301     *
28302     * _.rangeRight(1, 4, 0);
28303     * // => [1, 1, 1]
28304     *
28305     * _.rangeRight(0);
28306     * // => []
28307     */
28308    var rangeRight = createRange(true);
28309
28310    /**
28311     * This method returns a new empty array.
28312     *
28313     * @static
28314     * @memberOf _
28315     * @since 4.13.0
28316     * @category Util
28317     * @returns {Array} Returns the new empty array.
28318     * @example
28319     *
28320     * var arrays = _.times(2, _.stubArray);
28321     *
28322     * console.log(arrays);
28323     * // => [[], []]
28324     *
28325     * console.log(arrays[0] === arrays[1]);
28326     * // => false
28327     */
28328    function stubArray() {
28329      return [];
28330    }
28331
28332    /**
28333     * This method returns `false`.
28334     *
28335     * @static
28336     * @memberOf _
28337     * @since 4.13.0
28338     * @category Util
28339     * @returns {boolean} Returns `false`.
28340     * @example
28341     *
28342     * _.times(2, _.stubFalse);
28343     * // => [false, false]
28344     */
28345    function stubFalse() {
28346      return false;
28347    }
28348
28349    /**
28350     * This method returns a new empty object.
28351     *
28352     * @static
28353     * @memberOf _
28354     * @since 4.13.0
28355     * @category Util
28356     * @returns {Object} Returns the new empty object.
28357     * @example
28358     *
28359     * var objects = _.times(2, _.stubObject);
28360     *
28361     * console.log(objects);
28362     * // => [{}, {}]
28363     *
28364     * console.log(objects[0] === objects[1]);
28365     * // => false
28366     */
28367    function stubObject() {
28368      return {};
28369    }
28370
28371    /**
28372     * This method returns an empty string.
28373     *
28374     * @static
28375     * @memberOf _
28376     * @since 4.13.0
28377     * @category Util
28378     * @returns {string} Returns the empty string.
28379     * @example
28380     *
28381     * _.times(2, _.stubString);
28382     * // => ['', '']
28383     */
28384    function stubString() {
28385      return '';
28386    }
28387
28388    /**
28389     * This method returns `true`.
28390     *
28391     * @static
28392     * @memberOf _
28393     * @since 4.13.0
28394     * @category Util
28395     * @returns {boolean} Returns `true`.
28396     * @example
28397     *
28398     * _.times(2, _.stubTrue);
28399     * // => [true, true]
28400     */
28401    function stubTrue() {
28402      return true;
28403    }
28404
28405    /**
28406     * Invokes the iteratee `n` times, returning an array of the results of
28407     * each invocation. The iteratee is invoked with one argument; (index).
28408     *
28409     * @static
28410     * @since 0.1.0
28411     * @memberOf _
28412     * @category Util
28413     * @param {number} n The number of times to invoke `iteratee`.
28414     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
28415     * @returns {Array} Returns the array of results.
28416     * @example
28417     *
28418     * _.times(3, String);
28419     * // => ['0', '1', '2']
28420     *
28421     *  _.times(4, _.constant(0));
28422     * // => [0, 0, 0, 0]
28423     */
28424    function times(n, iteratee) {
28425      n = toInteger(n);
28426      if (n < 1 || n > MAX_SAFE_INTEGER) {
28427        return [];
28428      }
28429      var index = MAX_ARRAY_LENGTH,
28430          length = nativeMin(n, MAX_ARRAY_LENGTH);
28431
28432      iteratee = getIteratee(iteratee);
28433      n -= MAX_ARRAY_LENGTH;
28434
28435      var result = baseTimes(length, iteratee);
28436      while (++index < n) {
28437        iteratee(index);
28438      }
28439      return result;
28440    }
28441
28442    /**
28443     * Converts `value` to a property path array.
28444     *
28445     * @static
28446     * @memberOf _
28447     * @since 4.0.0
28448     * @category Util
28449     * @param {*} value The value to convert.
28450     * @returns {Array} Returns the new property path array.
28451     * @example
28452     *
28453     * _.toPath('a.b.c');
28454     * // => ['a', 'b', 'c']
28455     *
28456     * _.toPath('a[0].b.c');
28457     * // => ['a', '0', 'b', 'c']
28458     */
28459    function toPath(value) {
28460      if (isArray(value)) {
28461        return arrayMap(value, toKey);
28462      }
28463      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
28464    }
28465
28466    /**
28467     * Generates a unique ID. If `prefix` is given, the ID is appended to it.
28468     *
28469     * @static
28470     * @since 0.1.0
28471     * @memberOf _
28472     * @category Util
28473     * @param {string} [prefix=''] The value to prefix the ID with.
28474     * @returns {string} Returns the unique ID.
28475     * @example
28476     *
28477     * _.uniqueId('contact_');
28478     * // => 'contact_104'
28479     *
28480     * _.uniqueId();
28481     * // => '105'
28482     */
28483    function uniqueId(prefix) {
28484      var id = ++idCounter;
28485      return toString(prefix) + id;
28486    }
28487
28488    /*------------------------------------------------------------------------*/
28489
28490    /**
28491     * Adds two numbers.
28492     *
28493     * @static
28494     * @memberOf _
28495     * @since 3.4.0
28496     * @category Math
28497     * @param {number} augend The first number in an addition.
28498     * @param {number} addend The second number in an addition.
28499     * @returns {number} Returns the total.
28500     * @example
28501     *
28502     * _.add(6, 4);
28503     * // => 10
28504     */
28505    var add = createMathOperation(function(augend, addend) {
28506      return augend + addend;
28507    }, 0);
28508
28509    /**
28510     * Computes `number` rounded up to `precision`.
28511     *
28512     * @static
28513     * @memberOf _
28514     * @since 3.10.0
28515     * @category Math
28516     * @param {number} number The number to round up.
28517     * @param {number} [precision=0] The precision to round up to.
28518     * @returns {number} Returns the rounded up number.
28519     * @example
28520     *
28521     * _.ceil(4.006);
28522     * // => 5
28523     *
28524     * _.ceil(6.004, 2);
28525     * // => 6.01
28526     *
28527     * _.ceil(6040, -2);
28528     * // => 6100
28529     */
28530    var ceil = createRound('ceil');
28531
28532    /**
28533     * Divide two numbers.
28534     *
28535     * @static
28536     * @memberOf _
28537     * @since 4.7.0
28538     * @category Math
28539     * @param {number} dividend The first number in a division.
28540     * @param {number} divisor The second number in a division.
28541     * @returns {number} Returns the quotient.
28542     * @example
28543     *
28544     * _.divide(6, 4);
28545     * // => 1.5
28546     */
28547    var divide = createMathOperation(function(dividend, divisor) {
28548      return dividend / divisor;
28549    }, 1);
28550
28551    /**
28552     * Computes `number` rounded down to `precision`.
28553     *
28554     * @static
28555     * @memberOf _
28556     * @since 3.10.0
28557     * @category Math
28558     * @param {number} number The number to round down.
28559     * @param {number} [precision=0] The precision to round down to.
28560     * @returns {number} Returns the rounded down number.
28561     * @example
28562     *
28563     * _.floor(4.006);
28564     * // => 4
28565     *
28566     * _.floor(0.046, 2);
28567     * // => 0.04
28568     *
28569     * _.floor(4060, -2);
28570     * // => 4000
28571     */
28572    var floor = createRound('floor');
28573
28574    /**
28575     * Computes the maximum value of `array`. If `array` is empty or falsey,
28576     * `undefined` is returned.
28577     *
28578     * @static
28579     * @since 0.1.0
28580     * @memberOf _
28581     * @category Math
28582     * @param {Array} array The array to iterate over.
28583     * @returns {*} Returns the maximum value.
28584     * @example
28585     *
28586     * _.max([4, 2, 8, 6]);
28587     * // => 8
28588     *
28589     * _.max([]);
28590     * // => undefined
28591     */
28592    function max(array) {
28593      return (array && array.length)
28594        ? baseExtremum(array, identity, baseGt)
28595        : undefined;
28596    }
28597
28598    /**
28599     * This method is like `_.max` except that it accepts `iteratee` which is
28600     * invoked for each element in `array` to generate the criterion by which
28601     * the value is ranked. The iteratee is invoked with one argument: (value).
28602     *
28603     * @static
28604     * @memberOf _
28605     * @since 4.0.0
28606     * @category Math
28607     * @param {Array} array The array to iterate over.
28608     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
28609     * @returns {*} Returns the maximum value.
28610     * @example
28611     *
28612     * var objects = [{ 'n': 1 }, { 'n': 2 }];
28613     *
28614     * _.maxBy(objects, function(o) { return o.n; });
28615     * // => { 'n': 2 }
28616     *
28617     * // The `_.property` iteratee shorthand.
28618     * _.maxBy(objects, 'n');
28619     * // => { 'n': 2 }
28620     */
28621    function maxBy(array, iteratee) {
28622      return (array && array.length)
28623        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
28624        : undefined;
28625    }
28626
28627    /**
28628     * Computes the mean of the values in `array`.
28629     *
28630     * @static
28631     * @memberOf _
28632     * @since 4.0.0
28633     * @category Math
28634     * @param {Array} array The array to iterate over.
28635     * @returns {number} Returns the mean.
28636     * @example
28637     *
28638     * _.mean([4, 2, 8, 6]);
28639     * // => 5
28640     */
28641    function mean(array) {
28642      return baseMean(array, identity);
28643    }
28644
28645    /**
28646     * This method is like `_.mean` except that it accepts `iteratee` which is
28647     * invoked for each element in `array` to generate the value to be averaged.
28648     * The iteratee is invoked with one argument: (value).
28649     *
28650     * @static
28651     * @memberOf _
28652     * @since 4.7.0
28653     * @category Math
28654     * @param {Array} array The array to iterate over.
28655     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
28656     * @returns {number} Returns the mean.
28657     * @example
28658     *
28659     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
28660     *
28661     * _.meanBy(objects, function(o) { return o.n; });
28662     * // => 5
28663     *
28664     * // The `_.property` iteratee shorthand.
28665     * _.meanBy(objects, 'n');
28666     * // => 5
28667     */
28668    function meanBy(array, iteratee) {
28669      return baseMean(array, getIteratee(iteratee, 2));
28670    }
28671
28672    /**
28673     * Computes the minimum value of `array`. If `array` is empty or falsey,
28674     * `undefined` is returned.
28675     *
28676     * @static
28677     * @since 0.1.0
28678     * @memberOf _
28679     * @category Math
28680     * @param {Array} array The array to iterate over.
28681     * @returns {*} Returns the minimum value.
28682     * @example
28683     *
28684     * _.min([4, 2, 8, 6]);
28685     * // => 2
28686     *
28687     * _.min([]);
28688     * // => undefined
28689     */
28690    function min(array) {
28691      return (array && array.length)
28692        ? baseExtremum(array, identity, baseLt)
28693        : undefined;
28694    }
28695
28696    /**
28697     * This method is like `_.min` except that it accepts `iteratee` which is
28698     * invoked for each element in `array` to generate the criterion by which
28699     * the value is ranked. The iteratee is invoked with one argument: (value).
28700     *
28701     * @static
28702     * @memberOf _
28703     * @since 4.0.0
28704     * @category Math
28705     * @param {Array} array The array to iterate over.
28706     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
28707     * @returns {*} Returns the minimum value.
28708     * @example
28709     *
28710     * var objects = [{ 'n': 1 }, { 'n': 2 }];
28711     *
28712     * _.minBy(objects, function(o) { return o.n; });
28713     * // => { 'n': 1 }
28714     *
28715     * // The `_.property` iteratee shorthand.
28716     * _.minBy(objects, 'n');
28717     * // => { 'n': 1 }
28718     */
28719    function minBy(array, iteratee) {
28720      return (array && array.length)
28721        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
28722        : undefined;
28723    }
28724
28725    /**
28726     * Multiply two numbers.
28727     *
28728     * @static
28729     * @memberOf _
28730     * @since 4.7.0
28731     * @category Math
28732     * @param {number} multiplier The first number in a multiplication.
28733     * @param {number} multiplicand The second number in a multiplication.
28734     * @returns {number} Returns the product.
28735     * @example
28736     *
28737     * _.multiply(6, 4);
28738     * // => 24
28739     */
28740    var multiply = createMathOperation(function(multiplier, multiplicand) {
28741      return multiplier * multiplicand;
28742    }, 1);
28743
28744    /**
28745     * Computes `number` rounded to `precision`.
28746     *
28747     * @static
28748     * @memberOf _
28749     * @since 3.10.0
28750     * @category Math
28751     * @param {number} number The number to round.
28752     * @param {number} [precision=0] The precision to round to.
28753     * @returns {number} Returns the rounded number.
28754     * @example
28755     *
28756     * _.round(4.006);
28757     * // => 4
28758     *
28759     * _.round(4.006, 2);
28760     * // => 4.01
28761     *
28762     * _.round(4060, -2);
28763     * // => 4100
28764     */
28765    var round = createRound('round');
28766
28767    /**
28768     * Subtract two numbers.
28769     *
28770     * @static
28771     * @memberOf _
28772     * @since 4.0.0
28773     * @category Math
28774     * @param {number} minuend The first number in a subtraction.
28775     * @param {number} subtrahend The second number in a subtraction.
28776     * @returns {number} Returns the difference.
28777     * @example
28778     *
28779     * _.subtract(6, 4);
28780     * // => 2
28781     */
28782    var subtract = createMathOperation(function(minuend, subtrahend) {
28783      return minuend - subtrahend;
28784    }, 0);
28785
28786    /**
28787     * Computes the sum of the values in `array`.
28788     *
28789     * @static
28790     * @memberOf _
28791     * @since 3.4.0
28792     * @category Math
28793     * @param {Array} array The array to iterate over.
28794     * @returns {number} Returns the sum.
28795     * @example
28796     *
28797     * _.sum([4, 2, 8, 6]);
28798     * // => 20
28799     */
28800    function sum(array) {
28801      return (array && array.length)
28802        ? baseSum(array, identity)
28803        : 0;
28804    }
28805
28806    /**
28807     * This method is like `_.sum` except that it accepts `iteratee` which is
28808     * invoked for each element in `array` to generate the value to be summed.
28809     * The iteratee is invoked with one argument: (value).
28810     *
28811     * @static
28812     * @memberOf _
28813     * @since 4.0.0
28814     * @category Math
28815     * @param {Array} array The array to iterate over.
28816     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
28817     * @returns {number} Returns the sum.
28818     * @example
28819     *
28820     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
28821     *
28822     * _.sumBy(objects, function(o) { return o.n; });
28823     * // => 20
28824     *
28825     * // The `_.property` iteratee shorthand.
28826     * _.sumBy(objects, 'n');
28827     * // => 20
28828     */
28829    function sumBy(array, iteratee) {
28830      return (array && array.length)
28831        ? baseSum(array, getIteratee(iteratee, 2))
28832        : 0;
28833    }
28834
28835    /*------------------------------------------------------------------------*/
28836
28837    // Add methods that return wrapped values in chain sequences.
28838    lodash.after = after;
28839    lodash.ary = ary;
28840    lodash.assign = assign;
28841    lodash.assignIn = assignIn;
28842    lodash.assignInWith = assignInWith;
28843    lodash.assignWith = assignWith;
28844    lodash.at = at;
28845    lodash.before = before;
28846    lodash.bind = bind;
28847    lodash.bindAll = bindAll;
28848    lodash.bindKey = bindKey;
28849    lodash.castArray = castArray;
28850    lodash.chain = chain;
28851    lodash.chunk = chunk;
28852    lodash.compact = compact;
28853    lodash.concat = concat;
28854    lodash.cond = cond;
28855    lodash.conforms = conforms;
28856    lodash.constant = constant;
28857    lodash.countBy = countBy;
28858    lodash.create = create;
28859    lodash.curry = curry;
28860    lodash.curryRight = curryRight;
28861    lodash.debounce = debounce;
28862    lodash.defaults = defaults;
28863    lodash.defaultsDeep = defaultsDeep;
28864    lodash.defer = defer;
28865    lodash.delay = delay;
28866    lodash.difference = difference;
28867    lodash.differenceBy = differenceBy;
28868    lodash.differenceWith = differenceWith;
28869    lodash.drop = drop;
28870    lodash.dropRight = dropRight;
28871    lodash.dropRightWhile = dropRightWhile;
28872    lodash.dropWhile = dropWhile;
28873    lodash.fill = fill;
28874    lodash.filter = filter;
28875    lodash.flatMap = flatMap;
28876    lodash.flatMapDeep = flatMapDeep;
28877    lodash.flatMapDepth = flatMapDepth;
28878    lodash.flatten = flatten;
28879    lodash.flattenDeep = flattenDeep;
28880    lodash.flattenDepth = flattenDepth;
28881    lodash.flip = flip;
28882    lodash.flow = flow;
28883    lodash.flowRight = flowRight;
28884    lodash.fromPairs = fromPairs;
28885    lodash.functions = functions;
28886    lodash.functionsIn = functionsIn;
28887    lodash.groupBy = groupBy;
28888    lodash.initial = initial;
28889    lodash.intersection = intersection;
28890    lodash.intersectionBy = intersectionBy;
28891    lodash.intersectionWith = intersectionWith;
28892    lodash.invert = invert;
28893    lodash.invertBy = invertBy;
28894    lodash.invokeMap = invokeMap;
28895    lodash.iteratee = iteratee;
28896    lodash.keyBy = keyBy;
28897    lodash.keys = keys;
28898    lodash.keysIn = keysIn;
28899    lodash.map = map;
28900    lodash.mapKeys = mapKeys;
28901    lodash.mapValues = mapValues;
28902    lodash.matches = matches;
28903    lodash.matchesProperty = matchesProperty;
28904    lodash.memoize = memoize;
28905    lodash.merge = merge;
28906    lodash.mergeWith = mergeWith;
28907    lodash.method = method;
28908    lodash.methodOf = methodOf;
28909    lodash.mixin = mixin;
28910    lodash.negate = negate;
28911    lodash.nthArg = nthArg;
28912    lodash.omit = omit;
28913    lodash.omitBy = omitBy;
28914    lodash.once = once;
28915    lodash.orderBy = orderBy;
28916    lodash.over = over;
28917    lodash.overArgs = overArgs;
28918    lodash.overEvery = overEvery;
28919    lodash.overSome = overSome;
28920    lodash.partial = partial;
28921    lodash.partialRight = partialRight;
28922    lodash.partition = partition;
28923    lodash.pick = pick;
28924    lodash.pickBy = pickBy;
28925    lodash.property = property;
28926    lodash.propertyOf = propertyOf;
28927    lodash.pull = pull;
28928    lodash.pullAll = pullAll;
28929    lodash.pullAllBy = pullAllBy;
28930    lodash.pullAllWith = pullAllWith;
28931    lodash.pullAt = pullAt;
28932    lodash.range = range;
28933    lodash.rangeRight = rangeRight;
28934    lodash.rearg = rearg;
28935    lodash.reject = reject;
28936    lodash.remove = remove;
28937    lodash.rest = rest;
28938    lodash.reverse = reverse;
28939    lodash.sampleSize = sampleSize;
28940    lodash.set = set;
28941    lodash.setWith = setWith;
28942    lodash.shuffle = shuffle;
28943    lodash.slice = slice;
28944    lodash.sortBy = sortBy;
28945    lodash.sortedUniq = sortedUniq;
28946    lodash.sortedUniqBy = sortedUniqBy;
28947    lodash.split = split;
28948    lodash.spread = spread;
28949    lodash.tail = tail;
28950    lodash.take = take;
28951    lodash.takeRight = takeRight;
28952    lodash.takeRightWhile = takeRightWhile;
28953    lodash.takeWhile = takeWhile;
28954    lodash.tap = tap;
28955    lodash.throttle = throttle;
28956    lodash.thru = thru;
28957    lodash.toArray = toArray;
28958    lodash.toPairs = toPairs;
28959    lodash.toPairsIn = toPairsIn;
28960    lodash.toPath = toPath;
28961    lodash.toPlainObject = toPlainObject;
28962    lodash.transform = transform;
28963    lodash.unary = unary;
28964    lodash.union = union;
28965    lodash.unionBy = unionBy;
28966    lodash.unionWith = unionWith;
28967    lodash.uniq = uniq;
28968    lodash.uniqBy = uniqBy;
28969    lodash.uniqWith = uniqWith;
28970    lodash.unset = unset;
28971    lodash.unzip = unzip;
28972    lodash.unzipWith = unzipWith;
28973    lodash.update = update;
28974    lodash.updateWith = updateWith;
28975    lodash.values = values;
28976    lodash.valuesIn = valuesIn;
28977    lodash.without = without;
28978    lodash.words = words;
28979    lodash.wrap = wrap;
28980    lodash.xor = xor;
28981    lodash.xorBy = xorBy;
28982    lodash.xorWith = xorWith;
28983    lodash.zip = zip;
28984    lodash.zipObject = zipObject;
28985    lodash.zipObjectDeep = zipObjectDeep;
28986    lodash.zipWith = zipWith;
28987
28988    // Add aliases.
28989    lodash.entries = toPairs;
28990    lodash.entriesIn = toPairsIn;
28991    lodash.extend = assignIn;
28992    lodash.extendWith = assignInWith;
28993
28994    // Add methods to `lodash.prototype`.
28995    mixin(lodash, lodash);
28996
28997    /*------------------------------------------------------------------------*/
28998
28999    // Add methods that return unwrapped values in chain sequences.
29000    lodash.add = add;
29001    lodash.attempt = attempt;
29002    lodash.camelCase = camelCase;
29003    lodash.capitalize = capitalize;
29004    lodash.ceil = ceil;
29005    lodash.clamp = clamp;
29006    lodash.clone = clone;
29007    lodash.cloneDeep = cloneDeep;
29008    lodash.cloneDeepWith = cloneDeepWith;
29009    lodash.cloneWith = cloneWith;
29010    lodash.conformsTo = conformsTo;
29011    lodash.deburr = deburr;
29012    lodash.defaultTo = defaultTo;
29013    lodash.divide = divide;
29014    lodash.endsWith = endsWith;
29015    lodash.eq = eq;
29016    lodash.escape = escape;
29017    lodash.escapeRegExp = escapeRegExp;
29018    lodash.every = every;
29019    lodash.find = find;
29020    lodash.findIndex = findIndex;
29021    lodash.findKey = findKey;
29022    lodash.findLast = findLast;
29023    lodash.findLastIndex = findLastIndex;
29024    lodash.findLastKey = findLastKey;
29025    lodash.floor = floor;
29026    lodash.forEach = forEach;
29027    lodash.forEachRight = forEachRight;
29028    lodash.forIn = forIn;
29029    lodash.forInRight = forInRight;
29030    lodash.forOwn = forOwn;
29031    lodash.forOwnRight = forOwnRight;
29032    lodash.get = get;
29033    lodash.gt = gt;
29034    lodash.gte = gte;
29035    lodash.has = has;
29036    lodash.hasIn = hasIn;
29037    lodash.head = head;
29038    lodash.identity = identity;
29039    lodash.includes = includes;
29040    lodash.indexOf = indexOf;
29041    lodash.inRange = inRange;
29042    lodash.invoke = invoke;
29043    lodash.isArguments = isArguments;
29044    lodash.isArray = isArray;
29045    lodash.isArrayBuffer = isArrayBuffer;
29046    lodash.isArrayLike = isArrayLike;
29047    lodash.isArrayLikeObject = isArrayLikeObject;
29048    lodash.isBoolean = isBoolean;
29049    lodash.isBuffer = isBuffer;
29050    lodash.isDate = isDate;
29051    lodash.isElement = isElement;
29052    lodash.isEmpty = isEmpty;
29053    lodash.isEqual = isEqual;
29054    lodash.isEqualWith = isEqualWith;
29055    lodash.isError = isError;
29056    lodash.isFinite = isFinite;
29057    lodash.isFunction = isFunction;
29058    lodash.isInteger = isInteger;
29059    lodash.isLength = isLength;
29060    lodash.isMap = isMap;
29061    lodash.isMatch = isMatch;
29062    lodash.isMatchWith = isMatchWith;
29063    lodash.isNaN = isNaN;
29064    lodash.isNative = isNative;
29065    lodash.isNil = isNil;
29066    lodash.isNull = isNull;
29067    lodash.isNumber = isNumber;
29068    lodash.isObject = isObject;
29069    lodash.isObjectLike = isObjectLike;
29070    lodash.isPlainObject = isPlainObject;
29071    lodash.isRegExp = isRegExp;
29072    lodash.isSafeInteger = isSafeInteger;
29073    lodash.isSet = isSet;
29074    lodash.isString = isString;
29075    lodash.isSymbol = isSymbol;
29076    lodash.isTypedArray = isTypedArray;
29077    lodash.isUndefined = isUndefined;
29078    lodash.isWeakMap = isWeakMap;
29079    lodash.isWeakSet = isWeakSet;
29080    lodash.join = join;
29081    lodash.kebabCase = kebabCase;
29082    lodash.last = last;
29083    lodash.lastIndexOf = lastIndexOf;
29084    lodash.lowerCase = lowerCase;
29085    lodash.lowerFirst = lowerFirst;
29086    lodash.lt = lt;
29087    lodash.lte = lte;
29088    lodash.max = max;
29089    lodash.maxBy = maxBy;
29090    lodash.mean = mean;
29091    lodash.meanBy = meanBy;
29092    lodash.min = min;
29093    lodash.minBy = minBy;
29094    lodash.stubArray = stubArray;
29095    lodash.stubFalse = stubFalse;
29096    lodash.stubObject = stubObject;
29097    lodash.stubString = stubString;
29098    lodash.stubTrue = stubTrue;
29099    lodash.multiply = multiply;
29100    lodash.nth = nth;
29101    lodash.noConflict = noConflict;
29102    lodash.noop = noop;
29103    lodash.now = now;
29104    lodash.pad = pad;
29105    lodash.padEnd = padEnd;
29106    lodash.padStart = padStart;
29107    lodash.parseInt = parseInt;
29108    lodash.random = random;
29109    lodash.reduce = reduce;
29110    lodash.reduceRight = reduceRight;
29111    lodash.repeat = repeat;
29112    lodash.replace = replace;
29113    lodash.result = result;
29114    lodash.round = round;
29115    lodash.runInContext = runInContext;
29116    lodash.sample = sample;
29117    lodash.size = size;
29118    lodash.snakeCase = snakeCase;
29119    lodash.some = some;
29120    lodash.sortedIndex = sortedIndex;
29121    lodash.sortedIndexBy = sortedIndexBy;
29122    lodash.sortedIndexOf = sortedIndexOf;
29123    lodash.sortedLastIndex = sortedLastIndex;
29124    lodash.sortedLastIndexBy = sortedLastIndexBy;
29125    lodash.sortedLastIndexOf = sortedLastIndexOf;
29126    lodash.startCase = startCase;
29127    lodash.startsWith = startsWith;
29128    lodash.subtract = subtract;
29129    lodash.sum = sum;
29130    lodash.sumBy = sumBy;
29131    lodash.template = template;
29132    lodash.times = times;
29133    lodash.toFinite = toFinite;
29134    lodash.toInteger = toInteger;
29135    lodash.toLength = toLength;
29136    lodash.toLower = toLower;
29137    lodash.toNumber = toNumber;
29138    lodash.toSafeInteger = toSafeInteger;
29139    lodash.toString = toString;
29140    lodash.toUpper = toUpper;
29141    lodash.trim = trim;
29142    lodash.trimEnd = trimEnd;
29143    lodash.trimStart = trimStart;
29144    lodash.truncate = truncate;
29145    lodash.unescape = unescape;
29146    lodash.uniqueId = uniqueId;
29147    lodash.upperCase = upperCase;
29148    lodash.upperFirst = upperFirst;
29149
29150    // Add aliases.
29151    lodash.each = forEach;
29152    lodash.eachRight = forEachRight;
29153    lodash.first = head;
29154
29155    mixin(lodash, (function() {
29156      var source = {};
29157      baseForOwn(lodash, function(func, methodName) {
29158        if (!hasOwnProperty.call(lodash.prototype, methodName)) {
29159          source[methodName] = func;
29160        }
29161      });
29162      return source;
29163    }()), { 'chain': false });
29164
29165    /*------------------------------------------------------------------------*/
29166
29167    /**
29168     * The semantic version number.
29169     *
29170     * @static
29171     * @memberOf _
29172     * @type {string}
29173     */
29174    lodash.VERSION = VERSION;
29175
29176    // Assign default placeholders.
29177    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
29178      lodash[methodName].placeholder = lodash;
29179    });
29180
29181    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
29182    arrayEach(['drop', 'take'], function(methodName, index) {
29183      LazyWrapper.prototype[methodName] = function(n) {
29184        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
29185
29186        var result = (this.__filtered__ && !index)
29187          ? new LazyWrapper(this)
29188          : this.clone();
29189
29190        if (result.__filtered__) {
29191          result.__takeCount__ = nativeMin(n, result.__takeCount__);
29192        } else {
29193          result.__views__.push({
29194            'size': nativeMin(n, MAX_ARRAY_LENGTH),
29195            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
29196          });
29197        }
29198        return result;
29199      };
29200
29201      LazyWrapper.prototype[methodName + 'Right'] = function(n) {
29202        return this.reverse()[methodName](n).reverse();
29203      };
29204    });
29205
29206    // Add `LazyWrapper` methods that accept an `iteratee` value.
29207    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
29208      var type = index + 1,
29209          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
29210
29211      LazyWrapper.prototype[methodName] = function(iteratee) {
29212        var result = this.clone();
29213        result.__iteratees__.push({
29214          'iteratee': getIteratee(iteratee, 3),
29215          'type': type
29216        });
29217        result.__filtered__ = result.__filtered__ || isFilter;
29218        return result;
29219      };
29220    });
29221
29222    // Add `LazyWrapper` methods for `_.head` and `_.last`.
29223    arrayEach(['head', 'last'], function(methodName, index) {
29224      var takeName = 'take' + (index ? 'Right' : '');
29225
29226      LazyWrapper.prototype[methodName] = function() {
29227        return this[takeName](1).value()[0];
29228      };
29229    });
29230
29231    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
29232    arrayEach(['initial', 'tail'], function(methodName, index) {
29233      var dropName = 'drop' + (index ? '' : 'Right');
29234
29235      LazyWrapper.prototype[methodName] = function() {
29236        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
29237      };
29238    });
29239
29240    LazyWrapper.prototype.compact = function() {
29241      return this.filter(identity);
29242    };
29243
29244    LazyWrapper.prototype.find = function(predicate) {
29245      return this.filter(predicate).head();
29246    };
29247
29248    LazyWrapper.prototype.findLast = function(predicate) {
29249      return this.reverse().find(predicate);
29250    };
29251
29252    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
29253      if (typeof path == 'function') {
29254        return new LazyWrapper(this);
29255      }
29256      return this.map(function(value) {
29257        return baseInvoke(value, path, args);
29258      });
29259    });
29260
29261    LazyWrapper.prototype.reject = function(predicate) {
29262      return this.filter(negate(getIteratee(predicate)));
29263    };
29264
29265    LazyWrapper.prototype.slice = function(start, end) {
29266      start = toInteger(start);
29267
29268      var result = this;
29269      if (result.__filtered__ && (start > 0 || end < 0)) {
29270        return new LazyWrapper(result);
29271      }
29272      if (start < 0) {
29273        result = result.takeRight(-start);
29274      } else if (start) {
29275        result = result.drop(start);
29276      }
29277      if (end !== undefined) {
29278        end = toInteger(end);
29279        result = end < 0 ? result.dropRight(-end) : result.take(end - start);
29280      }
29281      return result;
29282    };
29283
29284    LazyWrapper.prototype.takeRightWhile = function(predicate) {
29285      return this.reverse().takeWhile(predicate).reverse();
29286    };
29287
29288    LazyWrapper.prototype.toArray = function() {
29289      return this.take(MAX_ARRAY_LENGTH);
29290    };
29291
29292    // Add `LazyWrapper` methods to `lodash.prototype`.
29293    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
29294      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
29295          isTaker = /^(?:head|last)$/.test(methodName),
29296          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
29297          retUnwrapped = isTaker || /^find/.test(methodName);
29298
29299      if (!lodashFunc) {
29300        return;
29301      }
29302      lodash.prototype[methodName] = function() {
29303        var value = this.__wrapped__,
29304            args = isTaker ? [1] : arguments,
29305            isLazy = value instanceof LazyWrapper,
29306            iteratee = args[0],
29307            useLazy = isLazy || isArray(value);
29308
29309        var interceptor = function(value) {
29310          var result = lodashFunc.apply(lodash, arrayPush([value], args));
29311          return (isTaker && chainAll) ? result[0] : result;
29312        };
29313
29314        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
29315          // Avoid lazy use if the iteratee has a "length" value other than `1`.
29316          isLazy = useLazy = false;
29317        }
29318        var chainAll = this.__chain__,
29319            isHybrid = !!this.__actions__.length,
29320            isUnwrapped = retUnwrapped && !chainAll,
29321            onlyLazy = isLazy && !isHybrid;
29322
29323        if (!retUnwrapped && useLazy) {
29324          value = onlyLazy ? value : new LazyWrapper(this);
29325          var result = func.apply(value, args);
29326          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
29327          return new LodashWrapper(result, chainAll);
29328        }
29329        if (isUnwrapped && onlyLazy) {
29330          return func.apply(this, args);
29331        }
29332        result = this.thru(interceptor);
29333        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
29334      };
29335    });
29336
29337    // Add `Array` methods to `lodash.prototype`.
29338    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
29339      var func = arrayProto[methodName],
29340          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
29341          retUnwrapped = /^(?:pop|shift)$/.test(methodName);
29342
29343      lodash.prototype[methodName] = function() {
29344        var args = arguments;
29345        if (retUnwrapped && !this.__chain__) {
29346          var value = this.value();
29347          return func.apply(isArray(value) ? value : [], args);
29348        }
29349        return this[chainName](function(value) {
29350          return func.apply(isArray(value) ? value : [], args);
29351        });
29352      };
29353    });
29354
29355    // Map minified method names to their real names.
29356    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
29357      var lodashFunc = lodash[methodName];
29358      if (lodashFunc) {
29359        var key = lodashFunc.name + '';
29360        if (!hasOwnProperty.call(realNames, key)) {
29361          realNames[key] = [];
29362        }
29363        realNames[key].push({ 'name': methodName, 'func': lodashFunc });
29364      }
29365    });
29366
29367    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
29368      'name': 'wrapper',
29369      'func': undefined
29370    }];
29371
29372    // Add methods to `LazyWrapper`.
29373    LazyWrapper.prototype.clone = lazyClone;
29374    LazyWrapper.prototype.reverse = lazyReverse;
29375    LazyWrapper.prototype.value = lazyValue;
29376
29377    // Add chain sequence methods to the `lodash` wrapper.
29378    lodash.prototype.at = wrapperAt;
29379    lodash.prototype.chain = wrapperChain;
29380    lodash.prototype.commit = wrapperCommit;
29381    lodash.prototype.next = wrapperNext;
29382    lodash.prototype.plant = wrapperPlant;
29383    lodash.prototype.reverse = wrapperReverse;
29384    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
29385
29386    // Add lazy aliases.
29387    lodash.prototype.first = lodash.prototype.head;
29388
29389    if (symIterator) {
29390      lodash.prototype[symIterator] = wrapperToIterator;
29391    }
29392    return lodash;
29393  });
29394
29395  /*--------------------------------------------------------------------------*/
29396
29397  // Export lodash.
29398  var _ = runInContext();
29399
29400  // Some AMD build optimizers, like r.js, check for condition patterns like:
29401  if (true) {
29402    // Expose Lodash on the global object to prevent errors when Lodash is
29403    // loaded by a script tag in the presence of an AMD loader.
29404    // See http://requirejs.org/docs/errors.html#mismatch for more details.
29405    // Use `_.noConflict` to remove Lodash from the global object.
29406    root._ = _;
29407
29408    // Define as an anonymous module so, through path mapping, it can be
29409    // referenced as the "underscore" module.
29410    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
29411      return _;
29412    }).call(exports, __webpack_require__, exports, module),
29413		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
29414  }
29415  // Check for `exports` after `define` in case a build optimizer adds it.
29416  else {}
29417}.call(this));
29418
29419
29420/***/ }),
29421
29422/***/ "./resources/sass/app.scss":
29423/*!*********************************!*\
29424  !*** ./resources/sass/app.scss ***!
29425  \*********************************/
29426/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29427
29428"use strict";
29429__webpack_require__.r(__webpack_exports__);
29430// extracted by mini-css-extract-plugin
29431
29432
29433/***/ }),
29434
29435/***/ "./resources/css/app.css":
29436/*!*******************************!*\
29437  !*** ./resources/css/app.css ***!
29438  \*******************************/
29439/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29440
29441"use strict";
29442__webpack_require__.r(__webpack_exports__);
29443// extracted by mini-css-extract-plugin
29444
29445
29446/***/ }),
29447
vendor: 5,636 bytes, lines 29448-29641
29448/***/ "./node_modules/process/browser.js":
29449/*!*****************************************!*\
29450  !*** ./node_modules/process/browser.js ***!
29451  \*****************************************/
29452/***/ ((module) => {
29453
29454// shim for using process in browser
29455var process = module.exports = {};
29456
29457// cached from whatever global is present so that test runners that stub it
29458// don't break things.  But we need to wrap it in a try catch in case it is
29459// wrapped in strict mode code which doesn't define any globals.  It's inside a
29460// function because try/catches deoptimize in certain engines.
29461
29462var cachedSetTimeout;
29463var cachedClearTimeout;
29464
29465function defaultSetTimout() {
29466    throw new Error('setTimeout has not been defined');
29467}
29468function defaultClearTimeout () {
29469    throw new Error('clearTimeout has not been defined');
29470}
29471(function () {
29472    try {
29473        if (typeof setTimeout === 'function') {
29474            cachedSetTimeout = setTimeout;
29475        } else {
29476            cachedSetTimeout = defaultSetTimout;
29477        }
29478    } catch (e) {
29479        cachedSetTimeout = defaultSetTimout;
29480    }
29481    try {
29482        if (typeof clearTimeout === 'function') {
29483            cachedClearTimeout = clearTimeout;
29484        } else {
29485            cachedClearTimeout = defaultClearTimeout;
29486        }
29487    } catch (e) {
29488        cachedClearTimeout = defaultClearTimeout;
29489    }
29490} ())
29491function runTimeout(fun) {
29492    if (cachedSetTimeout === setTimeout) {
29493        //normal enviroments in sane situations
29494        return setTimeout(fun, 0);
29495    }
29496    // if setTimeout wasn't available but was latter defined
29497    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
29498        cachedSetTimeout = setTimeout;
29499        return setTimeout(fun, 0);
29500    }
29501    try {
29502        // when when somebody has screwed with setTimeout but no I.E. maddness
29503        return cachedSetTimeout(fun, 0);
29504    } catch(e){
29505        try {
29506            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
29507            return cachedSetTimeout.call(null, fun, 0);
29508        } catch(e){
29509            // 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
29510            return cachedSetTimeout.call(this, fun, 0);
29511        }
29512    }
29513
29514
29515}
29516function runClearTimeout(marker) {
29517    if (cachedClearTimeout === clearTimeout) {
29518        //normal enviroments in sane situations
29519        return clearTimeout(marker);
29520    }
29521    // if clearTimeout wasn't available but was latter defined
29522    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
29523        cachedClearTimeout = clearTimeout;
29524        return clearTimeout(marker);
29525    }
29526    try {
29527        // when when somebody has screwed with setTimeout but no I.E. maddness
29528        return cachedClearTimeout(marker);
29529    } catch (e){
29530        try {
29531            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
29532            return cachedClearTimeout.call(null, marker);
29533        } catch (e){
29534            // 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.
29535            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
29536            return cachedClearTimeout.call(this, marker);
29537        }
29538    }
29539
29540
29541
29542}
29543var queue = [];
29544var draining = false;
29545var currentQueue;
29546var queueIndex = -1;
29547
29548function cleanUpNextTick() {
29549    if (!draining || !currentQueue) {
29550        return;
29551    }
29552    draining = false;
29553    if (currentQueue.length) {
29554        queue = currentQueue.concat(queue);
29555    } else {
29556        queueIndex = -1;
29557    }
29558    if (queue.length) {
29559        drainQueue();
29560    }
29561}
29562
29563function drainQueue() {
29564    if (draining) {
29565        return;
29566    }
29567    var timeout = runTimeout(cleanUpNextTick);
29568    draining = true;
29569
29570    var len = queue.length;
29571    while(len) {
29572        currentQueue = queue;
29573        queue = [];
29574        while (++queueIndex < len) {
29575            if (currentQueue) {
29576                currentQueue[queueIndex].run();
29577            }
29578        }
29579        queueIndex = -1;
29580        len = queue.length;
29581    }
29582    currentQueue = null;
29583    draining = false;
29584    runClearTimeout(timeout);
29585}
29586
29587process.nextTick = function (fun) {
29588    var args = new Array(arguments.length - 1);
29589    if (arguments.length > 1) {
29590        for (var i = 1; i < arguments.length; i++) {
29591            args[i - 1] = arguments[i];
29592        }
29593    }
29594    queue.push(new Item(fun, args));
29595    if (queue.length === 1 && !draining) {
29596        runTimeout(drainQueue);
29597    }
29598};
29599
29600// v8 likes predictible objects
29601function Item(fun, array) {
29602    this.fun = fun;
29603    this.array = array;
29604}
29605Item.prototype.run = function () {
29606    this.fun.apply(null, this.array);
29607};
29608process.title = 'browser';
29609process.browser = true;
29610process.env = {};
29611process.argv = [];
29612process.version = ''; // empty string to avoid regexp issues
29613process.versions = {};
29614
29615function noop() {}
29616
29617process.on = noop;
29618process.addListener = noop;
29619process.once = noop;
29620process.off = noop;
29621process.removeListener = noop;
29622process.removeAllListeners = noop;
29623process.emit = noop;
29624process.prependListener = noop;
29625process.prependOnceListener = noop;
29626
29627process.listeners = function (name) { return [] }
29628
29629process.binding = function (name) {
29630    throw new Error('process.binding is not supported');
29631};
29632
29633process.cwd = function () { return '/' };
29634process.chdir = function (dir) {
29635    throw new Error('process.chdir is not supported');
29636};
29637process.umask = function() { return 0; };
29638
29639
29640/***/ }),
29641
vendor: 171,113 bytes, lines 29642-34555
29642/***/ "./node_modules/pusher-js/dist/web/pusher.js":
29643/*!***************************************************!*\
29644  !*** ./node_modules/pusher-js/dist/web/pusher.js ***!
29645  \***************************************************/
29646/***/ ((module) => {
29647
29648/*!
29649 * Pusher JavaScript Library v7.4.0
29650 * https://pusher.com/
29651 *
29652 * Copyright 2020, Pusher
29653 * Released under the MIT licence.
29654 */
29655
29656(function webpackUniversalModuleDefinition(root, factory) {
29657	if(true)
29658		module.exports = factory();
29659	else {}
29660})(window, function() {
29661return /******/ (function(modules) { // webpackBootstrap
29662/******/ 	// The module cache
29663/******/ 	var installedModules = {};
29664/******/
29665/******/ 	// The require function
29666/******/ 	function __nested_webpack_require_669__(moduleId) {
29667/******/
29668/******/ 		// Check if module is in cache
29669/******/ 		if(installedModules[moduleId]) {
29670/******/ 			return installedModules[moduleId].exports;
29671/******/ 		}
29672/******/ 		// Create a new module (and put it into the cache)
29673/******/ 		var module = installedModules[moduleId] = {
29674/******/ 			i: moduleId,
29675/******/ 			l: false,
29676/******/ 			exports: {}
29677/******/ 		};
29678/******/
29679/******/ 		// Execute the module function
29680/******/ 		modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_669__);
29681/******/
29682/******/ 		// Flag the module as loaded
29683/******/ 		module.l = true;
29684/******/
29685/******/ 		// Return the exports of the module
29686/******/ 		return module.exports;
29687/******/ 	}
29688/******/
29689/******/
29690/******/ 	// expose the modules object (__webpack_modules__)
29691/******/ 	__nested_webpack_require_669__.m = modules;
29692/******/
29693/******/ 	// expose the module cache
29694/******/ 	__nested_webpack_require_669__.c = installedModules;
29695/******/
29696/******/ 	// define getter function for harmony exports
29697/******/ 	__nested_webpack_require_669__.d = function(exports, name, getter) {
29698/******/ 		if(!__nested_webpack_require_669__.o(exports, name)) {
29699/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
29700/******/ 		}
29701/******/ 	};
29702/******/
29703/******/ 	// define __esModule on exports
29704/******/ 	__nested_webpack_require_669__.r = function(exports) {
29705/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
29706/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
29707/******/ 		}
29708/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
29709/******/ 	};
29710/******/
29711/******/ 	// create a fake namespace object
29712/******/ 	// mode & 1: value is a module id, require it
29713/******/ 	// mode & 2: merge all properties of value into the ns
29714/******/ 	// mode & 4: return value when already ns object
29715/******/ 	// mode & 8|1: behave like require
29716/******/ 	__nested_webpack_require_669__.t = function(value, mode) {
29717/******/ 		if(mode & 1) value = __nested_webpack_require_669__(value);
29718/******/ 		if(mode & 8) return value;
29719/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
29720/******/ 		var ns = Object.create(null);
29721/******/ 		__nested_webpack_require_669__.r(ns);
29722/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
29723/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __nested_webpack_require_669__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
29724/******/ 		return ns;
29725/******/ 	};
29726/******/
29727/******/ 	// getDefaultExport function for compatibility with non-harmony modules
29728/******/ 	__nested_webpack_require_669__.n = function(module) {
29729/******/ 		var getter = module && module.__esModule ?
29730/******/ 			function getDefault() { return module['default']; } :
29731/******/ 			function getModuleExports() { return module; };
29732/******/ 		__nested_webpack_require_669__.d(getter, 'a', getter);
29733/******/ 		return getter;
29734/******/ 	};
29735/******/
29736/******/ 	// Object.prototype.hasOwnProperty.call
29737/******/ 	__nested_webpack_require_669__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
29738/******/
29739/******/ 	// __webpack_public_path__
29740/******/ 	__nested_webpack_require_669__.p = "";
29741/******/
29742/******/
29743/******/ 	// Load entry module and return exports
29744/******/ 	return __nested_webpack_require_669__(__nested_webpack_require_669__.s = 2);
29745/******/ })
29746/************************************************************************/
29747/******/ ([
29748/* 0 */
29749/***/ (function(module, exports, __webpack_require__) {
29750
29751"use strict";
29752
29753// Copyright (C) 2016 Dmitry Chestnykh
29754// MIT License. See LICENSE file for details.
29755var __extends = (this && this.__extends) || (function () {
29756    var extendStatics = function (d, b) {
29757        extendStatics = Object.setPrototypeOf ||
29758            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29759            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
29760        return extendStatics(d, b);
29761    };
29762    return function (d, b) {
29763        extendStatics(d, b);
29764        function __() { this.constructor = d; }
29765        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29766    };
29767})();
29768Object.defineProperty(exports, "__esModule", { value: true });
29769/**
29770 * Package base64 implements Base64 encoding and decoding.
29771 */
29772// Invalid character used in decoding to indicate
29773// that the character to decode is out of range of
29774// alphabet and cannot be decoded.
29775var INVALID_BYTE = 256;
29776/**
29777 * Implements standard Base64 encoding.
29778 *
29779 * Operates in constant time.
29780 */
29781var Coder = /** @class */ (function () {
29782    // TODO(dchest): methods to encode chunk-by-chunk.
29783    function Coder(_paddingCharacter) {
29784        if (_paddingCharacter === void 0) { _paddingCharacter = "="; }
29785        this._paddingCharacter = _paddingCharacter;
29786    }
29787    Coder.prototype.encodedLength = function (length) {
29788        if (!this._paddingCharacter) {
29789            return (length * 8 + 5) / 6 | 0;
29790        }
29791        return (length + 2) / 3 * 4 | 0;
29792    };
29793    Coder.prototype.encode = function (data) {
29794        var out = "";
29795        var i = 0;
29796        for (; i < data.length - 2; i += 3) {
29797            var c = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);
29798            out += this._encodeByte((c >>> 3 * 6) & 63);
29799            out += this._encodeByte((c >>> 2 * 6) & 63);
29800            out += this._encodeByte((c >>> 1 * 6) & 63);
29801            out += this._encodeByte((c >>> 0 * 6) & 63);
29802        }
29803        var left = data.length - i;
29804        if (left > 0) {
29805            var c = (data[i] << 16) | (left === 2 ? data[i + 1] << 8 : 0);
29806            out += this._encodeByte((c >>> 3 * 6) & 63);
29807            out += this._encodeByte((c >>> 2 * 6) & 63);
29808            if (left === 2) {
29809                out += this._encodeByte((c >>> 1 * 6) & 63);
29810            }
29811            else {
29812                out += this._paddingCharacter || "";
29813            }
29814            out += this._paddingCharacter || "";
29815        }
29816        return out;
29817    };
29818    Coder.prototype.maxDecodedLength = function (length) {
29819        if (!this._paddingCharacter) {
29820            return (length * 6 + 7) / 8 | 0;
29821        }
29822        return length / 4 * 3 | 0;
29823    };
29824    Coder.prototype.decodedLength = function (s) {
29825        return this.maxDecodedLength(s.length - this._getPaddingLength(s));
29826    };
29827    Coder.prototype.decode = function (s) {
29828        if (s.length === 0) {
29829            return new Uint8Array(0);
29830        }
29831        var paddingLength = this._getPaddingLength(s);
29832        var length = s.length - paddingLength;
29833        var out = new Uint8Array(this.maxDecodedLength(length));
29834        var op = 0;
29835        var i = 0;
29836        var haveBad = 0;
29837        var v0 = 0, v1 = 0, v2 = 0, v3 = 0;
29838        for (; i < length - 4; i += 4) {
29839            v0 = this._decodeChar(s.charCodeAt(i + 0));
29840            v1 = this._decodeChar(s.charCodeAt(i + 1));
29841            v2 = this._decodeChar(s.charCodeAt(i + 2));
29842            v3 = this._decodeChar(s.charCodeAt(i + 3));
29843            out[op++] = (v0 << 2) | (v1 >>> 4);
29844            out[op++] = (v1 << 4) | (v2 >>> 2);
29845            out[op++] = (v2 << 6) | v3;
29846            haveBad |= v0 & INVALID_BYTE;
29847            haveBad |= v1 & INVALID_BYTE;
29848            haveBad |= v2 & INVALID_BYTE;
29849            haveBad |= v3 & INVALID_BYTE;
29850        }
29851        if (i < length - 1) {
29852            v0 = this._decodeChar(s.charCodeAt(i));
29853            v1 = this._decodeChar(s.charCodeAt(i + 1));
29854            out[op++] = (v0 << 2) | (v1 >>> 4);
29855            haveBad |= v0 & INVALID_BYTE;
29856            haveBad |= v1 & INVALID_BYTE;
29857        }
29858        if (i < length - 2) {
29859            v2 = this._decodeChar(s.charCodeAt(i + 2));
29860            out[op++] = (v1 << 4) | (v2 >>> 2);
29861            haveBad |= v2 & INVALID_BYTE;
29862        }
29863        if (i < length - 3) {
29864            v3 = this._decodeChar(s.charCodeAt(i + 3));
29865            out[op++] = (v2 << 6) | v3;
29866            haveBad |= v3 & INVALID_BYTE;
29867        }
29868        if (haveBad !== 0) {
29869            throw new Error("Base64Coder: incorrect characters for decoding");
29870        }
29871        return out;
29872    };
29873    // Standard encoding have the following encoded/decoded ranges,
29874    // which we need to convert between.
29875    //
29876    // ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789  +   /
29877    // Index:   0 - 25                    26 - 51              52 - 61   62  63
29878    // ASCII:  65 - 90                    97 - 122             48 - 57   43  47
29879    //
29880    // Encode 6 bits in b into a new character.
29881    Coder.prototype._encodeByte = function (b) {
29882        // Encoding uses constant time operations as follows:
29883        //
29884        // 1. Define comparison of A with B using (A - B) >>> 8:
29885        //          if A > B, then result is positive integer
29886        //          if A <= B, then result is 0
29887        //
29888        // 2. Define selection of C or 0 using bitwise AND: X & C:
29889        //          if X == 0, then result is 0
29890        //          if X != 0, then result is C
29891        //
29892        // 3. Start with the smallest comparison (b >= 0), which is always
29893        //    true, so set the result to the starting ASCII value (65).
29894        //
29895        // 4. Continue comparing b to higher ASCII values, and selecting
29896        //    zero if comparison isn't true, otherwise selecting a value
29897        //    to add to result, which:
29898        //
29899        //          a) undoes the previous addition
29900        //          b) provides new value to add
29901        //
29902        var result = b;
29903        // b >= 0
29904        result += 65;
29905        // b > 25
29906        result += ((25 - b) >>> 8) & ((0 - 65) - 26 + 97);
29907        // b > 51
29908        result += ((51 - b) >>> 8) & ((26 - 97) - 52 + 48);
29909        // b > 61
29910        result += ((61 - b) >>> 8) & ((52 - 48) - 62 + 43);
29911        // b > 62
29912        result += ((62 - b) >>> 8) & ((62 - 43) - 63 + 47);
29913        return String.fromCharCode(result);
29914    };
29915    // Decode a character code into a byte.
29916    // Must return 256 if character is out of alphabet range.
29917    Coder.prototype._decodeChar = function (c) {
29918        // Decoding works similar to encoding: using the same comparison
29919        // function, but now it works on ranges: result is always incremented
29920        // by value, but this value becomes zero if the range is not
29921        // satisfied.
29922        //
29923        // Decoding starts with invalid value, 256, which is then
29924        // subtracted when the range is satisfied. If none of the ranges
29925        // apply, the function returns 256, which is then checked by
29926        // the caller to throw error.
29927        var result = INVALID_BYTE; // start with invalid character
29928        // c == 43 (c > 42 and c < 44)
29929        result += (((42 - c) & (c - 44)) >>> 8) & (-INVALID_BYTE + c - 43 + 62);
29930        // c == 47 (c > 46 and c < 48)
29931        result += (((46 - c) & (c - 48)) >>> 8) & (-INVALID_BYTE + c - 47 + 63);
29932        // c > 47 and c < 58
29933        result += (((47 - c) & (c - 58)) >>> 8) & (-INVALID_BYTE + c - 48 + 52);
29934        // c > 64 and c < 91
29935        result += (((64 - c) & (c - 91)) >>> 8) & (-INVALID_BYTE + c - 65 + 0);
29936        // c > 96 and c < 123
29937        result += (((96 - c) & (c - 123)) >>> 8) & (-INVALID_BYTE + c - 97 + 26);
29938        return result;
29939    };
29940    Coder.prototype._getPaddingLength = function (s) {
29941        var paddingLength = 0;
29942        if (this._paddingCharacter) {
29943            for (var i = s.length - 1; i >= 0; i--) {
29944                if (s[i] !== this._paddingCharacter) {
29945                    break;
29946                }
29947                paddingLength++;
29948            }
29949            if (s.length < 4 || paddingLength > 2) {
29950                throw new Error("Base64Coder: incorrect padding");
29951            }
29952        }
29953        return paddingLength;
29954    };
29955    return Coder;
29956}());
29957exports.Coder = Coder;
29958var stdCoder = new Coder();
29959function encode(data) {
29960    return stdCoder.encode(data);
29961}
29962exports.encode = encode;
29963function decode(s) {
29964    return stdCoder.decode(s);
29965}
29966exports.decode = decode;
29967/**
29968 * Implements URL-safe Base64 encoding.
29969 * (Same as Base64, but '+' is replaced with '-', and '/' with '_').
29970 *
29971 * Operates in constant time.
29972 */
29973var URLSafeCoder = /** @class */ (function (_super) {
29974    __extends(URLSafeCoder, _super);
29975    function URLSafeCoder() {
29976        return _super !== null && _super.apply(this, arguments) || this;
29977    }
29978    // URL-safe encoding have the following encoded/decoded ranges:
29979    //
29980    // ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789  -   _
29981    // Index:   0 - 25                    26 - 51              52 - 61   62  63
29982    // ASCII:  65 - 90                    97 - 122             48 - 57   45  95
29983    //
29984    URLSafeCoder.prototype._encodeByte = function (b) {
29985        var result = b;
29986        // b >= 0
29987        result += 65;
29988        // b > 25
29989        result += ((25 - b) >>> 8) & ((0 - 65) - 26 + 97);
29990        // b > 51
29991        result += ((51 - b) >>> 8) & ((26 - 97) - 52 + 48);
29992        // b > 61
29993        result += ((61 - b) >>> 8) & ((52 - 48) - 62 + 45);
29994        // b > 62
29995        result += ((62 - b) >>> 8) & ((62 - 45) - 63 + 95);
29996        return String.fromCharCode(result);
29997    };
29998    URLSafeCoder.prototype._decodeChar = function (c) {
29999        var result = INVALID_BYTE;
30000        // c == 45 (c > 44 and c < 46)
30001        result += (((44 - c) & (c - 46)) >>> 8) & (-INVALID_BYTE + c - 45 + 62);
30002        // c == 95 (c > 94 and c < 96)
30003        result += (((94 - c) & (c - 96)) >>> 8) & (-INVALID_BYTE + c - 95 + 63);
30004        // c > 47 and c < 58
30005        result += (((47 - c) & (c - 58)) >>> 8) & (-INVALID_BYTE + c - 48 + 52);
30006        // c > 64 and c < 91
30007        result += (((64 - c) & (c - 91)) >>> 8) & (-INVALID_BYTE + c - 65 + 0);
30008        // c > 96 and c < 123
30009        result += (((96 - c) & (c - 123)) >>> 8) & (-INVALID_BYTE + c - 97 + 26);
30010        return result;
30011    };
30012    return URLSafeCoder;
30013}(Coder));
30014exports.URLSafeCoder = URLSafeCoder;
30015var urlSafeCoder = new URLSafeCoder();
30016function encodeURLSafe(data) {
30017    return urlSafeCoder.encode(data);
30018}
30019exports.encodeURLSafe = encodeURLSafe;
30020function decodeURLSafe(s) {
30021    return urlSafeCoder.decode(s);
30022}
30023exports.decodeURLSafe = decodeURLSafe;
30024exports.encodedLength = function (length) {
30025    return stdCoder.encodedLength(length);
30026};
30027exports.maxDecodedLength = function (length) {
30028    return stdCoder.maxDecodedLength(length);
30029};
30030exports.decodedLength = function (s) {
30031    return stdCoder.decodedLength(s);
30032};
30033
30034
30035/***/ }),
30036/* 1 */
30037/***/ (function(module, exports, __webpack_require__) {
30038
30039"use strict";
30040
30041// Copyright (C) 2016 Dmitry Chestnykh
30042// MIT License. See LICENSE file for details.
30043Object.defineProperty(exports, "__esModule", { value: true });
30044/**
30045 * Package utf8 implements UTF-8 encoding and decoding.
30046 */
30047var INVALID_UTF16 = "utf8: invalid string";
30048var INVALID_UTF8 = "utf8: invalid source encoding";
30049/**
30050 * Encodes the given string into UTF-8 byte array.
30051 * Throws if the source string has invalid UTF-16 encoding.
30052 */
30053function encode(s) {
30054    // Calculate result length and allocate output array.
30055    // encodedLength() also validates string and throws errors,
30056    // so we don't need repeat validation here.
30057    var arr = new Uint8Array(encodedLength(s));
30058    var pos = 0;
30059    for (var i = 0; i < s.length; i++) {
30060        var c = s.charCodeAt(i);
30061        if (c < 0x80) {
30062            arr[pos++] = c;
30063        }
30064        else if (c < 0x800) {
30065            arr[pos++] = 0xc0 | c >> 6;
30066            arr[pos++] = 0x80 | c & 0x3f;
30067        }
30068        else if (c < 0xd800) {
30069            arr[pos++] = 0xe0 | c >> 12;
30070            arr[pos++] = 0x80 | (c >> 6) & 0x3f;
30071            arr[pos++] = 0x80 | c & 0x3f;
30072        }
30073        else {
30074            i++; // get one more character
30075            c = (c & 0x3ff) << 10;
30076            c |= s.charCodeAt(i) & 0x3ff;
30077            c += 0x10000;
30078            arr[pos++] = 0xf0 | c >> 18;
30079            arr[pos++] = 0x80 | (c >> 12) & 0x3f;
30080            arr[pos++] = 0x80 | (c >> 6) & 0x3f;
30081            arr[pos++] = 0x80 | c & 0x3f;
30082        }
30083    }
30084    return arr;
30085}
30086exports.encode = encode;
30087/**
30088 * Returns the number of bytes required to encode the given string into UTF-8.
30089 * Throws if the source string has invalid UTF-16 encoding.
30090 */
30091function encodedLength(s) {
30092    var result = 0;
30093    for (var i = 0; i < s.length; i++) {
30094        var c = s.charCodeAt(i);
30095        if (c < 0x80) {
30096            result += 1;
30097        }
30098        else if (c < 0x800) {
30099            result += 2;
30100        }
30101        else if (c < 0xd800) {
30102            result += 3;
30103        }
30104        else if (c <= 0xdfff) {
30105            if (i >= s.length - 1) {
30106                throw new Error(INVALID_UTF16);
30107            }
30108            i++; // "eat" next character
30109            result += 4;
30110        }
30111        else {
30112            throw new Error(INVALID_UTF16);
30113        }
30114    }
30115    return result;
30116}
30117exports.encodedLength = encodedLength;
30118/**
30119 * Decodes the given byte array from UTF-8 into a string.
30120 * Throws if encoding is invalid.
30121 */
30122function decode(arr) {
30123    var chars = [];
30124    for (var i = 0; i < arr.length; i++) {
30125        var b = arr[i];
30126        if (b & 0x80) {
30127            var min = void 0;
30128            if (b < 0xe0) {
30129                // Need 1 more byte.
30130                if (i >= arr.length) {
30131                    throw new Error(INVALID_UTF8);
30132                }
30133                var n1 = arr[++i];
30134                if ((n1 & 0xc0) !== 0x80) {
30135                    throw new Error(INVALID_UTF8);
30136                }
30137                b = (b & 0x1f) << 6 | (n1 & 0x3f);
30138                min = 0x80;
30139            }
30140            else if (b < 0xf0) {
30141                // Need 2 more bytes.
30142                if (i >= arr.length - 1) {
30143                    throw new Error(INVALID_UTF8);
30144                }
30145                var n1 = arr[++i];
30146                var n2 = arr[++i];
30147                if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {
30148                    throw new Error(INVALID_UTF8);
30149                }
30150                b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);
30151                min = 0x800;
30152            }
30153            else if (b < 0xf8) {
30154                // Need 3 more bytes.
30155                if (i >= arr.length - 2) {
30156                    throw new Error(INVALID_UTF8);
30157                }
30158                var n1 = arr[++i];
30159                var n2 = arr[++i];
30160                var n3 = arr[++i];
30161                if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {
30162                    throw new Error(INVALID_UTF8);
30163                }
30164                b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);
30165                min = 0x10000;
30166            }
30167            else {
30168                throw new Error(INVALID_UTF8);
30169            }
30170            if (b < min || (b >= 0xd800 && b <= 0xdfff)) {
30171                throw new Error(INVALID_UTF8);
30172            }
30173            if (b >= 0x10000) {
30174                // Surrogate pair.
30175                if (b > 0x10ffff) {
30176                    throw new Error(INVALID_UTF8);
30177                }
30178                b -= 0x10000;
30179                chars.push(String.fromCharCode(0xd800 | (b >> 10)));
30180                b = 0xdc00 | (b & 0x3ff);
30181            }
30182        }
30183        chars.push(String.fromCharCode(b));
30184    }
30185    return chars.join("");
30186}
30187exports.decode = decode;
30188
30189
30190/***/ }),
30191/* 2 */
30192/***/ (function(module, exports, __nested_webpack_require_19901__) {
30193
30194// required so we don't have to do require('pusher').default etc.
30195module.exports = __nested_webpack_require_19901__(3).default;
30196
30197
30198/***/ }),
30199/* 3 */
30200/***/ (function(module, __webpack_exports__, __nested_webpack_require_20105__) {
30201
30202"use strict";
30203// ESM COMPAT FLAG
30204__nested_webpack_require_20105__.r(__webpack_exports__);
30205
30206// CONCATENATED MODULE: ./src/runtimes/web/dom/script_receiver_factory.ts
30207var ScriptReceiverFactory = (function () {
30208    function ScriptReceiverFactory(prefix, name) {
30209        this.lastId = 0;
30210        this.prefix = prefix;
30211        this.name = name;
30212    }
30213    ScriptReceiverFactory.prototype.create = function (callback) {
30214        this.lastId++;
30215        var number = this.lastId;
30216        var id = this.prefix + number;
30217        var name = this.name + '[' + number + ']';
30218        var called = false;
30219        var callbackWrapper = function () {
30220            if (!called) {
30221                callback.apply(null, arguments);
30222                called = true;
30223            }
30224        };
30225        this[number] = callbackWrapper;
30226        return { number: number, id: id, name: name, callback: callbackWrapper };
30227    };
30228    ScriptReceiverFactory.prototype.remove = function (receiver) {
30229        delete this[receiver.number];
30230    };
30231    return ScriptReceiverFactory;
30232}());
30233
30234var ScriptReceivers = new ScriptReceiverFactory('_pusher_script_', 'Pusher.ScriptReceivers');
30235
30236// CONCATENATED MODULE: ./src/core/defaults.ts
30237var Defaults = {
30238    VERSION: "7.4.0",
30239    PROTOCOL: 7,
30240    wsPort: 80,
30241    wssPort: 443,
30242    wsPath: '',
30243    httpHost: 'sockjs.pusher.com',
30244    httpPort: 80,
30245    httpsPort: 443,
30246    httpPath: '/pusher',
30247    stats_host: 'stats.pusher.com',
30248    authEndpoint: '/pusher/auth',
30249    authTransport: 'ajax',
30250    activityTimeout: 120000,
30251    pongTimeout: 30000,
30252    unavailableTimeout: 10000,
30253    cluster: 'mt1',
30254    userAuthentication: {
30255        endpoint: '/pusher/user-auth',
30256        transport: 'ajax'
30257    },
30258    channelAuthorization: {
30259        endpoint: '/pusher/auth',
30260        transport: 'ajax'
30261    },
30262    cdn_http: "http://js.pusher.com",
30263    cdn_https: "https://js.pusher.com",
30264    dependency_suffix: ""
30265};
30266/* harmony default export */ var defaults = (Defaults);
30267
30268// CONCATENATED MODULE: ./src/runtimes/web/dom/dependency_loader.ts
30269
30270
30271var dependency_loader_DependencyLoader = (function () {
30272    function DependencyLoader(options) {
30273        this.options = options;
30274        this.receivers = options.receivers || ScriptReceivers;
30275        this.loading = {};
30276    }
30277    DependencyLoader.prototype.load = function (name, options, callback) {
30278        var self = this;
30279        if (self.loading[name] && self.loading[name].length > 0) {
30280            self.loading[name].push(callback);
30281        }
30282        else {
30283            self.loading[name] = [callback];
30284            var request = runtime.createScriptRequest(self.getPath(name, options));
30285            var receiver = self.receivers.create(function (error) {
30286                self.receivers.remove(receiver);
30287                if (self.loading[name]) {
30288                    var callbacks = self.loading[name];
30289                    delete self.loading[name];
30290                    var successCallback = function (wasSuccessful) {
30291                        if (!wasSuccessful) {
30292                            request.cleanup();
30293                        }
30294                    };
30295                    for (var i = 0; i < callbacks.length; i++) {
30296                        callbacks[i](error, successCallback);
30297                    }
30298                }
30299            });
30300            request.send(receiver);
30301        }
30302    };
30303    DependencyLoader.prototype.getRoot = function (options) {
30304        var cdn;
30305        var protocol = runtime.getDocument().location.protocol;
30306        if ((options && options.useTLS) || protocol === 'https:') {
30307            cdn = this.options.cdn_https;
30308        }
30309        else {
30310            cdn = this.options.cdn_http;
30311        }
30312        return cdn.replace(/\/*$/, '') + '/' + this.options.version;
30313    };
30314    DependencyLoader.prototype.getPath = function (name, options) {
30315        return this.getRoot(options) + '/' + name + this.options.suffix + '.js';
30316    };
30317    return DependencyLoader;
30318}());
30319/* harmony default export */ var dependency_loader = (dependency_loader_DependencyLoader);
30320
30321// CONCATENATED MODULE: ./src/runtimes/web/dom/dependencies.ts
30322
30323
30324
30325var DependenciesReceivers = new ScriptReceiverFactory('_pusher_dependencies', 'Pusher.DependenciesReceivers');
30326var Dependencies = new dependency_loader({
30327    cdn_http: defaults.cdn_http,
30328    cdn_https: defaults.cdn_https,
30329    version: defaults.VERSION,
30330    suffix: defaults.dependency_suffix,
30331    receivers: DependenciesReceivers
30332});
30333
30334// CONCATENATED MODULE: ./src/core/utils/url_store.ts
30335var urlStore = {
30336    baseUrl: 'https://pusher.com',
30337    urls: {
30338        authenticationEndpoint: {
30339            path: '/docs/channels/server_api/authenticating_users'
30340        },
30341        authorizationEndpoint: {
30342            path: '/docs/channels/server_api/authorizing-users/'
30343        },
30344        javascriptQuickStart: {
30345            path: '/docs/javascript_quick_start'
30346        },
30347        triggeringClientEvents: {
30348            path: '/docs/client_api_guide/client_events#trigger-events'
30349        },
30350        encryptedChannelSupport: {
30351            fullUrl: 'https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support'
30352        }
30353    }
30354};
30355var buildLogSuffix = function (key) {
30356    var urlPrefix = 'See:';
30357    var urlObj = urlStore.urls[key];
30358    if (!urlObj)
30359        return '';
30360    var url;
30361    if (urlObj.fullUrl) {
30362        url = urlObj.fullUrl;
30363    }
30364    else if (urlObj.path) {
30365        url = urlStore.baseUrl + urlObj.path;
30366    }
30367    if (!url)
30368        return '';
30369    return urlPrefix + " " + url;
30370};
30371/* harmony default export */ var url_store = ({ buildLogSuffix: buildLogSuffix });
30372
30373// CONCATENATED MODULE: ./src/core/auth/options.ts
30374var AuthRequestType;
30375(function (AuthRequestType) {
30376    AuthRequestType["UserAuthentication"] = "user-authentication";
30377    AuthRequestType["ChannelAuthorization"] = "channel-authorization";
30378})(AuthRequestType || (AuthRequestType = {}));
30379
30380// CONCATENATED MODULE: ./src/core/errors.ts
30381var __extends = ( false) || (function () {
30382    var extendStatics = function (d, b) {
30383        extendStatics = Object.setPrototypeOf ||
30384            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30385            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
30386        return extendStatics(d, b);
30387    };
30388    return function (d, b) {
30389        extendStatics(d, b);
30390        function __() { this.constructor = d; }
30391        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30392    };
30393})();
30394var BadEventName = (function (_super) {
30395    __extends(BadEventName, _super);
30396    function BadEventName(msg) {
30397        var _newTarget = this.constructor;
30398        var _this = _super.call(this, msg) || this;
30399        Object.setPrototypeOf(_this, _newTarget.prototype);
30400        return _this;
30401    }
30402    return BadEventName;
30403}(Error));
30404
30405var BadChannelName = (function (_super) {
30406    __extends(BadChannelName, _super);
30407    function BadChannelName(msg) {
30408        var _newTarget = this.constructor;
30409        var _this = _super.call(this, msg) || this;
30410        Object.setPrototypeOf(_this, _newTarget.prototype);
30411        return _this;
30412    }
30413    return BadChannelName;
30414}(Error));
30415
30416var RequestTimedOut = (function (_super) {
30417    __extends(RequestTimedOut, _super);
30418    function RequestTimedOut(msg) {
30419        var _newTarget = this.constructor;
30420        var _this = _super.call(this, msg) || this;
30421        Object.setPrototypeOf(_this, _newTarget.prototype);
30422        return _this;
30423    }
30424    return RequestTimedOut;
30425}(Error));
30426
30427var TransportPriorityTooLow = (function (_super) {
30428    __extends(TransportPriorityTooLow, _super);
30429    function TransportPriorityTooLow(msg) {
30430        var _newTarget = this.constructor;
30431        var _this = _super.call(this, msg) || this;
30432        Object.setPrototypeOf(_this, _newTarget.prototype);
30433        return _this;
30434    }
30435    return TransportPriorityTooLow;
30436}(Error));
30437
30438var TransportClosed = (function (_super) {
30439    __extends(TransportClosed, _super);
30440    function TransportClosed(msg) {
30441        var _newTarget = this.constructor;
30442        var _this = _super.call(this, msg) || this;
30443        Object.setPrototypeOf(_this, _newTarget.prototype);
30444        return _this;
30445    }
30446    return TransportClosed;
30447}(Error));
30448
30449var UnsupportedFeature = (function (_super) {
30450    __extends(UnsupportedFeature, _super);
30451    function UnsupportedFeature(msg) {
30452        var _newTarget = this.constructor;
30453        var _this = _super.call(this, msg) || this;
30454        Object.setPrototypeOf(_this, _newTarget.prototype);
30455        return _this;
30456    }
30457    return UnsupportedFeature;
30458}(Error));
30459
30460var UnsupportedTransport = (function (_super) {
30461    __extends(UnsupportedTransport, _super);
30462    function UnsupportedTransport(msg) {
30463        var _newTarget = this.constructor;
30464        var _this = _super.call(this, msg) || this;
30465        Object.setPrototypeOf(_this, _newTarget.prototype);
30466        return _this;
30467    }
30468    return UnsupportedTransport;
30469}(Error));
30470
30471var UnsupportedStrategy = (function (_super) {
30472    __extends(UnsupportedStrategy, _super);
30473    function UnsupportedStrategy(msg) {
30474        var _newTarget = this.constructor;
30475        var _this = _super.call(this, msg) || this;
30476        Object.setPrototypeOf(_this, _newTarget.prototype);
30477        return _this;
30478    }
30479    return UnsupportedStrategy;
30480}(Error));
30481
30482var HTTPAuthError = (function (_super) {
30483    __extends(HTTPAuthError, _super);
30484    function HTTPAuthError(status, msg) {
30485        var _newTarget = this.constructor;
30486        var _this = _super.call(this, msg) || this;
30487        _this.status = status;
30488        Object.setPrototypeOf(_this, _newTarget.prototype);
30489        return _this;
30490    }
30491    return HTTPAuthError;
30492}(Error));
30493
30494
30495// CONCATENATED MODULE: ./src/runtimes/isomorphic/auth/xhr_auth.ts
30496
30497
30498
30499
30500var ajax = function (context, query, authOptions, authRequestType, callback) {
30501    var xhr = runtime.createXHR();
30502    xhr.open('POST', authOptions.endpoint, true);
30503    xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
30504    for (var headerName in authOptions.headers) {
30505        xhr.setRequestHeader(headerName, authOptions.headers[headerName]);
30506    }
30507    xhr.onreadystatechange = function () {
30508        if (xhr.readyState === 4) {
30509            if (xhr.status === 200) {
30510                var data = void 0;
30511                var parsed = false;
30512                try {
30513                    data = JSON.parse(xhr.responseText);
30514                    parsed = true;
30515                }
30516                catch (e) {
30517                    callback(new HTTPAuthError(200, "JSON returned from " + authRequestType.toString() + " endpoint was invalid, yet status code was 200. Data was: " + xhr.responseText), null);
30518                }
30519                if (parsed) {
30520                    callback(null, data);
30521                }
30522            }
30523            else {
30524                var suffix = '';
30525                switch (authRequestType) {
30526                    case AuthRequestType.UserAuthentication:
30527                        suffix = url_store.buildLogSuffix('authenticationEndpoint');
30528                        break;
30529                    case AuthRequestType.ChannelAuthorization:
30530                        suffix = "Clients must be authenticated to join private or presence channels. " + url_store.buildLogSuffix('authorizationEndpoint');
30531                        break;
30532                }
30533                callback(new HTTPAuthError(xhr.status, "Unable to retrieve auth string from " + authRequestType.toString() + " endpoint - " +
30534                    ("received status: " + xhr.status + " from " + authOptions.endpoint + ". " + suffix)), null);
30535            }
30536        }
30537    };
30538    xhr.send(query);
30539    return xhr;
30540};
30541/* harmony default export */ var xhr_auth = (ajax);
30542
30543// CONCATENATED MODULE: ./src/core/base64.ts
30544function encode(s) {
30545    return btoa(utob(s));
30546}
30547var fromCharCode = String.fromCharCode;
30548var b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
30549var b64tab = {};
30550for (var base64_i = 0, l = b64chars.length; base64_i < l; base64_i++) {
30551    b64tab[b64chars.charAt(base64_i)] = base64_i;
30552}
30553var cb_utob = function (c) {
30554    var cc = c.charCodeAt(0);
30555    return cc < 0x80
30556        ? c
30557        : cc < 0x800
30558            ? fromCharCode(0xc0 | (cc >>> 6)) + fromCharCode(0x80 | (cc & 0x3f))
30559            : fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) +
30560                fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) +
30561                fromCharCode(0x80 | (cc & 0x3f));
30562};
30563var utob = function (u) {
30564    return u.replace(/[^\x00-\x7F]/g, cb_utob);
30565};
30566var cb_encode = function (ccc) {
30567    var padlen = [0, 2, 1][ccc.length % 3];
30568    var ord = (ccc.charCodeAt(0) << 16) |
30569        ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) |
30570        (ccc.length > 2 ? ccc.charCodeAt(2) : 0);
30571    var chars = [
30572        b64chars.charAt(ord >>> 18),
30573        b64chars.charAt((ord >>> 12) & 63),
30574        padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
30575        padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
30576    ];
30577    return chars.join('');
30578};
30579var btoa = window.btoa ||
30580    function (b) {
30581        return b.replace(/[\s\S]{1,3}/g, cb_encode);
30582    };
30583
30584// CONCATENATED MODULE: ./src/core/utils/timers/abstract_timer.ts
30585var Timer = (function () {
30586    function Timer(set, clear, delay, callback) {
30587        var _this = this;
30588        this.clear = clear;
30589        this.timer = set(function () {
30590            if (_this.timer) {
30591                _this.timer = callback(_this.timer);
30592            }
30593        }, delay);
30594    }
30595    Timer.prototype.isRunning = function () {
30596        return this.timer !== null;
30597    };
30598    Timer.prototype.ensureAborted = function () {
30599        if (this.timer) {
30600            this.clear(this.timer);
30601            this.timer = null;
30602        }
30603    };
30604    return Timer;
30605}());
30606/* harmony default export */ var abstract_timer = (Timer);
30607
30608// CONCATENATED MODULE: ./src/core/utils/timers/index.ts
30609var timers_extends = ( false) || (function () {
30610    var extendStatics = function (d, b) {
30611        extendStatics = Object.setPrototypeOf ||
30612            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30613            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
30614        return extendStatics(d, b);
30615    };
30616    return function (d, b) {
30617        extendStatics(d, b);
30618        function __() { this.constructor = d; }
30619        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30620    };
30621})();
30622
30623function timers_clearTimeout(timer) {
30624    window.clearTimeout(timer);
30625}
30626function timers_clearInterval(timer) {
30627    window.clearInterval(timer);
30628}
30629var OneOffTimer = (function (_super) {
30630    timers_extends(OneOffTimer, _super);
30631    function OneOffTimer(delay, callback) {
30632        return _super.call(this, setTimeout, timers_clearTimeout, delay, function (timer) {
30633            callback();
30634            return null;
30635        }) || this;
30636    }
30637    return OneOffTimer;
30638}(abstract_timer));
30639
30640var PeriodicTimer = (function (_super) {
30641    timers_extends(PeriodicTimer, _super);
30642    function PeriodicTimer(delay, callback) {
30643        return _super.call(this, setInterval, timers_clearInterval, delay, function (timer) {
30644            callback();
30645            return timer;
30646        }) || this;
30647    }
30648    return PeriodicTimer;
30649}(abstract_timer));
30650
30651
30652// CONCATENATED MODULE: ./src/core/util.ts
30653
30654var Util = {
30655    now: function () {
30656        if (Date.now) {
30657            return Date.now();
30658        }
30659        else {
30660            return new Date().valueOf();
30661        }
30662    },
30663    defer: function (callback) {
30664        return new OneOffTimer(0, callback);
30665    },
30666    method: function (name) {
30667        var args = [];
30668        for (var _i = 1; _i < arguments.length; _i++) {
30669            args[_i - 1] = arguments[_i];
30670        }
30671        var boundArguments = Array.prototype.slice.call(arguments, 1);
30672        return function (object) {
30673            return object[name].apply(object, boundArguments.concat(arguments));
30674        };
30675    }
30676};
30677/* harmony default export */ var util = (Util);
30678
30679// CONCATENATED MODULE: ./src/core/utils/collections.ts
30680
30681
30682function extend(target) {
30683    var sources = [];
30684    for (var _i = 1; _i < arguments.length; _i++) {
30685        sources[_i - 1] = arguments[_i];
30686    }
30687    for (var i = 0; i < sources.length; i++) {
30688        var extensions = sources[i];
30689        for (var property in extensions) {
30690            if (extensions[property] &&
30691                extensions[property].constructor &&
30692                extensions[property].constructor === Object) {
30693                target[property] = extend(target[property] || {}, extensions[property]);
30694            }
30695            else {
30696                target[property] = extensions[property];
30697            }
30698        }
30699    }
30700    return target;
30701}
30702function stringify() {
30703    var m = ['Pusher'];
30704    for (var i = 0; i < arguments.length; i++) {
30705        if (typeof arguments[i] === 'string') {
30706            m.push(arguments[i]);
30707        }
30708        else {
30709            m.push(safeJSONStringify(arguments[i]));
30710        }
30711    }
30712    return m.join(' : ');
30713}
30714function arrayIndexOf(array, item) {
30715    var nativeIndexOf = Array.prototype.indexOf;
30716    if (array === null) {
30717        return -1;
30718    }
30719    if (nativeIndexOf && array.indexOf === nativeIndexOf) {
30720        return array.indexOf(item);
30721    }
30722    for (var i = 0, l = array.length; i < l; i++) {
30723        if (array[i] === item) {
30724            return i;
30725        }
30726    }
30727    return -1;
30728}
30729function objectApply(object, f) {
30730    for (var key in object) {
30731        if (Object.prototype.hasOwnProperty.call(object, key)) {
30732            f(object[key], key, object);
30733        }
30734    }
30735}
30736function keys(object) {
30737    var keys = [];
30738    objectApply(object, function (_, key) {
30739        keys.push(key);
30740    });
30741    return keys;
30742}
30743function values(object) {
30744    var values = [];
30745    objectApply(object, function (value) {
30746        values.push(value);
30747    });
30748    return values;
30749}
30750function apply(array, f, context) {
30751    for (var i = 0; i < array.length; i++) {
30752        f.call(context || window, array[i], i, array);
30753    }
30754}
30755function map(array, f) {
30756    var result = [];
30757    for (var i = 0; i < array.length; i++) {
30758        result.push(f(array[i], i, array, result));
30759    }
30760    return result;
30761}
30762function mapObject(object, f) {
30763    var result = {};
30764    objectApply(object, function (value, key) {
30765        result[key] = f(value);
30766    });
30767    return result;
30768}
30769function filter(array, test) {
30770    test =
30771        test ||
30772            function (value) {
30773                return !!value;
30774            };
30775    var result = [];
30776    for (var i = 0; i < array.length; i++) {
30777        if (test(array[i], i, array, result)) {
30778            result.push(array[i]);
30779        }
30780    }
30781    return result;
30782}
30783function filterObject(object, test) {
30784    var result = {};
30785    objectApply(object, function (value, key) {
30786        if ((test && test(value, key, object, result)) || Boolean(value)) {
30787            result[key] = value;
30788        }
30789    });
30790    return result;
30791}
30792function flatten(object) {
30793    var result = [];
30794    objectApply(object, function (value, key) {
30795        result.push([key, value]);
30796    });
30797    return result;
30798}
30799function any(array, test) {
30800    for (var i = 0; i < array.length; i++) {
30801        if (test(array[i], i, array)) {
30802            return true;
30803        }
30804    }
30805    return false;
30806}
30807function collections_all(array, test) {
30808    for (var i = 0; i < array.length; i++) {
30809        if (!test(array[i], i, array)) {
30810            return false;
30811        }
30812    }
30813    return true;
30814}
30815function encodeParamsObject(data) {
30816    return mapObject(data, function (value) {
30817        if (typeof value === 'object') {
30818            value = safeJSONStringify(value);
30819        }
30820        return encodeURIComponent(encode(value.toString()));
30821    });
30822}
30823function buildQueryString(data) {
30824    var params = filterObject(data, function (value) {
30825        return value !== undefined;
30826    });
30827    var query = map(flatten(encodeParamsObject(params)), util.method('join', '=')).join('&');
30828    return query;
30829}
30830function decycleObject(object) {
30831    var objects = [], paths = [];
30832    return (function derez(value, path) {
30833        var i, name, nu;
30834        switch (typeof value) {
30835            case 'object':
30836                if (!value) {
30837                    return null;
30838                }
30839                for (i = 0; i < objects.length; i += 1) {
30840                    if (objects[i] === value) {
30841                        return { $ref: paths[i] };
30842                    }
30843                }
30844                objects.push(value);
30845                paths.push(path);
30846                if (Object.prototype.toString.apply(value) === '[object Array]') {
30847                    nu = [];
30848                    for (i = 0; i < value.length; i += 1) {
30849                        nu[i] = derez(value[i], path + '[' + i + ']');
30850                    }
30851                }
30852                else {
30853                    nu = {};
30854                    for (name in value) {
30855                        if (Object.prototype.hasOwnProperty.call(value, name)) {
30856                            nu[name] = derez(value[name], path + '[' + JSON.stringify(name) + ']');
30857                        }
30858                    }
30859                }
30860                return nu;
30861            case 'number':
30862            case 'string':
30863            case 'boolean':
30864                return value;
30865        }
30866    })(object, '$');
30867}
30868function safeJSONStringify(source) {
30869    try {
30870        return JSON.stringify(source);
30871    }
30872    catch (e) {
30873        return JSON.stringify(decycleObject(source));
30874    }
30875}
30876
30877// CONCATENATED MODULE: ./src/core/logger.ts
30878
30879
30880var logger_Logger = (function () {
30881    function Logger() {
30882        this.globalLog = function (message) {
30883            if (window.console && window.console.log) {
30884                window.console.log(message);
30885            }
30886        };
30887    }
30888    Logger.prototype.debug = function () {
30889        var args = [];
30890        for (var _i = 0; _i < arguments.length; _i++) {
30891            args[_i] = arguments[_i];
30892        }
30893        this.log(this.globalLog, args);
30894    };
30895    Logger.prototype.warn = function () {
30896        var args = [];
30897        for (var _i = 0; _i < arguments.length; _i++) {
30898            args[_i] = arguments[_i];
30899        }
30900        this.log(this.globalLogWarn, args);
30901    };
30902    Logger.prototype.error = function () {
30903        var args = [];
30904        for (var _i = 0; _i < arguments.length; _i++) {
30905            args[_i] = arguments[_i];
30906        }
30907        this.log(this.globalLogError, args);
30908    };
30909    Logger.prototype.globalLogWarn = function (message) {
30910        if (window.console && window.console.warn) {
30911            window.console.warn(message);
30912        }
30913        else {
30914            this.globalLog(message);
30915        }
30916    };
30917    Logger.prototype.globalLogError = function (message) {
30918        if (window.console && window.console.error) {
30919            window.console.error(message);
30920        }
30921        else {
30922            this.globalLogWarn(message);
30923        }
30924    };
30925    Logger.prototype.log = function (defaultLoggingFunction) {
30926        var args = [];
30927        for (var _i = 1; _i < arguments.length; _i++) {
30928            args[_i - 1] = arguments[_i];
30929        }
30930        var message = stringify.apply(this, arguments);
30931        if (core_pusher.log) {
30932            core_pusher.log(message);
30933        }
30934        else if (core_pusher.logToConsole) {
30935            var log = defaultLoggingFunction.bind(this);
30936            log(message);
30937        }
30938    };
30939    return Logger;
30940}());
30941/* harmony default export */ var logger = (new logger_Logger());
30942
30943// CONCATENATED MODULE: ./src/runtimes/web/auth/jsonp_auth.ts
30944
30945var jsonp = function (context, query, authOptions, authRequestType, callback) {
30946    if (authOptions.headers !== undefined) {
30947        logger.warn("To send headers with the " + authRequestType.toString() + " request, you must use AJAX, rather than JSONP.");
30948    }
30949    var callbackName = context.nextAuthCallbackID.toString();
30950    context.nextAuthCallbackID++;
30951    var document = context.getDocument();
30952    var script = document.createElement('script');
30953    context.auth_callbacks[callbackName] = function (data) {
30954        callback(null, data);
30955    };
30956    var callback_name = "Pusher.auth_callbacks['" + callbackName + "']";
30957    script.src =
30958        authOptions.endpoint +
30959            '?callback=' +
30960            encodeURIComponent(callback_name) +
30961            '&' +
30962            query;
30963    var head = document.getElementsByTagName('head')[0] || document.documentElement;
30964    head.insertBefore(script, head.firstChild);
30965};
30966/* harmony default export */ var jsonp_auth = (jsonp);
30967
30968// CONCATENATED MODULE: ./src/runtimes/web/dom/script_request.ts
30969var ScriptRequest = (function () {
30970    function ScriptRequest(src) {
30971        this.src = src;
30972    }
30973    ScriptRequest.prototype.send = function (receiver) {
30974        var self = this;
30975        var errorString = 'Error loading ' + self.src;
30976        self.script = document.createElement('script');
30977        self.script.id = receiver.id;
30978        self.script.src = self.src;
30979        self.script.type = 'text/javascript';
30980        self.script.charset = 'UTF-8';
30981        if (self.script.addEventListener) {
30982            self.script.onerror = function () {
30983                receiver.callback(errorString);
30984            };
30985            self.script.onload = function () {
30986                receiver.callback(null);
30987            };
30988        }
30989        else {
30990            self.script.onreadystatechange = function () {
30991                if (self.script.readyState === 'loaded' ||
30992                    self.script.readyState === 'complete') {
30993                    receiver.callback(null);
30994                }
30995            };
30996        }
30997        if (self.script.async === undefined &&
30998            document.attachEvent &&
30999            /opera/i.test(navigator.userAgent)) {
31000            self.errorScript = document.createElement('script');
31001            self.errorScript.id = receiver.id + '_error';
31002            self.errorScript.text = receiver.name + "('" + errorString + "');";
31003            self.script.async = self.errorScript.async = false;
31004        }
31005        else {
31006            self.script.async = true;
31007        }
31008        var head = document.getElementsByTagName('head')[0];
31009        head.insertBefore(self.script, head.firstChild);
31010        if (self.errorScript) {
31011            head.insertBefore(self.errorScript, self.script.nextSibling);
31012        }
31013    };
31014    ScriptRequest.prototype.cleanup = function () {
31015        if (this.script) {
31016            this.script.onload = this.script.onerror = null;
31017            this.script.onreadystatechange = null;
31018        }
31019        if (this.script && this.script.parentNode) {
31020            this.script.parentNode.removeChild(this.script);
31021        }
31022        if (this.errorScript && this.errorScript.parentNode) {
31023            this.errorScript.parentNode.removeChild(this.errorScript);
31024        }
31025        this.script = null;
31026        this.errorScript = null;
31027    };
31028    return ScriptRequest;
31029}());
31030/* harmony default export */ var script_request = (ScriptRequest);
31031
31032// CONCATENATED MODULE: ./src/runtimes/web/dom/jsonp_request.ts
31033
31034
31035var jsonp_request_JSONPRequest = (function () {
31036    function JSONPRequest(url, data) {
31037        this.url = url;
31038        this.data = data;
31039    }
31040    JSONPRequest.prototype.send = function (receiver) {
31041        if (this.request) {
31042            return;
31043        }
31044        var query = buildQueryString(this.data);
31045        var url = this.url + '/' + receiver.number + '?' + query;
31046        this.request = runtime.createScriptRequest(url);
31047        this.request.send(receiver);
31048    };
31049    JSONPRequest.prototype.cleanup = function () {
31050        if (this.request) {
31051            this.request.cleanup();
31052        }
31053    };
31054    return JSONPRequest;
31055}());
31056/* harmony default export */ var jsonp_request = (jsonp_request_JSONPRequest);
31057
31058// CONCATENATED MODULE: ./src/runtimes/web/timeline/jsonp_timeline.ts
31059
31060
31061var getAgent = function (sender, useTLS) {
31062    return function (data, callback) {
31063        var scheme = 'http' + (useTLS ? 's' : '') + '://';
31064        var url = scheme + (sender.host || sender.options.host) + sender.options.path;
31065        var request = runtime.createJSONPRequest(url, data);
31066        var receiver = runtime.ScriptReceivers.create(function (error, result) {
31067            ScriptReceivers.remove(receiver);
31068            request.cleanup();
31069            if (result && result.host) {
31070                sender.host = result.host;
31071            }
31072            if (callback) {
31073                callback(error, result);
31074            }
31075        });
31076        request.send(receiver);
31077    };
31078};
31079var jsonp_timeline_jsonp = {
31080    name: 'jsonp',
31081    getAgent: getAgent
31082};
31083/* harmony default export */ var jsonp_timeline = (jsonp_timeline_jsonp);
31084
31085// CONCATENATED MODULE: ./src/core/transports/url_schemes.ts
31086
31087function getGenericURL(baseScheme, params, path) {
31088    var scheme = baseScheme + (params.useTLS ? 's' : '');
31089    var host = params.useTLS ? params.hostTLS : params.hostNonTLS;
31090    return scheme + '://' + host + path;
31091}
31092function getGenericPath(key, queryString) {
31093    var path = '/app/' + key;
31094    var query = '?protocol=' +
31095        defaults.PROTOCOL +
31096        '&client=js' +
31097        '&version=' +
31098        defaults.VERSION +
31099        (queryString ? '&' + queryString : '');
31100    return path + query;
31101}
31102var ws = {
31103    getInitial: function (key, params) {
31104        var path = (params.httpPath || '') + getGenericPath(key, 'flash=false');
31105        return getGenericURL('ws', params, path);
31106    }
31107};
31108var http = {
31109    getInitial: function (key, params) {
31110        var path = (params.httpPath || '/pusher') + getGenericPath(key);
31111        return getGenericURL('http', params, path);
31112    }
31113};
31114var sockjs = {
31115    getInitial: function (key, params) {
31116        return getGenericURL('http', params, params.httpPath || '/pusher');
31117    },
31118    getPath: function (key, params) {
31119        return getGenericPath(key);
31120    }
31121};
31122
31123// CONCATENATED MODULE: ./src/core/events/callback_registry.ts
31124
31125var callback_registry_CallbackRegistry = (function () {
31126    function CallbackRegistry() {
31127        this._callbacks = {};
31128    }
31129    CallbackRegistry.prototype.get = function (name) {
31130        return this._callbacks[prefix(name)];
31131    };
31132    CallbackRegistry.prototype.add = function (name, callback, context) {
31133        var prefixedEventName = prefix(name);
31134        this._callbacks[prefixedEventName] =
31135            this._callbacks[prefixedEventName] || [];
31136        this._callbacks[prefixedEventName].push({
31137            fn: callback,
31138            context: context
31139        });
31140    };
31141    CallbackRegistry.prototype.remove = function (name, callback, context) {
31142        if (!name && !callback && !context) {
31143            this._callbacks = {};
31144            return;
31145        }
31146        var names = name ? [prefix(name)] : keys(this._callbacks);
31147        if (callback || context) {
31148            this.removeCallback(names, callback, context);
31149        }
31150        else {
31151            this.removeAllCallbacks(names);
31152        }
31153    };
31154    CallbackRegistry.prototype.removeCallback = function (names, callback, context) {
31155        apply(names, function (name) {
31156            this._callbacks[name] = filter(this._callbacks[name] || [], function (binding) {
31157                return ((callback && callback !== binding.fn) ||
31158                    (context && context !== binding.context));
31159            });
31160            if (this._callbacks[name].length === 0) {
31161                delete this._callbacks[name];
31162            }
31163        }, this);
31164    };
31165    CallbackRegistry.prototype.removeAllCallbacks = function (names) {
31166        apply(names, function (name) {
31167            delete this._callbacks[name];
31168        }, this);
31169    };
31170    return CallbackRegistry;
31171}());
31172/* harmony default export */ var callback_registry = (callback_registry_CallbackRegistry);
31173function prefix(name) {
31174    return '_' + name;
31175}
31176
31177// CONCATENATED MODULE: ./src/core/events/dispatcher.ts
31178
31179
31180var dispatcher_Dispatcher = (function () {
31181    function Dispatcher(failThrough) {
31182        this.callbacks = new callback_registry();
31183        this.global_callbacks = [];
31184        this.failThrough = failThrough;
31185    }
31186    Dispatcher.prototype.bind = function (eventName, callback, context) {
31187        this.callbacks.add(eventName, callback, context);
31188        return this;
31189    };
31190    Dispatcher.prototype.bind_global = function (callback) {
31191        this.global_callbacks.push(callback);
31192        return this;
31193    };
31194    Dispatcher.prototype.unbind = function (eventName, callback, context) {
31195        this.callbacks.remove(eventName, callback, context);
31196        return this;
31197    };
31198    Dispatcher.prototype.unbind_global = function (callback) {
31199        if (!callback) {
31200            this.global_callbacks = [];
31201            return this;
31202        }
31203        this.global_callbacks = filter(this.global_callbacks || [], function (c) { return c !== callback; });
31204        return this;
31205    };
31206    Dispatcher.prototype.unbind_all = function () {
31207        this.unbind();
31208        this.unbind_global();
31209        return this;
31210    };
31211    Dispatcher.prototype.emit = function (eventName, data, metadata) {
31212        for (var i = 0; i < this.global_callbacks.length; i++) {
31213            this.global_callbacks[i](eventName, data);
31214        }
31215        var callbacks = this.callbacks.get(eventName);
31216        var args = [];
31217        if (metadata) {
31218            args.push(data, metadata);
31219        }
31220        else if (data) {
31221            args.push(data);
31222        }
31223        if (callbacks && callbacks.length > 0) {
31224            for (var i = 0; i < callbacks.length; i++) {
31225                callbacks[i].fn.apply(callbacks[i].context || window, args);
31226            }
31227        }
31228        else if (this.failThrough) {
31229            this.failThrough(eventName, data);
31230        }
31231        return this;
31232    };
31233    return Dispatcher;
31234}());
31235/* harmony default export */ var dispatcher = (dispatcher_Dispatcher);
31236
31237// CONCATENATED MODULE: ./src/core/transports/transport_connection.ts
31238var transport_connection_extends = ( false) || (function () {
31239    var extendStatics = function (d, b) {
31240        extendStatics = Object.setPrototypeOf ||
31241            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31242            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
31243        return extendStatics(d, b);
31244    };
31245    return function (d, b) {
31246        extendStatics(d, b);
31247        function __() { this.constructor = d; }
31248        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31249    };
31250})();
31251
31252
31253
31254
31255
31256var transport_connection_TransportConnection = (function (_super) {
31257    transport_connection_extends(TransportConnection, _super);
31258    function TransportConnection(hooks, name, priority, key, options) {
31259        var _this = _super.call(this) || this;
31260        _this.initialize = runtime.transportConnectionInitializer;
31261        _this.hooks = hooks;
31262        _this.name = name;
31263        _this.priority = priority;
31264        _this.key = key;
31265        _this.options = options;
31266        _this.state = 'new';
31267        _this.timeline = options.timeline;
31268        _this.activityTimeout = options.activityTimeout;
31269        _this.id = _this.timeline.generateUniqueID();
31270        return _this;
31271    }
31272    TransportConnection.prototype.handlesActivityChecks = function () {
31273        return Boolean(this.hooks.handlesActivityChecks);
31274    };
31275    TransportConnection.prototype.supportsPing = function () {
31276        return Boolean(this.hooks.supportsPing);
31277    };
31278    TransportConnection.prototype.connect = function () {
31279        var _this = this;
31280        if (this.socket || this.state !== 'initialized') {
31281            return false;
31282        }
31283        var url = this.hooks.urls.getInitial(this.key, this.options);
31284        try {
31285            this.socket = this.hooks.getSocket(url, this.options);
31286        }
31287        catch (e) {
31288            util.defer(function () {
31289                _this.onError(e);
31290                _this.changeState('closed');
31291            });
31292            return false;
31293        }
31294        this.bindListeners();
31295        logger.debug('Connecting', { transport: this.name, url: url });
31296        this.changeState('connecting');
31297        return true;
31298    };
31299    TransportConnection.prototype.close = function () {
31300        if (this.socket) {
31301            this.socket.close();
31302            return true;
31303        }
31304        else {
31305            return false;
31306        }
31307    };
31308    TransportConnection.prototype.send = function (data) {
31309        var _this = this;
31310        if (this.state === 'open') {
31311            util.defer(function () {
31312                if (_this.socket) {
31313                    _this.socket.send(data);
31314                }
31315            });
31316            return true;
31317        }
31318        else {
31319            return false;
31320        }
31321    };
31322    TransportConnection.prototype.ping = function () {
31323        if (this.state === 'open' && this.supportsPing()) {
31324            this.socket.ping();
31325        }
31326    };
31327    TransportConnection.prototype.onOpen = function () {
31328        if (this.hooks.beforeOpen) {
31329            this.hooks.beforeOpen(this.socket, this.hooks.urls.getPath(this.key, this.options));
31330        }
31331        this.changeState('open');
31332        this.socket.onopen = undefined;
31333    };
31334    TransportConnection.prototype.onError = function (error) {
31335        this.emit('error', { type: 'WebSocketError', error: error });
31336        this.timeline.error(this.buildTimelineMessage({ error: error.toString() }));
31337    };
31338    TransportConnection.prototype.onClose = function (closeEvent) {
31339        if (closeEvent) {
31340            this.changeState('closed', {
31341                code: closeEvent.code,
31342                reason: closeEvent.reason,
31343                wasClean: closeEvent.wasClean
31344            });
31345        }
31346        else {
31347            this.changeState('closed');
31348        }
31349        this.unbindListeners();
31350        this.socket = undefined;
31351    };
31352    TransportConnection.prototype.onMessage = function (message) {
31353        this.emit('message', message);
31354    };
31355    TransportConnection.prototype.onActivity = function () {
31356        this.emit('activity');
31357    };
31358    TransportConnection.prototype.bindListeners = function () {
31359        var _this = this;
31360        this.socket.onopen = function () {
31361            _this.onOpen();
31362        };
31363        this.socket.onerror = function (error) {
31364            _this.onError(error);
31365        };
31366        this.socket.onclose = function (closeEvent) {
31367            _this.onClose(closeEvent);
31368        };
31369        this.socket.onmessage = function (message) {
31370            _this.onMessage(message);
31371        };
31372        if (this.supportsPing()) {
31373            this.socket.onactivity = function () {
31374                _this.onActivity();
31375            };
31376        }
31377    };
31378    TransportConnection.prototype.unbindListeners = function () {
31379        if (this.socket) {
31380            this.socket.onopen = undefined;
31381            this.socket.onerror = undefined;
31382            this.socket.onclose = undefined;
31383            this.socket.onmessage = undefined;
31384            if (this.supportsPing()) {
31385                this.socket.onactivity = undefined;
31386            }
31387        }
31388    };
31389    TransportConnection.prototype.changeState = function (state, params) {
31390        this.state = state;
31391        this.timeline.info(this.buildTimelineMessage({
31392            state: state,
31393            params: params
31394        }));
31395        this.emit(state, params);
31396    };
31397    TransportConnection.prototype.buildTimelineMessage = function (message) {
31398        return extend({ cid: this.id }, message);
31399    };
31400    return TransportConnection;
31401}(dispatcher));
31402/* harmony default export */ var transport_connection = (transport_connection_TransportConnection);
31403
31404// CONCATENATED MODULE: ./src/core/transports/transport.ts
31405
31406var transport_Transport = (function () {
31407    function Transport(hooks) {
31408        this.hooks = hooks;
31409    }
31410    Transport.prototype.isSupported = function (environment) {
31411        return this.hooks.isSupported(environment);
31412    };
31413    Transport.prototype.createConnection = function (name, priority, key, options) {
31414        return new transport_connection(this.hooks, name, priority, key, options);
31415    };
31416    return Transport;
31417}());
31418/* harmony default export */ var transports_transport = (transport_Transport);
31419
31420// CONCATENATED MODULE: ./src/runtimes/isomorphic/transports/transports.ts
31421
31422
31423
31424
31425var WSTransport = new transports_transport({
31426    urls: ws,
31427    handlesActivityChecks: false,
31428    supportsPing: false,
31429    isInitialized: function () {
31430        return Boolean(runtime.getWebSocketAPI());
31431    },
31432    isSupported: function () {
31433        return Boolean(runtime.getWebSocketAPI());
31434    },
31435    getSocket: function (url) {
31436        return runtime.createWebSocket(url);
31437    }
31438});
31439var httpConfiguration = {
31440    urls: http,
31441    handlesActivityChecks: false,
31442    supportsPing: true,
31443    isInitialized: function () {
31444        return true;
31445    }
31446};
31447var streamingConfiguration = extend({
31448    getSocket: function (url) {
31449        return runtime.HTTPFactory.createStreamingSocket(url);
31450    }
31451}, httpConfiguration);
31452var pollingConfiguration = extend({
31453    getSocket: function (url) {
31454        return runtime.HTTPFactory.createPollingSocket(url);
31455    }
31456}, httpConfiguration);
31457var xhrConfiguration = {
31458    isSupported: function () {
31459        return runtime.isXHRSupported();
31460    }
31461};
31462var XHRStreamingTransport = new transports_transport((extend({}, streamingConfiguration, xhrConfiguration)));
31463var XHRPollingTransport = new transports_transport(extend({}, pollingConfiguration, xhrConfiguration));
31464var Transports = {
31465    ws: WSTransport,
31466    xhr_streaming: XHRStreamingTransport,
31467    xhr_polling: XHRPollingTransport
31468};
31469/* harmony default export */ var transports = (Transports);
31470
31471// CONCATENATED MODULE: ./src/runtimes/web/transports/transports.ts
31472
31473
31474
31475
31476
31477
31478var SockJSTransport = new transports_transport({
31479    file: 'sockjs',
31480    urls: sockjs,
31481    handlesActivityChecks: true,
31482    supportsPing: false,
31483    isSupported: function () {
31484        return true;
31485    },
31486    isInitialized: function () {
31487        return window.SockJS !== undefined;
31488    },
31489    getSocket: function (url, options) {
31490        return new window.SockJS(url, null, {
31491            js_path: Dependencies.getPath('sockjs', {
31492                useTLS: options.useTLS
31493            }),
31494            ignore_null_origin: options.ignoreNullOrigin
31495        });
31496    },
31497    beforeOpen: function (socket, path) {
31498        socket.send(JSON.stringify({
31499            path: path
31500        }));
31501    }
31502});
31503var xdrConfiguration = {
31504    isSupported: function (environment) {
31505        var yes = runtime.isXDRSupported(environment.useTLS);
31506        return yes;
31507    }
31508};
31509var XDRStreamingTransport = new transports_transport((extend({}, streamingConfiguration, xdrConfiguration)));
31510var XDRPollingTransport = new transports_transport(extend({}, pollingConfiguration, xdrConfiguration));
31511transports.xdr_streaming = XDRStreamingTransport;
31512transports.xdr_polling = XDRPollingTransport;
31513transports.sockjs = SockJSTransport;
31514/* harmony default export */ var transports_transports = (transports);
31515
31516// CONCATENATED MODULE: ./src/runtimes/web/net_info.ts
31517var net_info_extends = ( false) || (function () {
31518    var extendStatics = function (d, b) {
31519        extendStatics = Object.setPrototypeOf ||
31520            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31521            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
31522        return extendStatics(d, b);
31523    };
31524    return function (d, b) {
31525        extendStatics(d, b);
31526        function __() { this.constructor = d; }
31527        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31528    };
31529})();
31530
31531var NetInfo = (function (_super) {
31532    net_info_extends(NetInfo, _super);
31533    function NetInfo() {
31534        var _this = _super.call(this) || this;
31535        var self = _this;
31536        if (window.addEventListener !== undefined) {
31537            window.addEventListener('online', function () {
31538                self.emit('online');
31539            }, false);
31540            window.addEventListener('offline', function () {
31541                self.emit('offline');
31542            }, false);
31543        }
31544        return _this;
31545    }
31546    NetInfo.prototype.isOnline = function () {
31547        if (window.navigator.onLine === undefined) {
31548            return true;
31549        }
31550        else {
31551            return window.navigator.onLine;
31552        }
31553    };
31554    return NetInfo;
31555}(dispatcher));
31556
31557var net_info_Network = new NetInfo();
31558
31559// CONCATENATED MODULE: ./src/core/transports/assistant_to_the_transport_manager.ts
31560
31561
31562var assistant_to_the_transport_manager_AssistantToTheTransportManager = (function () {
31563    function AssistantToTheTransportManager(manager, transport, options) {
31564        this.manager = manager;
31565        this.transport = transport;
31566        this.minPingDelay = options.minPingDelay;
31567        this.maxPingDelay = options.maxPingDelay;
31568        this.pingDelay = undefined;
31569    }
31570    AssistantToTheTransportManager.prototype.createConnection = function (name, priority, key, options) {
31571        var _this = this;
31572        options = extend({}, options, {
31573            activityTimeout: this.pingDelay
31574        });
31575        var connection = this.transport.createConnection(name, priority, key, options);
31576        var openTimestamp = null;
31577        var onOpen = function () {
31578            connection.unbind('open', onOpen);
31579            connection.bind('closed', onClosed);
31580            openTimestamp = util.now();
31581        };
31582        var onClosed = function (closeEvent) {
31583            connection.unbind('closed', onClosed);
31584            if (closeEvent.code === 1002 || closeEvent.code === 1003) {
31585                _this.manager.reportDeath();
31586            }
31587            else if (!closeEvent.wasClean && openTimestamp) {
31588                var lifespan = util.now() - openTimestamp;
31589                if (lifespan < 2 * _this.maxPingDelay) {
31590                    _this.manager.reportDeath();
31591                    _this.pingDelay = Math.max(lifespan / 2, _this.minPingDelay);
31592                }
31593            }
31594        };
31595        connection.bind('open', onOpen);
31596        return connection;
31597    };
31598    AssistantToTheTransportManager.prototype.isSupported = function (environment) {
31599        return this.manager.isAlive() && this.transport.isSupported(environment);
31600    };
31601    return AssistantToTheTransportManager;
31602}());
31603/* harmony default export */ var assistant_to_the_transport_manager = (assistant_to_the_transport_manager_AssistantToTheTransportManager);
31604
31605// CONCATENATED MODULE: ./src/core/connection/protocol/protocol.ts
31606var Protocol = {
31607    decodeMessage: function (messageEvent) {
31608        try {
31609            var messageData = JSON.parse(messageEvent.data);
31610            var pusherEventData = messageData.data;
31611            if (typeof pusherEventData === 'string') {
31612                try {
31613                    pusherEventData = JSON.parse(messageData.data);
31614                }
31615                catch (e) { }
31616            }
31617            var pusherEvent = {
31618                event: messageData.event,
31619                channel: messageData.channel,
31620                data: pusherEventData
31621            };
31622            if (messageData.user_id) {
31623                pusherEvent.user_id = messageData.user_id;
31624            }
31625            return pusherEvent;
31626        }
31627        catch (e) {
31628            throw { type: 'MessageParseError', error: e, data: messageEvent.data };
31629        }
31630    },
31631    encodeMessage: function (event) {
31632        return JSON.stringify(event);
31633    },
31634    processHandshake: function (messageEvent) {
31635        var message = Protocol.decodeMessage(messageEvent);
31636        if (message.event === 'pusher:connection_established') {
31637            if (!message.data.activity_timeout) {
31638                throw 'No activity timeout specified in handshake';
31639            }
31640            return {
31641                action: 'connected',
31642                id: message.data.socket_id,
31643                activityTimeout: message.data.activity_timeout * 1000
31644            };
31645        }
31646        else if (message.event === 'pusher:error') {
31647            return {
31648                action: this.getCloseAction(message.data),
31649                error: this.getCloseError(message.data)
31650            };
31651        }
31652        else {
31653            throw 'Invalid handshake';
31654        }
31655    },
31656    getCloseAction: function (closeEvent) {
31657        if (closeEvent.code < 4000) {
31658            if (closeEvent.code >= 1002 && closeEvent.code <= 1004) {
31659                return 'backoff';
31660            }
31661            else {
31662                return null;
31663            }
31664        }
31665        else if (closeEvent.code === 4000) {
31666            return 'tls_only';
31667        }
31668        else if (closeEvent.code < 4100) {
31669            return 'refused';
31670        }
31671        else if (closeEvent.code < 4200) {
31672            return 'backoff';
31673        }
31674        else if (closeEvent.code < 4300) {
31675            return 'retry';
31676        }
31677        else {
31678            return 'refused';
31679        }
31680    },
31681    getCloseError: function (closeEvent) {
31682        if (closeEvent.code !== 1000 && closeEvent.code !== 1001) {
31683            return {
31684                type: 'PusherError',
31685                data: {
31686                    code: closeEvent.code,
31687                    message: closeEvent.reason || closeEvent.message
31688                }
31689            };
31690        }
31691        else {
31692            return null;
31693        }
31694    }
31695};
31696/* harmony default export */ var protocol_protocol = (Protocol);
31697
31698// CONCATENATED MODULE: ./src/core/connection/connection.ts
31699var connection_extends = ( false) || (function () {
31700    var extendStatics = function (d, b) {
31701        extendStatics = Object.setPrototypeOf ||
31702            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31703            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
31704        return extendStatics(d, b);
31705    };
31706    return function (d, b) {
31707        extendStatics(d, b);
31708        function __() { this.constructor = d; }
31709        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31710    };
31711})();
31712
31713
31714
31715
31716var connection_Connection = (function (_super) {
31717    connection_extends(Connection, _super);
31718    function Connection(id, transport) {
31719        var _this = _super.call(this) || this;
31720        _this.id = id;
31721        _this.transport = transport;
31722        _this.activityTimeout = transport.activityTimeout;
31723        _this.bindListeners();
31724        return _this;
31725    }
31726    Connection.prototype.handlesActivityChecks = function () {
31727        return this.transport.handlesActivityChecks();
31728    };
31729    Connection.prototype.send = function (data) {
31730        return this.transport.send(data);
31731    };
31732    Connection.prototype.send_event = function (name, data, channel) {
31733        var event = { event: name, data: data };
31734        if (channel) {
31735            event.channel = channel;
31736        }
31737        logger.debug('Event sent', event);
31738        return this.send(protocol_protocol.encodeMessage(event));
31739    };
31740    Connection.prototype.ping = function () {
31741        if (this.transport.supportsPing()) {
31742            this.transport.ping();
31743        }
31744        else {
31745            this.send_event('pusher:ping', {});
31746        }
31747    };
31748    Connection.prototype.close = function () {
31749        this.transport.close();
31750    };
31751    Connection.prototype.bindListeners = function () {
31752        var _this = this;
31753        var listeners = {
31754            message: function (messageEvent) {
31755                var pusherEvent;
31756                try {
31757                    pusherEvent = protocol_protocol.decodeMessage(messageEvent);
31758                }
31759                catch (e) {
31760                    _this.emit('error', {
31761                        type: 'MessageParseError',
31762                        error: e,
31763                        data: messageEvent.data
31764                    });
31765                }
31766                if (pusherEvent !== undefined) {
31767                    logger.debug('Event recd', pusherEvent);
31768                    switch (pusherEvent.event) {
31769                        case 'pusher:error':
31770                            _this.emit('error', {
31771                                type: 'PusherError',
31772                                data: pusherEvent.data
31773                            });
31774                            break;
31775                        case 'pusher:ping':
31776                            _this.emit('ping');
31777                            break;
31778                        case 'pusher:pong':
31779                            _this.emit('pong');
31780                            break;
31781                    }
31782                    _this.emit('message', pusherEvent);
31783                }
31784            },
31785            activity: function () {
31786                _this.emit('activity');
31787            },
31788            error: function (error) {
31789                _this.emit('error', error);
31790            },
31791            closed: function (closeEvent) {
31792                unbindListeners();
31793                if (closeEvent && closeEvent.code) {
31794                    _this.handleCloseEvent(closeEvent);
31795                }
31796                _this.transport = null;
31797                _this.emit('closed');
31798            }
31799        };
31800        var unbindListeners = function () {
31801            objectApply(listeners, function (listener, event) {
31802                _this.transport.unbind(event, listener);
31803            });
31804        };
31805        objectApply(listeners, function (listener, event) {
31806            _this.transport.bind(event, listener);
31807        });
31808    };
31809    Connection.prototype.handleCloseEvent = function (closeEvent) {
31810        var action = protocol_protocol.getCloseAction(closeEvent);
31811        var error = protocol_protocol.getCloseError(closeEvent);
31812        if (error) {
31813            this.emit('error', error);
31814        }
31815        if (action) {
31816            this.emit(action, { action: action, error: error });
31817        }
31818    };
31819    return Connection;
31820}(dispatcher));
31821/* harmony default export */ var connection_connection = (connection_Connection);
31822
31823// CONCATENATED MODULE: ./src/core/connection/handshake/index.ts
31824
31825
31826
31827var handshake_Handshake = (function () {
31828    function Handshake(transport, callback) {
31829        this.transport = transport;
31830        this.callback = callback;
31831        this.bindListeners();
31832    }
31833    Handshake.prototype.close = function () {
31834        this.unbindListeners();
31835        this.transport.close();
31836    };
31837    Handshake.prototype.bindListeners = function () {
31838        var _this = this;
31839        this.onMessage = function (m) {
31840            _this.unbindListeners();
31841            var result;
31842            try {
31843                result = protocol_protocol.processHandshake(m);
31844            }
31845            catch (e) {
31846                _this.finish('error', { error: e });
31847                _this.transport.close();
31848                return;
31849            }
31850            if (result.action === 'connected') {
31851                _this.finish('connected', {
31852                    connection: new connection_connection(result.id, _this.transport),
31853                    activityTimeout: result.activityTimeout
31854                });
31855            }
31856            else {
31857                _this.finish(result.action, { error: result.error });
31858                _this.transport.close();
31859            }
31860        };
31861        this.onClosed = function (closeEvent) {
31862            _this.unbindListeners();
31863            var action = protocol_protocol.getCloseAction(closeEvent) || 'backoff';
31864            var error = protocol_protocol.getCloseError(closeEvent);
31865            _this.finish(action, { error: error });
31866        };
31867        this.transport.bind('message', this.onMessage);
31868        this.transport.bind('closed', this.onClosed);
31869    };
31870    Handshake.prototype.unbindListeners = function () {
31871        this.transport.unbind('message', this.onMessage);
31872        this.transport.unbind('closed', this.onClosed);
31873    };
31874    Handshake.prototype.finish = function (action, params) {
31875        this.callback(extend({ transport: this.transport, action: action }, params));
31876    };
31877    return Handshake;
31878}());
31879/* harmony default export */ var connection_handshake = (handshake_Handshake);
31880
31881// CONCATENATED MODULE: ./src/core/timeline/timeline_sender.ts
31882
31883var timeline_sender_TimelineSender = (function () {
31884    function TimelineSender(timeline, options) {
31885        this.timeline = timeline;
31886        this.options = options || {};
31887    }
31888    TimelineSender.prototype.send = function (useTLS, callback) {
31889        if (this.timeline.isEmpty()) {
31890            return;
31891        }
31892        this.timeline.send(runtime.TimelineTransport.getAgent(this, useTLS), callback);
31893    };
31894    return TimelineSender;
31895}());
31896/* harmony default export */ var timeline_sender = (timeline_sender_TimelineSender);
31897
31898// CONCATENATED MODULE: ./src/core/channels/channel.ts
31899var channel_extends = ( false) || (function () {
31900    var extendStatics = function (d, b) {
31901        extendStatics = Object.setPrototypeOf ||
31902            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31903            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
31904        return extendStatics(d, b);
31905    };
31906    return function (d, b) {
31907        extendStatics(d, b);
31908        function __() { this.constructor = d; }
31909        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31910    };
31911})();
31912
31913
31914
31915
31916
31917var channel_Channel = (function (_super) {
31918    channel_extends(Channel, _super);
31919    function Channel(name, pusher) {
31920        var _this = _super.call(this, function (event, data) {
31921            logger.debug('No callbacks on ' + name + ' for ' + event);
31922        }) || this;
31923        _this.name = name;
31924        _this.pusher = pusher;
31925        _this.subscribed = false;
31926        _this.subscriptionPending = false;
31927        _this.subscriptionCancelled = false;
31928        return _this;
31929    }
31930    Channel.prototype.authorize = function (socketId, callback) {
31931        return callback(null, { auth: '' });
31932    };
31933    Channel.prototype.trigger = function (event, data) {
31934        if (event.indexOf('client-') !== 0) {
31935            throw new BadEventName("Event '" + event + "' does not start with 'client-'");
31936        }
31937        if (!this.subscribed) {
31938            var suffix = url_store.buildLogSuffix('triggeringClientEvents');
31939            logger.warn("Client event triggered before channel 'subscription_succeeded' event . " + suffix);
31940        }
31941        return this.pusher.send_event(event, data, this.name);
31942    };
31943    Channel.prototype.disconnect = function () {
31944        this.subscribed = false;
31945        this.subscriptionPending = false;
31946    };
31947    Channel.prototype.handleEvent = function (event) {
31948        var eventName = event.event;
31949        var data = event.data;
31950        if (eventName === 'pusher_internal:subscription_succeeded') {
31951            this.handleSubscriptionSucceededEvent(event);
31952        }
31953        else if (eventName === 'pusher_internal:subscription_count') {
31954            this.handleSubscriptionCountEvent(event);
31955        }
31956        else if (eventName.indexOf('pusher_internal:') !== 0) {
31957            var metadata = {};
31958            this.emit(eventName, data, metadata);
31959        }
31960    };
31961    Channel.prototype.handleSubscriptionSucceededEvent = function (event) {
31962        this.subscriptionPending = false;
31963        this.subscribed = true;
31964        if (this.subscriptionCancelled) {
31965            this.pusher.unsubscribe(this.name);
31966        }
31967        else {
31968            this.emit('pusher:subscription_succeeded', event.data);
31969        }
31970    };
31971    Channel.prototype.handleSubscriptionCountEvent = function (event) {
31972        if (event.data.subscription_count) {
31973            this.subscriptionCount = event.data.subscription_count;
31974        }
31975        this.emit('pusher:subscription_count', event.data);
31976    };
31977    Channel.prototype.subscribe = function () {
31978        var _this = this;
31979        if (this.subscribed) {
31980            return;
31981        }
31982        this.subscriptionPending = true;
31983        this.subscriptionCancelled = false;
31984        this.authorize(this.pusher.connection.socket_id, function (error, data) {
31985            if (error) {
31986                _this.subscriptionPending = false;
31987                logger.error(error.toString());
31988                _this.emit('pusher:subscription_error', Object.assign({}, {
31989                    type: 'AuthError',
31990                    error: error.message
31991                }, error instanceof HTTPAuthError ? { status: error.status } : {}));
31992            }
31993            else {
31994                _this.pusher.send_event('pusher:subscribe', {
31995                    auth: data.auth,
31996                    channel_data: data.channel_data,
31997                    channel: _this.name
31998                });
31999            }
32000        });
32001    };
32002    Channel.prototype.unsubscribe = function () {
32003        this.subscribed = false;
32004        this.pusher.send_event('pusher:unsubscribe', {
32005            channel: this.name
32006        });
32007    };
32008    Channel.prototype.cancelSubscription = function () {
32009        this.subscriptionCancelled = true;
32010    };
32011    Channel.prototype.reinstateSubscription = function () {
32012        this.subscriptionCancelled = false;
32013    };
32014    return Channel;
32015}(dispatcher));
32016/* harmony default export */ var channels_channel = (channel_Channel);
32017
32018// CONCATENATED MODULE: ./src/core/channels/private_channel.ts
32019var private_channel_extends = ( false) || (function () {
32020    var extendStatics = function (d, b) {
32021        extendStatics = Object.setPrototypeOf ||
32022            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32023            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
32024        return extendStatics(d, b);
32025    };
32026    return function (d, b) {
32027        extendStatics(d, b);
32028        function __() { this.constructor = d; }
32029        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32030    };
32031})();
32032
32033var PrivateChannel = (function (_super) {
32034    private_channel_extends(PrivateChannel, _super);
32035    function PrivateChannel() {
32036        return _super !== null && _super.apply(this, arguments) || this;
32037    }
32038    PrivateChannel.prototype.authorize = function (socketId, callback) {
32039        return this.pusher.config.channelAuthorizer({
32040            channelName: this.name,
32041            socketId: socketId
32042        }, callback);
32043    };
32044    return PrivateChannel;
32045}(channels_channel));
32046/* harmony default export */ var private_channel = (PrivateChannel);
32047
32048// CONCATENATED MODULE: ./src/core/channels/members.ts
32049
32050var members_Members = (function () {
32051    function Members() {
32052        this.reset();
32053    }
32054    Members.prototype.get = function (id) {
32055        if (Object.prototype.hasOwnProperty.call(this.members, id)) {
32056            return {
32057                id: id,
32058                info: this.members[id]
32059            };
32060        }
32061        else {
32062            return null;
32063        }
32064    };
32065    Members.prototype.each = function (callback) {
32066        var _this = this;
32067        objectApply(this.members, function (member, id) {
32068            callback(_this.get(id));
32069        });
32070    };
32071    Members.prototype.setMyID = function (id) {
32072        this.myID = id;
32073    };
32074    Members.prototype.onSubscription = function (subscriptionData) {
32075        this.members = subscriptionData.presence.hash;
32076        this.count = subscriptionData.presence.count;
32077        this.me = this.get(this.myID);
32078    };
32079    Members.prototype.addMember = function (memberData) {
32080        if (this.get(memberData.user_id) === null) {
32081            this.count++;
32082        }
32083        this.members[memberData.user_id] = memberData.user_info;
32084        return this.get(memberData.user_id);
32085    };
32086    Members.prototype.removeMember = function (memberData) {
32087        var member = this.get(memberData.user_id);
32088        if (member) {
32089            delete this.members[memberData.user_id];
32090            this.count--;
32091        }
32092        return member;
32093    };
32094    Members.prototype.reset = function () {
32095        this.members = {};
32096        this.count = 0;
32097        this.myID = null;
32098        this.me = null;
32099    };
32100    return Members;
32101}());
32102/* harmony default export */ var members = (members_Members);
32103
32104// CONCATENATED MODULE: ./src/core/channels/presence_channel.ts
32105var presence_channel_extends = ( false) || (function () {
32106    var extendStatics = function (d, b) {
32107        extendStatics = Object.setPrototypeOf ||
32108            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32109            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
32110        return extendStatics(d, b);
32111    };
32112    return function (d, b) {
32113        extendStatics(d, b);
32114        function __() { this.constructor = d; }
32115        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32116    };
32117})();
32118var __awaiter = ( false) || function (thisArg, _arguments, P, generator) {
32119    return new (P || (P = Promise))(function (resolve, reject) {
32120        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32121        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32122        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
32123        step((generator = generator.apply(thisArg, _arguments || [])).next());
32124    });
32125};
32126var __generator = ( false) || function (thisArg, body) {
32127    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
32128    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
32129    function verb(n) { return function (v) { return step([n, v]); }; }
32130    function step(op) {
32131        if (f) throw new TypeError("Generator is already executing.");
32132        while (_) try {
32133            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
32134            if (y = 0, t) op = [op[0] & 2, t.value];
32135            switch (op[0]) {
32136                case 0: case 1: t = op; break;
32137                case 4: _.label++; return { value: op[1], done: false };
32138                case 5: _.label++; y = op[1]; op = [0]; continue;
32139                case 7: op = _.ops.pop(); _.trys.pop(); continue;
32140                default:
32141                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
32142                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
32143                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
32144                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
32145                    if (t[2]) _.ops.pop();
32146                    _.trys.pop(); continue;
32147            }
32148            op = body.call(thisArg, _);
32149        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
32150        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
32151    }
32152};
32153
32154
32155
32156
32157var presence_channel_PresenceChannel = (function (_super) {
32158    presence_channel_extends(PresenceChannel, _super);
32159    function PresenceChannel(name, pusher) {
32160        var _this = _super.call(this, name, pusher) || this;
32161        _this.members = new members();
32162        return _this;
32163    }
32164    PresenceChannel.prototype.authorize = function (socketId, callback) {
32165        var _this = this;
32166        _super.prototype.authorize.call(this, socketId, function (error, authData) { return __awaiter(_this, void 0, void 0, function () {
32167            var channelData, suffix;
32168            return __generator(this, function (_a) {
32169                switch (_a.label) {
32170                    case 0:
32171                        if (!!error) return [3, 3];
32172                        authData = authData;
32173                        if (!(authData.channel_data != null)) return [3, 1];
32174                        channelData = JSON.parse(authData.channel_data);
32175                        this.members.setMyID(channelData.user_id);
32176                        return [3, 3];
32177                    case 1: return [4, this.pusher.user.signinDonePromise];
32178                    case 2:
32179                        _a.sent();
32180                        if (this.pusher.user.user_data != null) {
32181                            this.members.setMyID(this.pusher.user.user_data.id);
32182                        }
32183                        else {
32184                            suffix = url_store.buildLogSuffix('authorizationEndpoint');
32185                            logger.error("Invalid auth response for channel '" + this.name + "', " +
32186                                ("expected 'channel_data' field. " + suffix + ", ") +
32187                                "or the user should be signed in.");
32188                            callback('Invalid auth response');
32189                            return [2];
32190                        }
32191                        _a.label = 3;
32192                    case 3:
32193                        callback(error, authData);
32194                        return [2];
32195                }
32196            });
32197        }); });
32198    };
32199    PresenceChannel.prototype.handleEvent = function (event) {
32200        var eventName = event.event;
32201        if (eventName.indexOf('pusher_internal:') === 0) {
32202            this.handleInternalEvent(event);
32203        }
32204        else {
32205            var data = event.data;
32206            var metadata = {};
32207            if (event.user_id) {
32208                metadata.user_id = event.user_id;
32209            }
32210            this.emit(eventName, data, metadata);
32211        }
32212    };
32213    PresenceChannel.prototype.handleInternalEvent = function (event) {
32214        var eventName = event.event;
32215        var data = event.data;
32216        switch (eventName) {
32217            case 'pusher_internal:subscription_succeeded':
32218                this.handleSubscriptionSucceededEvent(event);
32219                break;
32220            case 'pusher_internal:subscription_count':
32221                this.handleSubscriptionCountEvent(event);
32222                break;
32223            case 'pusher_internal:member_added':
32224                var addedMember = this.members.addMember(data);
32225                this.emit('pusher:member_added', addedMember);
32226                break;
32227            case 'pusher_internal:member_removed':
32228                var removedMember = this.members.removeMember(data);
32229                if (removedMember) {
32230                    this.emit('pusher:member_removed', removedMember);
32231                }
32232                break;
32233        }
32234    };
32235    PresenceChannel.prototype.handleSubscriptionSucceededEvent = function (event) {
32236        this.subscriptionPending = false;
32237        this.subscribed = true;
32238        if (this.subscriptionCancelled) {
32239            this.pusher.unsubscribe(this.name);
32240        }
32241        else {
32242            this.members.onSubscription(event.data);
32243            this.emit('pusher:subscription_succeeded', this.members);
32244        }
32245    };
32246    PresenceChannel.prototype.disconnect = function () {
32247        this.members.reset();
32248        _super.prototype.disconnect.call(this);
32249    };
32250    return PresenceChannel;
32251}(private_channel));
32252/* harmony default export */ var presence_channel = (presence_channel_PresenceChannel);
32253
32254// EXTERNAL MODULE: ./node_modules/@stablelib/utf8/lib/utf8.js
32255var utf8 = __nested_webpack_require_20105__(1);
32256
32257// EXTERNAL MODULE: ./node_modules/@stablelib/base64/lib/base64.js
32258var base64 = __nested_webpack_require_20105__(0);
32259
32260// CONCATENATED MODULE: ./src/core/channels/encrypted_channel.ts
32261var encrypted_channel_extends = ( false) || (function () {
32262    var extendStatics = function (d, b) {
32263        extendStatics = Object.setPrototypeOf ||
32264            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32265            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
32266        return extendStatics(d, b);
32267    };
32268    return function (d, b) {
32269        extendStatics(d, b);
32270        function __() { this.constructor = d; }
32271        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32272    };
32273})();
32274
32275
32276
32277
32278
32279var encrypted_channel_EncryptedChannel = (function (_super) {
32280    encrypted_channel_extends(EncryptedChannel, _super);
32281    function EncryptedChannel(name, pusher, nacl) {
32282        var _this = _super.call(this, name, pusher) || this;
32283        _this.key = null;
32284        _this.nacl = nacl;
32285        return _this;
32286    }
32287    EncryptedChannel.prototype.authorize = function (socketId, callback) {
32288        var _this = this;
32289        _super.prototype.authorize.call(this, socketId, function (error, authData) {
32290            if (error) {
32291                callback(error, authData);
32292                return;
32293            }
32294            var sharedSecret = authData['shared_secret'];
32295            if (!sharedSecret) {
32296                callback(new Error("No shared_secret key in auth payload for encrypted channel: " + _this.name), null);
32297                return;
32298            }
32299            _this.key = Object(base64["decode"])(sharedSecret);
32300            delete authData['shared_secret'];
32301            callback(null, authData);
32302        });
32303    };
32304    EncryptedChannel.prototype.trigger = function (event, data) {
32305        throw new UnsupportedFeature('Client events are not currently supported for encrypted channels');
32306    };
32307    EncryptedChannel.prototype.handleEvent = function (event) {
32308        var eventName = event.event;
32309        var data = event.data;
32310        if (eventName.indexOf('pusher_internal:') === 0 ||
32311            eventName.indexOf('pusher:') === 0) {
32312            _super.prototype.handleEvent.call(this, event);
32313            return;
32314        }
32315        this.handleEncryptedEvent(eventName, data);
32316    };
32317    EncryptedChannel.prototype.handleEncryptedEvent = function (event, data) {
32318        var _this = this;
32319        if (!this.key) {
32320            logger.debug('Received encrypted event before key has been retrieved from the authEndpoint');
32321            return;
32322        }
32323        if (!data.ciphertext || !data.nonce) {
32324            logger.error('Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: ' +
32325                data);
32326            return;
32327        }
32328        var cipherText = Object(base64["decode"])(data.ciphertext);
32329        if (cipherText.length < this.nacl.secretbox.overheadLength) {
32330            logger.error("Expected encrypted event ciphertext length to be " + this.nacl.secretbox.overheadLength + ", got: " + cipherText.length);
32331            return;
32332        }
32333        var nonce = Object(base64["decode"])(data.nonce);
32334        if (nonce.length < this.nacl.secretbox.nonceLength) {
32335            logger.error("Expected encrypted event nonce length to be " + this.nacl.secretbox.nonceLength + ", got: " + nonce.length);
32336            return;
32337        }
32338        var bytes = this.nacl.secretbox.open(cipherText, nonce, this.key);
32339        if (bytes === null) {
32340            logger.debug('Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint...');
32341            this.authorize(this.pusher.connection.socket_id, function (error, authData) {
32342                if (error) {
32343                    logger.error("Failed to make a request to the authEndpoint: " + authData + ". Unable to fetch new key, so dropping encrypted event");
32344                    return;
32345                }
32346                bytes = _this.nacl.secretbox.open(cipherText, nonce, _this.key);
32347                if (bytes === null) {
32348                    logger.error("Failed to decrypt event with new key. Dropping encrypted event");
32349                    return;
32350                }
32351                _this.emit(event, _this.getDataToEmit(bytes));
32352                return;
32353            });
32354            return;
32355        }
32356        this.emit(event, this.getDataToEmit(bytes));
32357    };
32358    EncryptedChannel.prototype.getDataToEmit = function (bytes) {
32359        var raw = Object(utf8["decode"])(bytes);
32360        try {
32361            return JSON.parse(raw);
32362        }
32363        catch (_a) {
32364            return raw;
32365        }
32366    };
32367    return EncryptedChannel;
32368}(private_channel));
32369/* harmony default export */ var encrypted_channel = (encrypted_channel_EncryptedChannel);
32370
32371// CONCATENATED MODULE: ./src/core/connection/connection_manager.ts
32372var connection_manager_extends = ( false) || (function () {
32373    var extendStatics = function (d, b) {
32374        extendStatics = Object.setPrototypeOf ||
32375            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32376            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
32377        return extendStatics(d, b);
32378    };
32379    return function (d, b) {
32380        extendStatics(d, b);
32381        function __() { this.constructor = d; }
32382        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32383    };
32384})();
32385
32386
32387
32388
32389
32390var connection_manager_ConnectionManager = (function (_super) {
32391    connection_manager_extends(ConnectionManager, _super);
32392    function ConnectionManager(key, options) {
32393        var _this = _super.call(this) || this;
32394        _this.state = 'initialized';
32395        _this.connection = null;
32396        _this.key = key;
32397        _this.options = options;
32398        _this.timeline = _this.options.timeline;
32399        _this.usingTLS = _this.options.useTLS;
32400        _this.errorCallbacks = _this.buildErrorCallbacks();
32401        _this.connectionCallbacks = _this.buildConnectionCallbacks(_this.errorCallbacks);
32402        _this.handshakeCallbacks = _this.buildHandshakeCallbacks(_this.errorCallbacks);
32403        var Network = runtime.getNetwork();
32404        Network.bind('online', function () {
32405            _this.timeline.info({ netinfo: 'online' });
32406            if (_this.state === 'connecting' || _this.state === 'unavailable') {
32407                _this.retryIn(0);
32408            }
32409        });
32410        Network.bind('offline', function () {
32411            _this.timeline.info({ netinfo: 'offline' });
32412            if (_this.connection) {
32413                _this.sendActivityCheck();
32414            }
32415        });
32416        _this.updateStrategy();
32417        return _this;
32418    }
32419    ConnectionManager.prototype.connect = function () {
32420        if (this.connection || this.runner) {
32421            return;
32422        }
32423        if (!this.strategy.isSupported()) {
32424            this.updateState('failed');
32425            return;
32426        }
32427        this.updateState('connecting');
32428        this.startConnecting();
32429        this.setUnavailableTimer();
32430    };
32431    ConnectionManager.prototype.send = function (data) {
32432        if (this.connection) {
32433            return this.connection.send(data);
32434        }
32435        else {
32436            return false;
32437        }
32438    };
32439    ConnectionManager.prototype.send_event = function (name, data, channel) {
32440        if (this.connection) {
32441            return this.connection.send_event(name, data, channel);
32442        }
32443        else {
32444            return false;
32445        }
32446    };
32447    ConnectionManager.prototype.disconnect = function () {
32448        this.disconnectInternally();
32449        this.updateState('disconnected');
32450    };
32451    ConnectionManager.prototype.isUsingTLS = function () {
32452        return this.usingTLS;
32453    };
32454    ConnectionManager.prototype.startConnecting = function () {
32455        var _this = this;
32456        var callback = function (error, handshake) {
32457            if (error) {
32458                _this.runner = _this.strategy.connect(0, callback);
32459            }
32460            else {
32461                if (handshake.action === 'error') {
32462                    _this.emit('error', {
32463                        type: 'HandshakeError',
32464                        error: handshake.error
32465                    });
32466                    _this.timeline.error({ handshakeError: handshake.error });
32467                }
32468                else {
32469                    _this.abortConnecting();
32470                    _this.handshakeCallbacks[handshake.action](handshake);
32471                }
32472            }
32473        };
32474        this.runner = this.strategy.connect(0, callback);
32475    };
32476    ConnectionManager.prototype.abortConnecting = function () {
32477        if (this.runner) {
32478            this.runner.abort();
32479            this.runner = null;
32480        }
32481    };
32482    ConnectionManager.prototype.disconnectInternally = function () {
32483        this.abortConnecting();
32484        this.clearRetryTimer();
32485        this.clearUnavailableTimer();
32486        if (this.connection) {
32487            var connection = this.abandonConnection();
32488            connection.close();
32489        }
32490    };
32491    ConnectionManager.prototype.updateStrategy = function () {
32492        this.strategy = this.options.getStrategy({
32493            key: this.key,
32494            timeline: this.timeline,
32495            useTLS: this.usingTLS
32496        });
32497    };
32498    ConnectionManager.prototype.retryIn = function (delay) {
32499        var _this = this;
32500        this.timeline.info({ action: 'retry', delay: delay });
32501        if (delay > 0) {
32502            this.emit('connecting_in', Math.round(delay / 1000));
32503        }
32504        this.retryTimer = new OneOffTimer(delay || 0, function () {
32505            _this.disconnectInternally();
32506            _this.connect();
32507        });
32508    };
32509    ConnectionManager.prototype.clearRetryTimer = function () {
32510        if (this.retryTimer) {
32511            this.retryTimer.ensureAborted();
32512            this.retryTimer = null;
32513        }
32514    };
32515    ConnectionManager.prototype.setUnavailableTimer = function () {
32516        var _this = this;
32517        this.unavailableTimer = new OneOffTimer(this.options.unavailableTimeout, function () {
32518            _this.updateState('unavailable');
32519        });
32520    };
32521    ConnectionManager.prototype.clearUnavailableTimer = function () {
32522        if (this.unavailableTimer) {
32523            this.unavailableTimer.ensureAborted();
32524        }
32525    };
32526    ConnectionManager.prototype.sendActivityCheck = function () {
32527        var _this = this;
32528        this.stopActivityCheck();
32529        this.connection.ping();
32530        this.activityTimer = new OneOffTimer(this.options.pongTimeout, function () {
32531            _this.timeline.error({ pong_timed_out: _this.options.pongTimeout });
32532            _this.retryIn(0);
32533        });
32534    };
32535    ConnectionManager.prototype.resetActivityCheck = function () {
32536        var _this = this;
32537        this.stopActivityCheck();
32538        if (this.connection && !this.connection.handlesActivityChecks()) {
32539            this.activityTimer = new OneOffTimer(this.activityTimeout, function () {
32540                _this.sendActivityCheck();
32541            });
32542        }
32543    };
32544    ConnectionManager.prototype.stopActivityCheck = function () {
32545        if (this.activityTimer) {
32546            this.activityTimer.ensureAborted();
32547        }
32548    };
32549    ConnectionManager.prototype.buildConnectionCallbacks = function (errorCallbacks) {
32550        var _this = this;
32551        return extend({}, errorCallbacks, {
32552            message: function (message) {
32553                _this.resetActivityCheck();
32554                _this.emit('message', message);
32555            },
32556            ping: function () {
32557                _this.send_event('pusher:pong', {});
32558            },
32559            activity: function () {
32560                _this.resetActivityCheck();
32561            },
32562            error: function (error) {
32563                _this.emit('error', error);
32564            },
32565            closed: function () {
32566                _this.abandonConnection();
32567                if (_this.shouldRetry()) {
32568                    _this.retryIn(1000);
32569                }
32570            }
32571        });
32572    };
32573    ConnectionManager.prototype.buildHandshakeCallbacks = function (errorCallbacks) {
32574        var _this = this;
32575        return extend({}, errorCallbacks, {
32576            connected: function (handshake) {
32577                _this.activityTimeout = Math.min(_this.options.activityTimeout, handshake.activityTimeout, handshake.connection.activityTimeout || Infinity);
32578                _this.clearUnavailableTimer();
32579                _this.setConnection(handshake.connection);
32580                _this.socket_id = _this.connection.id;
32581                _this.updateState('connected', { socket_id: _this.socket_id });
32582            }
32583        });
32584    };
32585    ConnectionManager.prototype.buildErrorCallbacks = function () {
32586        var _this = this;
32587        var withErrorEmitted = function (callback) {
32588            return function (result) {
32589                if (result.error) {
32590                    _this.emit('error', { type: 'WebSocketError', error: result.error });
32591                }
32592                callback(result);
32593            };
32594        };
32595        return {
32596            tls_only: withErrorEmitted(function () {
32597                _this.usingTLS = true;
32598                _this.updateStrategy();
32599                _this.retryIn(0);
32600            }),
32601            refused: withErrorEmitted(function () {
32602                _this.disconnect();
32603            }),
32604            backoff: withErrorEmitted(function () {
32605                _this.retryIn(1000);
32606            }),
32607            retry: withErrorEmitted(function () {
32608                _this.retryIn(0);
32609            })
32610        };
32611    };
32612    ConnectionManager.prototype.setConnection = function (connection) {
32613        this.connection = connection;
32614        for (var event in this.connectionCallbacks) {
32615            this.connection.bind(event, this.connectionCallbacks[event]);
32616        }
32617        this.resetActivityCheck();
32618    };
32619    ConnectionManager.prototype.abandonConnection = function () {
32620        if (!this.connection) {
32621            return;
32622        }
32623        this.stopActivityCheck();
32624        for (var event in this.connectionCallbacks) {
32625            this.connection.unbind(event, this.connectionCallbacks[event]);
32626        }
32627        var connection = this.connection;
32628        this.connection = null;
32629        return connection;
32630    };
32631    ConnectionManager.prototype.updateState = function (newState, data) {
32632        var previousState = this.state;
32633        this.state = newState;
32634        if (previousState !== newState) {
32635            var newStateDescription = newState;
32636            if (newStateDescription === 'connected') {
32637                newStateDescription += ' with new socket ID ' + data.socket_id;
32638            }
32639            logger.debug('State changed', previousState + ' -> ' + newStateDescription);
32640            this.timeline.info({ state: newState, params: data });
32641            this.emit('state_change', { previous: previousState, current: newState });
32642            this.emit(newState, data);
32643        }
32644    };
32645    ConnectionManager.prototype.shouldRetry = function () {
32646        return this.state === 'connecting' || this.state === 'connected';
32647    };
32648    return ConnectionManager;
32649}(dispatcher));
32650/* harmony default export */ var connection_manager = (connection_manager_ConnectionManager);
32651
32652// CONCATENATED MODULE: ./src/core/channels/channels.ts
32653
32654
32655
32656
32657var channels_Channels = (function () {
32658    function Channels() {
32659        this.channels = {};
32660    }
32661    Channels.prototype.add = function (name, pusher) {
32662        if (!this.channels[name]) {
32663            this.channels[name] = createChannel(name, pusher);
32664        }
32665        return this.channels[name];
32666    };
32667    Channels.prototype.all = function () {
32668        return values(this.channels);
32669    };
32670    Channels.prototype.find = function (name) {
32671        return this.channels[name];
32672    };
32673    Channels.prototype.remove = function (name) {
32674        var channel = this.channels[name];
32675        delete this.channels[name];
32676        return channel;
32677    };
32678    Channels.prototype.disconnect = function () {
32679        objectApply(this.channels, function (channel) {
32680            channel.disconnect();
32681        });
32682    };
32683    return Channels;
32684}());
32685/* harmony default export */ var channels = (channels_Channels);
32686function createChannel(name, pusher) {
32687    if (name.indexOf('private-encrypted-') === 0) {
32688        if (pusher.config.nacl) {
32689            return factory.createEncryptedChannel(name, pusher, pusher.config.nacl);
32690        }
32691        var errMsg = 'Tried to subscribe to a private-encrypted- channel but no nacl implementation available';
32692        var suffix = url_store.buildLogSuffix('encryptedChannelSupport');
32693        throw new UnsupportedFeature(errMsg + ". " + suffix);
32694    }
32695    else if (name.indexOf('private-') === 0) {
32696        return factory.createPrivateChannel(name, pusher);
32697    }
32698    else if (name.indexOf('presence-') === 0) {
32699        return factory.createPresenceChannel(name, pusher);
32700    }
32701    else if (name.indexOf('#') === 0) {
32702        throw new BadChannelName('Cannot create a channel with name "' + name + '".');
32703    }
32704    else {
32705        return factory.createChannel(name, pusher);
32706    }
32707}
32708
32709// CONCATENATED MODULE: ./src/core/utils/factory.ts
32710
32711
32712
32713
32714
32715
32716
32717
32718
32719var Factory = {
32720    createChannels: function () {
32721        return new channels();
32722    },
32723    createConnectionManager: function (key, options) {
32724        return new connection_manager(key, options);
32725    },
32726    createChannel: function (name, pusher) {
32727        return new channels_channel(name, pusher);
32728    },
32729    createPrivateChannel: function (name, pusher) {
32730        return new private_channel(name, pusher);
32731    },
32732    createPresenceChannel: function (name, pusher) {
32733        return new presence_channel(name, pusher);
32734    },
32735    createEncryptedChannel: function (name, pusher, nacl) {
32736        return new encrypted_channel(name, pusher, nacl);
32737    },
32738    createTimelineSender: function (timeline, options) {
32739        return new timeline_sender(timeline, options);
32740    },
32741    createHandshake: function (transport, callback) {
32742        return new connection_handshake(transport, callback);
32743    },
32744    createAssistantToTheTransportManager: function (manager, transport, options) {
32745        return new assistant_to_the_transport_manager(manager, transport, options);
32746    }
32747};
32748/* harmony default export */ var factory = (Factory);
32749
32750// CONCATENATED MODULE: ./src/core/transports/transport_manager.ts
32751
32752var transport_manager_TransportManager = (function () {
32753    function TransportManager(options) {
32754        this.options = options || {};
32755        this.livesLeft = this.options.lives || Infinity;
32756    }
32757    TransportManager.prototype.getAssistant = function (transport) {
32758        return factory.createAssistantToTheTransportManager(this, transport, {
32759            minPingDelay: this.options.minPingDelay,
32760            maxPingDelay: this.options.maxPingDelay
32761        });
32762    };
32763    TransportManager.prototype.isAlive = function () {
32764        return this.livesLeft > 0;
32765    };
32766    TransportManager.prototype.reportDeath = function () {
32767        this.livesLeft -= 1;
32768    };
32769    return TransportManager;
32770}());
32771/* harmony default export */ var transport_manager = (transport_manager_TransportManager);
32772
32773// CONCATENATED MODULE: ./src/core/strategies/sequential_strategy.ts
32774
32775
32776
32777var sequential_strategy_SequentialStrategy = (function () {
32778    function SequentialStrategy(strategies, options) {
32779        this.strategies = strategies;
32780        this.loop = Boolean(options.loop);
32781        this.failFast = Boolean(options.failFast);
32782        this.timeout = options.timeout;
32783        this.timeoutLimit = options.timeoutLimit;
32784    }
32785    SequentialStrategy.prototype.isSupported = function () {
32786        return any(this.strategies, util.method('isSupported'));
32787    };
32788    SequentialStrategy.prototype.connect = function (minPriority, callback) {
32789        var _this = this;
32790        var strategies = this.strategies;
32791        var current = 0;
32792        var timeout = this.timeout;
32793        var runner = null;
32794        var tryNextStrategy = function (error, handshake) {
32795            if (handshake) {
32796                callback(null, handshake);
32797            }
32798            else {
32799                current = current + 1;
32800                if (_this.loop) {
32801                    current = current % strategies.length;
32802                }
32803                if (current < strategies.length) {
32804                    if (timeout) {
32805                        timeout = timeout * 2;
32806                        if (_this.timeoutLimit) {
32807                            timeout = Math.min(timeout, _this.timeoutLimit);
32808                        }
32809                    }
32810                    runner = _this.tryStrategy(strategies[current], minPriority, { timeout: timeout, failFast: _this.failFast }, tryNextStrategy);
32811                }
32812                else {
32813                    callback(true);
32814                }
32815            }
32816        };
32817        runner = this.tryStrategy(strategies[current], minPriority, { timeout: timeout, failFast: this.failFast }, tryNextStrategy);
32818        return {
32819            abort: function () {
32820                runner.abort();
32821            },
32822            forceMinPriority: function (p) {
32823                minPriority = p;
32824                if (runner) {
32825                    runner.forceMinPriority(p);
32826                }
32827            }
32828        };
32829    };
32830    SequentialStrategy.prototype.tryStrategy = function (strategy, minPriority, options, callback) {
32831        var timer = null;
32832        var runner = null;
32833        if (options.timeout > 0) {
32834            timer = new OneOffTimer(options.timeout, function () {
32835                runner.abort();
32836                callback(true);
32837            });
32838        }
32839        runner = strategy.connect(minPriority, function (error, handshake) {
32840            if (error && timer && timer.isRunning() && !options.failFast) {
32841                return;
32842            }
32843            if (timer) {
32844                timer.ensureAborted();
32845            }
32846            callback(error, handshake);
32847        });
32848        return {
32849            abort: function () {
32850                if (timer) {
32851                    timer.ensureAborted();
32852                }
32853                runner.abort();
32854            },
32855            forceMinPriority: function (p) {
32856                runner.forceMinPriority(p);
32857            }
32858        };
32859    };
32860    return SequentialStrategy;
32861}());
32862/* harmony default export */ var sequential_strategy = (sequential_strategy_SequentialStrategy);
32863
32864// CONCATENATED MODULE: ./src/core/strategies/best_connected_ever_strategy.ts
32865
32866
32867var best_connected_ever_strategy_BestConnectedEverStrategy = (function () {
32868    function BestConnectedEverStrategy(strategies) {
32869        this.strategies = strategies;
32870    }
32871    BestConnectedEverStrategy.prototype.isSupported = function () {
32872        return any(this.strategies, util.method('isSupported'));
32873    };
32874    BestConnectedEverStrategy.prototype.connect = function (minPriority, callback) {
32875        return connect(this.strategies, minPriority, function (i, runners) {
32876            return function (error, handshake) {
32877                runners[i].error = error;
32878                if (error) {
32879                    if (allRunnersFailed(runners)) {
32880                        callback(true);
32881                    }
32882                    return;
32883                }
32884                apply(runners, function (runner) {
32885                    runner.forceMinPriority(handshake.transport.priority);
32886                });
32887                callback(null, handshake);
32888            };
32889        });
32890    };
32891    return BestConnectedEverStrategy;
32892}());
32893/* harmony default export */ var best_connected_ever_strategy = (best_connected_ever_strategy_BestConnectedEverStrategy);
32894function connect(strategies, minPriority, callbackBuilder) {
32895    var runners = map(strategies, function (strategy, i, _, rs) {
32896        return strategy.connect(minPriority, callbackBuilder(i, rs));
32897    });
32898    return {
32899        abort: function () {
32900            apply(runners, abortRunner);
32901        },
32902        forceMinPriority: function (p) {
32903            apply(runners, function (runner) {
32904                runner.forceMinPriority(p);
32905            });
32906        }
32907    };
32908}
32909function allRunnersFailed(runners) {
32910    return collections_all(runners, function (runner) {
32911        return Boolean(runner.error);
32912    });
32913}
32914function abortRunner(runner) {
32915    if (!runner.error && !runner.aborted) {
32916        runner.abort();
32917        runner.aborted = true;
32918    }
32919}
32920
32921// CONCATENATED MODULE: ./src/core/strategies/cached_strategy.ts
32922
32923
32924
32925
32926var cached_strategy_CachedStrategy = (function () {
32927    function CachedStrategy(strategy, transports, options) {
32928        this.strategy = strategy;
32929        this.transports = transports;
32930        this.ttl = options.ttl || 1800 * 1000;
32931        this.usingTLS = options.useTLS;
32932        this.timeline = options.timeline;
32933    }
32934    CachedStrategy.prototype.isSupported = function () {
32935        return this.strategy.isSupported();
32936    };
32937    CachedStrategy.prototype.connect = function (minPriority, callback) {
32938        var usingTLS = this.usingTLS;
32939        var info = fetchTransportCache(usingTLS);
32940        var strategies = [this.strategy];
32941        if (info && info.timestamp + this.ttl >= util.now()) {
32942            var transport = this.transports[info.transport];
32943            if (transport) {
32944                this.timeline.info({
32945                    cached: true,
32946                    transport: info.transport,
32947                    latency: info.latency
32948                });
32949                strategies.push(new sequential_strategy([transport], {
32950                    timeout: info.latency * 2 + 1000,
32951                    failFast: true
32952                }));
32953            }
32954        }
32955        var startTimestamp = util.now();
32956        var runner = strategies
32957            .pop()
32958            .connect(minPriority, function cb(error, handshake) {
32959            if (error) {
32960                flushTransportCache(usingTLS);
32961                if (strategies.length > 0) {
32962                    startTimestamp = util.now();
32963                    runner = strategies.pop().connect(minPriority, cb);
32964                }
32965                else {
32966                    callback(error);
32967                }
32968            }
32969            else {
32970                storeTransportCache(usingTLS, handshake.transport.name, util.now() - startTimestamp);
32971                callback(null, handshake);
32972            }
32973        });
32974        return {
32975            abort: function () {
32976                runner.abort();
32977            },
32978            forceMinPriority: function (p) {
32979                minPriority = p;
32980                if (runner) {
32981                    runner.forceMinPriority(p);
32982                }
32983            }
32984        };
32985    };
32986    return CachedStrategy;
32987}());
32988/* harmony default export */ var cached_strategy = (cached_strategy_CachedStrategy);
32989function getTransportCacheKey(usingTLS) {
32990    return 'pusherTransport' + (usingTLS ? 'TLS' : 'NonTLS');
32991}
32992function fetchTransportCache(usingTLS) {
32993    var storage = runtime.getLocalStorage();
32994    if (storage) {
32995        try {
32996            var serializedCache = storage[getTransportCacheKey(usingTLS)];
32997            if (serializedCache) {
32998                return JSON.parse(serializedCache);
32999            }
33000        }
33001        catch (e) {
33002            flushTransportCache(usingTLS);
33003        }
33004    }
33005    return null;
33006}
33007function storeTransportCache(usingTLS, transport, latency) {
33008    var storage = runtime.getLocalStorage();
33009    if (storage) {
33010        try {
33011            storage[getTransportCacheKey(usingTLS)] = safeJSONStringify({
33012                timestamp: util.now(),
33013                transport: transport,
33014                latency: latency
33015            });
33016        }
33017        catch (e) {
33018        }
33019    }
33020}
33021function flushTransportCache(usingTLS) {
33022    var storage = runtime.getLocalStorage();
33023    if (storage) {
33024        try {
33025            delete storage[getTransportCacheKey(usingTLS)];
33026        }
33027        catch (e) {
33028        }
33029    }
33030}
33031
33032// CONCATENATED MODULE: ./src/core/strategies/delayed_strategy.ts
33033
33034var delayed_strategy_DelayedStrategy = (function () {
33035    function DelayedStrategy(strategy, _a) {
33036        var number = _a.delay;
33037        this.strategy = strategy;
33038        this.options = { delay: number };
33039    }
33040    DelayedStrategy.prototype.isSupported = function () {
33041        return this.strategy.isSupported();
33042    };
33043    DelayedStrategy.prototype.connect = function (minPriority, callback) {
33044        var strategy = this.strategy;
33045        var runner;
33046        var timer = new OneOffTimer(this.options.delay, function () {
33047            runner = strategy.connect(minPriority, callback);
33048        });
33049        return {
33050            abort: function () {
33051                timer.ensureAborted();
33052                if (runner) {
33053                    runner.abort();
33054                }
33055            },
33056            forceMinPriority: function (p) {
33057                minPriority = p;
33058                if (runner) {
33059                    runner.forceMinPriority(p);
33060                }
33061            }
33062        };
33063    };
33064    return DelayedStrategy;
33065}());
33066/* harmony default export */ var delayed_strategy = (delayed_strategy_DelayedStrategy);
33067
33068// CONCATENATED MODULE: ./src/core/strategies/if_strategy.ts
33069var IfStrategy = (function () {
33070    function IfStrategy(test, trueBranch, falseBranch) {
33071        this.test = test;
33072        this.trueBranch = trueBranch;
33073        this.falseBranch = falseBranch;
33074    }
33075    IfStrategy.prototype.isSupported = function () {
33076        var branch = this.test() ? this.trueBranch : this.falseBranch;
33077        return branch.isSupported();
33078    };
33079    IfStrategy.prototype.connect = function (minPriority, callback) {
33080        var branch = this.test() ? this.trueBranch : this.falseBranch;
33081        return branch.connect(minPriority, callback);
33082    };
33083    return IfStrategy;
33084}());
33085/* harmony default export */ var if_strategy = (IfStrategy);
33086
33087// CONCATENATED MODULE: ./src/core/strategies/first_connected_strategy.ts
33088var FirstConnectedStrategy = (function () {
33089    function FirstConnectedStrategy(strategy) {
33090        this.strategy = strategy;
33091    }
33092    FirstConnectedStrategy.prototype.isSupported = function () {
33093        return this.strategy.isSupported();
33094    };
33095    FirstConnectedStrategy.prototype.connect = function (minPriority, callback) {
33096        var runner = this.strategy.connect(minPriority, function (error, handshake) {
33097            if (handshake) {
33098                runner.abort();
33099            }
33100            callback(error, handshake);
33101        });
33102        return runner;
33103    };
33104    return FirstConnectedStrategy;
33105}());
33106/* harmony default export */ var first_connected_strategy = (FirstConnectedStrategy);
33107
33108// CONCATENATED MODULE: ./src/runtimes/web/default_strategy.ts
33109
33110
33111
33112
33113
33114
33115
33116function testSupportsStrategy(strategy) {
33117    return function () {
33118        return strategy.isSupported();
33119    };
33120}
33121var getDefaultStrategy = function (config, baseOptions, defineTransport) {
33122    var definedTransports = {};
33123    function defineTransportStrategy(name, type, priority, options, manager) {
33124        var transport = defineTransport(config, name, type, priority, options, manager);
33125        definedTransports[name] = transport;
33126        return transport;
33127    }
33128    var ws_options = Object.assign({}, baseOptions, {
33129        hostNonTLS: config.wsHost + ':' + config.wsPort,
33130        hostTLS: config.wsHost + ':' + config.wssPort,
33131        httpPath: config.wsPath
33132    });
33133    var wss_options = Object.assign({}, ws_options, {
33134        useTLS: true
33135    });
33136    var sockjs_options = Object.assign({}, baseOptions, {
33137        hostNonTLS: config.httpHost + ':' + config.httpPort,
33138        hostTLS: config.httpHost + ':' + config.httpsPort,
33139        httpPath: config.httpPath
33140    });
33141    var timeouts = {
33142        loop: true,
33143        timeout: 15000,
33144        timeoutLimit: 60000
33145    };
33146    var ws_manager = new transport_manager({
33147        lives: 2,
33148        minPingDelay: 10000,
33149        maxPingDelay: config.activityTimeout
33150    });
33151    var streaming_manager = new transport_manager({
33152        lives: 2,
33153        minPingDelay: 10000,
33154        maxPingDelay: config.activityTimeout
33155    });
33156    var ws_transport = defineTransportStrategy('ws', 'ws', 3, ws_options, ws_manager);
33157    var wss_transport = defineTransportStrategy('wss', 'ws', 3, wss_options, ws_manager);
33158    var sockjs_transport = defineTransportStrategy('sockjs', 'sockjs', 1, sockjs_options);
33159    var xhr_streaming_transport = defineTransportStrategy('xhr_streaming', 'xhr_streaming', 1, sockjs_options, streaming_manager);
33160    var xdr_streaming_transport = defineTransportStrategy('xdr_streaming', 'xdr_streaming', 1, sockjs_options, streaming_manager);
33161    var xhr_polling_transport = defineTransportStrategy('xhr_polling', 'xhr_polling', 1, sockjs_options);
33162    var xdr_polling_transport = defineTransportStrategy('xdr_polling', 'xdr_polling', 1, sockjs_options);
33163    var ws_loop = new sequential_strategy([ws_transport], timeouts);
33164    var wss_loop = new sequential_strategy([wss_transport], timeouts);
33165    var sockjs_loop = new sequential_strategy([sockjs_transport], timeouts);
33166    var streaming_loop = new sequential_strategy([
33167        new if_strategy(testSupportsStrategy(xhr_streaming_transport), xhr_streaming_transport, xdr_streaming_transport)
33168    ], timeouts);
33169    var polling_loop = new sequential_strategy([
33170        new if_strategy(testSupportsStrategy(xhr_polling_transport), xhr_polling_transport, xdr_polling_transport)
33171    ], timeouts);
33172    var http_loop = new sequential_strategy([
33173        new if_strategy(testSupportsStrategy(streaming_loop), new best_connected_ever_strategy([
33174            streaming_loop,
33175            new delayed_strategy(polling_loop, { delay: 4000 })
33176        ]), polling_loop)
33177    ], timeouts);
33178    var http_fallback_loop = new if_strategy(testSupportsStrategy(http_loop), http_loop, sockjs_loop);
33179    var wsStrategy;
33180    if (baseOptions.useTLS) {
33181        wsStrategy = new best_connected_ever_strategy([
33182            ws_loop,
33183            new delayed_strategy(http_fallback_loop, { delay: 2000 })
33184        ]);
33185    }
33186    else {
33187        wsStrategy = new best_connected_ever_strategy([
33188            ws_loop,
33189            new delayed_strategy(wss_loop, { delay: 2000 }),
33190            new delayed_strategy(http_fallback_loop, { delay: 5000 })
33191        ]);
33192    }
33193    return new cached_strategy(new first_connected_strategy(new if_strategy(testSupportsStrategy(ws_transport), wsStrategy, http_fallback_loop)), definedTransports, {
33194        ttl: 1800000,
33195        timeline: baseOptions.timeline,
33196        useTLS: baseOptions.useTLS
33197    });
33198};
33199/* harmony default export */ var default_strategy = (getDefaultStrategy);
33200
33201// CONCATENATED MODULE: ./src/runtimes/web/transports/transport_connection_initializer.ts
33202
33203/* harmony default export */ var transport_connection_initializer = (function () {
33204    var self = this;
33205    self.timeline.info(self.buildTimelineMessage({
33206        transport: self.name + (self.options.useTLS ? 's' : '')
33207    }));
33208    if (self.hooks.isInitialized()) {
33209        self.changeState('initialized');
33210    }
33211    else if (self.hooks.file) {
33212        self.changeState('initializing');
33213        Dependencies.load(self.hooks.file, { useTLS: self.options.useTLS }, function (error, callback) {
33214            if (self.hooks.isInitialized()) {
33215                self.changeState('initialized');
33216                callback(true);
33217            }
33218            else {
33219                if (error) {
33220                    self.onError(error);
33221                }
33222                self.onClose();
33223                callback(false);
33224            }
33225        });
33226    }
33227    else {
33228        self.onClose();
33229    }
33230});
33231
33232// CONCATENATED MODULE: ./src/runtimes/web/http/http_xdomain_request.ts
33233
33234var http_xdomain_request_hooks = {
33235    getRequest: function (socket) {
33236        var xdr = new window.XDomainRequest();
33237        xdr.ontimeout = function () {
33238            socket.emit('error', new RequestTimedOut());
33239            socket.close();
33240        };
33241        xdr.onerror = function (e) {
33242            socket.emit('error', e);
33243            socket.close();
33244        };
33245        xdr.onprogress = function () {
33246            if (xdr.responseText && xdr.responseText.length > 0) {
33247                socket.onChunk(200, xdr.responseText);
33248            }
33249        };
33250        xdr.onload = function () {
33251            if (xdr.responseText && xdr.responseText.length > 0) {
33252                socket.onChunk(200, xdr.responseText);
33253            }
33254            socket.emit('finished', 200);
33255            socket.close();
33256        };
33257        return xdr;
33258    },
33259    abortRequest: function (xdr) {
33260        xdr.ontimeout = xdr.onerror = xdr.onprogress = xdr.onload = null;
33261        xdr.abort();
33262    }
33263};
33264/* harmony default export */ var http_xdomain_request = (http_xdomain_request_hooks);
33265
33266// CONCATENATED MODULE: ./src/core/http/http_request.ts
33267var http_request_extends = ( false) || (function () {
33268    var extendStatics = function (d, b) {
33269        extendStatics = Object.setPrototypeOf ||
33270            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33271            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33272        return extendStatics(d, b);
33273    };
33274    return function (d, b) {
33275        extendStatics(d, b);
33276        function __() { this.constructor = d; }
33277        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33278    };
33279})();
33280
33281
33282var MAX_BUFFER_LENGTH = 256 * 1024;
33283var http_request_HTTPRequest = (function (_super) {
33284    http_request_extends(HTTPRequest, _super);
33285    function HTTPRequest(hooks, method, url) {
33286        var _this = _super.call(this) || this;
33287        _this.hooks = hooks;
33288        _this.method = method;
33289        _this.url = url;
33290        return _this;
33291    }
33292    HTTPRequest.prototype.start = function (payload) {
33293        var _this = this;
33294        this.position = 0;
33295        this.xhr = this.hooks.getRequest(this);
33296        this.unloader = function () {
33297            _this.close();
33298        };
33299        runtime.addUnloadListener(this.unloader);
33300        this.xhr.open(this.method, this.url, true);
33301        if (this.xhr.setRequestHeader) {
33302            this.xhr.setRequestHeader('Content-Type', 'application/json');
33303        }
33304        this.xhr.send(payload);
33305    };
33306    HTTPRequest.prototype.close = function () {
33307        if (this.unloader) {
33308            runtime.removeUnloadListener(this.unloader);
33309            this.unloader = null;
33310        }
33311        if (this.xhr) {
33312            this.hooks.abortRequest(this.xhr);
33313            this.xhr = null;
33314        }
33315    };
33316    HTTPRequest.prototype.onChunk = function (status, data) {
33317        while (true) {
33318            var chunk = this.advanceBuffer(data);
33319            if (chunk) {
33320                this.emit('chunk', { status: status, data: chunk });
33321            }
33322            else {
33323                break;
33324            }
33325        }
33326        if (this.isBufferTooLong(data)) {
33327            this.emit('buffer_too_long');
33328        }
33329    };
33330    HTTPRequest.prototype.advanceBuffer = function (buffer) {
33331        var unreadData = buffer.slice(this.position);
33332        var endOfLinePosition = unreadData.indexOf('\n');
33333        if (endOfLinePosition !== -1) {
33334            this.position += endOfLinePosition + 1;
33335            return unreadData.slice(0, endOfLinePosition);
33336        }
33337        else {
33338            return null;
33339        }
33340    };
33341    HTTPRequest.prototype.isBufferTooLong = function (buffer) {
33342        return this.position === buffer.length && buffer.length > MAX_BUFFER_LENGTH;
33343    };
33344    return HTTPRequest;
33345}(dispatcher));
33346/* harmony default export */ var http_request = (http_request_HTTPRequest);
33347
33348// CONCATENATED MODULE: ./src/core/http/state.ts
33349var State;
33350(function (State) {
33351    State[State["CONNECTING"] = 0] = "CONNECTING";
33352    State[State["OPEN"] = 1] = "OPEN";
33353    State[State["CLOSED"] = 3] = "CLOSED";
33354})(State || (State = {}));
33355/* harmony default export */ var state = (State);
33356
33357// CONCATENATED MODULE: ./src/core/http/http_socket.ts
33358
33359
33360
33361var autoIncrement = 1;
33362var http_socket_HTTPSocket = (function () {
33363    function HTTPSocket(hooks, url) {
33364        this.hooks = hooks;
33365        this.session = randomNumber(1000) + '/' + randomString(8);
33366        this.location = getLocation(url);
33367        this.readyState = state.CONNECTING;
33368        this.openStream();
33369    }
33370    HTTPSocket.prototype.send = function (payload) {
33371        return this.sendRaw(JSON.stringify([payload]));
33372    };
33373    HTTPSocket.prototype.ping = function () {
33374        this.hooks.sendHeartbeat(this);
33375    };
33376    HTTPSocket.prototype.close = function (code, reason) {
33377        this.onClose(code, reason, true);
33378    };
33379    HTTPSocket.prototype.sendRaw = function (payload) {
33380        if (this.readyState === state.OPEN) {
33381            try {
33382                runtime.createSocketRequest('POST', getUniqueURL(getSendURL(this.location, this.session))).start(payload);
33383                return true;
33384            }
33385            catch (e) {
33386                return false;
33387            }
33388        }
33389        else {
33390            return false;
33391        }
33392    };
33393    HTTPSocket.prototype.reconnect = function () {
33394        this.closeStream();
33395        this.openStream();
33396    };
33397    HTTPSocket.prototype.onClose = function (code, reason, wasClean) {
33398        this.closeStream();
33399        this.readyState = state.CLOSED;
33400        if (this.onclose) {
33401            this.onclose({
33402                code: code,
33403                reason: reason,
33404                wasClean: wasClean
33405            });
33406        }
33407    };
33408    HTTPSocket.prototype.onChunk = function (chunk) {
33409        if (chunk.status !== 200) {
33410            return;
33411        }
33412        if (this.readyState === state.OPEN) {
33413            this.onActivity();
33414        }
33415        var payload;
33416        var type = chunk.data.slice(0, 1);
33417        switch (type) {
33418            case 'o':
33419                payload = JSON.parse(chunk.data.slice(1) || '{}');
33420                this.onOpen(payload);
33421                break;
33422            case 'a':
33423                payload = JSON.parse(chunk.data.slice(1) || '[]');
33424                for (var i = 0; i < payload.length; i++) {
33425                    this.onEvent(payload[i]);
33426                }
33427                break;
33428            case 'm':
33429                payload = JSON.parse(chunk.data.slice(1) || 'null');
33430                this.onEvent(payload);
33431                break;
33432            case 'h':
33433                this.hooks.onHeartbeat(this);
33434                break;
33435            case 'c':
33436                payload = JSON.parse(chunk.data.slice(1) || '[]');
33437                this.onClose(payload[0], payload[1], true);
33438                break;
33439        }
33440    };
33441    HTTPSocket.prototype.onOpen = function (options) {
33442        if (this.readyState === state.CONNECTING) {
33443            if (options && options.hostname) {
33444                this.location.base = replaceHost(this.location.base, options.hostname);
33445            }
33446            this.readyState = state.OPEN;
33447            if (this.onopen) {
33448                this.onopen();
33449            }
33450        }
33451        else {
33452            this.onClose(1006, 'Server lost session', true);
33453        }
33454    };
33455    HTTPSocket.prototype.onEvent = function (event) {
33456        if (this.readyState === state.OPEN && this.onmessage) {
33457            this.onmessage({ data: event });
33458        }
33459    };
33460    HTTPSocket.prototype.onActivity = function () {
33461        if (this.onactivity) {
33462            this.onactivity();
33463        }
33464    };
33465    HTTPSocket.prototype.onError = function (error) {
33466        if (this.onerror) {
33467            this.onerror(error);
33468        }
33469    };
33470    HTTPSocket.prototype.openStream = function () {
33471        var _this = this;
33472        this.stream = runtime.createSocketRequest('POST', getUniqueURL(this.hooks.getReceiveURL(this.location, this.session)));
33473        this.stream.bind('chunk', function (chunk) {
33474            _this.onChunk(chunk);
33475        });
33476        this.stream.bind('finished', function (status) {
33477            _this.hooks.onFinished(_this, status);
33478        });
33479        this.stream.bind('buffer_too_long', function () {
33480            _this.reconnect();
33481        });
33482        try {
33483            this.stream.start();
33484        }
33485        catch (error) {
33486            util.defer(function () {
33487                _this.onError(error);
33488                _this.onClose(1006, 'Could not start streaming', false);
33489            });
33490        }
33491    };
33492    HTTPSocket.prototype.closeStream = function () {
33493        if (this.stream) {
33494            this.stream.unbind_all();
33495            this.stream.close();
33496            this.stream = null;
33497        }
33498    };
33499    return HTTPSocket;
33500}());
33501function getLocation(url) {
33502    var parts = /([^\?]*)\/*(\??.*)/.exec(url);
33503    return {
33504        base: parts[1],
33505        queryString: parts[2]
33506    };
33507}
33508function getSendURL(url, session) {
33509    return url.base + '/' + session + '/xhr_send';
33510}
33511function getUniqueURL(url) {
33512    var separator = url.indexOf('?') === -1 ? '?' : '&';
33513    return url + separator + 't=' + +new Date() + '&n=' + autoIncrement++;
33514}
33515function replaceHost(url, hostname) {
33516    var urlParts = /(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(url);
33517    return urlParts[1] + hostname + urlParts[3];
33518}
33519function randomNumber(max) {
33520    return Math.floor(Math.random() * max);
33521}
33522function randomString(length) {
33523    var result = [];
33524    for (var i = 0; i < length; i++) {
33525        result.push(randomNumber(32).toString(32));
33526    }
33527    return result.join('');
33528}
33529/* harmony default export */ var http_socket = (http_socket_HTTPSocket);
33530
33531// CONCATENATED MODULE: ./src/core/http/http_streaming_socket.ts
33532var http_streaming_socket_hooks = {
33533    getReceiveURL: function (url, session) {
33534        return url.base + '/' + session + '/xhr_streaming' + url.queryString;
33535    },
33536    onHeartbeat: function (socket) {
33537        socket.sendRaw('[]');
33538    },
33539    sendHeartbeat: function (socket) {
33540        socket.sendRaw('[]');
33541    },
33542    onFinished: function (socket, status) {
33543        socket.onClose(1006, 'Connection interrupted (' + status + ')', false);
33544    }
33545};
33546/* harmony default export */ var http_streaming_socket = (http_streaming_socket_hooks);
33547
33548// CONCATENATED MODULE: ./src/core/http/http_polling_socket.ts
33549var http_polling_socket_hooks = {
33550    getReceiveURL: function (url, session) {
33551        return url.base + '/' + session + '/xhr' + url.queryString;
33552    },
33553    onHeartbeat: function () {
33554    },
33555    sendHeartbeat: function (socket) {
33556        socket.sendRaw('[]');
33557    },
33558    onFinished: function (socket, status) {
33559        if (status === 200) {
33560            socket.reconnect();
33561        }
33562        else {
33563            socket.onClose(1006, 'Connection interrupted (' + status + ')', false);
33564        }
33565    }
33566};
33567/* harmony default export */ var http_polling_socket = (http_polling_socket_hooks);
33568
33569// CONCATENATED MODULE: ./src/runtimes/isomorphic/http/http_xhr_request.ts
33570
33571var http_xhr_request_hooks = {
33572    getRequest: function (socket) {
33573        var Constructor = runtime.getXHRAPI();
33574        var xhr = new Constructor();
33575        xhr.onreadystatechange = xhr.onprogress = function () {
33576            switch (xhr.readyState) {
33577                case 3:
33578                    if (xhr.responseText && xhr.responseText.length > 0) {
33579                        socket.onChunk(xhr.status, xhr.responseText);
33580                    }
33581                    break;
33582                case 4:
33583                    if (xhr.responseText && xhr.responseText.length > 0) {
33584                        socket.onChunk(xhr.status, xhr.responseText);
33585                    }
33586                    socket.emit('finished', xhr.status);
33587                    socket.close();
33588                    break;
33589            }
33590        };
33591        return xhr;
33592    },
33593    abortRequest: function (xhr) {
33594        xhr.onreadystatechange = null;
33595        xhr.abort();
33596    }
33597};
33598/* harmony default export */ var http_xhr_request = (http_xhr_request_hooks);
33599
33600// CONCATENATED MODULE: ./src/runtimes/isomorphic/http/http.ts
33601
33602
33603
33604
33605
33606var HTTP = {
33607    createStreamingSocket: function (url) {
33608        return this.createSocket(http_streaming_socket, url);
33609    },
33610    createPollingSocket: function (url) {
33611        return this.createSocket(http_polling_socket, url);
33612    },
33613    createSocket: function (hooks, url) {
33614        return new http_socket(hooks, url);
33615    },
33616    createXHR: function (method, url) {
33617        return this.createRequest(http_xhr_request, method, url);
33618    },
33619    createRequest: function (hooks, method, url) {
33620        return new http_request(hooks, method, url);
33621    }
33622};
33623/* harmony default export */ var http_http = (HTTP);
33624
33625// CONCATENATED MODULE: ./src/runtimes/web/http/http.ts
33626
33627
33628http_http.createXDR = function (method, url) {
33629    return this.createRequest(http_xdomain_request, method, url);
33630};
33631/* harmony default export */ var web_http_http = (http_http);
33632
33633// CONCATENATED MODULE: ./src/runtimes/web/runtime.ts
33634
33635
33636
33637
33638
33639
33640
33641
33642
33643
33644
33645
33646var Runtime = {
33647    nextAuthCallbackID: 1,
33648    auth_callbacks: {},
33649    ScriptReceivers: ScriptReceivers,
33650    DependenciesReceivers: DependenciesReceivers,
33651    getDefaultStrategy: default_strategy,
33652    Transports: transports_transports,
33653    transportConnectionInitializer: transport_connection_initializer,
33654    HTTPFactory: web_http_http,
33655    TimelineTransport: jsonp_timeline,
33656    getXHRAPI: function () {
33657        return window.XMLHttpRequest;
33658    },
33659    getWebSocketAPI: function () {
33660        return window.WebSocket || window.MozWebSocket;
33661    },
33662    setup: function (PusherClass) {
33663        var _this = this;
33664        window.Pusher = PusherClass;
33665        var initializeOnDocumentBody = function () {
33666            _this.onDocumentBody(PusherClass.ready);
33667        };
33668        if (!window.JSON) {
33669            Dependencies.load('json2', {}, initializeOnDocumentBody);
33670        }
33671        else {
33672            initializeOnDocumentBody();
33673        }
33674    },
33675    getDocument: function () {
33676        return document;
33677    },
33678    getProtocol: function () {
33679        return this.getDocument().location.protocol;
33680    },
33681    getAuthorizers: function () {
33682        return { ajax: xhr_auth, jsonp: jsonp_auth };
33683    },
33684    onDocumentBody: function (callback) {
33685        var _this = this;
33686        if (document.body) {
33687            callback();
33688        }
33689        else {
33690            setTimeout(function () {
33691                _this.onDocumentBody(callback);
33692            }, 0);
33693        }
33694    },
33695    createJSONPRequest: function (url, data) {
33696        return new jsonp_request(url, data);
33697    },
33698    createScriptRequest: function (src) {
33699        return new script_request(src);
33700    },
33701    getLocalStorage: function () {
33702        try {
33703            return window.localStorage;
33704        }
33705        catch (e) {
33706            return undefined;
33707        }
33708    },
33709    createXHR: function () {
33710        if (this.getXHRAPI()) {
33711            return this.createXMLHttpRequest();
33712        }
33713        else {
33714            return this.createMicrosoftXHR();
33715        }
33716    },
33717    createXMLHttpRequest: function () {
33718        var Constructor = this.getXHRAPI();
33719        return new Constructor();
33720    },
33721    createMicrosoftXHR: function () {
33722        return new ActiveXObject('Microsoft.XMLHTTP');
33723    },
33724    getNetwork: function () {
33725        return net_info_Network;
33726    },
33727    createWebSocket: function (url) {
33728        var Constructor = this.getWebSocketAPI();
33729        return new Constructor(url);
33730    },
33731    createSocketRequest: function (method, url) {
33732        if (this.isXHRSupported()) {
33733            return this.HTTPFactory.createXHR(method, url);
33734        }
33735        else if (this.isXDRSupported(url.indexOf('https:') === 0)) {
33736            return this.HTTPFactory.createXDR(method, url);
33737        }
33738        else {
33739            throw 'Cross-origin HTTP requests are not supported';
33740        }
33741    },
33742    isXHRSupported: function () {
33743        var Constructor = this.getXHRAPI();
33744        return (Boolean(Constructor) && new Constructor().withCredentials !== undefined);
33745    },
33746    isXDRSupported: function (useTLS) {
33747        var protocol = useTLS ? 'https:' : 'http:';
33748        var documentProtocol = this.getProtocol();
33749        return (Boolean(window['XDomainRequest']) && documentProtocol === protocol);
33750    },
33751    addUnloadListener: function (listener) {
33752        if (window.addEventListener !== undefined) {
33753            window.addEventListener('unload', listener, false);
33754        }
33755        else if (window.attachEvent !== undefined) {
33756            window.attachEvent('onunload', listener);
33757        }
33758    },
33759    removeUnloadListener: function (listener) {
33760        if (window.addEventListener !== undefined) {
33761            window.removeEventListener('unload', listener, false);
33762        }
33763        else if (window.detachEvent !== undefined) {
33764            window.detachEvent('onunload', listener);
33765        }
33766    }
33767};
33768/* harmony default export */ var runtime = (Runtime);
33769
33770// CONCATENATED MODULE: ./src/core/timeline/level.ts
33771var TimelineLevel;
33772(function (TimelineLevel) {
33773    TimelineLevel[TimelineLevel["ERROR"] = 3] = "ERROR";
33774    TimelineLevel[TimelineLevel["INFO"] = 6] = "INFO";
33775    TimelineLevel[TimelineLevel["DEBUG"] = 7] = "DEBUG";
33776})(TimelineLevel || (TimelineLevel = {}));
33777/* harmony default export */ var timeline_level = (TimelineLevel);
33778
33779// CONCATENATED MODULE: ./src/core/timeline/timeline.ts
33780
33781
33782
33783var timeline_Timeline = (function () {
33784    function Timeline(key, session, options) {
33785        this.key = key;
33786        this.session = session;
33787        this.events = [];
33788        this.options = options || {};
33789        this.sent = 0;
33790        this.uniqueID = 0;
33791    }
33792    Timeline.prototype.log = function (level, event) {
33793        if (level <= this.options.level) {
33794            this.events.push(extend({}, event, { timestamp: util.now() }));
33795            if (this.options.limit && this.events.length > this.options.limit) {
33796                this.events.shift();
33797            }
33798        }
33799    };
33800    Timeline.prototype.error = function (event) {
33801        this.log(timeline_level.ERROR, event);
33802    };
33803    Timeline.prototype.info = function (event) {
33804        this.log(timeline_level.INFO, event);
33805    };
33806    Timeline.prototype.debug = function (event) {
33807        this.log(timeline_level.DEBUG, event);
33808    };
33809    Timeline.prototype.isEmpty = function () {
33810        return this.events.length === 0;
33811    };
33812    Timeline.prototype.send = function (sendfn, callback) {
33813        var _this = this;
33814        var data = extend({
33815            session: this.session,
33816            bundle: this.sent + 1,
33817            key: this.key,
33818            lib: 'js',
33819            version: this.options.version,
33820            cluster: this.options.cluster,
33821            features: this.options.features,
33822            timeline: this.events
33823        }, this.options.params);
33824        this.events = [];
33825        sendfn(data, function (error, result) {
33826            if (!error) {
33827                _this.sent++;
33828            }
33829            if (callback) {
33830                callback(error, result);
33831            }
33832        });
33833        return true;
33834    };
33835    Timeline.prototype.generateUniqueID = function () {
33836        this.uniqueID++;
33837        return this.uniqueID;
33838    };
33839    return Timeline;
33840}());
33841/* harmony default export */ var timeline_timeline = (timeline_Timeline);
33842
33843// CONCATENATED MODULE: ./src/core/strategies/transport_strategy.ts
33844
33845
33846
33847
33848var transport_strategy_TransportStrategy = (function () {
33849    function TransportStrategy(name, priority, transport, options) {
33850        this.name = name;
33851        this.priority = priority;
33852        this.transport = transport;
33853        this.options = options || {};
33854    }
33855    TransportStrategy.prototype.isSupported = function () {
33856        return this.transport.isSupported({
33857            useTLS: this.options.useTLS
33858        });
33859    };
33860    TransportStrategy.prototype.connect = function (minPriority, callback) {
33861        var _this = this;
33862        if (!this.isSupported()) {
33863            return failAttempt(new UnsupportedStrategy(), callback);
33864        }
33865        else if (this.priority < minPriority) {
33866            return failAttempt(new TransportPriorityTooLow(), callback);
33867        }
33868        var connected = false;
33869        var transport = this.transport.createConnection(this.name, this.priority, this.options.key, this.options);
33870        var handshake = null;
33871        var onInitialized = function () {
33872            transport.unbind('initialized', onInitialized);
33873            transport.connect();
33874        };
33875        var onOpen = function () {
33876            handshake = factory.createHandshake(transport, function (result) {
33877                connected = true;
33878                unbindListeners();
33879                callback(null, result);
33880            });
33881        };
33882        var onError = function (error) {
33883            unbindListeners();
33884            callback(error);
33885        };
33886        var onClosed = function () {
33887            unbindListeners();
33888            var serializedTransport;
33889            serializedTransport = safeJSONStringify(transport);
33890            callback(new TransportClosed(serializedTransport));
33891        };
33892        var unbindListeners = function () {
33893            transport.unbind('initialized', onInitialized);
33894            transport.unbind('open', onOpen);
33895            transport.unbind('error', onError);
33896            transport.unbind('closed', onClosed);
33897        };
33898        transport.bind('initialized', onInitialized);
33899        transport.bind('open', onOpen);
33900        transport.bind('error', onError);
33901        transport.bind('closed', onClosed);
33902        transport.initialize();
33903        return {
33904            abort: function () {
33905                if (connected) {
33906                    return;
33907                }
33908                unbindListeners();
33909                if (handshake) {
33910                    handshake.close();
33911                }
33912                else {
33913                    transport.close();
33914                }
33915            },
33916            forceMinPriority: function (p) {
33917                if (connected) {
33918                    return;
33919                }
33920                if (_this.priority < p) {
33921                    if (handshake) {
33922                        handshake.close();
33923                    }
33924                    else {
33925                        transport.close();
33926                    }
33927                }
33928            }
33929        };
33930    };
33931    return TransportStrategy;
33932}());
33933/* harmony default export */ var transport_strategy = (transport_strategy_TransportStrategy);
33934function failAttempt(error, callback) {
33935    util.defer(function () {
33936        callback(error);
33937    });
33938    return {
33939        abort: function () { },
33940        forceMinPriority: function () { }
33941    };
33942}
33943
33944// CONCATENATED MODULE: ./src/core/strategies/strategy_builder.ts
33945
33946
33947
33948
33949
33950var strategy_builder_Transports = runtime.Transports;
33951var strategy_builder_defineTransport = function (config, name, type, priority, options, manager) {
33952    var transportClass = strategy_builder_Transports[type];
33953    if (!transportClass) {
33954        throw new UnsupportedTransport(type);
33955    }
33956    var enabled = (!config.enabledTransports ||
33957        arrayIndexOf(config.enabledTransports, name) !== -1) &&
33958        (!config.disabledTransports ||
33959            arrayIndexOf(config.disabledTransports, name) === -1);
33960    var transport;
33961    if (enabled) {
33962        options = Object.assign({ ignoreNullOrigin: config.ignoreNullOrigin }, options);
33963        transport = new transport_strategy(name, priority, manager ? manager.getAssistant(transportClass) : transportClass, options);
33964    }
33965    else {
33966        transport = strategy_builder_UnsupportedStrategy;
33967    }
33968    return transport;
33969};
33970var strategy_builder_UnsupportedStrategy = {
33971    isSupported: function () {
33972        return false;
33973    },
33974    connect: function (_, callback) {
33975        var deferred = util.defer(function () {
33976            callback(new UnsupportedStrategy());
33977        });
33978        return {
33979            abort: function () {
33980                deferred.ensureAborted();
33981            },
33982            forceMinPriority: function () { }
33983        };
33984    }
33985};
33986
33987// CONCATENATED MODULE: ./src/core/auth/user_authenticator.ts
33988
33989
33990var composeChannelQuery = function (params, authOptions) {
33991    var query = 'socket_id=' + encodeURIComponent(params.socketId);
33992    for (var i in authOptions.params) {
33993        query +=
33994            '&' +
33995                encodeURIComponent(i) +
33996                '=' +
33997                encodeURIComponent(authOptions.params[i]);
33998    }
33999    return query;
34000};
34001var UserAuthenticator = function (authOptions) {
34002    if (typeof runtime.getAuthorizers()[authOptions.transport] === 'undefined') {
34003        throw "'" + authOptions.transport + "' is not a recognized auth transport";
34004    }
34005    return function (params, callback) {
34006        var query = composeChannelQuery(params, authOptions);
34007        runtime.getAuthorizers()[authOptions.transport](runtime, query, authOptions, AuthRequestType.UserAuthentication, callback);
34008    };
34009};
34010/* harmony default export */ var user_authenticator = (UserAuthenticator);
34011
34012// CONCATENATED MODULE: ./src/core/auth/channel_authorizer.ts
34013
34014
34015var channel_authorizer_composeChannelQuery = function (params, authOptions) {
34016    var query = 'socket_id=' + encodeURIComponent(params.socketId);
34017    query += '&channel_name=' + encodeURIComponent(params.channelName);
34018    for (var i in authOptions.params) {
34019        query +=
34020            '&' +
34021                encodeURIComponent(i) +
34022                '=' +
34023                encodeURIComponent(authOptions.params[i]);
34024    }
34025    return query;
34026};
34027var ChannelAuthorizer = function (authOptions) {
34028    if (typeof runtime.getAuthorizers()[authOptions.transport] === 'undefined') {
34029        throw "'" + authOptions.transport + "' is not a recognized auth transport";
34030    }
34031    return function (params, callback) {
34032        var query = channel_authorizer_composeChannelQuery(params, authOptions);
34033        runtime.getAuthorizers()[authOptions.transport](runtime, query, authOptions, AuthRequestType.ChannelAuthorization, callback);
34034    };
34035};
34036/* harmony default export */ var channel_authorizer = (ChannelAuthorizer);
34037
34038// CONCATENATED MODULE: ./src/core/auth/deprecated_channel_authorizer.ts
34039var ChannelAuthorizerProxy = function (pusher, authOptions, channelAuthorizerGenerator) {
34040    var deprecatedAuthorizerOptions = {
34041        authTransport: authOptions.transport,
34042        authEndpoint: authOptions.endpoint,
34043        auth: {
34044            params: authOptions.params,
34045            headers: authOptions.headers
34046        }
34047    };
34048    return function (params, callback) {
34049        var channel = pusher.channel(params.channelName);
34050        var channelAuthorizer = channelAuthorizerGenerator(channel, deprecatedAuthorizerOptions);
34051        channelAuthorizer.authorize(params.socketId, callback);
34052    };
34053};
34054
34055// CONCATENATED MODULE: ./src/core/config.ts
34056var __assign = ( false) || function () {
34057    __assign = Object.assign || function(t) {
34058        for (var s, i = 1, n = arguments.length; i < n; i++) {
34059            s = arguments[i];
34060            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
34061                t[p] = s[p];
34062        }
34063        return t;
34064    };
34065    return __assign.apply(this, arguments);
34066};
34067
34068
34069
34070
34071
34072function getConfig(opts, pusher) {
34073    var config = {
34074        activityTimeout: opts.activityTimeout || defaults.activityTimeout,
34075        cluster: opts.cluster || defaults.cluster,
34076        httpPath: opts.httpPath || defaults.httpPath,
34077        httpPort: opts.httpPort || defaults.httpPort,
34078        httpsPort: opts.httpsPort || defaults.httpsPort,
34079        pongTimeout: opts.pongTimeout || defaults.pongTimeout,
34080        statsHost: opts.statsHost || defaults.stats_host,
34081        unavailableTimeout: opts.unavailableTimeout || defaults.unavailableTimeout,
34082        wsPath: opts.wsPath || defaults.wsPath,
34083        wsPort: opts.wsPort || defaults.wsPort,
34084        wssPort: opts.wssPort || defaults.wssPort,
34085        enableStats: getEnableStatsConfig(opts),
34086        httpHost: getHttpHost(opts),
34087        useTLS: shouldUseTLS(opts),
34088        wsHost: getWebsocketHost(opts),
34089        userAuthenticator: buildUserAuthenticator(opts),
34090        channelAuthorizer: buildChannelAuthorizer(opts, pusher)
34091    };
34092    if ('disabledTransports' in opts)
34093        config.disabledTransports = opts.disabledTransports;
34094    if ('enabledTransports' in opts)
34095        config.enabledTransports = opts.enabledTransports;
34096    if ('ignoreNullOrigin' in opts)
34097        config.ignoreNullOrigin = opts.ignoreNullOrigin;
34098    if ('timelineParams' in opts)
34099        config.timelineParams = opts.timelineParams;
34100    if ('nacl' in opts) {
34101        config.nacl = opts.nacl;
34102    }
34103    return config;
34104}
34105function getHttpHost(opts) {
34106    if (opts.httpHost) {
34107        return opts.httpHost;
34108    }
34109    if (opts.cluster) {
34110        return "sockjs-" + opts.cluster + ".pusher.com";
34111    }
34112    return defaults.httpHost;
34113}
34114function getWebsocketHost(opts) {
34115    if (opts.wsHost) {
34116        return opts.wsHost;
34117    }
34118    if (opts.cluster) {
34119        return getWebsocketHostFromCluster(opts.cluster);
34120    }
34121    return getWebsocketHostFromCluster(defaults.cluster);
34122}
34123function getWebsocketHostFromCluster(cluster) {
34124    return "ws-" + cluster + ".pusher.com";
34125}
34126function shouldUseTLS(opts) {
34127    if (runtime.getProtocol() === 'https:') {
34128        return true;
34129    }
34130    else if (opts.forceTLS === false) {
34131        return false;
34132    }
34133    return true;
34134}
34135function getEnableStatsConfig(opts) {
34136    if ('enableStats' in opts) {
34137        return opts.enableStats;
34138    }
34139    if ('disableStats' in opts) {
34140        return !opts.disableStats;
34141    }
34142    return false;
34143}
34144function buildUserAuthenticator(opts) {
34145    var userAuthentication = __assign({}, defaults.userAuthentication, opts.userAuthentication);
34146    if ('customHandler' in userAuthentication &&
34147        userAuthentication['customHandler'] != null) {
34148        return userAuthentication['customHandler'];
34149    }
34150    return user_authenticator(userAuthentication);
34151}
34152function buildChannelAuth(opts, pusher) {
34153    var channelAuthorization;
34154    if ('channelAuthorization' in opts) {
34155        channelAuthorization = __assign({}, defaults.channelAuthorization, opts.channelAuthorization);
34156    }
34157    else {
34158        channelAuthorization = {
34159            transport: opts.authTransport || defaults.authTransport,
34160            endpoint: opts.authEndpoint || defaults.authEndpoint
34161        };
34162        if ('auth' in opts) {
34163            if ('params' in opts.auth)
34164                channelAuthorization.params = opts.auth.params;
34165            if ('headers' in opts.auth)
34166                channelAuthorization.headers = opts.auth.headers;
34167        }
34168        if ('authorizer' in opts)
34169            channelAuthorization.customHandler = ChannelAuthorizerProxy(pusher, channelAuthorization, opts.authorizer);
34170    }
34171    return channelAuthorization;
34172}
34173function buildChannelAuthorizer(opts, pusher) {
34174    var channelAuthorization = buildChannelAuth(opts, pusher);
34175    if ('customHandler' in channelAuthorization &&
34176        channelAuthorization['customHandler'] != null) {
34177        return channelAuthorization['customHandler'];
34178    }
34179    return channel_authorizer(channelAuthorization);
34180}
34181
34182// CONCATENATED MODULE: ./src/core/utils/flat_promise.ts
34183function flatPromise() {
34184    var resolve, reject;
34185    var promise = new Promise(function (res, rej) {
34186        resolve = res;
34187        reject = rej;
34188    });
34189    return { promise: promise, resolve: resolve, reject: reject };
34190}
34191/* harmony default export */ var flat_promise = (flatPromise);
34192
34193// CONCATENATED MODULE: ./src/core/user.ts
34194var user_extends = ( false) || (function () {
34195    var extendStatics = function (d, b) {
34196        extendStatics = Object.setPrototypeOf ||
34197            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34198            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
34199        return extendStatics(d, b);
34200    };
34201    return function (d, b) {
34202        extendStatics(d, b);
34203        function __() { this.constructor = d; }
34204        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34205    };
34206})();
34207
34208
34209
34210
34211var user_UserFacade = (function (_super) {
34212    user_extends(UserFacade, _super);
34213    function UserFacade(pusher) {
34214        var _this = _super.call(this, function (eventName, data) {
34215            logger.debug('No callbacks on user for ' + eventName);
34216        }) || this;
34217        _this.signin_requested = false;
34218        _this.user_data = null;
34219        _this.serverToUserChannel = null;
34220        _this.signinDonePromise = null;
34221        _this._signinDoneResolve = null;
34222        _this._onAuthorize = function (err, authData) {
34223            if (err) {
34224                logger.warn("Error during signin: " + err);
34225                _this._cleanup();
34226                return;
34227            }
34228            _this.pusher.send_event('pusher:signin', {
34229                auth: authData.auth,
34230                user_data: authData.user_data
34231            });
34232        };
34233        _this.pusher = pusher;
34234        _this.pusher.connection.bind('state_change', function (_a) {
34235            var previous = _a.previous, current = _a.current;
34236            if (previous !== 'connected' && current === 'connected') {
34237                _this._signin();
34238            }
34239            if (previous === 'connected' && current !== 'connected') {
34240                _this._cleanup();
34241                _this._newSigninPromiseIfNeeded();
34242            }
34243        });
34244        _this.pusher.connection.bind('message', function (event) {
34245            var eventName = event.event;
34246            if (eventName === 'pusher:signin_success') {
34247                _this._onSigninSuccess(event.data);
34248            }
34249            if (_this.serverToUserChannel &&
34250                _this.serverToUserChannel.name === event.channel) {
34251                _this.serverToUserChannel.handleEvent(event);
34252            }
34253        });
34254        return _this;
34255    }
34256    UserFacade.prototype.signin = function () {
34257        if (this.signin_requested) {
34258            return;
34259        }
34260        this.signin_requested = true;
34261        this._signin();
34262    };
34263    UserFacade.prototype._signin = function () {
34264        if (!this.signin_requested) {
34265            return;
34266        }
34267        this._newSigninPromiseIfNeeded();
34268        if (this.pusher.connection.state !== 'connected') {
34269            return;
34270        }
34271        this.pusher.config.userAuthenticator({
34272            socketId: this.pusher.connection.socket_id
34273        }, this._onAuthorize);
34274    };
34275    UserFacade.prototype._onSigninSuccess = function (data) {
34276        try {
34277            this.user_data = JSON.parse(data.user_data);
34278        }
34279        catch (e) {
34280            logger.error("Failed parsing user data after signin: " + data.user_data);
34281            this._cleanup();
34282            return;
34283        }
34284        if (typeof this.user_data.id !== 'string' || this.user_data.id === '') {
34285            logger.error("user_data doesn't contain an id. user_data: " + this.user_data);
34286            this._cleanup();
34287            return;
34288        }
34289        this._signinDoneResolve();
34290        this._subscribeChannels();
34291    };
34292    UserFacade.prototype._subscribeChannels = function () {
34293        var _this = this;
34294        var ensure_subscribed = function (channel) {
34295            if (channel.subscriptionPending && channel.subscriptionCancelled) {
34296                channel.reinstateSubscription();
34297            }
34298            else if (!channel.subscriptionPending &&
34299                _this.pusher.connection.state === 'connected') {
34300                channel.subscribe();
34301            }
34302        };
34303        this.serverToUserChannel = new channels_channel("#server-to-user-" + this.user_data.id, this.pusher);
34304        this.serverToUserChannel.bind_global(function (eventName, data) {
34305            if (eventName.indexOf('pusher_internal:') === 0 ||
34306                eventName.indexOf('pusher:') === 0) {
34307                return;
34308            }
34309            _this.emit(eventName, data);
34310        });
34311        ensure_subscribed(this.serverToUserChannel);
34312    };
34313    UserFacade.prototype._cleanup = function () {
34314        this.user_data = null;
34315        if (this.serverToUserChannel) {
34316            this.serverToUserChannel.unbind_all();
34317            this.serverToUserChannel.disconnect();
34318            this.serverToUserChannel = null;
34319        }
34320        if (this.signin_requested) {
34321            this._signinDoneResolve();
34322        }
34323    };
34324    UserFacade.prototype._newSigninPromiseIfNeeded = function () {
34325        if (!this.signin_requested) {
34326            return;
34327        }
34328        if (this.signinDonePromise && !this.signinDonePromise.done) {
34329            return;
34330        }
34331        var _a = flat_promise(), promise = _a.promise, resolve = _a.resolve, _ = _a.reject;
34332        promise.done = false;
34333        var setDone = function () {
34334            promise.done = true;
34335        };
34336        promise.then(setDone)["catch"](setDone);
34337        this.signinDonePromise = promise;
34338        this._signinDoneResolve = resolve;
34339    };
34340    return UserFacade;
34341}(dispatcher));
34342/* harmony default export */ var user = (user_UserFacade);
34343
34344// CONCATENATED MODULE: ./src/core/pusher.ts
34345
34346
34347
34348
34349
34350
34351
34352
34353
34354
34355
34356
34357
34358var pusher_Pusher = (function () {
34359    function Pusher(app_key, options) {
34360        var _this = this;
34361        checkAppKey(app_key);
34362        options = options || {};
34363        if (!options.cluster && !(options.wsHost || options.httpHost)) {
34364            var suffix = url_store.buildLogSuffix('javascriptQuickStart');
34365            logger.warn("You should always specify a cluster when connecting. " + suffix);
34366        }
34367        if ('disableStats' in options) {
34368            logger.warn('The disableStats option is deprecated in favor of enableStats');
34369        }
34370        this.key = app_key;
34371        this.config = getConfig(options, this);
34372        this.channels = factory.createChannels();
34373        this.global_emitter = new dispatcher();
34374        this.sessionID = Math.floor(Math.random() * 1000000000);
34375        this.timeline = new timeline_timeline(this.key, this.sessionID, {
34376            cluster: this.config.cluster,
34377            features: Pusher.getClientFeatures(),
34378            params: this.config.timelineParams || {},
34379            limit: 50,
34380            level: timeline_level.INFO,
34381            version: defaults.VERSION
34382        });
34383        if (this.config.enableStats) {
34384            this.timelineSender = factory.createTimelineSender(this.timeline, {
34385                host: this.config.statsHost,
34386                path: '/timeline/v2/' + runtime.TimelineTransport.name
34387            });
34388        }
34389        var getStrategy = function (options) {
34390            return runtime.getDefaultStrategy(_this.config, options, strategy_builder_defineTransport);
34391        };
34392        this.connection = factory.createConnectionManager(this.key, {
34393            getStrategy: getStrategy,
34394            timeline: this.timeline,
34395            activityTimeout: this.config.activityTimeout,
34396            pongTimeout: this.config.pongTimeout,
34397            unavailableTimeout: this.config.unavailableTimeout,
34398            useTLS: Boolean(this.config.useTLS)
34399        });
34400        this.connection.bind('connected', function () {
34401            _this.subscribeAll();
34402            if (_this.timelineSender) {
34403                _this.timelineSender.send(_this.connection.isUsingTLS());
34404            }
34405        });
34406        this.connection.bind('message', function (event) {
34407            var eventName = event.event;
34408            var internal = eventName.indexOf('pusher_internal:') === 0;
34409            if (event.channel) {
34410                var channel = _this.channel(event.channel);
34411                if (channel) {
34412                    channel.handleEvent(event);
34413                }
34414            }
34415            if (!internal) {
34416                _this.global_emitter.emit(event.event, event.data);
34417            }
34418        });
34419        this.connection.bind('connecting', function () {
34420            _this.channels.disconnect();
34421        });
34422        this.connection.bind('disconnected', function () {
34423            _this.channels.disconnect();
34424        });
34425        this.connection.bind('error', function (err) {
34426            logger.warn(err);
34427        });
34428        Pusher.instances.push(this);
34429        this.timeline.info({ instances: Pusher.instances.length });
34430        this.user = new user(this);
34431        if (Pusher.isReady) {
34432            this.connect();
34433        }
34434    }
34435    Pusher.ready = function () {
34436        Pusher.isReady = true;
34437        for (var i = 0, l = Pusher.instances.length; i < l; i++) {
34438            Pusher.instances[i].connect();
34439        }
34440    };
34441    Pusher.getClientFeatures = function () {
34442        return keys(filterObject({ ws: runtime.Transports.ws }, function (t) {
34443            return t.isSupported({});
34444        }));
34445    };
34446    Pusher.prototype.channel = function (name) {
34447        return this.channels.find(name);
34448    };
34449    Pusher.prototype.allChannels = function () {
34450        return this.channels.all();
34451    };
34452    Pusher.prototype.connect = function () {
34453        this.connection.connect();
34454        if (this.timelineSender) {
34455            if (!this.timelineSenderTimer) {
34456                var usingTLS = this.connection.isUsingTLS();
34457                var timelineSender = this.timelineSender;
34458                this.timelineSenderTimer = new PeriodicTimer(60000, function () {
34459                    timelineSender.send(usingTLS);
34460                });
34461            }
34462        }
34463    };
34464    Pusher.prototype.disconnect = function () {
34465        this.connection.disconnect();
34466        if (this.timelineSenderTimer) {
34467            this.timelineSenderTimer.ensureAborted();
34468            this.timelineSenderTimer = null;
34469        }
34470    };
34471    Pusher.prototype.bind = function (event_name, callback, context) {
34472        this.global_emitter.bind(event_name, callback, context);
34473        return this;
34474    };
34475    Pusher.prototype.unbind = function (event_name, callback, context) {
34476        this.global_emitter.unbind(event_name, callback, context);
34477        return this;
34478    };
34479    Pusher.prototype.bind_global = function (callback) {
34480        this.global_emitter.bind_global(callback);
34481        return this;
34482    };
34483    Pusher.prototype.unbind_global = function (callback) {
34484        this.global_emitter.unbind_global(callback);
34485        return this;
34486    };
34487    Pusher.prototype.unbind_all = function (callback) {
34488        this.global_emitter.unbind_all();
34489        return this;
34490    };
34491    Pusher.prototype.subscribeAll = function () {
34492        var channelName;
34493        for (channelName in this.channels.channels) {
34494            if (this.channels.channels.hasOwnProperty(channelName)) {
34495                this.subscribe(channelName);
34496            }
34497        }
34498    };
34499    Pusher.prototype.subscribe = function (channel_name) {
34500        var channel = this.channels.add(channel_name, this);
34501        if (channel.subscriptionPending && channel.subscriptionCancelled) {
34502            channel.reinstateSubscription();
34503        }
34504        else if (!channel.subscriptionPending &&
34505            this.connection.state === 'connected') {
34506            channel.subscribe();
34507        }
34508        return channel;
34509    };
34510    Pusher.prototype.unsubscribe = function (channel_name) {
34511        var channel = this.channels.find(channel_name);
34512        if (channel && channel.subscriptionPending) {
34513            channel.cancelSubscription();
34514        }
34515        else {
34516            channel = this.channels.remove(channel_name);
34517            if (channel && channel.subscribed) {
34518                channel.unsubscribe();
34519            }
34520        }
34521    };
34522    Pusher.prototype.send_event = function (event_name, data, channel) {
34523        return this.connection.send_event(event_name, data, channel);
34524    };
34525    Pusher.prototype.shouldUseTLS = function () {
34526        return this.config.useTLS;
34527    };
34528    Pusher.prototype.signin = function () {
34529        this.user.signin();
34530    };
34531    Pusher.instances = [];
34532    Pusher.isReady = false;
34533    Pusher.logToConsole = false;
34534    Pusher.Runtime = runtime;
34535    Pusher.ScriptReceivers = runtime.ScriptReceivers;
34536    Pusher.DependenciesReceivers = runtime.DependenciesReceivers;
34537    Pusher.auth_callbacks = runtime.auth_callbacks;
34538    return Pusher;
34539}());
34540/* harmony default export */ var core_pusher = __webpack_exports__["default"] = (pusher_Pusher);
34541function checkAppKey(key) {
34542    if (key === null || key === undefined) {
34543        throw 'You must pass your app key when you instantiate Pusher.';
34544    }
34545}
34546runtime.setup(pusher_Pusher);
34547
34548
34549/***/ })
34550/******/ ]);
34551});
34552//# sourceMappingURL=pusher.js.map
34553
34554/***/ }),
34555
vendor: 2,819 bytes, lines 34556-34648
34556/***/ "./node_modules/vue-chat-scroll/dist/vue-chat-scroll.js":
34557/*!**************************************************************!*\
34558  !*** ./node_modules/vue-chat-scroll/dist/vue-chat-scroll.js ***!
34559  \**************************************************************/
34560/***/ (function(module) {
34561
34562(function (global, factory) {
34563   true ? module.exports = factory() :
34564  0;
34565}(this, (function () { 'use strict';
34566
34567  /**
34568  * @name VueJS vChatScroll (vue-chat-scroll)
34569  * @description Monitors an element and scrolls to the bottom if a new child is added
34570  * @author Theodore Messinezis <[email protected]>
34571  * @file v-chat-scroll  directive definition
34572  */
34573  var scrollToBottom = function scrollToBottom(el, smooth) {
34574    if (typeof el.scroll === "function") {
34575      el.scroll({
34576        top: el.scrollHeight,
34577        behavior: smooth ? 'smooth' : 'instant'
34578      });
34579    } else {
34580      el.scrollTop = el.scrollHeight;
34581    }
34582  };
34583
34584  var vChatScroll = {
34585    bind: function bind(el, binding) {
34586      var scrolled = false;
34587      el.addEventListener('scroll', function (e) {
34588        scrolled = el.scrollTop + el.clientHeight + 1 < el.scrollHeight;
34589
34590        if (scrolled && el.scrollTop === 0) {
34591          el.dispatchEvent(new Event("v-chat-scroll-top-reached"));
34592        }
34593      });
34594      new MutationObserver(function (e) {
34595        var config = binding.value || {};
34596        if (config.enabled === false) return;
34597        var pause = config.always === false && scrolled;
34598        var addedNodes = e[e.length - 1].addedNodes.length;
34599        var removedNodes = e[e.length - 1].removedNodes.length;
34600
34601        if (config.scrollonremoved) {
34602          if (pause || addedNodes != 1 && removedNodes != 1) return;
34603        } else {
34604          if (pause || addedNodes != 1) return;
34605        }
34606
34607        var smooth = config.smooth;
34608        var loadingRemoved = !addedNodes && removedNodes === 1;
34609
34610        if (loadingRemoved && config.scrollonremoved && 'smoothonremoved' in config) {
34611          smooth = config.smoothonremoved;
34612        }
34613
34614        scrollToBottom(el, smooth);
34615      }).observe(el, {
34616        childList: true,
34617        subtree: true
34618      });
34619    },
34620    inserted: function inserted(el, binding) {
34621      var config = binding.value || {};
34622      scrollToBottom(el, config.notSmoothOnInit ? false : config.smooth);
34623    }
34624  };
34625
34626  /**
34627  * @name VueJS vChatScroll (vue-chat-scroll)
34628  * @description Monitors an element and scrolls to the bottom if a new child is added
34629  * @author Theodore Messinezis <[email protected]>
34630  * @file vue-chat-scroll plugin definition
34631  */
34632  var VueChatScroll = {
34633    install: function install(Vue, options) {
34634      Vue.directive('chat-scroll', vChatScroll);
34635    }
34636  };
34637
34638  if (typeof window !== 'undefined' && window.Vue) {
34639    window.Vue.use(VueChatScroll);
34640  }
34641
34642  return VueChatScroll;
34643
34644})));
34645
34646
34647/***/ }),
34648
34649/***/ "./resources/js/components/AdminSupportChatComponent.vue":
34650/*!***************************************************************!*\
34651  !*** ./resources/js/components/AdminSupportChatComponent.vue ***!
34652  \***************************************************************/
34653/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34654
34655"use strict";
34656__webpack_require__.r(__webpack_exports__);
34657/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34658/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
34659/* harmony export */ });
34660/* harmony import */ var _AdminSupportChatComponent_vue_vue_type_template_id_053f748a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AdminSupportChatComponent.vue?vue&type=template&id=053f748a& */ "./resources/js/components/AdminSupportChatComponent.vue?vue&type=template&id=053f748a&");
34661/* harmony import */ var _AdminSupportChatComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AdminSupportChatComponent.vue?vue&type=script&lang=js& */ "./resources/js/components/AdminSupportChatComponent.vue?vue&type=script&lang=js&");
34662/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
34663
34664
34665
34666
34667
34668/* normalize component */
34669;
34670var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
34671  _AdminSupportChatComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
34672  _AdminSupportChatComponent_vue_vue_type_template_id_053f748a___WEBPACK_IMPORTED_MODULE_0__.render,
34673  _AdminSupportChatComponent_vue_vue_type_template_id_053f748a___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
34674  false,
34675  null,
34676  null,
34677  null
34678  
34679)
34680
34681/* hot reload */
34682if (false) { var api; }
34683component.options.__file = "resources/js/components/AdminSupportChatComponent.vue"
34684/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
34685
34686/***/ }),
34687
34688/***/ "./resources/js/components/SupportChatFrontComponent.vue":
34689/*!***************************************************************!*\
34690  !*** ./resources/js/components/SupportChatFrontComponent.vue ***!
34691  \***************************************************************/
34692/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34693
34694"use strict";
34695__webpack_require__.r(__webpack_exports__);
34696/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34697/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
34698/* harmony export */ });
34699/* harmony import */ var _SupportChatFrontComponent_vue_vue_type_template_id_ffc2b9c0___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SupportChatFrontComponent.vue?vue&type=template&id=ffc2b9c0& */ "./resources/js/components/SupportChatFrontComponent.vue?vue&type=template&id=ffc2b9c0&");
34700/* harmony import */ var _SupportChatFrontComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SupportChatFrontComponent.vue?vue&type=script&lang=js& */ "./resources/js/components/SupportChatFrontComponent.vue?vue&type=script&lang=js&");
34701/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
34702
34703
34704
34705
34706
34707/* normalize component */
34708;
34709var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
34710  _SupportChatFrontComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
34711  _SupportChatFrontComponent_vue_vue_type_template_id_ffc2b9c0___WEBPACK_IMPORTED_MODULE_0__.render,
34712  _SupportChatFrontComponent_vue_vue_type_template_id_ffc2b9c0___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
34713  false,
34714  null,
34715  null,
34716  null
34717  
34718)
34719
34720/* hot reload */
34721if (false) { var api; }
34722component.options.__file = "resources/js/components/SupportChatFrontComponent.vue"
34723/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
34724
34725/***/ }),
34726
34727/***/ "./resources/js/components/AdminSupportChatComponent.vue?vue&type=script&lang=js&":
34728/*!****************************************************************************************!*\
34729  !*** ./resources/js/components/AdminSupportChatComponent.vue?vue&type=script&lang=js& ***!
34730  \****************************************************************************************/
34731/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34732
34733"use strict";
34734__webpack_require__.r(__webpack_exports__);
34735/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34736/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
34737/* harmony export */ });
34738/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminSupportChatComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminSupportChatComponent.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/AdminSupportChatComponent.vue?vue&type=script&lang=js&");
34739 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminSupportChatComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); 
34740
34741/***/ }),
34742
34743/***/ "./resources/js/components/SupportChatFrontComponent.vue?vue&type=script&lang=js&":
34744/*!****************************************************************************************!*\
34745  !*** ./resources/js/components/SupportChatFrontComponent.vue?vue&type=script&lang=js& ***!
34746  \****************************************************************************************/
34747/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34748
34749"use strict";
34750__webpack_require__.r(__webpack_exports__);
34751/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34752/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
34753/* harmony export */ });
34754/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_
347540_node_modules_vue_loader_lib_index_js_vue_loader_options_SupportChatFrontComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SupportChatFrontComponent.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/SupportChatFrontComponent.vue?vue&type=script&lang=js&");
34755 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SupportChatFrontComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); 
34756
34757/***/ }),
34758
34759/***/ "./resources/js/components/AdminSupportChatComponent.vue?vue&type=template&id=053f748a&":
34760/*!**********************************************************************************************!*\
34761  !*** ./resources/js/components/AdminSupportChatComponent.vue?vue&type=template&id=053f748a& ***!
34762  \**********************************************************************************************/
34763/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34764
34765"use strict";
34766__webpack_require__.r(__webpack_exports__);
34767/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34768/* harmony export */   "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminSupportChatComponent_vue_vue_type_template_id_053f748a___WEBPACK_IMPORTED_MODULE_0__.render),
34769/* harmony export */   "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminSupportChatComponent_vue_vue_type_template_id_053f748a___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
34770/* harmony export */ });
34771/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminSupportChatComponent_vue_vue_type_template_id_053f748a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminSupportChatComponent.vue?vue&type=template&id=053f748a& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/AdminSupportChatComponent.vue?vue&type=template&id=053f748a&");
34772
34773
34774/***/ }),
34775
34776/***/ "./resources/js/components/SupportChatFrontComponent.vue?vue&type=template&id=ffc2b9c0&":
34777/*!**********************************************************************************************!*\
34778  !*** ./resources/js/components/SupportChatFrontComponent.vue?vue&type=template&id=ffc2b9c0& ***!
34779  \**********************************************************************************************/
34780/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34781
34782"use strict";
34783__webpack_require__.r(__webpack_exports__);
34784/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34785/* harmony export */   "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SupportChatFrontComponent_vue_vue_type_template_id_ffc2b9c0___WEBPACK_IMPORTED_MODULE_0__.render),
34786/* harmony export */   "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SupportChatFrontComponent_vue_vue_type_template_id_ffc2b9c0___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
34787/* harmony export */ });
34788/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SupportChatFrontComponent_vue_vue_type_template_id_ffc2b9c0___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SupportChatFrontComponent.vue?vue&type=template&id=ffc2b9c0& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/SupportChatFrontComponent.vue?vue&type=template&id=ffc2b9c0&");
34789
34790
34791/***/ }),
34792
34793/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/AdminSupportChatComponent.vue?vue&type=template&id=053f748a&":
34794/*!*************************************************************************************************************************************************************************************************************************************!*\
34795  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/AdminSupportChatComponent.vue?vue&type=template&id=053f748a& ***!
34796  \*************************************************************************************************************************************************************************************************************************************/
34797/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34798
34799"use strict";
34800__webpack_require__.r(__webpack_exports__);
34801/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34802/* harmony export */   "render": () => (/* binding */ render),
34803/* harmony export */   "staticRenderFns": () => (/* binding */ staticRenderFns)
34804/* harmony export */ });
34805var render = function () {
34806  var _vm = this
34807  var _h = _vm.$createElement
34808  var _c = _vm._self._c || _h
34809  return _c("div", [
34810    _c(
34811      "div",
34812      {
34813        directives: [{ name: "chat-scroll", rawName: "v-chat-scroll" }],
34814        staticClass: "chat-container",
34815      },
34816      _vm._l(_vm.messages, function (message, index) {
34817        return _c("div", { key: index }, [
34818          message.msg_by === "1"
34819            ? _c("p", { staticClass: "chat chat-right" }, [
34820                _vm._v(
34821                  "\n                " +
34822                    _vm._s(message.message) +
34823                    "\n            "
34824                ),
34825              ])
34826            : _c("p", { staticClass: "chat chat-left" }, [
34827                _vm._v(
34828                  "   \n                " +
34829                    _vm._s(message.message) +
34830                    "                             \n            "
34831                ),
34832              ]),
34833        ])
34834      }),
34835      0
34836    ),
34837    _vm._v(" "),
34838    _c("hr"),
34839    _vm._v(" "),
34840    _c("div", { staticClass: "row form-group" }, [
34841      _c("div", { staticClass: "col-lg-10 col-md-10 col-sm-10 col-xs-10" }, [
34842        _c("input", {
34843          directives: [
34844            {
34845              name: "model",
34846              rawName: "v-model",
34847              value: _vm.newMessage,
34848              expression: "newMessage",
34849            },
34850          ],
34851          staticClass: "text-input form-control",
34852          staticStyle: { height: "32px" },
34853          attrs: {
34854            type: "text",
34855            name: "message",
34856            placeholder: "Message...",
34857            autocomplete: "false",
34858          },
34859          domProps: { value: _vm.newMessage },
34860          on: {
34861            keyup: function ($event) {
34862              if (
34863                !$event.type.indexOf("key") &&
34864                _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
34865              ) {
34866                return null
34867              }
34868              return _vm.sendMessage.apply(null, arguments)
34869            },
34870            input: function ($event) {
34871              if ($event.target.composing) {
34872                return
34873              }
34874              _vm.newMessage = $event.target.value
34875            },
34876          },
34877        }),
34878      ]),
34879      _vm._v(" "),
34880      _c("div", { staticClass: "col-lg-2 col-md-2 col-sm-2 col-xs-2" }, [
34881        _c(
34882          "button",
34883          {
34884            staticClass: "btn form-control",
34885            attrs: { type: "submit" },
34886            on: { click: _vm.sendMessage },
34887          },
34888          [_vm._v("Send")]
34889        ),
34890      ]),
34891    ]),
34892  ])
34893}
34894var staticRenderFns = []
34895render._withStripped = true
34896
34897
34898
34899/***/ }),
34900
34901/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/SupportChatFrontComponent.vue?vue&type=template&id=ffc2b9c0&":
34902/*!*************************************************************************************************************************************************************************************************************************************!*\
34903  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/SupportChatFrontComponent.vue?vue&type=template&id=ffc2b9c0& ***!
34904  \*************************************************************************************************************************************************************************************************************************************/
34905/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34906
34907"use strict";
34908__webpack_require__.r(__webpack_exports__);
34909/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34910/* harmony export */   "render": () => (/* binding */ render),
34911/* harmony export */   "staticRenderFns": () => (/* binding */ staticRenderFns)
34912/* harmony export */ });
34913var render = function () {
34914  var _vm = this
34915  var _h = _vm.$createElement
34916  var _c = _vm._self._c || _h
34917  return _c("div", [
34918    _vm._m(0),
34919    _vm._v(" "),
34920    _c("hr"),
34921    _vm._v(" "),
34922    _c(
34923      "div",
34924      {
34925        directives: [{ name: "chat-scroll", rawName: "v-chat-scroll" }],
34926        staticClass: "chat-container",
34927      },
34928      [
34929        _c("p", { staticClass: "chat chat-left" }, [
34930          _vm._v("\n            Hello! How may I help you?\n        "),
34931        ]),
34932        _vm._v(" "),
34933        _vm._l(_vm.messages, function (message, index) {
34934          return _c("div", { key: index }, [
34935            message.msg_by === "1"
34936              ? _c("p", { staticClass: "chat chat-left" }, [
34937                  _vm._v(
34938                    "\n                " +
34939                      _vm._s(message.message) +
34940                      "\n            "
34941                  ),
34942                ])
34943              : _c("p", { staticClass: "chat chat-right" }, [
34944                  _vm._v(
34945                    "   \n                " +
34946                      _vm._s(message.message) +
34947                      "                             \n            "
34948                  ),
34949                ]),
34950          ])
34951        }),
34952      ],
34953      2
34954    ),
34955    _vm._v(" "),
34956    _c("hr"),
34957    _vm._v(" "),
34958    _c("div", { staticClass: "row form-group" }, [
34959      _c("div", { staticClass: "col-lg-10 col-md-10 col-sm-10 col-xs-10" }, [
34960        _c("input", {
34961          directives: [
34962            {
34963              name: "model",
34964              rawName: "v-model",
34965              value: _vm.newMessage,
34966              expression: "newMessage",
34967            },
34968          ],
34969          staticClass: "form-control",
34970          staticStyle: { height: "35px" },
34971          attrs: {
34972            type: "text",
34973            name: "message",
34974            placeholder: "Message...",
34975            autocomplete: "false",
34976          },
34977          domProps: { value: _vm.newMessage },
34978          on: {
34979            keyup: function ($event) {
34980              if (
34981                !$event.type.indexOf("key") &&
34982                _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
34983              ) {
34984                return null
34985              }
34986              return _vm.sendMessage.apply(null, arguments)
34987            },
34988            input: function ($event) {
34989              if ($event.target.composing) {
34990                return
34991              }
34992              _vm.newMessage = $event.target.value
34993            },
34994          },
34995        }),
34996      ]),
34997      _vm._v(" "),
34998      _c("div", { staticClass: "col-lg-2 col-md-2 col-sm-2 col-xs-2" }, [
34999        _c(
35000          "button",
35001          {
35002            staticClass: "btn form-control",
35003            attrs: { type: "submit" },
35004            on: { click: _vm.sendMessage },
35005          },
35006          [_c("span", { staticClass: "fa fa-paper-plane-o" })]
35007        ),
35008      ]),
35009    ]),
35010  ])
35011}
35012var staticRenderFns = [
35013  function () {
35014    var _vm = this
35015    var _h = _vm.$createElement
35016    var _c = _vm._self._c || _h
35017    return _c("div", [
35018      _c("h3", { staticStyle: { color: "#2e3192" } }, [
35019        _vm._v("Talk With Support"),
35020      ]),
35021    ])
35022  },
35023]
35024render._withStripped = true
35025
35026
35027
35028/***/ }),
35029
vendor: 3,365 bytes, lines 35030-35142
35030/***/ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js":
35031/*!********************************************************************!*\
35032  !*** ./node_modules/vue-loader/lib/runtime/componentNormalizer.js ***!
35033  \********************************************************************/
35034/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35035
35036"use strict";
35037__webpack_require__.r(__webpack_exports__);
35038/* harmony export */ __webpack_require__.d(__webpack_exports__, {
35039/* harmony export */   "default": () => (/* binding */ normalizeComponent)
35040/* harmony export */ });
35041/* globals __VUE_SSR_CONTEXT__ */
35042
35043// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
35044// This module is a runtime utility for cleaner component module output and will
35045// be included in the final webpack user bundle.
35046
35047function normalizeComponent (
35048  scriptExports,
35049  render,
35050  staticRenderFns,
35051  functionalTemplate,
35052  injectStyles,
35053  scopeId,
35054  moduleIdentifier, /* server only */
35055  shadowMode /* vue-cli only */
35056) {
35057  // Vue.extend constructor export interop
35058  var options = typeof scriptExports === 'function'
35059    ? scriptExports.options
35060    : scriptExports
35061
35062  // render functions
35063  if (render) {
35064    options.render = render
35065    options.staticRenderFns = staticRenderFns
35066    options._compiled = true
35067  }
35068
35069  // functional template
35070  if (functionalTemplate) {
35071    options.functional = true
35072  }
35073
35074  // scopedId
35075  if (scopeId) {
35076    options._scopeId = 'data-v-' + scopeId
35077  }
35078
35079  var hook
35080  if (moduleIdentifier) { // server build
35081    hook = function (context) {
35082      // 2.3 injection
35083      context =
35084        context || // cached call
35085        (this.$vnode && this.$vnode.ssrContext) || // stateful
35086        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
35087      // 2.2 with runInNewContext: true
35088      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
35089        context = __VUE_SSR_CONTEXT__
35090      }
35091      // inject component styles
35092      if (injectStyles) {
35093        injectStyles.call(this, context)
35094      }
35095      // register component module identifier for async chunk inferrence
35096      if (context && context._registeredComponents) {
35097        context._registeredComponents.add(moduleIdentifier)
35098      }
35099    }
35100    // used by ssr in case component is cached and beforeCreate
35101    // never gets called
35102    options._ssrRegister = hook
35103  } else if (injectStyles) {
35104    hook = shadowMode
35105      ? function () {
35106        injectStyles.call(
35107          this,
35108          (options.functional ? this.parent : this).$root.$options.shadowRoot
35109        )
35110      }
35111      : injectStyles
35112  }
35113
35114  if (hook) {
35115    if (options.functional) {
35116      // for template-only hot-reload because in that case the render fn doesn't
35117      // go through the normalizer
35118      options._injectStyles = hook
35119      // register for functional component in vue file
35120      var originalRender = options.render
35121      options.render = function renderWithStyleInjection (h, context) {
35122        hook.call(context)
35123        return originalRender(h, context)
35124      }
35125    } else {
35126      // inject component registration as beforeCreate hook
35127      var existing = options.beforeCreate
35128      options.beforeCreate = existing
35129        ? [].concat(existing, hook)
35130        : [hook]
35131    }
35132  }
35133
35134  return {
35135    exports: scriptExports,
35136    options: options
35137  }
35138}
35139
35140
35141/***/ }),
35142
vendor: 424,908 bytes, lines 35143-47037
35143/***/ "./node_modules/vue/dist/vue.esm.js":
35144/*!******************************************!*\
35145  !*** ./node_modules/vue/dist/vue.esm.js ***!
35146  \******************************************/
35147/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35148
35149"use strict";
35150__webpack_require__.r(__webpack_exports__);
35151/* harmony export */ __webpack_require__.d(__webpack_exports__, {
35152/* harmony export */   "EffectScope": () => (/* binding */ EffectScope),
35153/* harmony export */   "computed": () => (/* binding */ computed),
35154/* harmony export */   "customRef": () => (/* binding */ customRef),
35155/* harmony export */   "default": () => (/* binding */ Vue),
35156/* harmony export */   "defineAsyncComponent": () => (/* binding */ defineAsyncComponent),
35157/* harmony export */   "defineComponent": () => (/* binding */ defineComponent),
35158/* harmony export */   "del": () => (/* binding */ del),
35159/* harmony export */   "effectScope": () => (/* binding */ effectScope),
35160/* harmony export */   "getCurrentInstance": () => (/* binding */ getCurrentInstance),
35161/* harmony export */   "getCurrentScope": () => (/* binding */ getCurrentScope),
35162/* harmony export */   "h": () => (/* binding */ h),
35163/* harmony export */   "inject": () => (/* binding */ inject),
35164/* harmony export */   "isProxy": () => (/* binding */ isProxy),
35165/* harmony export */   "isReactive": () => (/* binding */ isReactive),
35166/* harmony export */   "isReadonly": () => (/* binding */ isReadonly),
35167/* harmony export */   "isRef": () => (/* binding */ isRef),
35168/* harmony export */   "isShallow": () => (/* binding */ isShallow),
35169/* harmony export */   "markRaw": () => (/* binding */ markRaw),
35170/* harmony export */   "mergeDefaults": () => (/* binding */ mergeDefaults),
35171/* harmony export */   "nextTick": () => (/* binding */ nextTick),
35172/* harmony export */   "onActivated": () => (/* binding */ onActivated),
35173/* harmony export */   "onBeforeMount": () => (/* binding */ onBeforeMount),
35174/* harmony export */   "onBeforeUnmount": () => (/* binding */ onBeforeUnmount),
35175/* harmony export */   "onBeforeUpdate": () => (/* binding */ onBeforeUpdate),
35176/* harmony export */   "onDeactivated": () => (/* binding */ onDeactivated),
35177/* harmony export */   "onErrorCaptured": () => (/* binding */ onErrorCaptured),
35178/* harmony export */   "onMounted": () => (/* binding */ onMounted),
35179/* harmony export */   "onRenderTracked": () => (/* binding */ onRenderTracked),
35180/* harmony export */   "onRenderTriggered": () => (/* binding */ onRenderTriggered),
35181/* harmony export */   "onScopeDispose": () => (/* binding */ onScopeDispose),
35182/* harmony export */   "onServerPrefetch": () => (/* binding */ onServerPrefetch),
35183/* harmony export */   "onUnmounted": () => (/* binding */ onUnmounted),
35184/* harmony export */   "onUpdated": () => (/* binding */ onUpdated),
35185/* harmony export */   "provide": () => (/* binding */ provide),
35186/* harmony export */   "proxyRefs": () => (/* binding */ proxyRefs),
35187/* harmony export */   "reactive": () => (/* binding */ reactive),
35188/* harmony export */   "readonly": () => (/* binding */ readonly),
35189/* harmony export */   "ref": () => (/* binding */ ref$1),
35190/* harmony export */   "set": () => (/* binding */ set),
35191/* harmony export */   "shallowReactive": () => (/* binding */ shallowReactive),
35192/* harmony export */   "shallowReadonly": () => (/* binding */ shallowReadonly),
35193/* harmony export */   "shallowRef": () => (/* binding */ shallowRef),
35194/* harmony export */   "toRaw": () => (/* binding */ toRaw),
35195/* harmony export */   "toRef": () => (/* binding */ toRef),
35196/* harmony export */   "toRefs": () => (/* binding */ toRefs),
35197/* harmony export */   "triggerRef": () => (/* binding */ triggerRef),
35198/* harmony export */   "unref": () => (/* binding */ unref),
35199/* harmony export */   "useAttrs": () => (/* binding */ useAttrs),
35200/* harmony export */   "useCssModule": () => (/* binding */ useCssModule),
35201/* harmony export */   "useCssVars": () => (/* binding */ useCssVars),
35202/* harmony export */   "useListeners": () => (/* binding */ useListeners),
35203/* harmony export */   "useSlots": () => (/* binding */ useSlots),
35204/* harmony export */   "version": () => (/* binding */ version),
35205/* harmony export */   "watch": () => (/* binding */ watch),
35206/* harmony export */   "watchEffect": () => (/* binding */ watchEffect),
35207/* harmony export */   "watchPostEffect": () => (/* binding */ watchPostEffect),
35208/* harmony export */   "watchSyncEffect": () => (/* binding */ watchSyncEffect)
35209/* harmony export */ });
35210/*!
35211 * Vue.js v2.7.10
35212 * (c) 2014-2022 Evan You
35213 * Released under the MIT License.
35214 */
35215var emptyObject = Object.freeze({});
35216var isArray = Array.isArray;
35217// These helpers produce better VM code in JS engines due to their
35218// explicitness and function inlining.
35219function isUndef(v) {
35220    return v === undefined || v === null;
35221}
35222function isDef(v) {
35223    return v !== undefined && v !== null;
35224}
35225function isTrue(v) {
35226    return v === true;
35227}
35228function isFalse(v) {
35229    return v === false;
35230}
35231/**
35232 * Check if value is primitive.
35233 */
35234function isPrimitive(value) {
35235    return (typeof value === 'string' ||
35236        typeof value === 'number' ||
35237        // $flow-disable-line
35238        typeof value === 'symbol' ||
35239        typeof value === 'boolean');
35240}
35241function isFunction(value) {
35242    return typeof value === 'function';
35243}
35244/**
35245 * Quick object check - this is primarily used to tell
35246 * objects from primitive values when we know the value
35247 * is a JSON-compliant type.
35248 */
35249function isObject(obj) {
35250    return obj !== null && typeof obj === 'object';
35251}
35252/**
35253 * Get the raw type string of a value, e.g., [object Object].
35254 */
35255var _toString = Object.prototype.toString;
35256function toRawType(value) {
35257    return _toString.call(value).slice(8, -1);
35258}
35259/**
35260 * Strict object type check. Only returns true
35261 * for plain JavaScript objects.
35262 */
35263function isPlainObject(obj) {
35264    return _toString.call(obj) === '[object Object]';
35265}
35266function isRegExp(v) {
35267    return _toString.call(v) === '[object RegExp]';
35268}
35269/**
35270 * Check if val is a valid array index.
35271 */
35272function isValidArrayIndex(val) {
35273    var n = parseFloat(String(val));
35274    return n >= 0 && Math.floor(n) === n && isFinite(val);
35275}
35276function isPromise(val) {
35277    return (isDef(val) &&
35278        typeof val.then === 'function' &&
35279        typeof val.catch === 'function');
35280}
35281/**
35282 * Convert a value to a string that is actually rendered.
35283 */
35284function toString(val) {
35285    return val == null
35286        ? ''
35287        : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
35288            ? JSON.stringify(val, null, 2)
35289            : String(val);
35290}
35291/**
35292 * Convert an input value to a number for persistence.
35293 * If the conversion fails, return original string.
35294 */
35295function toNumber(val) {
35296    var n = parseFloat(val);
35297    return isNaN(n) ? val : n;
35298}
35299/**
35300 * Make a map and return a function for checking if a key
35301 * is in that map.
35302 */
35303function makeMap(str, expectsLowerCase) {
35304    var map = Object.create(null);
35305    var list = str.split(',');
35306    for (var i = 0; i < list.length; i++) {
35307        map[list[i]] = true;
35308    }
35309    return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };
35310}
35311/**
35312 * Check if a tag is a built-in tag.
35313 */
35314var isBuiltInTag = makeMap('slot,component', true);
35315/**
35316 * Check if an attribute is a reserved attribute.
35317 */
35318var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
35319/**
35320 * Remove an item from an array.
35321 */
35322function remove$2(arr, item) {
35323    if (arr.length) {
35324        var index = arr.indexOf(item);
35325        if (index > -1) {
35326            return arr.splice(index, 1);
35327        }
35328    }
35329}
35330/**
35331 * Check whether an object has the property.
35332 */
35333var hasOwnProperty = Object.prototype.hasOwnProperty;
35334function hasOwn(obj, key) {
35335    return hasOwnProperty.call(obj, key);
35336}
35337/**
35338 * Create a cached version of a pure function.
35339 */
35340function cached(fn) {
35341    var cache = Object.create(null);
35342    return function cachedFn(str) {
35343        var hit = cache[str];
35344        return hit || (cache[str] = fn(str));
35345    };
35346}
35347/**
35348 * Camelize a hyphen-delimited string.
35349 */
35350var camelizeRE = /-(\w)/g;
35351var camelize = cached(function (str) {
35352    return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });
35353});
35354/**
35355 * Capitalize a string.
35356 */
35357var capitalize = cached(function (str) {
35358    return str.charAt(0).toUpperCase() + str.slice(1);
35359});
35360/**
35361 * Hyphenate a camelCase string.
35362 */
35363var hyphenateRE = /\B([A-Z])/g;
35364var hyphenate = cached(function (str) {
35365    return str.replace(hyphenateRE, '-$1').toLowerCase();
35366});
35367/**
35368 * Simple bind polyfill for environments that do not support it,
35369 * e.g., PhantomJS 1.x. Technically, we don't need this anymore
35370 * since native bind is now performant enough in most browsers.
35371 * But removing it would mean breaking code that was able to run in
35372 * PhantomJS 1.x, so this must be kept for backward compatibility.
35373 */
35374/* istanbul ignore next */
35375function polyfillBind(fn, ctx) {
35376    function boundFn(a) {
35377        var l = arguments.length;
35378        return l
35379            ? l > 1
35380                ? fn.apply(ctx, arguments)
35381                : fn.call(ctx, a)
35382            : fn.call(ctx);
35383    }
35384    boundFn._length = fn.length;
35385    return boundFn;
35386}
35387function nativeBind(fn, ctx) {
35388    return fn.bind(ctx);
35389}
35390// @ts-expect-error bind cannot be `undefined`
35391var bind$1 = Function.prototype.bind ? nativeBind : polyfillBind;
35392/**
35393 * Convert an Array-like object to a real Array.
35394 */
35395function toArray(list, start) {
35396    start = start || 0;
35397    var i = list.length - start;
35398    var ret = new Array(i);
35399    while (i--) {
35400        ret[i] = list[i + start];
35401    }
35402    return ret;
35403}
35404/**
35405 * Mix properties into target object.
35406 */
35407function extend(to, _from) {
35408    for (var key in _from) {
35409        to[key] = _from[key];
35410    }
35411    return to;
35412}
35413/**
35414 * Merge an Array of Objects into a single Object.
35415 */
35416function toObject(arr) {
35417    var res = {};
35418    for (var i = 0; i < arr.length; i++) {
35419        if (arr[i]) {
35420            extend(res, arr[i]);
35421        }
35422    }
35423    return res;
35424}
35425/* eslint-disable no-unused-vars */
35426/**
35427 * Perform no operation.
35428 * Stubbing args to make Flow happy without leaving useless transpiled code
35429 * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
35430 */
35431function noop(a, b, c) { }
35432/**
35433 * Always return false.
35434 */
35435var no = function (a, b, c) { return false; };
35436/* eslint-enable no-unused-vars */
35437/**
35438 * Return the same value.
35439 */
35440var identity = function (_) { return _; };
35441/**
35442 * Generate a string containing static keys from compiler modules.
35443 */
35444function genStaticKeys$1(modules) {
35445    return modules
35446        .reduce(function (keys, m) {
35447        return keys.concat(m.staticKeys || []);
35448    }, [])
35449        .join(',');
35450}
35451/**
35452 * Check if two values are loosely equal - that is,
35453 * if they are plain objects, do they have the same shape?
35454 */
35455function looseEqual(a, b) {
35456    if (a === b)
35457        return true;
35458    var isObjectA = isObject(a);
35459    var isObjectB = isObject(b);
35460    if (isObjectA && isObjectB) {
35461        try {
35462            var isArrayA = Array.isArray(a);
35463            var isArrayB = Array.isArray(b);
35464            if (isArrayA && isArrayB) {
35465                return (a.length === b.length &&
35466                    a.every(function (e, i) {
35467                        return looseEqual(e, b[i]);
35468                    }));
35469            }
35470            else if (a instanceof Date && b instanceof Date) {
35471                return a.getTime() === b.getTime();
35472            }
35473            else if (!isArrayA && !isArrayB) {
35474                var keysA = Object.keys(a);
35475                var keysB = Object.keys(b);
35476                return (keysA.length === keysB.length &&
35477                    keysA.every(function (key) {
35478                        return looseEqual(a[key], b[key]);
35479                    }));
35480            }
35481            else {
35482                /* istanbul ignore next */
35483                return false;
35484            }
35485        }
35486        catch (e) {
35487            /* istanbul ignore next */
35488            return false;
35489        }
35490    }
35491    else if (!isObjectA && !isObjectB) {
35492        return String(a) === String(b);
35493    }
35494    else {
35495        return false;
35496    }
35497}
35498/**
35499 * Return the first index at which a loosely equal value can be
35500 * found in the array (if value is a plain object, the array must
35501 * contain an object of the same shape), or -1 if it is not present.
35502 */
35503function looseIndexOf(arr, val) {
35504    for (var i = 0; i < arr.length; i++) {
35505        if (looseEqual(arr[i], val))
35506            return i;
35507    }
35508    return -1;
35509}
35510/**
35511 * Ensure a function is called only once.
35512 */
35513function once(fn) {
35514    var called = false;
35515    return function () {
35516        if (!called) {
35517            called = true;
35518            fn.apply(this, arguments);
35519        }
35520    };
35521}
35522// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill
35523function hasChanged(x, y) {
35524    if (x === y) {
35525        return x === 0 && 1 / x !== 1 / y;
35526    }
35527    else {
35528        return x === x || y === y;
35529    }
35530}
35531
35532var SSR_ATTR = 'data-server-rendered';
35533var ASSET_TYPES = ['component', 'directive', 'filter'];
35534var LIFECYCLE_HOOKS = [
35535    'beforeCreate',
35536    'created',
35537    'beforeMount',
35538    'mounted',
35539    'beforeUpdate',
35540    'updated',
35541    'beforeDestroy',
35542    'destroyed',
35543    'activated',
35544    'deactivated',
35545    'errorCaptured',
35546    'serverPrefetch',
35547    'renderTracked',
35548    'renderTriggered'
35549];
35550
35551var config = {
35552    /**
35553     * Option merge strategies (used in core/util/options)
35554     */
35555    // $flow-disable-line
35556    optionMergeStrategies: Object.create(null),
35557    /**
35558     * Whether to suppress warnings.
35559     */
35560    silent: false,
35561    /**
35562     * Show production mode tip message on boot?
35563     */
35564    productionTip: "development" !== 'production',
35565    /**
35566     * Whether to enable devtools
35567     */
35568    devtools: "development" !== 'production',
35569    /**
35570     * Whether to record perf
35571     */
35572    performance: false,
35573    /**
35574     * Error handler for watcher errors
35575     */
35576    errorHandler: null,
35577    /**
35578     * Warn handler for watcher warns
35579     */
35580    warnHandler: null,
35581    /**
35582     * Ignore certain custom elements
35583     */
35584    ignoredElements: [],
35585    /**
35586     * Custom user key aliases for v-on
35587     */
35588    // $flow-disable-line
35589    keyCodes: Object.create(null),
35590    /**
35591     * Check if a tag is reserved so that it cannot be registered as a
35592     * component. This is platform-dependent and may be overwritten.
35593     */
35594    isReservedTag: no,
35595    /**
35596     * Check if an attribute is reserved so that it cannot be used as a component
35597     * prop. This is platform-dependent and may be overwritten.
35598     */
35599    isReservedAttr: no,
35600    /**
35601     * Check if a tag is an unknown element.
35602     * Platform-dependent.
35603     */
35604    isUnknownElement: no,
35605    /**
35606     * Get the namespace of an element
35607     */
35608    getTagNamespace: noop,
35609    /**
35610     * Parse the real tag name for the specific platform.
35611     */
35612    parsePlatformTagName: identity,
35613    /**
35614     * Check if an attribute must be bound using property, e.g. value
35615     * Platform-dependent.
35616     */
35617    mustUseProp: no,
35618    /**
35619     * Perform updates asynchronously. Intended to be used by Vue Test Utils
35620     * This will significantly reduce performance if set to false.
35621     */
35622    async: true,
35623    /**
35624     * Exposed for legacy reasons
35625     */
35626    _lifecycleHooks: LIFECYCLE_HOOKS
35627};
35628
35629/**
35630 * unicode letters used for parsing html tags, component names and property paths.
35631 * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
35632 * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
35633 */
35634var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
35635/**
35636 * Check if a string starts with $ or _
35637 */
35638function isReserved(str) {
35639    var c = (str + '').charCodeAt(0);
35640    return c === 0x24 || c === 0x5f;
35641}
35642/**
35643 * Define a property.
35644 */
35645function def(obj, key, val, enumerable) {
35646    Object.defineProperty(obj, key, {
35647        value: val,
35648        enumerable: !!enumerable,
35649        writable: true,
35650        configurable: true
35651    });
35652}
35653/**
35654 * Parse simple path.
35655 */
35656var bailRE = new RegExp("[^".concat(unicodeRegExp.source, ".$_\\d]"));
35657function parsePath(path) {
35658    if (bailRE.test(path)) {
35659        return;
35660    }
35661    var segments = path.split('.');
35662    return function (obj) {
35663        for (var i = 0; i < segments.length; i++) {
35664            if (!obj)
35665                return;
35666            obj = obj[segments[i]];
35667        }
35668        return obj;
35669    };
35670}
35671
35672// can we use __proto__?
35673var hasProto = '__proto__' in {};
35674// Browser environment sniffing
35675var inBrowser = typeof window !== 'undefined';
35676var UA = inBrowser && window.navigator.userAgent.toLowerCase();
35677var isIE = UA && /msie|trident/.test(UA);
35678var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
35679var isEdge = UA && UA.indexOf('edge/') > 0;
35680UA && UA.indexOf('android') > 0;
35681var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);
35682UA && /chrome\/\d+/.test(UA) && !isEdge;
35683UA && /phantomjs/.test(UA);
35684var isFF = UA && UA.match(/firefox\/(\d+)/);
35685// Firefox has a "watch" function on Object.prototype...
35686// @ts-expect-error firebox support
35687var nativeWatch = {}.watch;
35688var supportsPassive = false;
35689if (inBrowser) {
35690    try {
35691        var opts = {};
35692        Object.defineProperty(opts, 'passive', {
35693            get: function () {
35694                /* istanbul ignore next */
35695                supportsPassive = true;
35696            }
35697        }); // https://github.com/facebook/flow/issues/285
35698        window.addEventListener('test-passive', null, opts);
35699    }
35700    catch (e) { }
35701}
35702// this needs to be lazy-evaled because vue may be required before
35703// vue-server-renderer can set VUE_ENV
35704var _isServer;
35705var isServerRendering = function () {
35706    if (_isServer === undefined) {
35707        /* istanbul ignore if */
35708        if (!inBrowser && typeof __webpack_require__.g !== 'undefined') {
35709            // detect presence of vue-server-renderer and avoid
35710            // Webpack shimming the process
35711            _isServer =
35712                __webpack_require__.g['process'] && __webpack_require__.g['process'].env.VUE_ENV === 'server';
35713        }
35714        else {
35715            _isServer = false;
35716        }
35717    }
35718    return _isServer;
35719};
35720// detect devtools
35721var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
35722/* istanbul ignore next */
35723function isNative(Ctor) {
35724    return typeof Ctor === 'function' && /native code/.test(Ctor.toString());
35725}
35726var hasSymbol = typeof Symbol !== 'undefined' &&
35727    isNative(Symbol) &&
35728    typeof Reflect !== 'undefined' &&
35729    isNative(Reflect.ownKeys);
35730var _Set; // $flow-disable-line
35731/* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {
35732    // use native Set when available.
35733    _Set = Set;
35734}
35735else {
35736    // a non-standard Set polyfill that only works with primitive keys.
35737    _Set = /** @class */ (function () {
35738        function Set() {
35739            this.set = Object.create(null);
35740        }
35741        Set.prototype.has = function (key) {
35742            return this.set[key] === true;
35743        };
35744        Set.prototype.add = function (key) {
35745            this.set[key] = true;
35746        };
35747        Set.prototype.clear = function () {
35748            this.set = Object.create(null);
35749        };
35750        return Set;
35751    }());
35752}
35753
35754var currentInstance = null;
35755/**
35756 * This is exposed for compatibility with v3 (e.g. some functions in VueUse
35757 * relies on it). Do not use this internally, just use `currentInstance`.
35758 *
35759 * @internal this function needs manual type declaration because it relies
35760 * on previously manually authored types from Vue 2
35761 */
35762function getCurrentInstance() {
35763    return currentInstance && { proxy: currentInstance };
35764}
35765/**
35766 * @internal
35767 */
35768function setCurrentInstance(vm) {
35769    if (vm === void 0) { vm = null; }
35770    if (!vm)
35771        currentInstance && currentInstance._scope.off();
35772    currentInstance = vm;
35773    vm && vm._scope.on();
35774}
35775
35776/**
35777 * @internal
35778 */
35779var VNode = /** @class */ (function () {
35780    function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {
35781        this.tag = tag;
35782        this.data = data;
35783        this.children = children;
35784        this.text = text;
35785        this.elm = elm;
35786        this.ns = undefined;
35787        this.context = context;
35788        this.fnContext = undefined;
35789        this.fnOptions = undefined;
35790        this.fnScopeId = undefined;
35791        this.key = data && data.key;
35792        this.componentOptions = componentOptions;
35793        this.componentInstance = undefined;
35794        this.parent = undefined;
35795        this.raw = false;
35796        this.isStatic = false;
35797        this.isRootInsert = true;
35798        this.isComment = false;
35799        this.isCloned = false;
35800        this.isOnce = false;
35801        this.asyncFactory = asyncFactory;
35802        this.asyncMeta = undefined;
35803        this.isAsyncPlaceholder = false;
35804    }
35805    Object.defineProperty(VNode.prototype, "child", {
35806        // DEPRECATED: alias for componentInstance for backwards compat.
35807        /* istanbul ignore next */
35808        get: function () {
35809            return this.componentInstance;
35810        },
35811        enumerable: false,
35812        configurable: true
35813    });
35814    return VNode;
35815}());
35816var createEmptyVNode = function (text) {
35817    if (text === void 0) { text = ''; }
35818    var node = new VNode();
35819    node.text = text;
35820    node.isComment = true;
35821    return node;
35822};
35823function createTextVNode(val) {
35824    return new VNode(undefined, undefined, undefined, String(val));
35825}
35826// optimized shallow clone
35827// used for static nodes and slot nodes because they may be reused across
35828// multiple renders, cloning them avoids errors when DOM manipulations rely
35829// on their elm reference.
35830function cloneVNode(vnode) {
35831    var cloned = new VNode(vnode.tag, vnode.data, 
35832    // #7975
35833    // clone children array to avoid mutating original in case of cloning
35834    // a child.
35835    vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);
35836    cloned.ns = vnode.ns;
35837    cloned.isStatic = vnode.isStatic;
35838    cloned.key = vnode.key;
35839    cloned.isComment = vnode.isComment;
35840    cloned.fnContext = vnode.fnContext;
35841    cloned.fnOptions = vnode.fnOptions;
35842    cloned.fnScopeId = vnode.fnScopeId;
35843    cloned.asyncMeta = vnode.asyncMeta;
35844    cloned.isCloned = true;
35845    return cloned;
35846}
35847
35848/* not type checking this file because flow doesn't play well with Proxy */
35849var initProxy;
35850if (true) {
35851    var allowedGlobals_1 = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +
35852        'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
35853        'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +
35854        'require' // for Webpack/Browserify
35855    );
35856    var warnNonPresent_1 = function (target, key) {
35857        warn$2("Property or method \"".concat(key, "\" is not defined on the instance but ") +
35858            'referenced during render. Make sure that this property is reactive, ' +
35859            'either in the data option, or for class-based components, by ' +
35860            'initializing the property. ' +
35861            'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);
35862    };
35863    var warnReservedPrefix_1 = function (target, key) {
35864        warn$2("Property \"".concat(key, "\" must be accessed with \"$data.").concat(key, "\" because ") +
35865            'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
35866            'prevent conflicts with Vue internals. ' +
35867            'See: https://v2.vuejs.org/v2/api/#data', target);
35868    };
35869    var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy);
35870    if (hasProxy_1) {
35871        var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
35872        config.keyCodes = new Proxy(config.keyCodes, {
35873            set: function (target, key, value) {
35874                if (isBuiltInModifier_1(key)) {
35875                    warn$2("Avoid overwriting built-in modifier in config.keyCodes: .".concat(key));
35876                    return false;
35877                }
35878                else {
35879                    target[key] = value;
35880                    return true;
35881                }
35882            }
35883        });
35884    }
35885    var hasHandler_1 = {
35886        has: function (target, key) {
35887            var has = key in target;
35888            var isAllowed = allowedGlobals_1(key) ||
35889                (typeof key === 'string' &&
35890                    key.charAt(0) === '_' &&
35891                    !(key in target.$data));
35892            if (!has && !isAllowed) {
35893                if (key in target.$data)
35894                    warnReservedPrefix_1(target, key);
35895                else
35896                    warnNonPresent_1(target, key);
35897            }
35898            return has || !isAllowed;
35899        }
35900    };
35901    var getHandler_1 = {
35902        get: function (target, key) {
35903            if (typeof key === 'string' && !(key in target)) {
35904                if (key in target.$data)
35905                    warnReservedPrefix_1(target, key);
35906                else
35907                    warnNonPresent_1(target, key);
35908            }
35909            return target[key];
35910        }
35911    };
35912    initProxy = function initProxy(vm) {
35913        if (hasProxy_1) {
35914            // determine which proxy handler to use
35915            var options = vm.$options;
35916            var handlers = options.render && options.render._withStripped ? getHandler_1 : hasHandler_1;
35917            vm._renderProxy = new Proxy(vm, handlers);
35918        }
35919        else {
35920            vm._renderProxy = vm;
35921        }
35922    };
35923}
35924
35925/******************************************************************************
35926Copyright (c) Microsoft Corporation.
35927
35928Permission to use, copy, modify, and/or distribute this software for any
35929purpose with or without fee is hereby granted.
35930
35931THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
35932REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
35933AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
35934INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
35935LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
35936OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
35937PERFORMANCE OF THIS SOFTWARE.
35938***************************************************************************** */
35939
35940var __assign = function() {
35941    __assign = Object.assign || function __assign(t) {
35942        for (var s, i = 1, n = arguments.length; i < n; i++) {
35943            s = arguments[i];
35944            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
35945        }
35946        return t;
35947    };
35948    return __assign.apply(this, arguments);
35949};
35950
35951var uid$2 = 0;
35952/**
35953 * A dep is an observable that can have multiple
35954 * directives subscribing to it.
35955 * @internal
35956 */
35957var Dep = /** @class */ (function () {
35958    function Dep() {
35959        this.id = uid$2++;
35960        this.subs = [];
35961    }
35962    Dep.prototype.addSub = function (sub) {
35963        this.subs.push(sub);
35964    };
35965    Dep.prototype.removeSub = function (sub) {
35966        remove$2(this.subs, sub);
35967    };
35968    Dep.prototype.depend = function (info) {
35969        if (Dep.target) {
35970            Dep.target.addDep(this);
35971            if ( true && info && Dep.target.onTrack) {
35972                Dep.target.onTrack(__assign({ effect: Dep.target }, info));
35973            }
35974        }
35975    };
35976    Dep.prototype.notify = function (info) {
35977        // stabilize the subscriber list first
35978        var subs = this.subs.slice();
35979        if ( true && !config.async) {
35980            // subs aren't sorted in scheduler if not running async
35981            // we need to sort them now to make sure they fire in correct
35982            // order
35983            subs.sort(function (a, b) { return a.id - b.id; });
35984        }
35985        for (var i = 0, l = subs.length; i < l; i++) {
35986            if ( true && info) {
35987                var sub = subs[i];
35988                sub.onTrigger &&
35989                    sub.onTrigger(__assign({ effect: subs[i] }, info));
35990            }
35991            subs[i].update();
35992        }
35993    };
35994    return Dep;
35995}());
35996// The current target watcher being evaluated.
35997// This is globally unique because only one watcher
35998// can be evaluated at a time.
35999Dep.target = null;
36000var targetStack = [];
36001function pushTarget(target) {
36002    targetStack.push(target);
36003    Dep.target = target;
36004}
36005function popTarget() {
36006    targetStack.pop();
36007    Dep.target = targetStack[targetStack.length - 1];
36008}
36009
36010/*
36011 * not type checking this file because flow doesn't play well with
36012 * dynamically accessing methods on Array prototype
36013 */
36014var arrayProto = Array.prototype;
36015var arrayMethods = Object.create(arrayProto);
36016var methodsToPatch = [
36017    'push',
36018    'pop',
36019    'shift',
36020    'unshift',
36021    'splice',
36022    'sort',
36023    'reverse'
36024];
36025/**
36026 * Intercept mutating methods and emit events
36027 */
36028methodsToPatch.forEach(function (method) {
36029    // cache original method
36030    var original = arrayProto[method];
36031    def(arrayMethods, method, function mutator() {
36032        var args = [];
36033        for (var _i = 0; _i < arguments.length; _i++) {
36034            args[_i] = arguments[_i];
36035        }
36036        var result = original.apply(this, args);
36037        var ob = this.__ob__;
36038        var inserted;
36039        switch (method) {
36040            case 'push':
36041            case 'unshift':
36042                inserted = args;
36043                break;
36044            case 'splice':
36045                inserted = args.slice(2);
36046                break;
36047        }
36048        if (inserted)
36049            ob.observeArray(inserted);
36050        // notify change
36051        if (true) {
36052            ob.dep.notify({
36053                type: "array mutation" /* TriggerOpTypes.ARRAY_MUTATION */,
36054                target: this,
36055                key: method
36056            });
36057        }
36058        else {}
36059        return result;
36060    });
36061});
36062
36063var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
36064var NO_INIITIAL_VALUE = {};
36065/**
36066 * In some cases we may want to disable observation inside a component's
36067 * update computation.
36068 */
36069var shouldObserve = true;
36070function toggleObserving(value) {
36071    shouldObserve = value;
36072}
36073// ssr mock dep
36074var mockDep = {
36075    notify: noop,
36076    depend: noop,
36077    addSub: noop,
36078    removeSub: noop
36079};
36080/**
36081 * Observer class that is attached to each observed
36082 * object. Once attached, the observer converts the target
36083 * object's property keys into getter/setters that
36084 * collect dependencies and dispatch updates.
36085 */
36086var Observer = /** @class */ (function () {
36087    function Observer(value, shallow, mock) {
36088        if (shallow === void 0) { shallow = false; }
36089        if (mock === void 0) { mock = false; }
36090        this.value = value;
36091        this.shallow = shallow;
36092        this.mock = mock;
36093        // this.value = value
36094        this.dep = mock ? mockDep : new Dep();
36095        this.vmCount = 0;
36096        def(value, '__ob__', this);
36097        if (isArray(value)) {
36098            if (!mock) {
36099                if (hasProto) {
36100                    value.__proto__ = arrayMethods;
36101                    /* eslint-enable no-proto */
36102                }
36103                else {
36104                    for (var i = 0, l = arrayKeys.length; i < l; i++) {
36105                        var key = arrayKeys[i];
36106                        def(value, key, arrayMethods[key]);
36107                    }
36108                }
36109            }
36110            if (!shallow) {
36111                this.observeArray(value);
36112            }
36113        }
36114        else {
36115            /**
36116             * Walk through all properties and convert them into
36117             * getter/setters. This method should only be called when
36118             * value type is Object.
36119             */
36120            var keys = Object.keys(value);
36121            for (var i = 0; i < keys.length; i++) {
36122                var key = keys[i];
36123                defineReactive(value, key, NO_INIITIAL_VALUE, undefined, shallow, mock);
36124            }
36125        }
36126    }
36127    /**
36128     * Observe a list of Array items.
36129     */
36130    Observer.prototype.observeArray = function (value) {
36131        for (var i = 0, l = value.length; i < l; i++) {
36132            observe(value[i], false, this.mock);
36133        }
36134    };
36135    return Observer;
36136}());
36137// helpers
36138/**
36139 * Attempt to create an observer instance for a value,
36140 * returns the new observer if successfully observed,
36141 * or the existing observer if the value already has one.
36142 */
36143function observe(value, shallow, ssrMockReactivity) {
36144    if (!isObject(value) || isRef(value) || value instanceof VNode) {
36145        return;
36146    }
36147    var ob;
36148    if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
36149        ob = value.__ob__;
36150    }
36151    else if (shouldObserve &&
36152        (ssrMockReactivity || !isServerRendering()) &&
36153        (isArray(value) || isPlainObject(value)) &&
36154        Object.isExtensible(value) &&
36155        !value.__v_skip /* ReactiveFlags.SKIP */) {
36156        ob = new Observer(value, shallow, ssrMockReactivity);
36157    }
36158    return ob;
36159}
36160/**
36161 * Define a reactive property on an Object.
36162 */
36163function defineReactive(obj, key, val, customSetter, shallow, mock) {
36164    var dep = new Dep();
36165    var property = Object.getOwnPropertyDescriptor(obj, key);
36166    if (property && property.configurable === false) {
36167        return;
36168    }
36169    // cater for pre-defined getter/setters
36170    var getter = property && property.get;
36171    var setter = property && property.set;
36172    if ((!getter || setter) &&
36173        (val === NO_INIITIAL_VALUE || arguments.length === 2)) {
36174        val = obj[key];
36175    }
36176    var childOb = !shallow && observe(val, false, mock);
36177    Object.defineProperty(obj, key, {
36178        enumerable: true,
36179        configurable: true,
36180        get: function reactiveGetter() {
36181            var value = getter ? getter.call(obj) : val;
36182            if (Dep.target) {
36183                if (true) {
36184                    dep.depend({
36185                        target: obj,
36186                        type: "get" /* TrackOpTypes.GET */,
36187                        key: key
36188                    });
36189                }
36190                else {}
36191                if (childOb) {
36192                    childOb.dep.depend();
36193                    if (isArray(value)) {
36194                        dependArray(value);
36195                    }
36196                }
36197            }
36198            return isRef(value) && !shallow ? value.value : value;
36199        },
36200        set: function reactiveSetter(newVal) {
36201            var value = getter ? getter.call(obj) : val;
36202            if (!hasChanged(value, newVal)) {
36203                return;
36204            }
36205            if ( true && customSetter) {
36206                customSetter();
36207            }
36208            if (setter) {
36209                setter.call(obj, newVal);
36210            }
36211            else if (getter) {
36212                // #7981: for accessor properties without setter
36213                return;
36214            }
36215            else if (!shallow && isRef(value) && !isRef(newVal)) {
36216                value.value = newVal;
36217                return;
36218            }
36219            else {
36220                val = newVal;
36221            }
36222            childOb = !shallow && observe(newVal, false, mock);
36223            if (true) {
36224                dep.notify({
36225                    type: "set" /* TriggerOpTypes.SET */,
36226                    target: obj,
36227                    key: key,
36228                    newValue: newVal,
36229                    oldValue: value
36230                });
36231            }
36232            else {}
36233        }
36234    });
36235    return dep;
36236}
36237function set(target, key, val) {
36238    if ( true && (isUndef(target) || isPrimitive(target))) {
36239        warn$2("Cannot set reactive property on undefined, null, or primitive value: ".concat(target));
36240    }
36241    if (isReadonly(target)) {
36242         true && warn$2("Set operation on key \"".concat(key, "\" failed: target is readonly."));
36243        return;
36244    }
36245    var ob = target.__ob__;
36246    if (isArray(target) && isValidArrayIndex(key)) {
36247        target.length = Math.max(target.length, key);
36248        target.splice(key, 1, val);
36249        // when mocking for SSR, array methods are not hijacked
36250        if (ob && !ob.shallow && ob.mock) {
36251            observe(val, false, true);
36252        }
36253        return val;
36254    }
36255    if (key in target && !(key in Object.prototype)) {
36256        target[key] = val;
36257        return val;
36258    }
36259    if (target._isVue || (ob && ob.vmCount)) {
36260         true &&
36261            warn$2('Avoid adding reactive properties to a Vue instance or its root $data ' +
36262                'at runtime - declare it upfront in the data option.');
36263        return val;
36264    }
36265    if (!ob) {
36266        target[key] = val;
36267        return val;
36268    }
36269    defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);
36270    if (true) {
36271        ob.dep.notify({
36272            type: "add" /* TriggerOpTypes.ADD */,
36273            target: target,
36274            key: key,
36275            newValue: val,
36276            oldValue: undefined
36277        });
36278    }
36279    else {}
36280    return val;
36281}
36282function del(target, key) {
36283    if ( true && (isUndef(target) || isPrimitive(target))) {
36284        warn$2("Cannot delete reactive property on undefined, null, or primitive value: ".concat(target));
36285    }
36286    if (isArray(target) && isValidArrayIndex(key)) {
36287        target.splice(key, 1);
36288        return;
36289    }
36290    var ob = target.__ob__;
36291    if (target._isVue || (ob && ob.vmCount)) {
36292         true &&
36293            warn$2('Avoid deleting properties on a Vue instance or its root $data ' +
36294                '- just set it to null.');
36295        return;
36296    }
36297    if (isReadonly(target)) {
36298         true &&
36299            warn$2("Delete operation on key \"".concat(key, "\" failed: target is readonly."));
36300        return;
36301    }
36302    if (!hasOwn(target, key)) {
36303        return;
36304    }
36305    delete target[key];
36306    if (!ob) {
36307        return;
36308    }
36309    if (true) {
36310        ob.dep.notify({
36311            type: "delete" /* TriggerOpTypes.DELETE */,
36312            target: target,
36313            key: key
36314        });
36315    }
36316    else {}
36317}
36318/**
36319 * Collect dependencies on array elements when the array is touched, since
36320 * we cannot intercept array element access like property getters.
36321 */
36322function dependArray(value) {
36323    for (var e = void 0, i = 0, l = value.length; i < l; i++) {
36324        e = value[i];
36325        if (e && e.__ob__) {
36326            e.__ob__.dep.depend();
36327        }
36328        if (isArray(e)) {
36329            dependArray(e);
36330        }
36331    }
36332}
36333
36334function reactive(target) {
36335    makeReactive(target, false);
36336    return target;
36337}
36338/**
36339 * Return a shallowly-reactive copy of the original object, where only the root
36340 * level properties are reactive. It also does not auto-unwrap refs (even at the
36341 * root level).
36342 */
36343function shallowReactive(target) {
36344    makeReactive(target, true);
36345    def(target, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
36346    return target;
36347}
36348function makeReactive(target, shallow) {
36349    // if trying to observe a readonly proxy, return the readonly version.
36350    if (!isReadonly(target)) {
36351        if (true) {
36352            if (isArray(target)) {
36353                warn$2("Avoid using Array as root value for ".concat(shallow ? "shallowReactive()" : "reactive()", " as it cannot be tracked in watch() or watchEffect(). Use ").concat(shallow ? "shallowRef()" : "ref()", " instead. This is a Vue-2-only limitation."));
36354            }
36355            var existingOb = target && target.__ob__;
36356            if (existingOb && existingOb.shallow !== shallow) {
36357                warn$2("Target is already a ".concat(existingOb.shallow ? "" : "non-", "shallow reactive object, and cannot be converted to ").concat(shallow ? "" : "non-", "shallow."));
36358            }
36359        }
36360        var ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);
36361        if ( true && !ob) {
36362            if (target == null || isPrimitive(target)) {
36363                warn$2("value cannot be made reactive: ".concat(String(target)));
36364            }
36365            if (isCollectionType(target)) {
36366                warn$2("Vue 2 does not support reactive collection types such as Map or Set.");
36367            }
36368        }
36369    }
36370}
36371function isReactive(value) {
36372    if (isReadonly(value)) {
36373        return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
36374    }
36375    return !!(value && value.__ob__);
36376}
36377function isShallow(value) {
36378    return !!(value && value.__v_isShallow);
36379}
36380function isReadonly(value) {
36381    return !!(value && value.__v_isReadonly);
36382}
36383function isProxy(value) {
36384    return isReactive(value) || isReadonly(value);
36385}
36386function toRaw(observed) {
36387    var raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
36388    return raw ? toRaw(raw) : observed;
36389}
36390function markRaw(value) {
36391    def(value, "__v_skip" /* ReactiveFlags.SKIP */, true);
36392    return value;
36393}
36394/**
36395 * @internal
36396 */
36397function isCollectionType(value) {
36398    var type = toRawType(value);
36399    return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');
36400}
36401
36402/**
36403 * @internal
36404 */
36405var RefFlag = "__v_isRef";
36406function isRef(r) {
36407    return !!(r && r.__v_isRef === true);
36408}
36409function ref$1(value) {
36410    return createRef(value, false);
36411}
36412function shallowRef(value) {
36413    return createRef(value, true);
36414}
36415function createRef(rawValue, shallow) {
36416    if (isRef(rawValue)) {
36417        return rawValue;
36418    }
36419    var ref = {};
36420    def(ref, RefFlag, true);
36421    def(ref, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, shallow);
36422    def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));
36423    return ref;
36424}
36425function triggerRef(ref) {
36426    if ( true && !ref.dep) {
36427        warn$2("received object is not a triggerable ref.");
36428    }
36429    if (true) {
36430        ref.dep &&
36431            ref.dep.notify({
36432                type: "set" /* TriggerOpTypes.SET */,
36433                target: ref,
36434                key: 'value'
36435            });
36436    }
36437    else {}
36438}
36439function unref(ref) {
36440    return isRef(ref) ? ref.value : ref;
36441}
36442function proxyRefs(objectWithRefs) {
36443    if (isReactive(objectWithRefs)) {
36444        return objectWithRefs;
36445    }
36446    var proxy = {};
36447    var keys = Object.keys(objectWithRefs);
36448    for (var i = 0; i < keys.length; i++) {
36449        proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);
36450    }
36451    return proxy;
36452}
36453function proxyWithRefUnwrap(target, source, key) {
36454    Object.defineProperty(target, key, {
36455        enumerable: true,
36456        configurable: true,
36457        get: function () {
36458            var val = source[key];
36459            if (isRef(val)) {
36460                return val.value;
36461            }
36462            else {
36463                var ob = val && val.__ob__;
36464                if (ob)
36465                    ob.dep.depend();
36466                return val;
36467            }
36468        },
36469        set: function (value) {
36470            var oldValue = source[key];
36471            if (isRef(oldValue) && !isRef(value)) {
36472                oldValue.value = value;
36473            }
36474            else {
36475                source[key] = value;
36476            }
36477        }
36478    });
36479}
36480function customRef(factory) {
36481    var dep = new Dep();
36482    var _a = factory(function () {
36483        if (true) {
36484            dep.depend({
36485                target: ref,
36486                type: "get" /* TrackOpTypes.GET */,
36487                key: 'value'
36488            });
36489        }
36490        else {}
36491    }, function () {
36492        if (true) {
36493            dep.notify({
36494                target: ref,
36495                type: "set" /* TriggerOpTypes.SET */,
36496                key: 'value'
36497            });
36498        }
36499        else {}
36500    }), get = _a.get, set = _a.set;
36501    var ref = {
36502        get value() {
36503            return get();
36504        },
36505        set value(newVal) {
36506            set(newVal);
36507        }
36508    };
36509    def(ref, RefFlag, true);
36510    return ref;
36511}
36512function toRefs(object) {
36513    if ( true && !isReactive(object)) {
36514        warn$2("toRefs() expects a reactive object but received a plain one.");
36515    }
36516    var ret = isArray(object) ? new Array(object.length) : {};
36517    for (var key in object) {
36518        ret[key] = toRef(object, key);
36519    }
36520    return ret;
36521}
36522function toRef(object, key, defaultValue) {
36523    var val = object[key];
36524    if (isRef(val)) {
36525        return val;
36526    }
36527    var ref = {
36528        get value() {
36529            var val = object[key];
36530            return val === undefined ? defaultValue : val;
36531        },
36532        set value(newVal) {
36533            object[key] = newVal;
36534        }
36535    };
36536    def(ref, RefFlag, true);
36537    return ref;
36538}
36539
36540var rawToReadonlyFlag = "__v_rawToReadonly";
36541var rawToShallowReadonlyFlag = "__v_rawToShallowReadonly";
36542function readonly(target) {
36543    return createReadonly(target, false);
36544}
36545function createReadonly(target, shallow) {
36546    if (!isPlainObject(target)) {
36547        if (true) {
36548            if (isArray(target)) {
36549                warn$2("Vue 2 does not support readonly arrays.");
36550            }
36551            else if (isCollectionType(target)) {
36552                warn$2("Vue 2 does not support readonly collection types such as Map or Set.");
36553            }
36554            else {
36555                warn$2("value cannot be made readonly: ".concat(typeof target));
36556            }
36557        }
36558        return target;
36559    }
36560    // already a readonly object
36561    if (isReadonly(target)) {
36562        return target;
36563    }
36564    // already has a readonly proxy
36565    var existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;
36566    var existingProxy = target[existingFlag];
36567    if (existingProxy) {
36568        return existingProxy;
36569    }
36570    var proxy = Object.create(Object.getPrototypeOf(target));
36571    def(target, existingFlag, proxy);
36572    def(proxy, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, true);
36573    def(proxy, "__v_raw" /* ReactiveFlags.RAW */, target);
36574    if (isRef(target)) {
36575        def(proxy, RefFlag, true);
36576    }
36577    if (shallow || isShallow(target)) {
36578        def(proxy, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
36579    }
36580    var keys = Object.keys(target);
36581    for (var i = 0; i < keys.length; i++) {
36582        defineReadonlyProperty(proxy, target, keys[i], shallow);
36583    }
36584    return proxy;
36585}
36586function defineReadonlyProperty(proxy, target, key, shallow) {
36587    Object.defineProperty(proxy, key, {
36588        enumerable: true,
36589        configurable: true,
36590        get: function () {
36591            var val = target[key];
36592            return shallow || !isPlainObject(val) ? val : readonly(val);
36593        },
36594        set: function () {
36595             true &&
36596                warn$2("Set operation on key \"".concat(key, "\" failed: target is readonly."));
36597        }
36598    });
36599}
36600/**
36601 * Returns a reactive-copy of the original object, where only the root level
36602 * properties are readonly, and does NOT unwrap refs nor recursively convert
36603 * returned properties.
36604 * This is used for creating the props proxy object for stateful components.
36605 */
36606function shallowReadonly(target) {
36607    return createReadonly(target, true);
36608}
36609
36610function computed(getterOrOptions, debugOptions) {
36611    var getter;
36612    var setter;
36613    var onlyGetter = isFunction(getterOrOptions);
36614    if (onlyGetter) {
36615        getter = getterOrOptions;
36616        setter =  true
36617            ? function () {
36618                warn$2('Write operation failed: computed value is readonly');
36619            }
36620            : 0;
36621    }
36622    else {
36623        getter = getterOrOptions.get;
36624        setter = getterOrOptions.set;
36625    }
36626    var watcher = isServerRendering()
36627        ? null
36628        : new Watcher(currentInstance, getter, noop, { lazy: true });
36629    if ( true && watcher && debugOptions) {
36630        watcher.onTrack = debugOptions.onTrack;
36631        watcher.onTrigger = debugOptions.onTrigger;
36632    }
36633    var ref = {
36634        // some libs rely on the presence effect for checking computed refs
36635        // from normal refs, but the implementation doesn't matter
36636        effect: watcher,
36637        get value() {
36638            if (watcher) {
36639                if (watcher.dirty) {
36640                    watcher.evaluate();
36641                }
36642                if (Dep.target) {
36643                    if ( true && Dep.target.onTrack) {
36644                        Dep.target.onTrack({
36645                            effect: Dep.target,
36646                            target: ref,
36647                            type: "get" /* TrackOpTypes.GET */,
36648                            key: 'value'
36649                        });
36650                    }
36651                    watcher.depend();
36652                }
36653                return watcher.value;
36654            }
36655            else {
36656                return getter();
36657            }
36658        },
36659        set value(newVal) {
36660            setter(newVal);
36661        }
36662    };
36663    def(ref, RefFlag, true);
36664    def(ref, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, onlyGetter);
36665    return ref;
36666}
36667
36668var mark;
36669var measure;
36670if (true) {
36671    var perf_1 = inBrowser && window.performance;
36672    /* istanbul ignore if */
36673    if (perf_1 &&
36674        // @ts-ignore
36675        perf_1.mark &&
36676        // @ts-ignore
36677        perf_1.measure &&
36678        // @ts-ignore
36679        perf_1.clearMarks &&
36680        // @ts-ignore
36681        perf_1.clearMeasures) {
36682        mark = function (tag) { return perf_1.mark(tag); };
36683        measure = function (name, startTag, endTag) {
36684            perf_1.measure(name, startTag, endTag);
36685            perf_1.clearMarks(startTag);
36686            perf_1.clearMarks(endTag);
36687            // perf.clearMeasures(name)
36688        };
36689    }
36690}
36691
36692var normalizeEvent = cached(function (name) {
36693    var passive = name.charAt(0) === '&';
36694    name = passive ? name.slice(1) : name;
36695    var once = name.charAt(0) === '~'; // Prefixed last, checked first
36696    name = once ? name.slice(1) : name;
36697    var capture = name.charAt(0) === '!';
36698    name = capture ? name.slice(1) : name;
36699    return {
36700        name: name,
36701        once: once,
36702        capture: capture,
36703        passive: passive
36704    };
36705});
36706function createFnInvoker(fns, vm) {
36707    function invoker() {
36708        var fns = invoker.fns;
36709        if (isArray(fns)) {
36710            var cloned = fns.slice();
36711            for (var i = 0; i < cloned.length; i++) {
36712                invokeWithErrorHandling(cloned[i], null, arguments, vm, "v-on handler");
36713            }
36714        }
36715        else {
36716            // return handler return value for single handlers
36717            return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler");
36718        }
36719    }
36720    invoker.fns = fns;
36721    return invoker;
36722}
36723function updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {
36724    var name, cur, old, event;
36725    for (name in on) {
36726        cur = on[name];
36727        old = oldOn[name];
36728        event = normalizeEvent(name);
36729        if (isUndef(cur)) {
36730             true &&
36731                warn$2("Invalid handler for event \"".concat(event.name, "\": got ") + String(cur), vm);
36732        }
36733        else if (isUndef(old)) {
36734            if (isUndef(cur.fns)) {
36735                cur = on[name] = createFnInvoker(cur, vm);
36736            }
36737            if (isTrue(event.once)) {
36738                cur = on[name] = createOnceHandler(event.name, cur, event.capture);
36739            }
36740            add(event.name, cur, event.capture, event.passive, event.params);
36741        }
36742        else if (cur !== old) {
36743            old.fns = cur;
36744            on[name] = old;
36745        }
36746    }
36747    for (name in oldOn) {
36748        if (isUndef(on[name])) {
36749            event = normalizeEvent(name);
36750            remove(event.name, oldOn[name], event.capture);
36751        }
36752    }
36753}
36754
36755function mergeVNodeHook(def, hookKey, hook) {
36756    if (def instanceof VNode) {
36757        def = def.data.hook || (def.data.hook = {});
36758    }
36759    var invoker;
36760    var oldHook = def[hookKey];
36761    function wrappedHook() {
36762        hook.apply(this, arguments);
36763        // important: remove merged hook to ensure it's called only once
36764        // and prevent memory leak
36765        remove$2(invoker.fns, wrappedHook);
36766    }
36767    if (isUndef(oldHook)) {
36768        // no existing hook
36769        invoker = createFnInvoker([wrappedHook]);
36770    }
36771    else {
36772        /* istanbul ignore if */
36773        if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
36774            // already a merged invoker
36775            invoker = oldHook;
36776            invoker.fns.push(wrappedHook);
36777        }
36778        else {
36779            // existing plain hook
36780            invoker = createFnInvoker([oldHook, wrappedHook]);
36781        }
36782    }
36783    invoker.merged = true;
36784    def[hookKey] = invoker;
36785}
36786
36787function extractPropsFromVNodeData(data, Ctor, tag) {
36788    // we are only extracting raw values here.
36789    // validation and default values are handled in the child
36790    // component itself.
36791    var propOptions = Ctor.options.props;
36792    if (isUndef(propOptions)) {
36793        return;
36794    }
36795    var res = {};
36796    var attrs = data.attrs, props = data.props;
36797    if (isDef(attrs) || isDef(props)) {
36798        for (var key in propOptions) {
36799            var altKey = hyphenate(key);
36800            if (true) {
36801                var keyInLowerCase = key.toLowerCase();
36802                if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {
36803                    tip("Prop \"".concat(keyInLowerCase, "\" is passed to component ") +
36804                        "".concat(formatComponentName(
36805                        // @ts-expect-error tag is string
36806                        tag || Ctor), ", but the declared prop name is") +
36807                        " \"".concat(key, "\". ") +
36808                        "Note that HTML attributes are case-insensitive and camelCased " +
36809                        "props need to use their kebab-case equivalents when using in-DOM " +
36810                        "templates. You should probably use \"".concat(altKey, "\" instead of \"").concat(key, "\"."));
36811                }
36812            }
36813            checkProp(res, props, key, altKey, true) ||
36814                checkProp(res, attrs, key, altKey, false);
36815        }
36816    }
36817    return res;
36818}
36819function checkProp(res, hash, key, altKey, preserve) {
36820    if (isDef(hash)) {
36821        if (hasOwn(hash, key)) {
36822            res[key] = hash[key];
36823            if (!preserve) {
36824                delete hash[key];
36825            }
36826            return true;
36827        }
36828        else if (hasOwn(hash, altKey)) {
36829            res[key] = hash[altKey];
36830            if (!preserve) {
36831                delete hash[altKey];
36832            }
36833            return true;
36834        }
36835    }
36836    return false;
36837}
36838
36839// The template compiler attempts to minimize the need for normalization by
36840// statically analyzing the template at compile time.
36841//
36842// For plain HTML markup, normalization can be completely skipped because the
36843// generated render function is guaranteed to return Array<VNode>. There are
36844// two cases where extra normalization is needed:
36845// 1. When the children contains components - because a functional component
36846// may return an Array instead of a single root. In this case, just a simple
36847// normalization is needed - if any child is an Array, we flatten the whole
36848// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
36849// because functional components already normalize their own children.
36850function simpleNormalizeChildren(children) {
36851    for (var i = 0; i < children.length; i++) {
36852        if (isArray(children[i])) {
36853            return Array.prototype.concat.apply([], children);
36854        }
36855    }
36856    return children;
36857}
36858// 2. When the children contains constructs that always generated nested Arrays,
36859// e.g. <template>, <slot>, v-for, or when the children is provided by user
36860// with hand-written render functions / JSX. In such cases a full normalization
36861// is needed to cater to all possible types of children values.
36862function normalizeChildren(children) {
36863    return isPrimitive(children)
36864        ? [createTextVNode(children)]
36865        : isArray(children)
36866            ? normalizeArrayChildren(children)
36867            : undefined;
36868}
36869function isTextNode(node) {
36870    return isDef(node) && isDef(node.text) && isFalse(node.isComment);
36871}
36872function normalizeArrayChildren(children, nestedIndex) {
36873    var res = [];
36874    var i, c, lastIndex, last;
36875    for (i = 0; i < children.length; i++) {
36876        c = children[i];
36877        if (isUndef(c) || typeof c === 'boolean')
36878            continue;
36879        lastIndex = res.length - 1;
36880        last = res[lastIndex];
36881        //  nested
36882        if (isArray(c)) {
36883            if (c.length > 0) {
36884                c = normalizeArrayChildren(c, "".concat(nestedIndex || '', "_").concat(i));
36885                // merge adjacent text nodes
36886                if (isTextNode(c[0]) && isTextNode(last)) {
36887                    res[lastIndex] = createTextVNode(last.text + c[0].text);
36888                    c.shift();
36889                }
36890                res.push.apply(res, c);
36891            }
36892        }
36893        else if (isPrimitive(c)) {
36894            if (isTextNode(last)) {
36895                // merge adjacent text nodes
36896                // this is necessary for SSR hydration because text nodes are
36897                // essentially merged when rendered to HTML strings
36898                res[lastIndex] = createTextVNode(last.text + c);
36899            }
36900            else if (c !== '') {
36901                // convert primitive to vnode
36902                res.push(createTextVNode(c));
36903            }
36904        }
36905        else {
36906            if (isTextNode(c) && isTextNode(last)) {
36907                // merge adjacent text nodes
36908                res[lastIndex] = createTextVNode(last.text + c.text);
36909            }
36910            else {
36911                // default key for nested array children (likely generated by v-for)
36912                if (isTrue(children._isVList) &&
36913                    isDef(c.tag) &&
36914                    isUndef(c.key) &&
36915                    isDef(nestedIndex)) {
36916                    c.key = "__vlist".concat(nestedIndex, "_").concat(i, "__");
36917                }
36918                res.push(c);
36919            }
36920        }
36921    }
36922    return res;
36923}
36924
36925var SIMPLE_NORMALIZE = 1;
36926var ALWAYS_NORMALIZE = 2;
36927// wrapper function for providing a more flexible interface
36928// without getting yelled at by flow
36929function createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {
36930    if (isArray(data) || isPrimitive(data)) {
36931        normalizationType = children;
36932        children = data;
36933        data = undefined;
36934    }
36935    if (isTrue(alwaysNormalize)) {
36936        normalizationType = ALWAYS_NORMALIZE;
36937    }
36938    return _createElement(context, tag, data, children, normalizationType);
36939}
36940function _createElement(context, tag, data, children, normalizationType) {
36941    if (isDef(data) && isDef(data.__ob__)) {
36942         true &&
36943            warn$2("Avoid using observed data object as vnode data: ".concat(JSON.stringify(data), "\n") + 'Always create fresh vnode data objects in each render!', context);
36944        return createEmptyVNode();
36945    }
36946    // object syntax in v-bind
36947    if (isDef(data) && isDef(data.is)) {
36948        tag = data.is;
36949    }
36950    if (!tag) {
36951        // in case of component :is set to falsy value
36952        return createEmptyVNode();
36953    }
36954    // warn against non-primitive key
36955    if ( true && isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {
36956        warn$2('Avoid using non-primitive value as key, ' +
36957            'use string/number value instead.', context);
36958    }
36959    // support single function children as default scoped slot
36960    if (isArray(children) && isFunction(children[0])) {
36961        data = data || {};
36962        data.scopedSlots = { default: children[0] };
36963        children.length = 0;
36964    }
36965    if (normalizationType === ALWAYS_NORMALIZE) {
36966        children = normalizeChildren(children);
36967    }
36968    else if (normalizationType === SIMPLE_NORMALIZE) {
36969        children = simpleNormalizeChildren(children);
36970    }
36971    var vnode, ns;
36972    if (typeof tag === 'string') {
36973        var Ctor = void 0;
36974        ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
36975        if (config.isReservedTag(tag)) {
36976            // platform built-in elements
36977            if ( true &&
36978                isDef(data) &&
36979                isDef(data.nativeOn) &&
36980                data.tag !== 'component') {
36981                warn$2("The .native modifier for v-on is only valid on components but it was used on <".concat(tag, ">."), context);
36982            }
36983            vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);
36984        }
36985        else if ((!data || !data.pre) &&
36986            isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {
36987            // component
36988            vnode = createComponent(Ctor, data, context, children, tag);
36989        }
36990        else {
36991            // unknown or unlisted namespaced elements
36992            // check at runtime because it may get assigned a namespace when its
36993            // parent normalizes children
36994            vnode = new VNode(tag, data, children, undefined, undefined, context);
36995        }
36996    }
36997    else {
36998        // direct component options / constructor
36999        vnode = createComponent(tag, data, context, children);
37000    }
37001    if (isArray(vnode)) {
37002        return vnode;
37003    }
37004    else if (isDef(vnode)) {
37005        if (isDef(ns))
37006            applyNS(vnode, ns);
37007        if (isDef(data))
37008            registerDeepBindings(data);
37009        return vnode;
37010    }
37011    else {
37012        return createEmptyVNode();
37013    }
37014}
37015function applyNS(vnode, ns, force) {
37016    vnode.ns = ns;
37017    if (vnode.tag === 'foreignObject') {
37018        // use default namespace inside foreignObject
37019        ns = undefined;
37020        force = true;
37021    }
37022    if (isDef(vnode.children)) {
37023        for (var i = 0, l = vnode.children.length; i < l; i++) {
37024            var child = vnode.children[i];
37025            if (isDef(child.tag) &&
37026                (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
37027                applyNS(child, ns, force);
37028            }
37029        }
37030    }
37031}
37032// ref #5318
37033// necessary to ensure parent re-render when deep bindings like :style and
37034// :class are used on slot nodes
37035function registerDeepBindings(data) {
37036    if (isObject(data.style)) {
37037        traverse(data.style);
37038    }
37039    if (isObject(data.class)) {
37040        traverse(data.class);
37041    }
37042}
37043
37044/**
37045 * Runtime helper for rendering v-for lists.
37046 */
37047function renderList(val, render) {
37048    var ret = null, i, l, keys, key;
37049    if (isArray(val) || typeof val === 'string') {
37050        ret = new Array(val.length);
37051        for (i = 0, l = val.length; i < l; i++) {
37052            ret[i] = render(val[i], i);
37053        }
37054    }
37055    else if (typeof val === 'number') {
37056        ret = new Array(val);
37057        for (i = 0; i < val; i++) {
37058            ret[i] = render(i + 1, i);
37059        }
37060    }
37061    else if (isObject(val)) {
37062        if (hasSymbol && val[Symbol.iterator]) {
37063            ret = [];
37064            var iterator = val[Symbol.iterator]();
37065            var result = iterator.next();
37066            while (!result.done) {
37067                ret.push(render(result.value, ret.length));
37068                result = iterator.next();
37069            }
37070        }
37071        else {
37072            keys = Object.keys(val);
37073            ret = new Array(keys.length);
37074            for (i = 0, l = keys.length; i < l; i++) {
37075                key = keys[i];
37076                ret[i] = render(val[key], key, i);
37077            }
37078        }
37079    }
37080    if (!isDef(ret)) {
37081        ret = [];
37082    }
37083    ret._isVList = true;
37084    return ret;
37085}
37086
37087/**
37088 * Runtime helper for rendering <slot>
37089 */
37090function renderSlot(name, fallbackRender, props, bindObject) {
37091    var scopedSlotFn = this.$scopedSlots[name];
37092    var nodes;
37093    if (scopedSlotFn) {
37094        // scoped slot
37095        props = props || {};
37096        if (bindObject) {
37097            if ( true && !isObject(bindObject)) {
37098                warn$2('slot v-bind without argument expects an Object', this);
37099            }
37100            props = extend(extend({}, bindObject), props);
37101        }
37102        nodes =
37103            scopedSlotFn(props) ||
37104                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
37105    }
37106    else {
37107        nodes =
37108            this.$slots[name] ||
37109                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
37110    }
37111    var target = props && props.slot;
37112    if (target) {
37113        return this.$createElement('template', { slot: target }, nodes);
37114    }
37115    else {
37116        return nodes;
37117    }
37118}
37119
37120/**
37121 * Runtime helper for resolving filters
37122 */
37123function resolveFilter(id) {
37124    return resolveAsset(this.$options, 'filters', id, true) || identity;
37125}
37126
37127function isKeyNotMatch(expect, actual) {
37128    if (isArray(expect)) {
37129        return expect.indexOf(actual) === -1;
37130    }
37131    else {
37132        return expect !== actual;
37133    }
37134}
37135/**
37136 * Runtime helper for checking keyCodes from config.
37137 * exposed as Vue.prototype._k
37138 * passing in eventKeyName as last argument separately for backwards compat
37139 */
37140function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {
37141    var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
37142    if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
37143        return isKeyNotMatch(builtInKeyName, eventKeyName);
37144    }
37145    else if (mappedKeyCode) {
37146        return isKeyNotMatch(mappedKeyCode, eventKeyCode);
37147    }
37148    else if (eventKeyName) {
37149        return hyphenate(eventKeyName) !== key;
37150    }
37151    return eventKeyCode === undefined;
37152}
37153
37154/**
37155 * Runtime helper for merging v-bind="object" into a VNode's data.
37156 */
37157function bindObjectProps(data, tag, value, asProp, isSync) {
37158    if (value) {
37159        if (!isObject(value)) {
37160             true &&
37161                warn$2('v-bind without argument expects an Object or Array value', this);
37162        }
37163        else {
37164            if (isArray(value)) {
37165                value = toObject(value);
37166            }
37167            var hash = void 0;
37168            var _loop_1 = function (key) {
37169                if (key === 'class' || key === 'style' || isReservedAttribute(key)) {
37170                    hash = data;
37171                }
37172                else {
37173                    var type = data.attrs && data.attrs.type;
37174                    hash =
37175                        asProp || config.mustUseProp(tag, type, key)
37176                            ? data.domProps || (data.domProps = {})
37177                            : data.attrs || (data.attrs = {});
37178                }
37179                var camelizedKey = camelize(key);
37180                var hyphenatedKey = hyphenate(key);
37181                if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
37182                    hash[key] = value[key];
37183                    if (isSync) {
37184                        var on = data.on || (data.on = {});
37185                        on["update:".concat(key)] = function ($event) {
37186                            value[key] = $event;
37187                        };
37188                    }
37189                }
37190            };
37191            for (var key in value) {
37192                _loop_1(key);
37193            }
37194        }
37195    }
37196    return data;
37197}
37198
37199/**
37200 * Runtime helper for rendering static trees.
37201 */
37202function renderStatic(index, isInFor) {
37203    var cached = this._staticTrees || (this._staticTrees = []);
37204    var tree = cached[index];
37205    // if has already-rendered static tree and not inside v-for,
37206    // we can reuse the same tree.
37207    if (tree && !isInFor) {
37208        return tree;
37209    }
37210    // otherwise, render a fresh tree.
37211    tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates
37212    );
37213    markStatic$1(tree, "__static__".concat(index), false);
37214    return tree;
37215}
37216/**
37217 * Runtime helper for v-once.
37218 * Effectively it means marking the node as static with a unique key.
37219 */
37220function markOnce(tree, index, key) {
37221    markStatic$1(tree, "__once__".concat(index).concat(key ? "_".concat(key) : ""), true);
37222    return tree;
37223}
37224function markStatic$1(tree, key, isOnce) {
37225    if (isArray(tree)) {
37226        for (var i = 0; i < tree.length; i++) {
37227            if (tree[i] && typeof tree[i] !== 'string') {
37228                markStaticNode(tree[i], "".concat(key, "_").concat(i), isOnce);
37229            }
37230        }
37231    }
37232    else {
37233        markStaticNode(tree, key, isOnce);
37234    }
37235}
37236function markStaticNode(node, key, isOnce) {
37237    node.isStatic = true;
37238    node.key = key;
37239    node.isOnce = isOnce;
37240}
37241
37242function bindObjectListeners(data, value) {
37243    if (value) {
37244        if (!isPlainObject(value)) {
37245             true && warn$2('v-on without argument expects an Object value', this);
37246        }
37247        else {
37248            var on = (data.on = data.on ? extend({}, data.on) : {});
37249            for (var key in value) {
37250                var existing = on[key];
37251                var ours = value[key];
37252                on[key] = existing ? [].concat(existing, ours) : ours;
37253            }
37254        }
37255    }
37256    return data;
37257}
37258
37259function resolveScopedSlots(fns, res, 
37260// the following are added in 2.6
37261hasDynamicKeys, contentHashKey) {
37262    res = res || { $stable: !hasDynamicKeys };
37263    for (var i = 0; i < fns.length; i++) {
37264        var slot = fns[i];
37265        if (isArray(slot)) {
37266            resolveScopedSlots(slot, res, hasDynamicKeys);
37267        }
37268        else if (slot) {
37269            // marker for reverse proxying v-slot without scope on this.$slots
37270            // @ts-expect-error
37271            if (slot.proxy) {
37272                // @ts-expect-error
37273                slot.fn.proxy = true;
37274            }
37275            res[slot.key] = slot.fn;
37276        }
37277    }
37278    if (contentHashKey) {
37279        res.$key = contentHashKey;
37280    }
37281    return res;
37282}
37283
37284// helper to process dynamic keys for dynamic arguments in v-bind and v-on.
37285function bindDynamicKeys(baseObj, values) {
37286    for (var i = 0; i < values.length; i += 2) {
37287        var key = values[i];
37288        if (typeof key === 'string' && key) {
37289            baseObj[values[i]] = values[i + 1];
37290        }
37291        else if ( true && key !== '' && key !== null) {
37292            // null is a special value for explicitly removing a binding
37293            warn$2("Invalid value for dynamic directive argument (expected string or null): ".concat(key), this);
37294        }
37295    }
37296    return baseObj;
37297}
37298// helper to dynamically append modifier runtime markers to event names.
37299// ensure only append when value is already string, otherwise it will be cast
37300// to string and cause the type check to miss.
37301function prependModifier(value, symbol) {
37302    return typeof value === 'string' ? symbol + value : value;
37303}
37304
37305function installRenderHelpers(target) {
37306    target._o = markOnce;
37307    target._n = toNumber;
37308    target._s = toString;
37309    target._l = renderList;
37310    target._t = renderSlot;
37311    target._q = looseEqual;
37312    target._i = looseIndexOf;
37313    target._m = renderStatic;
37314    target._f = resolveFilter;
37315    target._k = checkKeyCodes;
37316    target._b = bindObjectProps;
37317    target._v = createTextVNode;
37318    target._e = createEmptyVNode;
37319    target._u = resolveScopedSlots;
37320    target._g = bindObjectListeners;
37321    target._d = bindDynamicKeys;
37322    target._p = prependModifier;
37323}
37324
37325/**
37326 * Runtime helper for resolving raw children VNodes into a slot object.
37327 */
37328function resolveSlots(children, context) {
37329    if (!children || !children.length) {
37330        return {};
37331    }
37332    var slots = {};
37333    for (var i = 0, l = children.length; i < l; i++) {
37334        var child = children[i];
37335        var data = child.data;
37336        // remove slot attribute if the node is resolved as a Vue slot node
37337        if (data && data.attrs && data.attrs.slot) {
37338            delete data.attrs.slot;
37339        }
37340        // named slots should only be respected if the vnode was rendered in the
37341        // same context.
37342        if ((child.context === context || child.fnContext === context) &&
37343            data &&
37344            data.slot != null) {
37345            var name_1 = data.slot;
37346            var slot = slots[name_1] || (slots[name_1] = []);
37347            if (child.tag === 'template') {
37348                slot.push.apply(slot, child.children || []);
37349            }
37350            else {
37351                slot.push(child);
37352            }
37353        }
37354        else {
37355            (slots.default || (slots.default = [])).push(child);
37356        }
37357    }
37358    // ignore slots that contains only whitespace
37359    for (var name_2 in slots) {
37360        if (slots[name_2].every(isWhitespace)) {
37361            delete slots[name_2];
37362        }
37363    }
37364    return slots;
37365}
37366function isWhitespace(node) {
37367    return (node.isComment && !node.asyncFactory) || node.text === ' ';
37368}
37369
37370function isAsyncPlaceholder(node) {
37371    // @ts-expect-error not really boolean type
37372    return node.isComment && node.asyncFactory;
37373}
37374
37375function normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {
37376    var res;
37377    var hasNormalSlots = Object.keys(normalSlots).length > 0;
37378    var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;
37379    var key = scopedSlots && scopedSlots.$key;
37380    if (!scopedSlots) {
37381        res = {};
37382    }
37383    else if (scopedSlots._normalized) {
37384        // fast path 1: child component re-render only, parent did not change
37385        return scopedSlots._normalized;
37386    }
37387    else if (isStable &&
37388        prevScopedSlots &&
37389        prevScopedSlots !== emptyObject &&
37390        key === prevScopedSlots.$key &&
37391        !hasNormalSlots &&
37392        !prevScopedSlots.$hasNormal) {
37393        // fast path 2: stable scoped slots w/ no normal slots to proxy,
37394        // only need to normalize once
37395        return prevScopedSlots;
37396    }
37397    else {
37398        res = {};
37399        for (var key_1 in scopedSlots) {
37400            if (scopedSlots[key_1] && key_1[0] !== '$') {
37401                res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);
37402            }
37403        }
37404    }
37405    // expose normal slots on scopedSlots
37406    for (var key_2 in normalSlots) {
37407        if (!(key_2 in res)) {
37408            res[key_2] = proxyNormalSlot(normalSlots, key_2);
37409        }
37410    }
37411    // avoriaz seems to mock a non-extensible $scopedSlots object
37412    // and when that is passed down this would cause an error
37413    if (scopedSlots && Object.isExtensible(scopedSlots)) {
37414        scopedSlots._normalized = res;
37415    }
37416    def(res, '$stable', isStable);
37417    def(res, '$key', key);
37418    def(res, '$hasNormal', hasNormalSlots);
37419    return res;
37420}
37421function normalizeScopedSlot(vm, normalSlots, key, fn) {
37422    var normalized = function () {
37423        var cur = currentInstance;
37424        setCurrentInstance(vm);
37425        var res = arguments.length ? fn.apply(null, arguments) : fn({});
37426        res =
37427            res && typeof res === 'object' && !isArray(res)
37428                ? [res] // single vnode
37429                : normalizeChildren(res);
37430        var vnode = res && res[0];
37431        setCurrentInstance(cur);
37432        return res &&
37433            (!vnode ||
37434                (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391
37435            ? undefined
37436            : res;
37437    };
37438    // this is a slot using the new v-slot syntax without scope. although it is
37439    // compiled as a scoped slot, render fn users would expect it to be present
37440    // on this.$slots because the usage is semantically a normal slot.
37441    if (fn.proxy) {
37442        Object.defineProperty(normalSlots, key, {
37443            get: normalized,
37444            enumerable: true,
37445            configurable: true
37446        });
37447    }
37448    return normalized;
37449}
37450function proxyNormalSlot(slots, key) {
37451    return function () { return slots[key]; };
37452}
37453
37454function initSetup(vm) {
37455    var options = vm.$options;
37456    var setup = options.setup;
37457    if (setup) {
37458        var ctx = (vm._setupContext = createSetupContext(vm));
37459        setCurrentInstance(vm);
37460        pushTarget();
37461        var setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, "setup");
37462        popTarget();
37463        setCurrentInstance();
37464        if (isFunction(setupResult)) {
37465            // render function
37466            // @ts-ignore
37467            options.render = setupResult;
37468        }
37469        else if (isObject(setupResult)) {
37470            // bindings
37471            if ( true && setupResult instanceof VNode) {
37472                warn$2("setup() should not return VNodes directly - " +
37473                    "return a render function instead.");
37474            }
37475            vm._setupState = setupResult;
37476            // __sfc indicates compiled bindings from <script setup>
37477            if (!setupResult.__sfc) {
37478                for (var key in setupResult) {
37479                    if (!isReserved(key)) {
37480                        proxyWithRefUnwrap(vm, setupResult, key);
37481                    }
37482                    else if (true) {
37483                        warn$2("Avoid using variables that start with _ or $ in setup().");
37484                    }
37485                }
37486            }
37487            else {
37488                // exposed for compiled render fn
37489                var proxy = (vm._setupProxy = {});
37490                for (var key in setupResult) {
37491                    if (key !== '__sfc') {
37492                        proxyWithRefUnwrap(proxy, setupResult, key);
37493                    }
37494                }
37495            }
37496        }
37497        else if ( true && setupResult !== undefined) {
37498            warn$2("setup() should return an object. Received: ".concat(setupResult === null ? 'null' : typeof setupResult));
37499        }
37500    }
37501}
37502function createSetupContext(vm) {
37503    var exposeCalled = false;
37504    return {
37505        get attrs() {
37506            if (!vm._attrsProxy) {
37507                var proxy = (vm._attrsProxy = {});
37508                def(proxy, '_v_attr_proxy', true);
37509                syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');
37510            }
37511            return vm._attrsProxy;
37512        },
37513        get listeners() {
37514            if (!vm._listenersProxy) {
37515                var proxy = (vm._listenersProxy = {});
37516                syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');
37517            }
37518            return vm._listenersProxy;
37519        },
37520        get slots() {
37521            return initSlotsProxy(vm);
37522        },
37523        emit: bind$1(vm.$emit, vm),
37524        expose: function (exposed) {
37525            if (true) {
37526                if (exposeCalled) {
37527                    warn$2("expose() should be called only once per setup().", vm);
37528                }
37529                exposeCalled = true;
37530            }
37531            if (exposed) {
37532                Object.keys(exposed).forEach(function (key) {
37533                    return proxyWithRefUnwrap(vm, exposed, key);
37534                });
37535            }
37536        }
37537    };
37538}
37539function syncSetupProxy(to, from, prev, instance, type) {
37540    var changed = false;
37541    for (var key in from) {
37542        if (!(key in to)) {
37543            changed = true;
37544            defineProxyAttr(to, key, instance, type);
37545        }
37546        else if (from[key] !== prev[key]) {
37547            changed = true;
37548        }
37549    }
37550    for (var key in to) {
37551        if (!(key in from)) {
37552            changed = true;
37553            delete to[key];
37554        }
37555    }
37556    return changed;
37557}
37558function defineProxyAttr(proxy, key, instance, type) {
37559    Object.defineProperty(proxy, key, {
37560        enumerable: true,
37561        configurable: true,
37562        get: function () {
37563            return instance[type][key];
37564        }
37565    });
37566}
37567function initSlotsProxy(vm) {
37568    if (!vm._slotsProxy) {
37569        syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);
37570    }
37571    return vm._slotsProxy;
37572}
37573function syncSetupSlots(to, from) {
37574    for (var key in from) {
37575        to[key] = from[key];
37576    }
37577    for (var key in to) {
37578        if (!(key in from)) {
37579            delete to[key];
37580        }
37581    }
37582}
37583/**
37584 * @internal use manual type def because public setup context type relies on
37585 * legacy VNode types
37586 */
37587function useSlots() {
37588    return getContext().slots;
37589}
37590/**
37591 * @internal use manual type def because public setup context type relies on
37592 * legacy VNode types
37593 */
37594function useAttrs() {
37595    return getContext().attrs;
37596}
37597/**
37598 * Vue 2 only
37599 * @internal use manual type def because public setup context type relies on
37600 * legacy VNode types
37601 */
37602function useListeners() {
37603    return getContext().listeners;
37604}
37605function getContext() {
37606    if ( true && !currentInstance) {
37607        warn$2("useContext() called without active instance.");
37608    }
37609    var vm = currentInstance;
37610    return vm._setupContext || (vm._setupContext = createSetupContext(vm));
37611}
37612/**
37613 * Runtime helper for merging default declarations. Imported by compiled code
37614 * only.
37615 * @internal
37616 */
37617function mergeDefaults(raw, defaults) {
37618    var props = isArray(raw)
37619        ? raw.reduce(function (normalized, p) { return ((normalized[p] = {}), normalized); }, {})
37620        : raw;
37621    for (var key in defaults) {
37622        var opt = props[key];
37623        if (opt) {
37624            if (isArray(opt) || isFunction(opt)) {
37625                props[key] = { type: opt, default: defaults[key] };
37626            }
37627            else {
37628                opt.default = defaults[key];
37629            }
37630        }
37631        else if (opt === null) {
37632            props[key] = { default: defaults[key] };
37633        }
37634        else if (true) {
37635            warn$2("props default key \"".concat(key, "\" has no corresponding declaration."));
37636        }
37637    }
37638    return props;
37639}
37640
37641function initRender(vm) {
37642    vm._vnode = null; // the root of the child tree
37643    vm._staticTrees = null; // v-once cached trees
37644    var options = vm.$options;
37645    var parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree
37646    var renderContext = parentVnode && parentVnode.context;
37647    vm.$slots = resolveSlots(options._renderChildren, renderContext);
37648    vm.$scopedSlots = parentVnode
37649        ? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)
37650        : emptyObject;
37651    // bind the createElement fn to this instance
37652    // so that we get proper render context inside it.
37653    // args order: tag, data, children, normalizationType, alwaysNormalize
37654    // internal version is used by render functions compiled from templates
37655    // @ts-expect-error
37656    vm._c = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, false); };
37657    // normalization is always applied for the public version, used in
37658    // user-written render functions.
37659    // @ts-expect-error
37660    vm.$createElement = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, true); };
37661    // $attrs & $listeners are exposed for easier HOC creation.
37662    // they need to be reactive so that HOCs using them are always updated
37663    var parentData = parentVnode && parentVnode.data;
37664    /* istanbul ignore else */
37665    if (true) {
37666        defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, function () {
37667            !isUpdatingChildComponent && warn$2("$attrs is readonly.", vm);
37668        }, true);
37669        defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {
37670            !isUpdatingChildComponent && warn$2("$listeners is readonly.", vm);
37671        }, true);
37672    }
37673    else {}
37674}
37675var currentRenderingInstance = null;
37676function renderMixin(Vue) {
37677    // install runtime convenience helpers
37678    installRenderHelpers(Vue.prototype);
37679    Vue.prototype.$nextTick = function (fn) {
37680        return nextTick(fn, this);
37681    };
37682    Vue.prototype._render = function () {
37683        var vm = this;
37684        var _a = vm.$options, render = _a.render, _parentVnode = _a._parentVnode;
37685        if (_parentVnode && vm._isMounted) {
37686            vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);
37687            if (vm._slotsProxy) {
37688                syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);
37689            }
37690        }
37691        // set parent vnode. this allows render functions to have access
37692        // to the data on the placeholder node.
37693        vm.$vnode = _parentVnode;
37694        // render self
37695        var vnode;
37696        try {
37697            // There's no need to maintain a stack because all render fns are called
37698            // separately from one another. Nested component's render fns are called
37699            // when parent component is patched.
37700            setCurrentInstance(vm);
37701            currentRenderingInstance = vm;
37702            vnode = render.call(vm._renderProxy, vm.$createElement);
37703        }
37704        catch (e) {
37705            handleError(e, vm, "render");
37706            // return error render result,
37707            // or previous vnode to prevent render error causing blank component
37708            /* istanbul ignore else */
37709            if ( true && vm.$options.renderError) {
37710                try {
37711                    vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
37712                }
37713                catch (e) {
37714                    handleError(e, vm, "renderError");
37715                    vnode = vm._vnode;
37716                }
37717            }
37718            else {
37719                vnode = vm._vnode;
37720            }
37721        }
37722        finally {
37723            currentRenderingInstance = null;
37724            setCurrentInstance();
37725        }
37726        // if the returned array contains only a single node, allow it
37727        if (isArray(vnode) && vnode.length === 1) {
37728            vnode = vnode[0];
37729        }
37730        // return empty vnode in case the render function errored out
37731        if (!(vnode instanceof VNode)) {
37732            if ( true && isArray(vnode)) {
37733                warn$2('Multiple root nodes returned from render function. Render function ' +
37734                    'should return a single root node.', vm);
37735            }
37736            vnode = createEmptyVNode();
37737        }
37738        // set parent
37739        vnode.parent = _parentVnode;
37740        return vnode;
37741    };
37742}
37743
37744function ensureCtor(comp, base) {
37745    if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {
37746        comp = comp.default;
37747    }
37748    return isObject(comp) ? base.extend(comp) : comp;
37749}
37750function createAsyncPlaceholder(factory, data, context, children, tag) {
37751    var node = createEmptyVNode();
37752    node.asyncFactory = factory;
37753    node.asyncMeta = { data: data, context: context, children: children, tag: tag };
37754    return node;
37755}
37756function resolveAsyncComponent(factory, baseCtor) {
37757    if (isTrue(factory.error) && isDef(factory.errorComp)) {
37758        return factory.errorComp;
37759    }
37760    if (isDef(factory.resolved)) {
37761        return factory.resolved;
37762    }
37763    var owner = currentRenderingInstance;
37764    if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
37765        // already pending
37766        factory.owners.push(owner);
37767    }
37768    if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
37769        return factory.loadingComp;
37770    }
37771    if (owner && !isDef(factory.owners)) {
37772        var owners_1 = (factory.owners = [owner]);
37773        var sync_1 = true;
37774        var timerLoading_1 = null;
37775        var timerTimeout_1 = null;
37776        owner.$on('hook:destroyed', function () { return remove$2(owners_1, owner); });
37777        var forceRender_1 = function (renderCompleted) {
37778            for (var i = 0, l = owners_1.length; i < l; i++) {
37779                owners_1[i].$forceUpdate();
37780            }
37781            if (renderCompleted) {
37782                owners_1.length = 0;
37783                if (timerLoading_1 !== null) {
37784                    clearTimeout(timerLoading_1);
37785                    timerLoading_1 = null;
37786                }
37787                if (timerTimeout_1 !== null) {
37788                    clearTimeout(timerTimeout_1);
37789                    timerTimeout_1 = null;
37790                }
37791            }
37792        };
37793        var resolve = once(function (res) {
37794            // cache resolved
37795            factory.resolved = ensureCtor(res, baseCtor);
37796            // invoke callbacks only if this is not a synchronous resolve
37797            // (async resolves are shimmed as synchronous during SSR)
37798            if (!sync_1) {
37799                forceRender_1(true);
37800            }
37801            else {
37802                owners_1.length = 0;
37803            }
37804        });
37805        var reject_1 = once(function (reason) {
37806             true &&
37807                warn$2("Failed to resolve async component: ".concat(String(factory)) +
37808                    (reason ? "\nReason: ".concat(reason) : ''));
37809            if (isDef(factory.errorComp)) {
37810                factory.error = true;
37811                forceRender_1(true);
37812            }
37813        });
37814        var res_1 = factory(resolve, reject_1);
37815        if (isObject(res_1)) {
37816            if (isPromise(res_1)) {
37817                // () => Promise
37818                if (isUndef(factory.resolved)) {
37819                    res_1.then(resolve, reject_1);
37820                }
37821            }
37822            else if (isPromise(res_1.component)) {
37823                res_1.component.then(resolve, reject_1);
37824                if (isDef(res_1.error)) {
37825                    factory.errorComp = ensureCtor(res_1.error, baseCtor);
37826                }
37827                if (isDef(res_1.loading)) {
37828                    factory.loadingComp = ensureCtor(res_1.loading, baseCtor);
37829                    if (res_1.delay === 0) {
37830                        factory.loading = true;
37831                    }
37832                    else {
37833                        // @ts-expect-error NodeJS timeout type
37834                        timerLoading_1 = setTimeout(function () {
37835                            timerLoading_1 = null;
37836                            if (isUndef(factory.resolved) && isUndef(factory.error)) {
37837                                factory.loading = true;
37838                                forceRender_1(false);
37839                            }
37840                        }, res_1.delay || 200);
37841                    }
37842                }
37843                if (isDef(res_1.timeout)) {
37844                    // @ts-expect-error NodeJS timeout type
37845                    timerTimeout_1 = setTimeout(function () {
37846                        timerTimeout_1 = null;
37847                        if (isUndef(factory.resolved)) {
37848                            reject_1( true ? "timeout (".concat(res_1.timeout, "ms)") : 0);
37849                        }
37850                    }, res_1.timeout);
37851                }
37852            }
37853        }
37854        sync_1 = false;
37855        // return in case resolved synchronously
37856        return factory.loading ? factory.loadingComp : factory.resolved;
37857    }
37858}
37859
37860function getFirstComponentChild(children) {
37861    if (isArray(children)) {
37862        for (var i = 0; i < children.length; i++) {
37863            var c = children[i];
37864            if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
37865                return c;
37866            }
37867        }
37868    }
37869}
37870
37871function initEvents(vm) {
37872    vm._events = Object.create(null);
37873    vm._hasHookEvent = false;
37874    // init parent attached events
37875    var listeners = vm.$options._parentListeners;
37876    if (listeners) {
37877        updateComponentListeners(vm, listeners);
37878    }
37879}
37880var target$1;
37881function add$1(event, fn) {
37882    target$1.$on(event, fn);
37883}
37884function remove$1(event, fn) {
37885    target$1.$off(event, fn);
37886}
37887function createOnceHandler$1(event, fn) {
37888    var _target = target$1;
37889    return function onceHandler() {
37890        var res = fn.apply(null, arguments);
37891        if (res !== null) {
37892            _target.$off(event, onceHandler);
37893        }
37894    };
37895}
37896function updateComponentListeners(vm, listeners, oldListeners) {
37897    target$1 = vm;
37898    updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);
37899    target$1 = undefined;
37900}
37901function eventsMixin(Vue) {
37902    var hookRE = /^hook:/;
37903    Vue.prototype.$on = function (event, fn) {
37904        var vm = this;
37905        if (isArray(event)) {
37906            for (var i = 0, l = event.length; i < l; i++) {
37907                vm.$on(event[i], fn);
37908            }
37909        }
37910        else {
37911            (vm._events[event] || (vm._events[event] = [])).push(fn);
37912            // optimize hook:event cost by using a boolean flag marked at registration
37913            // instead of a hash lookup
37914            if (hookRE.test(event)) {
37915                vm._hasHookEvent = true;
37916            }
37917        }
37918        return vm;
37919    };
37920    Vue.prototype.$once = function (event, fn) {
37921        var vm = this;
37922        function on() {
37923            vm.$off(event, on);
37924            fn.apply(vm, arguments);
37925        }
37926        on.fn = fn;
37927        vm.$on(event, on);
37928        return vm;
37929    };
37930    Vue.prototype.$off = function (event, fn) {
37931        var vm = this;
37932        // all
37933        if (!arguments.length) {
37934            vm._events = Object.create(null);
37935            return vm;
37936        }
37937        // array of events
37938        if (isArray(event)) {
37939            for (var i_1 = 0, l = event.length; i_1 < l; i_1++) {
37940                vm.$off(event[i_1], fn);
37941            }
37942            return vm;
37943        }
37944        // specific event
37945        var cbs = vm._events[event];
37946        if (!cbs) {
37947            return vm;
37948        }
37949        if (!fn) {
37950            vm._events[event] = null;
37951            return vm;
37952        }
37953        // specific handler
37954        var cb;
37955        var i = cbs.length;
37956        while (i--) {
37957            cb = cbs[i];
37958            if (cb === fn || cb.fn === fn) {
37959                cbs.splice(i, 1);
37960                break;
37961            }
37962        }
37963        return vm;
37964    };
37965    Vue.prototype.$emit = function (event) {
37966        var vm = this;
37967        if (true) {
37968            var lowerCaseEvent = event.toLowerCase();
37969            if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
37970                tip("Event \"".concat(lowerCaseEvent, "\" is emitted in component ") +
37971                    "".concat(formatComponentName(vm), " but the handler is registered for \"").concat(event, "\". ") +
37972                    "Note that HTML attributes are case-insensitive and you cannot use " +
37973                    "v-on to listen to camelCase events when using in-DOM templates. " +
37974                    "You should probably use \"".concat(hyphenate(event), "\" instead of \"").concat(event, "\"."));
37975            }
37976        }
37977        var cbs = vm._events[event];
37978        if (cbs) {
37979            cbs = cbs.length > 1 ? toArray(cbs) : cbs;
37980            var args = toArray(arguments, 1);
37981            var info = "event handler for \"".concat(event, "\"");
37982            for (var i = 0, l = cbs.length; i < l; i++) {
37983                invokeWithErrorHandling(cbs[i], vm, args, vm, info);
37984            }
37985        }
37986        return vm;
37987    };
37988}
37989
37990var activeInstance = null;
37991var isUpdatingChildComponent = false;
37992function setActiveInstance(vm) {
37993    var prevActiveInstance = activeInstance;
37994    activeInstance = vm;
37995    return function () {
37996        activeInstance = prevActiveInstance;
37997    };
37998}
37999function initLifecycle(vm) {
38000    var options = vm.$options;
38001    // locate first non-abstract parent
38002    var parent = options.parent;
38003    if (parent && !options.abstract) {
38004        while (parent.$options.abstract && parent.$parent) {
38005            parent = parent.$parent;
38006        }
38007        parent.$children.push(vm);
38008    }
38009    vm.$parent = parent;
38010    vm.$root = parent ? parent.$root : vm;
38011    vm.$children = [];
38012    vm.$refs = {};
38013    vm._provided = parent ? parent._provided : Object.create(null);
38014    vm._watcher = null;
38015    vm._inactive = null;
38016    vm._directInactive = false;
38017    vm._isMounted = false;
38018    vm._isDestroyed = false;
38019    vm._isBeingDestroyed = false;
38020}
38021function lifecycleMixin(Vue) {
38022    Vue.prototype._update = function (vnode, hydrating) {
38023        var vm = this;
38024        var prevEl = vm.$el;
38025        var prevVnode = vm._vnode;
38026        var restoreActiveInstance = setActiveInstance(vm);
38027        vm._vnode = vnode;
38028        // Vue.prototype.__patch__ is injected in entry points
38029        // based on the rendering backend used.
38030        if (!prevVnode) {
38031            // initial render
38032            vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
38033        }
38034        else {
38035            // updates
38036            vm.$el = vm.__patch__(prevVnode, vnode);
38037        }
38038        restoreActiveInstance();
38039        // update __vue__ reference
38040        if (prevEl) {
38041            prevEl.__vue__ = null;
38042        }
38043        if (vm.$el) {
38044            vm.$el.__vue__ = vm;
38045        }
38046        // if parent is an HOC, update its $el as well
38047        var wrapper = vm;
38048        while (wrapper &&
38049            wrapper.$vnode &&
38050            wrapper.$parent &&
38051            wrapper.$vnode === wrapper.$parent._vnode) {
38052            wrapper.$parent.$el = wrapper.$el;
38053            wrapper = wrapper.$parent;
38054        }
38055        // updated hook is called by the scheduler to ensure that children are
38056        // updated in a parent's updated hook.
38057    };
38058    Vue.prototype.$forceUpdate = function () {
38059        var vm = this;
38060        if (vm._watcher) {
38061            vm._watcher.update();
38062        }
38063    };
38064    Vue.prototype.$destroy = function () {
38065        var vm = this;
38066        if (vm._isBeingDestroyed) {
38067            return;
38068        }
38069        callHook$1(vm, 'beforeDestroy');
38070        vm._isBeingDestroyed = true;
38071        // remove self from parent
38072        var parent = vm.$parent;
38073        if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
38074            remove$2(parent.$children, vm);
38075        }
38076        // teardown scope. this includes both the render watcher and other
38077        // watchers created
38078        vm._scope.stop();
38079        // remove reference from data ob
38080        // frozen object may not have observer.
38081        if (vm._data.__ob__) {
38082            vm._data.__ob__.vmCount--;
38083        }
38084        // call the last hook...
38085        vm._isDestroyed = true;
38086        // invoke destroy hooks on current rendered tree
38087        vm.__patch__(vm._vnode, null);
38088        // fire destroyed hook
38089        callHook$1(vm, 'destroyed');
38090        // turn off all instance listeners.
38091        vm.$off();
38092        // remove __vue__ reference
38093        if (vm.$el) {
38094            vm.$el.__vue__ = null;
38095        }
38096        // release circular reference (#6759)
38097        if (vm.$vnode) {
38098            vm.$vnode.parent = null;
38099        }
38100    };
38101}
38102function mountComponent(vm, el, hydrating) {
38103    vm.$el = el;
38104    if (!vm.$options.render) {
38105        // @ts-expect-error invalid type
38106        vm.$options.render = createEmptyVNode;
38107        if (true) {
38108            /* istanbul ignore if */
38109            if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
38110                vm.$options.el ||
38111                el) {
38112                warn$2('You are using the runtime-only build of Vue where the template ' +
38113                    'compiler is not available. Either pre-compile the templates into ' +
38114                    'render functions, or use the compiler-included build.', vm);
38115            }
38116            else {
38117                warn$2('Failed to mount component: template or render function not defined.', vm);
38118            }
38119        }
38120    }
38121    callHook$1(vm, 'beforeMount');
38122    var updateComponent;
38123    /* istanbul ignore if */
38124    if ( true && config.performance && mark) {
38125        updateComponent = function () {
38126            var name = vm._name;
38127            var id = vm._uid;
38128            var startTag = "vue-perf-start:".concat(id);
38129            var endTag = "vue-perf-end:".concat(id);
38130            mark(startTag);
38131            var vnode = vm._render();
38132            mark(endTag);
38133            measure("vue ".concat(name, " render"), startTag, endTag);
38134            mark(startTag);
38135            vm._update(vnode, hydrating);
38136            mark(endTag);
38137            measure("vue ".concat(name, " patch"), startTag, endTag);
38138        };
38139    }
38140    else {
38141        updateComponent = function () {
38142            vm._update(vm._render(), hydrating);
38143        };
38144    }
38145    var watcherOptions = {
38146        before: function () {
38147            if (vm._isMounted && !vm._isDestroyed) {
38148                callHook$1(vm, 'beforeUpdate');
38149            }
38150        }
38151    };
38152    if (true) {
38153        watcherOptions.onTrack = function (e) { return callHook$1(vm, 'renderTracked', [e]); };
38154        watcherOptions.onTrigger = function (e) { return callHook$1(vm, 'renderTriggered', [e]); };
38155    }
38156    // we set this to vm._watcher inside the watcher's constructor
38157    // since the watcher's initial patch may call $forceUpdate (e.g. inside child
38158    // component's mounted hook), which relies on vm._watcher being already defined
38159    new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);
38160    hydrating = false;
38161    // flush buffer for flush: "pre" watchers queued in setup()
38162    var preWatchers = vm._preWatchers;
38163    if (preWatchers) {
38164        for (var i = 0; i < preWatchers.length; i++) {
38165            preWatchers[i].run();
38166        }
38167    }
38168    // manually mounted instance, call mounted on self
38169    // mounted is called for render-created child components in its inserted hook
38170    if (vm.$vnode == null) {
38171        vm._isMounted = true;
38172        callHook$1(vm, 'mounted');
38173    }
38174    return vm;
38175}
38176function updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {
38177    if (true) {
38178        isUpdatingChildComponent = true;
38179    }
38180    // determine whether component has slot children
38181    // we need to do this before overwriting $options._renderChildren.
38182    // check if there are dynamic scopedSlots (hand-written or compiled but with
38183    // dynamic slot names). Static scoped slots compiled from template has the
38184    // "$stable" marker.
38185    var newScopedSlots = parentVnode.data.scopedSlots;
38186    var oldScopedSlots = vm.$scopedSlots;
38187    var hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||
38188        (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
38189        (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||
38190        (!newScopedSlots && vm.$scopedSlots.$key));
38191    // Any static slot children from the parent may have changed during parent's
38192    // update. Dynamic scoped slots may also have changed. In such cases, a forced
38193    // update is necessary to ensure correctness.
38194    var needsForceUpdate = !!(renderChildren || // has new static slots
38195        vm.$options._renderChildren || // has old static slots
38196        hasDynamicScopedSlot);
38197    var prevVNode = vm.$vnode;
38198    vm.$options._parentVnode = parentVnode;
38199    vm.$vnode = parentVnode; // update vm's placeholder node without re-render
38200    if (vm._vnode) {
38201        // update child tree's parent
38202        vm._vnode.parent = parentVnode;
38203    }
38204    vm.$options._renderChildren = renderChildren;
38205    // update $attrs and $listeners hash
38206    // these are also reactive so they may trigger child update if the child
38207    // used them during render
38208    var attrs = parentVnode.data.attrs || emptyObject;
38209    if (vm._attrsProxy) {
38210        // force update if attrs are accessed and has changed since it may be
38211        // passed to a child component.
38212        if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {
38213            needsForceUpdate = true;
38214        }
38215    }
38216    vm.$attrs = attrs;
38217    // update listeners
38218    listeners = listeners || emptyObject;
38219    var prevListeners = vm.$options._parentListeners;
38220    if (vm._listenersProxy) {
38221        syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');
38222    }
38223    vm.$listeners = vm.$options._parentListeners = listeners;
38224    updateComponentListeners(vm, listeners, prevListeners);
38225    // update props
38226    if (propsData && vm.$options.props) {
38227        toggleObserving(false);
38228        var props = vm._props;
38229        var propKeys = vm.$options._propKeys || [];
38230        for (var i = 0; i < propKeys.length; i++) {
38231            var key = propKeys[i];
38232            var propOptions = vm.$options.props; // wtf flow?
38233            props[key] = validateProp(key, propOptions, propsData, vm);
38234        }
38235        toggleObserving(true);
38236        // keep a copy of raw propsData
38237        vm.$options.propsData = propsData;
38238    }
38239    // resolve slots + force update if has children
38240    if (needsForceUpdate) {
38241        vm.$slots = resolveSlots(renderChildren, parentVnode.context);
38242        vm.$forceUpdate();
38243    }
38244    if (true) {
38245        isUpdatingChildComponent = false;
38246    }
38247}
38248function isInInactiveTree(vm) {
38249    while (vm && (vm = vm.$parent)) {
38250        if (vm._inactive)
38251            return true;
38252    }
38253    return false;
38254}
38255function activateChildComponent(vm, direct) {
38256    if (direct) {
38257        vm._directInactive = false;
38258        if (isInInactiveTree(vm)) {
38259            return;
38260        }
38261    }
38262    else if (vm._directInactive) {
38263        return;
38264    }
38265    if (vm._inactive || vm._inactive === null) {
38266        vm._inactive = false;
38267        for (var i = 0; i < vm.$children.length; i++) {
38268            activateChildComponent(vm.$children[i]);
38269        }
38270        callHook$1(vm, 'activated');
38271    }
38272}
38273function deactivateChildComponent(vm, direct) {
38274    if (direct) {
38275        vm._directInactive = true;
38276        if (isInInactiveTree(vm)) {
38277            return;
38278        }
38279    }
38280    if (!vm._inactive) {
38281        vm._inactive = true;
38282        for (var i = 0; i < vm.$children.length; i++) {
38283            deactivateChildComponent(vm.$children[i]);
38284        }
38285        callHook$1(vm, 'deactivated');
38286    }
38287}
38288function callHook$1(vm, hook, args, setContext) {
38289    if (setContext === void 0) { setContext = true; }
38290    // #7573 disable dep collection when invoking lifecycle hooks
38291    pushTarget();
38292    var prev = currentInstance;
38293    setContext && setCurrentInstance(vm);
38294    var handlers = vm.$options[hook];
38295    var info = "".concat(hook, " hook");
38296    if (handlers) {
38297        for (var i = 0, j = handlers.length; i < j; i++) {
38298            invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);
38299        }
38300    }
38301    if (vm._hasHookEvent) {
38302        vm.$emit('hook:' + hook);
38303    }
38304    setContext && setCurrentInstance(prev);
38305    popTarget();
38306}
38307
38308var MAX_UPDATE_COUNT = 100;
38309var queue = [];
38310var activatedChildren = [];
38311var has = {};
38312var circular = {};
38313var waiting = false;
38314var flushing = false;
38315var index$1 = 0;
38316/**
38317 * Reset the scheduler's state.
38318 */
38319function resetSchedulerState() {
38320    index$1 = queue.length = activatedChildren.length = 0;
38321    has = {};
38322    if (true) {
38323        circular = {};
38324    }
38325    waiting = flushing = false;
38326}
38327// Async edge case #6566 requires saving the timestamp when event listeners are
38328// attached. However, calling performance.now() has a perf overhead especially
38329// if the page has thousands of event listeners. Instead, we take a timestamp
38330// every time the scheduler flushes and use that for all event listeners
38331// attached during that flush.
38332var currentFlushTimestamp = 0;
38333// Async edge case fix requires storing an event listener's attach timestamp.
38334var getNow = Date.now;
38335// Determine what event timestamp the browser is using. Annoyingly, the
38336// timestamp can either be hi-res (relative to page load) or low-res
38337// (relative to UNIX epoch), so in order to compare time we have to use the
38338// same timestamp type when saving the flush timestamp.
38339// All IE versions use low-res event timestamps, and have problematic clock
38340// implementations (#9632)
38341if (inBrowser && !isIE) {
38342    var performance_1 = window.performance;
38343    if (performance_1 &&
38344        typeof performance_1.now === 'function' &&
38345        getNow() > document.createEvent('Event').timeStamp) {
38346        // if the event timestamp, although evaluated AFTER the Date.now(), is
38347        // smaller than it, it means the event is using a hi-res timestamp,
38348        // and we need to use the hi-res version for event listener timestamps as
38349        // well.
38350        getNow = function () { return performance_1.now(); };
38351    }
38352}
38353var sortCompareFn = function (a, b) {
38354    if (a.post) {
38355        if (!b.post)
38356            return 1;
38357    }
38358    else if (b.post) {
38359        return -1;
38360    }
38361    return a.id - b.id;
38362};
38363/**
38364 * Flush both queues and run the watchers.
38365 */
38366function flushSchedulerQueue() {
38367    currentFlushTimestamp = getNow();
38368    flushing = true;
38369    var watcher, id;
38370    // Sort queue before flush.
38371    // This ensures that:
38372    // 1. Components are updated from parent to child. (because parent is always
38373    //    created before the child)
38374    // 2. A component's user watchers are run before its render watcher (because
38375    //    user watchers are created before the render watcher)
38376    // 3. If a component is destroyed during a parent component's watcher run,
38377    //    its watchers can be skipped.
38378    queue.sort(sortCompareFn);
38379    // do not cache length because more watchers might be pushed
38380    // as we run existing watchers
38381    for (index$1 = 0; index$1 < queue.length; index$1++) {
38382        watcher = queue[index$1];
38383        if (watcher.before) {
38384            watcher.before();
38385        }
38386        id = watcher.id;
38387        has[id] = null;
38388        watcher.run();
38389        // in dev build, check and stop circular updates.
38390        if ( true && has[id] != null) {
38391            circular[id] = (circular[id] || 0) + 1;
38392            if (circular[id] > MAX_UPDATE_COUNT) {
38393                warn$2('You may have an infinite update loop ' +
38394                    (watcher.user
38395                        ? "in watcher with expression \"".concat(watcher.expression, "\"")
38396                        : "in a component render function."), watcher.vm);
38397                break;
38398            }
38399        }
38400    }
38401    // keep copies of post queues before resetting state
38402    var activatedQueue = activatedChildren.slice();
38403    var updatedQueue = queue.slice();
38404    resetSchedulerState();
38405    // call component updated and activated hooks
38406    callActivatedHooks(activatedQueue);
38407    callUpdatedHooks(updatedQueue);
38408    // devtool hook
38409    /* istanbul ignore if */
38410    if (devtools && config.devtools) {
38411        devtools.emit('flush');
38412    }
38413}
38414function callUpdatedHooks(queue) {
38415    var i = queue.length;
38416    while (i--) {
38417        var watcher = queue[i];
38418        var vm = watcher.vm;
38419        if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
38420            callHook$1(vm, 'updated');
38421        }
38422    }
38423}
38424/**
38425 * Queue a kept-alive component that was activated during patch.
38426 * The queue will be processed after the entire tree has been patched.
38427 */
38428function queueActivatedComponent(vm) {
38429    // setting _inactive to false here so that a render function can
38430    // rely on checking whether it's in an inactive tree (e.g. router-view)
38431    vm._inactive = false;
38432    activatedChildren.push(vm);
38433}
38434function callActivatedHooks(queue) {
38435    for (var i = 0; i < queue.length; i++) {
38436        queue[i]._inactive = true;
38437        activateChildComponent(queue[i], true /* true */);
38438    }
38439}
38440/**
38441 * Push a watcher into the watcher queue.
38442 * Jobs with duplicate IDs will be skipped unless it's
38443 * pushed when the queue is being flushed.
38444 */
38445function queueWatcher(watcher) {
38446    var id = watcher.id;
38447    if (has[id] != null) {
38448        return;
38449    }
38450    if (watcher === Dep.target && watcher.noRecurse) {
38451        return;
38452    }
38453    has[id] = true;
38454    if (!flushing) {
38455        queue.push(watcher);
38456    }
38457    else {
38458        // if already flushing, splice the watcher based on its id
38459        // if already past its id, it will be run next immediately.
38460        var i = queue.length - 1;
38461        while (i > index$1 && queue[i].id > watcher.id) {
38462            i--;
38463        }
38464        queue.splice(i + 1, 0, watcher);
38465    }
38466    // queue the flush
38467    if (!waiting) {
38468        waiting = true;
38469        if ( true && !config.async) {
38470            flushSchedulerQueue();
38471            return;
38472        }
38473        nextTick(flushSchedulerQueue);
38474    }
38475}
38476
38477var WATCHER = "watcher";
38478var WATCHER_CB = "".concat(WATCHER, " callback");
38479var WATCHER_GETTER = "".concat(WATCHER, " getter");
38480var WATCHER_CLEANUP = "".concat(WATCHER, " cleanup");
38481// Simple effect.
38482function watchEffect(effect, options) {
38483    return doWatch(effect, null, options);
38484}
38485function watchPostEffect(effect, options) {
38486    return doWatch(effect, null, ( true
38487        ? __assign(__assign({}, options), { flush: 'post' }) : 0));
38488}
38489function watchSyncEffect(effect, options) {
38490    return doWatch(effect, null, ( true
38491        ? __assign(__assign({}, options), { flush: 'sync' }) : 0));
38492}
38493// initial value for watchers to trigger on undefined initial values
38494var INITIAL_WATCHER_VALUE = {};
38495// implementation
38496function watch(source, cb, options) {
38497    if ( true && typeof cb !== 'function') {
38498        warn$2("`watch(fn, options?)` signature has been moved to a separate API. " +
38499            "Use `watchEffect(fn, options?)` instead. `watch` now only " +
38500            "supports `watch(source, cb, options?) signature.");
38501    }
38502    return doWatch(source, cb, options);
38503}
38504function doWatch(source, cb, _a) {
38505    var _b = _a === void 0 ? emptyObject : _a, immediate = _b.immediate, deep = _b.deep, _c = _b.flush, flush = _c === void 0 ? 'pre' : _c, onTrack = _b.onTrack, onTrigger = _b.onTrigger;
38506    if ( true && !cb) {
38507        if (immediate !== undefined) {
38508            warn$2("watch() \"immediate\" option is only respected when using the " +
38509                "watch(source, callback, options?) signature.");
38510        }
38511        if (deep !== undefined) {
38512            warn$2("watch() \"deep\" option is only respected when using the " +
38513                "watch(source, callback, options?) signature.");
38514        }
38515    }
38516    var warnInvalidSource = function (s) {
38517        warn$2("Invalid watch source: ".concat(s, ". A watch source can only be a getter/effect ") +
38518            "function, a ref, a reactive object, or an array of these types.");
38519    };
38520    var instance = currentInstance;
38521    var call = function (fn, type, args) {
38522        if (args === void 0) { args = null; }
38523        return invokeWithErrorHandling(fn, null, args, instance, type);
38524    };
38525    var getter;
38526    var forceTrigger = false;
38527    var isMultiSource = false;
38528    if (isRef(source)) {
38529        getter = function () { return source.value; };
38530        forceTrigger = isShallow(source);
38531    }
38532    else if (isReactive(source)) {
38533        getter = function () {
38534            source.__ob__.dep.depend();
38535            return source;
38536        };
38537        deep = true;
38538    }
38539    else if (isArray(source)) {
38540        isMultiSource = true;
38541        forceTrigger = source.some(function (s) { return isReactive(s) || isShallow(s); });
38542        getter = function () {
38543            return source.map(function (s) {
38544                if (isRef(s)) {
38545                    return s.value;
38546                }
38547                else if (isReactive(s)) {
38548                    return traverse(s);
38549                }
38550                else if (isFunction(s)) {
38551                    return call(s, WATCHER_GETTER);
38552                }
38553                else {
38554                     true && warnInvalidSource(s);
38555                }
38556            });
38557        };
38558    }
38559    else if (isFunction(source)) {
38560        if (cb) {
38561            // getter with cb
38562            getter = function () { return call(source, WATCHER_GETTER); };
38563        }
38564        else {
38565            // no cb -> simple effect
38566            getter = function () {
38567                if (instance && instance._isDestroyed) {
38568                    return;
38569                }
38570                if (cleanup) {
38571                    cleanup();
38572                }
38573                return call(source, WATCHER, [onCleanup]);
38574            };
38575        }
38576    }
38577    else {
38578        getter = noop;
38579         true && warnInvalidSource(source);
38580    }
38581    if (cb && deep) {
38582        var baseGetter_1 = getter;
38583        getter = function () { return traverse(baseGetter_1()); };
38584    }
38585    var cleanup;
38586    var onCleanup = function (fn) {
38587        cleanup = watcher.onStop = function () {
38588            call(fn, WATCHER_CLEANUP);
38589        };
38590    };
38591    // in SSR there is no need to setup an actual effect, and it should be noop
38592    // unless it's eager
38593    if (isServerRendering()) {
38594        // we will also not call the invalidate callback (+ runner is not set up)
38595        onCleanup = noop;
38596        if (!cb) {
38597            getter();
38598        }
38599        else if (immediate) {
38600            call(cb, WATCHER_CB, [
38601                getter(),
38602                isMultiSource ? [] : undefined,
38603                onCleanup
38604            ]);
38605        }
38606        return noop;
38607    }
38608    var watcher = new Watcher(currentInstance, getter, noop, {
38609        lazy: true
38610    });
38611    watcher.noRecurse = !cb;
38612    var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
38613    // overwrite default run
38614    watcher.run = function () {
38615        if (!watcher.active) {
38616            return;
38617        }
38618        if (cb) {
38619            // watch(source, cb)
38620            var newValue = watcher.get();
38621            if (deep ||
38622                forceTrigger ||
38623                (isMultiSource
38624                    ? newValue.some(function (v, i) {
38625                        return hasChanged(v, oldValue[i]);
38626                    })
38627                    : hasChanged(newValue, oldValue))) {
38628                // cleanup before running cb again
38629                if (cleanup) {
38630                    cleanup();
38631                }
38632                call(cb, WATCHER_CB, [
38633                    newValue,
38634                    // pass undefined as the old value when it's changed for the first time
38635                    oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,
38636                    onCleanup
38637                ]);
38638                oldValue = newValue;
38639            }
38640        }
38641        else {
38642            // watchEffect
38643            watcher.get();
38644        }
38645    };
38646    if (flush === 'sync') {
38647        watcher.update = watcher.run;
38648    }
38649    else if (flush === 'post') {
38650        watcher.post = true;
38651        watcher.update = function () { return queueWatcher(watcher); };
38652    }
38653    else {
38654        // pre
38655        watcher.update = function () {
38656            if (instance && instance === currentInstance && !instance._isMounted) {
38657                // pre-watcher triggered before
38658                var buffer = instance._preWatchers || (instance._preWatchers = []);
38659                if (buffer.indexOf(watcher) < 0)
38660                    buffer.push(watcher);
38661            }
38662            else {
38663                queueWatcher(watcher);
38664            }
38665        };
38666    }
38667    if (true) {
38668        watcher.onTrack = onTrack;
38669        watcher.onTrigger = onTrigger;
38670    }
38671    // initial run
38672    if (cb) {
38673        if (immediate) {
38674            watcher.run();
38675        }
38676        else {
38677            oldValue = watcher.get();
38678        }
38679    }
38680    else if (flush === 'post' && instance) {
38681        instance.$once('hook:mounted', function () { return watcher.get(); });
38682    }
38683    else {
38684        watcher.get();
38685    }
38686    return function () {
38687        watcher.teardown();
38688    };
38689}
38690
38691var activeEffectScope;
38692var EffectScope = /** @class */ (function () {
38693    function EffectScope(detached) {
38694        if (detached === void 0) { detached = false; }
38695        /**
38696         * @internal
38697         */
38698        this.active = true;
38699        /**
38700         * @internal
38701         */
38702        this.effects = [];
38703        /**
38704         * @internal
38705         */
38706        this.cleanups = [];
38707        if (!detached && activeEffectScope) {
38708            this.parent = activeEffectScope;
38709            this.index =
38710                (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
38711        }
38712    }
38713    EffectScope.prototype.run = function (fn) {
38714        if (this.active) {
38715            var currentEffectScope = activeEffectScope;
38716            try {
38717                activeEffectScope = this;
38718                return fn();
38719            }
38720            finally {
38721                activeEffectScope = currentEffectScope;
38722            }
38723        }
38724        else if (true) {
38725            warn$2("cannot run an inactive effect scope.");
38726        }
38727    };
38728    /**
38729     * This should only be called on non-detached scopes
38730     * @internal
38731     */
38732    EffectScope.prototype.on = function () {
38733        activeEffectScope = this;
38734    };
38735    /**
38736     * This should only be called on non-detached scopes
38737     * @internal
38738     */
38739    EffectScope.prototype.off = function () {
38740        activeEffectScope = this.parent;
38741    };
38742    EffectScope.prototype.stop = function (fromParent) {
38743        if (this.active) {
38744            var i = void 0, l = void 0;
38745            for (i = 0, l = this.effects.length; i < l; i++) {
38746                this.effects[i].teardown();
38747            }
38748            for (i = 0, l = this.cleanups.length; i < l; i++) {
38749                this.cleanups[i]();
38750            }
38751            if (this.scopes) {
38752                for (i = 0, l = this.scopes.length; i < l; i++) {
38753                    this.scopes[i].stop(true);
38754                }
38755            }
38756            // nested scope, dereference from parent to avoid memory leaks
38757            if (this.parent && !fromParent) {
38758                // optimized O(1) removal
38759                var last = this.parent.scopes.pop();
38760                if (last && last !== this) {
38761                    this.parent.scopes[this.index] = last;
38762                    last.index = this.index;
38763                }
38764            }
38765            this.active = false;
38766        }
38767    };
38768    return EffectScope;
38769}());
38770function effectScope(detached) {
38771    return new EffectScope(detached);
38772}
38773/**
38774 * @internal
38775 */
38776function recordEffectScope(effect, scope) {
38777    if (scope === void 0) { scope = activeEffectScope; }
38778    if (scope && scope.active) {
38779        scope.effects.push(effect);
38780    }
38781}
38782function getCurrentScope() {
38783    return activeEffectScope;
38784}
38785function onScopeDispose(fn) {
38786    if (activeEffectScope) {
38787        activeEffectScope.cleanups.push(fn);
38788    }
38789    else if (true) {
38790        warn$2("onScopeDispose() is called when there is no active effect scope" +
38791            " to be associated with.");
38792    }
38793}
38794
38795function provide(key, value) {
38796    if (!currentInstance) {
38797        if (true) {
38798            warn$2("provide() can only be used inside setup().");
38799        }
38800    }
38801    else {
38802        // TS doesn't allow symbol as index type
38803        resolveProvided(currentInstance)[key] = value;
38804    }
38805}
38806function resolveProvided(vm) {
38807    // by default an instance inherits its parent's provides object
38808    // but when it needs to provide values of its own, it creates its
38809    // own provides object using parent provides object as prototype.
38810    // this way in `inject` we can simply look up injections from direct
38811    // parent and let the prototype chain do the work.
38812    var existing = vm._provided;
38813    var parentProvides = vm.$parent && vm.$parent._provided;
38814    if (parentProvides === existing) {
38815        return (vm._provided = Object.create(parentProvides));
38816    }
38817    else {
38818        return existing;
38819    }
38820}
38821function inject(key, defaultValue, treatDefaultAsFactory) {
38822    if (treatDefaultAsFactory === void 0) { treatDefaultAsFactory = false; }
38823    // fallback to `currentRenderingInstance` so that this can be called in
38824    // a functional component
38825    var instance = currentInstance;
38826    if (instance) {
38827        // #2400
38828        // to support `app.use` plugins,
38829        // fallback to appContext's `provides` if the instance is at root
38830        var provides = instance.$parent && instance.$parent._provided;
38831        if (provides && key in provides) {
38832            // TS doesn't allow symbol as index type
38833            return provides[key];
38834        }
38835        else if (arguments.length > 1) {
38836            return treatDefaultAsFactory && isFunction(defaultValue)
38837                ? defaultValue.call(instance)
38838                : defaultValue;
38839        }
38840        else if (true) {
38841            warn$2("injection \"".concat(String(key), "\" not found."));
38842        }
38843    }
38844    else if (true) {
38845        warn$2("inject() can only be used inside setup() or functional components.");
38846    }
38847}
38848
38849/**
38850 * @internal this function needs manual public type declaration because it relies
38851 * on previously manually authored types from Vue 2
38852 */
38853function h(type, props, children) {
38854    if (!currentInstance) {
38855         true &&
38856            warn$2("globally imported h() can only be invoked when there is an active " +
38857                "component instance, e.g. synchronously in a component's render or setup function.");
38858    }
38859    return createElement$1(currentInstance, type, props, children, 2, true);
38860}
38861
38862function handleError(err, vm, info) {
38863    // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
38864    // See: https://github.com/vuejs/vuex/issues/1505
38865    pushTarget();
38866    try {
38867        if (vm) {
38868            var cur = vm;
38869            while ((cur = cur.$parent)) {
38870                var hooks = cur.$options.errorCaptured;
38871                if (hooks) {
38872                    for (var i = 0; i < hooks.length; i++) {
38873                        try {
38874                            var capture = hooks[i].call(cur, err, vm, info) === false;
38875                            if (capture)
38876                                return;
38877                        }
38878                        catch (e) {
38879                            globalHandleError(e, cur, 'errorCaptured hook');
38880                        }
38881                    }
38882                }
38883            }
38884        }
38885        globalHandleError(err, vm, info);
38886    }
38887    finally {
38888        popTarget();
38889    }
38890}
38891function invokeWithErrorHandling(handler, context, args, vm, info) {
38892    var res;
38893    try {
38894        res = args ? handler.apply(context, args) : handler.call(context);
38895        if (res && !res._isVue && isPromise(res) && !res._handled) {
38896            res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
38897            res._handled = true;
38898        }
38899    }
38900    catch (e) {
38901        handleError(e, vm, info);
38902    }
38903    return res;
38904}
38905function globalHandleError(err, vm, info) {
38906    if (config.errorHandler) {
38907        try {
38908            return config.errorHandler.call(null, err, vm, info);
38909        }
38910        catch (e) {
38911            // if the user intentionally throws the original error in the handler,
38912            // do not log it twice
38913            if (e !== err) {
38914                logError(e, null, 'config.errorHandler');
38915            }
38916        }
38917    }
38918    logError(err, vm, info);
38919}
38920function logError(err, vm, info) {
38921    if (true) {
38922        warn$2("Error in ".concat(info, ": \"").concat(err.toString(), "\""), vm);
38923    }
38924    /* istanbul ignore else */
38925    if (inBrowser && typeof console !== 'undefined') {
38926        console.error(err);
38927    }
38928    else {
38929        throw err;
38930    }
38931}
38932
38933/* globals MutationObserver */
38934var isUsingMicroTask = false;
38935var callbacks = [];
38936var pending = false;
38937function flushCallbacks() {
38938    pending = false;
38939    var copies = callbacks.slice(0);
38940    callbacks.length = 0;
38941    for (var i = 0; i < copies.length; i++) {
38942        copies[i]();
38943    }
38944}
38945// Here we have async deferring wrappers using microtasks.
38946// In 2.5 we used (macro) tasks (in combination with microtasks).
38947// However, it has subtle problems when state is changed right before repaint
38948// (e.g. #6813, out-in transitions).
38949// Also, using (macro) tasks in event handler would cause some weird behaviors
38950// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
38951// So we now use microtasks everywhere, again.
38952// A major drawback of this tradeoff is that there are some scenarios
38953// where microtasks have too high a priority and fire in between supposedly
38954// sequential events (e.g. #4521, #6690, which have workarounds)
38955// or even between bubbling of the same event (#6566).
38956var timerFunc;
38957// The nextTick behavior leverages the microtask queue, which can be accessed
38958// via either native Promise.then or MutationObserver.
38959// MutationObserver has wider support, however it is seriously bugged in
38960// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
38961// completely stops working after triggering a few times... so, if native
38962// Promise is available, we will use it:
38963/* istanbul ignore next, $flow-disable-line */
38964if (typeof Promise !== 'undefined' && isNative(Promise)) {
38965    var p_1 = Promise.resolve();
38966    timerFunc = function () {
38967        p_1.then(flushCallbacks);
38968        // In problematic UIWebViews, Promise.then doesn't completely break, but
38969        // it can get stuck in a weird state where callbacks are pushed into the
38970        // microtask queue but the queue isn't being flushed, until the browser
38971        // needs to do some other work, e.g. handle a timer. Therefore we can
38972        // "force" the microtask queue to be flushed by adding an empty timer.
38973        if (isIOS)
38974            setTimeout(noop);
38975    };
38976    isUsingMicroTask = true;
38977}
38978else if (!isIE &&
38979    typeof MutationObserver !== 'undefined' &&
38980    (isNative(MutationObserver) ||
38981        // PhantomJS and iOS 7.x
38982        MutationObserver.toString() === '[object MutationObserverConstructor]')) {
38983    // Use MutationObserver where native Promise is not available,
38984    // e.g. PhantomJS, iOS7, Android 4.4
38985    // (#6466 MutationObserver is unreliable in IE11)
38986    var counter_1 = 1;
38987    var observer = new MutationObserver(flushCallbacks);
38988    var textNode_1 = document.createTextNode(String(counter_1));
38989    observer.observe(textNode_1, {
38990        characterData: true
38991    });
38992    timerFunc = function () {
38993        counter_1 = (counter_1 + 1) % 2;
38994        textNode_1.data = String(counter_1);
38995    };
38996    isUsingMicroTask = true;
38997}
38998else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
38999    // Fallback to setImmediate.
39000    // Technically it leverages the (macro) task queue,
39001    // but it is still a better choice than setTimeout.
39002    timerFunc = function () {
39003        setImmediate(flushCallbacks);
39004    };
39005}
39006else {
39007    // Fallback to setTimeout.
39008    timerFunc = function () {
39009        setTimeout(flushCallbacks, 0);
39010    };
39011}
39012/**
39013 * @internal
39014 */
39015function nextTick(cb, ctx) {
39016    var _resolve;
39017    callbacks.push(function () {
39018        if (cb) {
39019            try {
39020                cb.call(ctx);
39021            }
39022            catch (e) {
39023                handleError(e, ctx, 'nextTick');
39024            }
39025        }
39026        else if (_resolve) {
39027            _resolve(ctx);
39028        }
39029    });
39030    if (!pending) {
39031        pending = true;
39032        timerFunc();
39033    }
39034    // $flow-disable-line
39035    if (!cb && typeof Promise !== 'undefined') {
39036        return new Promise(function (resolve) {
39037            _resolve = resolve;
39038        });
39039    }
39040}
39041
39042function useCssModule(name) {
39043    if (name === void 0) { name = '$style'; }
39044    /* istanbul ignore else */
39045    {
39046        if (!currentInstance) {
39047             true && warn$2("useCssModule must be called inside setup()");
39048            return emptyObject;
39049        }
39050        var mod = currentInstance[name];
39051        if (!mod) {
39052             true &&
39053                warn$2("Current instance does not have CSS module named \"".concat(name, "\"."));
39054            return emptyObject;
39055        }
39056        return mod;
39057    }
39058}
39059
39060/**
39061 * Runtime helper for SFC's CSS variable injection feature.
39062 * @private
39063 */
39064function useCssVars(getter) {
39065    if (!inBrowser && !false)
39066        return;
39067    var instance = currentInstance;
39068    if (!instance) {
39069         true &&
39070            warn$2("useCssVars is called without current active component instance.");
39071        return;
39072    }
39073    watchPostEffect(function () {
39074        var el = instance.$el;
39075        var vars = getter(instance, instance._setupProxy);
39076        if (el && el.nodeType === 1) {
39077            var style = el.style;
39078            for (var key in vars) {
39079                style.setProperty("--".concat(key), vars[key]);
39080            }
39081        }
39082    });
39083}
39084
39085/**
39086 * v3-compatible async component API.
39087 * @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts
39088 * because it relies on existing manual types
39089 */
39090function defineAsyncComponent(source) {
39091    if (isFunction(source)) {
39092        source = { loader: source };
39093    }
39094    var loader = source.loader, loadingComponent = source.loadingComponent, errorComponent = source.errorComponent, _a = source.delay, delay = _a === void 0 ? 200 : _a, timeout = source.timeout, // undefined = never times out
39095    _b = source.suspensible, // undefined = never times out
39096    suspensible = _b === void 0 ? false : _b, // in Vue 3 default is true
39097    userOnError = source.onError;
39098    if ( true && suspensible) {
39099        warn$2("The suspensiblbe option for async components is not supported in Vue2. It is ignored.");
39100    }
39101    var pendingRequest = null;
39102    var retries = 0;
39103    var retry = function () {
39104        retries++;
39105        pendingRequest = null;
39106        return load();
39107    };
39108    var load = function () {
39109        var thisRequest;
39110        return (pendingRequest ||
39111            (thisRequest = pendingRequest =
39112                loader()
39113                    .catch(function (err) {
39114                    err = err instanceof Error ? err : new Error(String(err));
39115                    if (userOnError) {
39116                        return new Promise(function (resolve, reject) {
39117                            var userRetry = function () { return resolve(retry()); };
39118                            var userFail = function () { return reject(err); };
39119                            userOnError(err, userRetry, userFail, retries + 1);
39120                        });
39121                    }
39122                    else {
39123                        throw err;
39124                    }
39125                })
39126                    .then(function (comp) {
39127                    if (thisRequest !== pendingRequest && pendingRequest) {
39128                        return pendingRequest;
39129                    }
39130                    if ( true && !comp) {
39131                        warn$2("Async component loader resolved to undefined. " +
39132                            "If you are using retry(), make sure to return its return value.");
39133                    }
39134                    // interop module default
39135                    if (comp &&
39136                        (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {
39137                        comp = comp.default;
39138                    }
39139                    if ( true && comp && !isObject(comp) && !isFunction(comp)) {
39140                        throw new Error("Invalid async component load result: ".concat(comp));
39141                    }
39142                    return comp;
39143                })));
39144    };
39145    return function () {
39146        var component = load();
39147        return {
39148            component: component,
39149            delay: delay,
39150            timeout: timeout,
39151            error: errorComponent,
39152            loading: loadingComponent
39153        };
39154    };
39155}
39156
39157function createLifeCycle(hookName) {
39158    return function (fn, target) {
39159        if (target === void 0) { target = currentInstance; }
39160        if (!target) {
39161             true &&
39162                warn$2("".concat(formatName(hookName), " is called when there is no active component instance to be ") +
39163                    "associated with. " +
39164                    "Lifecycle injection APIs can only be used during execution of setup().");
39165            return;
39166        }
39167        return injectHook(target, hookName, fn);
39168    };
39169}
39170function formatName(name) {
39171    if (name === 'beforeDestroy') {
39172        name = 'beforeUnmount';
39173    }
39174    else if (name === 'destroyed') {
39175        name = 'unmounted';
39176    }
39177    return "on".concat(name[0].toUpperCase() + name.slice(1));
39178}
39179function injectHook(instance, hookName, fn) {
39180    var options = instance.$options;
39181    options[hookName] = mergeLifecycleHook(options[hookName], fn);
39182}
39183var onBeforeMount = createLifeCycle('beforeMount');
39184var onMounted = createLifeCycle('mounted');
39185var onBeforeUpdate = createLifeCycle('beforeUpdate');
39186var onUpdated = createLifeCycle('updated');
39187var onBeforeUnmount = createLifeCycle('beforeDestroy');
39188var onUnmounted = createLifeCycle('destroyed');
39189var onActivated = createLifeCycle('activated');
39190var onDeactivated = createLifeCycle('deactivated');
39191var onServerPrefetch = createLifeCycle('serverPrefetch');
39192var onRenderTracked = createLifeCycle('renderTracked');
39193var onRenderTriggered = createLifeCycle('renderTriggered');
39194var injectErrorCapturedHook = createLifeCycle('errorCaptured');
39195function onErrorCaptured(hook, target) {
39196    if (target === void 0) { target = currentInstance; }
39197    injectErrorCapturedHook(hook, target);
39198}
39199
39200/**
39201 * Note: also update dist/vue.runtime.mjs when adding new exports to this file.
39202 */
39203var version = '2.7.10';
39204/**
39205 * @internal type is manually declared in <root>/types/v3-define-component.d.ts
39206 */
39207function defineComponent(options) {
39208    return options;
39209}
39210
39211var seenObjects = new _Set();
39212/**
39213 * Recursively traverse an object to evoke all converted
39214 * getters, so that every nested property inside the object
39215 * is collected as a "deep" dependency.
39216 */
39217function traverse(val) {
39218    _traverse(val, seenObjects);
39219    seenObjects.clear();
39220    return val;
39221}
39222function _traverse(val, seen) {
39223    var i, keys;
39224    var isA = isArray(val);
39225    if ((!isA && !isObject(val)) ||
39226        Object.isFrozen(val) ||
39227        val instanceof VNode) {
39228        return;
39229    }
39230    if (val.__ob__) {
39231        var depId = val.__ob__.dep.id;
39232        if (seen.has(depId)) {
39233            return;
39234        }
39235        seen.add(depId);
39236    }
39237    if (isA) {
39238        i = val.length;
39239        while (i--)
39240            _traverse(val[i], seen);
39241    }
39242    else if (isRef(val)) {
39243        _traverse(val.value, seen);
39244    }
39245    else {
39246        keys = Object.keys(val);
39247        i = keys.length;
39248        while (i--)
39249            _traverse(val[keys[i]], seen);
39250    }
39251}
39252
39253var uid$1 = 0;
39254/**
39255 * A watcher parses an expression, collects dependencies,
39256 * and fires callback when the expression value changes.
39257 * This is used for both the $watch() api and directives.
39258 * @internal
39259 */
39260var Watcher = /** @class */ (function () {
39261    function Watcher(vm, expOrFn, cb, options, isRenderWatcher) {
39262        recordEffectScope(this, 
39263        // if the active effect scope is manually created (not a component scope),
39264        // prioritize it
39265        activeEffectScope && !activeEffectScope._vm
39266            ? activeEffectScope
39267            : vm
39268                ? vm._scope
39269                : undefined);
39270        if ((this.vm = vm) && isRenderWatcher) {
39271            vm._watcher = this;
39272        }
39273        // options
39274        if (options) {
39275            this.deep = !!options.deep;
39276            this.user = !!options.user;
39277            this.lazy = !!options.lazy;
39278            this.sync = !!options.sync;
39279            this.before = options.before;
39280            if (true) {
39281                this.onTrack = options.onTrack;
39282                this.onTrigger = options.onTrigger;
39283            }
39284        }
39285        else {
39286            this.deep = this.user = this.lazy = this.sync = false;
39287        }
39288        this.cb = cb;
39289        this.id = ++uid$1; // uid for batching
39290        this.active = true;
39291        this.post = false;
39292        this.dirty = this.lazy; // for lazy watchers
39293        this.deps = [];
39294        this.newDeps = [];
39295        this.depIds = new _Set();
39296        this.newDepIds = new _Set();
39297        this.expression =  true ? expOrFn.toString() : 0;
39298        // parse expression for getter
39299        if (isFunction(expOrFn)) {
39300            this.getter = expOrFn;
39301        }
39302        else {
39303            this.getter = parsePath(expOrFn);
39304            if (!this.getter) {
39305                this.getter = noop;
39306                 true &&
39307                    warn$2("Failed watching path: \"".concat(expOrFn, "\" ") +
39308                        'Watcher only accepts simple dot-delimited paths. ' +
39309                        'For full control, use a function instead.', vm);
39310            }
39311        }
39312        this.value = this.lazy ? undefined : this.get();
39313    }
39314    /**
39315     * Evaluate the getter, and re-collect dependencies.
39316     */
39317    Watcher.prototype.get = function () {
39318        pushTarget(this);
39319        var value;
39320        var vm = this.vm;
39321        try {
39322            value = this.getter.call(vm, vm);
39323        }
39324        catch (e) {
39325            if (this.user) {
39326                handleError(e, vm, "getter for watcher \"".concat(this.expression, "\""));
39327            }
39328            else {
39329                throw e;
39330            }
39331        }
39332        finally {
39333            // "touch" every property so they are all tracked as
39334            // dependencies for deep watching
39335            if (this.deep) {
39336                traverse(value);
39337            }
39338            popTarget();
39339            this.cleanupDeps();
39340        }
39341        return value;
39342    };
39343    /**
39344     * Add a dependency to this directive.
39345     */
39346    Watcher.prototype.addDep = function (dep) {
39347        var id = dep.id;
39348        if (!this.newDepIds.has(id)) {
39349            this.newDepIds.add(id);
39350            this.newDeps.push(dep);
39351            if (!this.depIds.has(id)) {
39352                dep.addSub(this);
39353            }
39354        }
39355    };
39356    /**
39357     * Clean up for dependency collection.
39358     */
39359    Watcher.prototype.cleanupDeps = function () {
39360        var i = this.deps.length;
39361        while (i--) {
39362            var dep = this.deps[i];
39363            if (!this.newDepIds.has(dep.id)) {
39364                dep.removeSub(this);
39365            }
39366        }
39367        var tmp = this.depIds;
39368        this.depIds = this.newDepIds;
39369        this.newDepIds = tmp;
39370        this.newDepIds.clear();
39371        tmp = this.deps;
39372        this.deps = this.newDeps;
39373        this.newDeps = tmp;
39374        this.newDeps.length = 0;
39375    };
39376    /**
39377     * Subscriber interface.
39378     * Will be called when a dependency changes.
39379     */
39380    Watcher.prototype.update = function () {
39381        /* istanbul ignore else */
39382        if (this.lazy) {
39383            this.dirty = true;
39384        }
39385        else if (this.sync) {
39386            this.run();
39387        }
39388        else {
39389            queueWatcher(this);
39390        }
39391    };
39392    /**
39393     * Scheduler job interface.
39394     * Will be called by the scheduler.
39395     */
39396    Watcher.prototype.run = function () {
39397        if (this.active) {
39398            var value = this.get();
39399            if (value !== this.value ||
39400                // Deep watchers and watchers on Object/Arrays should fire even
39401                // when the value is the same, because the value may
39402                // have mutated.
39403                isObject(value) ||
39404                this.deep) {
39405                // set new value
39406                var oldValue = this.value;
39407                this.value = value;
39408                if (this.user) {
39409                    var info = "callback for watcher \"".concat(this.expression, "\"");
39410                    invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);
39411                }
39412                else {
39413                    this.cb.call(this.vm, value, oldValue);
39414                }
39415            }
39416        }
39417    };
39418    /**
39419     * Evaluate the value of the watcher.
39420     * This only gets called for lazy watchers.
39421     */
39422    Watcher.prototype.evaluate = function () {
39423        this.value = this.get();
39424        this.dirty = false;
39425    };
39426    /**
39427     * Depend on all deps collected by this watcher.
39428     */
39429    Watcher.prototype.depend = function () {
39430        var i = this.deps.length;
39431        while (i--) {
39432            this.deps[i].depend();
39433        }
39434    };
39435    /**
39436     * Remove self from all dependencies' subscriber list.
39437     */
39438    Watcher.prototype.teardown = function () {
39439        if (this.vm && !this.vm._isBeingDestroyed) {
39440            remove$2(this.vm._scope.effects, this);
39441        }
39442        if (this.active) {
39443            var i = this.deps.length;
39444            while (i--) {
39445                this.deps[i].removeSub(this);
39446            }
39447            this.active = false;
39448            if (this.onStop) {
39449                this.onStop();
39450            }
39451        }
39452    };
39453    return Watcher;
39454}());
39455
39456var sharedPropertyDefinition = {
39457    enumerable: true,
39458    configurable: true,
39459    get: noop,
39460    set: noop
39461};
39462function proxy(target, sourceKey, key) {
39463    sharedPropertyDefinition.get = function proxyGetter() {
39464        return this[sourceKey][key];
39465    };
39466    sharedPropertyDefinition.set = function proxySetter(val) {
39467        this[sourceKey][key] = val;
39468    };
39469    Object.defineProperty(target, key, sharedPropertyDefinition);
39470}
39471function initState(vm) {
39472    var opts = vm.$options;
39473    if (opts.props)
39474        initProps$1(vm, opts.props);
39475    // Composition API
39476    initSetup(vm);
39477    if (opts.methods)
39478        initMethods(vm, opts.methods);
39479    if (opts.data) {
39480        initData(vm);
39481    }
39482    else {
39483        var ob = observe((vm._data = {}));
39484        ob && ob.vmCount++;
39485    }
39486    if (opts.computed)
39487        initComputed$1(vm, opts.computed);
39488    if (opts.watch && opts.watch !== nativeWatch) {
39489        initWatch(vm, opts.watch);
39490    }
39491}
39492function initProps$1(vm, propsOptions) {
39493    var propsData = vm.$options.propsData || {};
39494    var props = (vm._props = shallowReactive({}));
39495    // cache prop keys so that future props updates can iterate using Array
39496    // instead of dynamic object key enumeration.
39497    var keys = (vm.$options._propKeys = []);
39498    var isRoot = !vm.$parent;
39499    // root instance props should be converted
39500    if (!isRoot) {
39501        toggleObserving(false);
39502    }
39503    var _loop_1 = function (key) {
39504        keys.push(key);
39505        var value = validateProp(key, propsOptions, propsData, vm);
39506        /* istanbul ignore else */
39507        if (true) {
39508            var hyphenatedKey = hyphenate(key);
39509            if (isReservedAttribute(hyphenatedKey) ||
39510                config.isReservedAttr(hyphenatedKey)) {
39511                warn$2("\"".concat(hyphenatedKey, "\" is a reserved attribute and cannot be used as component prop."), vm);
39512            }
39513            defineReactive(props, key, value, function () {
39514                if (!isRoot && !isUpdatingChildComponent) {
39515                    warn$2("Avoid mutating a prop directly since the value will be " +
39516                        "overwritten whenever the parent component re-renders. " +
39517                        "Instead, use a data or computed property based on the prop's " +
39518                        "value. Prop being mutated: \"".concat(key, "\""), vm);
39519                }
39520            });
39521        }
39522        else {}
39523        // static props are already proxied on the component's prototype
39524        // during Vue.extend(). We only need to proxy props defined at
39525        // instantiation here.
39526        if (!(key in vm)) {
39527            proxy(vm, "_props", key);
39528        }
39529    };
39530    for (var key in propsOptions) {
39531        _loop_1(key);
39532    }
39533    toggleObserving(true);
39534}
39535function initData(vm) {
39536    var data = vm.$options.data;
39537    data = vm._data = isFunction(data) ? getData(data, vm) : data || {};
39538    if (!isPlainObject(data)) {
39539        data = {};
39540         true &&
39541            warn$2('data functions should return an object:\n' +
39542                'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);
39543    }
39544    // proxy data on instance
39545    var keys = Object.keys(data);
39546    var props = vm.$options.props;
39547    var methods = vm.$options.methods;
39548    var i = keys.length;
39549    while (i--) {
39550        var key = keys[i];
39551        if (true) {
39552            if (methods && hasOwn(methods, key)) {
39553                warn$2("Method \"".concat(key, "\" has already been defined as a data property."), vm);
39554            }
39555        }
39556        if (props && hasOwn(props, key)) {
39557             true &&
39558                warn$2("The data property \"".concat(key, "\" is already declared as a prop. ") +
39559                    "Use prop default value instead.", vm);
39560        }
39561        else if (!isReserved(key)) {
39562            proxy(vm, "_data", key);
39563        }
39564    }
39565    // observe data
39566    var ob = observe(data);
39567    ob && ob.vmCount++;
39568}
39569function getData(data, vm) {
39570    // #7573 disable dep collection when invoking data getters
39571    pushTarget();
39572    try {
39573        return data.call(vm, vm);
39574    }
39575    catch (e) {
39576        handleError(e, vm, "data()");
39577        return {};
39578    }
39579    finally {
39580        popTarget();
39581    }
39582}
39583var computedWatcherOptions = { lazy: true };
39584function initComputed$1(vm, computed) {
39585    // $flow-disable-line
39586    var watchers = (vm._computedWatchers = Object.create(null));
39587    // computed properties are just getters during SSR
39588    var isSSR = isServerRendering();
39589    for (var key in computed) {
39590        var userDef = computed[key];
39591        var getter = isFunction(userDef) ? userDef : userDef.get;
39592        if ( true && getter == null) {
39593            warn$2("Getter is missing for computed property \"".concat(key, "\"."), vm);
39594        }
39595        if (!isSSR) {
39596            // create internal watcher for the computed property.
39597            watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);
39598        }
39599        // component-defined computed properties are already defined on the
39600        // component prototype. We only need to define computed properties defined
39601        // at instantiation here.
39602        if (!(key in vm)) {
39603            defineComputed(vm, key, userDef);
39604        }
39605        else if (true) {
39606            if (key in vm.$data) {
39607                warn$2("The computed property \"".concat(key, "\" is already defined in data."), vm);
39608            }
39609            else if (vm.$options.props && key in vm.$options.props) {
39610                warn$2("The computed property \"".concat(key, "\" is already defined as a prop."), vm);
39611            }
39612            else if (vm.$options.methods && key in vm.$options.methods) {
39613                warn$2("The computed property \"".concat(key, "\" is already defined as a method."), vm);
39614            }
39615        }
39616    }
39617}
39618function defineComputed(target, key, userDef) {
39619    var shouldCache = !isServerRendering();
39620    if (isFunction(userDef)) {
39621        sharedPropertyDefinition.get = shouldCache
39622            ? createComputedGetter(key)
39623            : createGetterInvoker(userDef);
39624        sharedPropertyDefinition.set = noop;
39625    }
39626    else {
39627        sharedPropertyDefinition.get = userDef.get
39628            ? shouldCache && userDef.cache !== false
39629                ? createComputedGetter(key)
39630                : createGetterInvoker(userDef.get)
39631            : noop;
39632        sharedPropertyDefinition.set = userDef.set || noop;
39633    }
39634    if ( true && sharedPropertyDefinition.set === noop) {
39635        sharedPropertyDefinition.set = function () {
39636            warn$2("Computed property \"".concat(key, "\" was assigned to but it has no setter."), this);
39637        };
39638    }
39639    Object.defineProperty(target, key, sharedPropertyDefinition);
39640}
39641function createComputedGetter(key) {
39642    return function computedGetter() {
39643        var watcher = this._computedWatchers && this._computedWatchers[key];
39644        if (watcher) {
39645            if (watcher.dirty) {
39646                watcher.evaluate();
39647            }
39648            if (Dep.target) {
39649                if ( true && Dep.target.onTrack) {
39650                    Dep.target.onTrack({
39651                        effect: Dep.target,
39652                        target: this,
39653                        type: "get" /* TrackOpTypes.GET */,
39654                        key: key
39655                    });
39656                }
39657                watcher.depend();
39658            }
39659            return watcher.value;
39660        }
39661    };
39662}
39663function createGetterInvoker(fn) {
39664    return function computedGetter() {
39665        return fn.call(this, this);
39666    };
39667}
39668function initMethods(vm, methods) {
39669    var props = vm.$options.props;
39670    for (var key in methods) {
39671        if (true) {
39672            if (typeof methods[key] !== 'function') {
39673                warn$2("Method \"".concat(key, "\" has type \"").concat(typeof methods[key], "\" in the component definition. ") +
39674                    "Did you reference the function correctly?", vm);
39675            }
39676            if (props && hasOwn(props, key)) {
39677                warn$2("Method \"".concat(key, "\" has already been defined as a prop."), vm);
39678            }
39679            if (key in vm && isReserved(key)) {
39680                warn$2("Method \"".concat(key, "\" conflicts with an existing Vue instance method. ") +
39681                    "Avoid defining component methods that start with _ or $.");
39682            }
39683        }
39684        vm[key] = typeof methods[key] !== 'function' ? noop : bind$1(methods[key], vm);
39685    }
39686}
39687function initWatch(vm, watch) {
39688    for (var key in watch) {
39689        var handler = watch[key];
39690        if (isArray(handler)) {
39691            for (var i = 0; i < handler.length; i++) {
39692                createWatcher(vm, key, handler[i]);
39693            }
39694        }
39695        else {
39696            createWatcher(vm, key, handler);
39697        }
39698    }
39699}
39700function createWatcher(vm, expOrFn, handler, options) {
39701    if (isPlainObject(handler)) {
39702        options = handler;
39703        handler = handler.handler;
39704    }
39705    if (typeof handler === 'string') {
39706        handler = vm[handler];
39707    }
39708    return vm.$watch(expOrFn, handler, options);
39709}
39710function stateMixin(Vue) {
39711    // flow somehow has problems with directly declared definition object
39712    // when using Object.defineProperty, so we have to procedurally build up
39713    // the object here.
39714    var dataDef = {};
39715    dataDef.get = function () {
39716        return this._data;
39717    };
39718    var propsDef = {};
39719    propsDef.get = function () {
39720        return this._props;
39721    };
39722    if (true) {
39723        dataDef.set = function () {
39724            warn$2('Avoid replacing instance root $data. ' +
39725                'Use nested data properties instead.', this);
39726        };
39727        propsDef.set = function () {
39728            warn$2("$props is readonly.", this);
39729        };
39730    }
39731    Object.defineProperty(Vue.prototype, '$data', dataDef);
39732    Object.defineProperty(Vue.prototype, '$props', propsDef);
39733    Vue.prototype.$set = set;
39734    Vue.prototype.$delete = del;
39735    Vue.prototype.$watch = function (expOrFn, cb, options) {
39736        var vm = this;
39737        if (isPlainObject(cb)) {
39738            return createWatcher(vm, expOrFn, cb, options);
39739        }
39740        options = options || {};
39741        options.user = true;
39742        var watcher = new Watcher(vm, expOrFn, cb, options);
39743        if (options.immediate) {
39744            var info = "callback for immediate watcher \"".concat(watcher.expression, "\"");
39745            pushTarget();
39746            invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);
39747            popTarget();
39748        }
39749        return function unwatchFn() {
39750            watcher.teardown();
39751        };
39752    };
39753}
39754
39755function initProvide(vm) {
39756    var provideOption = vm.$options.provide;
39757    if (provideOption) {
39758        var provided = isFunction(provideOption)
39759            ? provideOption.call(vm)
39760            : provideOption;
39761        if (!isObject(provided)) {
39762            return;
39763        }
39764        var source = resolveProvided(vm);
39765        // IE9 doesn't support Object.getOwnPropertyDescriptors so we have to
39766        // iterate the keys ourselves.
39767        var keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);
39768        for (var i = 0; i < keys.length; i++) {
39769            var key = keys[i];
39770            Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));
39771        }
39772    }
39773}
39774function initInjections(vm) {
39775    var result = resolveInject(vm.$options.inject, vm);
39776    if (result) {
39777        toggleObserving(false);
39778        Object.keys(result).forEach(function (key) {
39779            /* istanbul ignore else */
39780            if (true) {
39781                defineReactive(vm, key, result[key], function () {
39782                    warn$2("Avoid mutating an injected value directly since the changes will be " +
39783                        "overwritten whenever the provided component re-renders. " +
39784                        "injection being mutated: \"".concat(key, "\""), vm);
39785                });
39786            }
39787            else {}
39788        });
39789        toggleObserving(true);
39790    }
39791}
39792function resolveInject(inject, vm) {
39793    if (inject) {
39794        // inject is :any because flow is not smart enough to figure out cached
39795        var result = Object.create(null);
39796        var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);
39797        for (var i = 0; i < keys.length; i++) {
39798            var key = keys[i];
39799            // #6574 in case the inject object is observed...
39800            if (key === '__ob__')
39801                continue;
39802            var provideKey = inject[key].from;
39803            if (provideKey in vm._provided) {
39804                result[key] = vm._provided[provideKey];
39805            }
39806            else if ('default' in inject[key]) {
39807                var provideDefault = inject[key].default;
39808                result[key] = isFunction(provideDefault)
39809                    ? provideDefault.call(vm)
39810                    : provideDefault;
39811            }
39812            else if (true) {
39813                warn$2("Injection \"".concat(key, "\" not found"), vm);
39814            }
39815        }
39816        return result;
39817    }
39818}
39819
39820var uid = 0;
39821function initMixin$1(Vue) {
39822    Vue.prototype._init = function (options) {
39823        var vm = this;
39824        // a uid
39825        vm._uid = uid++;
39826        var startTag, endTag;
39827        /* istanbul ignore if */
39828        if ( true && config.performance && mark) {
39829            startTag = "vue-perf-start:".concat(vm._uid);
39830            endTag = "vue-perf-end:".concat(vm._uid);
39831            mark(startTag);
39832        }
39833        // a flag to mark this as a Vue instance without having to do instanceof
39834        // check
39835        vm._isVue = true;
39836        // avoid instances from being observed
39837        vm.__v_skip = true;
39838        // effect scope
39839        vm._scope = new EffectScope(true /* detached */);
39840        vm._scope._vm = true;
39841        // merge options
39842        if (options && options._isComponent) {
39843            // optimize internal component instantiation
39844            // since dynamic options merging is pretty slow, and none of the
39845            // internal component options needs special treatment.
39846            initInternalComponent(vm, options);
39847        }
39848        else {
39849            vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);
39850        }
39851        /* istanbul ignore else */
39852        if (true) {
39853            initProxy(vm);
39854        }
39855        else {}
39856        // expose real self
39857        vm._self = vm;
39858        initLifecycle(vm);
39859        initEvents(vm);
39860        initRender(vm);
39861        callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);
39862        initInjections(vm); // resolve injections before data/props
39863        initState(vm);
39864        initProvide(vm); // resolve provide after data/props
39865        callHook$1(vm, 'created');
39866        /* istanbul ignore if */
39867        if ( true && config.performance && mark) {
39868            vm._name = formatComponentName(vm, false);
39869            mark(endTag);
39870            measure("vue ".concat(vm._name, " init"), startTag, endTag);
39871        }
39872        if (vm.$options.el) {
39873            vm.$mount(vm.$options.el);
39874        }
39875    };
39876}
39877function initInternalComponent(vm, options) {
39878    var opts = (vm.$options = Object.create(vm.constructor.options));
39879    // doing this because it's faster than dynamic enumeration.
39880    var parentVnode = options._parentVnode;
39881    opts.parent = options.parent;
39882    opts._parentVnode = parentVnode;
39883    var vnodeComponentOptions = parentVnode.componentOptions;
39884    opts.propsData = vnodeComponentOptions.propsData;
39885    opts._parentListeners = vnodeComponentOptions.listeners;
39886    opts._renderChildren = vnodeComponentOptions.children;
39887    opts._componentTag = vnodeComponentOptions.tag;
39888    if (options.render) {
39889        opts.render = options.render;
39890        opts.staticRenderFns = options.staticRenderFns;
39891    }
39892}
39893function resolveConstructorOptions(Ctor) {
39894    var options = Ctor.options;
39895    if (Ctor.super) {
39896        var superOptions = resolveConstructorOptions(Ctor.super);
39897        var cachedSuperOptions = Ctor.superOptions;
39898        if (superOptions !== cachedSuperOptions) {
39899            // super option changed,
39900            // need to resolve new options.
39901            Ctor.superOptions = superOptions;
39902            // check if there are any late-modified/attached options (#4976)
39903            var modifiedOptions = resolveModifiedOptions(Ctor);
39904            // update base extend options
39905            if (modifiedOptions) {
39906                extend(Ctor.extendOptions, modifiedOptions);
39907            }
39908            options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
39909            if (options.name) {
39910                options.components[options.name] = Ctor;
39911            }
39912        }
39913    }
39914    return options;
39915}
39916function resolveModifiedOptions(Ctor) {
39917    var modified;
39918    var latest = Ctor.options;
39919    var sealed = Ctor.sealedOptions;
39920    for (var key in latest) {
39921        if (latest[key] !== sealed[key]) {
39922            if (!modified)
39923                modified = {};
39924            modified[key] = latest[key];
39925        }
39926    }
39927    return modified;
39928}
39929
39930function FunctionalRenderContext(data, props, children, parent, Ctor) {
39931    var _this = this;
39932    var options = Ctor.options;
39933    // ensure the createElement function in functional components
39934    // gets a unique context - this is necessary for correct named slot check
39935    var contextVm;
39936    if (hasOwn(parent, '_uid')) {
39937        contextVm = Object.create(parent);
39938        contextVm._original = parent;
39939    }
39940    else {
39941        // the context vm passed in is a functional context as well.
39942        // in this case we want to make sure we are able to get a hold to the
39943        // real context instance.
39944        contextVm = parent;
39945        // @ts-ignore
39946        parent = parent._original;
39947    }
39948    var isCompiled = isTrue(options._compiled);
39949    var needNormalization = !isCompiled;
39950    this.data = data;
39951    this.props = props;
39952    this.children = children;
39953    this.parent = parent;
39954    this.listeners = data.on || emptyObject;
39955    this.injections = resolveInject(options.inject, parent);
39956    this.slots = function () {
39957        if (!_this.$slots) {
39958            normalizeScopedSlots(parent, data.scopedSlots, (_this.$slots = resolveSlots(children, parent)));
39959        }
39960        return _this.$slots;
39961    };
39962    Object.defineProperty(this, 'scopedSlots', {
39963        enumerable: true,
39964        get: function () {
39965            return normalizeScopedSlots(parent, data.scopedSlots, this.slots());
39966        }
39967    });
39968    // support for compiled functional template
39969    if (isCompiled) {
39970        // exposing $options for renderStatic()
39971        this.$options = options;
39972        // pre-resolve slots for renderSlot()
39973        this.$slots = this.slots();
39974        this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);
39975    }
39976    if (options._scopeId) {
39977        this._c = function (a, b, c, d) {
39978            var vnode = createElement$1(contextVm, a, b, c, d, needNormalization);
39979            if (vnode && !isArray(vnode)) {
39980                vnode.fnScopeId = options._scopeId;
39981                vnode.fnContext = parent;
39982            }
39983            return vnode;
39984        };
39985    }
39986    else {
39987        this._c = function (a, b, c, d) {
39988            return createElement$1(contextVm, a, b, c, d, needNormalization);
39989        };
39990    }
39991}
39992installRenderHelpers(FunctionalRenderContext.prototype);
39993function createFunctionalComponent(Ctor, propsData, data, contextVm, children) {
39994    var options = Ctor.options;
39995    var props = {};
39996    var propOptions = options.props;
39997    if (isDef(propOptions)) {
39998        for (var key in propOptions) {
39999            props[key] = validateProp(key, propOptions, propsData || emptyObject);
40000        }
40001    }
40002    else {
40003        if (isDef(data.attrs))
40004            mergeProps(props, data.attrs);
40005        if (isDef(data.props))
40006            mergeProps(props, data.props);
40007    }
40008    var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);
40009    var vnode = options.render.call(null, renderContext._c, renderContext);
40010    if (vnode instanceof VNode) {
40011        return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);
40012    }
40013    else if (isArray(vnode)) {
40014        var vnodes = normalizeChildren(vnode) || [];
40015        var res = new Array(vnodes.length);
40016        for (var i = 0; i < vnodes.length; i++) {
40017            res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
40018        }
40019        return res;
40020    }
40021}
40022function cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {
40023    // #7817 clone node before setting fnContext, otherwise if the node is reused
40024    // (e.g. it was from a cached normal slot) the fnContext causes named slots
40025    // that should not be matched to match.
40026    var clone = cloneVNode(vnode);
40027    clone.fnContext = contextVm;
40028    clone.fnOptions = options;
40029    if (true) {
40030        (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =
40031            renderContext;
40032    }
40033    if (data.slot) {
40034        (clone.data || (clone.data = {})).slot = data.slot;
40035    }
40036    return clone;
40037}
40038function mergeProps(to, from) {
40039    for (var key in from) {
40040        to[camelize(key)] = from[key];
40041    }
40042}
40043
40044function getComponentName(options) {
40045    return options.name || options.__name || options._componentTag;
40046}
40047// inline hooks to be invoked on component VNodes during patch
40048var componentVNodeHooks = {
40049    init: function (vnode, hydrating) {
40050        if (vnode.componentInstance &&
40051            !vnode.componentInstance._isDestroyed &&
40052            vnode.data.keepAlive) {
40053            // kept-alive components, treat as a patch
40054            var mountedNode = vnode; // work around flow
40055            componentVNodeHooks.prepatch(mountedNode, mountedNode);
40056        }
40057        else {
40058            var child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));
40059            child.$mount(hydrating ? vnode.elm : undefined, hydrating);
40060        }
40061    },
40062    prepatch: function (oldVnode, vnode) {
40063        var options = vnode.componentOptions;
40064        var child = (vnode.componentInstance = oldVnode.componentInstance);
40065        updateChildComponent(child, options.propsData, // updated props
40066        options.listeners, // updated listeners
40067        vnode, // new parent vnode
40068        options.children // new children
40069        );
40070    },
40071    insert: function (vnode) {
40072        var context = vnode.context, componentInstance = vnode.componentInstance;
40073        if (!componentInstance._isMounted) {
40074            componentInstance._isMounted = true;
40075            callHook$1(componentInstance, 'mounted');
40076        }
40077        if (vnode.data.keepAlive) {
40078            if (context._isMounted) {
40079                // vue-router#1212
40080                // During updates, a kept-alive component's child components may
40081                // change, so directly walking the tree here may call activated hooks
40082                // on incorrect children. Instead we push them into a queue which will
40083                // be processed after the whole patch process ended.
40084                queueActivatedComponent(componentInstance);
40085            }
40086            else {
40087                activateChildComponent(componentInstance, true /* direct */);
40088            }
40089        }
40090    },
40091    destroy: function (vnode) {
40092        var componentInstance = vnode.componentInstance;
40093        if (!componentInstance._isDestroyed) {
40094            if (!vnode.data.keepAlive) {
40095                componentInstance.$destroy();
40096            }
40097            else {
40098                deactivateChildComponent(componentInstance, true /* direct */);
40099            }
40100        }
40101    }
40102};
40103var hooksToMerge = Object.keys(componentVNodeHooks);
40104function createComponent(Ctor, data, context, children, tag) {
40105    if (isUndef(Ctor)) {
40106        return;
40107    }
40108    var baseCtor = context.$options._base;
40109    // plain options object: turn it into a constructor
40110    if (isObject(Ctor)) {
40111        Ctor = baseCtor.extend(Ctor);
40112    }
40113    // if at this stage it's not a constructor or an async component factory,
40114    // reject.
40115    if (typeof Ctor !== 'function') {
40116        if (true) {
40117            warn$2("Invalid Component definition: ".concat(String(Ctor)), context);
40118        }
40119        return;
40120    }
40121    // async component
40122    var asyncFactory;
40123    // @ts-expect-error
40124    if (isUndef(Ctor.cid)) {
40125        asyncFactory = Ctor;
40126        Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
40127        if (Ctor === undefined) {
40128            // return a placeholder node for async component, which is rendered
40129            // as a comment node but preserves all the raw information for the node.
40130            // the information will be used for async server-rendering and hydration.
40131            return createAsyncPlaceholder(asyncFactory, data, context, children, tag);
40132        }
40133    }
40134    data = data || {};
40135    // resolve constructor options in case global mixins are applied after
40136    // component constructor creation
40137    resolveConstructorOptions(Ctor);
40138    // transform component v-model data into props & events
40139    if (isDef(data.model)) {
40140        // @ts-expect-error
40141        transformModel(Ctor.options, data);
40142    }
40143    // extract props
40144    // @ts-expect-error
40145    var propsData = extractPropsFromVNodeData(data, Ctor, tag);
40146    // functional component
40147    // @ts-expect-error
40148    if (isTrue(Ctor.options.functional)) {
40149        return createFunctionalComponent(Ctor, propsData, data, context, children);
40150    }
40151    // extract listeners, since these needs to be treated as
40152    // child component listeners instead of DOM listeners
40153    var listeners = data.on;
40154    // replace with listeners with .native modifier
40155    // so it gets processed during parent component patch.
40156    data.on = data.nativeOn;
40157    // @ts-expect-error
40158    if (isTrue(Ctor.options.abstract)) {
40159        // abstract components do not keep anything
40160        // other than props & listeners & slot
40161        // work around flow
40162        var slot = data.slot;
40163        data = {};
40164        if (slot) {
40165            data.slot = slot;
40166        }
40167    }
40168    // install component management hooks onto the placeholder node
40169    installComponentHooks(data);
40170    // return a placeholder vnode
40171    // @ts-expect-error
40172    var name = getComponentName(Ctor.options) || tag;
40173    var vnode = new VNode(
40174    // @ts-expect-error
40175    "vue-component-".concat(Ctor.cid).concat(name ? "-".concat(name) : ''), data, undefined, undefined, undefined, context, 
40176    // @ts-expect-error
40177    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, asyncFactory);
40178    return vnode;
40179}
40180function createComponentInstanceForVnode(
40181// we know it's MountedComponentVNode but flow doesn't
40182vnode, 
40183// activeInstance in lifecycle state
40184parent) {
40185    var options = {
40186        _isComponent: true,
40187        _parentVnode: vnode,
40188        parent: parent
40189    };
40190    // check inline-template render functions
40191    var inlineTemplate = vnode.data.inlineTemplate;
40192    if (isDef(inlineTemplate)) {
40193        options.render = inlineTemplate.render;
40194        options.staticRenderFns = inlineTemplate.staticRenderFns;
40195    }
40196    return new vnode.componentOptions.Ctor(options);
40197}
40198function installComponentHooks(data) {
40199    var hooks = data.hook || (data.hook = {});
40200    for (var i = 0; i < hooksToMerge.length; i++) {
40201        var key = hooksToMerge[i];
40202        var existing = hooks[key];
40203        var toMerge = componentVNodeHooks[key];
40204        // @ts-expect-error
40205        if (existing !== toMerge && !(existing && existing._merged)) {
40206            hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;
40207        }
40208    }
40209}
40210function mergeHook(f1, f2) {
40211    var merged = function (a, b) {
40212        // flow complains about extra args which is why we use any
40213        f1(a, b);
40214        f2(a, b);
40215    };
40216    merged._merged = true;
40217    return merged;
40218}
40219// transform component v-model info (value and callback) into
40220// prop and event handler respectively.
40221function transformModel(options, data) {
40222    var prop = (options.model && options.model.prop) || 'value';
40223    var event = (options.model && options.model.event) || 'input';
40224    (data.attrs || (data.attrs = {}))[prop] = data.model.value;
40225    var on = data.on || (data.on = {});
40226    var existing = on[event];
40227    var callback = data.model.callback;
40228    if (isDef(existing)) {
40229        if (isArray(existing)
40230            ? existing.indexOf(callback) === -1
40231            : existing !== callback) {
40232            on[event] = [callback].concat(existing);
40233        }
40234    }
40235    else {
40236        on[event] = callback;
40237    }
40238}
40239
40240var warn$2 = noop;
40241var tip = noop;
40242var generateComponentTrace; // work around flow check
40243var formatComponentName;
40244if (true) {
40245    var hasConsole_1 = typeof console !== 'undefined';
40246    var classifyRE_1 = /(?:^|[-_])(\w)/g;
40247    var classify_1 = function (str) {
40248        return str.replace(classifyRE_1, function (c) { return c.toUpperCase(); }).replace(/[-_]/g, '');
40249    };
40250    warn$2 = function (msg, vm) {
40251        if (vm === void 0) { vm = currentInstance; }
40252        var trace = vm ? generateComponentTrace(vm) : '';
40253        if (config.warnHandler) {
40254            config.warnHandler.call(null, msg, vm, trace);
40255        }
40256        else if (hasConsole_1 && !config.silent) {
40257            console.error("[Vue warn]: ".concat(msg).concat(trace));
40258        }
40259    };
40260    tip = function (msg, vm) {
40261        if (hasConsole_1 && !config.silent) {
40262            console.warn("[Vue tip]: ".concat(msg) + (vm ? generateComponentTrace(vm) : ''));
40263        }
40264    };
40265    formatComponentName = function (vm, includeFile) {
40266        if (vm.$root === vm) {
40267            return '<Root>';
40268        }
40269        var options = isFunction(vm) && vm.cid != null
40270            ? vm.options
40271            : vm._isVue
40272                ? vm.$options || vm.constructor.options
40273                : vm;
40274        var name = getComponentName(options);
40275        var file = options.__file;
40276        if (!name && file) {
40277            var match = file.match(/([^/\\]+)\.vue$/);
40278            name = match && match[1];
40279        }
40280        return ((name ? "<".concat(classify_1(name), ">") : "<Anonymous>") +
40281            (file && includeFile !== false ? " at ".concat(file) : ''));
40282    };
40283    var repeat_1 = function (str, n) {
40284        var res = '';
40285        while (n) {
40286            if (n % 2 === 1)
40287                res += str;
40288            if (n > 1)
40289                str += str;
40290            n >>= 1;
40291        }
40292        return res;
40293    };
40294    generateComponentTrace = function (vm) {
40295        if (vm._isVue && vm.$parent) {
40296            var tree = [];
40297            var currentRecursiveSequence = 0;
40298            while (vm) {
40299                if (tree.length > 0) {
40300                    var last = tree[tree.length - 1];
40301                    if (last.constructor === vm.constructor) {
40302                        currentRecursiveSequence++;
40303                        vm = vm.$parent;
40304                        continue;
40305                    }
40306                    else if (currentRecursiveSequence > 0) {
40307                        tree[tree.length - 1] = [last, currentRecursiveSequence];
40308                        currentRecursiveSequence = 0;
40309                    }
40310                }
40311                tree.push(vm);
40312                vm = vm.$parent;
40313            }
40314            return ('\n\nfound in\n\n' +
40315                tree
40316                    .map(function (vm, i) {
40317                    return "".concat(i === 0 ? '---> ' : repeat_1(' ', 5 + i * 2)).concat(isArray(vm)
40318                        ? "".concat(formatComponentName(vm[0]), "... (").concat(vm[1], " recursive calls)")
40319                        : formatComponentName(vm));
40320                })
40321                    .join('\n'));
40322        }
40323        else {
40324            return "\n\n(found in ".concat(formatComponentName(vm), ")");
40325        }
40326    };
40327}
40328
40329/**
40330 * Option overwriting strategies are functions that handle
40331 * how to merge a parent option value and a child option
40332 * value into the final value.
40333 */
40334var strats = config.optionMergeStrategies;
40335/**
40336 * Options with restrictions
40337 */
40338if (true) {
40339    strats.el = strats.propsData = function (parent, child, vm, key) {
40340        if (!vm) {
40341            warn$2("option \"".concat(key, "\" can only be used during instance ") +
40342                'creation with the `new` keyword.');
40343        }
40344        return defaultStrat(parent, child);
40345    };
40346}
40347/**
40348 * Helper that recursively merges two data objects together.
40349 */
40350function mergeData(to, from) {
40351    if (!from)
40352        return to;
40353    var key, toVal, fromVal;
40354    var keys = hasSymbol
40355        ? Reflect.ownKeys(from)
40356        : Object.keys(from);
40357    for (var i = 0; i < keys.length; i++) {
40358        key = keys[i];
40359        // in case the object is already observed...
40360        if (key === '__ob__')
40361            continue;
40362        toVal = to[key];
40363        fromVal = from[key];
40364        if (!hasOwn(to, key)) {
40365            set(to, key, fromVal);
40366        }
40367        else if (toVal !== fromVal &&
40368            isPlainObject(toVal) &&
40369            isPlainObject(fromVal)) {
40370            mergeData(toVal, fromVal);
40371        }
40372    }
40373    return to;
40374}
40375/**
40376 * Data
40377 */
40378function mergeDataOrFn(parentVal, childVal, vm) {
40379    if (!vm) {
40380        // in a Vue.extend merge, both should be functions
40381        if (!childVal) {
40382            return parentVal;
40383        }
40384        if (!parentVal) {
40385            return childVal;
40386        }
40387        // when parentVal & childVal are both present,
40388        // we need to return a function that returns the
40389        // merged result of both functions... no need to
40390        // check if parentVal is a function here because
40391        // it has to be a function to pass previous merges.
40392        return function mergedDataFn() {
40393            return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);
40394        };
40395    }
40396    else {
40397        return function mergedInstanceDataFn() {
40398            // instance merge
40399            var instanceData = isFunction(childVal)
40400                ? childVal.call(vm, vm)
40401                : childVal;
40402            var defaultData = isFunction(parentVal)
40403                ? parentVal.call(vm, vm)
40404                : parentVal;
40405            if (instanceData) {
40406                return mergeData(instanceData, defaultData);
40407            }
40408            else {
40409                return defaultData;
40410            }
40411        };
40412    }
40413}
40414strats.data = function (parentVal, childVal, vm) {
40415    if (!vm) {
40416        if (childVal && typeof childVal !== 'function') {
40417             true &&
40418                warn$2('The "data" option should be a function ' +
40419                    'that returns a per-instance value in component ' +
40420                    'definitions.', vm);
40421            return parentVal;
40422        }
40423        return mergeDataOrFn(parentVal, childVal);
40424    }
40425    return mergeDataOrFn(parentVal, childVal, vm);
40426};
40427/**
40428 * Hooks and props are merged as arrays.
40429 */
40430function mergeLifecycleHook(parentVal, childVal) {
40431    var res = childVal
40432        ? parentVal
40433            ? parentVal.concat(childVal)
40434            : isArray(childVal)
40435                ? childVal
40436                : [childVal]
40437        : parentVal;
40438    return res ? dedupeHooks(res) : res;
40439}
40440function dedupeHooks(hooks) {
40441    var res = [];
40442    for (var i = 0; i < hooks.length; i++) {
40443        if (res.indexOf(hooks[i]) === -1) {
40444            res.push(hooks[i]);
40445        }
40446    }
40447    return res;
40448}
40449LIFECYCLE_HOOKS.forEach(function (hook) {
40450    strats[hook] = mergeLifecycleHook;
40451});
40452/**
40453 * Assets
40454 *
40455 * When a vm is present (instance creation), we need to do
40456 * a three-way merge between constructor options, instance
40457 * options and parent options.
40458 */
40459function mergeAssets(parentVal, childVal, vm, key) {
40460    var res = Object.create(parentVal || null);
40461    if (childVal) {
40462         true && assertObjectType(key, childVal, vm);
40463        return extend(res, childVal);
40464    }
40465    else {
40466        return res;
40467    }
40468}
40469ASSET_TYPES.forEach(function (type) {
40470    strats[type + 's'] = mergeAssets;
40471});
40472/**
40473 * Watchers.
40474 *
40475 * Watchers hashes should not overwrite one
40476 * another, so we merge them as arrays.
40477 */
40478strats.watch = function (parentVal, childVal, vm, key) {
40479    // work around Firefox's Object.prototype.watch...
40480    //@ts-expect-error work around
40481    if (parentVal === nativeWatch)
40482        parentVal = undefined;
40483    //@ts-expect-error work around
40484    if (childVal === nativeWatch)
40485        childVal = undefined;
40486    /* istanbul ignore if */
40487    if (!childVal)
40488        return Object.create(parentVal || null);
40489    if (true) {
40490        assertObjectType(key, childVal, vm);
40491    }
40492    if (!parentVal)
40493        return childVal;
40494    var ret = {};
40495    extend(ret, parentVal);
40496    for (var key_1 in childVal) {
40497        var parent_1 = ret[key_1];
40498        var child = childVal[key_1];
40499        if (parent_1 && !isArray(parent_1)) {
40500            parent_1 = [parent_1];
40501        }
40502        ret[key_1] = parent_1 ? parent_1.concat(child) : isArray(child) ? child : [child];
40503    }
40504    return ret;
40505};
40506/**
40507 * Other object hashes.
40508 */
40509strats.props =
40510    strats.methods =
40511        strats.inject =
40512            strats.computed =
40513                function (parentVal, childVal, vm, key) {
40514                    if (childVal && "development" !== 'production') {
40515                        assertObjectType(key, childVal, vm);
40516                    }
40517                    if (!parentVal)
40518                        return childVal;
40519                    var ret = Object.create(null);
40520                    extend(ret, parentVal);
40521                    if (childVal)
40522                        extend(ret, childVal);
40523                    return ret;
40524                };
40525strats.provide = mergeDataOrFn;
40526/**
40527 * Default strategy.
40528 */
40529var defaultStrat = function (parentVal, childVal) {
40530    return childVal === undefined ? parentVal : childVal;
40531};
40532/**
40533 * Validate component names
40534 */
40535function checkComponents(options) {
40536    for (var key in options.components) {
40537        validateComponentName(key);
40538    }
40539}
40540function validateComponentName(name) {
40541    if (!new RegExp("^[a-zA-Z][\\-\\.0-9_".concat(unicodeRegExp.source, "]*$")).test(name)) {
40542        warn$2('Invalid component name: "' +
40543            name +
40544            '". Component names ' +
40545            'should conform to valid custom element name in html5 specification.');
40546    }
40547    if (isBuiltInTag(name) || config.isReservedTag(name)) {
40548        warn$2('Do not use built-in or reserved HTML elements as component ' +
40549            'id: ' +
40550            name);
40551    }
40552}
40553/**
40554 * Ensure all props option syntax are normalized into the
40555 * Object-based format.
40556 */
40557function normalizeProps(options, vm) {
40558    var props = options.props;
40559    if (!props)
40560        return;
40561    var res = {};
40562    var i, val, name;
40563    if (isArray(props)) {
40564        i = props.length;
40565        while (i--) {
40566            val = props[i];
40567            if (typeof val === 'string') {
40568                name = camelize(val);
40569                res[name] = { type: null };
40570            }
40571            else if (true) {
40572                warn$2('props must be strings when using array syntax.');
40573            }
40574        }
40575    }
40576    else if (isPlainObject(props)) {
40577        for (var key in props) {
40578            val = props[key];
40579            name = camelize(key);
40580            res[name] = isPlainObject(val) ? val : { type: val };
40581        }
40582    }
40583    else if (true) {
40584        warn$2("Invalid value for option \"props\": expected an Array or an Object, " +
40585            "but got ".concat(toRawType(props), "."), vm);
40586    }
40587    options.props = res;
40588}
40589/**
40590 * Normalize all injections into Object-based format
40591 */
40592function normalizeInject(options, vm) {
40593    var inject = options.inject;
40594    if (!inject)
40595        return;
40596    var normalized = (options.inject = {});
40597    if (isArray(inject)) {
40598        for (var i = 0; i < inject.length; i++) {
40599            normalized[inject[i]] = { from: inject[i] };
40600        }
40601    }
40602    else if (isPlainObject(inject)) {
40603        for (var key in inject) {
40604            var val = inject[key];
40605            normalized[key] = isPlainObject(val)
40606                ? extend({ from: key }, val)
40607                : { from: val };
40608        }
40609    }
40610    else if (true) {
40611        warn$2("Invalid value for option \"inject\": expected an Array or an Object, " +
40612            "but got ".concat(toRawType(inject), "."), vm);
40613    }
40614}
40615/**
40616 * Normalize raw function directives into object format.
40617 */
40618function normalizeDirectives$1(options) {
40619    var dirs = options.directives;
40620    if (dirs) {
40621        for (var key in dirs) {
40622            var def = dirs[key];
40623            if (isFunction(def)) {
40624                dirs[key] = { bind: def, update: def };
40625            }
40626        }
40627    }
40628}
40629function assertObjectType(name, value, vm) {
40630    if (!isPlainObject(value)) {
40631        warn$2("Invalid value for option \"".concat(name, "\": expected an Object, ") +
40632            "but got ".concat(toRawType(value), "."), vm);
40633    }
40634}
40635/**
40636 * Merge two option objects into a new one.
40637 * Core utility used in both instantiation and inheritance.
40638 */
40639function mergeOptions(parent, child, vm) {
40640    if (true) {
40641        checkComponents(child);
40642    }
40643    if (isFunction(child)) {
40644        // @ts-expect-error
40645        child = child.options;
40646    }
40647    normalizeProps(child, vm);
40648    normalizeInject(child, vm);
40649    normalizeDirectives$1(child);
40650    // Apply extends and mixins on the child options,
40651    // but only if it is a raw options object that isn't
40652    // the result of another mergeOptions call.
40653    // Only merged options has the _base property.
40654    if (!child._base) {
40655        if (child.extends) {
40656            parent = mergeOptions(parent, child.extends, vm);
40657        }
40658        if (child.mixins) {
40659            for (var i = 0, l = child.mixins.length; i < l; i++) {
40660                parent = mergeOptions(parent, child.mixins[i], vm);
40661            }
40662        }
40663    }
40664    var options = {};
40665    var key;
40666    for (key in parent) {
40667        mergeField(key);
40668    }
40669    for (key in child) {
40670        if (!hasOwn(parent, key)) {
40671            mergeField(key);
40672        }
40673    }
40674    function mergeField(key) {
40675        var strat = strats[key] || defaultStrat;
40676        options[key] = strat(parent[key], child[key], vm, key);
40677    }
40678    return options;
40679}
40680/**
40681 * Resolve an asset.
40682 * This function is used because child instances need access
40683 * to assets defined in its ancestor chain.
40684 */
40685function resolveAsset(options, type, id, warnMissing) {
40686    /* istanbul ignore if */
40687    if (typeof id !== 'string') {
40688        return;
40689    }
40690    var assets = options[type];
40691    // check local registration variations first
40692    if (hasOwn(assets, id))
40693        return assets[id];
40694    var camelizedId = camelize(id);
40695    if (hasOwn(assets, camelizedId))
40696        return assets[camelizedId];
40697    var PascalCaseId = capitalize(camelizedId);
40698    if (hasOwn(assets, PascalCaseId))
40699        return assets[PascalCaseId];
40700    // fallback to prototype chain
40701    var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
40702    if ( true && warnMissing && !res) {
40703        warn$2('Failed to resolve ' + type.slice(0, -1) + ': ' + id);
40704    }
40705    return res;
40706}
40707
40708function validateProp(key, propOptions, propsData, vm) {
40709    var prop = propOptions[key];
40710    var absent = !hasOwn(propsData, key);
40711    var value = propsData[key];
40712    // boolean casting
40713    var booleanIndex = getTypeIndex(Boolean, prop.type);
40714    if (booleanIndex > -1) {
40715        if (absent && !hasOwn(prop, 'default')) {
40716            value = false;
40717        }
40718        else if (value === '' || value === hyphenate(key)) {
40719            // only cast empty string / same name to boolean if
40720            // boolean has higher priority
40721            var stringIndex = getTypeIndex(String, prop.type);
40722            if (stringIndex < 0 || booleanIndex < stringIndex) {
40723                value = true;
40724            }
40725        }
40726    }
40727    // check default value
40728    if (value === undefined) {
40729        value = getPropDefaultValue(vm, prop, key);
40730        // since the default value is a fresh copy,
40731        // make sure to observe it.
40732        var prevShouldObserve = shouldObserve;
40733        toggleObserving(true);
40734        observe(value);
40735        toggleObserving(prevShouldObserve);
40736    }
40737    if (true) {
40738        assertProp(prop, key, value, vm, absent);
40739    }
40740    return value;
40741}
40742/**
40743 * Get the default value of a prop.
40744 */
40745function getPropDefaultValue(vm, prop, key) {
40746    // no default, return undefined
40747    if (!hasOwn(prop, 'default')) {
40748        return undefined;
40749    }
40750    var def = prop.default;
40751    // warn against non-factory defaults for Object & Array
40752    if ( true && isObject(def)) {
40753        warn$2('Invalid default value for prop "' +
40754            key +
40755            '": ' +
40756            'Props with type Object/Array must use a factory function ' +
40757            'to return the default value.', vm);
40758    }
40759    // the raw prop value was also undefined from previous render,
40760    // return previous default value to avoid unnecessary watcher trigger
40761    if (vm &&
40762        vm.$options.propsData &&
40763        vm.$options.propsData[key] === undefined &&
40764        vm._props[key] !== undefined) {
40765        return vm._props[key];
40766    }
40767    // call factory function for non-Function types
40768    // a value is Function if its prototype is function even across different execution context
40769    return isFunction(def) && getType(prop.type) !== 'Function'
40770        ? def.call(vm)
40771        : def;
40772}
40773/**
40774 * Assert whether a prop is valid.
40775 */
40776function assertProp(prop, name, value, vm, absent) {
40777    if (prop.required && absent) {
40778        warn$2('Missing required prop: "' + name + '"', vm);
40779        return;
40780    }
40781    if (value == null && !prop.required) {
40782        return;
40783    }
40784    var type = prop.type;
40785    var valid = !type || type === true;
40786    var expectedTypes = [];
40787    if (type) {
40788        if (!isArray(type)) {
40789            type = [type];
40790        }
40791        for (var i = 0; i < type.length && !valid; i++) {
40792            var assertedType = assertType(value, type[i], vm);
40793            expectedTypes.push(assertedType.expectedType || '');
40794            valid = assertedType.valid;
40795        }
40796    }
40797    var haveExpectedTypes = expectedTypes.some(function (t) { return t; });
40798    if (!valid && haveExpectedTypes) {
40799        warn$2(getInvalidTypeMessage(name, value, expectedTypes), vm);
40800        return;
40801    }
40802    var validator = prop.validator;
40803    if (validator) {
40804        if (!validator(value)) {
40805            warn$2('Invalid prop: custom validator check failed for prop "' + name + '".', vm);
40806        }
40807    }
40808}
40809var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;
40810function assertType(value, type, vm) {
40811    var valid;
40812    var expectedType = getType(type);
40813    if (simpleCheckRE.test(expectedType)) {
40814        var t = typeof value;
40815        valid = t === expectedType.toLowerCase();
40816        // for primitive wrapper objects
40817        if (!valid && t === 'object') {
40818            valid = value instanceof type;
40819        }
40820    }
40821    else if (expectedType === 'Object') {
40822        valid = isPlainObject(value);
40823    }
40824    else if (expectedType === 'Array') {
40825        valid = isArray(value);
40826    }
40827    else {
40828        try {
40829            valid = value instanceof type;
40830        }
40831        catch (e) {
40832            warn$2('Invalid prop type: "' + String(type) + '" is not a constructor', vm);
40833            valid = false;
40834        }
40835    }
40836    return {
40837        valid: valid,
40838        expectedType: expectedType
40839    };
40840}
40841var functionTypeCheckRE = /^\s*function (\w+)/;
40842/**
40843 * Use function string name to check built-in types,
40844 * because a simple equality check will fail when running
40845 * across different vms / iframes.
40846 */
40847function getType(fn) {
40848    var match = fn && fn.toString().match(functionTypeCheckRE);
40849    return match ? match[1] : '';
40850}
40851function isSameType(a, b) {
40852    return getType(a) === getType(b);
40853}
40854function getTypeIndex(type, expectedTypes) {
40855    if (!isArray(expectedTypes)) {
40856        return isSameType(expectedTypes, type) ? 0 : -1;
40857    }
40858    for (var i = 0, len = expectedTypes.length; i < len; i++) {
40859        if (isSameType(expectedTypes[i], type)) {
40860            return i;
40861        }
40862    }
40863    return -1;
40864}
40865function getInvalidTypeMessage(name, value, expectedTypes) {
40866    var message = "Invalid prop: type check failed for prop \"".concat(name, "\".") +
40867        " Expected ".concat(expectedTypes.map(capitalize).join(', '));
40868    var expectedType = expectedTypes[0];
40869    var receivedType = toRawType(value);
40870    // check if we need to specify expected value
40871    if (expectedTypes.length === 1 &&
40872        isExplicable(expectedType) &&
40873        isExplicable(typeof value) &&
40874        !isBoolean(expectedType, receivedType)) {
40875        message += " with value ".concat(styleValue(value, expectedType));
40876    }
40877    message += ", got ".concat(receivedType, " ");
40878    // check if we need to specify received value
40879    if (isExplicable(receivedType)) {
40880        message += "with value ".concat(styleValue(value, receivedType), ".");
40881    }
40882    return message;
40883}
40884function styleValue(value, type) {
40885    if (type === 'String') {
40886        return "\"".concat(value, "\"");
40887    }
40888    else if (type === 'Number') {
40889        return "".concat(Number(value));
40890    }
40891    else {
40892        return "".concat(value);
40893    }
40894}
40895var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];
40896function isExplicable(value) {
40897    return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; });
40898}
40899function isBoolean() {
40900    var args = [];
40901    for (var _i = 0; _i < arguments.length; _i++) {
40902        args[_i] = arguments[_i];
40903    }
40904    return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; });
40905}
40906
40907function Vue(options) {
40908    if ( true && !(this instanceof Vue)) {
40909        warn$2('Vue is a constructor and should be called with the `new` keyword');
40910    }
40911    this._init(options);
40912}
40913//@ts-expect-error Vue has function type
40914initMixin$1(Vue);
40915//@ts-expect-error Vue has function type
40916stateMixin(Vue);
40917//@ts-expect-error Vue has function type
40918eventsMixin(Vue);
40919//@ts-expect-error Vue has function type
40920lifecycleMixin(Vue);
40921//@ts-expect-error Vue has function type
40922renderMixin(Vue);
40923
40924function initUse(Vue) {
40925    Vue.use = function (plugin) {
40926        var installedPlugins = this._installedPlugins || (this._installedPlugins = []);
40927        if (installedPlugins.indexOf(plugin) > -1) {
40928            return this;
40929        }
40930        // additional parameters
40931        var args = toArray(arguments, 1);
40932        args.unshift(this);
40933        if (isFunction(plugin.install)) {
40934            plugin.install.apply(plugin, args);
40935        }
40936        else if (isFunction(plugin)) {
40937            plugin.apply(null, args);
40938        }
40939        installedPlugins.push(plugin);
40940        return this;
40941    };
40942}
40943
40944function initMixin(Vue) {
40945    Vue.mixin = function (mixin) {
40946        this.options = mergeOptions(this.options, mixin);
40947        return this;
40948    };
40949}
40950
40951function initExtend(Vue) {
40952    /**
40953     * Each instance constructor, including Vue, has a unique
40954     * cid. This enables us to create wrapped "child
40955     * constructors" for prototypal inheritance and cache them.
40956     */
40957    Vue.cid = 0;
40958    var cid = 1;
40959    /**
40960     * Class inheritance
40961     */
40962    Vue.extend = function (extendOptions) {
40963        extendOptions = extendOptions || {};
40964        var Super = this;
40965        var SuperId = Super.cid;
40966        var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
40967        if (cachedCtors[SuperId]) {
40968            return cachedCtors[SuperId];
40969        }
40970        var name = getComponentName(extendOptions) || getComponentName(Super.options);
40971        if ( true && name) {
40972            validateComponentName(name);
40973        }
40974        var Sub = function VueComponent(options) {
40975            this._init(options);
40976        };
40977        Sub.prototype = Object.create(Super.prototype);
40978        Sub.prototype.constructor = Sub;
40979        Sub.cid = cid++;
40980        Sub.options = mergeOptions(Super.options, extendOptions);
40981        Sub['super'] = Super;
40982        // For props and computed properties, we define the proxy getters on
40983        // the Vue instances at extension time, on the extended prototype. This
40984        // avoids Object.defineProperty calls for each instance created.
40985        if (Sub.options.props) {
40986            initProps(Sub);
40987        }
40988        if (Sub.options.computed) {
40989            initComputed(Sub);
40990        }
40991        // allow further extension/mixin/plugin usage
40992        Sub.extend = Super.extend;
40993        Sub.mixin = Super.mixin;
40994        Sub.use = Super.use;
40995        // create asset registers, so extended classes
40996        // can have their private assets too.
40997        ASSET_TYPES.forEach(function (type) {
40998            Sub[type] = Super[type];
40999        });
41000        // enable recursive self-lookup
41001        if (name) {
41002            Sub.options.components[name] = Sub;
41003        }
41004        // keep a reference to the super options at extension time.
41005        // later at instantiation we can check if Super's options have
41006        // been updated.
41007        Sub.superOptions = Super.options;
41008        Sub.extendOptions = extendOptions;
41009        Sub.sealedOptions = extend({}, Sub.options);
41010        // cache constructor
41011        cachedCtors[SuperId] = Sub;
41012        return Sub;
41013    };
41014}
41015function initProps(Comp) {
41016    var props = Comp.options.props;
41017    for (var key in props) {
41018        proxy(Comp.prototype, "_props", key);
41019    }
41020}
41021function initComputed(Comp) {
41022    var computed = Comp.options.computed;
41023    for (var key in computed) {
41024        defineComputed(Comp.prototype, key, computed[key]);
41025    }
41026}
41027
41028function initAssetRegisters(Vue) {
41029    /**
41030     * Create asset registration methods.
41031     */
41032    ASSET_TYPES.forEach(function (type) {
41033        // @ts-expect-error function is not exact same type
41034        Vue[type] = function (id, definition) {
41035            if (!definition) {
41036                return this.options[type + 's'][id];
41037            }
41038            else {
41039                /* istanbul ignore if */
41040                if ( true && type === 'component') {
41041                    validateComponentName(id);
41042                }
41043                if (type === 'component' && isPlainObject(definition)) {
41044                    // @ts-expect-error
41045                    definition.name = definition.name || id;
41046                    definition = this.options._base.extend(definition);
41047                }
41048                if (type === 'directive' && isFunction(definition)) {
41049                    definition = { bind: definition, update: definition };
41050                }
41051                this.options[type + 's'][id] = definition;
41052                return definition;
41053            }
41054        };
41055    });
41056}
41057
41058function _getComponentName(opts) {
41059    return opts && (getComponentName(opts.Ctor.options) || opts.tag);
41060}
41061function matches(pattern, name) {
41062    if (isArray(pattern)) {
41063        return pattern.indexOf(name) > -1;
41064    }
41065    else if (typeof pattern === 'string') {
41066        return pattern.split(',').indexOf(name) > -1;
41067    }
41068    else if (isRegExp(pattern)) {
41069        return pattern.test(name);
41070    }
41071    /* istanbul ignore next */
41072    return false;
41073}
41074function pruneCache(keepAliveInstance, filter) {
41075    var cache = keepAliveInstance.cache, keys = keepAliveInstance.keys, _vnode = keepAliveInstance._vnode;
41076    for (var key in cache) {
41077        var entry = cache[key];
41078        if (entry) {
41079            var name_1 = entry.name;
41080            if (name_1 && !filter(name_1)) {
41081                pruneCacheEntry(cache, key, keys, _vnode);
41082            }
41083        }
41084    }
41085}
41086function pruneCacheEntry(cache, key, keys, current) {
41087    var entry = cache[key];
41088    if (entry && (!current || entry.tag !== current.tag)) {
41089        // @ts-expect-error can be undefined
41090        entry.componentInstance.$destroy();
41091    }
41092    cache[key] = null;
41093    remove$2(keys, key);
41094}
41095var patternTypes = [String, RegExp, Array];
41096// TODO defineComponent
41097var KeepAlive = {
41098    name: 'keep-alive',
41099    abstract: true,
41100    props: {
41101        include: patternTypes,
41102        exclude: patternTypes,
41103        max: [String, Number]
41104    },
41105    methods: {
41106        cacheVNode: function () {
41107            var _a = this, cache = _a.cache, keys = _a.keys, vnodeToCache = _a.vnodeToCache, keyToCache = _a.keyToCache;
41108            if (vnodeToCache) {
41109                var tag = vnodeToCache.tag, componentInstance = vnodeToCache.componentInstance, componentOptions = vnodeToCache.componentOptions;
41110                cache[keyToCache] = {
41111                    name: _getComponentName(componentOptions),
41112                    tag: tag,
41113                    componentInstance: componentInstance
41114                };
41115                keys.push(keyToCache);
41116                // prune oldest entry
41117                if (this.max && keys.length > parseInt(this.max)) {
41118                    pruneCacheEntry(cache, keys[0], keys, this._vnode);
41119                }
41120                this.vnodeToCache = null;
41121            }
41122        }
41123    },
41124    created: function () {
41125        this.cache = Object.create(null);
41126        this.keys = [];
41127    },
41128    destroyed: function () {
41129        for (var key in this.cache) {
41130            pruneCacheEntry(this.cache, key, this.keys);
41131        }
41132    },
41133    mounted: function () {
41134        var _this = this;
41135        this.cacheVNode();
41136        this.$watch('include', function (val) {
41137            pruneCache(_this, function (name) { return matches(val, name); });
41138        });
41139        this.$watch('exclude', function (val) {
41140            pruneCache(_this, function (name) { return !matches(val, name); });
41141        });
41142    },
41143    updated: function () {
41144        this.cacheVNode();
41145    },
41146    render: function () {
41147        var slot = this.$slots.default;
41148        var vnode = getFirstComponentChild(slot);
41149        var componentOptions = vnode && vnode.componentOptions;
41150        if (componentOptions) {
41151            // check pattern
41152            var name_2 = _getComponentName(componentOptions);
41153            var _a = this, include = _a.include, exclude = _a.exclude;
41154            if (
41155            // not included
41156            (include && (!name_2 || !matches(include, name_2))) ||
41157                // excluded
41158                (exclude && name_2 && matches(exclude, name_2))) {
41159                return vnode;
41160            }
41161            var _b = this, cache = _b.cache, keys = _b.keys;
41162            var key = vnode.key == null
41163                ? // same constructor may get registered as different local components
41164                    // so cid alone is not enough (#3269)
41165                    componentOptions.Ctor.cid +
41166                        (componentOptions.tag ? "::".concat(componentOptions.tag) : '')
41167                : vnode.key;
41168            if (cache[key]) {
41169                vnode.componentInstance = cache[key].componentInstance;
41170                // make current key freshest
41171                remove$2(keys, key);
41172                keys.push(key);
41173            }
41174            else {
41175                // delay setting the cache until update
41176                this.vnodeToCache = vnode;
41177                this.keyToCache = key;
41178            }
41179            // @ts-expect-error can vnode.data can be undefined
41180            vnode.data.keepAlive = true;
41181        }
41182        return vnode || (slot && slot[0]);
41183    }
41184};
41185
41186var builtInComponents = {
41187    KeepAlive: KeepAlive
41188};
41189
41190function initGlobalAPI(Vue) {
41191    // config
41192    var configDef = {};
41193    configDef.get = function () { return config; };
41194    if (true) {
41195        configDef.set = function () {
41196            warn$2('Do not replace the Vue.config object, set individual fields instead.');
41197        };
41198    }
41199    Object.defineProperty(Vue, 'config', configDef);
41200    // exposed util methods.
41201    // NOTE: these are not considered part of the public API - avoid relying on
41202    // them unless you are aware of the risk.
41203    Vue.util = {
41204        warn: warn$2,
41205        extend: extend,
41206        mergeOptions: mergeOptions,
41207        defineReactive: defineReactive
41208    };
41209    Vue.set = set;
41210    Vue.delete = del;
41211    Vue.nextTick = nextTick;
41212    // 2.6 explicit observable API
41213    Vue.observable = function (obj) {
41214        observe(obj);
41215        return obj;
41216    };
41217    Vue.options = Object.create(null);
41218    ASSET_TYPES.forEach(function (type) {
41219        Vue.options[type + 's'] = Object.create(null);
41220    });
41221    // this is used to identify the "base" constructor to extend all plain-object
41222    // components with in Weex's multi-instance scenarios.
41223    Vue.options._base = Vue;
41224    extend(Vue.options.components, builtInComponents);
41225    initUse(Vue);
41226    initMixin(Vue);
41227    initExtend(Vue);
41228    initAssetRegisters(Vue);
41229}
41230
41231initGlobalAPI(Vue);
41232Object.defineProperty(Vue.prototype, '$isServer', {
41233    get: isServerRendering
41234});
41235Object.defineProperty(Vue.prototype, '$ssrContext', {
41236    get: function () {
41237        /* istanbul ignore next */
41238        return this.$vnode && this.$vnode.ssrContext;
41239    }
41240});
41241// expose FunctionalRenderContext for ssr runtime helper installation
41242Object.defineProperty(Vue, 'FunctionalRenderContext', {
41243    value: FunctionalRenderContext
41244});
41245Vue.version = version;
41246
41247// these are reserved for web because they are directly compiled away
41248// during template compilation
41249var isReservedAttr = makeMap('style,class');
41250// attributes that should be using props for binding
41251var acceptValue = makeMap('input,textarea,option,select,progress');
41252var mustUseProp = function (tag, type, attr) {
41253    return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||
41254        (attr === 'selected' && tag === 'option') ||
41255        (attr === 'checked' && tag === 'input') ||
41256        (attr === 'muted' && tag === 'video'));
41257};
41258var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
41259var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
41260var convertEnumeratedValue = function (key, value) {
41261    return isFalsyAttrValue(value) || value === 'false'
41262        ? 'false'
41263        : // allow arbitrary string value for contenteditable
41264            key === 'contenteditable' && isValidContentEditableValue(value)
41265                ? value
41266                : 'true';
41267};
41268var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
41269    'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
41270    'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
41271    'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
41272    'required,reversed,scoped,seamless,selected,sortable,' +
41273    'truespeed,typemustmatch,visible');
41274var xlinkNS = 'http://www.w3.org/1999/xlink';
41275var isXlink = function (name) {
41276    return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';
41277};
41278var getXlinkProp = function (name) {
41279    return isXlink(name) ? name.slice(6, name.length) : '';
41280};
41281var isFalsyAttrValue = function (val) {
41282    return val == null || val === false;
41283};
41284
41285function genClassForVnode(vnode) {
41286    var data = vnode.data;
41287    var parentNode = vnode;
41288    var childNode = vnode;
41289    while (isDef(childNode.componentInstance)) {
41290        childNode = childNode.componentInstance._vnode;
41291        if (childNode && childNode.data) {
41292            data = mergeClassData(childNode.data, data);
41293        }
41294    }
41295    // @ts-expect-error parentNode.parent not VNodeWithData
41296    while (isDef((parentNode = parentNode.parent))) {
41297        if (parentNode && parentNode.data) {
41298            data = mergeClassData(data, parentNode.data);
41299        }
41300    }
41301    return renderClass(data.staticClass, data.class);
41302}
41303function mergeClassData(child, parent) {
41304    return {
41305        staticClass: concat(child.staticClass, parent.staticClass),
41306        class: isDef(child.class) ? [child.class, parent.class] : parent.class
41307    };
41308}
41309function renderClass(staticClass, dynamicClass) {
41310    if (isDef(staticClass) || isDef(dynamicClass)) {
41311        return concat(staticClass, stringifyClass(dynamicClass));
41312    }
41313    /* istanbul ignore next */
41314    return '';
41315}
41316function concat(a, b) {
41317    return a ? (b ? a + ' ' + b : a) : b || '';
41318}
41319function stringifyClass(value) {
41320    if (Array.isArray(value)) {
41321        return stringifyArray(value);
41322    }
41323    if (isObject(value)) {
41324        return stringifyObject(value);
41325    }
41326    if (typeof value === 'string') {
41327        return value;
41328    }
41329    /* istanbul ignore next */
41330    return '';
41331}
41332function stringifyArray(value) {
41333    var res = '';
41334    var stringified;
41335    for (var i = 0, l = value.length; i < l; i++) {
41336        if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {
41337            if (res)
41338                res += ' ';
41339            res += stringified;
41340        }
41341    }
41342    return res;
41343}
41344function stringifyObject(value) {
41345    var res = '';
41346    for (var key in value) {
41347        if (value[key]) {
41348            if (res)
41349                res += ' ';
41350            res += key;
41351        }
41352    }
41353    return res;
41354}
41355
41356var namespaceMap = {
41357    svg: 'http://www.w3.org/2000/svg',
41358    math: 'http://www.w3.org/1998/Math/MathML'
41359};
41360var isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +
41361    'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
41362    'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
41363    'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
41364    's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
41365    'embed,object,param,source,canvas,script,noscript,del,ins,' +
41366    'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
41367    'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
41368    'output,progress,select,textarea,' +
41369    'details,dialog,menu,menuitem,summary,' +
41370    'content,element,shadow,template,blockquote,iframe,tfoot');
41371// this map is intentionally selective, only covering SVG elements that may
41372// contain child elements.
41373var isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
41374    'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
41375    'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);
41376var isPreTag = function (tag) { return tag === 'pre'; };
41377var isReservedTag = function (tag) {
41378    return isHTMLTag(tag) || isSVG(tag);
41379};
41380function getTagNamespace(tag) {
41381    if (isSVG(tag)) {
41382        return 'svg';
41383    }
41384    // basic support for MathML
41385    // note it doesn't support other MathML elements being component roots
41386    if (tag === 'math') {
41387        return 'math';
41388    }
41389}
41390var unknownElementCache = Object.create(null);
41391function isUnknownElement(tag) {
41392    /* istanbul ignore if */
41393    if (!inBrowser) {
41394        return true;
41395    }
41396    if (isReservedTag(tag)) {
41397        return false;
41398    }
41399    tag = tag.toLowerCase();
41400    /* istanbul ignore if */
41401    if (unknownElementCache[tag] != null) {
41402        return unknownElementCache[tag];
41403    }
41404    var el = document.createElement(tag);
41405    if (tag.indexOf('-') > -1) {
41406        // http://stackoverflow.com/a/28210364/1070244
41407        return (unknownElementCache[tag] =
41408            el.constructor === window.HTMLUnknownElement ||
41409                el.constructor === window.HTMLElement);
41410    }
41411    else {
41412        return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));
41413    }
41414}
41415var isTextInputType = makeMap('text,number,password,search,email,tel,url');
41416
41417/**
41418 * Query an element selector if it's not an element already.
41419 */
41420function query(el) {
41421    if (typeof el === 'string') {
41422        var selected = document.querySelector(el);
41423        if (!selected) {
41424             true && warn$2('Cannot find element: ' + el);
41425            return document.createElement('div');
41426        }
41427        return selected;
41428    }
41429    else {
41430        return el;
41431    }
41432}
41433
41434function createElement(tagName, vnode) {
41435    var elm = document.createElement(tagName);
41436    if (tagName !== 'select') {
41437        return elm;
41438    }
41439    // false or null will remove the attribute but undefined will not
41440    if (vnode.data &&
41441        vnode.data.attrs &&
41442        vnode.data.attrs.multiple !== undefined) {
41443        elm.setAttribute('multiple', 'multiple');
41444    }
41445    return elm;
41446}
41447function createElementNS(namespace, tagName) {
41448    return document.createElementNS(namespaceMap[namespace], tagName);
41449}
41450function createTextNode(text) {
41451    return document.createTextNode(text);
41452}
41453function createComment(text) {
41454    return document.createComment(text);
41455}
41456function insertBefore(parentNode, newNode, referenceNode) {
41457    parentNode.insertBefore(newNode, referenceNode);
41458}
41459function removeChild(node, child) {
41460    node.removeChild(child);
41461}
41462function appendChild(node, child) {
41463    node.appendChild(child);
41464}
41465function parentNode(node) {
41466    return node.parentNode;
41467}
41468function nextSibling(node) {
41469    return node.nextSibling;
41470}
41471function tagName(node) {
41472    return node.tagName;
41473}
41474function setTextContent(node, text) {
41475    node.textContent = text;
41476}
41477function setStyleScope(node, scopeId) {
41478    node.setAttribute(scopeId, '');
41479}
41480
41481var nodeOps = /*#__PURE__*/Object.freeze({
41482  __proto__: null,
41483  createElement: createElement,
41484  createElementNS: createElementNS,
41485  createTextNode: createTextNode,
41486  createComment: createComment,
41487  insertBefore: insertBefore,
41488  removeChild: removeChild,
41489  appendChild: appendChild,
41490  parentNode: parentNode,
41491  nextSibling: nextSibling,
41492  tagName: tagName,
41493  setTextContent: setTextContent,
41494  setStyleScope: setStyleScope
41495});
41496
41497var ref = {
41498    create: function (_, vnode) {
41499        registerRef(vnode);
41500    },
41501    update: function (oldVnode, vnode) {
41502        if (oldVnode.data.ref !== vnode.data.ref) {
41503            registerRef(oldVnode, true);
41504            registerRef(vnode);
41505        }
41506    },
41507    destroy: function (vnode) {
41508        registerRef(vnode, true);
41509    }
41510};
41511function registerRef(vnode, isRemoval) {
41512    var ref = vnode.data.ref;
41513    if (!isDef(ref))
41514        return;
41515    var vm = vnode.context;
41516    var refValue = vnode.componentInstance || vnode.elm;
41517    var value = isRemoval ? null : refValue;
41518    var $refsValue = isRemoval ? undefined : refValue;
41519    if (isFunction(ref)) {
41520        invokeWithErrorHandling(ref, vm, [value], vm, "template ref function");
41521        return;
41522    }
41523    var isFor = vnode.data.refInFor;
41524    var _isString = typeof ref === 'string' || typeof ref === 'number';
41525    var _isRef = isRef(ref);
41526    var refs = vm.$refs;
41527    if (_isString || _isRef) {
41528        if (isFor) {
41529            var existing = _isString ? refs[ref] : ref.value;
41530            if (isRemoval) {
41531                isArray(existing) && remove$2(existing, refValue);
41532            }
41533            else {
41534                if (!isArray(existing)) {
41535                    if (_isString) {
41536                        refs[ref] = [refValue];
41537                        setSetupRef(vm, ref, refs[ref]);
41538                    }
41539                    else {
41540                        ref.value = [refValue];
41541                    }
41542                }
41543                else if (!existing.includes(refValue)) {
41544                    existing.push(refValue);
41545                }
41546            }
41547        }
41548        else if (_isString) {
41549            if (isRemoval && refs[ref] !== refValue) {
41550                return;
41551            }
41552            refs[ref] = $refsValue;
41553            setSetupRef(vm, ref, value);
41554        }
41555        else if (_isRef) {
41556            if (isRemoval && ref.value !== refValue) {
41557                return;
41558            }
41559            ref.value = value;
41560        }
41561        else if (true) {
41562            warn$2("Invalid template ref type: ".concat(typeof ref));
41563        }
41564    }
41565}
41566function setSetupRef(_a, key, val) {
41567    var _setupState = _a._setupState;
41568    if (_setupState && hasOwn(_setupState, key)) {
41569        if (isRef(_setupState[key])) {
41570            _setupState[key].value = val;
41571        }
41572        else {
41573            _setupState[key] = val;
41574        }
41575    }
41576}
41577
41578/**
41579 * Virtual DOM patching algorithm based on Snabbdom by
41580 * Simon Friis Vindum (@paldepind)
41581 * Licensed under the MIT License
41582 * https://github.com/paldepind/snabbdom/blob/master/LICENSE
41583 *
41584 * modified by Evan You (@yyx990803)
41585 *
41586 * Not type-checking this because this file is perf-critical and the cost
41587 * of making flow understand it is not worth it.
41588 */
41589var emptyNode = new VNode('', {}, []);
41590var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
41591function sameVnode(a, b) {
41592    return (a.key === b.key &&
41593        a.asyncFactory === b.asyncFactory &&
41594        ((a.tag === b.tag &&
41595            a.isComment === b.isComment &&
41596            isDef(a.data) === isDef(b.data) &&
41597            sameInputType(a, b)) ||
41598            (isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));
41599}
41600function sameInputType(a, b) {
41601    if (a.tag !== 'input')
41602        return true;
41603    var i;
41604    var typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;
41605    var typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;
41606    return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));
41607}
41608function createKeyToOldIdx(children, beginIdx, endIdx) {
41609    var i, key;
41610    var map = {};
41611    for (i = beginIdx; i <= endIdx; ++i) {
41612        key = children[i].key;
41613        if (isDef(key))
41614            map[key] = i;
41615    }
41616    return map;
41617}
41618function createPatchFunction(backend) {
41619    var i, j;
41620    var cbs = {};
41621    var modules = backend.modules, nodeOps = backend.nodeOps;
41622    for (i = 0; i < hooks.length; ++i) {
41623        cbs[hooks[i]] = [];
41624        for (j = 0; j < modules.length; ++j) {
41625            if (isDef(modules[j][hooks[i]])) {
41626                cbs[hooks[i]].push(modules[j][hooks[i]]);
41627            }
41628        }
41629    }
41630    function emptyNodeAt(elm) {
41631        return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);
41632    }
41633    function createRmCb(childElm, listeners) {
41634        function remove() {
41635            if (--remove.listeners === 0) {
41636                removeNode(childElm);
41637            }
41638        }
41639        remove.listeners = listeners;
41640        return remove;
41641    }
41642    function removeNode(el) {
41643        var parent = nodeOps.parentNode(el);
41644        // element may have already been removed due to v-html / v-text
41645        if (isDef(parent)) {
41646            nodeOps.removeChild(parent, el);
41647        }
41648    }
41649    function isUnknownElement(vnode, inVPre) {
41650        return (!inVPre &&
41651            !vnode.ns &&
41652            !(config.ignoredElements.length &&
41653                config.ignoredElements.some(function (ignore) {
41654                    return isRegExp(ignore)
41655                        ? ignore.test(vnode.tag)
41656                        : ignore === vnode.tag;
41657                })) &&
41658            config.isUnknownElement(vnode.tag));
41659    }
41660    var creatingElmInVPre = 0;
41661    function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {
41662        if (isDef(vnode.elm) && isDef(ownerArray)) {
41663            // This vnode was used in a previous render!
41664            // now it's used as a new node, overwriting its elm would cause
41665            // potential patch errors down the road when it's used as an insertion
41666            // reference node. Instead, we clone the node on-demand before creating
41667            // associated DOM element for it.
41668            vnode = ownerArray[index] = cloneVNode(vnode);
41669        }
41670        vnode.isRootInsert = !nested; // for transition enter check
41671        if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
41672            return;
41673        }
41674        var data = vnode.data;
41675        var children = vnode.children;
41676        var tag = vnode.tag;
41677        if (isDef(tag)) {
41678            if (true) {
41679                if (data && data.pre) {
41680                    creatingElmInVPre++;
41681                }
41682                if (isUnknownElement(vnode, creatingElmInVPre)) {
41683                    warn$2('Unknown custom element: <' +
41684                        tag +
41685                        '> - did you ' +
41686                        'register the component correctly? For recursive components, ' +
41687                        'make sure to provide the "name" option.', vnode.context);
41688                }
41689            }
41690            vnode.elm = vnode.ns
41691                ? nodeOps.createElementNS(vnode.ns, tag)
41692                : nodeOps.createElement(tag, vnode);
41693            setScope(vnode);
41694            createChildren(vnode, children, insertedVnodeQueue);
41695            if (isDef(data)) {
41696                invokeCreateHooks(vnode, insertedVnodeQueue);
41697            }
41698            insert(parentElm, vnode.elm, refElm);
41699            if ( true && data && data.pre) {
41700                creatingElmInVPre--;
41701            }
41702        }
41703        else if (isTrue(vnode.isComment)) {
41704            vnode.elm = nodeOps.createComment(vnode.text);
41705            insert(parentElm, vnode.elm, refElm);
41706        }
41707        else {
41708            vnode.elm = nodeOps.createTextNode(vnode.text);
41709            insert(parentElm, vnode.elm, refElm);
41710        }
41711    }
41712    function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {
41713        var i = vnode.data;
41714        if (isDef(i)) {
41715            var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
41716            if (isDef((i = i.hook)) && isDef((i = i.init))) {
41717                i(vnode, false /* hydrating */);
41718            }
41719            // after calling the init hook, if the vnode is a child component
41720            // it should've created a child instance and mounted it. the child
41721            // component also has set the placeholder vnode's elm.
41722            // in that case we can just return the element and be done.
41723            if (isDef(vnode.componentInstance)) {
41724                initComponent(vnode, insertedVnodeQueue);
41725                insert(parentElm, vnode.elm, refElm);
41726                if (isTrue(isReactivated)) {
41727                    reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
41728                }
41729                return true;
41730            }
41731        }
41732    }
41733    function initComponent(vnode, insertedVnodeQueue) {
41734        if (isDef(vnode.data.pendingInsert)) {
41735            insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
41736            vnode.data.pendingInsert = null;
41737        }
41738        vnode.elm = vnode.componentInstance.$el;
41739        if (isPatchable(vnode)) {
41740            invokeCreateHooks(vnode, insertedVnodeQueue);
41741            setScope(vnode);
41742        }
41743        else {
41744            // empty component root.
41745            // skip all element-related modules except for ref (#3455)
41746            registerRef(vnode);
41747            // make sure to invoke the insert hook
41748            insertedVnodeQueue.push(vnode);
41749        }
41750    }
41751    function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {
41752        var i;
41753        // hack for #4339: a reactivated component with inner transition
41754        // does not trigger because the inner node's created hooks are not called
41755        // again. It's not ideal to involve module-specific logic in here but
41756        // there doesn't seem to be a better way to do it.
41757        var innerNode = vnode;
41758        while (innerNode.componentInstance) {
41759            innerNode = innerNode.componentInstance._vnode;
41760            if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {
41761                for (i = 0; i < cbs.activate.length; ++i) {
41762                    cbs.activate[i](emptyNode, innerNode);
41763                }
41764                insertedVnodeQueue.push(innerNode);
41765                break;
41766            }
41767        }
41768        // unlike a newly created component,
41769        // a reactivated keep-alive component doesn't insert itself
41770        insert(parentElm, vnode.elm, refElm);
41771    }
41772    function insert(parent, elm, ref) {
41773        if (isDef(parent)) {
41774            if (isDef(ref)) {
41775                if (nodeOps.parentNode(ref) === parent) {
41776                    nodeOps.insertBefore(parent, elm, ref);
41777                }
41778            }
41779            else {
41780                nodeOps.appendChild(parent, elm);
41781            }
41782        }
41783    }
41784    function createChildren(vnode, children, insertedVnodeQueue) {
41785        if (isArray(children)) {
41786            if (true) {
41787                checkDuplicateKeys(children);
41788            }
41789            for (var i_1 = 0; i_1 < children.length; ++i_1) {
41790                createElm(children[i_1], insertedVnodeQueue, vnode.elm, null, true, children, i_1);
41791            }
41792        }
41793        else if (isPrimitive(vnode.text)) {
41794            nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
41795        }
41796    }
41797    function isPatchable(vnode) {
41798        while (vnode.componentInstance) {
41799            vnode = vnode.componentInstance._vnode;
41800        }
41801        return isDef(vnode.tag);
41802    }
41803    function invokeCreateHooks(vnode, insertedVnodeQueue) {
41804        for (var i_2 = 0; i_2 < cbs.create.length; ++i_2) {
41805            cbs.create[i_2](emptyNode, vnode);
41806        }
41807        i = vnode.data.hook; // Reuse variable
41808        if (isDef(i)) {
41809            if (isDef(i.create))
41810                i.create(emptyNode, vnode);
41811            if (isDef(i.insert))
41812                insertedVnodeQueue.push(vnode);
41813        }
41814    }
41815    // set scope id attribute for scoped CSS.
41816    // this is implemented as a special case to avoid the overhead
41817    // of going through the normal attribute patching process.
41818    function setScope(vnode) {
41819        var i;
41820        if (isDef((i = vnode.fnScopeId))) {
41821            nodeOps.setStyleScope(vnode.elm, i);
41822        }
41823        else {
41824            var ancestor = vnode;
41825            while (ancestor) {
41826                if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {
41827                    nodeOps.setStyleScope(vnode.elm, i);
41828                }
41829                ancestor = ancestor.parent;
41830            }
41831        }
41832        // for slot content they should also get the scopeId from the host instance.
41833        if (isDef((i = activeInstance)) &&
41834            i !== vnode.context &&
41835            i !== vnode.fnContext &&
41836            isDef((i = i.$options._scopeId))) {
41837            nodeOps.setStyleScope(vnode.elm, i);
41838        }
41839    }
41840    function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
41841        for (; startIdx <= endIdx; ++startIdx) {
41842            createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);
41843        }
41844    }
41845    function invokeDestroyHook(vnode) {
41846        var i, j;
41847        var data = vnode.data;
41848        if (isDef(data)) {
41849            if (isDef((i = data.hook)) && isDef((i = i.destroy)))
41850                i(vnode);
41851            for (i = 0; i < cbs.destroy.length; ++i)
41852                cbs.destroy[i](vnode);
41853        }
41854        if (isDef((i = vnode.children))) {
41855            for (j = 0; j < vnode.children.length; ++j) {
41856                invokeDestroyHook(vnode.children[j]);
41857            }
41858        }
41859    }
41860    function removeVnodes(vnodes, startIdx, endIdx) {
41861        for (; startIdx <= endIdx; ++startIdx) {
41862            var ch = vnodes[startIdx];
41863            if (isDef(ch)) {
41864                if (isDef(ch.tag)) {
41865                    removeAndInvokeRemoveHook(ch);
41866                    invokeDestroyHook(ch);
41867                }
41868                else {
41869                    // Text node
41870                    removeNode(ch.elm);
41871                }
41872            }
41873        }
41874    }
41875    function removeAndInvokeRemoveHook(vnode, rm) {
41876        if (isDef(rm) || isDef(vnode.data)) {
41877            var i_3;
41878            var listeners = cbs.remove.length + 1;
41879            if (isDef(rm)) {
41880                // we have a recursively passed down rm callback
41881                // increase the listeners count
41882                rm.listeners += listeners;
41883            }
41884            else {
41885                // directly removing
41886                rm = createRmCb(vnode.elm, listeners);
41887            }
41888            // recursively invoke hooks on child component root node
41889            if (isDef((i_3 = vnode.componentInstance)) &&
41890                isDef((i_3 = i_3._vnode)) &&
41891                isDef(i_3.data)) {
41892                removeAndInvokeRemoveHook(i_3, rm);
41893            }
41894            for (i_3 = 0; i_3 < cbs.remove.length; ++i_3) {
41895                cbs.remove[i_3](vnode, rm);
41896            }
41897            if (isDef((i_3 = vnode.data.hook)) && isDef((i_3 = i_3.remove))) {
41898                i_3(vnode, rm);
41899            }
41900            else {
41901                rm();
41902            }
41903        }
41904        else {
41905            removeNode(vnode.elm);
41906        }
41907    }
41908    function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
41909        var oldStartIdx = 0;
41910        var newStartIdx = 0;
41911        var oldEndIdx = oldCh.length - 1;
41912        var oldStartVnode = oldCh[0];
41913        var oldEndVnode = oldCh[oldEndIdx];
41914        var newEndIdx = newCh.length - 1;
41915        var newStartVnode = newCh[0];
41916        var newEndVnode = newCh[newEndIdx];
41917        var oldKeyToIdx, idxInOld, vnodeToMove, refElm;
41918        // removeOnly is a special flag used only by <transition-group>
41919        // to ensure removed elements stay in correct relative positions
41920        // during leaving transitions
41921        var canMove = !removeOnly;
41922        if (true) {
41923            checkDuplicateKeys(newCh);
41924        }
41925        while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
41926            if (isUndef(oldStartVnode)) {
41927                oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
41928            }
41929            else if (isUndef(oldEndVnode)) {
41930                oldEndVnode = oldCh[--oldEndIdx];
41931            }
41932            else if (sameVnode(oldStartVnode, newStartVnode)) {
41933                patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
41934                oldStartVnode = oldCh[++oldStartIdx];
41935                newStartVnode = newCh[++newStartIdx];
41936            }
41937            else if (sameVnode(oldEndVnode, newEndVnode)) {
41938                patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
41939                oldEndVnode = oldCh[--oldEndIdx];
41940                newEndVnode = newCh[--newEndIdx];
41941            }
41942            else if (sameVnode(oldStartVnode, newEndVnode)) {
41943                // Vnode moved right
41944                patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
41945                canMove &&
41946                    nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
41947                oldStartVnode = oldCh[++oldStartIdx];
41948                newEndVnode = newCh[--newEndIdx];
41949            }
41950            else if (sameVnode(oldEndVnode, newStartVnode)) {
41951                // Vnode moved left
41952                patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
41953                canMove &&
41954                    nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
41955                oldEndVnode = oldCh[--oldEndIdx];
41956                newStartVnode = newCh[++newStartIdx];
41957            }
41958            else {
41959                if (isUndef(oldKeyToIdx))
41960                    oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
41961                idxInOld = isDef(newStartVnode.key)
41962                    ? oldKeyToIdx[newStartVnode.key]
41963                    : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
41964                if (isUndef(idxInOld)) {
41965                    // New element
41966                    createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
41967                }
41968                else {
41969                    vnodeToMove = oldCh[idxInOld];
41970                    if (sameVnode(vnodeToMove, newStartVnode)) {
41971                        patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
41972                        oldCh[idxInOld] = undefined;
41973                        canMove &&
41974                            nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
41975                    }
41976                    else {
41977                        // same key but different element. treat as new element
41978                        createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
41979                    }
41980                }
41981                newStartVnode = newCh[++newStartIdx];
41982            }
41983        }
41984        if (oldStartIdx > oldEndIdx) {
41985            refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
41986            addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
41987        }
41988        else if (newStartIdx > newEndIdx) {
41989            removeVnodes(oldCh, oldStartIdx, oldEndIdx);
41990        }
41991    }
41992    function checkDuplicateKeys(children) {
41993        var seenKeys = {};
41994        for (var i_4 = 0; i_4 < children.length; i_4++) {
41995            var vnode = children[i_4];
41996            var key = vnode.key;
41997            if (isDef(key)) {
41998                if (seenKeys[key]) {
41999                    warn$2("Duplicate keys detected: '".concat(key, "'. This may cause an update error."), vnode.context);
42000                }
42001                else {
42002                    seenKeys[key] = true;
42003                }
42004            }
42005        }
42006    }
42007    function findIdxInOld(node, oldCh, start, end) {
42008        for (var i_5 = start; i_5 < end; i_5++) {
42009            var c = oldCh[i_5];
42010            if (isDef(c) && sameVnode(node, c))
42011                return i_5;
42012        }
42013    }
42014    function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {
42015        if (oldVnode === vnode) {
42016            return;
42017        }
42018        if (isDef(vnode.elm) && isDef(ownerArray)) {
42019            // clone reused vnode
42020            vnode = ownerArray[index] = cloneVNode(vnode);
42021        }
42022        var elm = (vnode.elm = oldVnode.elm);
42023        if (isTrue(oldVnode.isAsyncPlaceholder)) {
42024            if (isDef(vnode.asyncFactory.resolved)) {
42025                hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
42026            }
42027            else {
42028                vnode.isAsyncPlaceholder = true;
42029            }
42030            return;
42031        }
42032        // reuse element for static trees.
42033        // note we only do this if the vnode is cloned -
42034        // if the new node is not cloned it means the render functions have been
42035        // reset by the hot-reload-api and we need to do a proper re-render.
42036        if (isTrue(vnode.isStatic) &&
42037            isTrue(oldVnode.isStatic) &&
42038            vnode.key === oldVnode.key &&
42039            (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {
42040            vnode.componentInstance = oldVnode.componentInstance;
42041            return;
42042        }
42043        var i;
42044        var data = vnode.data;
42045        if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {
42046            i(oldVnode, vnode);
42047        }
42048        var oldCh = oldVnode.children;
42049        var ch = vnode.children;
42050        if (isDef(data) && isPatchable(vnode)) {
42051            for (i = 0; i < cbs.update.length; ++i)
42052                cbs.update[i](oldVnode, vnode);
42053            if (isDef((i = data.hook)) && isDef((i = i.update)))
42054                i(oldVnode, vnode);
42055        }
42056        if (isUndef(vnode.text)) {
42057            if (isDef(oldCh) && isDef(ch)) {
42058                if (oldCh !== ch)
42059                    updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);
42060            }
42061            else if (isDef(ch)) {
42062                if (true) {
42063                    checkDuplicateKeys(ch);
42064                }
42065                if (isDef(oldVnode.text))
42066                    nodeOps.setTextContent(elm, '');
42067                addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
42068            }
42069            else if (isDef(oldCh)) {
42070                removeVnodes(oldCh, 0, oldCh.length - 1);
42071            }
42072            else if (isDef(oldVnode.text)) {
42073                nodeOps.setTextContent(elm, '');
42074            }
42075        }
42076        else if (oldVnode.text !== vnode.text) {
42077            nodeOps.setTextContent(elm, vnode.text);
42078        }
42079        if (isDef(data)) {
42080            if (isDef((i = data.hook)) && isDef((i = i.postpatch)))
42081                i(oldVnode, vnode);
42082        }
42083    }
42084    function invokeInsertHook(vnode, queue, initial) {
42085        // delay insert hooks for component root nodes, invoke them after the
42086        // element is really inserted
42087        if (isTrue(initial) && isDef(vnode.parent)) {
42088            vnode.parent.data.pendingInsert = queue;
42089        }
42090        else {
42091            for (var i_6 = 0; i_6 < queue.length; ++i_6) {
42092                queue[i_6].data.hook.insert(queue[i_6]);
42093            }
42094        }
42095    }
42096    var hydrationBailed = false;
42097    // list of modules that can skip create hook during hydration because they
42098    // are already rendered on the client or has no need for initialization
42099    // Note: style is excluded because it relies on initial clone for future
42100    // deep updates (#7063).
42101    var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');
42102    // Note: this is a browser-only function so we can assume elms are DOM nodes.
42103    function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {
42104        var i;
42105        var tag = vnode.tag, data = vnode.data, children = vnode.children;
42106        inVPre = inVPre || (data && data.pre);
42107        vnode.elm = elm;
42108        if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
42109            vnode.isAsyncPlaceholder = true;
42110            return true;
42111        }
42112        // assert node match
42113        if (true) {
42114            if (!assertNodeMatch(elm, vnode, inVPre)) {
42115                return false;
42116            }
42117        }
42118        if (isDef(data)) {
42119            if (isDef((i = data.hook)) && isDef((i = i.init)))
42120                i(vnode, true /* hydrating */);
42121            if (isDef((i = vnode.componentInstance))) {
42122                // child component. it should have hydrated its own tree.
42123                initComponent(vnode, insertedVnodeQueue);
42124                return true;
42125            }
42126        }
42127        if (isDef(tag)) {
42128            if (isDef(children)) {
42129                // empty element, allow client to pick up and populate children
42130                if (!elm.hasChildNodes()) {
42131                    createChildren(vnode, children, insertedVnodeQueue);
42132                }
42133                else {
42134                    // v-html and domProps: innerHTML
42135                    if (isDef((i = data)) &&
42136                        isDef((i = i.domProps)) &&
42137                        isDef((i = i.innerHTML))) {
42138                        if (i !== elm.innerHTML) {
42139                            /* istanbul ignore if */
42140                            if ( true &&
42141                                typeof console !== 'undefined' &&
42142                                !hydrationBailed) {
42143                                hydrationBailed = true;
42144                                console.warn('Parent: ', elm);
42145                                console.warn('server innerHTML: ', i);
42146                                console.warn('client innerHTML: ', elm.innerHTML);
42147                            }
42148                            return false;
42149                        }
42150                    }
42151                    else {
42152                        // iterate and compare children lists
42153                        var childrenMatch = true;
42154                        var childNode = elm.firstChild;
42155                        for (var i_7 = 0; i_7 < children.length; i_7++) {
42156                            if (!childNode ||
42157                                !hydrate(childNode, children[i_7], insertedVnodeQueue, inVPre)) {
42158                                childrenMatch = false;
42159                                break;
42160                            }
42161                            childNode = childNode.nextSibling;
42162                        }
42163                        // if childNode is not null, it means the actual childNodes list is
42164                        // longer than the virtual children list.
42165                        if (!childrenMatch || childNode) {
42166                            /* istanbul ignore if */
42167                            if ( true &&
42168                                typeof console !== 'undefined' &&
42169                                !hydrationBailed) {
42170                                hydrationBailed = true;
42171                                console.warn('Parent: ', elm);
42172                                console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
42173                            }
42174                            return false;
42175                        }
42176                    }
42177                }
42178            }
42179            if (isDef(data)) {
42180                var fullInvoke = false;
42181                for (var key in data) {
42182                    if (!isRenderedModule(key)) {
42183                        fullInvoke = true;
42184                        invokeCreateHooks(vnode, insertedVnodeQueue);
42185                        break;
42186                    }
42187                }
42188                if (!fullInvoke && data['class']) {
42189                    // ensure collecting deps for deep class bindings for future updates
42190                    traverse(data['class']);
42191                }
42192            }
42193        }
42194        else if (elm.data !== vnode.text) {
42195            elm.data = vnode.text;
42196        }
42197        return true;
42198    }
42199    function assertNodeMatch(node, vnode, inVPre) {
42200        if (isDef(vnode.tag)) {
42201            return (vnode.tag.indexOf('vue-component') === 0 ||
42202                (!isUnknownElement(vnode, inVPre) &&
42203                    vnode.tag.toLowerCase() ===
42204                        (node.tagName && node.tagName.toLowerCase())));
42205        }
42206        else {
42207            return node.nodeType === (vnode.isComment ? 8 : 3);
42208        }
42209    }
42210    return function patch(oldVnode, vnode, hydrating, removeOnly) {
42211        if (isUndef(vnode)) {
42212            if (isDef(oldVnode))
42213                invokeDestroyHook(oldVnode);
42214            return;
42215        }
42216        var isInitialPatch = false;
42217        var insertedVnodeQueue = [];
42218        if (isUndef(oldVnode)) {
42219            // empty mount (likely as component), create new root element
42220            isInitialPatch = true;
42221            createElm(vnode, insertedVnodeQueue);
42222        }
42223        else {
42224            var isRealElement = isDef(oldVnode.nodeType);
42225            if (!isRealElement && sameVnode(oldVnode, vnode)) {
42226                // patch existing root node
42227                patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);
42228            }
42229            else {
42230                if (isRealElement) {
42231                    // mounting to a real element
42232                    // check if this is server-rendered content and if we can perform
42233                    // a successful hydration.
42234                    if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
42235                        oldVnode.removeAttribute(SSR_ATTR);
42236                        hydrating = true;
42237                    }
42238                    if (isTrue(hydrating)) {
42239                        if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
42240                            invokeInsertHook(vnode, insertedVnodeQueue, true);
42241                            return oldVnode;
42242                        }
42243                        else if (true) {
42244                            warn$2('The client-side rendered virtual DOM tree is not matching ' +
42245                                'server-rendered content. This is likely caused by incorrect ' +
42246                                'HTML markup, for example nesting block-level elements inside ' +
42247                                '<p>, or missing <tbody>. Bailing hydration and performing ' +
42248                                'full client-side render.');
42249                        }
42250                    }
42251                    // either not server-rendered, or hydration failed.
42252                    // create an empty node and replace it
42253                    oldVnode = emptyNodeAt(oldVnode);
42254                }
42255                // replacing existing element
42256                var oldElm = oldVnode.elm;
42257                var parentElm = nodeOps.parentNode(oldElm);
42258                // create new node
42259                createElm(vnode, insertedVnodeQueue, 
42260                // extremely rare edge case: do not insert if old element is in a
42261                // leaving transition. Only happens when combining transition +
42262                // keep-alive + HOCs. (#4590)
42263                oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));
42264                // update parent placeholder node element, recursively
42265                if (isDef(vnode.parent)) {
42266                    var ancestor = vnode.parent;
42267                    var patchable = isPatchable(vnode);
42268                    while (ancestor) {
42269                        for (var i_8 = 0; i_8 < cbs.destroy.length; ++i_8) {
42270                            cbs.destroy[i_8](ancestor);
42271                        }
42272                        ancestor.elm = vnode.elm;
42273                        if (patchable) {
42274                            for (var i_9 = 0; i_9 < cbs.create.length; ++i_9) {
42275                                cbs.create[i_9](emptyNode, ancestor);
42276                            }
42277                            // #6513
42278                            // invoke insert hooks that may have been merged by create hooks.
42279                            // e.g. for directives that uses the "inserted" hook.
42280                            var insert_1 = ancestor.data.hook.insert;
42281                            if (insert_1.merged) {
42282                                // start at index 1 to avoid re-invoking component mounted hook
42283                                for (var i_10 = 1; i_10 < insert_1.fns.length; i_10++) {
42284                                    insert_1.fns[i_10]();
42285                                }
42286                            }
42287                        }
42288                        else {
42289                            registerRef(ancestor);
42290                        }
42291                        ancestor = ancestor.parent;
42292                    }
42293                }
42294                // destroy old node
42295                if (isDef(parentElm)) {
42296                    removeVnodes([oldVnode], 0, 0);
42297                }
42298                else if (isDef(oldVnode.tag)) {
42299                    invokeDestroyHook(oldVnode);
42300                }
42301            }
42302        }
42303        invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
42304        return vnode.elm;
42305    };
42306}
42307
42308var directives$1 = {
42309    create: updateDirectives,
42310    update: updateDirectives,
42311    destroy: function unbindDirectives(vnode) {
42312        // @ts-expect-error emptyNode is not VNodeWithData
42313        updateDirectives(vnode, emptyNode);
42314    }
42315};
42316function updateDirectives(oldVnode, vnode) {
42317    if (oldVnode.data.directives || vnode.data.directives) {
42318        _update(oldVnode, vnode);
42319    }
42320}
42321function _update(oldVnode, vnode) {
42322    var isCreate = oldVnode === emptyNode;
42323    var isDestroy = vnode === emptyNode;
42324    var oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);
42325    var newDirs = normalizeDirectives(vnode.data.directives, vnode.context);
42326    var dirsWithInsert = [];
42327    var dirsWithPostpatch = [];
42328    var key, oldDir, dir;
42329    for (key in newDirs) {
42330        oldDir = oldDirs[key];
42331        dir = newDirs[key];
42332        if (!oldDir) {
42333            // new directive, bind
42334            callHook(dir, 'bind', vnode, oldVnode);
42335            if (dir.def && dir.def.inserted) {
42336                dirsWithInsert.push(dir);
42337            }
42338        }
42339        else {
42340            // existing directive, update
42341            dir.oldValue = oldDir.value;
42342            dir.oldArg = oldDir.arg;
42343            callHook(dir, 'update', vnode, oldVnode);
42344            if (dir.def && dir.def.componentUpdated) {
42345                dirsWithPostpatch.push(dir);
42346            }
42347        }
42348    }
42349    if (dirsWithInsert.length) {
42350        var callInsert = function () {
42351            for (var i = 0; i < dirsWithInsert.length; i++) {
42352                callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);
42353            }
42354        };
42355        if (isCreate) {
42356            mergeVNodeHook(vnode, 'insert', callInsert);
42357        }
42358        else {
42359            callInsert();
42360        }
42361    }
42362    if (dirsWithPostpatch.length) {
42363        mergeVNodeHook(vnode, 'postpatch', function () {
42364            for (var i = 0; i < dirsWithPostpatch.length; i++) {
42365                callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
42366            }
42367        });
42368    }
42369    if (!isCreate) {
42370        for (key in oldDirs) {
42371            if (!newDirs[key]) {
42372                // no longer present, unbind
42373                callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
42374            }
42375        }
42376    }
42377}
42378var emptyModifiers = Object.create(null);
42379function normalizeDirectives(dirs, vm) {
42380    var res = Object.create(null);
42381    if (!dirs) {
42382        // $flow-disable-line
42383        return res;
42384    }
42385    var i, dir;
42386    for (i = 0; i < dirs.length; i++) {
42387        dir = dirs[i];
42388        if (!dir.modifiers) {
42389            // $flow-disable-line
42390            dir.modifiers = emptyModifiers;
42391        }
42392        res[getRawDirName(dir)] = dir;
42393        if (vm._setupState && vm._setupState.__sfc) {
42394            var setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);
42395            if (typeof setupDef === 'function') {
42396                dir.def = {
42397                    bind: setupDef,
42398                    update: setupDef,
42399                };
42400            }
42401            else {
42402                dir.def = setupDef;
42403            }
42404        }
42405        dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);
42406    }
42407    // $flow-disable-line
42408    return res;
42409}
42410function getRawDirName(dir) {
42411    return (dir.rawName || "".concat(dir.name, ".").concat(Object.keys(dir.modifiers || {}).join('.')));
42412}
42413function callHook(dir, hook, vnode, oldVnode, isDestroy) {
42414    var fn = dir.def && dir.def[hook];
42415    if (fn) {
42416        try {
42417            fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
42418        }
42419        catch (e) {
42420            handleError(e, vnode.context, "directive ".concat(dir.name, " ").concat(hook, " hook"));
42421        }
42422    }
42423}
42424
42425var baseModules = [ref, directives$1];
42426
42427function updateAttrs(oldVnode, vnode) {
42428    var opts = vnode.componentOptions;
42429    if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
42430        return;
42431    }
42432    if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
42433        return;
42434    }
42435    var key, cur, old;
42436    var elm = vnode.elm;
42437    var oldAttrs = oldVnode.data.attrs || {};
42438    var attrs = vnode.data.attrs || {};
42439    // clone observed objects, as the user probably wants to mutate it
42440    if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {
42441        attrs = vnode.data.attrs = extend({}, attrs);
42442    }
42443    for (key in attrs) {
42444        cur = attrs[key];
42445        old = oldAttrs[key];
42446        if (old !== cur) {
42447            setAttr(elm, key, cur, vnode.data.pre);
42448        }
42449    }
42450    // #4391: in IE9, setting type can reset value for input[type=radio]
42451    // #6666: IE/Edge forces progress value down to 1 before setting a max
42452    /* istanbul ignore if */
42453    if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
42454        setAttr(elm, 'value', attrs.value);
42455    }
42456    for (key in oldAttrs) {
42457        if (isUndef(attrs[key])) {
42458            if (isXlink(key)) {
42459                elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
42460            }
42461            else if (!isEnumeratedAttr(key)) {
42462                elm.removeAttribute(key);
42463            }
42464        }
42465    }
42466}
42467function setAttr(el, key, value, isInPre) {
42468    if (isInPre || el.tagName.indexOf('-') > -1) {
42469        baseSetAttr(el, key, value);
42470    }
42471    else if (isBooleanAttr(key)) {
42472        // set attribute for blank value
42473        // e.g. <option disabled>Select one</option>
42474        if (isFalsyAttrValue(value)) {
42475            el.removeAttribute(key);
42476        }
42477        else {
42478            // technically allowfullscreen is a boolean attribute for <iframe>,
42479            // but Flash expects a value of "true" when used on <embed> tag
42480            value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;
42481            el.setAttribute(key, value);
42482        }
42483    }
42484    else if (isEnumeratedAttr(key)) {
42485        el.setAttribute(key, convertEnumeratedValue(key, value));
42486    }
42487    else if (isXlink(key)) {
42488        if (isFalsyAttrValue(value)) {
42489            el.removeAttributeNS(xlinkNS, getXlinkProp(key));
42490        }
42491        else {
42492            el.setAttributeNS(xlinkNS, key, value);
42493        }
42494    }
42495    else {
42496        baseSetAttr(el, key, value);
42497    }
42498}
42499function baseSetAttr(el, key, value) {
42500    if (isFalsyAttrValue(value)) {
42501        el.removeAttribute(key);
42502    }
42503    else {
42504        // #7138: IE10 & 11 fires input event when setting placeholder on
42505        // <textarea>... block the first input event and remove the blocker
42506        // immediately.
42507        /* istanbul ignore if */
42508        if (isIE &&
42509            !isIE9 &&
42510            el.tagName === 'TEXTAREA' &&
42511            key === 'placeholder' &&
42512            value !== '' &&
42513            !el.__ieph) {
42514            var blocker_1 = function (e) {
42515                e.stopImmediatePropagation();
42516                el.removeEventListener('input', blocker_1);
42517            };
42518            el.addEventListener('input', blocker_1);
42519            // $flow-disable-line
42520            el.__ieph = true; /* IE placeholder patched */
42521        }
42522        el.setAttribute(key, value);
42523    }
42524}
42525var attrs = {
42526    create: updateAttrs,
42527    update: updateAttrs
42528};
42529
42530function updateClass(oldVnode, vnode) {
42531    var el = vnode.elm;
42532    var data = vnode.data;
42533    var oldData = oldVnode.data;
42534    if (isUndef(data.staticClass) &&
42535        isUndef(data.class) &&
42536        (isUndef(oldData) ||
42537            (isUndef(oldData.staticClass) && isUndef(oldData.class)))) {
42538        return;
42539    }
42540    var cls = genClassForVnode(vnode);
42541    // handle transition classes
42542    var transitionClass = el._transitionClasses;
42543    if (isDef(transitionClass)) {
42544        cls = concat(cls, stringifyClass(transitionClass));
42545    }
42546    // set the class
42547    if (cls !== el._prevClass) {
42548        el.setAttribute('class', cls);
42549        el._prevClass = cls;
42550    }
42551}
42552var klass$1 = {
42553    create: updateClass,
42554    update: updateClass
42555};
42556
42557var validDivisionCharRE = /[\w).+\-_$\]]/;
42558function parseFilters(exp) {
42559    var inSingle = false;
42560    var inDouble = false;
42561    var inTemplateString = false;
42562    var inRegex = false;
42563    var curly = 0;
42564    var square = 0;
42565    var paren = 0;
42566    var lastFilterIndex = 0;
42567    var c, prev, i, expression, filters;
42568    for (i = 0; i < exp.length; i++) {
42569        prev = c;
42570        c = exp.charCodeAt(i);
42571        if (inSingle) {
42572            if (c === 0x27 && prev !== 0x5c)
42573                inSingle = false;
42574        }
42575        else if (inDouble) {
42576            if (c === 0x22 && prev !== 0x5c)
42577                inDouble = false;
42578        }
42579        else if (inTemplateString) {
42580            if (c === 0x60 && prev !== 0x5c)
42581                inTemplateString = false;
42582        }
42583        else if (inRegex) {
42584            if (c === 0x2f && prev !== 0x5c)
42585                inRegex = false;
42586        }
42587        else if (c === 0x7c && // pipe
42588            exp.charCodeAt(i + 1) !== 0x7c &&
42589            exp.charCodeAt(i - 1) !== 0x7c &&
42590            !curly &&
42591            !square &&
42592            !paren) {
42593            if (expression === undefined) {
42594                // first filter, end of expression
42595                lastFilterIndex = i + 1;
42596                expression = exp.slice(0, i).trim();
42597            }
42598            else {
42599                pushFilter();
42600            }
42601        }
42602        else {
42603            switch (c) {
42604                case 0x22:
42605                    inDouble = true;
42606                    break; // "
42607                case 0x27:
42608                    inSingle = true;
42609                    break; // '
42610                case 0x60:
42611                    inTemplateString = true;
42612                    break; // `
42613                case 0x28:
42614                    paren++;
42615                    break; // (
42616                case 0x29:
42617                    paren--;
42618                    break; // )
42619                case 0x5b:
42620                    square++;
42621                    break; // [
42622                case 0x5d:
42623                    square--;
42624                    break; // ]
42625                case 0x7b:
42626                    curly++;
42627                    break; // {
42628                case 0x7d:
42629                    curly--;
42630                    break; // }
42631            }
42632            if (c === 0x2f) {
42633                // /
42634                var j = i - 1;
42635                var p 
42636                // find first non-whitespace prev char
42637                = void 0;
42638                // find first non-whitespace prev char
42639                for (; j >= 0; j--) {
42640                    p = exp.charAt(j);
42641                    if (p !== ' ')
42642                        break;
42643                }
42644                if (!p || !validDivisionCharRE.test(p)) {
42645                    inRegex = true;
42646                }
42647            }
42648        }
42649    }
42650    if (expression === undefined) {
42651        expression = exp.slice(0, i).trim();
42652    }
42653    else if (lastFilterIndex !== 0) {
42654        pushFilter();
42655    }
42656    function pushFilter() {
42657        (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
42658        lastFilterIndex = i + 1;
42659    }
42660    if (filters) {
42661        for (i = 0; i < filters.length; i++) {
42662            expression = wrapFilter(expression, filters[i]);
42663        }
42664    }
42665    return expression;
42666}
42667function wrapFilter(exp, filter) {
42668    var i = filter.indexOf('(');
42669    if (i < 0) {
42670        // _f: resolveFilter
42671        return "_f(\"".concat(filter, "\")(").concat(exp, ")");
42672    }
42673    else {
42674        var name_1 = filter.slice(0, i);
42675        var args = filter.slice(i + 1);
42676        return "_f(\"".concat(name_1, "\")(").concat(exp).concat(args !== ')' ? ',' + args : args);
42677    }
42678}
42679
42680/* eslint-disable no-unused-vars */
42681function baseWarn(msg, range) {
42682    console.error("[Vue compiler]: ".concat(msg));
42683}
42684/* eslint-enable no-unused-vars */
42685function pluckModuleFunction(modules, key) {
42686    return modules ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) : [];
42687}
42688function addProp(el, name, value, range, dynamic) {
42689    (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
42690    el.plain = false;
42691}
42692function addAttr(el, name, value, range, dynamic) {
42693    var attrs = dynamic
42694        ? el.dynamicAttrs || (el.dynamicAttrs = [])
42695        : el.attrs || (el.attrs = []);
42696    attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
42697    el.plain = false;
42698}
42699// add a raw attr (use this in preTransforms)
42700function addRawAttr(el, name, value, range) {
42701    el.attrsMap[name] = value;
42702    el.attrsList.push(rangeSetItem({ name: name, value: value }, range));
42703}
42704function addDirective(el, name, rawName, value, arg, isDynamicArg, modifiers, range) {
42705    (el.directives || (el.directives = [])).push(rangeSetItem({
42706        name: name,
42707        rawName: rawName,
42708        value: value,
42709        arg: arg,
42710        isDynamicArg: isDynamicArg,
42711        modifiers: modifiers
42712    }, range));
42713    el.plain = false;
42714}
42715function prependModifierMarker(symbol, name, dynamic) {
42716    return dynamic ? "_p(".concat(name, ",\"").concat(symbol, "\")") : symbol + name; // mark the event as captured
42717}
42718function addHandler(el, name, value, modifiers, important, warn, range, dynamic) {
42719    modifiers = modifiers || emptyObject;
42720    // warn prevent and passive modifier
42721    /* istanbul ignore if */
42722    if ( true && warn && modifiers.prevent && modifiers.passive) {
42723        warn("passive and prevent can't be used together. " +
42724            "Passive handler can't prevent default event.", range);
42725    }
42726    // normalize click.right and click.middle since they don't actually fire
42727    // this is technically browser-specific, but at least for now browsers are
42728    // the only target envs that have right/middle clicks.
42729    if (modifiers.right) {
42730        if (dynamic) {
42731            name = "(".concat(name, ")==='click'?'contextmenu':(").concat(name, ")");
42732        }
42733        else if (name === 'click') {
42734            name = 'contextmenu';
42735            delete modifiers.right;
42736        }
42737    }
42738    else if (modifiers.middle) {
42739        if (dynamic) {
42740            name = "(".concat(name, ")==='click'?'mouseup':(").concat(name, ")");
42741        }
42742        else if (name === 'click') {
42743            name = 'mouseup';
42744        }
42745    }
42746    // check capture modifier
42747    if (modifiers.capture) {
42748        delete modifiers.capture;
42749        name = prependModifierMarker('!', name, dynamic);
42750    }
42751    if (modifiers.once) {
42752        delete modifiers.once;
42753        name = prependModifierMarker('~', name, dynamic);
42754    }
42755    /* istanbul ignore if */
42756    if (modifiers.passive) {
42757        delete modifiers.passive;
42758        name = prependModifierMarker('&', name, dynamic);
42759    }
42760    var events;
42761    if (modifiers.native) {
42762        delete modifiers.native;
42763        events = el.nativeEvents || (el.nativeEvents = {});
42764    }
42765    else {
42766        events = el.events || (el.events = {});
42767    }
42768    var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range);
42769    if (modifiers !== emptyObject) {
42770        newHandler.modifiers = modifiers;
42771    }
42772    var handlers = events[name];
42773    /* istanbul ignore if */
42774    if (Array.isArray(handlers)) {
42775        important ? handlers.unshift(newHandler) : handlers.push(newHandler);
42776    }
42777    else if (handlers) {
42778        events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
42779    }
42780    else {
42781        events[name] = newHandler;
42782    }
42783    el.plain = false;
42784}
42785function getRawBindingAttr(el, name) {
42786    return (el.rawAttrsMap[':' + name] ||
42787        el.rawAttrsMap['v-bind:' + name] ||
42788        el.rawAttrsMap[name]);
42789}
42790function getBindingAttr(el, name, getStatic) {
42791    var dynamicValue = getAndRemoveAttr(el, ':' + name) || getAndRemoveAttr(el, 'v-bind:' + name);
42792    if (dynamicValue != null) {
42793        return parseFilters(dynamicValue);
42794    }
42795    else if (getStatic !== false) {
42796        var staticValue = getAndRemoveAttr(el, name);
42797        if (staticValue != null) {
42798            return JSON.stringify(staticValue);
42799        }
42800    }
42801}
42802// note: this only removes the attr from the Array (attrsList) so that it
42803// doesn't get processed by processAttrs.
42804// By default it does NOT remove it from the map (attrsMap) because the map is
42805// needed during codegen.
42806function getAndRemoveAttr(el, name, removeFromMap) {
42807    var val;
42808    if ((val = el.attrsMap[name]) != null) {
42809        var list = el.attrsList;
42810        for (var i = 0, l = list.length; i < l; i++) {
42811            if (list[i].name === name) {
42812                list.splice(i, 1);
42813                break;
42814            }
42815        }
42816    }
42817    if (removeFromMap) {
42818        delete el.attrsMap[name];
42819    }
42820    return val;
42821}
42822function getAndRemoveAttrByRegex(el, name) {
42823    var list = el.attrsList;
42824    for (var i = 0, l = list.length; i < l; i++) {
42825        var attr = list[i];
42826        if (name.test(attr.name)) {
42827            list.splice(i, 1);
42828            return attr;
42829        }
42830    }
42831}
42832function rangeSetItem(item, range) {
42833    if (range) {
42834        if (range.start != null) {
42835            item.start = range.start;
42836        }
42837        if (range.end != null) {
42838            item.end = range.end;
42839        }
42840    }
42841    return item;
42842}
42843
42844/**
42845 * Cross-platform code generation for component v-model
42846 */
42847function genComponentModel(el, value, modifiers) {
42848    var _a = modifiers || {}, number = _a.number, trim = _a.trim;
42849    var baseValueExpression = '$$v';
42850    var valueExpression = baseValueExpression;
42851    if (trim) {
42852        valueExpression =
42853            "(typeof ".concat(baseValueExpression, " === 'string'") +
42854                "? ".concat(baseValueExpression, ".trim()") +
42855                ": ".concat(baseValueExpression, ")");
42856    }
42857    if (number) {
42858        valueExpression = "_n(".concat(valueExpression, ")");
42859    }
42860    var assignment = genAssignmentCode(value, valueExpression);
42861    el.model = {
42862        value: "(".concat(value, ")"),
42863        expression: JSON.stringify(value),
42864        callback: "function (".concat(baseValueExpression, ") {").concat(assignment, "}")
42865    };
42866}
42867/**
42868 * Cross-platform codegen helper for generating v-model value assignment code.
42869 */
42870function genAssignmentCode(value, assignment) {
42871    var res = parseModel(value);
42872    if (res.key === null) {
42873        return "".concat(value, "=").concat(assignment);
42874    }
42875    else {
42876        return "$set(".concat(res.exp, ", ").concat(res.key, ", ").concat(assignment, ")");
42877    }
42878}
42879/**
42880 * Parse a v-model expression into a base path and a final key segment.
42881 * Handles both dot-path and possible square brackets.
42882 *
42883 * Possible cases:
42884 *
42885 * - test
42886 * - test[key]
42887 * - test[test1[key]]
42888 * - test["a"][key]
42889 * - xxx.test[a[a].test1[key]]
42890 * - test.xxx.a["asa"][test1[key]]
42891 *
42892 */
42893var len, str, chr, index, expressionPos, expressionEndPos;
42894function parseModel(val) {
42895    // Fix https://github.com/vuejs/vue/pull/7730
42896    // allow v-model="obj.val " (trailing whitespace)
42897    val = val.trim();
42898    len = val.length;
42899    if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
42900        index = val.lastIndexOf('.');
42901        if (index > -1) {
42902            return {
42903                exp: val.slice(0, index),
42904                key: '"' + val.slice(index + 1) + '"'
42905            };
42906        }
42907        else {
42908            return {
42909                exp: val,
42910                key: null
42911            };
42912        }
42913    }
42914    str = val;
42915    index = expressionPos = expressionEndPos = 0;
42916    while (!eof()) {
42917        chr = next();
42918        /* istanbul ignore if */
42919        if (isStringStart(chr)) {
42920            parseString(chr);
42921        }
42922        else if (chr === 0x5b) {
42923            parseBracket(chr);
42924        }
42925    }
42926    return {
42927        exp: val.slice(0, expressionPos),
42928        key: val.slice(expressionPos + 1, expressionEndPos)
42929    };
42930}
42931function next() {
42932    return str.charCodeAt(++index);
42933}
42934function eof() {
42935    return index >= len;
42936}
42937function isStringStart(chr) {
42938    return chr === 0x22 || chr === 0x27;
42939}
42940function parseBracket(chr) {
42941    var inBracket = 1;
42942    expressionPos = index;
42943    while (!eof()) {
42944        chr = next();
42945        if (isStringStart(chr)) {
42946            parseString(chr);
42947            continue;
42948        }
42949        if (chr === 0x5b)
42950            inBracket++;
42951        if (chr === 0x5d)
42952            inBracket--;
42953        if (inBracket === 0) {
42954            expressionEndPos = index;
42955            break;
42956        }
42957    }
42958}
42959function parseString(chr) {
42960    var stringQuote = chr;
42961    while (!eof()) {
42962        chr = next();
42963        if (chr === stringQuote) {
42964            break;
42965        }
42966    }
42967}
42968
42969var warn$1;
42970// in some cases, the event used has to be determined at runtime
42971// so we used some reserved tokens during compile.
42972var RANGE_TOKEN = '__r';
42973var CHECKBOX_RADIO_TOKEN = '__c';
42974function model$1(el, dir, _warn) {
42975    warn$1 = _warn;
42976    var value = dir.value;
42977    var modifiers = dir.modifiers;
42978    var tag = el.tag;
42979    var type = el.attrsMap.type;
42980    if (true) {
42981        // inputs with type="file" are read only and setting the input's
42982        // value will throw an error.
42983        if (tag === 'input' && type === 'file') {
42984            warn$1("<".concat(el.tag, " v-model=\"").concat(value, "\" type=\"file\">:\n") +
42985                "File inputs are read only. Use a v-on:change listener instead.", el.rawAttrsMap['v-model']);
42986        }
42987    }
42988    if (el.component) {
42989        genComponentModel(el, value, modifiers);
42990        // component v-model doesn't need extra runtime
42991        return false;
42992    }
42993    else if (tag === 'select') {
42994        genSelect(el, value, modifiers);
42995    }
42996    else if (tag === 'input' && type === 'checkbox') {
42997        genCheckboxModel(el, value, modifiers);
42998    }
42999    else if (tag === 'input' && type === 'radio') {
43000        genRadioModel(el, value, modifiers);
43001    }
43002    else if (tag === 'input' || tag === 'textarea') {
43003        genDefaultModel(el, value, modifiers);
43004    }
43005    else if (!config.isReservedTag(tag)) {
43006        genComponentModel(el, value, modifiers);
43007        // component v-model doesn't need extra runtime
43008        return false;
43009    }
43010    else if (true) {
43011        warn$1("<".concat(el.tag, " v-model=\"").concat(value, "\">: ") +
43012            "v-model is not supported on this element type. " +
43013            "If you are working with contenteditable, it's recommended to " +
43014            'wrap a library dedicated for that purpose inside a custom component.', el.rawAttrsMap['v-model']);
43015    }
43016    // ensure runtime directive metadata
43017    return true;
43018}
43019function genCheckboxModel(el, value, modifiers) {
43020    var number = modifiers && modifiers.number;
43021    var valueBinding = getBindingAttr(el, 'value') || 'null';
43022    var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
43023    var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
43024    addProp(el, 'checked', "Array.isArray(".concat(value, ")") +
43025        "?_i(".concat(value, ",").concat(valueBinding, ")>-1") +
43026        (trueValueBinding === 'true'
43027            ? ":(".concat(value, ")")
43028            : ":_q(".concat(value, ",").concat(trueValueBinding, ")")));
43029    addHandler(el, 'change', "var $$a=".concat(value, ",") +
43030        '$$el=$event.target,' +
43031        "$$c=$$el.checked?(".concat(trueValueBinding, "):(").concat(falseValueBinding, ");") +
43032        'if(Array.isArray($$a)){' +
43033        "var $$v=".concat(number ? '_n(' + valueBinding + ')' : valueBinding, ",") +
43034        '$$i=_i($$a,$$v);' +
43035        "if($$el.checked){$$i<0&&(".concat(genAssignmentCode(value, '$$a.concat([$$v])'), ")}") +
43036        "else{$$i>-1&&(".concat(genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))'), ")}") +
43037        "}else{".concat(genAssignmentCode(value, '$$c'), "}"), null, true);
43038}
43039function genRadioModel(el, value, modifiers) {
43040    var number = modifiers && modifiers.number;
43041    var valueBinding = getBindingAttr(el, 'value') || 'null';
43042    valueBinding = number ? "_n(".concat(valueBinding, ")") : valueBinding;
43043    addProp(el, 'checked', "_q(".concat(value, ",").concat(valueBinding, ")"));
43044    addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
43045}
43046function genSelect(el, value, modifiers) {
43047    var number = modifiers && modifiers.number;
43048    var selectedVal = "Array.prototype.filter" +
43049        ".call($event.target.options,function(o){return o.selected})" +
43050        ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
43051        "return ".concat(number ? '_n(val)' : 'val', "})");
43052    var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
43053    var code = "var $$selectedVal = ".concat(selectedVal, ";");
43054    code = "".concat(code, " ").concat(genAssignmentCode(value, assignment));
43055    addHandler(el, 'change', code, null, true);
43056}
43057function genDefaultModel(el, value, modifiers) {
43058    var type = el.attrsMap.type;
43059    // warn if v-bind:value conflicts with v-model
43060    // except for inputs with v-bind:type
43061    if (true) {
43062        var value_1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
43063        var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
43064        if (value_1 && !typeBinding) {
43065            var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
43066            warn$1("".concat(binding, "=\"").concat(value_1, "\" conflicts with v-model on the same element ") +
43067                'because the latter already expands to a value binding internally', el.rawAttrsMap[binding]);
43068        }
43069    }
43070    var _a = modifiers || {}, lazy = _a.lazy, number = _a.number, trim = _a.trim;
43071    var needCompositionGuard = !lazy && type !== 'range';
43072    var event = lazy ? 'change' : type === 'range' ? RANGE_TOKEN : 'input';
43073    var valueExpression = '$event.target.value';
43074    if (trim) {
43075        valueExpression = "$event.target.value.trim()";
43076    }
43077    if (number) {
43078        valueExpression = "_n(".concat(valueExpression, ")");
43079    }
43080    var code = genAssignmentCode(value, valueExpression);
43081    if (needCompositionGuard) {
43082        code = "if($event.target.composing)return;".concat(code);
43083    }
43084    addProp(el, 'value', "(".concat(value, ")"));
43085    addHandler(el, event, code, null, true);
43086    if (trim || number) {
43087        addHandler(el, 'blur', '$forceUpdate()');
43088    }
43089}
43090
43091// normalize v-model event tokens that can only be determined at runtime.
43092// it's important to place the event as the first in the array because
43093// the whole point is ensuring the v-model callback gets called before
43094// user-attached handlers.
43095function normalizeEvents(on) {
43096    /* istanbul ignore if */
43097    if (isDef(on[RANGE_TOKEN])) {
43098        // IE input[type=range] only supports `change` event
43099        var event_1 = isIE ? 'change' : 'input';
43100        on[event_1] = [].concat(on[RANGE_TOKEN], on[event_1] || []);
43101        delete on[RANGE_TOKEN];
43102    }
43103    // This was originally intended to fix #4521 but no longer necessary
43104    // after 2.5. Keeping it for backwards compat with generated code from < 2.4
43105    /* istanbul ignore if */
43106    if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
43107        on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
43108        delete on[CHECKBOX_RADIO_TOKEN];
43109    }
43110}
43111var target;
43112function createOnceHandler(event, handler, capture) {
43113    var _target = target; // save current target element in closure
43114    return function onceHandler() {
43115        var res = handler.apply(null, arguments);
43116        if (res !== null) {
43117            remove(event, onceHandler, capture, _target);
43118        }
43119    };
43120}
43121// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp
43122// implementation and does not fire microtasks in between event propagation, so
43123// safe to exclude.
43124var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);
43125function add(name, handler, capture, passive) {
43126    // async edge case #6566: inner click event triggers patch, event handler
43127    // attached to outer element during patch, and triggered again. This
43128    // happens because browsers fire microtask ticks between event propagation.
43129    // the solution is simple: we save the timestamp when a handler is attached,
43130    // and the handler would only fire if the event passed to it was fired
43131    // AFTER it was attached.
43132    if (useMicrotaskFix) {
43133        var attachedTimestamp_1 = currentFlushTimestamp;
43134        var original_1 = handler;
43135        //@ts-expect-error
43136        handler = original_1._wrapper = function (e) {
43137            if (
43138            // no bubbling, should always fire.
43139            // this is just a safety net in case event.timeStamp is unreliable in
43140            // certain weird environments...
43141            e.target === e.currentTarget ||
43142                // event is fired after handler attachment
43143                e.timeStamp >= attachedTimestamp_1 ||
43144                // bail for environments that have buggy event.timeStamp implementations
43145                // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
43146                // #9681 QtWebEngine event.timeStamp is negative value
43147                e.timeStamp <= 0 ||
43148                // #9448 bail if event is fired in another document in a multi-page
43149                // electron/nw.js app, since event.timeStamp will be using a different
43150                // starting reference
43151                e.target.ownerDocument !== document) {
43152                return original_1.apply(this, arguments);
43153            }
43154        };
43155    }
43156    target.addEventListener(name, handler, supportsPassive ? { capture: capture, passive: passive } : capture);
43157}
43158function remove(name, handler, capture, _target) {
43159    (_target || target).removeEventListener(name, 
43160    //@ts-expect-error
43161    handler._wrapper || handler, capture);
43162}
43163function updateDOMListeners(oldVnode, vnode) {
43164    if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
43165        return;
43166    }
43167    var on = vnode.data.on || {};
43168    var oldOn = oldVnode.data.on || {};
43169    // vnode is empty when removing all listeners,
43170    // and use old vnode dom element
43171    target = vnode.elm || oldVnode.elm;
43172    normalizeEvents(on);
43173    updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);
43174    target = undefined;
43175}
43176var events = {
43177    create: updateDOMListeners,
43178    update: updateDOMListeners,
43179    // @ts-expect-error emptyNode has actually data
43180    destroy: function (vnode) { return updateDOMListeners(vnode, emptyNode); }
43181};
43182
43183var svgContainer;
43184function updateDOMProps(oldVnode, vnode) {
43185    if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
43186        return;
43187    }
43188    var key, cur;
43189    var elm = vnode.elm;
43190    var oldProps = oldVnode.data.domProps || {};
43191    var props = vnode.data.domProps || {};
43192    // clone observed objects, as the user probably wants to mutate it
43193    if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {
43194        props = vnode.data.domProps = extend({}, props);
43195    }
43196    for (key in oldProps) {
43197        if (!(key in props)) {
43198            elm[key] = '';
43199        }
43200    }
43201    for (key in props) {
43202        cur = props[key];
43203        // ignore children if the node has textContent or innerHTML,
43204        // as these will throw away existing DOM nodes and cause removal errors
43205        // on subsequent patches (#3360)
43206        if (key === 'textContent' || key === 'innerHTML') {
43207            if (vnode.children)
43208                vnode.children.length = 0;
43209            if (cur === oldProps[key])
43210                continue;
43211            // #6601 work around Chrome version <= 55 bug where single textNode
43212            // replaced by innerHTML/textContent retains its parentNode property
43213            if (elm.childNodes.length === 1) {
43214                elm.removeChild(elm.childNodes[0]);
43215            }
43216        }
43217        if (key === 'value' && elm.tagName !== 'PROGRESS') {
43218            // store value as _value as well since
43219            // non-string values will be stringified
43220            elm._value = cur;
43221            // avoid resetting cursor position when value is the same
43222            var strCur = isUndef(cur) ? '' : String(cur);
43223            if (shouldUpdateValue(elm, strCur)) {
43224                elm.value = strCur;
43225            }
43226        }
43227        else if (key === 'innerHTML' &&
43228            isSVG(elm.tagName) &&
43229            isUndef(elm.innerHTML)) {
43230            // IE doesn't support innerHTML for SVG elements
43231            svgContainer = svgContainer || document.createElement('div');
43232            svgContainer.innerHTML = "<svg>".concat(cur, "</svg>");
43233            var svg = svgContainer.firstChild;
43234            while (elm.firstChild) {
43235                elm.removeChild(elm.firstChild);
43236            }
43237            while (svg.firstChild) {
43238                elm.appendChild(svg.firstChild);
43239            }
43240        }
43241        else if (
43242        // skip the update if old and new VDOM state is the same.
43243        // `value` is handled separately because the DOM value may be temporarily
43244        // out of sync with VDOM state due to focus, composition and modifiers.
43245        // This  #4521 by skipping the unnecessary `checked` update.
43246        cur !== oldProps[key]) {
43247            // some property updates can throw
43248            // e.g. `value` on <progress> w/ non-finite value
43249            try {
43250                elm[key] = cur;
43251            }
43252            catch (e) { }
43253        }
43254    }
43255}
43256function shouldUpdateValue(elm, checkVal) {
43257    return (
43258    //@ts-expect-error
43259    !elm.composing &&
43260        (elm.tagName === 'OPTION' ||
43261            isNotInFocusAndDirty(elm, checkVal) ||
43262            isDirtyWithModifiers(elm, checkVal)));
43263}
43264function isNotInFocusAndDirty(elm, checkVal) {
43265    // return true when textbox (.number and .trim) loses focus and its value is
43266    // not equal to the updated value
43267    var notInFocus = true;
43268    // #6157
43269    // work around IE bug when accessing document.activeElement in an iframe
43270    try {
43271        notInFocus = document.activeElement !== elm;
43272    }
43273    catch (e) { }
43274    return notInFocus && elm.value !== checkVal;
43275}
43276function isDirtyWithModifiers(elm, newVal) {
43277    var value = elm.value;
43278    var modifiers = elm._vModifiers; // injected by v-model runtime
43279    if (isDef(modifiers)) {
43280        if (modifiers.number) {
43281            return toNumber(value) !== toNumber(newVal);
43282        }
43283        if (modifiers.trim) {
43284            return value.trim() !== newVal.trim();
43285        }
43286    }
43287    return value !== newVal;
43288}
43289var domProps = {
43290    create: updateDOMProps,
43291    update: updateDOMProps
43292};
43293
43294var parseStyleText = cached(function (cssText) {
43295    var res = {};
43296    var listDelimiter = /;(?![^(]*\))/g;
43297    var propertyDelimiter = /:(.+)/;
43298    cssText.split(listDelimiter).forEach(function (item) {
43299        if (item) {
43300            var tmp = item.split(propertyDelimiter);
43301            tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
43302        }
43303    });
43304    return res;
43305});
43306// merge static and dynamic style data on the same vnode
43307function normalizeStyleData(data) {
43308    var style = normalizeStyleBinding(data.style);
43309    // static style is pre-processed into an object during compilation
43310    // and is always a fresh object, so it's safe to merge into it
43311    return data.staticStyle ? extend(data.staticStyle, style) : style;
43312}
43313// normalize possible array / string values into Object
43314function normalizeStyleBinding(bindingStyle) {
43315    if (Array.isArray(bindingStyle)) {
43316        return toObject(bindingStyle);
43317    }
43318    if (typeof bindingStyle === 'string') {
43319        return parseStyleText(bindingStyle);
43320    }
43321    return bindingStyle;
43322}
43323/**
43324 * parent component style should be after child's
43325 * so that parent component's style could override it
43326 */
43327function getStyle(vnode, checkChild) {
43328    var res = {};
43329    var styleData;
43330    if (checkChild) {
43331        var childNode = vnode;
43332        while (childNode.componentInstance) {
43333            childNode = childNode.componentInstance._vnode;
43334            if (childNode &&
43335                childNode.data &&
43336                (styleData = normalizeStyleData(childNode.data))) {
43337                extend(res, styleData);
43338            }
43339        }
43340    }
43341    if ((styleData = normalizeStyleData(vnode.data))) {
43342        extend(res, styleData);
43343    }
43344    var parentNode = vnode;
43345    // @ts-expect-error parentNode.parent not VNodeWithData
43346    while ((parentNode = parentNode.parent)) {
43347        if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
43348            extend(res, styleData);
43349        }
43350    }
43351    return res;
43352}
43353
43354var cssVarRE = /^--/;
43355var importantRE = /\s*!important$/;
43356var setProp = function (el, name, val) {
43357    /* istanbul ignore if */
43358    if (cssVarRE.test(name)) {
43359        el.style.setProperty(name, val);
43360    }
43361    else if (importantRE.test(val)) {
43362        el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');
43363    }
43364    else {
43365        var normalizedName = normalize(name);
43366        if (Array.isArray(val)) {
43367            // Support values array created by autoprefixer, e.g.
43368            // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
43369            // Set them one by one, and the browser will only set those it can recognize
43370            for (var i = 0, len = val.length; i < len; i++) {
43371                el.style[normalizedName] = val[i];
43372            }
43373        }
43374        else {
43375            el.style[normalizedName] = val;
43376        }
43377    }
43378};
43379var vendorNames = ['Webkit', 'Moz', 'ms'];
43380var emptyStyle;
43381var normalize = cached(function (prop) {
43382    emptyStyle = emptyStyle || document.createElement('div').style;
43383    prop = camelize(prop);
43384    if (prop !== 'filter' && prop in emptyStyle) {
43385        return prop;
43386    }
43387    var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
43388    for (var i = 0; i < vendorNames.length; i++) {
43389        var name_1 = vendorNames[i] + capName;
43390        if (name_1 in emptyStyle) {
43391            return name_1;
43392        }
43393    }
43394});
43395function updateStyle(oldVnode, vnode) {
43396    var data = vnode.data;
43397    var oldData = oldVnode.data;
43398    if (isUndef(data.staticStyle) &&
43399        isUndef(data.style) &&
43400        isUndef(oldData.staticStyle) &&
43401        isUndef(oldData.style)) {
43402        return;
43403    }
43404    var cur, name;
43405    var el = vnode.elm;
43406    var oldStaticStyle = oldData.staticStyle;
43407    var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
43408    // if static style exists, stylebinding already merged into it when doing normalizeStyleData
43409    var oldStyle = oldStaticStyle || oldStyleBinding;
43410    var style = normalizeStyleBinding(vnode.data.style) || {};
43411    // store normalized style under a different key for next diff
43412    // make sure to clone it if it's reactive, since the user likely wants
43413    // to mutate it.
43414    vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;
43415    var newStyle = getStyle(vnode, true);
43416    for (name in oldStyle) {
43417        if (isUndef(newStyle[name])) {
43418            setProp(el, name, '');
43419        }
43420    }
43421    for (name in newStyle) {
43422        cur = newStyle[name];
43423        if (cur !== oldStyle[name]) {
43424            // ie9 setting to null has no effect, must use empty string
43425            setProp(el, name, cur == null ? '' : cur);
43426        }
43427    }
43428}
43429var style$1 = {
43430    create: updateStyle,
43431    update: updateStyle
43432};
43433
43434var whitespaceRE$1 = /\s+/;
43435/**
43436 * Add class with compatibility for SVG since classList is not supported on
43437 * SVG elements in IE
43438 */
43439function addClass(el, cls) {
43440    /* istanbul ignore if */
43441    if (!cls || !(cls = cls.trim())) {
43442        return;
43443    }
43444    /* istanbul ignore else */
43445    if (el.classList) {
43446        if (cls.indexOf(' ') > -1) {
43447            cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.add(c); });
43448        }
43449        else {
43450            el.classList.add(cls);
43451        }
43452    }
43453    else {
43454        var cur = " ".concat(el.getAttribute('class') || '', " ");
43455        if (cur.indexOf(' ' + cls + ' ') < 0) {
43456            el.setAttribute('class', (cur + cls).trim());
43457        }
43458    }
43459}
43460/**
43461 * Remove class with compatibility for SVG since classList is not supported on
43462 * SVG elements in IE
43463 */
43464function removeClass(el, cls) {
43465    /* istanbul ignore if */
43466    if (!cls || !(cls = cls.trim())) {
43467        return;
43468    }
43469    /* istanbul ignore else */
43470    if (el.classList) {
43471        if (cls.indexOf(' ') > -1) {
43472            cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.remove(c); });
43473        }
43474        else {
43475            el.classList.remove(cls);
43476        }
43477        if (!el.classList.length) {
43478            el.removeAttribute('class');
43479        }
43480    }
43481    else {
43482        var cur = " ".concat(el.getAttribute('class') || '', " ");
43483        var tar = ' ' + cls + ' ';
43484        while (cur.indexOf(tar) >= 0) {
43485            cur = cur.replace(tar, ' ');
43486        }
43487        cur = cur.trim();
43488        if (cur) {
43489            el.setAttribute('class', cur);
43490        }
43491        else {
43492            el.removeAttribute('class');
43493        }
43494    }
43495}
43496
43497function resolveTransition(def) {
43498    if (!def) {
43499        return;
43500    }
43501    /* istanbul ignore else */
43502    if (typeof def === 'object') {
43503        var res = {};
43504        if (def.css !== false) {
43505            extend(res, autoCssTransition(def.name || 'v'));
43506        }
43507        extend(res, def);
43508        return res;
43509    }
43510    else if (typeof def === 'string') {
43511        return autoCssTransition(def);
43512    }
43513}
43514var autoCssTransition = cached(function (name) {
43515    return {
43516        enterClass: "".concat(name, "-enter"),
43517        enterToClass: "".concat(name, "-enter-to"),
43518        enterActiveClass: "".concat(name, "-enter-active"),
43519        leaveClass: "".concat(name, "-leave"),
43520        leaveToClass: "".concat(name, "-leave-to"),
43521        leaveActiveClass: "".concat(name, "-leave-active")
43522    };
43523});
43524var hasTransition = inBrowser && !isIE9;
43525var TRANSITION = 'transition';
43526var ANIMATION = 'animation';
43527// Transition property/event sniffing
43528var transitionProp = 'transition';
43529var transitionEndEvent = 'transitionend';
43530var animationProp = 'animation';
43531var animationEndEvent = 'animationend';
43532if (hasTransition) {
43533    /* istanbul ignore if */
43534    if (window.ontransitionend === undefined &&
43535        window.onwebkittransitionend !== undefined) {
43536        transitionProp = 'WebkitTransition';
43537        transitionEndEvent = 'webkitTransitionEnd';
43538    }
43539    if (window.onanimationend === undefined &&
43540        window.onwebkitanimationend !== undefined) {
43541        animationProp = 'WebkitAnimation';
43542        animationEndEvent = 'webkitAnimationEnd';
43543    }
43544}
43545// binding to window is necessary to make hot reload work in IE in strict mode
43546var raf = inBrowser
43547    ? window.requestAnimationFrame
43548        ? window.requestAnimationFrame.bind(window)
43549        : setTimeout
43550    : /* istanbul ignore next */ function (/* istanbul ignore next */ fn) { return fn(); };
43551function nextFrame(fn) {
43552    raf(function () {
43553        // @ts-expect-error
43554        raf(fn);
43555    });
43556}
43557function addTransitionClass(el, cls) {
43558    var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
43559    if (transitionClasses.indexOf(cls) < 0) {
43560        transitionClasses.push(cls);
43561        addClass(el, cls);
43562    }
43563}
43564function removeTransitionClass(el, cls) {
43565    if (el._transitionClasses) {
43566        remove$2(el._transitionClasses, cls);
43567    }
43568    removeClass(el, cls);
43569}
43570function whenTransitionEnds(el, expectedType, cb) {
43571    var _a = getTransitionInfo(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;
43572    if (!type)
43573        return cb();
43574    var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
43575    var ended = 0;
43576    var end = function () {
43577        el.removeEventListener(event, onEnd);
43578        cb();
43579    };
43580    var onEnd = function (e) {
43581        if (e.target === el) {
43582            if (++ended >= propCount) {
43583                end();
43584            }
43585        }
43586    };
43587    setTimeout(function () {
43588        if (ended < propCount) {
43589            end();
43590        }
43591    }, timeout + 1);
43592    el.addEventListener(event, onEnd);
43593}
43594var transformRE = /\b(transform|all)(,|$)/;
43595function getTransitionInfo(el, expectedType) {
43596    var styles = window.getComputedStyle(el);
43597    // JSDOM may return undefined for transition properties
43598    var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');
43599    var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');
43600    var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
43601    var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');
43602    var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');
43603    var animationTimeout = getTimeout(animationDelays, animationDurations);
43604    var type;
43605    var timeout = 0;
43606    var propCount = 0;
43607    /* istanbul ignore if */
43608    if (expectedType === TRANSITION) {
43609        if (transitionTimeout > 0) {
43610            type = TRANSITION;
43611            timeout = transitionTimeout;
43612            propCount = transitionDurations.length;
43613        }
43614    }
43615    else if (expectedType === ANIMATION) {
43616        if (animationTimeout > 0) {
43617            type = ANIMATION;
43618            timeout = animationTimeout;
43619            propCount = animationDurations.length;
43620        }
43621    }
43622    else {
43623        timeout = Math.max(transitionTimeout, animationTimeout);
43624        type =
43625            timeout > 0
43626                ? transitionTimeout > animationTimeout
43627                    ? TRANSITION
43628                    : ANIMATION
43629                : null;
43630        propCount = type
43631            ? type === TRANSITION
43632                ? transitionDurations.length
43633                : animationDurations.length
43634            : 0;
43635    }
43636    var hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);
43637    return {
43638        type: type,
43639        timeout: timeout,
43640        propCount: propCount,
43641        hasTransform: hasTransform
43642    };
43643}
43644function getTimeout(delays, durations) {
43645    /* istanbul ignore next */
43646    while (delays.length < durations.length) {
43647        delays = delays.concat(delays);
43648    }
43649    return Math.max.apply(null, durations.map(function (d, i) {
43650        return toMs(d) + toMs(delays[i]);
43651    }));
43652}
43653// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
43654// in a locale-dependent way, using a comma instead of a dot.
43655// If comma is not replaced with a dot, the input will be rounded down (i.e. acting
43656// as a floor function) causing unexpected behaviors
43657function toMs(s) {
43658    return Number(s.slice(0, -1).replace(',', '.')) * 1000;
43659}
43660
43661function enter(vnode, toggleDisplay) {
43662    var el = vnode.elm;
43663    // call leave callback now
43664    if (isDef(el._leaveCb)) {
43665        el._leaveCb.cancelled = true;
43666        el._leaveCb();
43667    }
43668    var data = resolveTransition(vnode.data.transition);
43669    if (isUndef(data)) {
43670        return;
43671    }
43672    /* istanbul ignore if */
43673    if (isDef(el._enterCb) || el.nodeType !== 1) {
43674        return;
43675    }
43676    var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;
43677    // activeInstance will always be the <transition> component managing this
43678    // transition. One edge case to check is when the <transition> is placed
43679    // as the root node of a child component. In that case we need to check
43680    // <transition>'s parent for appear check.
43681    var context = activeInstance;
43682    var transitionNode = activeInstance.$vnode;
43683    while (transitionNode && transitionNode.parent) {
43684        context = transitionNode.context;
43685        transitionNode = transitionNode.parent;
43686    }
43687    var isAppear = !context._isMounted || !vnode.isRootInsert;
43688    if (isAppear && !appear && appear !== '') {
43689        return;
43690    }
43691    var startClass = isAppear && appearClass ? appearClass : enterClass;
43692    var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;
43693    var toClass = isAppear && appearToClass ? appearToClass : enterToClass;
43694    var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;
43695    var enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;
43696    var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;
43697    var enterCancelledHook = isAppear
43698        ? appearCancelled || enterCancelled
43699        : enterCancelled;
43700    var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);
43701    if ( true && explicitEnterDuration != null) {
43702        checkDuration(explicitEnterDuration, 'enter', vnode);
43703    }
43704    var expectsCSS = css !== false && !isIE9;
43705    var userWantsControl = getHookArgumentsLength(enterHook);
43706    var cb = (el._enterCb = once(function () {
43707        if (expectsCSS) {
43708            removeTransitionClass(el, toClass);
43709            removeTransitionClass(el, activeClass);
43710        }
43711        // @ts-expect-error
43712        if (cb.cancelled) {
43713            if (expectsCSS) {
43714                removeTransitionClass(el, startClass);
43715            }
43716            enterCancelledHook && enterCancelledHook(el);
43717        }
43718        else {
43719            afterEnterHook && afterEnterHook(el);
43720        }
43721        el._enterCb = null;
43722    }));
43723    if (!vnode.data.show) {
43724        // remove pending leave element on enter by injecting an insert hook
43725        mergeVNodeHook(vnode, 'insert', function () {
43726            var parent = el.parentNode;
43727            var pendingNode = parent && parent._pending && parent._pending[vnode.key];
43728            if (pendingNode &&
43729                pendingNode.tag === vnode.tag &&
43730                pendingNode.elm._leaveCb) {
43731                pendingNode.elm._leaveCb();
43732            }
43733            enterHook && enterHook(el, cb);
43734        });
43735    }
43736    // start enter transition
43737    beforeEnterHook && beforeEnterHook(el);
43738    if (expectsCSS) {
43739        addTransitionClass(el, startClass);
43740        addTransitionClass(el, activeClass);
43741        nextFrame(function () {
43742            removeTransitionClass(el, startClass);
43743            // @ts-expect-error
43744            if (!cb.cancelled) {
43745                addTransitionClass(el, toClass);
43746                if (!userWantsControl) {
43747                    if (isValidDuration(explicitEnterDuration)) {
43748                        setTimeout(cb, explicitEnterDuration);
43749                    }
43750                    else {
43751                        whenTransitionEnds(el, type, cb);
43752                    }
43753                }
43754            }
43755        });
43756    }
43757    if (vnode.data.show) {
43758        toggleDisplay && toggleDisplay();
43759        enterHook && enterHook(el, cb);
43760    }
43761    if (!expectsCSS && !userWantsControl) {
43762        cb();
43763    }
43764}
43765function leave(vnode, rm) {
43766    var el = vnode.elm;
43767    // call enter callback now
43768    if (isDef(el._enterCb)) {
43769        el._enterCb.cancelled = true;
43770        el._enterCb();
43771    }
43772    var data = resolveTransition(vnode.data.transition);
43773    if (isUndef(data) || el.nodeType !== 1) {
43774        return rm();
43775    }
43776    /* istanbul ignore if */
43777    if (isDef(el._leaveCb)) {
43778        return;
43779    }
43780    var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;
43781    var expectsCSS = css !== false && !isIE9;
43782    var userWantsControl = getHookArgumentsLength(leave);
43783    var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);
43784    if ( true && isDef(explicitLeaveDuration)) {
43785        checkDuration(explicitLeaveDuration, 'leave', vnode);
43786    }
43787    var cb = (el._leaveCb = once(function () {
43788        if (el.parentNode && el.parentNode._pending) {
43789            el.parentNode._pending[vnode.key] = null;
43790        }
43791        if (expectsCSS) {
43792            removeTransitionClass(el, leaveToClass);
43793            removeTransitionClass(el, leaveActiveClass);
43794        }
43795        // @ts-expect-error
43796        if (cb.cancelled) {
43797            if (expectsCSS) {
43798                removeTransitionClass(el, leaveClass);
43799            }
43800            leaveCancelled && leaveCancelled(el);
43801        }
43802        else {
43803            rm();
43804            afterLeave && afterLeave(el);
43805        }
43806        el._leaveCb = null;
43807    }));
43808    if (delayLeave) {
43809        delayLeave(performLeave);
43810    }
43811    else {
43812        performLeave();
43813    }
43814    function performLeave() {
43815        // the delayed leave may have already been cancelled
43816        // @ts-expect-error
43817        if (cb.cancelled) {
43818            return;
43819        }
43820        // record leaving element
43821        if (!vnode.data.show && el.parentNode) {
43822            (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =
43823                vnode;
43824        }
43825        beforeLeave && beforeLeave(el);
43826        if (expectsCSS) {
43827            addTransitionClass(el, leaveClass);
43828            addTransitionClass(el, leaveActiveClass);
43829            nextFrame(function () {
43830                removeTransitionClass(el, leaveClass);
43831                // @ts-expect-error
43832                if (!cb.cancelled) {
43833                    addTransitionClass(el, leaveToClass);
43834                    if (!userWantsControl) {
43835                        if (isValidDuration(explicitLeaveDuration)) {
43836                            setTimeout(cb, explicitLeaveDuration);
43837                        }
43838                        else {
43839                            whenTransitionEnds(el, type, cb);
43840                        }
43841                    }
43842                }
43843            });
43844        }
43845        leave && leave(el, cb);
43846        if (!expectsCSS && !userWantsControl) {
43847            cb();
43848        }
43849    }
43850}
43851// only used in dev mode
43852function checkDuration(val, name, vnode) {
43853    if (typeof val !== 'number') {
43854        warn$2("<transition> explicit ".concat(name, " duration is not a valid number - ") +
43855            "got ".concat(JSON.stringify(val), "."), vnode.context);
43856    }
43857    else if (isNaN(val)) {
43858        warn$2("<transition> explicit ".concat(name, " duration is NaN - ") +
43859            'the duration expression might be incorrect.', vnode.context);
43860    }
43861}
43862function isValidDuration(val) {
43863    return typeof val === 'number' && !isNaN(val);
43864}
43865/**
43866 * Normalize a transition hook's argument length. The hook may be:
43867 * - a merged hook (invoker) with the original in .fns
43868 * - a wrapped component method (check ._length)
43869 * - a plain function (.length)
43870 */
43871function getHookArgumentsLength(fn) {
43872    if (isUndef(fn)) {
43873        return false;
43874    }
43875    // @ts-expect-error
43876    var invokerFns = fn.fns;
43877    if (isDef(invokerFns)) {
43878        // invoker
43879        return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);
43880    }
43881    else {
43882        // @ts-expect-error
43883        return (fn._length || fn.length) > 1;
43884    }
43885}
43886function _enter(_, vnode) {
43887    if (vnode.data.show !== true) {
43888        enter(vnode);
43889    }
43890}
43891var transition = inBrowser
43892    ? {
43893        create: _enter,
43894        activate: _enter,
43895        remove: function (vnode, rm) {
43896            /* istanbul ignore else */
43897            if (vnode.data.show !== true) {
43898                // @ts-expect-error
43899                leave(vnode, rm);
43900            }
43901            else {
43902                rm();
43903            }
43904        }
43905    }
43906    : {};
43907
43908var platformModules = [attrs, klass$1, events, domProps, style$1, transition];
43909
43910// the directive module should be applied last, after all
43911// built-in modules have been applied.
43912var modules$1 = platformModules.concat(baseModules);
43913var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules$1 });
43914
43915/**
43916 * Not type checking this file because flow doesn't like attaching
43917 * properties to Elements.
43918 */
43919/* istanbul ignore if */
43920if (isIE9) {
43921    // http://www.matts411.com/post/internet-explorer-9-oninput/
43922    document.addEventListener('selectionchange', function () {
43923        var el = document.activeElement;
43924        // @ts-expect-error
43925        if (el && el.vmodel) {
43926            trigger(el, 'input');
43927        }
43928    });
43929}
43930var directive = {
43931    inserted: function (el, binding, vnode, oldVnode) {
43932        if (vnode.tag === 'select') {
43933            // #6903
43934            if (oldVnode.elm && !oldVnode.elm._vOptions) {
43935                mergeVNodeHook(vnode, 'postpatch', function () {
43936                    directive.componentUpdated(el, binding, vnode);
43937                });
43938            }
43939            else {
43940                setSelected(el, binding, vnode.context);
43941            }
43942            el._vOptions = [].map.call(el.options, getValue);
43943        }
43944        else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
43945            el._vModifiers = binding.modifiers;
43946            if (!binding.modifiers.lazy) {
43947                el.addEventListener('compositionstart', onCompositionStart);
43948                el.addEventListener('compositionend', onCompositionEnd);
43949                // Safari < 10.2 & UIWebView doesn't fire compositionend when
43950                // switching focus before confirming composition choice
43951                // this also fixes the issue where some browsers e.g. iOS Chrome
43952                // fires "change" instead of "input" on autocomplete.
43953                el.addEventListener('change', onCompositionEnd);
43954                /* istanbul ignore if */
43955                if (isIE9) {
43956                    el.vmodel = true;
43957                }
43958            }
43959        }
43960    },
43961    componentUpdated: function (el, binding, vnode) {
43962        if (vnode.tag === 'select') {
43963            setSelected(el, binding, vnode.context);
43964            // in case the options rendered by v-for have changed,
43965            // it's possible that the value is out-of-sync with the rendered options.
43966            // detect such cases and filter out values that no longer has a matching
43967            // option in the DOM.
43968            var prevOptions_1 = el._vOptions;
43969            var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));
43970            if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {
43971                // trigger change event if
43972                // no matching option found for at least one value
43973                var needReset = el.multiple
43974                    ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })
43975                    : binding.value !== binding.oldValue &&
43976                        hasNoMatchingOption(binding.value, curOptions_1);
43977                if (needReset) {
43978                    trigger(el, 'change');
43979                }
43980            }
43981        }
43982    }
43983};
43984function setSelected(el, binding, vm) {
43985    actuallySetSelected(el, binding, vm);
43986    /* istanbul ignore if */
43987    if (isIE || isEdge) {
43988        setTimeout(function () {
43989            actuallySetSelected(el, binding, vm);
43990        }, 0);
43991    }
43992}
43993function actuallySetSelected(el, binding, vm) {
43994    var value = binding.value;
43995    var isMultiple = el.multiple;
43996    if (isMultiple && !Array.isArray(value)) {
43997         true &&
43998            warn$2("<select multiple v-model=\"".concat(binding.expression, "\"> ") +
43999                "expects an Array value for its binding, but got ".concat(Object.prototype.toString
44000                    .call(value)
44001                    .slice(8, -1)), vm);
44002        return;
44003    }
44004    var selected, option;
44005    for (var i = 0, l = el.options.length; i < l; i++) {
44006        option = el.options[i];
44007        if (isMultiple) {
44008            selected = looseIndexOf(value, getValue(option)) > -1;
44009            if (option.selected !== selected) {
44010                option.selected = selected;
44011            }
44012        }
44013        else {
44014            if (looseEqual(getValue(option), value)) {
44015                if (el.selectedIndex !== i) {
44016                    el.selectedIndex = i;
44017                }
44018                return;
44019            }
44020        }
44021    }
44022    if (!isMultiple) {
44023        el.selectedIndex = -1;
44024    }
44025}
44026function hasNoMatchingOption(value, options) {
44027    return options.every(function (o) { return !looseEqual(o, value); });
44028}
44029function getValue(option) {
44030    return '_value' in option ? option._value : option.value;
44031}
44032function onCompositionStart(e) {
44033    e.target.composing = true;
44034}
44035function onCompositionEnd(e) {
44036    // prevent triggering an input event for no reason
44037    if (!e.target.composing)
44038        return;
44039    e.target.composing = false;
44040    trigger(e.target, 'input');
44041}
44042function trigger(el, type) {
44043    var e = document.createEvent('HTMLEvents');
44044    e.initEvent(type, true, true);
44045    el.dispatchEvent(e);
44046}
44047
44048// recursively search for possible transition defined inside the component root
44049function locateNode(vnode) {
44050    // @ts-expect-error
44051    return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
44052        ? locateNode(vnode.componentInstance._vnode)
44053        : vnode;
44054}
44055var show = {
44056    bind: function (el, _a, vnode) {
44057        var value = _a.value;
44058        vnode = locateNode(vnode);
44059        var transition = vnode.data && vnode.data.transition;
44060        var originalDisplay = (el.__vOriginalDisplay =
44061            el.style.display === 'none' ? '' : el.style.display);
44062        if (value && transition) {
44063            vnode.data.show = true;
44064            enter(vnode, function () {
44065                el.style.display = originalDisplay;
44066            });
44067        }
44068        else {
44069            el.style.display = value ? originalDisplay : 'none';
44070        }
44071    },
44072    update: function (el, _a, vnode) {
44073        var value = _a.value, oldValue = _a.oldValue;
44074        /* istanbul ignore if */
44075        if (!value === !oldValue)
44076            return;
44077        vnode = locateNode(vnode);
44078        var transition = vnode.data && vnode.data.transition;
44079        if (transition) {
44080            vnode.data.show = true;
44081            if (value) {
44082                enter(vnode, function () {
44083                    el.style.display = el.__vOriginalDisplay;
44084                });
44085            }
44086            else {
44087                leave(vnode, function () {
44088                    el.style.display = 'none';
44089                });
44090            }
44091        }
44092        else {
44093            el.style.display = value ? el.__vOriginalDisplay : 'none';
44094        }
44095    },
44096    unbind: function (el, binding, vnode, oldVnode, isDestroy) {
44097        if (!isDestroy) {
44098            el.style.display = el.__vOriginalDisplay;
44099        }
44100    }
44101};
44102
44103var platformDirectives = {
44104    model: directive,
44105    show: show
44106};
44107
44108// Provides transition support for a single element/component.
44109var transitionProps = {
44110    name: String,
44111    appear: Boolean,
44112    css: Boolean,
44113    mode: String,
44114    type: String,
44115    enterClass: String,
44116    leaveClass: String,
44117    enterToClass: String,
44118    leaveToClass: String,
44119    enterActiveClass: String,
44120    leaveActiveClass: String,
44121    appearClass: String,
44122    appearActiveClass: String,
44123    appearToClass: String,
44124    duration: [Number, String, Object]
44125};
44126// in case the child is also an abstract component, e.g. <keep-alive>
44127// we want to recursively retrieve the real component to be rendered
44128function getRealChild(vnode) {
44129    var compOptions = vnode && vnode.componentOptions;
44130    if (compOptions && compOptions.Ctor.options.abstract) {
44131        return getRealChild(getFirstComponentChild(compOptions.children));
44132    }
44133    else {
44134        return vnode;
44135    }
44136}
44137function extractTransitionData(comp) {
44138    var data = {};
44139    var options = comp.$options;
44140    // props
44141    for (var key in options.propsData) {
44142        data[key] = comp[key];
44143    }
44144    // events.
44145    // extract listeners and pass them directly to the transition methods
44146    var listeners = options._parentListeners;
44147    for (var key in listeners) {
44148        data[camelize(key)] = listeners[key];
44149    }
44150    return data;
44151}
44152function placeholder(h, rawChild) {
44153    // @ts-expect-error
44154    if (/\d-keep-alive$/.test(rawChild.tag)) {
44155        return h('keep-alive', {
44156            props: rawChild.componentOptions.propsData
44157        });
44158    }
44159}
44160function hasParentTransition(vnode) {
44161    while ((vnode = vnode.parent)) {
44162        if (vnode.data.transition) {
44163            return true;
44164        }
44165    }
44166}
44167function isSameChild(child, oldChild) {
44168    return oldChild.key === child.key && oldChild.tag === child.tag;
44169}
44170var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };
44171var isVShowDirective = function (d) { return d.name === 'show'; };
44172var Transition = {
44173    name: 'transition',
44174    props: transitionProps,
44175    abstract: true,
44176    render: function (h) {
44177        var _this = this;
44178        var children = this.$slots.default;
44179        if (!children) {
44180            return;
44181        }
44182        // filter out text nodes (possible whitespaces)
44183        children = children.filter(isNotTextNode);
44184        /* istanbul ignore if */
44185        if (!children.length) {
44186            return;
44187        }
44188        // warn multiple elements
44189        if ( true && children.length > 1) {
44190            warn$2('<transition> can only be used on a single element. Use ' +
44191                '<transition-group> for lists.', this.$parent);
44192        }
44193        var mode = this.mode;
44194        // warn invalid mode
44195        if ( true && mode && mode !== 'in-out' && mode !== 'out-in') {
44196            warn$2('invalid <transition> mode: ' + mode, this.$parent);
44197        }
44198        var rawChild = children[0];
44199        // if this is a component root node and the component's
44200        // parent container node also has transition, skip.
44201        if (hasParentTransition(this.$vnode)) {
44202            return rawChild;
44203        }
44204        // apply transition data to child
44205        // use getRealChild() to ignore abstract components e.g. keep-alive
44206        var child = getRealChild(rawChild);
44207        /* istanbul ignore if */
44208        if (!child) {
44209            return rawChild;
44210        }
44211        if (this._leaving) {
44212            return placeholder(h, rawChild);
44213        }
44214        // ensure a key that is unique to the vnode type and to this transition
44215        // component instance. This key will be used to remove pending leaving nodes
44216        // during entering.
44217        var id = "__transition-".concat(this._uid, "-");
44218        child.key =
44219            child.key == null
44220                ? child.isComment
44221                    ? id + 'comment'
44222                    : id + child.tag
44223                : isPrimitive(child.key)
44224                    ? String(child.key).indexOf(id) === 0
44225                        ? child.key
44226                        : id + child.key
44227                    : child.key;
44228        var data = ((child.data || (child.data = {})).transition =
44229            extractTransitionData(this));
44230        var oldRawChild = this._vnode;
44231        var oldChild = getRealChild(oldRawChild);
44232        // mark v-show
44233        // so that the transition module can hand over the control to the directive
44234        if (child.data.directives && child.data.directives.some(isVShowDirective)) {
44235            child.data.show = true;
44236        }
44237        if (oldChild &&
44238            oldChild.data &&
44239            !isSameChild(child, oldChild) &&
44240            !isAsyncPlaceholder(oldChild) &&
44241            // #6687 component root is a comment node
44242            !(oldChild.componentInstance &&
44243                oldChild.componentInstance._vnode.isComment)) {
44244            // replace old child transition data with fresh one
44245            // important for dynamic transitions!
44246            var oldData = (oldChild.data.transition = extend({}, data));
44247            // handle transition mode
44248            if (mode === 'out-in') {
44249                // return placeholder node and queue update when leave finishes
44250                this._leaving = true;
44251                mergeVNodeHook(oldData, 'afterLeave', function () {
44252                    _this._leaving = false;
44253                    _this.$forceUpdate();
44254                });
44255                return placeholder(h, rawChild);
44256            }
44257            else if (mode === 'in-out') {
44258                if (isAsyncPlaceholder(child)) {
44259                    return oldRawChild;
44260                }
44261                var delayedLeave_1;
44262                var performLeave = function () {
44263                    delayedLeave_1();
44264                };
44265                mergeVNodeHook(data, 'afterEnter', performLeave);
44266                mergeVNodeHook(data, 'enterCancelled', performLeave);
44267                mergeVNodeHook(oldData, 'delayLeave', function (leave) {
44268                    delayedLeave_1 = leave;
44269                });
44270            }
44271        }
44272        return rawChild;
44273    }
44274};
44275
44276// Provides transition support for list items.
44277var props = extend({
44278    tag: String,
44279    moveClass: String
44280}, transitionProps);
44281delete props.mode;
44282var TransitionGroup = {
44283    props: props,
44284    beforeMount: function () {
44285        var _this = this;
44286        var update = this._update;
44287        this._update = function (vnode, hydrating) {
44288            var restoreActiveInstance = setActiveInstance(_this);
44289            // force removing pass
44290            _this.__patch__(_this._vnode, _this.kept, false, // hydrating
44291            true // removeOnly (!important, avoids unnecessary moves)
44292            );
44293            _this._vnode = _this.kept;
44294            restoreActiveInstance();
44295            update.call(_this, vnode, hydrating);
44296        };
44297    },
44298    render: function (h) {
44299        var tag = this.tag || this.$vnode.data.tag || 'span';
44300        var map = Object.create(null);
44301        var prevChildren = (this.prevChildren = this.children);
44302        var rawChildren = this.$slots.default || [];
44303        var children = (this.children = []);
44304        var transitionData = extractTransitionData(this);
44305        for (var i = 0; i < rawChildren.length; i++) {
44306            var c = rawChildren[i];
44307            if (c.tag) {
44308                if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
44309                    children.push(c);
44310                    map[c.key] = c;
44311                    (c.data || (c.data = {})).transition = transitionData;
44312                }
44313                else if (true) {
44314                    var opts = c.componentOptions;
44315                    var name_1 = opts
44316                        ? getComponentName(opts.Ctor.options) || opts.tag || ''
44317                        : c.tag;
44318                    warn$2("<transition-group> children must be keyed: <".concat(name_1, ">"));
44319                }
44320            }
44321        }
44322        if (prevChildren) {
44323            var kept = [];
44324            var removed = [];
44325            for (var i = 0; i < prevChildren.length; i++) {
44326                var c = prevChildren[i];
44327                c.data.transition = transitionData;
44328                // @ts-expect-error .getBoundingClientRect is not typed in Node
44329                c.data.pos = c.elm.getBoundingClientRect();
44330                if (map[c.key]) {
44331                    kept.push(c);
44332                }
44333                else {
44334                    removed.push(c);
44335                }
44336            }
44337            this.kept = h(tag, null, kept);
44338            this.removed = removed;
44339        }
44340        return h(tag, null, children);
44341    },
44342    updated: function () {
44343        var children = this.prevChildren;
44344        var moveClass = this.moveClass || (this.name || 'v') + '-move';
44345        if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
44346            return;
44347        }
44348        // we divide the work into three loops to avoid mixing DOM reads and writes
44349        // in each iteration - which helps prevent layout thrashing.
44350        children.forEach(callPendingCbs);
44351        children.forEach(recordPosition);
44352        children.forEach(applyTranslation);
44353        // force reflow to put everything in position
44354        // assign to this to avoid being removed in tree-shaking
44355        // $flow-disable-line
44356        this._reflow = document.body.offsetHeight;
44357        children.forEach(function (c) {
44358            if (c.data.moved) {
44359                var el_1 = c.elm;
44360                var s = el_1.style;
44361                addTransitionClass(el_1, moveClass);
44362                s.transform = s.WebkitTransform = s.transitionDuration = '';
44363                el_1.addEventListener(transitionEndEvent, (el_1._moveCb = function cb(e) {
44364                    if (e && e.target !== el_1) {
44365                        return;
44366                    }
44367                    if (!e || /transform$/.test(e.propertyName)) {
44368                        el_1.removeEventListener(transitionEndEvent, cb);
44369                        el_1._moveCb = null;
44370                        removeTransitionClass(el_1, moveClass);
44371                    }
44372                }));
44373            }
44374        });
44375    },
44376    methods: {
44377        hasMove: function (el, moveClass) {
44378            /* istanbul ignore if */
44379            if (!hasTransition) {
44380                return false;
44381            }
44382            /* istanbul ignore if */
44383            if (this._hasMove) {
44384                return this._hasMove;
44385            }
44386            // Detect whether an element with the move class applied has
44387            // CSS transitions. Since the element may be inside an entering
44388            // transition at this very moment, we make a clone of it and remove
44389            // all other transition classes applied to ensure only the move class
44390            // is applied.
44391            var clone = el.cloneNode();
44392            if (el._transitionClasses) {
44393                el._transitionClasses.forEach(function (cls) {
44394                    removeClass(clone, cls);
44395                });
44396            }
44397            addClass(clone, moveClass);
44398            clone.style.display = 'none';
44399            this.$el.appendChild(clone);
44400            var info = getTransitionInfo(clone);
44401            this.$el.removeChild(clone);
44402            return (this._hasMove = info.hasTransform);
44403        }
44404    }
44405};
44406function callPendingCbs(c) {
44407    /* istanbul ignore if */
44408    if (c.elm._moveCb) {
44409        c.elm._moveCb();
44410    }
44411    /* istanbul ignore if */
44412    if (c.elm._enterCb) {
44413        c.elm._enterCb();
44414    }
44415}
44416function recordPosition(c) {
44417    c.data.newPos = c.elm.getBoundingClientRect();
44418}
44419function applyTranslation(c) {
44420    var oldPos = c.data.pos;
44421    var newPos = c.data.newPos;
44422    var dx = oldPos.left - newPos.left;
44423    var dy = oldPos.top - newPos.top;
44424    if (dx || dy) {
44425        c.data.moved = true;
44426        var s = c.elm.style;
44427        s.transform = s.WebkitTransform = "translate(".concat(dx, "px,").concat(dy, "px)");
44428        s.transitionDuration = '0s';
44429    }
44430}
44431
44432var platformComponents = {
44433    Transition: Transition,
44434    TransitionGroup: TransitionGroup
44435};
44436
44437// install platform specific utils
44438Vue.config.mustUseProp = mustUseProp;
44439Vue.config.isReservedTag = isReservedTag;
44440Vue.config.isReservedAttr = isReservedAttr;
44441Vue.config.getTagNamespace = getTagNamespace;
44442Vue.config.isUnknownElement = isUnknownElement;
44443// install platform runtime directives & components
44444extend(Vue.options.directives, platformDirectives);
44445extend(Vue.options.components, platformComponents);
44446// install platform patch function
44447Vue.prototype.__patch__ = inBrowser ? patch : noop;
44448// public mount method
44449Vue.prototype.$mount = function (el, hydrating) {
44450    el = el && inBrowser ? query(el) : undefined;
44451    return mountComponent(this, el, hydrating);
44452};
44453// devtools global hook
44454/* istanbul ignore next */
44455if (inBrowser) {
44456    setTimeout(function () {
44457        if (config.devtools) {
44458            if (devtools) {
44459                devtools.emit('init', Vue);
44460            }
44461            else if (true) {
44462                // @ts-expect-error
44463                console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\n' +
44464                    'https://github.com/vuejs/vue-devtools');
44465            }
44466        }
44467        if ( true &&
44468            config.productionTip !== false &&
44469            typeof console !== 'undefined') {
44470            // @ts-expect-error
44471            console[console.info ? 'info' : 'log']("You are running Vue in development mode.\n" +
44472                "Make sure to turn on production mode when deploying for production.\n" +
44473                "See more tips at https://vuejs.org/guide/deployment.html");
44474        }
44475    }, 0);
44476}
44477
44478var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g;
44479var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
44480var buildRegex = cached(function (delimiters) {
44481    var open = delimiters[0].replace(regexEscapeRE, '\\$&');
44482    var close = delimiters[1].replace(regexEscapeRE, '\\$&');
44483    return new RegExp(open + '((?:.|\\n)+?)' + close, 'g');
44484});
44485function parseText(text, delimiters) {
44486    //@ts-expect-error
44487    var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
44488    if (!tagRE.test(text)) {
44489        return;
44490    }
44491    var tokens = [];
44492    var rawTokens = [];
44493    var lastIndex = (tagRE.lastIndex = 0);
44494    var match, index, tokenValue;
44495    while ((match = tagRE.exec(text))) {
44496        index = match.index;
44497        // push text token
44498        if (index > lastIndex) {
44499            rawTokens.push((tokenValue = text.slice(lastIndex, index)));
44500            tokens.push(JSON.stringify(tokenValue));
44501        }
44502        // tag token
44503        var exp = parseFilters(match[1].trim());
44504        tokens.push("_s(".concat(exp, ")"));
44505        rawTokens.push({ '@binding': exp });
44506        lastIndex = index + match[0].length;
44507    }
44508    if (lastIndex < text.length) {
44509        rawTokens.push((tokenValue = text.slice(lastIndex)));
44510        tokens.push(JSON.stringify(tokenValue));
44511    }
44512    return {
44513        expression: tokens.join('+'),
44514        tokens: rawTokens
44515    };
44516}
44517
44518function transformNode$1(el, options) {
44519    var warn = options.warn || baseWarn;
44520    var staticClass = getAndRemoveAttr(el, 'class');
44521    if ( true && staticClass) {
44522        var res = parseText(staticClass, options.delimiters);
44523        if (res) {
44524            warn("class=\"".concat(staticClass, "\": ") +
44525                'Interpolation inside attributes has been removed. ' +
44526                'Use v-bind or the colon shorthand instead. For example, ' +
44527                'instead of <div class="{{ val }}">, use <div :class="val">.', el.rawAttrsMap['class']);
44528        }
44529    }
44530    if (staticClass) {
44531        el.staticClass = JSON.stringify(staticClass.replace(/\s+/g, ' ').trim());
44532    }
44533    var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
44534    if (classBinding) {
44535        el.classBinding = classBinding;
44536    }
44537}
44538function genData$2(el) {
44539    var data = '';
44540    if (el.staticClass) {
44541        data += "staticClass:".concat(el.staticClass, ",");
44542    }
44543    if (el.classBinding) {
44544        data += "class:".concat(el.classBinding, ",");
44545    }
44546    return data;
44547}
44548var klass = {
44549    staticKeys: ['staticClass'],
44550    transformNode: transformNode$1,
44551    genData: genData$2
44552};
44553
44554function transformNode(el, options) {
44555    var warn = options.warn || baseWarn;
44556    var staticStyle = getAndRemoveAttr(el, 'style');
44557    if (staticStyle) {
44558        /* istanbul ignore if */
44559        if (true) {
44560            var res = parseText(staticStyle, options.delimiters);
44561            if (res) {
44562                warn("style=\"".concat(staticStyle, "\": ") +
44563                    'Interpolation inside attributes has been removed. ' +
44564                    'Use v-bind or the colon shorthand instead. For example, ' +
44565                    'instead of <div style="{{ val }}">, use <div :style="val">.', el.rawAttrsMap['style']);
44566            }
44567        }
44568        el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
44569    }
44570    var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
44571    if (styleBinding) {
44572        el.styleBinding = styleBinding;
44573    }
44574}
44575function genData$1(el) {
44576    var data = '';
44577    if (el.staticStyle) {
44578        data += "staticStyle:".concat(el.staticStyle, ",");
44579    }
44580    if (el.styleBinding) {
44581        data += "style:(".concat(el.styleBinding, "),");
44582    }
44583    return data;
44584}
44585var style = {
44586    staticKeys: ['staticStyle'],
44587    transformNode: transformNode,
44588    genData: genData$1
44589};
44590
44591var decoder;
44592var he = {
44593    decode: function (html) {
44594        decoder = decoder || document.createElement('div');
44595        decoder.innerHTML = html;
44596        return decoder.textContent;
44597    }
44598};
44599
44600var isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
44601    'link,meta,param,source,track,wbr');
44602// Elements that you can, intentionally, leave open
44603// (and which close themselves)
44604var canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');
44605// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
44606// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
44607var isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
44608    'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
44609    'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
44610    'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
44611    'title,tr,track');
44612
44613/**
44614 * Not type-checking this file because it's mostly vendor code.
44615 */
44616// Regular Expressions for parsing tags and attributes
44617var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
44618var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
44619var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(unicodeRegExp.source, "]*");
44620var qnameCapture = "((?:".concat(ncname, "\\:)?").concat(ncname, ")");
44621var startTagOpen = new RegExp("^<".concat(qnameCapture));
44622var startTagClose = /^\s*(\/?)>/;
44623var endTag = new RegExp("^<\\/".concat(qnameCapture, "[^>]*>"));
44624var doctype = /^<!DOCTYPE [^>]+>/i;
44625// #7298: escape - to avoid being passed as HTML comment when inlined in page
44626var comment = /^<!\--/;
44627var conditionalComment = /^<!\[/;
44628// Special Elements (can contain anything)
44629var isPlainTextElement = makeMap('script,style,textarea', true);
44630var reCache = {};
44631var decodingMap = {
44632    '&lt;': '<',
44633    '&gt;': '>',
44634    '&quot;': '"',
44635    '&amp;': '&',
44636    '&#10;': '\n',
44637    '&#9;': '\t',
44638    '&#39;': "'"
44639};
44640var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;
44641var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;
44642// #5992
44643var isIgnoreNewlineTag = makeMap('pre,textarea', true);
44644var shouldIgnoreFirstNewline = function (tag, html) {
44645    return tag && isIgnoreNewlineTag(tag) && html[0] === '\n';
44646};
44647function decodeAttr(value, shouldDecodeNewlines) {
44648    var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
44649    return value.replace(re, function (match) { return decodingMap[match]; });
44650}
44651function parseHTML(html, options) {
44652    var stack = [];
44653    var expectHTML = options.expectHTML;
44654    var isUnaryTag = options.isUnaryTag || no;
44655    var canBeLeftOpenTag = options.canBeLeftOpenTag || no;
44656    var index = 0;
44657    var last, lastTag;
44658    var _loop_1 = function () {
44659        last = html;
44660        // Make sure we're not in a plaintext content element like script/style
44661        if (!lastTag || !isPlainTextElement(lastTag)) {
44662            var textEnd = html.indexOf('<');
44663            if (textEnd === 0) {
44664                // Comment:
44665                if (comment.test(html)) {
44666                    var commentEnd = html.indexOf('-->');
44667                    if (commentEnd >= 0) {
44668                        if (options.shouldKeepComment && options.comment) {
44669                            options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);
44670                        }
44671                        advance(commentEnd + 3);
44672                        return "continue";
44673                    }
44674                }
44675                // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
44676                if (conditionalComment.test(html)) {
44677                    var conditionalEnd = html.indexOf(']>');
44678                    if (conditionalEnd >= 0) {
44679                        advance(conditionalEnd + 2);
44680                        return "continue";
44681                    }
44682                }
44683                // Doctype:
44684                var doctypeMatch = html.match(doctype);
44685                if (doctypeMatch) {
44686                    advance(doctypeMatch[0].length);
44687                    return "continue";
44688                }
44689                // End tag:
44690                var endTagMatch = html.match(endTag);
44691                if (endTagMatch) {
44692                    var curIndex = index;
44693                    advance(endTagMatch[0].length);
44694                    parseEndTag(endTagMatch[1], curIndex, index);
44695                    return "continue";
44696                }
44697                // Start tag:
44698                var startTagMatch = parseStartTag();
44699                if (startTagMatch) {
44700                    handleStartTag(startTagMatch);
44701                    if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
44702                        advance(1);
44703                    }
44704                    return "continue";
44705                }
44706            }
44707            var text = void 0, rest = void 0, next = void 0;
44708            if (textEnd >= 0) {
44709                rest = html.slice(textEnd);
44710                while (!endTag.test(rest) &&
44711                    !startTagOpen.test(rest) &&
44712                    !comment.test(rest) &&
44713                    !conditionalComment.test(rest)) {
44714                    // < in plain text, be forgiving and treat it as text
44715                    next = rest.indexOf('<', 1);
44716                    if (next < 0)
44717                        break;
44718                    textEnd += next;
44719                    rest = html.slice(textEnd);
44720                }
44721                text = html.substring(0, textEnd);
44722            }
44723            if (textEnd < 0) {
44724                text = html;
44725            }
44726            if (text) {
44727                advance(text.length);
44728            }
44729            if (options.chars && text) {
44730                options.chars(text, index - text.length, index);
44731            }
44732        }
44733        else {
44734            var endTagLength_1 = 0;
44735            var stackedTag_1 = lastTag.toLowerCase();
44736            var reStackedTag = reCache[stackedTag_1] ||
44737                (reCache[stackedTag_1] = new RegExp('([\\s\\S]*?)(</' + stackedTag_1 + '[^>]*>)', 'i'));
44738            var rest = html.replace(reStackedTag, function (all, text, endTag) {
44739                endTagLength_1 = endTag.length;
44740                if (!isPlainTextElement(stackedTag_1) && stackedTag_1 !== 'noscript') {
44741                    text = text
44742                        .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
44743                        .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
44744                }
44745                if (shouldIgnoreFirstNewline(stackedTag_1, text)) {
44746                    text = text.slice(1);
44747                }
44748                if (options.chars) {
44749                    options.chars(text);
44750                }
44751                return '';
44752            });
44753            index += html.length - rest.length;
44754            html = rest;
44755            parseEndTag(stackedTag_1, index - endTagLength_1, index);
44756        }
44757        if (html === last) {
44758            options.chars && options.chars(html);
44759            if ( true && !stack.length && options.warn) {
44760                options.warn("Mal-formatted tag at end of template: \"".concat(html, "\""), {
44761                    start: index + html.length
44762                });
44763            }
44764            return "break";
44765        }
44766    };
44767    while (html) {
44768        var state_1 = _loop_1();
44769        if (state_1 === "break")
44770            break;
44771    }
44772    // Clean up any remaining tags
44773    parseEndTag();
44774    function advance(n) {
44775        index += n;
44776        html = html.substring(n);
44777    }
44778    function parseStartTag() {
44779        var start = html.match(startTagOpen);
44780        if (start) {
44781            var match = {
44782                tagName: start[1],
44783                attrs: [],
44784                start: index
44785            };
44786            advance(start[0].length);
44787            var end = void 0, attr = void 0;
44788            while (!(end = html.match(startTagClose)) &&
44789                (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
44790                attr.start = index;
44791                advance(attr[0].length);
44792                attr.end = index;
44793                match.attrs.push(attr);
44794            }
44795            if (end) {
44796                match.unarySlash = end[1];
44797                advance(end[0].length);
44798                match.end = index;
44799                return match;
44800            }
44801        }
44802    }
44803    function handleStartTag(match) {
44804        var tagName = match.tagName;
44805        var unarySlash = match.unarySlash;
44806        if (expectHTML) {
44807            if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
44808                parseEndTag(lastTag);
44809            }
44810            if (canBeLeftOpenTag(tagName) && lastTag === tagName) {
44811                parseEndTag(tagName);
44812            }
44813        }
44814        var unary = isUnaryTag(tagName) || !!unarySlash;
44815        var l = match.attrs.length;
44816        var attrs = new Array(l);
44817        for (var i = 0; i < l; i++) {
44818            var args = match.attrs[i];
44819            var value = args[3] || args[4] || args[5] || '';
44820            var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
44821                ? options.shouldDecodeNewlinesForHref
44822                : options.shouldDecodeNewlines;
44823            attrs[i] = {
44824                name: args[1],
44825                value: decodeAttr(value, shouldDecodeNewlines)
44826            };
44827            if ( true && options.outputSourceRange) {
44828                attrs[i].start = args.start + args[0].match(/^\s*/).length;
44829                attrs[i].end = args.end;
44830            }
44831        }
44832        if (!unary) {
44833            stack.push({
44834                tag: tagName,
44835                lowerCasedTag: tagName.toLowerCase(),
44836                attrs: attrs,
44837                start: match.start,
44838                end: match.end
44839            });
44840            lastTag = tagName;
44841        }
44842        if (options.start) {
44843            options.start(tagName, attrs, unary, match.start, match.end);
44844        }
44845    }
44846    function parseEndTag(tagName, start, end) {
44847        var pos, lowerCasedTagName;
44848        if (start == null)
44849            start = index;
44850        if (end == null)
44851            end = index;
44852        // Find the closest opened tag of the same type
44853        if (tagName) {
44854            lowerCasedTagName = tagName.toLowerCase();
44855            for (pos = stack.length - 1; pos >= 0; pos--) {
44856                if (stack[pos].lowerCasedTag === lowerCasedTagName) {
44857                    break;
44858                }
44859            }
44860        }
44861        else {
44862            // If no tag name is provided, clean shop
44863            pos = 0;
44864        }
44865        if (pos >= 0) {
44866            // Close all the open elements, up the stack
44867            for (var i = stack.length - 1; i >= pos; i--) {
44868                if ( true && (i > pos || !tagName) && options.warn) {
44869                    options.warn("tag <".concat(stack[i].tag, "> has no matching end tag."), {
44870                        start: stack[i].start,
44871                        end: stack[i].end
44872                    });
44873                }
44874                if (options.end) {
44875                    options.end(stack[i].tag, start, end);
44876                }
44877            }
44878            // Remove the open elements from the stack
44879            stack.length = pos;
44880            lastTag = pos && stack[pos - 1].tag;
44881        }
44882        else if (lowerCasedTagName === 'br') {
44883            if (options.start) {
44884                options.start(tagName, [], true, start, end);
44885            }
44886        }
44887        else if (lowerCasedTagName === 'p') {
44888            if (options.start) {
44889                options.start(tagName, [], false, start, end);
44890            }
44891            if (options.end) {
44892                options.end(tagName, start, end);
44893            }
44894        }
44895    }
44896}
44897
44898var onRE = /^@|^v-on:/;
44899var dirRE = /^v-|^@|^:|^#/;
44900var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
44901var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
44902var stripParensRE = /^\(|\)$/g;
44903var dynamicArgRE = /^\[.*\]$/;
44904var argRE = /:(.*)$/;
44905var bindRE = /^:|^\.|^v-bind:/;
44906var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
44907var slotRE = /^v-slot(:|$)|^#/;
44908var lineBreakRE = /[\r\n]/;
44909var whitespaceRE = /[ \f\t\r\n]+/g;
44910var invalidAttributeRE = /[\s"'<>\/=]/;
44911var decodeHTMLCached = cached(he.decode);
44912var emptySlotScopeToken = "_empty_";
44913// configurable state
44914var warn;
44915var delimiters;
44916var transforms;
44917var preTransforms;
44918var postTransforms;
44919var platformIsPreTag;
44920var platformMustUseProp;
44921var platformGetTagNamespace;
44922var maybeComponent;
44923function createASTElement(tag, attrs, parent) {
44924    return {
44925        type: 1,
44926        tag: tag,
44927        attrsList: attrs,
44928        attrsMap: makeAttrsMap(attrs),
44929        rawAttrsMap: {},
44930        parent: parent,
44931        children: []
44932    };
44933}
44934/**
44935 * Convert HTML string to AST.
44936 */
44937function parse(template, options) {
44938    warn = options.warn || baseWarn;
44939    platformIsPreTag = options.isPreTag || no;
44940    platformMustUseProp = options.mustUseProp || no;
44941    platformGetTagNamespace = options.getTagNamespace || no;
44942    var isReservedTag = options.isReservedTag || no;
44943    maybeComponent = function (el) {
44944        return !!(el.component ||
44945            el.attrsMap[':is'] ||
44946            el.attrsMap['v-bind:is'] ||
44947            !(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag)));
44948    };
44949    transforms = pluckModuleFunction(options.modules, 'transformNode');
44950    preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
44951    postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
44952    delimiters = options.delimiters;
44953    var stack = [];
44954    var preserveWhitespace = options.preserveWhitespace !== false;
44955    var whitespaceOption = options.whitespace;
44956    var root;
44957    var currentParent;
44958    var inVPre = false;
44959    var inPre = false;
44960    var warned = false;
44961    function warnOnce(msg, range) {
44962        if (!warned) {
44963            warned = true;
44964            warn(msg, range);
44965        }
44966    }
44967    function closeElement(element) {
44968        trimEndingWhitespace(element);
44969        if (!inVPre && !element.processed) {
44970            element = processElement(element, options);
44971        }
44972        // tree management
44973        if (!stack.length && element !== root) {
44974            // allow root elements with v-if, v-else-if and v-else
44975            if (root.if && (element.elseif || element.else)) {
44976                if (true) {
44977                    checkRootConstraints(element);
44978                }
44979                addIfCondition(root, {
44980                    exp: element.elseif,
44981                    block: element
44982                });
44983            }
44984            else if (true) {
44985                warnOnce("Component template should contain exactly one root element. " +
44986                    "If you are using v-if on multiple elements, " +
44987                    "use v-else-if to chain them instead.", { start: element.start });
44988            }
44989        }
44990        if (currentParent && !element.forbidden) {
44991            if (element.elseif || element.else) {
44992                processIfConditions(element, currentParent);
44993            }
44994            else {
44995                if (element.slotScope) {
44996                    // scoped slot
44997                    // keep it in the children list so that v-else(-if) conditions can
44998                    // find it as the prev node.
44999                    var name_1 = element.slotTarget || '"default"';
45000                    (currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name_1] = element;
45001                }
45002                currentParent.children.push(element);
45003                element.parent = currentParent;
45004            }
45005        }
45006        // final children cleanup
45007        // filter out scoped slots
45008        element.children = element.children.filter(function (c) { return !c.slotScope; });
45009        // remove trailing whitespace node again
45010        trimEndingWhitespace(element);
45011        // check pre state
45012        if (element.pre) {
45013            inVPre = false;
45014        }
45015        if (platformIsPreTag(element.tag)) {
45016            inPre = false;
45017        }
45018        // apply post-transforms
45019        for (var i = 0; i < postTransforms.length; i++) {
45020            postTransforms[i](element, options);
45021        }
45022    }
45023    function trimEndingWhitespace(el) {
45024        // remove trailing whitespace node
45025        if (!inPre) {
45026            var lastNode = void 0;
45027            while ((lastNode = el.children[el.children.length - 1]) &&
45028                lastNode.type === 3 &&
45029                lastNode.text === ' ') {
45030                el.children.pop();
45031            }
45032        }
45033    }
45034    function checkRootConstraints(el) {
45035        if (el.tag === 'slot' || el.tag === 'template') {
45036            warnOnce("Cannot use <".concat(el.tag, "> as component root element because it may ") +
45037                'contain multiple nodes.', { start: el.start });
45038        }
45039        if (el.attrsMap.hasOwnProperty('v-for')) {
45040            warnOnce('Cannot use v-for on stateful component root element because ' +
45041                'it renders multiple elements.', el.rawAttrsMap['v-for']);
45042        }
45043    }
45044    parseHTML(template, {
45045        warn: warn,
45046        expectHTML: options.expectHTML,
45047        isUnaryTag: options.isUnaryTag,
45048        canBeLeftOpenTag: options.canBeLeftOpenTag,
45049        shouldDecodeNewlines: options.shouldDecodeNewlines,
45050        shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
45051        shouldKeepComment: options.comments,
45052        outputSourceRange: options.outputSourceRange,
45053        start: function (tag, attrs, unary, start, end) {
45054            // check namespace.
45055            // inherit parent ns if there is one
45056            var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
45057            // handle IE svg bug
45058            /* istanbul ignore if */
45059            if (isIE && ns === 'svg') {
45060                attrs = guardIESVGBug(attrs);
45061            }
45062            var element = createASTElement(tag, attrs, currentParent);
45063            if (ns) {
45064                element.ns = ns;
45065            }
45066            if (true) {
45067                if (options.outputSourceRange) {
45068                    element.start = start;
45069                    element.end = end;
45070                    element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
45071                        cumulated[attr.name] = attr;
45072                        return cumulated;
45073                    }, {});
45074                }
45075                attrs.forEach(function (attr) {
45076                    if (invalidAttributeRE.test(attr.name)) {
45077                        warn("Invalid dynamic argument expression: attribute names cannot contain " +
45078                            "spaces, quotes, <, >, / or =.", options.outputSourceRange
45079                            ? {
45080                                start: attr.start + attr.name.indexOf("["),
45081                                end: attr.start + attr.name.length
45082                            }
45083                            : undefined);
45084                    }
45085                });
45086            }
45087            if (isForbiddenTag(element) && !isServerRendering()) {
45088                element.forbidden = true;
45089                 true &&
45090                    warn('Templates should only be responsible for mapping the state to the ' +
45091                        'UI. Avoid placing tags with side-effects in your templates, such as ' +
45092                        "<".concat(tag, ">") +
45093                        ', as they will not be parsed.', { start: element.start });
45094            }
45095            // apply pre-transforms
45096            for (var i = 0; i < preTransforms.length; i++) {
45097                element = preTransforms[i](element, options) || element;
45098            }
45099            if (!inVPre) {
45100                processPre(element);
45101                if (element.pre) {
45102                    inVPre = true;
45103                }
45104            }
45105            if (platformIsPreTag(element.tag)) {
45106                inPre = true;
45107            }
45108            if (inVPre) {
45109                processRawAttrs(element);
45110            }
45111            else if (!element.processed) {
45112                // structural directives
45113                processFor(element);
45114                processIf(element);
45115                processOnce(element);
45116            }
45117            if (!root) {
45118                root = element;
45119                if (true) {
45120                    checkRootConstraints(root);
45121                }
45122            }
45123            if (!unary) {
45124                currentParent = element;
45125                stack.push(element);
45126            }
45127            else {
45128                closeElement(element);
45129            }
45130        },
45131        end: function (tag, start, end) {
45132            var element = stack[stack.length - 1];
45133            // pop stack
45134            stack.length -= 1;
45135            currentParent = stack[stack.length - 1];
45136            if ( true && options.outputSourceRange) {
45137                element.end = end;
45138            }
45139            closeElement(element);
45140        },
45141        chars: function (text, start, end) {
45142            if (!currentParent) {
45143                if (true) {
45144                    if (text === template) {
45145                        warnOnce('Component template requires a root element, rather than just text.', { start: start });
45146                    }
45147                    else if ((text = text.trim())) {
45148                        warnOnce("text \"".concat(text, "\" outside root element will be ignored."), {
45149                            start: start
45150                        });
45151                    }
45152                }
45153                return;
45154            }
45155            // IE textarea placeholder bug
45156            /* istanbul ignore if */
45157            if (isIE &&
45158                currentParent.tag === 'textarea' &&
45159                currentParent.attrsMap.placeholder === text) {
45160                return;
45161            }
45162            var children = currentParent.children;
45163            if (inPre || text.trim()) {
45164                text = isTextTag(currentParent)
45165                    ? text
45166                    : decodeHTMLCached(text);
45167            }
45168            else if (!children.length) {
45169                // remove the whitespace-only node right after an opening tag
45170                text = '';
45171            }
45172            else if (whitespaceOption) {
45173                if (whitespaceOption === 'condense') {
45174                    // in condense mode, remove the whitespace node if it contains
45175                    // line break, otherwise condense to a single space
45176                    text = lineBreakRE.test(text) ? '' : ' ';
45177                }
45178                else {
45179                    text = ' ';
45180                }
45181            }
45182            else {
45183                text = preserveWhitespace ? ' ' : '';
45184            }
45185            if (text) {
45186                if (!inPre && whitespaceOption === 'condense') {
45187                    // condense consecutive whitespaces into single space
45188                    text = text.replace(whitespaceRE, ' ');
45189                }
45190                var res = void 0;
45191                var child = void 0;
45192                if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
45193                    child = {
45194                        type: 2,
45195                        expression: res.expression,
45196                        tokens: res.tokens,
45197                        text: text
45198                    };
45199                }
45200                else if (text !== ' ' ||
45201                    !children.length ||
45202                    children[children.length - 1].text !== ' ') {
45203                    child = {
45204                        type: 3,
45205                        text: text
45206                    };
45207                }
45208                if (child) {
45209                    if ( true && options.outputSourceRange) {
45210                        child.start = start;
45211                        child.end = end;
45212                    }
45213                    children.push(child);
45214                }
45215            }
45216        },
45217        comment: function (text, start, end) {
45218            // adding anything as a sibling to the root node is forbidden
45219            // comments should still be allowed, but ignored
45220            if (currentParent) {
45221                var child = {
45222                    type: 3,
45223                    text: text,
45224                    isComment: true
45225                };
45226                if ( true && options.outputSourceRange) {
45227                    child.start = start;
45228                    child.end = end;
45229                }
45230                currentParent.children.push(child);
45231            }
45232        }
45233    });
45234    return root;
45235}
45236function processPre(el) {
45237    if (getAndRemoveAttr(el, 'v-pre') != null) {
45238        el.pre = true;
45239    }
45240}
45241function processRawAttrs(el) {
45242    var list = el.attrsList;
45243    var len = list.length;
45244    if (len) {
45245        var attrs = (el.attrs = new Array(len));
45246        for (var i = 0; i < len; i++) {
45247            attrs[i] = {
45248                name: list[i].name,
45249                value: JSON.stringify(list[i].value)
45250            };
45251            if (list[i].start != null) {
45252                attrs[i].start = list[i].start;
45253                attrs[i].end = list[i].end;
45254            }
45255        }
45256    }
45257    else if (!el.pre) {
45258        // non root node in pre blocks with no attributes
45259        el.plain = true;
45260    }
45261}
45262function processElement(element, options) {
45263    processKey(element);
45264    // determine whether this is a plain element after
45265    // removing structural attributes
45266    element.plain =
45267        !element.key && !element.scopedSlots && !element.attrsList.length;
45268    processRef(element);
45269    processSlotContent(element);
45270    processSlotOutlet(element);
45271    processComponent(element);
45272    for (var i = 0; i < transforms.length; i++) {
45273        element = transforms[i](element, options) || element;
45274    }
45275    processAttrs(element);
45276    return element;
45277}
45278function processKey(el) {
45279    var exp = getBindingAttr(el, 'key');
45280    if (exp) {
45281        if (true) {
45282            if (el.tag === 'template') {
45283                warn("<template> cannot be keyed. Place the key on real elements instead.", getRawBindingAttr(el, 'key'));
45284            }
45285            if (el.for) {
45286                var iterator = el.iterator2 || el.iterator1;
45287                var parent_1 = el.parent;
45288                if (iterator &&
45289                    iterator === exp &&
45290                    parent_1 &&
45291                    parent_1.tag === 'transition-group') {
45292                    warn("Do not use v-for index as key on <transition-group> children, " +
45293                        "this is the same as not using keys.", getRawBindingAttr(el, 'key'), true /* tip */);
45294                }
45295            }
45296        }
45297        el.key = exp;
45298    }
45299}
45300function processRef(el) {
45301    var ref = getBindingAttr(el, 'ref');
45302    if (ref) {
45303        el.ref = ref;
45304        el.refInFor = checkInFor(el);
45305    }
45306}
45307function processFor(el) {
45308    var exp;
45309    if ((exp = getAndRemoveAttr(el, 'v-for'))) {
45310        var res = parseFor(exp);
45311        if (res) {
45312            extend(el, res);
45313        }
45314        else if (true) {
45315            warn("Invalid v-for expression: ".concat(exp), el.rawAttrsMap['v-for']);
45316        }
45317    }
45318}
45319function parseFor(exp) {
45320    var inMatch = exp.match(forAliasRE);
45321    if (!inMatch)
45322        return;
45323    var res = {};
45324    res.for = inMatch[2].trim();
45325    var alias = inMatch[1].trim().replace(stripParensRE, '');
45326    var iteratorMatch = alias.match(forIteratorRE);
45327    if (iteratorMatch) {
45328        res.alias = alias.replace(forIteratorRE, '').trim();
45329        res.iterator1 = iteratorMatch[1].trim();
45330        if (iteratorMatch[2]) {
45331            res.iterator2 = iteratorMatch[2].trim();
45332        }
45333    }
45334    else {
45335        res.alias = alias;
45336    }
45337    return res;
45338}
45339function processIf(el) {
45340    var exp = getAndRemoveAttr(el, 'v-if');
45341    if (exp) {
45342        el.if = exp;
45343        addIfCondition(el, {
45344            exp: exp,
45345            block: el
45346        });
45347    }
45348    else {
45349        if (getAndRemoveAttr(el, 'v-else') != null) {
45350            el.else = true;
45351        }
45352        var elseif = getAndRemoveAttr(el, 'v-else-if');
45353        if (elseif) {
45354            el.elseif = elseif;
45355        }
45356    }
45357}
45358function processIfConditions(el, parent) {
45359    var prev = findPrevElement(parent.children);
45360    if (prev && prev.if) {
45361        addIfCondition(prev, {
45362            exp: el.elseif,
45363            block: el
45364        });
45365    }
45366    else if (true) {
45367        warn("v-".concat(el.elseif ? 'else-if="' + el.elseif + '"' : 'else', " ") +
45368            "used on element <".concat(el.tag, "> without corresponding v-if."), el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']);
45369    }
45370}
45371function findPrevElement(children) {
45372    var i = children.length;
45373    while (i--) {
45374        if (children[i].type === 1) {
45375            return children[i];
45376        }
45377        else {
45378            if ( true && children[i].text !== ' ') {
45379                warn("text \"".concat(children[i].text.trim(), "\" between v-if and v-else(-if) ") +
45380                    "will be ignored.", children[i]);
45381            }
45382            children.pop();
45383        }
45384    }
45385}
45386function addIfCondition(el, condition) {
45387    if (!el.ifConditions) {
45388        el.ifConditions = [];
45389    }
45390    el.ifConditions.push(condition);
45391}
45392function processOnce(el) {
45393    var once = getAndRemoveAttr(el, 'v-once');
45394    if (once != null) {
45395        el.once = true;
45396    }
45397}
45398// handle content being passed to a component as slot,
45399// e.g. <template slot="xxx">, <div slot-scope="xxx">
45400function processSlotContent(el) {
45401    var slotScope;
45402    if (el.tag === 'template') {
45403        slotScope = getAndRemoveAttr(el, 'scope');
45404        /* istanbul ignore if */
45405        if ( true && slotScope) {
45406            warn("the \"scope\" attribute for scoped slots have been deprecated and " +
45407                "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
45408                "can also be used on plain elements in addition to <template> to " +
45409                "denote scoped slots.", el.rawAttrsMap['scope'], true);
45410        }
45411        el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
45412    }
45413    else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
45414        /* istanbul ignore if */
45415        if ( true && el.attrsMap['v-for']) {
45416            warn("Ambiguous combined usage of slot-scope and v-for on <".concat(el.tag, "> ") +
45417                "(v-for takes higher priority). Use a wrapper <template> for the " +
45418                "scoped slot to make it clearer.", el.rawAttrsMap['slot-scope'], true);
45419        }
45420        el.slotScope = slotScope;
45421    }
45422    // slot="xxx"
45423    var slotTarget = getBindingAttr(el, 'slot');
45424    if (slotTarget) {
45425        el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
45426        el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);
45427        // preserve slot as an attribute for native shadow DOM compat
45428        // only for non-scoped slots.
45429        if (el.tag !== 'template' && !el.slotScope) {
45430            addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));
45431        }
45432    }
45433    // 2.6 v-slot syntax
45434    {
45435        if (el.tag === 'template') {
45436            // v-slot on <template>
45437            var slotBinding = getAndRemoveAttrByRegex(el, slotRE);
45438            if (slotBinding) {
45439                if (true) {
45440                    if (el.slotTarget || el.slotScope) {
45441                        warn("Unexpected mixed usage of different slot syntaxes.", el);
45442                    }
45443                    if (el.parent && !maybeComponent(el.parent)) {
45444                        warn("<template v-slot> can only appear at the root level inside " +
45445                            "the receiving component", el);
45446                    }
45447                }
45448                var _a = getSlotName(slotBinding), name_2 = _a.name, dynamic = _a.dynamic;
45449                el.slotTarget = name_2;
45450                el.slotTargetDynamic = dynamic;
45451                el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf
45452            }
45453        }
45454        else {
45455            // v-slot on component, denotes default slot
45456            var slotBinding = getAndRemoveAttrByRegex(el, slotRE);
45457            if (slotBinding) {
45458                if (true) {
45459                    if (!maybeComponent(el)) {
45460                        warn("v-slot can only be used on components or <template>.", slotBinding);
45461                    }
45462                    if (el.slotScope || el.slotTarget) {
45463                        warn("Unexpected mixed usage of different slot syntaxes.", el);
45464                    }
45465                    if (el.scopedSlots) {
45466                        warn("To avoid scope ambiguity, the default slot should also use " +
45467                            "<template> syntax when there are other named slots.", slotBinding);
45468                    }
45469                }
45470                // add the component's children to its default slot
45471                var slots = el.scopedSlots || (el.scopedSlots = {});
45472                var _b = getSlotName(slotBinding), name_3 = _b.name, dynamic = _b.dynamic;
45473                var slotContainer_1 = (slots[name_3] = createASTElement('template', [], el));
45474                slotContainer_1.slotTarget = name_3;
45475                slotContainer_1.slotTargetDynamic = dynamic;
45476                slotContainer_1.children = el.children.filter(function (c) {
45477                    if (!c.slotScope) {
45478                        c.parent = slotContainer_1;
45479                        return true;
45480                    }
45481                });
45482                slotContainer_1.slotScope = slotBinding.value || emptySlotScopeToken;
45483                // remove children as they are returned from scopedSlots now
45484                el.children = [];
45485                // mark el non-plain so data gets generated
45486                el.plain = false;
45487            }
45488        }
45489    }
45490}
45491function getSlotName(binding) {
45492    var name = binding.name.replace(slotRE, '');
45493    if (!name) {
45494        if (binding.name[0] !== '#') {
45495            name = 'default';
45496        }
45497        else if (true) {
45498            warn("v-slot shorthand syntax requires a slot name.", binding);
45499        }
45500    }
45501    return dynamicArgRE.test(name)
45502        ? // dynamic [name]
45503            { name: name.slice(1, -1), dynamic: true }
45504        : // static name
45505            { name: "\"".concat(name, "\""), dynamic: false };
45506}
45507// handle <slot/> outlets
45508function processSlotOutlet(el) {
45509    if (el.tag === 'slot') {
45510        el.slotName = getBindingAttr(el, 'name');
45511        if ( true && el.key) {
45512            warn("`key` does not work on <slot> because slots are abstract outlets " +
45513                "and can possibly expand into multiple elements. " +
45514                "Use the key on a wrapping element instead.", getRawBindingAttr(el, 'key'));
45515        }
45516    }
45517}
45518function processComponent(el) {
45519    var binding;
45520    if ((binding = getBindingAttr(el, 'is'))) {
45521        el.component = binding;
45522    }
45523    if (getAndRemoveAttr(el, 'inline-template') != null) {
45524        el.inlineTemplate = true;
45525    }
45526}
45527function processAttrs(el) {
45528    var list = el.attrsList;
45529    var i, l, name, rawName, value, modifiers, syncGen, isDynamic;
45530    for (i = 0, l = list.length; i < l; i++) {
45531        name = rawName = list[i].name;
45532        value = list[i].value;
45533        if (dirRE.test(name)) {
45534            // mark element as dynamic
45535            el.hasBindings = true;
45536            // modifiers
45537            modifiers = parseModifiers(name.replace(dirRE, ''));
45538            // support .foo shorthand syntax for the .prop modifier
45539            if (modifiers) {
45540                name = name.replace(modifierRE, '');
45541            }
45542            if (bindRE.test(name)) {
45543                // v-bind
45544                name = name.replace(bindRE, '');
45545                value = parseFilters(value);
45546                isDynamic = dynamicArgRE.test(name);
45547                if (isDynamic) {
45548                    name = name.slice(1, -1);
45549                }
45550                if ( true && value.trim().length === 0) {
45551                    warn("The value for a v-bind expression cannot be empty. Found in \"v-bind:".concat(name, "\""));
45552                }
45553                if (modifiers) {
45554                    if (modifiers.prop && !isDynamic) {
45555                        name = camelize(name);
45556                        if (name === 'innerHtml')
45557                            name = 'innerHTML';
45558                    }
45559                    if (modifiers.camel && !isDynamic) {
45560                        name = camelize(name);
45561                    }
45562                    if (modifiers.sync) {
45563                        syncGen = genAssignmentCode(value, "$event");
45564                        if (!isDynamic) {
45565                            addHandler(el, "update:".concat(camelize(name)), syncGen, null, false, warn, list[i]);
45566                            if (hyphenate(name) !== camelize(name)) {
45567                                addHandler(el, "update:".concat(hyphenate(name)), syncGen, null, false, warn, list[i]);
45568                            }
45569                        }
45570                        else {
45571                            // handler w/ dynamic event name
45572                            addHandler(el, "\"update:\"+(".concat(name, ")"), syncGen, null, false, warn, list[i], true // dynamic
45573                            );
45574                        }
45575                    }
45576                }
45577                if ((modifiers && modifiers.prop) ||
45578                    (!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name))) {
45579                    addProp(el, name, value, list[i], isDynamic);
45580                }
45581                else {
45582                    addAttr(el, name, value, list[i], isDynamic);
45583                }
45584            }
45585            else if (onRE.test(name)) {
45586                // v-on
45587                name = name.replace(onRE, '');
45588                isDynamic = dynamicArgRE.test(name);
45589                if (isDynamic) {
45590                    name = name.slice(1, -1);
45591                }
45592                addHandler(el, name, value, modifiers, false, warn, list[i], isDynamic);
45593            }
45594            else {
45595                // normal directives
45596                name = name.replace(dirRE, '');
45597                // parse arg
45598                var argMatch = name.match(argRE);
45599                var arg = argMatch && argMatch[1];
45600                isDynamic = false;
45601                if (arg) {
45602                    name = name.slice(0, -(arg.length + 1));
45603                    if (dynamicArgRE.test(arg)) {
45604                        arg = arg.slice(1, -1);
45605                        isDynamic = true;
45606                    }
45607                }
45608                addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);
45609                if ( true && name === 'model') {
45610                    checkForAliasModel(el, value);
45611                }
45612            }
45613        }
45614        else {
45615            // literal attribute
45616            if (true) {
45617                var res = parseText(value, delimiters);
45618                if (res) {
45619                    warn("".concat(name, "=\"").concat(value, "\": ") +
45620                        'Interpolation inside attributes has been removed. ' +
45621                        'Use v-bind or the colon shorthand instead. For example, ' +
45622                        'instead of <div id="{{ val }}">, use <div :id="val">.', list[i]);
45623                }
45624            }
45625            addAttr(el, name, JSON.stringify(value), list[i]);
45626            // #6887 firefox doesn't update muted state if set via attribute
45627            // even immediately after element creation
45628            if (!el.component &&
45629                name === 'muted' &&
45630                platformMustUseProp(el.tag, el.attrsMap.type, name)) {
45631                addProp(el, name, 'true', list[i]);
45632            }
45633        }
45634    }
45635}
45636function checkInFor(el) {
45637    var parent = el;
45638    while (parent) {
45639        if (parent.for !== undefined) {
45640            return true;
45641        }
45642        parent = parent.parent;
45643    }
45644    return false;
45645}
45646function parseModifiers(name) {
45647    var match = name.match(modifierRE);
45648    if (match) {
45649        var ret_1 = {};
45650        match.forEach(function (m) {
45651            ret_1[m.slice(1)] = true;
45652        });
45653        return ret_1;
45654    }
45655}
45656function makeAttrsMap(attrs) {
45657    var map = {};
45658    for (var i = 0, l = attrs.length; i < l; i++) {
45659        if ( true && map[attrs[i].name] && !isIE && !isEdge) {
45660            warn('duplicate attribute: ' + attrs[i].name, attrs[i]);
45661        }
45662        map[attrs[i].name] = attrs[i].value;
45663    }
45664    return map;
45665}
45666// for script (e.g. type="x/template") or style, do not decode content
45667function isTextTag(el) {
45668    return el.tag === 'script' || el.tag === 'style';
45669}
45670function isForbiddenTag(el) {
45671    return (el.tag === 'style' ||
45672        (el.tag === 'script' &&
45673            (!el.attrsMap.type || el.attrsMap.type === 'text/javascript')));
45674}
45675var ieNSBug = /^xmlns:NS\d+/;
45676var ieNSPrefix = /^NS\d+:/;
45677/* istanbul ignore next */
45678function guardIESVGBug(attrs) {
45679    var res = [];
45680    for (var i = 0; i < attrs.length; i++) {
45681        var attr = attrs[i];
45682        if (!ieNSBug.test(attr.name)) {
45683            attr.name = attr.name.replace(ieNSPrefix, '');
45684            res.push(attr);
45685        }
45686    }
45687    return res;
45688}
45689function checkForAliasModel(el, value) {
45690    var _el = el;
45691    while (_el) {
45692        if (_el.for && _el.alias === value) {
45693            warn("<".concat(el.tag, " v-model=\"").concat(value, "\">: ") +
45694                "You are binding v-model directly to a v-for iteration alias. " +
45695                "This will not be able to modify the v-for source array because " +
45696                "writing to the alias is like modifying a function local variable. " +
45697                "Consider using an array of objects and use v-model on an object property instead.", el.rawAttrsMap['v-model']);
45698        }
45699        _el = _el.parent;
45700    }
45701}
45702
45703/**
45704 * Expand input[v-model] with dynamic type bindings into v-if-else chains
45705 * Turn this:
45706 *   <input v-model="data[type]" :type="type">
45707 * into this:
45708 *   <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]">
45709 *   <input v-else-if="type === 'radio'" type="radio" v-model="data[type]">
45710 *   <input v-else :type="type" v-model="data[type]">
45711 */
45712function preTransformNode(el, options) {
45713    if (el.tag === 'input') {
45714        var map = el.attrsMap;
45715        if (!map['v-model']) {
45716            return;
45717        }
45718        var typeBinding = void 0;
45719        if (map[':type'] || map['v-bind:type']) {
45720            typeBinding = getBindingAttr(el, 'type');
45721        }
45722        if (!map.type && !typeBinding && map['v-bind']) {
45723            typeBinding = "(".concat(map['v-bind'], ").type");
45724        }
45725        if (typeBinding) {
45726            var ifCondition = getAndRemoveAttr(el, 'v-if', true);
45727            var ifConditionExtra = ifCondition ? "&&(".concat(ifCondition, ")") : "";
45728            var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
45729            var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
45730            // 1. checkbox
45731            var branch0 = cloneASTElement(el);
45732            // process for on the main node
45733            processFor(branch0);
45734            addRawAttr(branch0, 'type', 'checkbox');
45735            processElement(branch0, options);
45736            branch0.processed = true; // prevent it from double-processed
45737            branch0.if = "(".concat(typeBinding, ")==='checkbox'") + ifConditionExtra;
45738            addIfCondition(branch0, {
45739                exp: branch0.if,
45740                block: branch0
45741            });
45742            // 2. add radio else-if condition
45743            var branch1 = cloneASTElement(el);
45744            getAndRemoveAttr(branch1, 'v-for', true);
45745            addRawAttr(branch1, 'type', 'radio');
45746            processElement(branch1, options);
45747            addIfCondition(branch0, {
45748                exp: "(".concat(typeBinding, ")==='radio'") + ifConditionExtra,
45749                block: branch1
45750            });
45751            // 3. other
45752            var branch2 = cloneASTElement(el);
45753            getAndRemoveAttr(branch2, 'v-for', true);
45754            addRawAttr(branch2, ':type', typeBinding);
45755            processElement(branch2, options);
45756            addIfCondition(branch0, {
45757                exp: ifCondition,
45758                block: branch2
45759            });
45760            if (hasElse) {
45761                branch0.else = true;
45762            }
45763            else if (elseIfCondition) {
45764                branch0.elseif = elseIfCondition;
45765            }
45766            return branch0;
45767        }
45768    }
45769}
45770function cloneASTElement(el) {
45771    return createASTElement(el.tag, el.attrsList.slice(), el.parent);
45772}
45773var model = {
45774    preTransformNode: preTransformNode
45775};
45776
45777var modules = [klass, style, model];
45778
45779function text(el, dir) {
45780    if (dir.value) {
45781        addProp(el, 'textContent', "_s(".concat(dir.value, ")"), dir);
45782    }
45783}
45784
45785function html(el, dir) {
45786    if (dir.value) {
45787        addProp(el, 'innerHTML', "_s(".concat(dir.value, ")"), dir);
45788    }
45789}
45790
45791var directives = {
45792    model: model$1,
45793    text: text,
45794    html: html
45795};
45796
45797var baseOptions = {
45798    expectHTML: true,
45799    modules: modules,
45800    directives: directives,
45801    isPreTag: isPreTag,
45802    isUnaryTag: isUnaryTag,
45803    mustUseProp: mustUseProp,
45804    canBeLeftOpenTag: canBeLeftOpenTag,
45805    isReservedTag: isReservedTag,
45806    getTagNamespace: getTagNamespace,
45807    staticKeys: genStaticKeys$1(modules)
45808};
45809
45810var isStaticKey;
45811var isPlatformReservedTag;
45812var genStaticKeysCached = cached(genStaticKeys);
45813/**
45814 * Goal of the optimizer: walk the generated template AST tree
45815 * and detect sub-trees that are purely static, i.e. parts of
45816 * the DOM that never needs to change.
45817 *
45818 * Once we detect these sub-trees, we can:
45819 *
45820 * 1. Hoist them into constants, so that we no longer need to
45821 *    create fresh nodes for them on each re-render;
45822 * 2. Completely skip them in the patching process.
45823 */
45824function optimize(root, options) {
45825    if (!root)
45826        return;
45827    isStaticKey = genStaticKeysCached(options.staticKeys || '');
45828    isPlatformReservedTag = options.isReservedTag || no;
45829    // first pass: mark all non-static nodes.
45830    markStatic(root);
45831    // second pass: mark static roots.
45832    markStaticRoots(root, false);
45833}
45834function genStaticKeys(keys) {
45835    return makeMap('type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +
45836        (keys ? ',' + keys : ''));
45837}
45838function markStatic(node) {
45839    node.static = isStatic(node);
45840    if (node.type === 1) {
45841        // do not make component slot content static. this avoids
45842        // 1. components not able to mutate slot nodes
45843        // 2. static slot content fails for hot-reloading
45844        if (!isPlatformReservedTag(node.tag) &&
45845            node.tag !== 'slot' &&
45846            node.attrsMap['inline-template'] == null) {
45847            return;
45848        }
45849        for (var i = 0, l = node.children.length; i < l; i++) {
45850            var child = node.children[i];
45851            markStatic(child);
45852            if (!child.static) {
45853                node.static = false;
45854            }
45855        }
45856        if (node.ifConditions) {
45857            for (var i = 1, l = node.ifConditions.length; i < l; i++) {
45858                var block = node.ifConditions[i].block;
45859                markStatic(block);
45860                if (!block.static) {
45861                    node.static = false;
45862                }
45863            }
45864        }
45865    }
45866}
45867function markStaticRoots(node, isInFor) {
45868    if (node.type === 1) {
45869        if (node.static || node.once) {
45870            node.staticInFor = isInFor;
45871        }
45872        // For a node to qualify as a static root, it should have children that
45873        // are not just static text. Otherwise the cost of hoisting out will
45874        // outweigh the benefits and it's better off to just always render it fresh.
45875        if (node.static &&
45876            node.children.length &&
45877            !(node.children.length === 1 && node.children[0].type === 3)) {
45878            node.staticRoot = true;
45879            return;
45880        }
45881        else {
45882            node.staticRoot = false;
45883        }
45884        if (node.children) {
45885            for (var i = 0, l = node.children.length; i < l; i++) {
45886                markStaticRoots(node.children[i], isInFor || !!node.for);
45887            }
45888        }
45889        if (node.ifConditions) {
45890            for (var i = 1, l = node.ifConditions.length; i < l; i++) {
45891                markStaticRoots(node.ifConditions[i].block, isInFor);
45892            }
45893        }
45894    }
45895}
45896function isStatic(node) {
45897    if (node.type === 2) {
45898        // expression
45899        return false;
45900    }
45901    if (node.type === 3) {
45902        // text
45903        return true;
45904    }
45905    return !!(node.pre ||
45906        (!node.hasBindings && // no dynamic bindings
45907            !node.if &&
45908            !node.for && // not v-if or v-for or v-else
45909            !isBuiltInTag(node.tag) && // not a built-in
45910            isPlatformReservedTag(node.tag) && // not a component
45911            !isDirectChildOfTemplateFor(node) &&
45912            Object.keys(node).every(isStaticKey)));
45913}
45914function isDirectChildOfTemplateFor(node) {
45915    while (node.parent) {
45916        node = node.parent;
45917        if (node.tag !== 'template') {
45918            return false;
45919        }
45920        if (node.for) {
45921            return true;
45922        }
45923    }
45924    return false;
45925}
45926
45927var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/;
45928var fnInvokeRE = /\([^)]*?\);*$/;
45929var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
45930// KeyboardEvent.keyCode aliases
45931var keyCodes = {
45932    esc: 27,
45933    tab: 9,
45934    enter: 13,
45935    space: 32,
45936    up: 38,
45937    left: 37,
45938    right: 39,
45939    down: 40,
45940    delete: [8, 46]
45941};
45942// KeyboardEvent.key aliases
45943var keyNames = {
45944    // #7880: IE11 and Edge use `Esc` for Escape key name.
45945    esc: ['Esc', 'Escape'],
45946    tab: 'Tab',
45947    enter: 'Enter',
45948    // #9112: IE11 uses `Spacebar` for Space key name.
45949    space: [' ', 'Spacebar'],
45950    // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
45951    up: ['Up', 'ArrowUp'],
45952    left: ['Left', 'ArrowLeft'],
45953    right: ['Right', 'ArrowRight'],
45954    down: ['Down', 'ArrowDown'],
45955    // #9112: IE11 uses `Del` for Delete key name.
45956    delete: ['Backspace', 'Delete', 'Del']
45957};
45958// #4868: modifiers that prevent the execution of the listener
45959// need to explicitly return null so that we can determine whether to remove
45960// the listener for .once
45961var genGuard = function (condition) { return "if(".concat(condition, ")return null;"); };
45962var modifierCode = {
45963    stop: '$event.stopPropagation();',
45964    prevent: '$event.preventDefault();',
45965    self: genGuard("$event.target !== $event.currentTarget"),
45966    ctrl: genGuard("!$event.ctrlKey"),
45967    shift: genGuard("!$event.shiftKey"),
45968    alt: genGuard("!$event.altKey"),
45969    meta: genGuard("!$event.metaKey"),
45970    left: genGuard("'button' in $event && $event.button !== 0"),
45971    middle: genGuard("'button' in $event && $event.button !== 1"),
45972    right: genGuard("'button' in $event && $event.button !== 2")
45973};
45974function genHandlers(events, isNative) {
45975    var prefix = isNative ? 'nativeOn:' : 'on:';
45976    var staticHandlers = "";
45977    var dynamicHandlers = "";
45978    for (var name_1 in events) {
45979        var handlerCode = genHandler(events[name_1]);
45980        //@ts-expect-error
45981        if (events[name_1] && events[name_1].dynamic) {
45982            dynamicHandlers += "".concat(name_1, ",").concat(handlerCode, ",");
45983        }
45984        else {
45985            staticHandlers += "\"".concat(name_1, "\":").concat(handlerCode, ",");
45986        }
45987    }
45988    staticHandlers = "{".concat(staticHandlers.slice(0, -1), "}");
45989    if (dynamicHandlers) {
45990        return prefix + "_d(".concat(staticHandlers, ",[").concat(dynamicHandlers.slice(0, -1), "])");
45991    }
45992    else {
45993        return prefix + staticHandlers;
45994    }
45995}
45996function genHandler(handler) {
45997    if (!handler) {
45998        return 'function(){}';
45999    }
46000    if (Array.isArray(handler)) {
46001        return "[".concat(handler.map(function (handler) { return genHandler(handler); }).join(','), "]");
46002    }
46003    var isMethodPath = simplePathRE.test(handler.value);
46004    var isFunctionExpression = fnExpRE.test(handler.value);
46005    var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));
46006    if (!handler.modifiers) {
46007        if (isMethodPath || isFunctionExpression) {
46008            return handler.value;
46009        }
46010        return "function($event){".concat(isFunctionInvocation ? "return ".concat(handler.value) : handler.value, "}"); // inline statement
46011    }
46012    else {
46013        var code = '';
46014        var genModifierCode = '';
46015        var keys = [];
46016        var _loop_1 = function (key) {
46017            if (modifierCode[key]) {
46018                genModifierCode += modifierCode[key];
46019                // left/right
46020                if (keyCodes[key]) {
46021                    keys.push(key);
46022                }
46023            }
46024            else if (key === 'exact') {
46025                var modifiers_1 = handler.modifiers;
46026                genModifierCode += genGuard(['ctrl', 'shift', 'alt', 'meta']
46027                    .filter(function (keyModifier) { return !modifiers_1[keyModifier]; })
46028                    .map(function (keyModifier) { return "$event.".concat(keyModifier, "Key"); })
46029                    .join('||'));
46030            }
46031            else {
46032                keys.push(key);
46033            }
46034        };
46035        for (var key in handler.modifiers) {
46036            _loop_1(key);
46037        }
46038        if (keys.length) {
46039            code += genKeyFilter(keys);
46040        }
46041        // Make sure modifiers like prevent and stop get executed after key filtering
46042        if (genModifierCode) {
46043            code += genModifierCode;
46044        }
46045        var handlerCode = isMethodPath
46046            ? "return ".concat(handler.value, ".apply(null, arguments)")
46047            : isFunctionExpression
46048                ? "return (".concat(handler.value, ").apply(null, arguments)")
46049                : isFunctionInvocation
46050                    ? "return ".concat(handler.value)
46051                    : handler.value;
46052        return "function($event){".concat(code).concat(handlerCode, "}");
46053    }
46054}
46055function genKeyFilter(keys) {
46056    return (
46057    // make sure the key filters only apply to KeyboardEvents
46058    // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake
46059    // key events that do not have keyCode property...
46060    "if(!$event.type.indexOf('key')&&" +
46061        "".concat(keys.map(genFilterCode).join('&&'), ")return null;"));
46062}
46063function genFilterCode(key) {
46064    var keyVal = parseInt(key, 10);
46065    if (keyVal) {
46066        return "$event.keyCode!==".concat(keyVal);
46067    }
46068    var keyCode = keyCodes[key];
46069    var keyName = keyNames[key];
46070    return ("_k($event.keyCode," +
46071        "".concat(JSON.stringify(key), ",") +
46072        "".concat(JSON.stringify(keyCode), ",") +
46073        "$event.key," +
46074        "".concat(JSON.stringify(keyName)) +
46075        ")");
46076}
46077
46078function on(el, dir) {
46079    if ( true && dir.modifiers) {
46080        warn$2("v-on without argument does not support modifiers.");
46081    }
46082    el.wrapListeners = function (code) { return "_g(".concat(code, ",").concat(dir.value, ")"); };
46083}
46084
46085function bind(el, dir) {
46086    el.wrapData = function (code) {
46087        return "_b(".concat(code, ",'").concat(el.tag, "',").concat(dir.value, ",").concat(dir.modifiers && dir.modifiers.prop ? 'true' : 'false').concat(dir.modifiers && dir.modifiers.sync ? ',true' : '', ")");
46088    };
46089}
46090
46091var baseDirectives = {
46092    on: on,
46093    bind: bind,
46094    cloak: noop
46095};
46096
46097var CodegenState = /** @class */ (function () {
46098    function CodegenState(options) {
46099        this.options = options;
46100        this.warn = options.warn || baseWarn;
46101        this.transforms = pluckModuleFunction(options.modules, 'transformCode');
46102        this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
46103        this.directives = extend(extend({}, baseDirectives), options.directives);
46104        var isReservedTag = options.isReservedTag || no;
46105        this.maybeComponent = function (el) {
46106            return !!el.component || !isReservedTag(el.tag);
46107        };
46108        this.onceId = 0;
46109        this.staticRenderFns = [];
46110        this.pre = false;
46111    }
46112    return CodegenState;
46113}());
46114function generate(ast, options) {
46115    var state = new CodegenState(options);
46116    // fix #11483, Root level <script> tags should not be rendered.
46117    var code = ast
46118        ? ast.tag === 'script'
46119            ? 'null'
46120            : genElement(ast, state)
46121        : '_c("div")';
46122    return {
46123        render: "with(this){return ".concat(code, "}"),
46124        staticRenderFns: state.staticRenderFns
46125    };
46126}
46127function genElement(el, state) {
46128    if (el.parent) {
46129        el.pre = el.pre || el.parent.pre;
46130    }
46131    if (el.staticRoot && !el.staticProcessed) {
46132        return genStatic(el, state);
46133    }
46134    else if (el.once && !el.onceProcessed) {
46135        return genOnce(el, state);
46136    }
46137    else if (el.for && !el.forProcessed) {
46138        return genFor(el, state);
46139    }
46140    else if (el.if && !el.ifProcessed) {
46141        return genIf(el, state);
46142    }
46143    else if (el.tag === 'template' && !el.slotTarget && !state.pre) {
46144        return genChildren(el, state) || 'void 0';
46145    }
46146    else if (el.tag === 'slot') {
46147        return genSlot(el, state);
46148    }
46149    else {
46150        // component or element
46151        var code = void 0;
46152        if (el.component) {
46153            code = genComponent(el.component, el, state);
46154        }
46155        else {
46156            var data = void 0;
46157            var maybeComponent = state.maybeComponent(el);
46158            if (!el.plain || (el.pre && maybeComponent)) {
46159                data = genData(el, state);
46160            }
46161            var tag 
46162            // check if this is a component in <script setup>
46163            = void 0;
46164            // check if this is a component in <script setup>
46165            var bindings = state.options.bindings;
46166            if (maybeComponent && bindings && bindings.__isScriptSetup !== false) {
46167                tag = checkBindingType(bindings, el.tag);
46168            }
46169            if (!tag)
46170                tag = "'".concat(el.tag, "'");
46171            var children = el.inlineTemplate ? null : genChildren(el, state, true);
46172            code = "_c(".concat(tag).concat(data ? ",".concat(data) : '' // data
46173            ).concat(children ? ",".concat(children) : '' // children
46174            , ")");
46175        }
46176        // module transforms
46177        for (var i = 0; i < state.transforms.length; i++) {
46178            code = state.transforms[i](el, code);
46179        }
46180        return code;
46181    }
46182}
46183function checkBindingType(bindings, key) {
46184    var camelName = camelize(key);
46185    var PascalName = capitalize(camelName);
46186    var checkType = function (type) {
46187        if (bindings[key] === type) {
46188            return key;
46189        }
46190        if (bindings[camelName] === type) {
46191            return camelName;
46192        }
46193        if (bindings[PascalName] === type) {
46194            return PascalName;
46195        }
46196    };
46197    var fromConst = checkType("setup-const" /* BindingTypes.SETUP_CONST */) ||
46198        checkType("setup-reactive-const" /* BindingTypes.SETUP_REACTIVE_CONST */);
46199    if (fromConst) {
46200        return fromConst;
46201    }
46202    var fromMaybeRef = checkType("setup-let" /* BindingTypes.SETUP_LET */) ||
46203        checkType("setup-ref" /* BindingTypes.SETUP_REF */) ||
46204        checkType("setup-maybe-ref" /* BindingTypes.SETUP_MAYBE_REF */);
46205    if (fromMaybeRef) {
46206        return fromMaybeRef;
46207    }
46208}
46209// hoist static sub-trees out
46210function genStatic(el, state) {
46211    el.staticProcessed = true;
46212    // Some elements (templates) need to behave differently inside of a v-pre
46213    // node.  All pre nodes are static roots, so we can use this as a location to
46214    // wrap a state change and reset it upon exiting the pre node.
46215    var originalPreState = state.pre;
46216    if (el.pre) {
46217        state.pre = el.pre;
46218    }
46219    state.staticRenderFns.push("with(this){return ".concat(genElement(el, state), "}"));
46220    state.pre = originalPreState;
46221    return "_m(".concat(state.staticRenderFns.length - 1).concat(el.staticInFor ? ',true' : '', ")");
46222}
46223// v-once
46224function genOnce(el, state) {
46225    el.onceProcessed = true;
46226    if (el.if && !el.ifProcessed) {
46227        return genIf(el, state);
46228    }
46229    else if (el.staticInFor) {
46230        var key = '';
46231        var parent_1 = el.parent;
46232        while (parent_1) {
46233            if (parent_1.for) {
46234                key = parent_1.key;
46235                break;
46236            }
46237            parent_1 = parent_1.parent;
46238        }
46239        if (!key) {
46240             true &&
46241                state.warn("v-once can only be used inside v-for that is keyed. ", el.rawAttrsMap['v-once']);
46242            return genElement(el, state);
46243        }
46244        return "_o(".concat(genElement(el, state), ",").concat(state.onceId++, ",").concat(key, ")");
46245    }
46246    else {
46247        return genStatic(el, state);
46248    }
46249}
46250function genIf(el, state, altGen, altEmpty) {
46251    el.ifProcessed = true; // avoid recursion
46252    return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty);
46253}
46254function genIfConditions(conditions, state, altGen, altEmpty) {
46255    if (!conditions.length) {
46256        return altEmpty || '_e()';
46257    }
46258    var condition = conditions.shift();
46259    if (condition.exp) {
46260        return "(".concat(condition.exp, ")?").concat(genTernaryExp(condition.block), ":").concat(genIfConditions(conditions, state, altGen, altEmpty));
46261    }
46262    else {
46263        return "".concat(genTernaryExp(condition.block));
46264    }
46265    // v-if with v-once should generate code like (a)?_m(0):_m(1)
46266    function genTernaryExp(el) {
46267        return altGen
46268            ? altGen(el, state)
46269            : el.once
46270                ? genOnce(el, state)
46271                : genElement(el, state);
46272    }
46273}
46274function genFor(el, state, altGen, altHelper) {
46275    var exp = el.for;
46276    var alias = el.alias;
46277    var iterator1 = el.iterator1 ? ",".concat(el.iterator1) : '';
46278    var iterator2 = el.iterator2 ? ",".concat(el.iterator2) : '';
46279    if ( true &&
46280        state.maybeComponent(el) &&
46281        el.tag !== 'slot' &&
46282        el.tag !== 'template' &&
46283        !el.key) {
46284        state.warn("<".concat(el.tag, " v-for=\"").concat(alias, " in ").concat(exp, "\">: component lists rendered with ") +
46285            "v-for should have explicit keys. " +
46286            "See https://vuejs.org/guide/list.html#key for more info.", el.rawAttrsMap['v-for'], true /* tip */);
46287    }
46288    el.forProcessed = true; // avoid recursion
46289    return ("".concat(altHelper || '_l', "((").concat(exp, "),") +
46290        "function(".concat(alias).concat(iterator1).concat(iterator2, "){") +
46291        "return ".concat((altGen || genElement)(el, state)) +
46292        '})');
46293}
46294function genData(el, state) {
46295    var data = '{';
46296    // directives first.
46297    // directives may mutate the el's other properties before they are generated.
46298    var dirs = genDirectives(el, state);
46299    if (dirs)
46300        data += dirs + ',';
46301    // key
46302    if (el.key) {
46303        data += "key:".concat(el.key, ",");
46304    }
46305    // ref
46306    if (el.ref) {
46307        data += "ref:".concat(el.ref, ",");
46308    }
46309    if (el.refInFor) {
46310        data += "refInFor:true,";
46311    }
46312    // pre
46313    if (el.pre) {
46314        data += "pre:true,";
46315    }
46316    // record original tag name for components using "is" attribute
46317    if (el.component) {
46318        data += "tag:\"".concat(el.tag, "\",");
46319    }
46320    // module data generation functions
46321    for (var i = 0; i < state.dataGenFns.length; i++) {
46322        data += state.dataGenFns[i](el);
46323    }
46324    // attributes
46325    if (el.attrs) {
46326        data += "attrs:".concat(genProps(el.attrs), ",");
46327    }
46328    // DOM props
46329    if (el.props) {
46330        data += "domProps:".concat(genProps(el.props), ",");
46331    }
46332    // event handlers
46333    if (el.events) {
46334        data += "".concat(genHandlers(el.events, false), ",");
46335    }
46336    if (el.nativeEvents) {
46337        data += "".concat(genHandlers(el.nativeEvents, true), ",");
46338    }
46339    // slot target
46340    // only for non-scoped slots
46341    if (el.slotTarget && !el.slotScope) {
46342        data += "slot:".concat(el.slotTarget, ",");
46343    }
46344    // scoped slots
46345    if (el.scopedSlots) {
46346        data += "".concat(genScopedSlots(el, el.scopedSlots, state), ",");
46347    }
46348    // component v-model
46349    if (el.model) {
46350        data += "model:{value:".concat(el.model.value, ",callback:").concat(el.model.callback, ",expression:").concat(el.model.expression, "},");
46351    }
46352    // inline-template
46353    if (el.inlineTemplate) {
46354        var inlineTemplate = genInlineTemplate(el, state);
46355        if (inlineTemplate) {
46356            data += "".concat(inlineTemplate, ",");
46357        }
46358    }
46359    data = data.replace(/,$/, '') + '}';
46360    // v-bind dynamic argument wrap
46361    // v-bind with dynamic arguments must be applied using the same v-bind object
46362    // merge helper so that class/style/mustUseProp attrs are handled correctly.
46363    if (el.dynamicAttrs) {
46364        data = "_b(".concat(data, ",\"").concat(el.tag, "\",").concat(genProps(el.dynamicAttrs), ")");
46365    }
46366    // v-bind data wrap
46367    if (el.wrapData) {
46368        data = el.wrapData(data);
46369    }
46370    // v-on data wrap
46371    if (el.wrapListeners) {
46372        data = el.wrapListeners(data);
46373    }
46374    return data;
46375}
46376function genDirectives(el, state) {
46377    var dirs = el.directives;
46378    if (!dirs)
46379        return;
46380    var res = 'directives:[';
46381    var hasRuntime = false;
46382    var i, l, dir, needRuntime;
46383    for (i = 0, l = dirs.length; i < l; i++) {
46384        dir = dirs[i];
46385        needRuntime = true;
46386        var gen = state.directives[dir.name];
46387        if (gen) {
46388            // compile-time directive that manipulates AST.
46389            // returns true if it also needs a runtime counterpart.
46390            needRuntime = !!gen(el, dir, state.warn);
46391        }
46392        if (needRuntime) {
46393            hasRuntime = true;
46394            res += "{name:\"".concat(dir.name, "\",rawName:\"").concat(dir.rawName, "\"").concat(dir.value
46395                ? ",value:(".concat(dir.value, "),expression:").concat(JSON.stringify(dir.value))
46396                : '').concat(dir.arg ? ",arg:".concat(dir.isDynamicArg ? dir.arg : "\"".concat(dir.arg, "\"")) : '').concat(dir.modifiers ? ",modifiers:".concat(JSON.stringify(dir.modifiers)) : '', "},");
46397        }
46398    }
46399    if (hasRuntime) {
46400        return res.slice(0, -1) + ']';
46401    }
46402}
46403function genInlineTemplate(el, state) {
46404    var ast = el.children[0];
46405    if ( true && (el.children.length !== 1 || ast.type !== 1)) {
46406        state.warn('Inline-template components must have exactly one child element.', { start: el.start });
46407    }
46408    if (ast && ast.type === 1) {
46409        var inlineRenderFns = generate(ast, state.options);
46410        return "inlineTemplate:{render:function(){".concat(inlineRenderFns.render, "},staticRenderFns:[").concat(inlineRenderFns.staticRenderFns
46411            .map(function (code) { return "function(){".concat(code, "}"); })
46412            .join(','), "]}");
46413    }
46414}
46415function genScopedSlots(el, slots, state) {
46416    // by default scoped slots are considered "stable", this allows child
46417    // components with only scoped slots to skip forced updates from parent.
46418    // but in some cases we have to bail-out of this optimization
46419    // for example if the slot contains dynamic names, has v-if or v-for on them...
46420    var needsForceUpdate = el.for ||
46421        Object.keys(slots).some(function (key) {
46422            var slot = slots[key];
46423            return (slot.slotTargetDynamic || slot.if || slot.for || containsSlotChild(slot) // is passing down slot from parent which may be dynamic
46424            );
46425        });
46426    // #9534: if a component with scoped slots is inside a conditional branch,
46427    // it's possible for the same component to be reused but with different
46428    // compiled slot content. To avoid that, we generate a unique key based on
46429    // the generated code of all the slot contents.
46430    var needsKey = !!el.if;
46431    // OR when it is inside another scoped slot or v-for (the reactivity may be
46432    // disconnected due to the intermediate scope variable)
46433    // #9438, #9506
46434    // TODO: this can be further optimized by properly analyzing in-scope bindings
46435    // and skip force updating ones that do not actually use scope variables.
46436    if (!needsForceUpdate) {
46437        var parent_2 = el.parent;
46438        while (parent_2) {
46439            if ((parent_2.slotScope && parent_2.slotScope !== emptySlotScopeToken) ||
46440                parent_2.for) {
46441                needsForceUpdate = true;
46442                break;
46443            }
46444            if (parent_2.if) {
46445                needsKey = true;
46446            }
46447            parent_2 = parent_2.parent;
46448        }
46449    }
46450    var generatedSlots = Object.keys(slots)
46451        .map(function (key) { return genScopedSlot(slots[key], state); })
46452        .join(',');
46453    return "scopedSlots:_u([".concat(generatedSlots, "]").concat(needsForceUpdate ? ",null,true" : "").concat(!needsForceUpdate && needsKey ? ",null,false,".concat(hash(generatedSlots)) : "", ")");
46454}
46455function hash(str) {
46456    var hash = 5381;
46457    var i = str.length;
46458    while (i) {
46459        hash = (hash * 33) ^ str.charCodeAt(--i);
46460    }
46461    return hash >>> 0;
46462}
46463function containsSlotChild(el) {
46464    if (el.type === 1) {
46465        if (el.tag === 'slot') {
46466            return true;
46467        }
46468        return el.children.some(containsSlotChild);
46469    }
46470    return false;
46471}
46472function genScopedSlot(el, state) {
46473    var isLegacySyntax = el.attrsMap['slot-scope'];
46474    if (el.if && !el.ifProcessed && !isLegacySyntax) {
46475        return genIf(el, state, genScopedSlot, "null");
46476    }
46477    if (el.for && !el.forProcessed) {
46478        return genFor(el, state, genScopedSlot);
46479    }
46480    var slotScope = el.slotScope === emptySlotScopeToken ? "" : String(el.slotScope);
46481    var fn = "function(".concat(slotScope, "){") +
46482        "return ".concat(el.tag === 'template'
46483            ? el.if && isLegacySyntax
46484                ? "(".concat(el.if, ")?").concat(genChildren(el, state) || 'undefined', ":undefined")
46485                : genChildren(el, state) || 'undefined'
46486            : genElement(el, state), "}");
46487    // reverse proxy v-slot without scope on this.$slots
46488    var reverseProxy = slotScope ? "" : ",proxy:true";
46489    return "{key:".concat(el.slotTarget || "\"default\"", ",fn:").concat(fn).concat(reverseProxy, "}");
46490}
46491function genChildren(el, state, checkSkip, altGenElement, altGenNode) {
46492    var children = el.children;
46493    if (children.length) {
46494        var el_1 = children[0];
46495        // optimize single v-for
46496        if (children.length === 1 &&
46497            el_1.for &&
46498            el_1.tag !== 'template' &&
46499            el_1.tag !== 'slot') {
46500            var normalizationType_1 = checkSkip
46501                ? state.maybeComponent(el_1)
46502                    ? ",1"
46503                    : ",0"
46504                : "";
46505            return "".concat((altGenElement || genElement)(el_1, state)).concat(normalizationType_1);
46506        }
46507        var normalizationType = checkSkip
46508            ? getNormalizationType(children, state.maybeComponent)
46509            : 0;
46510        var gen_1 = altGenNode || genNode;
46511        return "[".concat(children.map(function (c) { return gen_1(c, state); }).join(','), "]").concat(normalizationType ? ",".concat(normalizationType) : '');
46512    }
46513}
46514// determine the normalization needed for the children array.
46515// 0: no normalization needed
46516// 1: simple normalization needed (possible 1-level deep nested array)
46517// 2: full normalization needed
46518function getNormalizationType(children, maybeComponent) {
46519    var res = 0;
46520    for (var i = 0; i < children.length; i++) {
46521        var el = children[i];
46522        if (el.type !== 1) {
46523            continue;
46524        }
46525        if (needsNormalization(el) ||
46526            (el.ifConditions &&
46527                el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
46528            res = 2;
46529            break;
46530        }
46531        if (maybeComponent(el) ||
46532            (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
46533            res = 1;
46534        }
46535    }
46536    return res;
46537}
46538function needsNormalization(el) {
46539    return el.for !== undefined || el.tag === 'template' || el.tag === 'slot';
46540}
46541function genNode(node, state) {
46542    if (node.type === 1) {
46543        return genElement(node, state);
46544    }
46545    else if (node.type === 3 && node.isComment) {
46546        return genComment(node);
46547    }
46548    else {
46549        return genText(node);
46550    }
46551}
46552function genText(text) {
46553    return "_v(".concat(text.type === 2
46554        ? text.expression // no need for () because already wrapped in _s()
46555        : transformSpecialNewlines(JSON.stringify(text.text)), ")");
46556}
46557function genComment(comment) {
46558    return "_e(".concat(JSON.stringify(comment.text), ")");
46559}
46560function genSlot(el, state) {
46561    var slotName = el.slotName || '"default"';
46562    var children = genChildren(el, state);
46563    var res = "_t(".concat(slotName).concat(children ? ",function(){return ".concat(children, "}") : '');
46564    var attrs = el.attrs || el.dynamicAttrs
46565        ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
46566            // slot props are camelized
46567            name: camelize(attr.name),
46568            value: attr.value,
46569            dynamic: attr.dynamic
46570        }); }))
46571        : null;
46572    var bind = el.attrsMap['v-bind'];
46573    if ((attrs || bind) && !children) {
46574        res += ",null";
46575    }
46576    if (attrs) {
46577        res += ",".concat(attrs);
46578    }
46579    if (bind) {
46580        res += "".concat(attrs ? '' : ',null', ",").concat(bind);
46581    }
46582    return res + ')';
46583}
46584// componentName is el.component, take it as argument to shun flow's pessimistic refinement
46585function genComponent(componentName, el, state) {
46586    var children = el.inlineTemplate ? null : genChildren(el, state, true);
46587    return "_c(".concat(componentName, ",").concat(genData(el, state)).concat(children ? ",".concat(children) : '', ")");
46588}
46589function genProps(props) {
46590    var staticProps = "";
46591    var dynamicProps = "";
46592    for (var i = 0; i < props.length; i++) {
46593        var prop = props[i];
46594        var value = transformSpecialNewlines(prop.value);
46595        if (prop.dynamic) {
46596            dynamicProps += "".concat(prop.name, ",").concat(value, ",");
46597        }
46598        else {
46599            staticProps += "\"".concat(prop.name, "\":").concat(value, ",");
46600        }
46601    }
46602    staticProps = "{".concat(staticProps.slice(0, -1), "}");
46603    if (dynamicProps) {
46604        return "_d(".concat(staticProps, ",[").concat(dynamicProps.slice(0, -1), "])");
46605    }
46606    else {
46607        return staticProps;
46608    }
46609}
46610// #3895, #4268
46611function transformSpecialNewlines(text) {
46612    return text.replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
46613}
46614
46615// these keywords should not appear inside expressions, but operators like
46616// typeof, instanceof and in are allowed
46617var prohibitedKeywordRE = new RegExp('\\b' +
46618    ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
46619        'super,throw,while,yield,delete,export,import,return,switch,default,' +
46620        'extends,finally,continue,debugger,function,arguments')
46621        .split(',')
46622        .join('\\b|\\b') +
46623    '\\b');
46624// these unary operators should not be used as property/method names
46625var unaryOperatorsRE = new RegExp('\\b' +
46626    'delete,typeof,void'.split(',').join('\\s*\\([^\\)]*\\)|\\b') +
46627    '\\s*\\([^\\)]*\\)');
46628// strip strings in expressions
46629var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
46630// detect problematic expressions in a template
46631function detectErrors(ast, warn) {
46632    if (ast) {
46633        checkNode(ast, warn);
46634    }
46635}
46636function checkNode(node, warn) {
46637    if (node.type === 1) {
46638        for (var name_1 in node.attrsMap) {
46639            if (dirRE.test(name_1)) {
46640                var value = node.attrsMap[name_1];
46641                if (value) {
46642                    var range = node.rawAttrsMap[name_1];
46643                    if (name_1 === 'v-for') {
46644                        checkFor(node, "v-for=\"".concat(value, "\""), warn, range);
46645                    }
46646                    else if (name_1 === 'v-slot' || name_1[0] === '#') {
46647                        checkFunctionParameterExpression(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);
46648                    }
46649                    else if (onRE.test(name_1)) {
46650                        checkEvent(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);
46651                    }
46652                    else {
46653                        checkExpression(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);
46654                    }
46655                }
46656            }
46657        }
46658        if (node.children) {
46659            for (var i = 0; i < node.children.length; i++) {
46660                checkNode(node.children[i], warn);
46661            }
46662        }
46663    }
46664    else if (node.type === 2) {
46665        checkExpression(node.expression, node.text, warn, node);
46666    }
46667}
46668function checkEvent(exp, text, warn, range) {
46669    var stripped = exp.replace(stripStringRE, '');
46670    var keywordMatch = stripped.match(unaryOperatorsRE);
46671    if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
46672        warn("avoid using JavaScript unary operator as property name: " +
46673            "\"".concat(keywordMatch[0], "\" in expression ").concat(text.trim()), range);
46674    }
46675    checkExpression(exp, text, warn, range);
46676}
46677function checkFor(node, text, warn, range) {
46678    checkExpression(node.for || '', text, warn, range);
46679    checkIdentifier(node.alias, 'v-for alias', text, warn, range);
46680    checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);
46681    checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);
46682}
46683function checkIdentifier(ident, type, text, warn, range) {
46684    if (typeof ident === 'string') {
46685        try {
46686            new Function("var ".concat(ident, "=_"));
46687        }
46688        catch (e) {
46689            warn("invalid ".concat(type, " \"").concat(ident, "\" in expression: ").concat(text.trim()), range);
46690        }
46691    }
46692}
46693function checkExpression(exp, text, warn, range) {
46694    try {
46695        new Function("return ".concat(exp));
46696    }
46697    catch (e) {
46698        var keywordMatch = exp
46699            .replace(stripStringRE, '')
46700            .match(prohibitedKeywordRE);
46701        if (keywordMatch) {
46702            warn("avoid using JavaScript keyword as property name: " +
46703                "\"".concat(keywordMatch[0], "\"\n  Raw expression: ").concat(text.trim()), range);
46704        }
46705        else {
46706            warn("invalid expression: ".concat(e.message, " in\n\n") +
46707                "    ".concat(exp, "\n\n") +
46708                "  Raw expression: ".concat(text.trim(), "\n"), range);
46709        }
46710    }
46711}
46712function checkFunctionParameterExpression(exp, text, warn, range) {
46713    try {
46714        new Function(exp, '');
46715    }
46716    catch (e) {
46717        warn("invalid function parameter expression: ".concat(e.message, " in\n\n") +
46718            "    ".concat(exp, "\n\n") +
46719            "  Raw expression: ".concat(text.trim(), "\n"), range);
46720    }
46721}
46722
46723var range = 2;
46724function generateCodeFrame(source, start, end) {
46725    if (start === void 0) { start = 0; }
46726    if (end === void 0) { end = source.length; }
46727    var lines = source.split(/\r?\n/);
46728    var count = 0;
46729    var res = [];
46730    for (var i = 0; i < lines.length; i++) {
46731        count += lines[i].length + 1;
46732        if (count >= start) {
46733            for (var j = i - range; j <= i + range || end > count; j++) {
46734                if (j < 0 || j >= lines.length)
46735                    continue;
46736                res.push("".concat(j + 1).concat(repeat(" ", 3 - String(j + 1).length), "|  ").concat(lines[j]));
46737                var lineLength = lines[j].length;
46738                if (j === i) {
46739                    // push underline
46740                    var pad = start - (count - lineLength) + 1;
46741                    var length_1 = end > count ? lineLength - pad : end - start;
46742                    res.push("   |  " + repeat(" ", pad) + repeat("^", length_1));
46743                }
46744                else if (j > i) {
46745                    if (end > count) {
46746                        var length_2 = Math.min(end - count, lineLength);
46747                        res.push("   |  " + repeat("^", length_2));
46748                    }
46749                    count += lineLength + 1;
46750                }
46751            }
46752            break;
46753        }
46754    }
46755    return res.join('\n');
46756}
46757function repeat(str, n) {
46758    var result = '';
46759    if (n > 0) {
46760        // eslint-disable-next-line no-constant-condition
46761        while (true) {
46762            // eslint-disable-line
46763            if (n & 1)
46764                result += str;
46765            n >>>= 1;
46766            if (n <= 0)
46767                break;
46768            str += str;
46769        }
46770    }
46771    return result;
46772}
46773
46774function createFunction(code, errors) {
46775    try {
46776        return new Function(code);
46777    }
46778    catch (err) {
46779        errors.push({ err: err, code: code });
46780        return noop;
46781    }
46782}
46783function createCompileToFunctionFn(compile) {
46784    var cache = Object.create(null);
46785    return function compileToFunctions(template, options, vm) {
46786        options = extend({}, options);
46787        var warn = options.warn || warn$2;
46788        delete options.warn;
46789        /* istanbul ignore if */
46790        if (true) {
46791            // detect possible CSP restriction
46792            try {
46793                new Function('return 1');
46794            }
46795            catch (e) {
46796                if (e.toString().match(/unsafe-eval|CSP/)) {
46797                    warn('It seems you are using the standalone build of Vue.js in an ' +
46798                        'environment with Content Security Policy that prohibits unsafe-eval. ' +
46799                        'The template compiler cannot work in this environment. Consider ' +
46800                        'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
46801                        'templates into render functions.');
46802                }
46803            }
46804        }
46805        // check cache
46806        var key = options.delimiters
46807            ? String(options.delimiters) + template
46808            : template;
46809        if (cache[key]) {
46810            return cache[key];
46811        }
46812        // compile
46813        var compiled = compile(template, options);
46814        // check compilation errors/tips
46815        if (true) {
46816            if (compiled.errors && compiled.errors.length) {
46817                if (options.outputSourceRange) {
46818                    compiled.errors.forEach(function (e) {
46819                        warn("Error compiling template:\n\n".concat(e.msg, "\n\n") +
46820                            generateCodeFrame(template, e.start, e.end), vm);
46821                    });
46822                }
46823                else {
46824                    warn("Error compiling template:\n\n".concat(template, "\n\n") +
46825                        compiled.errors.map(function (e) { return "- ".concat(e); }).join('\n') +
46826                        '\n', vm);
46827                }
46828            }
46829            if (compiled.tips && compiled.tips.length) {
46830                if (options.outputSourceRange) {
46831                    compiled.tips.forEach(function (e) { return tip(e.msg, vm); });
46832                }
46833                else {
46834                    compiled.tips.forEach(function (msg) { return tip(msg, vm); });
46835                }
46836            }
46837        }
46838        // turn code into functions
46839        var res = {};
46840        var fnGenErrors = [];
46841        res.render = createFunction(compiled.render, fnGenErrors);
46842        res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
46843            return createFunction(code, fnGenErrors);
46844        });
46845        // check function generation errors.
46846        // this should only happen if there is a bug in the compiler itself.
46847        // mostly for codegen development use
46848        /* istanbul ignore if */
46849        if (true) {
46850            if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
46851                warn("Failed to generate render function:\n\n" +
46852                    fnGenErrors
46853                        .map(function (_a) {
46854                        var err = _a.err, code = _a.code;
46855                        return "".concat(err.toString(), " in\n\n").concat(code, "\n");
46856                    })
46857                        .join('\n'), vm);
46858            }
46859        }
46860        return (cache[key] = res);
46861    };
46862}
46863
46864function createCompilerCreator(baseCompile) {
46865    return function createCompiler(baseOptions) {
46866        function compile(template, options) {
46867            var finalOptions = Object.create(baseOptions);
46868            var errors = [];
46869            var tips = [];
46870            var warn = function (msg, range, tip) {
46871                (tip ? tips : errors).push(msg);
46872            };
46873            if (options) {
46874                if ( true && options.outputSourceRange) {
46875                    // $flow-disable-line
46876                    var leadingSpaceLength_1 = template.match(/^\s*/)[0].length;
46877                    warn = function (msg, range, tip) {
46878                        var data = typeof msg === 'string' ? { msg: msg } : msg;
46879                        if (range) {
46880                            if (range.start != null) {
46881                                data.start = range.start + leadingSpaceLength_1;
46882                            }
46883                            if (range.end != null) {
46884                                data.end = range.end + leadingSpaceLength_1;
46885                            }
46886                        }
46887                        (tip ? tips : errors).push(data);
46888                    };
46889                }
46890                // merge custom modules
46891                if (options.modules) {
46892                    finalOptions.modules = (baseOptions.modules || []).concat(options.modules);
46893                }
46894                // merge custom directives
46895                if (options.directives) {
46896                    finalOptions.directives = extend(Object.create(baseOptions.directives || null), options.directives);
46897                }
46898                // copy other options
46899                for (var key in options) {
46900                    if (key !== 'modules' && key !== 'directives') {
46901                        finalOptions[key] = options[key];
46902                    }
46903                }
46904            }
46905            finalOptions.warn = warn;
46906            var compiled = baseCompile(template.trim(), finalOptions);
46907            if (true) {
46908                detectErrors(compiled.ast, warn);
46909            }
46910            compiled.errors = errors;
46911            compiled.tips = tips;
46912            return compiled;
46913        }
46914        return {
46915            compile: compile,
46916            compileToFunctions: createCompileToFunctionFn(compile)
46917        };
46918    };
46919}
46920
46921// `createCompilerCreator` allows creating compilers that use alternative
46922// parser/optimizer/codegen, e.g the SSR optimizing compiler.
46923// Here we just export a default compiler using the default parts.
46924var createCompiler = createCompilerCreator(function baseCompile(template, options) {
46925    var ast = parse(template.trim(), options);
46926    if (options.optimize !== false) {
46927        optimize(ast, options);
46928    }
46929    var code = generate(ast, options);
46930    return {
46931        ast: ast,
46932        render: code.render,
46933        staticRenderFns: code.staticRenderFns
46934    };
46935});
46936
46937var _a = createCompiler(baseOptions), compileToFunctions = _a.compileToFunctions;
46938
46939// check whether current browser encodes a char inside attribute values
46940var div;
46941function getShouldDecode(href) {
46942    div = div || document.createElement('div');
46943    div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>";
46944    return div.innerHTML.indexOf('&#10;') > 0;
46945}
46946// #3663: IE encodes newlines inside attribute values while other browsers don't
46947var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;
46948// #6828: chrome encodes content in a[href]
46949var shouldDecodeNewlinesForHref = inBrowser
46950    ? getShouldDecode(true)
46951    : false;
46952
46953var idToTemplate = cached(function (id) {
46954    var el = query(id);
46955    return el && el.innerHTML;
46956});
46957var mount = Vue.prototype.$mount;
46958Vue.prototype.$mount = function (el, hydrating) {
46959    el = el && query(el);
46960    /* istanbul ignore if */
46961    if (el === document.body || el === document.documentElement) {
46962         true &&
46963            warn$2("Do not mount Vue to <html> or <body> - mount to normal elements instead.");
46964        return this;
46965    }
46966    var options = this.$options;
46967    // resolve template/el and convert to render function
46968    if (!options.render) {
46969        var template = options.template;
46970        if (template) {
46971            if (typeof template === 'string') {
46972                if (template.charAt(0) === '#') {
46973                    template = idToTemplate(template);
46974                    /* istanbul ignore if */
46975                    if ( true && !template) {
46976                        warn$2("Template element not found or is empty: ".concat(options.template), this);
46977                    }
46978                }
46979            }
46980            else if (template.nodeType) {
46981                template = template.innerHTML;
46982            }
46983            else {
46984                if (true) {
46985                    warn$2('invalid template option:' + template, this);
46986                }
46987                return this;
46988            }
46989        }
46990        else if (el) {
46991            // @ts-expect-error
46992            template = getOuterHTML(el);
46993        }
46994        if (template) {
46995            /* istanbul ignore if */
46996            if ( true && config.performance && mark) {
46997                mark('compile');
46998            }
46999            var _a = compileToFunctions(template, {
47000                outputSourceRange: "development" !== 'production',
47001                shouldDecodeNewlines: shouldDecodeNewlines,
47002                shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,
47003                delimiters: options.delimiters,
47004                comments: options.comments
47005            }, this), render = _a.render, staticRenderFns = _a.staticRenderFns;
47006            options.render = render;
47007            options.staticRenderFns = staticRenderFns;
47008            /* istanbul ignore if */
47009            if ( true && config.performance && mark) {
47010                mark('compile end');
47011                measure("vue ".concat(this._name, " compile"), 'compile', 'compile end');
47012            }
47013        }
47014    }
47015    return mount.call(this, el, hydrating);
47016};
47017/**
47018 * Get outerHTML of elements, taking care
47019 * of SVG elements in IE as well.
47020 */
47021function getOuterHTML(el) {
47022    if (el.outerHTML) {
47023        return el.outerHTML;
47024    }
47025    else {
47026        var container = document.createElement('div');
47027        container.appendChild(el.cloneNode(true));
47028        return container.innerHTML;
47029    }
47030}
47031Vue.compile = compileToFunctions;
47032
47033
47034
47035
47036/***/ }),
47037
vendor: 2,867 bytes, lines 47038-47047
47038/***/ "./node_modules/axios/package.json":
47039/*!*****************************************!*\
47040  !*** ./node_modules/axios/package.json ***!
47041  \*****************************************/
47042/***/ ((module) => {
47043
47044"use strict";
47045module.exports = JSON.parse('{"_args":[["[email protected]","C:\\\\xampp\\\\htdocs\\\\cogentdevs_website"]],"_development":true,"_from":"[email protected]","_id":"[email protected]","_inBundle":false,"_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"[email protected]","name":"axios","escapedName":"axios","rawSpec":"0.21.4","saveSpec":null,"fetchSpec":"0.21.4"},"_requiredBy":["#DEV:/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_spec":"0.21.4","_where":"C:\\\\xampp\\\\htdocs\\\\cogentdevs_website","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.14.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"homepage":"https://axios-http.com","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.4"}');
47046
47047/***/ })
vendor: 7,745 bytes, lines 47047-47240
47047
47048
47049/******/ 	});
47050/************************************************************************/
47051/******/ 	// The module cache
47052/******/ 	var __webpack_module_cache__ = {};
47053/******/ 	
47054/******/ 	// The require function
47055/******/ 	function __webpack_require__(moduleId) {
47056/******/ 		// Check if module is in cache
47057/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
47058/******/ 		if (cachedModule !== undefined) {
47059/******/ 			return cachedModule.exports;
47060/******/ 		}
47061/******/ 		// Create a new module (and put it into the cache)
47062/******/ 		var module = __webpack_module_cache__[moduleId] = {
47063/******/ 			id: moduleId,
47064/******/ 			loaded: false,
47065/******/ 			exports: {}
47066/******/ 		};
47067/******/ 	
47068/******/ 		// Execute the module function
47069/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
47070/******/ 	
47071/******/ 		// Flag the module as loaded
47072/******/ 		module.loaded = true;
47073/******/ 	
47074/******/ 		// Return the exports of the module
47075/******/ 		return module.exports;
47076/******/ 	}
47077/******/ 	
47078/******/ 	// expose the modules object (__webpack_modules__)
47079/******/ 	__webpack_require__.m = __webpack_modules__;
47080/******/ 	
47081/************************************************************************/
47082/******/ 	/* webpack/runtime/chunk loaded */
47083/******/ 	(() => {
47084/******/ 		var deferred = [];
47085/******/ 		__webpack_require__.O = (result, chunkIds, fn, priority) => {
47086/******/ 			if(chunkIds) {
47087/******/ 				priority = priority || 0;
47088/******/ 				for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
47089/******/ 				deferred[i] = [chunkIds, fn, priority];
47090/******/ 				return;
47091/******/ 			}
47092/******/ 			var notFulfilled = Infinity;
47093/******/ 			for (var i = 0; i < deferred.length; i++) {
47094/******/ 				var [chunkIds, fn, priority] = deferred[i];
47095/******/ 				var fulfilled = true;
47096/******/ 				for (var j = 0; j < chunkIds.length; j++) {
47097/******/ 					if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
47098/******/ 						chunkIds.splice(j--, 1);
47099/******/ 					} else {
47100/******/ 						fulfilled = false;
47101/******/ 						if(priority < notFulfilled) notFulfilled = priority;
47102/******/ 					}
47103/******/ 				}
47104/******/ 				if(fulfilled) {
47105/******/ 					deferred.splice(i--, 1)
47106/******/ 					var r = fn();
47107/******/ 					if (r !== undefined) result = r;
47108/******/ 				}
47109/******/ 			}
47110/******/ 			return result;
47111/******/ 		};
47112/******/ 	})();
47113/******/ 	
47114/******/ 	/* webpack/runtime/compat get default export */
47115/******/ 	(() => {
47116/******/ 		// getDefaultExport function for compatibility with non-harmony modules
47117/******/ 		__webpack_require__.n = (module) => {
47118/******/ 			var getter = module && module.__esModule ?
47119/******/ 				() => (module['default']) :
47120/******/ 				() => (module);
47121/******/ 			__webpack_require__.d(getter, { a: getter });
47122/******/ 			return getter;
47123/******/ 		};
47124/******/ 	})();
47125/******/ 	
47126/******/ 	/* webpack/runtime/define property getters */
47127/******/ 	(() => {
47128/******/ 		// define getter functions for harmony exports
47129/******/ 		__webpack_require__.d = (exports, definition) => {
47130/******/ 			for(var key in definition) {
47131/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
47132/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
47133/******/ 				}
47134/******/ 			}
47135/******/ 		};
47136/******/ 	})();
47137/******/ 	
47138/******/ 	/* webpack/runtime/global */
47139/******/ 	(() => {
47140/******/ 		__webpack_require__.g = (function() {
47141/******/ 			if (typeof globalThis === 'object') return globalThis;
47142/******/ 			try {
47143/******/ 				return this || new Function('return this')();
47144/******/ 			} catch (e) {
47145/******/ 				if (typeof window === 'object') return window;
47146/******/ 			}
47147/******/ 		})();
47148/******/ 	})();
47149/******/ 	
47150/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
47151/******/ 	(() => {
47152/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
47153/******/ 	})();
47154/******/ 	
47155/******/ 	/* webpack/runtime/make namespace object */
47156/******/ 	(() => {
47157/******/ 		// define __esModule on exports
47158/******/ 		__webpack_require__.r = (exports) => {
47159/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47160/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47161/******/ 			}
47162/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
47163/******/ 		};
47164/******/ 	})();
47165/******/ 	
47166/******/ 	/* webpack/runtime/node module decorator */
47167/******/ 	(() => {
47168/******/ 		__webpack_require__.nmd = (module) => {
47169/******/ 			module.paths = [];
47170/******/ 			if (!module.children) module.children = [];
47171/******/ 			return module;
47172/******/ 		};
47173/******/ 	})();
47174/******/ 	
47175/******/ 	/* webpack/runtime/jsonp chunk loading */
47176/******/ 	(() => {
47177/******/ 		// no baseURI
47178/******/ 		
47179/******/ 		// object to store loaded and loading chunks
47180/******/ 		// undefined = chunk not loaded, null = chunk preloaded/prefetched
47181/******/ 		// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
47182/******/ 		var installedChunks = {
47183/******/ 			"/js/app": 0,
47184/******/ 			"css/app": 0
47185/******/ 		};
47186/******/ 		
47187/******/ 		// no chunk on demand loading
47188/******/ 		
47189/******/ 		// no prefetching
47190/******/ 		
47191/******/ 		// no preloaded
47192/******/ 		
47193/******/ 		// no HMR
47194/******/ 		
47195/******/ 		// no HMR manifest
47196/******/ 		
47197/******/ 		__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
47198/******/ 		
47199/******/ 		// install a JSONP callback for chunk loading
47200/******/ 		var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
47201/******/ 			var [chunkIds, moreModules, runtime] = data;
47202/******/ 			// add "moreModules" to the modules object,
47203/******/ 			// then flag all "chunkIds" as loaded and fire callback
47204/******/ 			var moduleId, chunkId, i = 0;
47205/******/ 			if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
47206/******/ 				for(moduleId in moreModules) {
47207/******/ 					if(__webpack_require__.o(moreModules, moduleId)) {
47208/******/ 						__webpack_require__.m[moduleId] = moreModules[moduleId];
47209/******/ 					}
47210/******/ 				}
47211/******/ 				if(runtime) var result = runtime(__webpack_require__);
47212/******/ 			}
47213/******/ 			if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
47214/******/ 			for(;i < chunkIds.length; i++) {
47215/******/ 				chunkId = chunkIds[i];
47216/******/ 				if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
47217/******/ 					installedChunks[chunkId][0]();
47218/******/ 				}
47219/******/ 				installedChunks[chunkId] = 0;
47220/******/ 			}
47221/******/ 			return __webpack_require__.O(result);
47222/******/ 		}
47223/******/ 		
47224/******/ 		var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
47225/******/ 		chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
47226/******/ 		chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
47227/******/ 	})();
47228/******/ 	
47229/************************************************************************/
47230/******/ 	
47231/******/ 	// startup
47232/******/ 	// Load entry module and return exports
47233/******/ 	// This entry module depends on other loaded chunks and execution need to be delayed
47234/******/ 	__webpack_require__.O(undefined, ["css/app"], () => (__webpack_require__("./resources/js/app.js")))
47235/******/ 	__webpack_require__.O(undefined, ["css/app"], () => (__webpack_require__("./resources/sass/app.scss")))
47236/******/ 	var __webpack_exports__ = __webpack_require__.O(undefined, ["css/app"], () => (__webpack_require__("./resources/css/app.css")))
47237/******/ 	__webpack_exports__ = __webpack_require__.O(__webpack_exports__);
47238/******/ 	
47239/******/ })()
47240;

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.