PageSourceSearch

https://www.impocar.ru/local/assets/js/bundle.js

js impocar.ru collected 2026-10-08 15:58:14 UTC 1,808,171 bytes, 55,359 lines download raw bytes

vendor: 78 bytes, lines 1-3
1/******/ (() => { // webpackBootstrap
2/******/ 	var __webpack_modules__ = ({
3
vendor: 512 bytes, lines 4-13
4/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/assign.js":
5/*!**********************************************************************!*\
6  !*** ./node_modules/@babel/runtime-corejs2/core-js/object/assign.js ***!
7  \**********************************************************************/
8/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9
10module.exports = __webpack_require__(/*! core-js/library/fn/object/assign */ "./node_modules/core-js/library/fn/object/assign.js");
11
12/***/ }),
13
vendor: 512 bytes, lines 14-23
14/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/create.js":
15/*!**********************************************************************!*\
16  !*** ./node_modules/@babel/runtime-corejs2/core-js/object/create.js ***!
17  \**********************************************************************/
18/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
19
20module.exports = __webpack_require__(/*! core-js/library/fn/object/create */ "./node_modules/core-js/library/fn/object/create.js");
21
22/***/ }),
23
vendor: 518 bytes, lines 24-33
24/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/entries.js":
25/*!***********************************************************************!*\
26  !*** ./node_modules/@babel/runtime-corejs2/core-js/object/entries.js ***!
27  \***********************************************************************/
28/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
29
30module.exports = __webpack_require__(/*! core-js/library/fn/object/entries */ "./node_modules/core-js/library/fn/object/entries.js");
31
32/***/ }),
33
vendor: 500 bytes, lines 34-43
34/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/keys.js":
35/*!********************************************************************!*\
36  !*** ./node_modules/@babel/runtime-corejs2/core-js/object/keys.js ***!
37  \********************************************************************/
38/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
39
40module.exports = __webpack_require__(/*! core-js/library/fn/object/keys */ "./node_modules/core-js/library/fn/object/keys.js");
41
42/***/ }),
43
vendor: 572 bytes, lines 44-53
44/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/set-prototype-of.js":
45/*!********************************************************************************!*\
46  !*** ./node_modules/@babel/runtime-corejs2/core-js/object/set-prototype-of.js ***!
47  \********************************************************************************/
48/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
49
50module.exports = __webpack_require__(/*! core-js/library/fn/object/set-prototype-of */ "./node_modules/core-js/library/fn/object/set-prototype-of.js");
51
52/***/ }),
53
vendor: 559 bytes, lines 54-69
54/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js":
55/*!**********************************************************************!*\
56  !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
57  \**********************************************************************/
58/***/ ((module) => {
59
60function _interopRequireDefault(obj) {
61  return obj && obj.__esModule ? obj : {
62    "default": obj
63  };
64}
65
66module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
67
68/***/ }),
69
70/***/ "./src/js/config.js":
71/*!**************************!*\
72  !*** ./src/js/config.js ***!
73  \**************************/
74/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
75
76"use strict";
77__webpack_require__.r(__webpack_exports__);
78/* harmony export */ __webpack_require__.d(__webpack_exports__, {
79/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
80/* harmony export */ });
81var url = location.protocol + '//' + location.hostname + '/';
82if (location.hostname === "localhost" || location.hostname === "127.0.0.1") url = 'http://local.impocar.ru/';
83var config = {
84  restIblockElement: url + 'rest/iblock.php',
85  restCommon: url + 'rest/common_json.php'
86};
87/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (config);
88
89/***/ }),
90
91/***/ "./src/js/react/TruckLoader.js":
92/*!*************************************!*\
93  !*** ./src/js/react/TruckLoader.js ***!
94  \*************************************/
95/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
96
97"use strict";
98__webpack_require__.r(__webpack_exports__);
99/* harmony export */ __webpack_require__.d(__webpack_exports__, {
100/* harmony export */   "default": () => (/* binding */ TruckLoader)
101/* harmony export */ });
102/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
103/* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-bootstrap */ "./node_modules/react-bootstrap/es/Modal.js");
104/* harmony import */ var _tools_RestRequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/RestRequest */ "./src/js/tools/RestRequest.js");
105/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config */ "./src/js/config.js");
106function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
107
108function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
109
110function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
111
112function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
113
114function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
115
116function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
117
118
119
120
121
122
123var httpBuildQuery = __webpack_require__(/*! http-build-query */ "./node_modules/http-build-query/index.js");
124
125function TruckLoader(_ref) {
126  var route = _ref.route,
127      run = _ref.run,
128      date = _ref.date;
129
130  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
131      _useState2 = _slicedToArray(_useState, 2),
132      show = _useState2[0],
133      setShow = _useState2[1];
134
135  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
136      _useState4 = _slicedToArray(_useState3, 2),
137      fill = _useState4[0],
138      setFill = _useState4[1];
139
140  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),
141      _useState6 = _slicedToArray(_useState5, 2),
142      avail = _useState6[0],
143      setAvail = _useState6[1];
144
145  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
146      _useState8 = _slicedToArray(_useState7, 2),
147      error = _useState8[0],
148      setError = _useState8[1];
149
150  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
151      _useState10 = _slicedToArray(_useState9, 2),
152      success = _useState10[0],
153      setSuccess = _useState10[1];
154
155  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
156    var params = {
157      method: 'getRouteReserved',
158      arg: {
159        route_id: route,
160        run_id: run
161      }
162    };
163    _tools_RestRequest__WEBPACK_IMPORTED_MODULE_1__["default"].all("".concat(_config__WEBPACK_IMPORTED_MODULE_2__["default"].restCommon, "?").concat(httpBuildQuery(params))).then(function (data) {
164      console.log(data);
165      setFill(data.result);
166    });
167  }, [show === true]);
168
169  function handleClose() {
170    setShow(false);
171  }
172
173  function handleShow() {
174    setShow(true);
175  }
176
177  function onSelectTariff(event) {
178    var params = {
179      method: 'getAvailReserved',
180      arg: {
181        route_id: route,
182        tariff_code: event.target.value
183      }
184    };
185    _tools_RestRequest__WEBPACK_IMPORTED_MODULE_1__["default"].all("".concat(_config__WEBPACK_IMPORTED_MODULE_2__["default"].restCommon, "?").concat(httpBuildQuery(params))).then(function (data) {
186      console.log(data);
187      setAvail(data.result);
188    });
189  }
190
191  function handleSubmitForm(event) {
192    event.preventDefault();
193    var form = event.target;
194    var fd = new FormData(form);
195    var params = {
196      method: 'addRouteReserved',
197      arg: {
198        tariff_code: fd.get('tariff'),
199        route_id: route,
200        run_id: run,
201        date: date,
202        amount: fd.get('amount')
203      }
204    };
205    _tools_RestRequest__WEBPACK_IMPORTED_MODULE_1__["default"].all("".concat(_config__WEBPACK_IMPORTED_MODULE_2__["default"].restCommon, "?").concat(httpBuildQuery(params))).then(function (data) {
206      var status = data.success;
207      setError('');
208
209      if (status === false) {
210        setError(data.error);
211      } else {
212        if (status === true && typeof data.result.errors !== 'undefined') {
213          var str_error = '';
214          data.result.errors.map(function (error_text, error_key) {
215            str_error += error_text + "<br />";
216          });
217          setError(str_error);
218        } else {
219          setSuccess('Данные успешно обновлены.');
220        }
221      }
222    });
223  }
224
225  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
226    className: "btn btn-sm btn-danger",
227    onClick: handleShow.bind(this)
228  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, "\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043E\u0441\u0442\u044C")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_3__["default"], {
229    show: show,
230    onHide: handleClose.bind(this)
231  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_3__["default"].Header, {
232    closeButton: true
233  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_3__["default"].Title, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, "\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043E\u0441\u0442\u044C"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_3__["default"].Body, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("form", {
234    onSubmit: handleSubmitForm.bind(this),
235    className: "truck-loader-form"
236  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
237    className: "truck-loader-form-element"
238  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("select", {
239    name: "tariff",
240    onChange: onSelectTariff.bind(this)
241  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", {
242    value: ""
243  }, "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u0430\u0440\u0438\u0444"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", {
244    value: "PROMO"
245  }, "\u041F\u0440\u043E\u043C\u043E"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", {
246    value: "STANDARD"
247  }, "\u0421\u0442\u0430\u043D\u0434\u0430\u0440\u0442"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", {
248    value: "PREMIUM"
249  }, "\u041F\u0440\u0435\u043C\u0438\u0443\u043C"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
250    className: "truck-loader-form-filled"
251  }, fill.map(function (el, i) {
252    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
253      className: "truck-loader-form-filled-item",
254      key: i
255    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, el.tariff_code), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, el.amount, "%"));
256  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
257    className: "truck-loader-form-element"
258  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", {
259    name: "amount",
260    placeholder: "\u041D\u0430\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C"
261  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
262    type: "submit"
263  }, "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0442\u0430\u0440\u0438\u0444"), error.length === 0 ? '' : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
264    className: "truck-loader-form-error"
265  }, error), success.length === 0 ? '' : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
266    className: "truck-loader-form-success"
267  }, success)))));
268}
269
270/***/ }),
271
272/***/ "./src/js/tools/RestRequest.js":
273/*!*************************************!*\
274  !*** ./src/js/tools/RestRequest.js ***!
275  \*************************************/
276/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
277
278"use strict";
279__webpack_require__.r(__webpack_exports__);
280/* harmony export */ __webpack_require__.d(__webpack_exports__, {
281/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
282/* harmony export */ });
283function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
284
285function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
286
287function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
288
289function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
290
291function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
292
293function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
294
295var RestRequest = /*#__PURE__*/function () {
296  function RestRequest() {
297    _classCallCheck(this, RestRequest);
298  }
299
300  _createClass(RestRequest, null, [{
301    key: "all",
302    value: function all(url) {
303      return fetch(url).then(function (response) {
304        return response.json();
305      });
306    }
307  }, {
308    key: "one",
309    value: function one(url, id) {
310      var after_url = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
311      return fetch("".concat(url).concat(id, "/").concat(after_url)).then(function (response) {
312        return response.json();
313      });
314    }
315  }, {
316    key: "post",
317    value: function post(url, options) {
318      return fetch(url, _objectSpread({
319        method: 'POST'
320      }, options)).then(function (response) {
321        return response.json();
322      });
323    }
324  }, {
325    key: "update",
326    value: function update(url, options) {
327      return fetch(url, _objectSpread({
328        method: 'PATCH'
329      }, options)).then(function (response) {
330        return response.json();
331      });
332    }
333  }, {
334    key: "delete",
335    value: function _delete(url, id) {
336      return fetch("".concat(url).concat(id, "/"), {
337        method: 'DELETE'
338      }).then(function (response) {
339        return response.json();
340      });
341    }
342  }]);
343
344  return RestRequest;
345}();
346
347/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RestRequest);
348
349/***/ }),
350
vendor: 137,723 bytes, lines 351-4716
351/***/ "./node_modules/bootstrap/dist/js/bootstrap.js":
352/*!*****************************************************!*\
353  !*** ./node_modules/bootstrap/dist/js/bootstrap.js ***!
354  \*****************************************************/
355/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
356
357/*!
358  * Bootstrap v4.6.1 (https://getbootstrap.com/)
359  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
360  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
361  */
362(function (global, factory) {
363   true ? factory(exports, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"), __webpack_require__(/*! popper.js */ "./node_modules/popper.js/dist/esm/popper.js")) :
364  0;
365})(this, (function (exports, $, Popper) { 'use strict';
366
367  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
368
369  var $__default = /*#__PURE__*/_interopDefaultLegacy($);
370  var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
371
372  function _defineProperties(target, props) {
373    for (var i = 0; i < props.length; i++) {
374      var descriptor = props[i];
375      descriptor.enumerable = descriptor.enumerable || false;
376      descriptor.configurable = true;
377      if ("value" in descriptor) descriptor.writable = true;
378      Object.defineProperty(target, descriptor.key, descriptor);
379    }
380  }
381
382  function _createClass(Constructor, protoProps, staticProps) {
383    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
384    if (staticProps) _defineProperties(Constructor, staticProps);
385    return Constructor;
386  }
387
388  function _extends() {
389    _extends = Object.assign || function (target) {
390      for (var i = 1; i < arguments.length; i++) {
391        var source = arguments[i];
392
393        for (var key in source) {
394          if (Object.prototype.hasOwnProperty.call(source, key)) {
395            target[key] = source[key];
396          }
397        }
398      }
399
400      return target;
401    };
402
403    return _extends.apply(this, arguments);
404  }
405
406  function _inheritsLoose(subClass, superClass) {
407    subClass.prototype = Object.create(superClass.prototype);
408    subClass.prototype.constructor = subClass;
409
410    _setPrototypeOf(subClass, superClass);
411  }
412
413  function _setPrototypeOf(o, p) {
414    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
415      o.__proto__ = p;
416      return o;
417    };
418
419    return _setPrototypeOf(o, p);
420  }
421
422  /**
423   * --------------------------------------------------------------------------
424   * Bootstrap (v4.6.1): util.js
425   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
426   * --------------------------------------------------------------------------
427   */
428  /**
429   * Private TransitionEnd Helpers
430   */
431
432  var TRANSITION_END = 'transitionend';
433  var MAX_UID = 1000000;
434  var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
435
436  function toType(obj) {
437    if (obj === null || typeof obj === 'undefined') {
438      return "" + obj;
439    }
440
441    return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
442  }
443
444  function getSpecialTransitionEndEvent() {
445    return {
446      bindType: TRANSITION_END,
447      delegateType: TRANSITION_END,
448      handle: function handle(event) {
449        if ($__default["default"](event.target).is(this)) {
450          return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
451        }
452
453        return undefined;
454      }
455    };
456  }
457
458  function transitionEndEmulator(duration) {
459    var _this = this;
460
461    var called = false;
462    $__default["default"](this).one(Util.TRANSITION_END, function () {
463      called = true;
464    });
465    setTimeout(function () {
466      if (!called) {
467        Util.triggerTransitionEnd(_this);
468      }
469    }, duration);
470    return this;
471  }
472
473  function setTransitionEndSupport() {
474    $__default["default"].fn.emulateTransitionEnd = transitionEndEmulator;
475    $__default["default"].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
476  }
477  /**
478   * Public Util API
479   */
480
481
482  var Util = {
483    TRANSITION_END: 'bsTransitionEnd',
484    getUID: function getUID(prefix) {
485      do {
486        // eslint-disable-next-line no-bitwise
487        prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
488      } while (document.getElementById(prefix));
489
490      return prefix;
491    },
492    getSelectorFromElement: function getSelectorFromElement(element) {
493      var selector = element.getAttribute('data-target');
494
495      if (!selector || selector === '#') {
496        var hrefAttr = element.getAttribute('href');
497        selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
498      }
499
500      try {
501        return document.querySelector(selector) ? selector : null;
502      } catch (_) {
503        return null;
504      }
505    },
506    getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
507      if (!element) {
508        return 0;
509      } // Get transition-duration of the element
510
511
512      var transitionDuration = $__default["default"](element).css('transition-duration');
513      var transitionDelay = $__default["default"](element).css('transition-delay');
514      var floatTransitionDuration = parseFloat(transitionDuration);
515      var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
516
517      if (!floatTransitionDuration && !floatTransitionDelay) {
518        return 0;
519      } // If multiple durations are defined, take the first
520
521
522      transitionDuration = transitionDuration.split(',')[0];
523      transitionDelay = transitionDelay.split(',')[0];
524      return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
525    },
526    reflow: function reflow(element) {
527      return element.offsetHeight;
528    },
529    triggerTransitionEnd: function triggerTransitionEnd(element) {
530      $__default["default"](element).trigger(TRANSITION_END);
531    },
532    supportsTransitionEnd: function supportsTransitionEnd() {
533      return Boolean(TRANSITION_END);
534    },
535    isElement: function isElement(obj) {
536      return (obj[0] || obj).nodeType;
537    },
538    typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
539      for (var property in configTypes) {
540        if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
541          var expectedTypes = configTypes[property];
542          var value = config[property];
543          var valueType = value && Util.isElement(value) ? 'element' : toType(value);
544
545          if (!new RegExp(expectedTypes).test(valueType)) {
546            throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
547          }
548        }
549      }
550    },
551    findShadowRoot: function findShadowRoot(element) {
552      if (!document.documentElement.attachShadow) {
553        return null;
554      } // Can find the shadow root otherwise it'll return the document
555
556
557      if (typeof element.getRootNode === 'function') {
558        var root = element.getRootNode();
559        return root instanceof ShadowRoot ? root : null;
560      }
561
562      if (element instanceof ShadowRoot) {
563        return element;
564      } // when we don't find a shadow root
565
566
567      if (!element.parentNode) {
568        return null;
569      }
570
571      return Util.findShadowRoot(element.parentNode);
572    },
573    jQueryDetection: function jQueryDetection() {
574      if (typeof $__default["default"] === 'undefined') {
575        throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
576      }
577
578      var version = $__default["default"].fn.jquery.split(' ')[0].split('.');
579      var minMajor = 1;
580      var ltMajor = 2;
581      var minMinor = 9;
582      var minPatch = 1;
583      var maxMajor = 4;
584
585      if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
586        throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
587      }
588    }
589  };
590  Util.jQueryDetection();
591  setTransitionEndSupport();
592
593  /**
594   * Constants
595   */
596
597  var NAME$a = 'alert';
598  var VERSION$a = '4.6.1';
599  var DATA_KEY$a = 'bs.alert';
600  var EVENT_KEY$a = "." + DATA_KEY$a;
601  var DATA_API_KEY$7 = '.data-api';
602  var JQUERY_NO_CONFLICT$a = $__default["default"].fn[NAME$a];
603  var CLASS_NAME_ALERT = 'alert';
604  var CLASS_NAME_FADE$5 = 'fade';
605  var CLASS_NAME_SHOW$7 = 'show';
606  var EVENT_CLOSE = "close" + EVENT_KEY$a;
607  var EVENT_CLOSED = "closed" + EVENT_KEY$a;
608  var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$a + DATA_API_KEY$7;
609  var SELECTOR_DISMISS = '[data-dismiss="alert"]';
610  /**
611   * Class definition
612   */
613
614  var Alert = /*#__PURE__*/function () {
615    function Alert(element) {
616      this._element = element;
617    } // Getters
618
619
620    var _proto = Alert.prototype;
621
622    // Public
623    _proto.close = function close(element) {
624      var rootElement = this._element;
625
626      if (element) {
627        rootElement = this._getRootElement(element);
628      }
629
630      var customEvent = this._triggerCloseEvent(rootElement);
631
632      if (customEvent.isDefaultPrevented()) {
633        return;
634      }
635
636      this._removeElement(rootElement);
637    };
638
639    _proto.dispose = function dispose() {
640      $__default["default"].removeData(this._element, DATA_KEY$a);
641      this._element = null;
642    } // Private
643    ;
644
645    _proto._getRootElement = function _getRootElement(element) {
646      var selector = Util.getSelectorFromElement(element);
647      var parent = false;
648
649      if (selector) {
650        parent = document.querySelector(selector);
651      }
652
653      if (!parent) {
654        parent = $__default["default"](element).closest("." + CLASS_NAME_ALERT)[0];
655      }
656
657      return parent;
658    };
659
660    _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
661      var closeEvent = $__default["default"].Event(EVENT_CLOSE);
662      $__default["default"](element).trigger(closeEvent);
663      return closeEvent;
664    };
665
666    _proto._removeElement = function _removeElement(element) {
667      var _this = this;
668
669      $__default["default"](element).removeClass(CLASS_NAME_SHOW$7);
670
671      if (!$__default["default"](element).hasClass(CLASS_NAME_FADE$5)) {
672        this._destroyElement(element);
673
674        return;
675      }
676
677      var transitionDuration = Util.getTransitionDurationFromElement(element);
678      $__default["default"](element).one(Util.TRANSITION_END, function (event) {
679        return _this._destroyElement(element, event);
680      }).emulateTransitionEnd(transitionDuration);
681    };
682
683    _proto._destroyElement = function _destroyElement(element) {
684      $__default["default"](element).detach().trigger(EVENT_CLOSED).remove();
685    } // Static
686    ;
687
688    Alert._jQueryInterface = function _jQueryInterface(config) {
689      return this.each(function () {
690        var $element = $__default["default"](this);
691        var data = $element.data(DATA_KEY$a);
692
693        if (!data) {
694          data = new Alert(this);
695          $element.data(DATA_KEY$a, data);
696        }
697
698        if (config === 'close') {
699          data[config](this);
700        }
701      });
702    };
703
704    Alert._handleDismiss = function _handleDismiss(alertInstance) {
705      return function (event) {
706        if (event) {
707          event.preventDefault();
708        }
709
710        alertInstance.close(this);
711      };
712    };
713
714    _createClass(Alert, null, [{
715      key: "VERSION",
716      get: function get() {
717        return VERSION$a;
718      }
719    }]);
720
721    return Alert;
722  }();
723  /**
724   * Data API implementation
725   */
726
727
728  $__default["default"](document).on(EVENT_CLICK_DATA_API$6, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
729  /**
730   * jQuery
731   */
732
733  $__default["default"].fn[NAME$a] = Alert._jQueryInterface;
734  $__default["default"].fn[NAME$a].Constructor = Alert;
735
736  $__default["default"].fn[NAME$a].noConflict = function () {
737    $__default["default"].fn[NAME$a] = JQUERY_NO_CONFLICT$a;
738    return Alert._jQueryInterface;
739  };
740
741  /**
742   * Constants
743   */
744
745  var NAME$9 = 'button';
746  var VERSION$9 = '4.6.1';
747  var DATA_KEY$9 = 'bs.button';
748  var EVENT_KEY$9 = "." + DATA_KEY$9;
749  var DATA_API_KEY$6 = '.data-api';
750  var JQUERY_NO_CONFLICT$9 = $__default["default"].fn[NAME$9];
751  var CLASS_NAME_ACTIVE$3 = 'active';
752  var CLASS_NAME_BUTTON = 'btn';
753  var CLASS_NAME_FOCUS = 'focus';
754  var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$9 + DATA_API_KEY$6;
755  var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY$9 + DATA_API_KEY$6 + " " + ("blur" + EVENT_KEY$9 + DATA_API_KEY$6);
756  var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$9 + DATA_API_KEY$6;
757  var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
758  var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
759  var SELECTOR_DATA_TOGGLE$4 = '[data-toggle="button"]';
760  var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
761  var SELECTOR_INPUT = 'input:not([type="hidden"])';
762  var SELECTOR_ACTIVE$2 = '.active';
763  var SELECTOR_BUTTON = '.btn';
764  /**
765   * Class definition
766   */
767
768  var Button = /*#__PURE__*/function () {
769    function Button(element) {
770      this._element = element;
771      this.shouldAvoidTriggerChange = false;
772    } // Getters
773
774
775    var _proto = Button.prototype;
776
777    // Public
778    _proto.toggle = function toggle() {
779      var triggerChangeEvent = true;
780      var addAriaPressed = true;
781      var rootElement = $__default["default"](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
782
783      if (rootElement) {
784        var input = this._element.querySelector(SELECTOR_INPUT);
785
786        if (input) {
787          if (input.type === 'radio') {
788            if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE$3)) {
789              triggerChangeEvent = false;
790            } else {
791              var activeElement = rootElement.querySelector(SELECTOR_ACTIVE$2);
792
793              if (activeElement) {
794                $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$3);
795              }
796            }
797          }
798
799          if (triggerChangeEvent) {
800            // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
801            if (input.type === 'checkbox' || input.type === 'radio') {
802              input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE$3);
803            }
804
805            if (!this.shouldAvoidTriggerChange) {
806              $__default["default"](input).trigger('change');
807            }
808          }
809
810          input.focus();
811          addAriaPressed = false;
812        }
813      }
814
815      if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
816        if (addAriaPressed) {
817          this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE$3));
818        }
819
820        if (triggerChangeEvent) {
821          $__default["default"](this._element).toggleClass(CLASS_NAME_ACTIVE$3);
822        }
823      }
824    };
825
826    _proto.dispose = function dispose() {
827      $__default["default"].removeData(this._element, DATA_KEY$9);
828      this._element = null;
829    } // Static
830    ;
831
832    Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
833      return this.each(function () {
834        var $element = $__default["default"](this);
835        var data = $element.data(DATA_KEY$9);
836
837        if (!data) {
838          data = new Button(this);
839          $element.data(DATA_KEY$9, data);
840        }
841
842        data.shouldAvoidTriggerChange = avoidTriggerChange;
843
844        if (config === 'toggle') {
845          data[config]();
846        }
847      });
848    };
849
850    _createClass(Button, null, [{
851      key: "VERSION",
852      get: function get() {
853        return VERSION$9;
854      }
855    }]);
856
857    return Button;
858  }();
859  /**
860   * Data API implementation
861   */
862
863
864  $__default["default"](document).on(EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
865    var button = event.target;
866    var initialButton = button;
867
868    if (!$__default["default"](button).hasClass(CLASS_NAME_BUTTON)) {
869      button = $__default["default"](button).closest(SELECTOR_BUTTON)[0];
870    }
871
872    if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
873      event.preventDefault(); // work around Firefox bug #1540995
874    } else {
875      var inputBtn = button.querySelector(SELECTOR_INPUT);
876
877      if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
878        event.preventDefault(); // work around Firefox bug #1540995
879
880        return;
881      }
882
883      if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
884        Button._jQueryInterface.call($__default["default"](button), 'toggle', initialButton.tagName === 'INPUT');
885      }
886    }
887  }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
888    var button = $__default["default"](event.target).closest(SELECTOR_BUTTON)[0];
889    $__default["default"](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
890  });
891  $__default["default"](window).on(EVENT_LOAD_DATA_API$2, function () {
892    // ensure correct active class is set to match the controls' actual values/states
893    // find all checkboxes/readio buttons inside data-toggle groups
894    var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
895
896    for (var i = 0, len = buttons.length; i < len; i++) {
897      var button = buttons[i];
898      var input = button.querySelector(SELECTOR_INPUT);
899
900      if (input.checked || input.hasAttribute('checked')) {
901        button.classList.add(CLASS_NAME_ACTIVE$3);
902      } else {
903        button.classList.remove(CLASS_NAME_ACTIVE$3);
904      }
905    } // find all button toggles
906
907
908    buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$4));
909
910    for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
911      var _button = buttons[_i];
912
913      if (_button.getAttribute('aria-pressed') === 'true') {
914        _button.classList.add(CLASS_NAME_ACTIVE$3);
915      } else {
916        _button.classList.remove(CLASS_NAME_ACTIVE$3);
917      }
918    }
919  });
920  /**
921   * jQuery
922   */
923
924  $__default["default"].fn[NAME$9] = Button._jQueryInterface;
925  $__default["default"].fn[NAME$9].Constructor = Button;
926
927  $__default["default"].fn[NAME$9].noConflict = function () {
928    $__default["default"].fn[NAME$9] = JQUERY_NO_CONFLICT$9;
929    return Button._jQueryInterface;
930  };
931
932  /**
933   * Constants
934   */
935
936  var NAME$8 = 'carousel';
937  var VERSION$8 = '4.6.1';
938  var DATA_KEY$8 = 'bs.carousel';
939  var EVENT_KEY$8 = "." + DATA_KEY$8;
940  var DATA_API_KEY$5 = '.data-api';
941  var JQUERY_NO_CONFLICT$8 = $__default["default"].fn[NAME$8];
942  var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
943
944  var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
945
946  var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
947
948  var SWIPE_THRESHOLD = 40;
949  var CLASS_NAME_CAROUSEL = 'carousel';
950  var CLASS_NAME_ACTIVE$2 = 'active';
951  var CLASS_NAME_SLIDE = 'slide';
952  var CLASS_NAME_RIGHT = 'carousel-item-right';
953  var CLASS_NAME_LEFT = 'carousel-item-left';
954  var CLASS_NAME_NEXT = 'carousel-item-next';
955  var CLASS_NAME_PREV = 'carousel-item-prev';
956  var CLASS_NAME_POINTER_EVENT = 'pointer-event';
957  var DIRECTION_NEXT = 'next';
958  var DIRECTION_PREV = 'prev';
959  var DIRECTION_LEFT = 'left';
960  var DIRECTION_RIGHT = 'right';
961  var EVENT_SLIDE = "slide" + EVENT_KEY$8;
962  var EVENT_SLID = "slid" + EVENT_KEY$8;
963  var EVENT_KEYDOWN = "keydown" + EVENT_KEY$8;
964  var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$8;
965  var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$8;
966  var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$8;
967  var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$8;
968  var EVENT_TOUCHEND = "touchend" + EVENT_KEY$8;
969  var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$8;
970  var EVENT_POINTERUP = "pointerup" + EVENT_KEY$8;
971  var EVENT_DRAG_START = "dragstart" + EVENT_KEY$8;
972  var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$8 + DATA_API_KEY$5;
973  var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$8 + DATA_API_KEY$5;
974  var SELECTOR_ACTIVE$1 = '.active';
975  var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
976  var SELECTOR_ITEM = '.carousel-item';
977  var SELECTOR_ITEM_IMG = '.carousel-item img';
978  var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
979  var SELECTOR_INDICATORS = '.carousel-indicators';
980  var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
981  var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
982  var Default$7 = {
983    interval: 5000,
984    keyboard: true,
985    slide: false,
986    pause: 'hover',
987    wrap: true,
988    touch: true
989  };
990  var DefaultType$7 = {
991    interval: '(number|boolean)',
992    keyboard: 'boolean',
993    slide: '(boolean|string)',
994    pause: '(string|boolean)',
995    wrap: 'boolean',
996    touch: 'boolean'
997  };
998  var PointerType = {
999    TOUCH: 'touch',
1000    PEN: 'pen'
1001  };
1002  /**
1003   * Class definition
1004   */
1005
1006  var Carousel = /*#__PURE__*/function () {
1007    function Carousel(element, config) {
1008      this._items = null;
1009      this._interval = null;
1010      this._activeElement = null;
1011      this._isPaused = false;
1012      this._isSliding = false;
1013      this.touchTimeout = null;
1014      this.touchStartX = 0;
1015      this.touchDeltaX = 0;
1016      this._config = this._getConfig(config);
1017      this._element = element;
1018      this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
1019      this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
1020      this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
1021
1022      this._addEventListeners();
1023    } // Getters
1024
1025
1026    var _proto = Carousel.prototype;
1027
1028    // Public
1029    _proto.next = function next() {
1030      if (!this._isSliding) {
1031        this._slide(DIRECTION_NEXT);
1032      }
1033    };
1034
1035    _proto.nextWhenVisible = function nextWhenVisible() {
1036      var $element = $__default["default"](this._element); // Don't call next when the page isn't visible
1037      // or the carousel or its parent isn't visible
1038
1039      if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
1040        this.next();
1041      }
1042    };
1043
1044    _proto.prev = function prev() {
1045      if (!this._isSliding) {
1046        this._slide(DIRECTION_PREV);
1047      }
1048    };
1049
1050    _proto.pause = function pause(event) {
1051      if (!event) {
1052        this._isPaused = true;
1053      }
1054
1055      if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
1056        Util.triggerTransitionEnd(this._element);
1057        this.cycle(true);
1058      }
1059
1060      clearInterval(this._interval);
1061      this._interval = null;
1062    };
1063
1064    _proto.cycle = function cycle(event) {
1065      if (!event) {
1066        this._isPaused = false;
1067      }
1068
1069      if (this._interval) {
1070        clearInterval(this._interval);
1071        this._interval = null;
1072      }
1073
1074      if (this._config.interval && !this._isPaused) {
1075        this._updateInterval();
1076
1077        this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
1078      }
1079    };
1080
1081    _proto.to = function to(index) {
1082      var _this = this;
1083
1084      this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
1085
1086      var activeIndex = this._getItemIndex(this._activeElement);
1087
1088      if (index > this._items.length - 1 || index < 0) {
1089        return;
1090      }
1091
1092      if (this._isSliding) {
1093        $__default["default"](this._element).one(EVENT_SLID, function () {
1094          return _this.to(index);
1095        });
1096        return;
1097      }
1098
1099      if (activeIndex === index) {
1100        this.pause();
1101        this.cycle();
1102        return;
1103      }
1104
1105      var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
1106
1107      this._slide(direction, this._items[index]);
1108    };
1109
1110    _proto.dispose = function dispose() {
1111      $__default["default"](this._element).off(EVENT_KEY$8);
1112      $__default["default"].removeData(this._element, DATA_KEY$8);
1113      this._items = null;
1114      this._config = null;
1115      this._element = null;
1116      this._interval = null;
1117      this._isPaused = null;
1118      this._isSliding = null;
1119      this._activeElement = null;
1120      this._indicatorsElement = null;
1121    } // Private
1122    ;
1123
1124    _proto._getConfig = function _getConfig(config) {
1125      config = _extends({}, Default$7, config);
1126      Util.typeCheckConfig(NAME$8, config, DefaultType$7);
1127      return config;
1128    };
1129
1130    _proto._handleSwipe = function _handleSwipe() {
1131      var absDeltax = Math.abs(this.touchDeltaX);
1132
1133      if (absDeltax <= SWIPE_THRESHOLD) {
1134        return;
1135      }
1136
1137      var direction = absDeltax / this.touchDeltaX;
1138      this.touchDeltaX = 0; // swipe left
1139
1140      if (direction > 0) {
1141        this.prev();
1142      } // swipe right
1143
1144
1145      if (direction < 0) {
1146        this.next();
1147      }
1148    };
1149
1150    _proto._addEventListeners = function _addEventListeners() {
1151      var _this2 = this;
1152
1153      if (this._config.keyboard) {
1154        $__default["default"](this._element).on(EVENT_KEYDOWN, function (event) {
1155          return _this2._keydown(event);
1156        });
1157      }
1158
1159      if (this._config.pause === 'hover') {
1160        $__default["default"](this._element).on(EVENT_MOUSEENTER, function (event) {
1161          return _this2.pause(event);
1162        }).on(EVENT_MOUSELEAVE, function (event) {
1163          return _this2.cycle(event);
1164        });
1165      }
1166
1167      if (this._config.touch) {
1168        this._addTouchEventListeners();
1169      }
1170    };
1171
1172    _proto._addTouchEventListeners = function _addTouchEventListeners() {
1173      var _this3 = this;
1174
1175      if (!this._touchSupported) {
1176        return;
1177      }
1178
1179      var start = function start(event) {
1180        if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
1181          _this3.touchStartX = event.originalEvent.clientX;
1182        } else if (!_this3._pointerEvent) {
1183          _this3.touchStartX = event.originalEvent.touches[0].clientX;
1184        }
1185      };
1186
1187      var move = function move(event) {
1188        // ensure swiping with one touch and not pinching
1189        _this3.touchDeltaX = event.originalEvent.touches && event.originalEvent.touches.length > 1 ? 0 : event.originalEvent.touches[0].clientX - _this3.touchStartX;
1190      };
1191
1192      var end = function end(event) {
1193        if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
1194          _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
1195        }
1196
1197        _this3._handleSwipe();
1198
1199        if (_this3._config.pause === 'hover') {
1200          // If it's a touch-enabled device, mouseenter/leave are fired as
1201          // part of the mouse compatibility events on first tap - the carousel
1202          // would stop cycling until user tapped out of it;
1203          // here, we listen for touchend, explicitly pause the carousel
1204          // (as if it's the second time we tap on it, mouseenter compat event
1205          // is NOT fired) and after a timeout (to allow for mouse compatibility
1206          // events to fire) we explicitly restart cycling
1207          _this3.pause();
1208
1209          if (_this3.touchTimeout) {
1210            clearTimeout(_this3.touchTimeout);
1211          }
1212
1213          _this3.touchTimeout = setTimeout(function (event) {
1214            return _this3.cycle(event);
1215          }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
1216        }
1217      };
1218
1219      $__default["default"](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
1220        return e.preventDefault();
1221      });
1222
1223      if (this._pointerEvent) {
1224        $__default["default"](this._element).on(EVENT_POINTERDOWN, function (event) {
1225          return start(event);
1226        });
1227        $__default["default"](this._element).on(EVENT_POINTERUP, function (event) {
1228          return end(event);
1229        });
1230
1231        this._element.classList.add(CLASS_NAME_POINTER_EVENT);
1232      } else {
1233        $__default["default"](this._element).on(EVENT_TOUCHSTART, function (event) {
1234          return start(event);
1235        });
1236        $__default["default"](this._element).on(EVENT_TOUCHMOVE, function (event) {
1237          return move(event);
1238        });
1239        $__default["default"](this._element).on(EVENT_TOUCHEND, function (event) {
1240          return end(event);
1241        });
1242      }
1243    };
1244
1245    _proto._keydown = function _keydown(event) {
1246      if (/input|textarea/i.test(event.target.tagName)) {
1247        return;
1248      }
1249
1250      switch (event.which) {
1251        case ARROW_LEFT_KEYCODE:
1252          event.preventDefault();
1253          this.prev();
1254          break;
1255
1256        case ARROW_RIGHT_KEYCODE:
1257          event.preventDefault();
1258          this.next();
1259          break;
1260      }
1261    };
1262
1263    _proto._getItemIndex = function _getItemIndex(element) {
1264      this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
1265      return this._items.indexOf(element);
1266    };
1267
1268    _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
1269      var isNextDirection = direction === DIRECTION_NEXT;
1270      var isPrevDirection = direction === DIRECTION_PREV;
1271
1272      var activeIndex = this._getItemIndex(activeElement);
1273
1274      var lastItemIndex = this._items.length - 1;
1275      var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
1276
1277      if (isGoingToWrap && !this._config.wrap) {
1278        return activeElement;
1279      }
1280
1281      var delta = direction === DIRECTION_PREV ? -1 : 1;
1282      var itemIndex = (activeIndex + delta) % this._items.length;
1283      return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
1284    };
1285
1286    _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
1287      var targetIndex = this._getItemIndex(relatedTarget);
1288
1289      var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
1290
1291      var slideEvent = $__default["default"].Event(EVENT_SLIDE, {
1292        relatedTarget: relatedTarget,
1293        direction: eventDirectionName,
1294        from: fromIndex,
1295        to: targetIndex
1296      });
1297      $__default["default"](this._element).trigger(slideEvent);
1298      return slideEvent;
1299    };
1300
1301    _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
1302      if (this._indicatorsElement) {
1303        var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE$1));
1304        $__default["default"](indicators).removeClass(CLASS_NAME_ACTIVE$2);
1305
1306        var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
1307
1308        if (nextIndicator) {
1309          $__default["default"](nextIndicator).addClass(CLASS_NAME_ACTIVE$2);
1310        }
1311      }
1312    };
1313
1314    _proto._updateInterval = function _updateInterval() {
1315      var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
1316
1317      if (!element) {
1318        return;
1319      }
1320
1321      var elementInterval = parseInt(element.getAttribute('data-interval'), 10);
1322
1323      if (elementInterval) {
1324        this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
1325        this._config.interval = elementInterval;
1326      } else {
1327        this._config.interval = this._config.defaultInterval || this._config.interval;
1328      }
1329    };
1330
1331    _proto._slide = function _slide(direction, element) {
1332      var _this4 = this;
1333
1334      var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
1335
1336      var activeElementIndex = this._getItemIndex(activeElement);
1337
1338      var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
1339
1340      var nextElementIndex = this._getItemIndex(nextElement);
1341
1342      var isCycling = Boolean(this._interval);
1343      var directionalClassName;
1344      var orderClassName;
1345      var eventDirectionName;
1346
1347      if (direction === DIRECTION_NEXT) {
1348        directionalClassName = CLASS_NAME_LEFT;
1349        orderClassName = CLASS_NAME_NEXT;
1350        eventDirectionName = DIRECTION_LEFT;
1351      } else {
1352        directionalClassName = CLASS_NAME_RIGHT;
1353        orderClassName = CLASS_NAME_PREV;
1354        eventDirectionName = DIRECTION_RIGHT;
1355      }
1356
1357      if (nextElement && $__default["default"](nextElement).hasClass(CLASS_NAME_ACTIVE$2)) {
1358        this._isSliding = false;
1359        return;
1360      }
1361
1362      var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
1363
1364      if (slideEvent.isDefaultPrevented()) {
1365        return;
1366      }
1367
1368      if (!activeElement || !nextElement) {
1369        // Some weirdness is happening, so we bail
1370        return;
1371      }
1372
1373      this._isSliding = true;
1374
1375      if (isCycling) {
1376        this.pause();
1377      }
1378
1379      this._setActiveIndicatorElement(nextElement);
1380
1381      this._activeElement = nextElement;
1382      var slidEvent = $__default["default"].Event(EVENT_SLID, {
1383        relatedTarget: nextElement,
1384        direction: eventDirectionName,
1385        from: activeElementIndex,
1386        to: nextElementIndex
1387      });
1388
1389      if ($__default["default"](this._element).hasClass(CLASS_NAME_SLIDE)) {
1390        $__default["default"](nextElement).addClass(orderClassName);
1391        Util.reflow(nextElement);
1392        $__default["default"](activeElement).addClass(directionalClassName);
1393        $__default["default"](nextElement).addClass(directionalClassName);
1394        var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
1395        $__default["default"](activeElement).one(Util.TRANSITION_END, function () {
1396          $__default["default"](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE$2);
1397          $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$2 + " " + orderClassName + " " + directionalClassName);
1398          _this4._isSliding = false;
1399          setTimeout(function () {
1400            return $__default["default"](_this4._element).trigger(slidEvent);
1401          }, 0);
1402        }).emulateTransitionEnd(transitionDuration);
1403      } else {
1404        $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$2);
1405        $__default["default"](nextElement).addClass(CLASS_NAME_ACTIVE$2);
1406        this._isSliding = false;
1407        $__default["default"](this._element).trigger(slidEvent);
1408      }
1409
1410      if (isCycling) {
1411        this.cycle();
1412      }
1413    } // Static
1414    ;
1415
1416    Carousel._jQueryInterface = function _jQueryInterface(config) {
1417      return this.each(function () {
1418        var data = $__default["default"](this).data(DATA_KEY$8);
1419
1420        var _config = _extends({}, Default$7, $__default["default"](this).data());
1421
1422        if (typeof config === 'object') {
1423          _config = _extends({}, _config, config);
1424        }
1425
1426        var action = typeof config === 'string' ? config : _config.slide;
1427
1428        if (!data) {
1429          data = new Carousel(this, _config);
1430          $__default["default"](this).data(DATA_KEY$8, data);
1431        }
1432
1433        if (typeof config === 'number') {
1434          data.to(config);
1435        } else if (typeof action === 'string') {
1436          if (typeof data[action] === 'undefined') {
1437            throw new TypeError("No method named \"" + action + "\"");
1438          }
1439
1440          data[action]();
1441        } else if (_config.interval && _config.ride) {
1442          data.pause();
1443          data.cycle();
1444        }
1445      });
1446    };
1447
1448    Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
1449      var selector = Util.getSelectorFromElement(this);
1450
1451      if (!selector) {
1452        return;
1453      }
1454
1455      var target = $__default["default"](selector)[0];
1456
1457      if (!target || !$__default["default"](target).hasClass(CLASS_NAME_CAROUSEL)) {
1458        return;
1459      }
1460
1461      var config = _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
1462
1463      var slideIndex = this.getAttribute('data-slide-to');
1464
1465      if (slideIndex) {
1466        config.interval = false;
1467      }
1468
1469      Carousel._jQueryInterface.call($__default["default"](target), config);
1470
1471      if (slideIndex) {
1472        $__default["default"](target).data(DATA_KEY$8).to(slideIndex);
1473      }
1474
1475      event.preventDefault();
1476    };
1477
1478    _createClass(Carousel, null, [{
1479      key: "VERSION",
1480      get: function get() {
1481        return VERSION$8;
1482      }
1483    }, {
1484      key: "Default",
1485      get: function get() {
1486        return Default$7;
1487      }
1488    }]);
1489
1490    return Carousel;
1491  }();
1492  /**
1493   * Data API implementation
1494   */
1495
1496
1497  $__default["default"](document).on(EVENT_CLICK_DATA_API$4, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
1498  $__default["default"](window).on(EVENT_LOAD_DATA_API$1, function () {
1499    var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
1500
1501    for (var i = 0, len = carousels.length; i < len; i++) {
1502      var $carousel = $__default["default"](carousels[i]);
1503
1504      Carousel._jQueryInterface.call($carousel, $carousel.data());
1505    }
1506  });
1507  /**
1508   * jQuery
1509   */
1510
1511  $__default["default"].fn[NAME$8] = Carousel._jQueryInterface;
1512  $__default["default"].fn[NAME$8].Constructor = Carousel;
1513
1514  $__default["default"].fn[NAME$8].noConflict = function () {
1515    $__default["default"].fn[NAME$8] = JQUERY_NO_CONFLICT$8;
1516    return Carousel._jQueryInterface;
1517  };
1518
1519  /**
1520   * Constants
1521   */
1522
1523  var NAME$7 = 'collapse';
1524  var VERSION$7 = '4.6.1';
1525  var DATA_KEY$7 = 'bs.collapse';
1526  var EVENT_KEY$7 = "." + DATA_KEY$7;
1527  var DATA_API_KEY$4 = '.data-api';
1528  var JQUERY_NO_CONFLICT$7 = $__default["default"].fn[NAME$7];
1529  var CLASS_NAME_SHOW$6 = 'show';
1530  var CLASS_NAME_COLLAPSE = 'collapse';
1531  var CLASS_NAME_COLLAPSING = 'collapsing';
1532  var CLASS_NAME_COLLAPSED = 'collapsed';
1533  var DIMENSION_WIDTH = 'width';
1534  var DIMENSION_HEIGHT = 'height';
1535  var EVENT_SHOW$4 = "show" + EVENT_KEY$7;
1536  var EVENT_SHOWN$4 = "shown" + EVENT_KEY$7;
1537  var EVENT_HIDE$4 = "hide" + EVENT_KEY$7;
1538  var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$7;
1539  var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$7 + DATA_API_KEY$4;
1540  var SELECTOR_ACTIVES = '.show, .collapsing';
1541  var SELECTOR_DATA_TOGGLE$3 = '[data-toggle="collapse"]';
1542  var Default$6 = {
1543    toggle: true,
1544    parent: ''
1545  };
1546  var DefaultType$6 = {
1547    toggle: 'boolean',
1548    parent: '(string|element)'
1549  };
1550  /**
1551   * Class definition
1552   */
1553
1554  var Collapse = /*#__PURE__*/function () {
1555    function Collapse(element, config) {
1556      this._isTransitioning = false;
1557      this._element = element;
1558      this._config = this._getConfig(config);
1559      this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
1560      var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$3));
1561
1562      for (var i = 0, len = toggleList.length; i < len; i++) {
1563        var elem = toggleList[i];
1564        var selector = Util.getSelectorFromElement(elem);
1565        var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
1566          return foundElem === element;
1567        });
1568
1569        if (selector !== null && filterElement.length > 0) {
1570          this._selector = selector;
1571
1572          this._triggerArray.push(elem);
1573        }
1574      }
1575
1576      this._parent = this._config.parent ? this._getParent() : null;
1577
1578      if (!this._config.parent) {
1579        this._addAriaAndCollapsedClass(this._element, this._triggerArray);
1580      }
1581
1582      if (this._config.toggle) {
1583        this.toggle();
1584      }
1585    } // Getters
1586
1587
1588    var _proto = Collapse.prototype;
1589
1590    // Public
1591    _proto.toggle = function toggle() {
1592      if ($__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
1593        this.hide();
1594      } else {
1595        this.show();
1596      }
1597    };
1598
1599    _proto.show = function show() {
1600      var _this = this;
1601
1602      if (this._isTransitioning || $__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
1603        return;
1604      }
1605
1606      var actives;
1607      var activesData;
1608
1609      if (this._parent) {
1610        actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
1611          if (typeof _this._config.parent === 'string') {
1612            return elem.getAttribute('data-parent') === _this._config.parent;
1613          }
1614
1615          return elem.classList.contains(CLASS_NAME_COLLAPSE);
1616        });
1617
1618        if (actives.length === 0) {
1619          actives = null;
1620        }
1621      }
1622
1623      if (actives) {
1624        activesData = $__default["default"](actives).not(this._selector).data(DATA_KEY$7);
1625
1626        if (activesData && activesData._isTransitioning) {
1627          return;
1628        }
1629      }
1630
1631      var startEvent = $__default["default"].Event(EVENT_SHOW$4);
1632      $__default["default"](this._element).trigger(startEvent);
1633
1634      if (startEvent.isDefaultPrevented()) {
1635        return;
1636      }
1637
1638      if (actives) {
1639        Collapse._jQueryInterface.call($__default["default"](actives).not(this._selector), 'hide');
1640
1641        if (!activesData) {
1642          $__default["default"](actives).data(DATA_KEY$7, null);
1643        }
1644      }
1645
1646      var dimension = this._getDimension();
1647
1648      $__default["default"](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
1649      this._element.style[dimension] = 0;
1650
1651      if (this._triggerArray.length) {
1652        $__default["default"](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
1653      }
1654
1655      this.setTransitioning(true);
1656
1657      var complete = function complete() {
1658        $__default["default"](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$6);
1659        _this._element.style[dimension] = '';
1660
1661        _this.setTransitioning(false);
1662
1663        $__default["default"](_this._element).trigger(EVENT_SHOWN$4);
1664      };
1665
1666      var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1667      var scrollSize = "scroll" + capitalizedDimension;
1668      var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1669      $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1670      this._element.style[dimension] = this._element[scrollSize] + "px";
1671    };
1672
1673    _proto.hide = function hide() {
1674      var _this2 = this;
1675
1676      if (this._isTransitioning || !$__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
1677        return;
1678      }
1679
1680      var startEvent = $__default["default"].Event(EVENT_HIDE$4);
1681      $__default["default"](this._element).trigger(startEvent);
1682
1683      if (startEvent.isDefaultPrevented()) {
1684        return;
1685      }
1686
1687      var dimension = this._getDimension();
1688
1689      this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
1690      Util.reflow(this._element);
1691      $__default["default"](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$6);
1692      var triggerArrayLength = this._triggerArray.length;
1693
1694      if (triggerArrayLength > 0) {
1695        for (var i = 0; i < triggerArrayLength; i++) {
1696          var trigger = this._triggerArray[i];
1697          var selector = Util.getSelectorFromElement(trigger);
1698
1699          if (selector !== null) {
1700            var $elem = $__default["default"]([].slice.call(document.querySelectorAll(selector)));
1701
1702            if (!$elem.hasClass(CLASS_NAME_SHOW$6)) {
1703              $__default["default"](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
1704            }
1705          }
1706        }
1707      }
1708
1709      this.setTransitioning(true);
1710
1711      var complete = function complete() {
1712        _this2.setTransitioning(false);
1713
1714        $__default["default"](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN$4);
1715      };
1716
1717      this._element.style[dimension] = '';
1718      var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1719      $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1720    };
1721
1722    _proto.setTransitioning = function setTransitioning(isTransitioning) {
1723      this._isTransitioning = isTransitioning;
1724    };
1725
1726    _proto.dispose = function dispose() {
1727      $__default["default"].removeData(this._element, DATA_KEY$7);
1728      this._config = null;
1729      this._parent = null;
1730      this._element = null;
1731      this._triggerArray = null;
1732      this._isTransitioning = null;
1733    } // Private
1734    ;
1735
1736    _proto._getConfig = function _getConfig(config) {
1737      config = _extends({}, Default$6, config);
1738      config.toggle = Boolean(config.toggle); // Coerce string values
1739
1740      Util.typeCheckConfig(NAME$7, config, DefaultType$6);
1741      return config;
1742    };
1743
1744    _proto._getDimension = function _getDimension() {
1745      var hasWidth = $__default["default"](this._element).hasClass(DIMENSION_WIDTH);
1746      return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
1747    };
1748
1749    _proto._getParent = function _getParent() {
1750      var _this3 = this;
1751
1752      var parent;
1753
1754      if (Util.isElement(this._config.parent)) {
1755        parent = this._config.parent; // It's a jQuery object
1756
1757        if (typeof this._config.parent.jquery !== 'undefined') {
1758          parent = this._config.parent[0];
1759        }
1760      } else {
1761        parent = document.querySelector(this._config.parent);
1762      }
1763
1764      var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
1765      var children = [].slice.call(parent.querySelectorAll(selector));
1766      $__default["default"](children).each(function (i, element) {
1767        _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1768      });
1769      return parent;
1770    };
1771
1772    _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1773      var isOpen = $__default["default"](element).hasClass(CLASS_NAME_SHOW$6);
1774
1775      if (triggerArray.length) {
1776        $__default["default"](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1777      }
1778    } // Static
1779    ;
1780
1781    Collapse._getTargetFromElement = function _getTargetFromElement(element) {
1782      var selector = Util.getSelectorFromElement(element);
1783      return selector ? document.querySelector(selector) : null;
1784    };
1785
1786    Collapse._jQueryInterface = function _jQueryInterface(config) {
1787      return this.each(function () {
1788        var $element = $__default["default"](this);
1789        var data = $element.data(DATA_KEY$7);
1790
1791        var _config = _extends({}, Default$6, $element.data(), typeof config === 'object' && config ? config : {});
1792
1793        if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
1794          _config.toggle = false;
1795        }
1796
1797        if (!data) {
1798          data = new Collapse(this, _config);
1799          $element.data(DATA_KEY$7, data);
1800        }
1801
1802        if (typeof config === 'string') {
1803          if (typeof data[config] === 'undefined') {
1804            throw new TypeError("No method named \"" + config + "\"");
1805          }
1806
1807          data[config]();
1808        }
1809      });
1810    };
1811
1812    _createClass(Collapse, null, [{
1813      key: "VERSION",
1814      get: function get() {
1815        return VERSION$7;
1816      }
1817    }, {
1818      key: "Default",
1819      get: function get() {
1820        return Default$6;
1821      }
1822    }]);
1823
1824    return Collapse;
1825  }();
1826  /**
1827   * Data API implementation
1828   */
1829
1830
1831  $__default["default"](document).on(EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
1832    // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
1833    if (event.currentTarget.tagName === 'A') {
1834      event.preventDefault();
1835    }
1836
1837    var $trigger = $__default["default"](this);
1838    var selector = Util.getSelectorFromElement(this);
1839    var selectors = [].slice.call(document.querySelectorAll(selector));
1840    $__default["default"](selectors).each(function () {
1841      var $target = $__default["default"](this);
1842      var data = $target.data(DATA_KEY$7);
1843      var config = data ? 'toggle' : $trigger.data();
1844
1845      Collapse._jQueryInterface.call($target, config);
1846    });
1847  });
1848  /**
1849   * jQuery
1850   */
1851
1852  $__default["default"].fn[NAME$7] = Collapse._jQueryInterface;
1853  $__default["default"].fn[NAME$7].Constructor = Collapse;
1854
1855  $__default["default"].fn[NAME$7].noConflict = function () {
1856    $__default["default"].fn[NAME$7] = JQUERY_NO_CONFLICT$7;
1857    return Collapse._jQueryInterface;
1858  };
1859
1860  /**
1861   * Constants
1862   */
1863
1864  var NAME$6 = 'dropdown';
1865  var VERSION$6 = '4.6.1';
1866  var DATA_KEY$6 = 'bs.dropdown';
1867  var EVENT_KEY$6 = "." + DATA_KEY$6;
1868  var DATA_API_KEY$3 = '.data-api';
1869  var JQUERY_NO_CONFLICT$6 = $__default["default"].fn[NAME$6];
1870  var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
1871
1872  var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
1873
1874  var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
1875
1876  var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
1877
1878  var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
1879
1880  var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
1881
1882  var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE$1);
1883  var CLASS_NAME_DISABLED$1 = 'disabled';
1884  var CLASS_NAME_SHOW$5 = 'show';
1885  var CLASS_NAME_DROPUP = 'dropup';
1886  var CLASS_NAME_DROPRIGHT = 'dropright';
1887  var CLASS_NAME_DROPLEFT = 'dropleft';
1888  var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
1889  var CLASS_NAME_POSITION_STATIC = 'position-static';
1890  var EVENT_HIDE$3 = "hide" + EVENT_KEY$6;
1891  var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$6;
1892  var EVENT_SHOW$3 = "show" + EVENT_KEY$6;
1893  var EVENT_SHOWN$3 = "shown" + EVENT_KEY$6;
1894  var EVENT_CLICK = "click" + EVENT_KEY$6;
1895  var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$6 + DATA_API_KEY$3;
1896  var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$6 + DATA_API_KEY$3;
1897  var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$6 + DATA_API_KEY$3;
1898  var SELECTOR_DATA_TOGGLE$2 = '[data-toggle="dropdown"]';
1899  var SELECTOR_FORM_CHILD = '.dropdown form';
1900  var SELECTOR_MENU = '.dropdown-menu';
1901  var SELECTOR_NAVBAR_NAV = '.navbar-nav';
1902  var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
1903  var PLACEMENT_TOP = 'top-start';
1904  var PLACEMENT_TOPEND = 'top-end';
1905  var PLACEMENT_BOTTOM = 'bottom-start';
1906  var PLACEMENT_BOTTOMEND = 'bottom-end';
1907  var PLACEMENT_RIGHT = 'right-start';
1908  var PLACEMENT_LEFT = 'left-start';
1909  var Default$5 = {
1910    offset: 0,
1911    flip: true,
1912    boundary: 'scrollParent',
1913    reference: 'toggle',
1914    display: 'dynamic',
1915    popperConfig: null
1916  };
1917  var DefaultType$5 = {
1918    offset: '(number|string|function)',
1919    flip: 'boolean',
1920    boundary: '(string|element)',
1921    reference: '(string|element)',
1922    display: 'string',
1923    popperConfig: '(null|object)'
1924  };
1925  /**
1926   * Class definition
1927   */
1928
1929  var Dropdown = /*#__PURE__*/function () {
1930    function Dropdown(element, config) {
1931      this._element = element;
1932      this._popper = null;
1933      this._config = this._getConfig(config);
1934      this._menu = this._getMenuElement();
1935      this._inNavbar = this._detectNavbar();
1936
1937      this._addEventListeners();
1938    } // Getters
1939
1940
1941    var _proto = Dropdown.prototype;
1942
1943    // Public
1944    _proto.toggle = function toggle() {
1945      if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1)) {
1946        return;
1947      }
1948
1949      var isActive = $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5);
1950
1951      Dropdown._clearMenus();
1952
1953      if (isActive) {
1954        return;
1955      }
1956
1957      this.show(true);
1958    };
1959
1960    _proto.show = function show(usePopper) {
1961      if (usePopper === void 0) {
1962        usePopper = false;
1963      }
1964
1965      if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1) || $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5)) {
1966        return;
1967      }
1968
1969      var relatedTarget = {
1970        relatedTarget: this._element
1971      };
1972      var showEvent = $__default["default"].Event(EVENT_SHOW$3, relatedTarget);
1973
1974      var parent = Dropdown._getParentFromElement(this._element);
1975
1976      $__default["default"](parent).trigger(showEvent);
1977
1978      if (showEvent.isDefaultPrevented()) {
1979        return;
1980      } // Totally disable Popper for Dropdowns in Navbar
1981
1982
1983      if (!this._inNavbar && usePopper) {
1984        // Check for Popper dependency
1985        if (typeof Popper__default["default"] === 'undefined') {
1986          throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
1987        }
1988
1989        var referenceElement = this._element;
1990
1991        if (this._config.reference === 'parent') {
1992          referenceElement = parent;
1993        } else if (Util.isElement(this._config.reference)) {
1994          referenceElement = this._config.reference; // Check if it's jQuery element
1995
1996          if (typeof this._config.reference.jquery !== 'undefined') {
1997            referenceElement = this._config.reference[0];
1998          }
1999        } // If boundary is not `scrollParent`, then set position to `static`
2000        // to allow the menu to "escape" the scroll parent's boundaries
2001        // https://github.com/twbs/bootstrap/issues/24251
2002
2003
2004        if (this._config.boundary !== 'scrollParent') {
2005          $__default["default"](parent).addClass(CLASS_NAME_POSITION_STATIC);
2006        }
2007
2008        this._popper = new Popper__default["default"](referenceElement, this._menu, this._getPopperConfig());
2009      } // If this is a touch-enabled device we add extra
2010      // empty mouseover listeners to the body's immediate children;
2011      // only needed because of broken event delegation on iOS
2012      // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
2013
2014
2015      if ('ontouchstart' in document.documentElement && $__default["default"](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
2016        $__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
2017      }
2018
2019      this._element.focus();
2020
2021      this._element.setAttribute('aria-expanded', true);
2022
2023      $__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW$5);
2024      $__default["default"](parent).toggleClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_SHOWN$3, relatedTarget));
2025    };
2026
2027    _proto.hide = function hide() {
2028      if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1) || !$__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5)) {
2029        return;
2030      }
2031
2032      var relatedTarget = {
2033        relatedTarget: this._element
2034      };
2035      var hideEvent = $__default["default"].Event(EVENT_HIDE$3, relatedTarget);
2036
2037      var parent = Dropdown._getParentFromElement(this._element);
2038
2039      $__default["default"](parent).trigger(hideEvent);
2040
2041      if (hideEvent.isDefaultPrevented()) {
2042        return;
2043      }
2044
2045      if (this._popper) {
2046        this._popper.destroy();
2047      }
2048
2049      $__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW$5);
2050      $__default["default"](parent).toggleClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_HIDDEN$3, relatedTarget));
2051    };
2052
2053    _proto.dispose = function dispose() {
2054      $__default["default"].removeData(this._element, DATA_KEY$6);
2055      $__default["default"](this._element).off(EVENT_KEY$6);
2056      this._element = null;
2057      this._menu = null;
2058
2059      if (this._popper !== null) {
2060        this._popper.destroy();
2061
2062        this._popper = null;
2063      }
2064    };
2065
2066    _proto.update = function update() {
2067      this._inNavbar = this._detectNavbar();
2068
2069      if (this._popper !== null) {
2070        this._popper.scheduleUpdate();
2071      }
2072    } // Private
2073    ;
2074
2075    _proto._addEventListeners = function _addEventListeners() {
2076      var _this = this;
2077
2078      $__default["default"](this._element).on(EVENT_CLICK, function (event) {
2079        event.preventDefault();
2080        event.stopPropagation();
2081
2082        _this.toggle();
2083      });
2084    };
2085
2086    _proto._getConfig = function _getConfig(config) {
2087      config = _extends({}, this.constructor.Default, $__default["default"](this._element).data(), config);
2088      Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
2089      return config;
2090    };
2091
2092    _proto._getMenuElement = function _getMenuElement() {
2093      if (!this._menu) {
2094        var parent = Dropdown._getParentFromElement(this._element);
2095
2096        if (parent) {
2097          this._menu = parent.querySelector(SELECTOR_MENU);
2098        }
2099      }
2100
2101      return this._menu;
2102    };
2103
2104    _proto._getPlacement = function _getPlacement() {
2105      var $parentDropdown = $__default["default"](this._element.parentNode);
2106      var placement = PLACEMENT_BOTTOM; // Handle dropup
2107
2108      if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
2109        placement = $__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
2110      } else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
2111        placement = PLACEMENT_RIGHT;
2112      } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
2113        placement = PLACEMENT_LEFT;
2114      } else if ($__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
2115        placement = PLACEMENT_BOTTOMEND;
2116      }
2117
2118      return placement;
2119    };
2120
2121    _proto._detectNavbar = function _detectNavbar() {
2122      return $__default["default"](this._element).closest('.navbar').length > 0;
2123    };
2124
2125    _proto._getOffset = function _getOffset() {
2126      var _this2 = this;
2127
2128      var offset = {};
2129
2130      if (typeof this._config.offset === 'function') {
2131        offset.fn = function (data) {
2132          data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element));
2133          return data;
2134        };
2135      } else {
2136        offset.offset = this._config.offset;
2137      }
2138
2139      return offset;
2140    };
2141
2142    _proto._getPopperConfig = function _getPopperConfig() {
2143      var popperConfig = {
2144        placement: this._getPlacement(),
2145        modifiers: {
2146          offset: this._getOffset(),
2147          flip: {
2148            enabled: this._config.flip
2149          },
2150          preventOverflow: {
2151            boundariesElement: this._config.boundary
2152          }
2153        }
2154      }; // Disable Popper if we have a static display
2155
2156      if (this._config.display === 'static') {
2157        popperConfig.modifiers.applyStyle = {
2158          enabled: false
2159        };
2160      }
2161
2162      return _extends({}, popperConfig, this._config.popperConfig);
2163    } // Static
2164    ;
2165
2166    Dropdown._jQueryInterface = function _jQueryInterface(config) {
2167      return this.each(function () {
2168        var data = $__default["default"](this).data(DATA_KEY$6);
2169
2170        var _config = typeof config === 'object' ? config : null;
2171
2172        if (!data) {
2173          data = new Dropdown(this, _config);
2174          $__default["default"](this).data(DATA_KEY$6, data);
2175        }
2176
2177        if (typeof config === 'string') {
2178          if (typeof data[config] === 'undefined') {
2179            throw new TypeError("No method named \"" + config + "\"");
2180          }
2181
2182          data[config]();
2183        }
2184      });
2185    };
2186
2187    Dropdown._clearMenus = function _clearMenus(event) {
2188      if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
2189        return;
2190      }
2191
2192      var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$2));
2193
2194      for (var i = 0, len = toggles.length; i < len; i++) {
2195        var parent = Dropdown._getParentFromElement(toggles[i]);
2196
2197        var context = $__default["default"](toggles[i]).data(DATA_KEY$6);
2198        var relatedTarget = {
2199          relatedTarget: toggles[i]
2200        };
2201
2202        if (event && event.type === 'click') {
2203          relatedTarget.clickEvent = event;
2204        }
2205
2206        if (!context) {
2207          continue;
2208        }
2209
2210        var dropdownMenu = context._menu;
2211
2212        if (!$__default["default"](parent).hasClass(CLASS_NAME_SHOW$5)) {
2213          continue;
2214        }
2215
2216        if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $__default["default"].contains(parent, event.target)) {
2217          continue;
2218        }
2219
2220        var hideEvent = $__default["default"].Event(EVENT_HIDE$3, relatedTarget);
2221        $__default["default"](parent).trigger(hideEvent);
2222
2223        if (hideEvent.isDefaultPrevented()) {
2224          continue;
2225        } // If this is a touch-enabled device we remove the extra
2226        // empty mouseover listeners we added for iOS support
2227
2228
2229        if ('ontouchstart' in document.documentElement) {
2230          $__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
2231        }
2232
2233        toggles[i].setAttribute('aria-expanded', 'false');
2234
2235        if (context._popper) {
2236          context._popper.destroy();
2237        }
2238
2239        $__default["default"](dropdownMenu).removeClass(CLASS_NAME_SHOW$5);
2240        $__default["default"](parent).removeClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_HIDDEN$3, relatedTarget));
2241      }
2242    };
2243
2244    Dropdown._getParentFromElement = function _getParentFromElement(element) {
2245      var parent;
2246      var selector = Util.getSelectorFromElement(element);
2247
2248      if (selector) {
2249        parent = document.querySelector(selector);
2250      }
2251
2252      return parent || element.parentNode;
2253    } // eslint-disable-next-line complexity
2254    ;
2255
2256    Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
2257      // If not input/textarea:
2258      //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
2259      // If input/textarea:
2260      //  - If space key => not a dropdown command
2261      //  - If key is other than escape
2262      //    - If key is not up or down => not a dropdown command
2263      //    - If trigger inside the menu => not a dropdown command
2264      if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE$1 && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $__default["default"](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
2265        return;
2266      }
2267
2268      if (this.disabled || $__default["default"](this).hasClass(CLASS_NAME_DISABLED$1)) {
2269        return;
2270      }
2271
2272      var parent = Dropdown._getParentFromElement(this);
2273
2274      var isActive = $__default["default"](parent).hasClass(CLASS_NAME_SHOW$5);
2275
2276      if (!isActive && event.which === ESCAPE_KEYCODE$1) {
2277        return;
2278      }
2279
2280      event.preventDefault();
2281      event.stopPropagation();
2282
2283      if (!isActive || event.which === ESCAPE_KEYCODE$1 || event.which === SPACE_KEYCODE) {
2284        if (event.which === ESCAPE_KEYCODE$1) {
2285          $__default["default"](parent.querySelector(SELECTOR_DATA_TOGGLE$2)).trigger('focus');
2286        }
2287
2288        $__default["default"](this).trigger('click');
2289        return;
2290      }
2291
2292      var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
2293        return $__default["default"](item).is(':visible');
2294      });
2295
2296      if (items.length === 0) {
2297        return;
2298      }
2299
2300      var index = items.indexOf(event.target);
2301
2302      if (event.which === ARROW_UP_KEYCODE && index > 0) {
2303        // Up
2304        index--;
2305      }
2306
2307      if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
2308        // Down
2309        index++;
2310      }
2311
2312      if (index < 0) {
2313        index = 0;
2314      }
2315
2316      items[index].focus();
2317    };
2318
2319    _createClass(Dropdown, null, [{
2320      key: "VERSION",
2321      get: function get() {
2322        return VERSION$6;
2323      }
2324    }, {
2325      key: "Default",
2326      get: function get() {
2327        return Default$5;
2328      }
2329    }, {
2330      key: "DefaultType",
2331      get: function get() {
2332        return DefaultType$5;
2333      }
2334    }]);
2335
2336    return Dropdown;
2337  }();
2338  /**
2339   * Data API implementation
2340   */
2341
2342
2343  $__default["default"](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API$2 + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
2344    event.preventDefault();
2345    event.stopPropagation();
2346
2347    Dropdown._jQueryInterface.call($__default["default"](this), 'toggle');
2348  }).on(EVENT_CLICK_DATA_API$2, SELECTOR_FORM_CHILD, function (e) {
2349    e.stopPropagation();
2350  });
2351  /**
2352   * jQuery
2353   */
2354
2355  $__default["default"].fn[NAME$6] = Dropdown._jQueryInterface;
2356  $__default["default"].fn[NAME$6].Constructor = Dropdown;
2357
2358  $__default["default"].fn[NAME$6].noConflict = function () {
2359    $__default["default"].fn[NAME$6] = JQUERY_NO_CONFLICT$6;
2360    return Dropdown._jQueryInterface;
2361  };
2362
2363  /**
2364   * Constants
2365   */
2366
2367  var NAME$5 = 'modal';
2368  var VERSION$5 = '4.6.1';
2369  var DATA_KEY$5 = 'bs.modal';
2370  var EVENT_KEY$5 = "." + DATA_KEY$5;
2371  var DATA_API_KEY$2 = '.data-api';
2372  var JQUERY_NO_CONFLICT$5 = $__default["default"].fn[NAME$5];
2373  var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
2374
2375  var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
2376  var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
2377  var CLASS_NAME_BACKDROP = 'modal-backdrop';
2378  var CLASS_NAME_OPEN = 'modal-open';
2379  var CLASS_NAME_FADE$4 = 'fade';
2380  var CLASS_NAME_SHOW$4 = 'show';
2381  var CLASS_NAME_STATIC = 'modal-static';
2382  var EVENT_HIDE$2 = "hide" + EVENT_KEY$5;
2383  var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$5;
2384  var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5;
2385  var EVENT_SHOW$2 = "show" + EVENT_KEY$5;
2386  var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5;
2387  var EVENT_FOCUSIN = "focusin" + EVENT_KEY$5;
2388  var EVENT_RESIZE = "resize" + EVENT_KEY$5;
2389  var EVENT_CLICK_DISMISS$1 = "click.dismiss" + EVENT_KEY$5;
2390  var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5;
2391  var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5;
2392  var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5;
2393  var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$5 + DATA_API_KEY$2;
2394  var SELECTOR_DIALOG = '.modal-dialog';
2395  var SELECTOR_MODAL_BODY = '.modal-body';
2396  var SELECTOR_DATA_TOGGLE$1 = '[data-toggle="modal"]';
2397  var SELECTOR_DATA_DISMISS$1 = '[data-dismiss="modal"]';
2398  var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2399  var SELECTOR_STICKY_CONTENT = '.sticky-top';
2400  var Default$4 = {
2401    backdrop: true,
2402    keyboard: true,
2403    focus: true,
2404    show: true
2405  };
2406  var DefaultType$4 = {
2407    backdrop: '(boolean|string)',
2408    keyboard: 'boolean',
2409    focus: 'boolean',
2410    show: 'boolean'
2411  };
2412  /**
2413   * Class definition
2414   */
2415
2416  var Modal = /*#__PURE__*/function () {
2417    function Modal(element, config) {
2418      this._config = this._getConfig(config);
2419      this._element = element;
2420      this._dialog = element.querySelector(SELECTOR_DIALOG);
2421      this._backdrop = null;
2422      this._isShown = false;
2423      this._isBodyOverflowing = false;
2424      this._ignoreBackdropClick = false;
2425      this._isTransitioning = false;
2426      this._scrollbarWidth = 0;
2427    } // Getters
2428
2429
2430    var _proto = Modal.prototype;
2431
2432    // Public
2433    _proto.toggle = function toggle(relatedTarget) {
2434      return this._isShown ? this.hide() : this.show(relatedTarget);
2435    };
2436
2437    _proto.show = function show(relatedTarget) {
2438      var _this = this;
2439
2440      if (this._isShown || this._isTransitioning) {
2441        return;
2442      }
2443
2444      var showEvent = $__default["default"].Event(EVENT_SHOW$2, {
2445        relatedTarget: relatedTarget
2446      });
2447      $__default["default"](this._element).trigger(showEvent);
2448
2449      if (showEvent.isDefaultPrevented()) {
2450        return;
2451      }
2452
2453      this._isShown = true;
2454
2455      if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE$4)) {
2456        this._isTransitioning = true;
2457      }
2458
2459      this._checkScrollbar();
2460
2461      this._setScrollbar();
2462
2463      this._adjustDialog();
2464
2465      this._setEscapeEvent();
2466
2467      this._setResizeEvent();
2468
2469      $__default["default"](this._element).on(EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function (event) {
2470        return _this.hide(event);
2471      });
2472      $__default["default"](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
2473        $__default["default"](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
2474          if ($__default["default"](event.target).is(_this._element)) {
2475            _this._ignoreBackdropClick = true;
2476          }
2477        });
2478      });
2479
2480      this._showBackdrop(function () {
2481        return _this._showElement(relatedTarget);
2482      });
2483    };
2484
2485    _proto.hide = function hide(event) {
2486      var _this2 = this;
2487
2488      if (event) {
2489        event.preventDefault();
2490      }
2491
2492      if (!this._isShown || this._isTransitioning) {
2493        return;
2494      }
2495
2496      var hideEvent = $__default["default"].Event(EVENT_HIDE$2);
2497      $__default["default"](this._element).trigger(hideEvent);
2498
2499      if (!this._isShown || hideEvent.isDefaultPrevented()) {
2500        return;
2501      }
2502
2503      this._isShown = false;
2504      var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4);
2505
2506      if (transition) {
2507        this._isTransitioning = true;
2508      }
2509
2510      this._setEscapeEvent();
2511
2512      this._setResizeEvent();
2513
2514      $__default["default"](document).off(EVENT_FOCUSIN);
2515      $__default["default"](this._element).removeClass(CLASS_NAME_SHOW$4);
2516      $__default["default"](this._element).off(EVENT_CLICK_DISMISS$1);
2517      $__default["default"](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
2518
2519      if (transition) {
2520        var transitionDuration = Util.getTransitionDurationFromElement(this._element);
2521        $__default["default"](this._element).one(Util.TRANSITION_END, function (event) {
2522          return _this2._hideModal(event);
2523        }).emulateTransitionEnd(transitionDuration);
2524      } else {
2525        this._hideModal();
2526      }
2527    };
2528
2529    _proto.dispose = function dispose() {
2530      [window, this._element, this._dialog].forEach(function (htmlElement) {
2531        return $__default["default"](htmlElement).off(EVENT_KEY$5);
2532      });
2533      /**
2534       * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
2535       * Do not move `document` in `htmlElements` array
2536       * It will remove `EVENT_CLICK_DATA_API` event that should remain
2537       */
2538
2539      $__default["default"](document).off(EVENT_FOCUSIN);
2540      $__default["default"].removeData(this._element, DATA_KEY$5);
2541      this._config = null;
2542      this._element = null;
2543      this._dialog = null;
2544      this._backdrop = null;
2545      this._isShown = null;
2546      this._isBodyOverflowing = null;
2547      this._ignoreBackdropClick = null;
2548      this._isTransitioning = null;
2549      this._scrollbarWidth = null;
2550    };
2551
2552    _proto.handleUpdate = function handleUpdate() {
2553      this._adjustDialog();
2554    } // Private
2555    ;
2556
2557    _proto._getConfig = function _getConfig(config) {
2558      config = _extends({}, Default$4, config);
2559      Util.typeCheckConfig(NAME$5, config, DefaultType$4);
2560      return config;
2561    };
2562
2563    _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
2564      var _this3 = this;
2565
2566      var hideEventPrevented = $__default["default"].Event(EVENT_HIDE_PREVENTED);
2567      $__default["default"](this._element).trigger(hideEventPrevented);
2568
2569      if (hideEventPrevented.isDefaultPrevented()) {
2570        return;
2571      }
2572
2573      var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2574
2575      if (!isModalOverflowing) {
2576        this._element.style.overflowY = 'hidden';
2577      }
2578
2579      this._element.classList.add(CLASS_NAME_STATIC);
2580
2581      var modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog);
2582      $__default["default"](this._element).off(Util.TRANSITION_END);
2583      $__default["default"](this._element).one(Util.TRANSITION_END, function () {
2584        _this3._element.classList.remove(CLASS_NAME_STATIC);
2585
2586        if (!isModalOverflowing) {
2587          $__default["default"](_this3._element).one(Util.TRANSITION_END, function () {
2588            _this3._element.style.overflowY = '';
2589          }).emulateTransitionEnd(_this3._element, modalTransitionDuration);
2590        }
2591      }).emulateTransitionEnd(modalTransitionDuration);
2592
2593      this._element.focus();
2594    };
2595
2596    _proto._showElement = function _showElement(relatedTarget) {
2597      var _this4 = this;
2598
2599      var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4);
2600      var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
2601
2602      if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
2603        // Don't move modal's DOM position
2604        document.body.appendChild(this._element);
2605      }
2606
2607      this._element.style.display = 'block';
2608
2609      this._element.removeAttribute('aria-hidden');
2610
2611      this._element.setAttribute('aria-modal', true);
2612
2613      this._element.setAttribute('role', 'dialog');
2614
2615      if ($__default["default"](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
2616        modalBody.scrollTop = 0;
2617      } else {
2618        this._element.scrollTop = 0;
2619      }
2620
2621      if (transition) {
2622        Util.reflow(this._element);
2623      }
2624
2625      $__default["default"](this._element).addClass(CLASS_NAME_SHOW$4);
2626
2627      if (this._config.focus) {
2628        this._enforceFocus();
2629      }
2630
2631      var shownEvent = $__default["default"].Event(EVENT_SHOWN$2, {
2632        relatedTarget: relatedTarget
2633      });
2634
2635      var transitionComplete = function transitionComplete() {
2636        if (_this4._config.focus) {
2637          _this4._element.focus();
2638        }
2639
2640        _this4._isTransitioning = false;
2641        $__default["default"](_this4._element).trigger(shownEvent);
2642      };
2643
2644      if (transition) {
2645        var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
2646        $__default["default"](this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
2647      } else {
2648        transitionComplete();
2649      }
2650    };
2651
2652    _proto._enforceFocus = function _enforceFocus() {
2653      var _this5 = this;
2654
2655      $__default["default"](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
2656      .on(EVENT_FOCUSIN, function (event) {
2657        if (document !== event.target && _this5._element !== event.target && $__default["default"](_this5._element).has(event.target).length === 0) {
2658          _this5._element.focus();
2659        }
2660      });
2661    };
2662
2663    _proto._setEscapeEvent = function _setEscapeEvent() {
2664      var _this6 = this;
2665
2666      if (this._isShown) {
2667        $__default["default"](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
2668          if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
2669            event.preventDefault();
2670
2671            _this6.hide();
2672          } else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
2673            _this6._triggerBackdropTransition();
2674          }
2675        });
2676      } else if (!this._isShown) {
2677        $__default["default"](this._element).off(EVENT_KEYDOWN_DISMISS);
2678      }
2679    };
2680
2681    _proto._setResizeEvent = function _setResizeEvent() {
2682      var _this7 = this;
2683
2684      if (this._isShown) {
2685        $__default["default"](window).on(EVENT_RESIZE, function (event) {
2686          return _this7.handleUpdate(event);
2687        });
2688      } else {
2689        $__default["default"](window).off(EVENT_RESIZE);
2690      }
2691    };
2692
2693    _proto._hideModal = function _hideModal() {
2694      var _this8 = this;
2695
2696      this._element.style.display = 'none';
2697
2698      this._element.setAttribute('aria-hidden', true);
2699
2700      this._element.removeAttribute('aria-modal');
2701
2702      this._element.removeAttribute('role');
2703
2704      this._isTransitioning = false;
2705
2706      this._showBackdrop(function () {
2707        $__default["default"](document.body).removeClass(CLASS_NAME_OPEN);
2708
2709        _this8._resetAdjustments();
2710
2711        _this8._resetScrollbar();
2712
2713        $__default["default"](_this8._element).trigger(EVENT_HIDDEN$2);
2714      });
2715    };
2716
2717    _proto._removeBackdrop = function _removeBackdrop() {
2718      if (this._backdrop) {
2719        $__default["default"](this._backdrop).remove();
2720        this._backdrop = null;
2721      }
2722    };
2723
2724    _proto._showBackdrop = function _showBackdrop(callback) {
2725      var _this9 = this;
2726
2727      var animate = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4) ? CLASS_NAME_FADE$4 : '';
2728
2729      if (this._isShown && this._config.backdrop) {
2730        this._backdrop = document.createElement('div');
2731        this._backdrop.className = CLASS_NAME_BACKDROP;
2732
2733        if (animate) {
2734          this._backdrop.classList.add(animate);
2735        }
2736
2737        $__default["default"](this._backdrop).appendTo(document.body);
2738        $__default["default"](this._element).on(EVENT_CLICK_DISMISS$1, function (event) {
2739          if (_this9._ignoreBackdropClick) {
2740            _this9._ignoreBackdropClick = false;
2741            return;
2742          }
2743
2744          if (event.target !== event.currentTarget) {
2745            return;
2746          }
2747
2748          if (_this9._config.backdrop === 'static') {
2749            _this9._triggerBackdropTransition();
2750          } else {
2751            _this9.hide();
2752          }
2753        });
2754
2755        if (animate) {
2756          Util.reflow(this._backdrop);
2757        }
2758
2759        $__default["default"](this._backdrop).addClass(CLASS_NAME_SHOW$4);
2760
2761        if (!callback) {
2762          return;
2763        }
2764
2765        if (!animate) {
2766          callback();
2767          return;
2768        }
2769
2770        var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
2771        $__default["default"](this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
2772      } else if (!this._isShown && this._backdrop) {
2773        $__default["default"](this._backdrop).removeClass(CLASS_NAME_SHOW$4);
2774
2775        var callbackRemove = function callbackRemove() {
2776          _this9._removeBackdrop();
2777
2778          if (callback) {
2779            callback();
2780          }
2781        };
2782
2783        if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE$4)) {
2784          var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
2785
2786          $__default["default"](this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
2787        } else {
2788          callbackRemove();
2789        }
2790      } else if (callback) {
2791        callback();
2792      }
2793    } // ----------------------------------------------------------------------
2794    // the following methods are used to handle overflowing modals
2795    // todo (fat): these should probably be refactored out of modal.js
2796    // ----------------------------------------------------------------------
2797    ;
2798
2799    _proto._adjustDialog = function _adjustDialog() {
2800      var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2801
2802      if (!this._isBodyOverflowing && isModalOverflowing) {
2803        this._element.style.paddingLeft = this._scrollbarWidth + "px";
2804      }
2805
2806      if (this._isBodyOverflowing && !isModalOverflowing) {
2807        this._element.style.paddingRight = this._scrollbarWidth + "px";
2808      }
2809    };
2810
2811    _proto._resetAdjustments = function _resetAdjustments() {
2812      this._element.style.paddingLeft = '';
2813      this._element.style.paddingRight = '';
2814    };
2815
2816    _proto._checkScrollbar = function _checkScrollbar() {
2817      var rect = document.body.getBoundingClientRect();
2818      this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
2819      this._scrollbarWidth = this._getScrollbarWidth();
2820    };
2821
2822    _proto._setScrollbar = function _setScrollbar() {
2823      var _this10 = this;
2824
2825      if (this._isBodyOverflowing) {
2826        // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
2827        //   while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
2828        var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
2829        var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
2830
2831        $__default["default"](fixedContent).each(function (index, element) {
2832          var actualPadding = element.style.paddingRight;
2833          var calculatedPadding = $__default["default"](element).css('padding-right');
2834          $__default["default"](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
2835        }); // Adjust sticky content margin
2836
2837        $__default["default"](stickyContent).each(function (index, element) {
2838          var actualMargin = element.style.marginRight;
2839          var calculatedMargin = $__default["default"](element).css('margin-right');
2840          $__default["default"](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
2841        }); // Adjust body padding
2842
2843        var actualPadding = document.body.style.paddingRight;
2844        var calculatedPadding = $__default["default"](document.body).css('padding-right');
2845        $__default["default"](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
2846      }
2847
2848      $__default["default"](document.body).addClass(CLASS_NAME_OPEN);
2849    };
2850
2851    _proto._resetScrollbar = function _resetScrollbar() {
2852      // Restore fixed content padding
2853      var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
2854      $__default["default"](fixedContent).each(function (index, element) {
2855        var padding = $__default["default"](element).data('padding-right');
2856        $__default["default"](element).removeData('padding-right');
2857        element.style.paddingRight = padding ? padding : '';
2858      }); // Restore sticky content
2859
2860      var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
2861      $__default["default"](elements).each(function (index, element) {
2862        var margin = $__default["default"](element).data('margin-right');
2863
2864        if (typeof margin !== 'undefined') {
2865          $__default["default"](element).css('margin-right', margin).removeData('margin-right');
2866        }
2867      }); // Restore body padding
2868
2869      var padding = $__default["default"](document.body).data('padding-right');
2870      $__default["default"](document.body).removeData('padding-right');
2871      document.body.style.paddingRight = padding ? padding : '';
2872    };
2873
2874    _proto._getScrollbarWidth = function _getScrollbarWidth() {
2875      // thx d.walsh
2876      var scrollDiv = document.createElement('div');
2877      scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
2878      document.body.appendChild(scrollDiv);
2879      var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
2880      document.body.removeChild(scrollDiv);
2881      return scrollbarWidth;
2882    } // Static
2883    ;
2884
2885    Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
2886      return this.each(function () {
2887        var data = $__default["default"](this).data(DATA_KEY$5);
2888
2889        var _config = _extends({}, Default$4, $__default["default"](this).data(), typeof config === 'object' && config ? config : {});
2890
2891        if (!data) {
2892          data = new Modal(this, _config);
2893          $__default["default"](this).data(DATA_KEY$5, data);
2894        }
2895
2896        if (typeof config === 'string') {
2897          if (typeof data[config] === 'undefined') {
2898            throw new TypeError("No method named \"" + config + "\"");
2899          }
2900
2901          data[config](relatedTarget);
2902        } else if (_config.show) {
2903          data.show(relatedTarget);
2904        }
2905      });
2906    };
2907
2908    _createClass(Modal, null, [{
2909      key: "VERSION",
2910      get: function get() {
2911        return VERSION$5;
2912      }
2913    }, {
2914      key: "Default",
2915      get: function get() {
2916        return Default$4;
2917      }
2918    }]);
2919
2920    return Modal;
2921  }();
2922  /**
2923   * Data API implementation
2924   */
2925
2926
2927  $__default["default"](document).on(EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
2928    var _this11 = this;
2929
2930    var target;
2931    var selector = Util.getSelectorFromElement(this);
2932
2933    if (selector) {
2934      target = document.querySelector(selector);
2935    }
2936
2937    var config = $__default["default"](target).data(DATA_KEY$5) ? 'toggle' : _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
2938
2939    if (this.tagName === 'A' || this.tagName === 'AREA') {
2940      event.preventDefault();
2941    }
2942
2943    var $target = $__default["default"](target).one(EVENT_SHOW$2, function (showEvent) {
2944      if (showEvent.isDefaultPrevented()) {
2945        // Only register focus restorer if modal will actually get shown
2946        return;
2947      }
2948
2949      $target.one(EVENT_HIDDEN$2, function () {
2950        if ($__default["default"](_this11).is(':visible')) {
2951          _this11.focus();
2952        }
2953      });
2954    });
2955
2956    Modal._jQueryInterface.call($__default["default"](target), config, this);
2957  });
2958  /**
2959   * jQuery
2960   */
2961
2962  $__default["default"].fn[NAME$5] = Modal._jQueryInterface;
2963  $__default["default"].fn[NAME$5].Constructor = Modal;
2964
2965  $__default["default"].fn[NAME$5].noConflict = function () {
2966    $__default["default"].fn[NAME$5] = JQUERY_NO_CONFLICT$5;
2967    return Modal._jQueryInterface;
2968  };
2969
2970  /**
2971   * --------------------------------------------------------------------------
2972   * Bootstrap (v4.6.1): tools/sanitizer.js
2973   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2974   * --------------------------------------------------------------------------
2975   */
2976  var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
2977  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
2978  var DefaultWhitelist = {
2979    // Global attributes allowed on any supplied element below.
2980    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
2981    a: ['target', 'href', 'title', 'rel'],
2982    area: [],
2983    b: [],
2984    br: [],
2985    col: [],
2986    code: [],
2987    div: [],
2988    em: [],
2989    hr: [],
2990    h1: [],
2991    h2: [],
2992    h3: [],
2993    h4: [],
2994    h5: [],
2995    h6: [],
2996    i: [],
2997    img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
2998    li: [],
2999    ol: [],
3000    p: [],
3001    pre: [],
3002    s: [],
3003    small: [],
3004    span: [],
3005    sub: [],
3006    sup: [],
3007    strong: [],
3008    u: [],
3009    ul: []
3010  };
3011  /**
3012   * A pattern that recognizes a commonly useful subset of URLs that are safe.
3013   *
3014   * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
3015   */
3016
3017  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
3018  /**
3019   * A pattern that matches safe data URLs. Only matches image, video and audio types.
3020   *
3021   * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
3022   */
3023
3024  var 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;
3025
3026  function allowedAttribute(attr, allowedAttributeList) {
3027    var attrName = attr.nodeName.toLowerCase();
3028
3029    if (allowedAttributeList.indexOf(attrName) !== -1) {
3030      if (uriAttrs.indexOf(attrName) !== -1) {
3031        return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
3032      }
3033
3034      return true;
3035    }
3036
3037    var regExp = allowedAttributeList.filter(function (attrRegex) {
3038      return attrRegex instanceof RegExp;
3039    }); // Check if a regular expression validates the attribute.
3040
3041    for (var i = 0, len = regExp.length; i < len; i++) {
3042      if (regExp[i].test(attrName)) {
3043        return true;
3044      }
3045    }
3046
3047    return false;
3048  }
3049
3050  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
3051    if (unsafeHtml.length === 0) {
3052      return unsafeHtml;
3053    }
3054
3055    if (sanitizeFn && typeof sanitizeFn === 'function') {
3056      return sanitizeFn(unsafeHtml);
3057    }
3058
3059    var domParser = new window.DOMParser();
3060    var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
3061    var whitelistKeys = Object.keys(whiteList);
3062    var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
3063
3064    var _loop = function _loop(i, len) {
3065      var el = elements[i];
3066      var elName = el.nodeName.toLowerCase();
3067
3068      if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
3069        el.parentNode.removeChild(el);
3070        return "continue";
3071      }
3072
3073      var attributeList = [].slice.call(el.attributes); // eslint-disable-next-line unicorn/prefer-spread
3074
3075      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
3076      attributeList.forEach(function (attr) {
3077        if (!allowedAttribute(attr, whitelistedAttributes)) {
3078          el.removeAttribute(attr.nodeName);
3079        }
3080      });
3081    };
3082
3083    for (var i = 0, len = elements.length; i < len; i++) {
3084      var _ret = _loop(i);
3085
3086      if (_ret === "continue") continue;
3087    }
3088
3089    return createdDocument.body.innerHTML;
3090  }
3091
3092  /**
3093   * Constants
3094   */
3095
3096  var NAME$4 = 'tooltip';
3097  var VERSION$4 = '4.6.1';
3098  var DATA_KEY$4 = 'bs.tooltip';
3099  var EVENT_KEY$4 = "." + DATA_KEY$4;
3100  var JQUERY_NO_CONFLICT$4 = $__default["default"].fn[NAME$4];
3101  var CLASS_PREFIX$1 = 'bs-tooltip';
3102  var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
3103  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
3104  var CLASS_NAME_FADE$3 = 'fade';
3105  var CLASS_NAME_SHOW$3 = 'show';
3106  var HOVER_STATE_SHOW = 'show';
3107  var HOVER_STATE_OUT = 'out';
3108  var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
3109  var SELECTOR_ARROW = '.arrow';
3110  var TRIGGER_HOVER = 'hover';
3111  var TRIGGER_FOCUS = 'focus';
3112  var TRIGGER_CLICK = 'click';
3113  var TRIGGER_MANUAL = 'manual';
3114  var AttachmentMap = {
3115    AUTO: 'auto',
3116    TOP: 'top',
3117    RIGHT: 'right',
3118    BOTTOM: 'bottom',
3119    LEFT: 'left'
3120  };
3121  var Default$3 = {
3122    animation: true,
3123    template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
3124    trigger: 'hover focus',
3125    title: '',
3126    delay: 0,
3127    html: false,
3128    selector: false,
3129    placement: 'top',
3130    offset: 0,
3131    container: false,
3132    fallbackPlacement: 'flip',
3133    boundary: 'scrollParent',
3134    customClass: '',
3135    sanitize: true,
3136    sanitizeFn: null,
3137    whiteList: DefaultWhitelist,
3138    popperConfig: null
3139  };
3140  var DefaultType$3 = {
3141    animation: 'boolean',
3142    template: 'string',
3143    title: '(string|element|function)',
3144    trigger: 'string',
3145    delay: '(number|object)',
3146    html: 'boolean',
3147    selector: '(string|boolean)',
3148    placement: '(string|function)',
3149    offset: '(number|string|function)',
3150    container: '(string|element|boolean)',
3151    fallbackPlacement: '(string|array)',
3152    boundary: '(string|element)',
3153    customClass: '(string|function)',
3154    sanitize: 'boolean',
3155    sanitizeFn: '(null|function)',
3156    whiteList: 'object',
3157    popperConfig: '(null|object)'
3158  };
3159  var Event$1 = {
3160    HIDE: "hide" + EVENT_KEY$4,
3161    HIDDEN: "hidden" + EVENT_KEY$4,
3162    SHOW: "show" + EVENT_KEY$4,
3163    SHOWN: "shown" + EVENT_KEY$4,
3164    INSERTED: "inserted" + EVENT_KEY$4,
3165    CLICK: "click" + EVENT_KEY$4,
3166    FOCUSIN: "focusin" + EVENT_KEY$4,
3167    FOCUSOUT: "focusout" + EVENT_KEY$4,
3168    MOUSEENTER: "mouseenter" + EVENT_KEY$4,
3169    MOUSELEAVE: "mouseleave" + EVENT_KEY$4
3170  };
3171  /**
3172   * Class definition
3173   */
3174
3175  var Tooltip = /*#__PURE__*/function () {
3176    function Tooltip(element, config) {
3177      if (typeof Popper__default["default"] === 'undefined') {
3178        throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
3179      } // Private
3180
3181
3182      this._isEnabled = true;
3183      this._timeout = 0;
3184      this._hoverState = '';
3185      this._activeTrigger = {};
3186      this._popper = null; // Protected
3187
3188      this.element = element;
3189      this.config = this._getConfig(config);
3190      this.tip = null;
3191
3192      this._setListeners();
3193    } // Getters
3194
3195
3196    var _proto = Tooltip.prototype;
3197
3198    // Public
3199    _proto.enable = function enable() {
3200      this._isEnabled = true;
3201    };
3202
3203    _proto.disable = function disable() {
3204      this._isEnabled = false;
3205    };
3206
3207    _proto.toggleEnabled = function toggleEnabled() {
3208      this._isEnabled = !this._isEnabled;
3209    };
3210
3211    _proto.toggle = function toggle(event) {
3212      if (!this._isEnabled) {
3213        return;
3214      }
3215
3216      if (event) {
3217        var dataKey = this.constructor.DATA_KEY;
3218        var context = $__default["default"](event.currentTarget).data(dataKey);
3219
3220        if (!context) {
3221          context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3222          $__default["default"](event.currentTarget).data(dataKey, context);
3223        }
3224
3225        context._activeTrigger.click = !context._activeTrigger.click;
3226
3227        if (context._isWithActiveTrigger()) {
3228          context._enter(null, context);
3229        } else {
3230          context._leave(null, context);
3231        }
3232      } else {
3233        if ($__default["default"](this.getTipElement()).hasClass(CLASS_NAME_SHOW$3)) {
3234          this._leave(null, this);
3235
3236          return;
3237        }
3238
3239        this._enter(null, this);
3240      }
3241    };
3242
3243    _proto.dispose = function dispose() {
3244      clearTimeout(this._timeout);
3245      $__default["default"].removeData(this.element, this.constructor.DATA_KEY);
3246      $__default["default"](this.element).off(this.constructor.EVENT_KEY);
3247      $__default["default"](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
3248
3249      if (this.tip) {
3250        $__default["default"](this.tip).remove();
3251      }
3252
3253      this._isEnabled = null;
3254      this._timeout = null;
3255      this._hoverState = null;
3256      this._activeTrigger = null;
3257
3258      if (this._popper) {
3259        this._popper.destroy();
3260      }
3261
3262      this._popper = null;
3263      this.element = null;
3264      this.config = null;
3265      this.tip = null;
3266    };
3267
3268    _proto.show = function show() {
3269      var _this = this;
3270
3271      if ($__default["default"](this.element).css('display') === 'none') {
3272        throw new Error('Please use show on visible elements');
3273      }
3274
3275      var showEvent = $__default["default"].Event(this.constructor.Event.SHOW);
3276
3277      if (this.isWithContent() && this._isEnabled) {
3278        $__default["default"](this.element).trigger(showEvent);
3279        var shadowRoot = Util.findShadowRoot(this.element);
3280        var isInTheDom = $__default["default"].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
3281
3282        if (showEvent.isDefaultPrevented() || !isInTheDom) {
3283          return;
3284        }
3285
3286        var tip = this.getTipElement();
3287        var tipId = Util.getUID(this.constructor.NAME);
3288        tip.setAttribute('id', tipId);
3289        this.element.setAttribute('aria-describedby', tipId);
3290        this.setContent();
3291
3292        if (this.config.animation) {
3293          $__default["default"](tip).addClass(CLASS_NAME_FADE$3);
3294        }
3295
3296        var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
3297
3298        var attachment = this._getAttachment(placement);
3299
3300        this.addAttachmentClass(attachment);
3301
3302        var container = this._getContainer();
3303
3304        $__default["default"](tip).data(this.constructor.DATA_KEY, this);
3305
3306        if (!$__default["default"].contains(this.element.ownerDocument.documentElement, this.tip)) {
3307          $__default["default"](tip).appendTo(container);
3308        }
3309
3310        $__default["default"](this.element).trigger(this.constructor.Event.INSERTED);
3311        this._popper = new Popper__default["default"](this.element, tip, this._getPopperConfig(attachment));
3312        $__default["default"](tip).addClass(CLASS_NAME_SHOW$3);
3313        $__default["default"](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra
3314        // empty mouseover listeners to the body's immediate children;
3315        // only needed because of broken event delegation on iOS
3316        // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
3317
3318        if ('ontouchstart' in document.documentElement) {
3319          $__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
3320        }
3321
3322        var complete = function complete() {
3323          if (_this.config.animation) {
3324            _this._fixTransition();
3325          }
3326
3327          var prevHoverState = _this._hoverState;
3328          _this._hoverState = null;
3329          $__default["default"](_this.element).trigger(_this.constructor.Event.SHOWN);
3330
3331          if (prevHoverState === HOVER_STATE_OUT) {
3332            _this._leave(null, _this);
3333          }
3334        };
3335
3336        if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE$3)) {
3337          var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
3338          $__default["default"](this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
3339        } else {
3340          complete();
3341        }
3342      }
3343    };
3344
3345    _proto.hide = function hide(callback) {
3346      var _this2 = this;
3347
3348      var tip = this.getTipElement();
3349      var hideEvent = $__default["default"].Event(this.constructor.Event.HIDE);
3350
3351      var complete = function complete() {
3352        if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
3353          tip.parentNode.removeChild(tip);
3354        }
3355
3356        _this2._cleanTipClass();
3357
3358        _this2.element.removeAttribute('aria-describedby');
3359
3360        $__default["default"](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
3361
3362        if (_this2._popper !== null) {
3363          _this2._popper.destroy();
3364        }
3365
3366        if (callback) {
3367          callback();
3368        }
3369      };
3370
3371      $__default["default"](this.element).trigger(hideEvent);
3372
3373      if (hideEvent.isDefaultPrevented()) {
3374        return;
3375      }
3376
3377      $__default["default"](tip).removeClass(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra
3378      // empty mouseover listeners we added for iOS support
3379
3380      if ('ontouchstart' in document.documentElement) {
3381        $__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
3382      }
3383
3384      this._activeTrigger[TRIGGER_CLICK] = false;
3385      this._activeTrigger[TRIGGER_FOCUS] = false;
3386      this._activeTrigger[TRIGGER_HOVER] = false;
3387
3388      if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE$3)) {
3389        var transitionDuration = Util.getTransitionDurationFromElement(tip);
3390        $__default["default"](tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
3391      } else {
3392        complete();
3393      }
3394
3395      this._hoverState = '';
3396    };
3397
3398    _proto.update = function update() {
3399      if (this._popper !== null) {
3400        this._popper.scheduleUpdate();
3401      }
3402    } // Protected
3403    ;
3404
3405    _proto.isWithContent = function isWithContent() {
3406      return Boolean(this.getTitle());
3407    };
3408
3409    _proto.addAttachmentClass = function addAttachmentClass(attachment) {
3410      $__default["default"](this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
3411    };
3412
3413    _proto.getTipElement = function getTipElement() {
3414      this.tip = this.tip || $__default["default"](this.config.template)[0];
3415      return this.tip;
3416    };
3417
3418    _proto.setContent = function setContent() {
3419      var tip = this.getTipElement();
3420      this.setElementContent($__default["default"](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
3421      $__default["default"](tip).removeClass(CLASS_NAME_FADE$3 + " " + CLASS_NAME_SHOW$3);
3422    };
3423
3424    _proto.setElementContent = function setElementContent($element, content) {
3425      if (typeof content === 'object' && (content.nodeType || content.jquery)) {
3426        // Content is a DOM node or a jQuery
3427        if (this.config.html) {
3428          if (!$__default["default"](content).parent().is($element)) {
3429            $element.empty().append(content);
3430          }
3431        } else {
3432          $element.text($__default["default"](content).text());
3433        }
3434
3435        return;
3436      }
3437
3438      if (this.config.html) {
3439        if (this.config.sanitize) {
3440          content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
3441        }
3442
3443        $element.html(content);
3444      } else {
3445        $element.text(content);
3446      }
3447    };
3448
3449    _proto.getTitle = function getTitle() {
3450      var title = this.element.getAttribute('data-original-title');
3451
3452      if (!title) {
3453        title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
3454      }
3455
3456      return title;
3457    } // Private
3458    ;
3459
3460    _proto._getPopperConfig = function _getPopperConfig(attachment) {
3461      var _this3 = this;
3462
3463      var defaultBsConfig = {
3464        placement: attachment,
3465        modifiers: {
3466          offset: this._getOffset(),
3467          flip: {
3468            behavior: this.config.fallbackPlacement
3469          },
3470          arrow: {
3471            element: SELECTOR_ARROW
3472          },
3473          preventOverflow: {
3474            boundariesElement: this.config.boundary
3475          }
3476        },
3477        onCreate: function onCreate(data) {
3478          if (data.originalPlacement !== data.placement) {
3479            _this3._handlePopperPlacementChange(data);
3480          }
3481        },
3482        onUpdate: function onUpdate(data) {
3483          return _this3._handlePopperPlacementChange(data);
3484        }
3485      };
3486      return _extends({}, defaultBsConfig, this.config.popperConfig);
3487    };
3488
3489    _proto._getOffset = function _getOffset() {
3490      var _this4 = this;
3491
3492      var offset = {};
3493
3494      if (typeof this.config.offset === 'function') {
3495        offset.fn = function (data) {
3496          data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element));
3497          return data;
3498        };
3499      } else {
3500        offset.offset = this.config.offset;
3501      }
3502
3503      return offset;
3504    };
3505
3506    _proto._getContainer = function _getContainer() {
3507      if (this.config.container === false) {
3508        return document.body;
3509      }
3510
3511      if (Util.isElement(this.config.container)) {
3512        return $__default["default"](this.config.container);
3513      }
3514
3515      return $__default["default"](document).find(this.config.container);
3516    };
3517
3518    _proto._getAttachment = function _getAttachment(placement) {
3519      return AttachmentMap[placement.toUpperCase()];
3520    };
3521
3522    _proto._setListeners = function _setListeners() {
3523      var _this5 = this;
3524
3525      var triggers = this.config.trigger.split(' ');
3526      triggers.forEach(function (trigger) {
3527        if (trigger === 'click') {
3528          $__default["default"](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
3529            return _this5.toggle(event);
3530          });
3531        } else if (trigger !== TRIGGER_MANUAL) {
3532          var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
3533          var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
3534          $__default["default"](_this5.element).on(eventIn, _this5.config.selector, function (event) {
3535            return _this5._enter(event);
3536          }).on(eventOut, _this5.config.selector, function (event) {
3537            return _this5._leave(event);
3538          });
3539        }
3540      });
3541
3542      this._hideModalHandler = function () {
3543        if (_this5.element) {
3544          _this5.hide();
3545        }
3546      };
3547
3548      $__default["default"](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
3549
3550      if (this.config.selector) {
3551        this.config = _extends({}, this.config, {
3552          trigger: 'manual',
3553          selector: ''
3554        });
3555      } else {
3556        this._fixTitle();
3557      }
3558    };
3559
3560    _proto._fixTitle = function _fixTitle() {
3561      var titleType = typeof this.element.getAttribute('data-original-title');
3562
3563      if (this.element.getAttribute('title') || titleType !== 'string') {
3564        this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
3565        this.element.setAttribute('title', '');
3566      }
3567    };
3568
3569    _proto._enter = function _enter(event, context) {
3570      var dataKey = this.constructor.DATA_KEY;
3571      context = context || $__default["default"](event.currentTarget).data(dataKey);
3572
3573      if (!context) {
3574        context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3575        $__default["default"](event.currentTarget).data(dataKey, context);
3576      }
3577
3578      if (event) {
3579        context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
3580      }
3581
3582      if ($__default["default"](context.getTipElement()).hasClass(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
3583        context._hoverState = HOVER_STATE_SHOW;
3584        return;
3585      }
3586
3587      clearTimeout(context._timeout);
3588      context._hoverState = HOVER_STATE_SHOW;
3589
3590      if (!context.config.delay || !context.config.delay.show) {
3591        context.show();
3592        return;
3593      }
3594
3595      context._timeout = setTimeout(function () {
3596        if (context._hoverState === HOVER_STATE_SHOW) {
3597          context.show();
3598        }
3599      }, context.config.delay.show);
3600    };
3601
3602    _proto._leave = function _leave(event, context) {
3603      var dataKey = this.constructor.DATA_KEY;
3604      context = context || $__default["default"](event.currentTarget).data(dataKey);
3605
3606      if (!context) {
3607        context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3608        $__default["default"](event.currentTarget).data(dataKey, context);
3609      }
3610
3611      if (event) {
3612        context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
3613      }
3614
3615      if (context._isWithActiveTrigger()) {
3616        return;
3617      }
3618
3619      clearTimeout(context._timeout);
3620      context._hoverState = HOVER_STATE_OUT;
3621
3622      if (!context.config.delay || !context.config.delay.hide) {
3623        context.hide();
3624        return;
3625      }
3626
3627      context._timeout = setTimeout(function () {
3628        if (context._hoverState === HOVER_STATE_OUT) {
3629          context.hide();
3630        }
3631      }, context.config.delay.hide);
3632    };
3633
3634    _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
3635      for (var trigger in this._activeTrigger) {
3636        if (this._activeTrigger[trigger]) {
3637          return true;
3638        }
3639      }
3640
3641      return false;
3642    };
3643
3644    _proto._getConfig = function _getConfig(config) {
3645      var dataAttributes = $__default["default"](this.element).data();
3646      Object.keys(dataAttributes).forEach(function (dataAttr) {
3647        if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
3648          delete dataAttributes[dataAttr];
3649        }
3650      });
3651      config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
3652
3653      if (typeof config.delay === 'number') {
3654        config.delay = {
3655          show: config.delay,
3656          hide: config.delay
3657        };
3658      }
3659
3660      if (typeof config.title === 'number') {
3661        config.title = config.title.toString();
3662      }
3663
3664      if (typeof config.content === 'number') {
3665        config.content = config.content.toString();
3666      }
3667
3668      Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
3669
3670      if (config.sanitize) {
3671        config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
3672      }
3673
3674      return config;
3675    };
3676
3677    _proto._getDelegateConfig = function _getDelegateConfig() {
3678      var config = {};
3679
3680      if (this.config) {
3681        for (var key in this.config) {
3682          if (this.constructor.Default[key] !== this.config[key]) {
3683            config[key] = this.config[key];
3684          }
3685        }
3686      }
3687
3688      return config;
3689    };
3690
3691    _proto._cleanTipClass = function _cleanTipClass() {
3692      var $tip = $__default["default"](this.getTipElement());
3693      var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
3694
3695      if (tabClass !== null && tabClass.length) {
3696        $tip.removeClass(tabClass.join(''));
3697      }
3698    };
3699
3700    _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
3701      this.tip = popperData.instance.popper;
3702
3703      this._cleanTipClass();
3704
3705      this.addAttachmentClass(this._getAttachment(popperData.placement));
3706    };
3707
3708    _proto._fixTransition = function _fixTransition() {
3709      var tip = this.getTipElement();
3710      var initConfigAnimation = this.config.animation;
3711
3712      if (tip.getAttribute('x-placement') !== null) {
3713        return;
3714      }
3715
3716      $__default["default"](tip).removeClass(CLASS_NAME_FADE$3);
3717      this.config.animation = false;
3718      this.hide();
3719      this.show();
3720      this.config.animation = initConfigAnimation;
3721    } // Static
3722    ;
3723
3724    Tooltip._jQueryInterface = function _jQueryInterface(config) {
3725      return this.each(function () {
3726        var $element = $__default["default"](this);
3727        var data = $element.data(DATA_KEY$4);
3728
3729        var _config = typeof config === 'object' && config;
3730
3731        if (!data && /dispose|hide/.test(config)) {
3732          return;
3733        }
3734
3735        if (!data) {
3736          data = new Tooltip(this, _config);
3737          $element.data(DATA_KEY$4, data);
3738        }
3739
3740        if (typeof config === 'string') {
3741          if (typeof data[config] === 'undefined') {
3742            throw new TypeError("No method named \"" + config + "\"");
3743          }
3744
3745          data[config]();
3746        }
3747      });
3748    };
3749
3750    _createClass(Tooltip, null, [{
3751      key: "VERSION",
3752      get: function get() {
3753        return VERSION$4;
3754      }
3755    }, {
3756      key: "Default",
3757      get: function get() {
3758        return Default$3;
3759      }
3760    }, {
3761      key: "NAME",
3762      get: function get() {
3763        return NAME$4;
3764      }
3765    }, {
3766      key: "DATA_KEY",
3767      get: function get() {
3768        return DATA_KEY$4;
3769      }
3770    }, {
3771      key: "Event",
3772      get: function get() {
3773        return Event$1;
3774      }
3775    }, {
3776      key: "EVENT_KEY",
3777      get: function get() {
3778        return EVENT_KEY$4;
3779      }
3780    }, {
3781      key: "DefaultType",
3782      get: function get() {
3783        return DefaultType$3;
3784      }
3785    }]);
3786
3787    return Tooltip;
3788  }();
3789  /**
3790   * jQuery
3791   */
3792
3793
3794  $__default["default"].fn[NAME$4] = Tooltip._jQueryInterface;
3795  $__default["default"].fn[NAME$4].Constructor = Tooltip;
3796
3797  $__default["default"].fn[NAME$4].noConflict = function () {
3798    $__default["default"].fn[NAME$4] = JQUERY_NO_CONFLICT$4;
3799    return Tooltip._jQueryInterface;
3800  };
3801
3802  /**
3803   * Constants
3804   */
3805
3806  var NAME$3 = 'popover';
3807  var VERSION$3 = '4.6.1';
3808  var DATA_KEY$3 = 'bs.popover';
3809  var EVENT_KEY$3 = "." + DATA_KEY$3;
3810  var JQUERY_NO_CONFLICT$3 = $__default["default"].fn[NAME$3];
3811  var CLASS_PREFIX = 'bs-popover';
3812  var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
3813  var CLASS_NAME_FADE$2 = 'fade';
3814  var CLASS_NAME_SHOW$2 = 'show';
3815  var SELECTOR_TITLE = '.popover-header';
3816  var SELECTOR_CONTENT = '.popover-body';
3817
3818  var Default$2 = _extends({}, Tooltip.Default, {
3819    placement: 'right',
3820    trigger: 'click',
3821    content: '',
3822    template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
3823  });
3824
3825  var DefaultType$2 = _extends({}, Tooltip.DefaultType, {
3826    content: '(string|element|function)'
3827  });
3828
3829  var Event = {
3830    HIDE: "hide" + EVENT_KEY$3,
3831    HIDDEN: "hidden" + EVENT_KEY$3,
3832    SHOW: "show" + EVENT_KEY$3,
3833    SHOWN: "shown" + EVENT_KEY$3,
3834    INSERTED: "inserted" + EVENT_KEY$3,
3835    CLICK: "click" + EVENT_KEY$3,
3836    FOCUSIN: "focusin" + EVENT_KEY$3,
3837    FOCUSOUT: "focusout" + EVENT_KEY$3,
3838    MOUSEENTER: "mouseenter" + EVENT_KEY$3,
3839    MOUSELEAVE: "mouseleave" + EVENT_KEY$3
3840  };
3841  /**
3842   * Class definition
3843   */
3844
3845  var Popover = /*#__PURE__*/function (_Tooltip) {
3846    _inheritsLoose(Popover, _Tooltip);
3847
3848    function Popover() {
3849      return _Tooltip.apply(this, arguments) || this;
3850    }
3851
3852    var _proto = Popover.prototype;
3853
3854    // Overrides
3855    _proto.isWithContent = function isWithContent() {
3856      return this.getTitle() || this._getContent();
3857    };
3858
3859    _proto.addAttachmentClass = function addAttachmentClass(attachment) {
3860      $__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
3861    };
3862
3863    _proto.getTipElement = function getTipElement() {
3864      this.tip = this.tip || $__default["default"](this.config.template)[0];
3865      return this.tip;
3866    };
3867
3868    _proto.setContent = function setContent() {
3869      var $tip = $__default["default"](this.getTipElement()); // We use append for html objects to maintain js events
3870
3871      this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
3872
3873      var content = this._getContent();
3874
3875      if (typeof content === 'function') {
3876        content = content.call(this.element);
3877      }
3878
3879      this.setElementContent($tip.find(SELECTOR_CONTENT), content);
3880      $tip.removeClass(CLASS_NAME_FADE$2 + " " + CLASS_NAME_SHOW$2);
3881    } // Private
3882    ;
3883
3884    _proto._getContent = function _getContent() {
3885      return this.element.getAttribute('data-content') || this.config.content;
3886    };
3887
3888    _proto._cleanTipClass = function _cleanTipClass() {
3889      var $tip = $__default["default"](this.getTipElement());
3890      var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
3891
3892      if (tabClass !== null && tabClass.length > 0) {
3893        $tip.removeClass(tabClass.join(''));
3894      }
3895    } // Static
3896    ;
3897
3898    Popover._jQueryInterface = function _jQueryInterface(config) {
3899      return this.each(function () {
3900        var data = $__default["default"](this).data(DATA_KEY$3);
3901
3902        var _config = typeof config === 'object' ? config : null;
3903
3904        if (!data && /dispose|hide/.test(config)) {
3905          return;
3906        }
3907
3908        if (!data) {
3909          data = new Popover(this, _config);
3910          $__default["default"](this).data(DATA_KEY$3, data);
3911        }
3912
3913        if (typeof config === 'string') {
3914          if (typeof data[config] === 'undefined') {
3915            throw new TypeError("No method named \"" + config + "\"");
3916          }
3917
3918          data[config]();
3919        }
3920      });
3921    };
3922
3923    _createClass(Popover, null, [{
3924      key: "VERSION",
3925      get: // Getters
3926      function get() {
3927        return VERSION$3;
3928      }
3929    }, {
3930      key: "Default",
3931      get: function get() {
3932        return Default$2;
3933      }
3934    }, {
3935      key: "NAME",
3936      get: function get() {
3937        return NAME$3;
3938      }
3939    }, {
3940      key: "DATA_KEY",
3941      get: function get() {
3942        return DATA_KEY$3;
3943      }
3944    }, {
3945      key: "Event",
3946      get: function get() {
3947        return Event;
3948      }
3949    }, {
3950      key: "EVENT_KEY",
3951      get: function get() {
3952        return EVENT_KEY$3;
3953      }
3954    }, {
3955      key: "DefaultType",
3956      get: function get() {
3957        return DefaultType$2;
3958      }
3959    }]);
3960
3961    return Popover;
3962  }(Tooltip);
3963  /**
3964   * jQuery
3965   */
3966
3967
3968  $__default["default"].fn[NAME$3] = Popover._jQueryInterface;
3969  $__default["default"].fn[NAME$3].Constructor = Popover;
3970
3971  $__default["default"].fn[NAME$3].noConflict = function () {
3972    $__default["default"].fn[NAME$3] = JQUERY_NO_CONFLICT$3;
3973    return Popover._jQueryInterface;
3974  };
3975
3976  /**
3977   * Constants
3978   */
3979
3980  var NAME$2 = 'scrollspy';
3981  var VERSION$2 = '4.6.1';
3982  var DATA_KEY$2 = 'bs.scrollspy';
3983  var EVENT_KEY$2 = "." + DATA_KEY$2;
3984  var DATA_API_KEY$1 = '.data-api';
3985  var JQUERY_NO_CONFLICT$2 = $__default["default"].fn[NAME$2];
3986  var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
3987  var CLASS_NAME_ACTIVE$1 = 'active';
3988  var EVENT_ACTIVATE = "activate" + EVENT_KEY$2;
3989  var EVENT_SCROLL = "scroll" + EVENT_KEY$2;
3990  var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$2 + DATA_API_KEY$1;
3991  var METHOD_OFFSET = 'offset';
3992  var METHOD_POSITION = 'position';
3993  var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
3994  var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
3995  var SELECTOR_NAV_LINKS = '.nav-link';
3996  var SELECTOR_NAV_ITEMS = '.nav-item';
3997  var SELECTOR_LIST_ITEMS = '.list-group-item';
3998  var SELECTOR_DROPDOWN$1 = '.dropdown';
3999  var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
4000  var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
4001  var Default$1 = {
4002    offset: 10,
4003    method: 'auto',
4004    target: ''
4005  };
4006  var DefaultType$1 = {
4007    offset: 'number',
4008    method: 'string',
4009    target: '(string|element)'
4010  };
4011  /**
4012   * Class definition
4013   */
4014
4015  var ScrollSpy = /*#__PURE__*/function () {
4016    function ScrollSpy(element, config) {
4017      var _this = this;
4018
4019      this._element = element;
4020      this._scrollElement = element.tagName === 'BODY' ? window : element;
4021      this._config = this._getConfig(config);
4022      this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
4023      this._offsets = [];
4024      this._targets = [];
4025      this._activeTarget = null;
4026      this._scrollHeight = 0;
4027      $__default["default"](this._scrollElement).on(EVENT_SCROLL, function (event) {
4028        return _this._process(event);
4029      });
4030      this.refresh();
4031
4032      this._process();
4033    } // Getters
4034
4035
4036    var _proto = ScrollSpy.prototype;
4037
4038    // Public
4039    _proto.refresh = function refresh() {
4040      var _this2 = this;
4041
4042      var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
4043      var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
4044      var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
4045      this._offsets = [];
4046      this._targets = [];
4047      this._scrollHeight = this._getScrollHeight();
4048      var targets = [].slice.call(document.querySelectorAll(this._selector));
4049      targets.map(function (element) {
4050        var target;
4051        var targetSelector = Util.getSelectorFromElement(element);
4052
4053        if (targetSelector) {
4054          target = document.querySelector(targetSelector);
4055        }
4056
4057        if (target) {
4058          var targetBCR = target.getBoundingClientRect();
4059
4060          if (targetBCR.width || targetBCR.height) {
4061            // TODO (fat): remove sketch reliance on jQuery position/offset
4062            return [$__default["default"](target)[offsetMethod]().top + offsetBase, targetSelector];
4063          }
4064        }
4065
4066        return null;
4067      }).filter(function (item) {
4068        return item;
4069      }).sort(function (a, b) {
4070        return a[0] - b[0];
4071      }).forEach(function (item) {
4072        _this2._offsets.push(item[0]);
4073
4074        _this2._targets.push(item[1]);
4075      });
4076    };
4077
4078    _proto.dispose = function dispose() {
4079      $__default["default"].removeData(this._element, DATA_KEY$2);
4080      $__default["default"](this._scrollElement).off(EVENT_KEY$2);
4081      this._element = null;
4082      this._scrollElement = null;
4083      this._config = null;
4084      this._selector = null;
4085      this._offsets = null;
4086      this._targets = null;
4087      this._activeTarget = null;
4088      this._scrollHeight = null;
4089    } // Private
4090    ;
4091
4092    _proto._getConfig = function _getConfig(config) {
4093      config = _extends({}, Default$1, typeof config === 'object' && config ? config : {});
4094
4095      if (typeof config.target !== 'string' && Util.isElement(config.target)) {
4096        var id = $__default["default"](config.target).attr('id');
4097
4098        if (!id) {
4099          id = Util.getUID(NAME$2);
4100          $__default["default"](config.target).attr('id', id);
4101        }
4102
4103        config.target = "#" + id;
4104      }
4105
4106      Util.typeCheckConfig(NAME$2, config, DefaultType$1);
4107      return config;
4108    };
4109
4110    _proto._getScrollTop = function _getScrollTop() {
4111      return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
4112    };
4113
4114    _proto._getScrollHeight = function _getScrollHeight() {
4115      return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
4116    };
4117
4118    _proto._getOffsetHeight = function _getOffsetHeight() {
4119      return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
4120    };
4121
4122    _proto._process = function _process() {
4123      var scrollTop = this._getScrollTop() + this._config.offset;
4124
4125      var scrollHeight = this._getScrollHeight();
4126
4127      var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
4128
4129      if (this._scrollHeight !== scrollHeight) {
4130        this.refresh();
4131      }
4132
4133      if (scrollTop >= maxScroll) {
4134        var target = this._targets[this._targets.length - 1];
4135
4136        if (this._activeTarget !== target) {
4137          this._activate(target);
4138        }
4139
4140        return;
4141      }
4142
4143      if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
4144        this._activeTarget = null;
4145
4146        this._clear();
4147
4148        return;
4149      }
4150
4151      for (var i = this._offsets.length; i--;) {
4152        var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
4153
4154        if (isActiveTarget) {
4155          this._activate(this._targets[i]);
4156        }
4157      }
4158    };
4159
4160    _proto._activate = function _activate(target) {
4161      this._activeTarget = target;
4162
4163      this._clear();
4164
4165      var queries = this._selector.split(',').map(function (selector) {
4166        return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
4167      });
4168
4169      var $link = $__default["default"]([].slice.call(document.querySelectorAll(queries.join(','))));
4170
4171      if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
4172        $link.closest(SELECTOR_DROPDOWN$1).find(SELECTOR_DROPDOWN_TOGGLE$1).addClass(CLASS_NAME_ACTIVE$1);
4173        $link.addClass(CLASS_NAME_ACTIVE$1);
4174      } else {
4175        // Set triggered link as active
4176        $link.addClass(CLASS_NAME_ACTIVE$1); // Set triggered links parents as active
4177        // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
4178
4179        $link.parents(SELECTOR_NAV_LIST_GROUP$1).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE$1); // Handle special case when .nav-link is inside .nav-item
4180
4181        $link.parents(SELECTOR_NAV_LIST_GROUP$1).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE$1);
4182      }
4183
4184      $__default["default"](this._scrollElement).trigger(EVENT_ACTIVATE, {
4185        relatedTarget: target
4186      });
4187    };
4188
4189    _proto._clear = function _clear() {
4190      [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
4191        return node.classList.contains(CLASS_NAME_ACTIVE$1);
4192      }).forEach(function (node) {
4193        return node.classList.remove(CLASS_NAME_ACTIVE$1);
4194      });
4195    } // Static
4196    ;
4197
4198    ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
4199      return this.each(function () {
4200        var data = $__default["default"](this).data(DATA_KEY$2);
4201
4202        var _config = typeof config === 'object' && config;
4203
4204        if (!data) {
4205          data = new ScrollSpy(this, _config);
4206          $__default["default"](this).data(DATA_KEY$2, data);
4207        }
4208
4209        if (typeof config === 'string') {
4210          if (typeof data[config] === 'undefined') {
4211            throw new TypeError("No method named \"" + config + "\"");
4212          }
4213
4214          data[config]();
4215        }
4216      });
4217    };
4218
4219    _createClass(ScrollSpy, null, [{
4220      key: "VERSION",
4221      get: function get() {
4222        return VERSION$2;
4223      }
4224    }, {
4225      key: "Default",
4226      get: function get() {
4227        return Default$1;
4228      }
4229    }]);
4230
4231    return ScrollSpy;
4232  }();
4233  /**
4234   * Data API implementation
4235   */
4236
4237
4238  $__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
4239    var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
4240    var scrollSpysLength = scrollSpys.length;
4241
4242    for (var i = scrollSpysLength; i--;) {
4243      var $spy = $__default["default"](scrollSpys[i]);
4244
4245      ScrollSpy._jQueryInterface.call($spy, $spy.data());
4246    }
4247  });
4248  /**
4249   * jQuery
4250   */
4251
4252  $__default["default"].fn[NAME$2] = ScrollSpy._jQueryInterface;
4253  $__default["default"].fn[NAME$2].Constructor = ScrollSpy;
4254
4255  $__default["default"].fn[NAME$2].noConflict = function () {
4256    $__default["default"].fn[NAME$2] = JQUERY_NO_CONFLICT$2;
4257    return ScrollSpy._jQueryInterface;
4258  };
4259
4260  /**
4261   * Constants
4262   */
4263
4264  var NAME$1 = 'tab';
4265  var VERSION$1 = '4.6.1';
4266  var DATA_KEY$1 = 'bs.tab';
4267  var EVENT_KEY$1 = "." + DATA_KEY$1;
4268  var DATA_API_KEY = '.data-api';
4269  var JQUERY_NO_CONFLICT$1 = $__default["default"].fn[NAME$1];
4270  var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
4271  var CLASS_NAME_ACTIVE = 'active';
4272  var CLASS_NAME_DISABLED = 'disabled';
4273  var CLASS_NAME_FADE$1 = 'fade';
4274  var CLASS_NAME_SHOW$1 = 'show';
4275  var EVENT_HIDE$1 = "hide" + EVENT_KEY$1;
4276  var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$1;
4277  var EVENT_SHOW$1 = "show" + EVENT_KEY$1;
4278  var EVENT_SHOWN$1 = "shown" + EVENT_KEY$1;
4279  var EVENT_CLICK_DATA_API = "click" + EVENT_KEY$1 + DATA_API_KEY;
4280  var SELECTOR_DROPDOWN = '.dropdown';
4281  var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
4282  var SELECTOR_ACTIVE = '.active';
4283  var SELECTOR_ACTIVE_UL = '> li > .active';
4284  var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
4285  var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
4286  var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
4287  /**
4288   * Class definition
4289   */
4290
4291  var Tab = /*#__PURE__*/function () {
4292    function Tab(element) {
4293      this._element = element;
4294    } // Getters
4295
4296
4297    var _proto = Tab.prototype;
4298
4299    // Public
4300    _proto.show = function show() {
4301      var _this = this;
4302
4303      if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED)) {
4304        return;
4305      }
4306
4307      var target;
4308      var previous;
4309      var listElement = $__default["default"](this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
4310      var selector = Util.getSelectorFromElement(this._element);
4311
4312      if (listElement) {
4313        var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
4314        previous = $__default["default"].makeArray($__default["default"](listElement).find(itemSelector));
4315        previous = previous[previous.length - 1];
4316      }
4317
4318      var hideEvent = $__default["default"].Event(EVENT_HIDE$1, {
4319        relatedTarget: this._element
4320      });
4321      var showEvent = $__default["default"].Event(EVENT_SHOW$1, {
4322        relatedTarget: previous
4323      });
4324
4325      if (previous) {
4326        $__default["default"](previous).trigger(hideEvent);
4327      }
4328
4329      $__default["default"](this._element).trigger(showEvent);
4330
4331      if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
4332        return;
4333      }
4334
4335      if (selector) {
4336        target = document.querySelector(selector);
4337      }
4338
4339      this._activate(this._element, listElement);
4340
4341      var complete = function complete() {
4342        var hiddenEvent = $__default["default"].Event(EVENT_HIDDEN$1, {
4343          relatedTarget: _this._element
4344        });
4345        var shownEvent = $__default["default"].Event(EVENT_SHOWN$1, {
4346          relatedTarget: previous
4347        });
4348        $__default["default"](previous).trigger(hiddenEvent);
4349        $__default["default"](_this._element).trigger(shownEvent);
4350      };
4351
4352      if (target) {
4353        this._activate(target, target.parentNode, complete);
4354      } else {
4355        complete();
4356      }
4357    };
4358
4359    _proto.dispose = function dispose() {
4360      $__default["default"].removeData(this._element, DATA_KEY$1);
4361      this._element = null;
4362    } // Private
4363    ;
4364
4365    _proto._activate = function _activate(element, container, callback) {
4366      var _this2 = this;
4367
4368      var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $__default["default"](container).find(SELECTOR_ACTIVE_UL) : $__default["default"](container).children(SELECTOR_ACTIVE);
4369      var active = activeElements[0];
4370      var isTransitioning = callback && active && $__default["default"](active).hasClass(CLASS_NAME_FADE$1);
4371
4372      var complete = function complete() {
4373        return _this2._transitionComplete(element, active, callback);
4374      };
4375
4376      if (active && isTransitioning) {
4377        var transitionDuration = Util.getTransitionDurationFromElement(active);
4378        $__default["default"](active).removeClass(CLASS_NAME_SHOW$1).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
4379      } else {
4380        complete();
4381      }
4382    };
4383
4384    _proto._transitionComplete = function _transitionComplete(element, active, callback) {
4385      if (active) {
4386        $__default["default"](active).removeClass(CLASS_NAME_ACTIVE);
4387        var dropdownChild = $__default["default"](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
4388
4389        if (dropdownChild) {
4390          $__default["default"](dropdownChild).removeClass(CLASS_NAME_ACTIVE);
4391        }
4392
4393        if (active.getAttribute('role') === 'tab') {
4394          active.setAttribute('aria-selected', false);
4395        }
4396      }
4397
4398      $__default["default"](element).addClass(CLASS_NAME_ACTIVE);
4399
4400      if (element.getAttribute('role') === 'tab') {
4401        element.setAttribute('aria-selected', true);
4402      }
4403
4404      Util.reflow(element);
4405
4406      if (element.classList.contains(CLASS_NAME_FADE$1)) {
4407        element.classList.add(CLASS_NAME_SHOW$1);
4408      }
4409
4410      var parent = element.parentNode;
4411
4412      if (parent && parent.nodeName === 'LI') {
4413        parent = parent.parentNode;
4414      }
4415
4416      if (parent && $__default["default"](parent).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
4417        var dropdownElement = $__default["default"](element).closest(SELECTOR_DROPDOWN)[0];
4418
4419        if (dropdownElement) {
4420          var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));
4421          $__default["default"](dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
4422        }
4423
4424        element.setAttribute('aria-expanded', true);
4425      }
4426
4427      if (callback) {
4428        callback();
4429      }
4430    } // Static
4431    ;
4432
4433    Tab._jQueryInterface = function _jQueryInterface(config) {
4434      return this.each(function () {
4435        var $this = $__default["default"](this);
4436        var data = $this.data(DATA_KEY$1);
4437
4438        if (!data) {
4439          data = new Tab(this);
4440          $this.data(DATA_KEY$1, data);
4441        }
4442
4443        if (typeof config === 'string') {
4444          if (typeof data[config] === 'undefined') {
4445            throw new TypeError("No method named \"" + config + "\"");
4446          }
4447
4448          data[config]();
4449        }
4450      });
4451    };
4452
4453    _createClass(Tab, null, [{
4454      key: "VERSION",
4455      get: function get() {
4456        return VERSION$1;
4457      }
4458    }]);
4459
4460    return Tab;
4461  }();
4462  /**
4463   * Data API implementation
4464   */
4465
4466
4467  $__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
4468    event.preventDefault();
4469
4470    Tab._jQueryInterface.call($__default["default"](this), 'show');
4471  });
4472  /**
4473   * jQuery
4474   */
4475
4476  $__default["default"].fn[NAME$1] = Tab._jQueryInterface;
4477  $__default["default"].fn[NAME$1].Constructor = Tab;
4478
4479  $__default["default"].fn[NAME$1].noConflict = function () {
4480    $__default["default"].fn[NAME$1] = JQUERY_NO_CONFLICT$1;
4481    return Tab._jQueryInterface;
4482  };
4483
4484  /**
4485   * Constants
4486   */
4487
4488  var NAME = 'toast';
4489  var VERSION = '4.6.1';
4490  var DATA_KEY = 'bs.toast';
4491  var EVENT_KEY = "." + DATA_KEY;
4492  var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
4493  var CLASS_NAME_FADE = 'fade';
4494  var CLASS_NAME_HIDE = 'hide';
4495  var CLASS_NAME_SHOW = 'show';
4496  var CLASS_NAME_SHOWING = 'showing';
4497  var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
4498  var EVENT_HIDE = "hide" + EVENT_KEY;
4499  var EVENT_HIDDEN = "hidden" + EVENT_KEY;
4500  var EVENT_SHOW = "show" + EVENT_KEY;
4501  var EVENT_SHOWN = "shown" + EVENT_KEY;
4502  var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
4503  var Default = {
4504    animation: true,
4505    autohide: true,
4506    delay: 500
4507  };
4508  var DefaultType = {
4509    animation: 'boolean',
4510    autohide: 'boolean',
4511    delay: 'number'
4512  };
4513  /**
4514   * Class definition
4515   */
4516
4517  var Toast = /*#__PURE__*/function () {
4518    function Toast(element, config) {
4519      this._element = element;
4520      this._config = this._getConfig(config);
4521      this._timeout = null;
4522
4523      this._setListeners();
4524    } // Getters
4525
4526
4527    var _proto = Toast.prototype;
4528
4529    // Public
4530    _proto.show = function show() {
4531      var _this = this;
4532
4533      var showEvent = $__default["default"].Event(EVENT_SHOW);
4534      $__default["default"](this._element).trigger(showEvent);
4535
4536      if (showEvent.isDefaultPrevented()) {
4537        return;
4538      }
4539
4540      this._clearTimeout();
4541
4542      if (this._config.animation) {
4543        this._element.classList.add(CLASS_NAME_FADE);
4544      }
4545
4546      var complete = function complete() {
4547        _this._element.classList.remove(CLASS_NAME_SHOWING);
4548
4549        _this._element.classList.add(CLASS_NAME_SHOW);
4550
4551        $__default["default"](_this._element).trigger(EVENT_SHOWN);
4552
4553        if (_this._config.autohide) {
4554          _this._timeout = setTimeout(function () {
4555            _this.hide();
4556          }, _this._config.delay);
4557        }
4558      };
4559
4560      this._element.classList.remove(CLASS_NAME_HIDE);
4561
4562      Util.reflow(this._element);
4563
4564      this._element.classList.add(CLASS_NAME_SHOWING);
4565
4566      if (this._config.animation) {
4567        var transitionDuration = Util.getTransitionDurationFromElement(this._element);
4568        $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
4569      } else {
4570        complete();
4571      }
4572    };
4573
4574    _proto.hide = function hide() {
4575      if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
4576        return;
4577      }
4578
4579      var hideEvent = $__default["default"].Event(EVENT_HIDE);
4580      $__default["default"](this._element).trigger(hideEvent);
4581
4582      if (hideEvent.isDefaultPrevented()) {
4583        return;
4584      }
4585
4586      this._close();
4587    };
4588
4589    _proto.dispose = function dispose() {
4590      this._clearTimeout();
4591
4592      if (this._element.classList.contains(CLASS_NAME_SHOW)) {
4593        this._element.classList.remove(CLASS_NAME_SHOW);
4594      }
4595
4596      $__default["default"](this._element).off(EVENT_CLICK_DISMISS);
4597      $__default["default"].removeData(this._element, DATA_KEY);
4598      this._element = null;
4599      this._config = null;
4600    } // Private
4601    ;
4602
4603    _proto._getConfig = function _getConfig(config) {
4604      config = _extends({}, Default, $__default["default"](this._element).data(), typeof config === 'object' && config ? config : {});
4605      Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
4606      return config;
4607    };
4608
4609    _proto._setListeners = function _setListeners() {
4610      var _this2 = this;
4611
4612      $__default["default"](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
4613        return _this2.hide();
4614      });
4615    };
4616
4617    _proto._close = function _close() {
4618      var _this3 = this;
4619
4620      var complete = function complete() {
4621        _this3._element.classList.add(CLASS_NAME_HIDE);
4622
4623        $__default["default"](_this3._element).trigger(EVENT_HIDDEN);
4624      };
4625
4626      this._element.classList.remove(CLASS_NAME_SHOW);
4627
4628      if (this._config.animation) {
4629        var transitionDuration = Util.getTransitionDurationFromElement(this._element);
4630        $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
4631      } else {
4632        complete();
4633      }
4634    };
4635
4636    _proto._clearTimeout = function _clearTimeout() {
4637      clearTimeout(this._timeout);
4638      this._timeout = null;
4639    } // Static
4640    ;
4641
4642    Toast._jQueryInterface = function _jQueryInterface(config) {
4643      return this.each(function () {
4644        var $element = $__default["default"](this);
4645        var data = $element.data(DATA_KEY);
4646
4647        var _config = typeof config === 'object' && config;
4648
4649        if (!data) {
4650          data = new Toast(this, _config);
4651          $element.data(DATA_KEY, data);
4652        }
4653
4654        if (typeof config === 'string') {
4655          if (typeof data[config] === 'undefined') {
4656            throw new TypeError("No method named \"" + config + "\"");
4657          }
4658
4659          data[config](this);
4660        }
4661      });
4662    };
4663
4664    _createClass(Toast, null, [{
4665      key: "VERSION",
4666      get: function get() {
4667        return VERSION;
4668      }
4669    }, {
4670      key: "DefaultType",
4671      get: function get() {
4672        return DefaultType;
4673      }
4674    }, {
4675      key: "Default",
4676      get: function get() {
4677        return Default;
4678      }
4679    }]);
4680
4681    return Toast;
4682  }();
4683  /**
4684   * jQuery
4685   */
4686
4687
4688  $__default["default"].fn[NAME] = Toast._jQueryInterface;
4689  $__default["default"].fn[NAME].Constructor = Toast;
4690
4691  $__default["default"].fn[NAME].noConflict = function () {
4692    $__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
4693    return Toast._jQueryInterface;
4694  };
4695
4696  exports.Alert = Alert;
4697  exports.Button = Button;
4698  exports.Carousel = Carousel;
4699  exports.Collapse = Collapse;
4700  exports.Dropdown = Dropdown;
4701  exports.Modal = Modal;
4702  exports.Popover = Popover;
4703  exports.Scrollspy = ScrollSpy;
4704  exports.Tab = Tab;
4705  exports.Toast = Toast;
4706  exports.Tooltip = Tooltip;
4707  exports.Util = Util;
4708
4709  Object.defineProperty(exports, '__esModule', { value: true });
4710
4711}));
4712//# sourceMappingURL=bootstrap.js.map
4713
4714
4715/***/ }),
4716
vendor: 1,681 bytes, lines 4717-4783
4717/***/ "./node_modules/classnames/index.js":
4718/*!******************************************!*\
4719  !*** ./node_modules/classnames/index.js ***!
4720  \******************************************/
4721/***/ ((module, exports) => {
4722
4723var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
4724  Copyright (c) 2018 Jed Watson.
4725  Licensed under the MIT License (MIT), see
4726  http://jedwatson.github.io/classnames
4727*/
4728/* global define */
4729
4730(function () {
4731	'use strict';
4732
4733	var hasOwn = {}.hasOwnProperty;
4734
4735	function classNames() {
4736		var classes = [];
4737
4738		for (var i = 0; i < arguments.length; i++) {
4739			var arg = arguments[i];
4740			if (!arg) continue;
4741
4742			var argType = typeof arg;
4743
4744			if (argType === 'string' || argType === 'number') {
4745				classes.push(arg);
4746			} else if (Array.isArray(arg)) {
4747				if (arg.length) {
4748					var inner = classNames.apply(null, arg);
4749					if (inner) {
4750						classes.push(inner);
4751					}
4752				}
4753			} else if (argType === 'object') {
4754				if (arg.toString === Object.prototype.toString) {
4755					for (var key in arg) {
4756						if (hasOwn.call(arg, key) && arg[key]) {
4757							classes.push(key);
4758						}
4759					}
4760				} else {
4761					classes.push(arg.toString());
4762				}
4763			}
4764		}
4765
4766		return classes.join(' ');
4767	}
4768
4769	if ( true && module.exports) {
4770		classNames.default = classNames;
4771		module.exports = classNames;
4772	} else if (true) {
4773		// register as 'classnames', consistent with npm package name
4774		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
4775			return classNames;
4776		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
4777		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
4778	} else {}
4779}());
4780
4781
4782/***/ }),
4783
vendor: 586 bytes, lines 4784-4795
4784/***/ "./node_modules/core-js/library/fn/object/assign.js":
4785/*!**********************************************************!*\
4786  !*** ./node_modules/core-js/library/fn/object/assign.js ***!
4787  \**********************************************************/
4788/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4789
4790__webpack_require__(/*! ../../modules/es6.object.assign */ "./node_modules/core-js/library/modules/es6.object.assign.js");
4791module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.assign;
4792
4793
4794/***/ }),
4795
vendor: 653 bytes, lines 4796-4810
4796/***/ "./node_modules/core-js/library/fn/object/create.js":
4797/*!**********************************************************!*\
4798  !*** ./node_modules/core-js/library/fn/object/create.js ***!
4799  \**********************************************************/
4800/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4801
4802__webpack_require__(/*! ../../modules/es6.object.create */ "./node_modules/core-js/library/modules/es6.object.create.js");
4803var $Object = (__webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object);
4804module.exports = function create(P, D) {
4805  return $Object.create(P, D);
4806};
4807
4808
4809/***/ }),
4810
vendor: 593 bytes, lines 4811-4822
4811/***/ "./node_modules/core-js/library/fn/object/entries.js":
4812/*!***********************************************************!*\
4813  !*** ./node_modules/core-js/library/fn/object/entries.js ***!
4814  \***********************************************************/
4815/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4816
4817__webpack_require__(/*! ../../modules/es7.object.entries */ "./node_modules/core-js/library/modules/es7.object.entries.js");
4818module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.entries;
4819
4820
4821/***/ }),
4822
vendor: 572 bytes, lines 4823-4834
4823/***/ "./node_modules/core-js/library/fn/object/keys.js":
4824/*!********************************************************!*\
4825  !*** ./node_modules/core-js/library/fn/object/keys.js ***!
4826  \********************************************************/
4827/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4828
4829__webpack_require__(/*! ../../modules/es6.object.keys */ "./node_modules/core-js/library/modules/es6.object.keys.js");
4830module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.keys;
4831
4832
4833/***/ }),
4834
vendor: 654 bytes, lines 4835-4846
4835/***/ "./node_modules/core-js/library/fn/object/set-prototype-of.js":
4836/*!********************************************************************!*\
4837  !*** ./node_modules/core-js/library/fn/object/set-prototype-of.js ***!
4838  \********************************************************************/
4839/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4840
4841__webpack_require__(/*! ../../modules/es6.object.set-prototype-of */ "./node_modules/core-js/library/modules/es6.object.set-prototype-of.js");
4842module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.setPrototypeOf;
4843
4844
4845/***/ }),
4846
vendor: 423 bytes, lines 4847-4860
4847/***/ "./node_modules/core-js/library/modules/_a-function.js":
4848/*!*************************************************************!*\
4849  !*** ./node_modules/core-js/library/modules/_a-function.js ***!
4850  \*************************************************************/
4851/***/ ((module) => {
4852
4853module.exports = function (it) {
4854  if (typeof it != 'function') throw TypeError(it + ' is not a function!');
4855  return it;
4856};
4857
4858
4859/***/ }),
4860
vendor: 567 bytes, lines 4861-4875
4861/***/ "./node_modules/core-js/library/modules/_an-object.js":
4862/*!************************************************************!*\
4863  !*** ./node_modules/core-js/library/modules/_an-object.js ***!
4864  \************************************************************/
4865/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4866
4867var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js");
4868module.exports = function (it) {
4869  if (!isObject(it)) throw TypeError(it + ' is not an object!');
4870  return it;
4871};
4872
4873
4874/***/ }),
4875
vendor: 1,510 bytes, lines 4876-4908
4876/***/ "./node_modules/core-js/library/modules/_array-includes.js":
4877/*!*****************************************************************!*\
4878  !*** ./node_modules/core-js/library/modules/_array-includes.js ***!
4879  \*****************************************************************/
4880/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4881
4882// false -> Array#indexOf
4883// true  -> Array#includes
4884var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js");
4885var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/library/modules/_to-length.js");
4886var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/library/modules/_to-absolute-index.js");
4887module.exports = function (IS_INCLUDES) {
4888  return function ($this, el, fromIndex) {
4889    var O = toIObject($this);
4890    var length = toLength(O.length);
4891    var index = toAbsoluteIndex(fromIndex, length);
4892    var value;
4893    // Array#includes uses SameValueZero equality algorithm
4894    // eslint-disable-next-line no-self-compare
4895    if (IS_INCLUDES && el != el) while (length > index) {
4896      value = O[index++];
4897      // eslint-disable-next-line no-self-compare
4898      if (value != value) return true;
4899    // Array#indexOf ignores holes, Array#includes - not
4900    } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
4901      if (O[index] === el) return IS_INCLUDES || index || 0;
4902    } return !IS_INCLUDES && -1;
4903  };
4904};
4905
4906
4907/***/ }),
4908
vendor: 376 bytes, lines 4909-4923
4909/***/ "./node_modules/core-js/library/modules/_cof.js":
4910/*!******************************************************!*\
4911  !*** ./node_modules/core-js/library/modules/_cof.js ***!
4912  \******************************************************/
4913/***/ ((module) => {
4914
4915var toString = {}.toString;
4916
4917module.exports = function (it) {
4918  return toString.call(it).slice(8, -1);
4919};
4920
4921
4922/***/ }),
4923
vendor: 397 bytes, lines 4924-4935
4924/***/ "./node_modules/core-js/library/modules/_core.js":
4925/*!*******************************************************!*\
4926  !*** ./node_modules/core-js/library/modules/_core.js ***!
4927  \*******************************************************/
4928/***/ ((module) => {
4929
4930var core = module.exports = { version: '2.6.12' };
4931if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
4932
4933
4934/***/ }),
4935
vendor: 910 bytes, lines 4936-4965
4936/***/ "./node_modules/core-js/library/modules/_ctx.js":
4937/*!******************************************************!*\
4938  !*** ./node_modules/core-js/library/modules/_ctx.js ***!
4939  \******************************************************/
4940/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4941
4942// optional / simple context binding
4943var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js");
4944module.exports = function (fn, that, length) {
4945  aFunction(fn);
4946  if (that === undefined) return fn;
4947  switch (length) {
4948    case 1: return function (a) {
4949      return fn.call(that, a);
4950    };
4951    case 2: return function (a, b) {
4952      return fn.call(that, a, b);
4953    };
4954    case 3: return function (a, b, c) {
4955      return fn.call(that, a, b, c);
4956    };
4957  }
4958  return function (/* ...args */) {
4959    return fn.apply(that, arguments);
4960  };
4961};
4962
4963
4964/***/ }),
4965
vendor: 448 bytes, lines 4966-4980
4966/***/ "./node_modules/core-js/library/modules/_defined.js":
4967/*!**********************************************************!*\
4968  !*** ./node_modules/core-js/library/modules/_defined.js ***!
4969  \**********************************************************/
4970/***/ ((module) => {
4971
4972// 7.2.1 RequireObjectCoercible(argument)
4973module.exports = function (it) {
4974  if (it == undefined) throw TypeError("Can't call method on  " + it);
4975  return it;
4976};
4977
4978
4979/***/ }),
4980
vendor: 601 bytes, lines 4981-4994
4981/***/ "./node_modules/core-js/library/modules/_descriptors.js":
4982/*!**************************************************************!*\
4983  !*** ./node_modules/core-js/library/modules/_descriptors.js ***!
4984  \**************************************************************/
4985/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4986
4987// Thank's IE8 for his funny defineProperty
4988module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () {
4989  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
4990});
4991
4992
4993/***/ }),
4994
vendor: 777 bytes, lines 4995-5011
4995/***/ "./node_modules/core-js/library/modules/_dom-create.js":
4996/*!*************************************************************!*\
4997  !*** ./node_modules/core-js/library/modules/_dom-create.js ***!
4998  \*************************************************************/
4999/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5000
5001var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js");
5002var document = (__webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").document);
5003// typeof document.createElement is 'object' in old IE
5004var is = isObject(document) && isObject(document.createElement);
5005module.exports = function (it) {
5006  return is ? document.createElement(it) : {};
5007};
5008
5009
5010/***/ }),
5011
vendor: 470 bytes, lines 5012-5025
5012/***/ "./node_modules/core-js/library/modules/_enum-bug-keys.js":
5013/*!****************************************************************!*\
5014  !*** ./node_modules/core-js/library/modules/_enum-bug-keys.js ***!
5015  \****************************************************************/
5016/***/ ((module) => {
5017
5018// IE 8- don't enum bug keys
5019module.exports = (
5020  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
5021).split(',');
5022
5023
5024/***/ }),
5025
vendor: 3,013 bytes, lines 5026-5097
5026/***/ "./node_modules/core-js/library/modules/_export.js":
5027/*!*********************************************************!*\
5028  !*** ./node_modules/core-js/library/modules/_export.js ***!
5029  \*********************************************************/
5030/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5031
5032var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js");
5033var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js");
5034var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js");
5035var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js");
5036var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js");
5037var PROTOTYPE = 'prototype';
5038
5039var $export = function (type, name, source) {
5040  var IS_FORCED = type & $export.F;
5041  var IS_GLOBAL = type & $export.G;
5042  var IS_STATIC = type & $export.S;
5043  var IS_PROTO = type & $export.P;
5044  var IS_BIND = type & $export.B;
5045  var IS_WRAP = type & $export.W;
5046  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
5047  var expProto = exports[PROTOTYPE];
5048  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
5049  var key, own, out;
5050  if (IS_GLOBAL) source = name;
5051  for (key in source) {
5052    // contains in native
5053    own = !IS_FORCED && target && target[key] !== undefined;
5054    if (own && has(exports, key)) continue;
5055    // export native or passed
5056    out = own ? target[key] : source[key];
5057    // prevent global pollution for namespaces
5058    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
5059    // bind timers to global for call from export context
5060    : IS_BIND && own ? ctx(out, global)
5061    // wrap global constructors for prevent change them in library
5062    : IS_WRAP && target[key] == out ? (function (C) {
5063      var F = function (a, b, c) {
5064        if (this instanceof C) {
5065          switch (arguments.length) {
5066            case 0: return new C();
5067            case 1: return new C(a);
5068            case 2: return new C(a, b);
5069          } return new C(a, b, c);
5070        } return C.apply(this, arguments);
5071      };
5072      F[PROTOTYPE] = C[PROTOTYPE];
5073      return F;
5074    // make static versions for prototype methods
5075    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
5076    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
5077    if (IS_PROTO) {
5078      (exports.virtual || (exports.virtual = {}))[key] = out;
5079      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
5080      if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
5081    }
5082  }
5083};
5084// type bitmap
5085$export.F = 1;   // forced
5086$export.G = 2;   // global
5087$export.S = 4;   // static
5088$export.P = 8;   // proto
5089$export.B = 16;  // bind
5090$export.W = 32;  // wrap
5091$export.U = 64;  // safe
5092$export.R = 128; // real proto method for `library`
5093module.exports = $export;
5094
5095
5096/***/ }),
5097
vendor: 382 bytes, lines 5098-5114
5098/***/ "./node_modules/core-js/library/modules/_fails.js":
5099/*!********************************************************!*\
5100  !*** ./node_modules/core-js/library/modules/_fails.js ***!
5101  \********************************************************/
5102/***/ ((module) => {
5103
5104module.exports = function (exec) {
5105  try {
5106    return !!exec();
5107  } catch (e) {
5108    return true;
5109  }
5110};
5111
5112
5113/***/ }),
5114
vendor: 651 bytes, lines 5115-5130
5115/***/ "./node_modules/core-js/library/modules/_global.js":
5116/*!*********************************************************!*\
5117  !*** ./node_modules/core-js/library/modules/_global.js ***!
5118  \*********************************************************/
5119/***/ ((module) => {
5120
5121// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
5122var global = module.exports = typeof window != 'undefined' && window.Math == Math
5123  ? window : typeof self != 'undefined' && self.Math == Math ? self
5124  // eslint-disable-next-line no-new-func
5125  : Function('return this')();
5126if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
5127
5128
5129/***/ }),
5130
vendor: 390 bytes, lines 5131-5144
5131/***/ "./node_modules/core-js/library/modules/_has.js":
5132/*!******************************************************!*\
5133  !*** ./node_modules/core-js/library/modules/_has.js ***!
5134  \******************************************************/
5135/***/ ((module) => {
5136
5137var hasOwnProperty = {}.hasOwnProperty;
5138module.exports = function (it, key) {
5139  return hasOwnProperty.call(it, key);
5140};
5141
5142
5143/***/ }),
5144
vendor: 829 bytes, lines 5145-5162
5145/***/ "./node_modules/core-js/library/modules/_hide.js":
5146/*!*******************************************************!*\
5147  !*** ./node_modules/core-js/library/modules/_hide.js ***!
5148  \*******************************************************/
5149/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5150
5151var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js");
5152var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js");
5153module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? function (object, key, value) {
5154  return dP.f(object, key, createDesc(1, value));
5155} : function (object, key, value) {
5156  object[key] = value;
5157  return object;
5158};
5159
5160
5161/***/ }),
5162
vendor: 493 bytes, lines 5163-5174
5163/***/ "./node_modules/core-js/library/modules/_html.js":
5164/*!*******************************************************!*\
5165  !*** ./node_modules/core-js/library/modules/_html.js ***!
5166  \*******************************************************/
5167/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5168
5169var document = (__webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").document);
5170module.exports = document && document.documentElement;
5171
5172
5173/***/ }),
5174
vendor: 775 bytes, lines 5175-5187
5175/***/ "./node_modules/core-js/library/modules/_ie8-dom-define.js":
5176/*!*****************************************************************!*\
5177  !*** ./node_modules/core-js/library/modules/_ie8-dom-define.js ***!
5178  \*****************************************************************/
5179/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5180
5181module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () {
5182  return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7;
5183});
5184
5185
5186/***/ }),
5187
vendor: 688 bytes, lines 5188-5203
5188/***/ "./node_modules/core-js/library/modules/_iobject.js":
5189/*!**********************************************************!*\
5190  !*** ./node_modules/core-js/library/modules/_iobject.js ***!
5191  \**********************************************************/
5192/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5193
5194// fallback for non-array-like ES3 and non-enumerable old V8 strings
5195var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js");
5196// eslint-disable-next-line no-prototype-builtins
5197module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
5198  return cof(it) == 'String' ? it.split('') : Object(it);
5199};
5200
5201
5202/***/ }),
5203
vendor: 404 bytes, lines 5204-5216
5204/***/ "./node_modules/core-js/library/modules/_is-object.js":
5205/*!************************************************************!*\
5206  !*** ./node_modules/core-js/library/modules/_is-object.js ***!
5207  \************************************************************/
5208/***/ ((module) => {
5209
5210module.exports = function (it) {
5211  return typeof it === 'object' ? it !== null : typeof it === 'function';
5212};
5213
5214
5215/***/ }),
5216
vendor: 309 bytes, lines 5217-5227
5217/***/ "./node_modules/core-js/library/modules/_library.js":
5218/*!**********************************************************!*\
5219  !*** ./node_modules/core-js/library/modules/_library.js ***!
5220  \**********************************************************/
5221/***/ ((module) => {
5222
5223module.exports = true;
5224
5225
5226/***/ }),
5227
vendor: 2,144 bytes, lines 5228-5276
5228/***/ "./node_modules/core-js/library/modules/_object-assign.js":
5229/*!****************************************************************!*\
5230  !*** ./node_modules/core-js/library/modules/_object-assign.js ***!
5231  \****************************************************************/
5232/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5233
5234"use strict";
5235
5236// 19.1.2.1 Object.assign(target, source, ...)
5237var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js");
5238var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js");
5239var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/library/modules/_object-gops.js");
5240var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js");
5241var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js");
5242var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/library/modules/_iobject.js");
5243var $assign = Object.assign;
5244
5245// should work with symbols and should have deterministic property order (V8 bug)
5246module.exports = !$assign || __webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () {
5247  var A = {};
5248  var B = {};
5249  // eslint-disable-next-line no-undef
5250  var S = Symbol();
5251  var K = 'abcdefghijklmnopqrst';
5252  A[S] = 7;
5253  K.split('').forEach(function (k) { B[k] = k; });
5254  return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
5255}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
5256  var T = toObject(target);
5257  var aLen = arguments.length;
5258  var index = 1;
5259  var getSymbols = gOPS.f;
5260  var isEnum = pIE.f;
5261  while (aLen > index) {
5262    var S = IObject(arguments[index++]);
5263    var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
5264    var length = keys.length;
5265    var j = 0;
5266    var key;
5267    while (length > j) {
5268      key = keys[j++];
5269      if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
5270    }
5271  } return T;
5272} : $assign;
5273
5274
5275/***/ }),
5276
vendor: 2,298 bytes, lines 5277-5327
5277/***/ "./node_modules/core-js/library/modules/_object-create.js":
5278/*!****************************************************************!*\
5279  !*** ./node_modules/core-js/library/modules/_object-create.js ***!
5280  \****************************************************************/
5281/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5282
5283// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
5284var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js");
5285var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/core-js/library/modules/_object-dps.js");
5286var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/library/modules/_enum-bug-keys.js");
5287var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO');
5288var Empty = function () { /* empty */ };
5289var PROTOTYPE = 'prototype';
5290
5291// Create object with fake `null` prototype: use iframe Object with cleared prototype
5292var createDict = function () {
5293  // Thrash, waste and sodomy: IE GC bug
5294  var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js")('iframe');
5295  var i = enumBugKeys.length;
5296  var lt = '<';
5297  var gt = '>';
5298  var iframeDocument;
5299  iframe.style.display = 'none';
5300  (__webpack_require__(/*! ./_html */ "./node_modules/core-js/library/modules/_html.js").appendChild)(iframe);
5301  iframe.src = 'javascript:'; // eslint-disable-line no-script-url
5302  // createDict = iframe.contentWindow.Object;
5303  // html.removeChild(iframe);
5304  iframeDocument = iframe.contentWindow.document;
5305  iframeDocument.open();
5306  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
5307  iframeDocument.close();
5308  createDict = iframeDocument.F;
5309  while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
5310  return createDict();
5311};
5312
5313module.exports = Object.create || function create(O, Properties) {
5314  var result;
5315  if (O !== null) {
5316    Empty[PROTOTYPE] = anObject(O);
5317    result = new Empty();
5318    Empty[PROTOTYPE] = null;
5319    // add "__proto__" for Object.getPrototypeOf polyfill
5320    result[IE_PROTO] = O;
5321  } else result = createDict();
5322  return Properties === undefined ? result : dPs(result, Properties);
5323};
5324
5325
5326/***/ }),
5327
vendor: 1,239 bytes, lines 5328-5353
5328/***/ "./node_modules/core-js/library/modules/_object-dp.js":
5329/*!************************************************************!*\
5330  !*** ./node_modules/core-js/library/modules/_object-dp.js ***!
5331  \************************************************************/
5332/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5333
5334var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js");
5335var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/library/modules/_ie8-dom-define.js");
5336var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js");
5337var dP = Object.defineProperty;
5338
5339exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
5340  anObject(O);
5341  P = toPrimitive(P, true);
5342  anObject(Attributes);
5343  if (IE8_DOM_DEFINE) try {
5344    return dP(O, P, Attributes);
5345  } catch (e) { /* empty */ }
5346  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
5347  if ('value' in Attributes) O[P] = Attributes.value;
5348  return O;
5349};
5350
5351
5352/***/ }),
5353
vendor: 1,041 bytes, lines 5354-5376
5354/***/ "./node_modules/core-js/library/modules/_object-dps.js":
5355/*!*************************************************************!*\
5356  !*** ./node_modules/core-js/library/modules/_object-dps.js ***!
5357  \*************************************************************/
5358/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5359
5360var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js");
5361var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js");
5362var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js");
5363
5364module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) {
5365  anObject(O);
5366  var keys = getKeys(Properties);
5367  var length = keys.length;
5368  var i = 0;
5369  var P;
5370  while (length > i) dP.f(O, P = keys[i++], Properties[P]);
5371  return O;
5372};
5373
5374
5375/***/ }),
5376
vendor: 1,440 bytes, lines 5377-5402
5377/***/ "./node_modules/core-js/library/modules/_object-gopd.js":
5378/*!**************************************************************!*\
5379  !*** ./node_modules/core-js/library/modules/_object-gopd.js ***!
5380  \**************************************************************/
5381/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5382
5383var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js");
5384var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js");
5385var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js");
5386var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js");
5387var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js");
5388var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/library/modules/_ie8-dom-define.js");
5389var gOPD = Object.getOwnPropertyDescriptor;
5390
5391exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) {
5392  O = toIObject(O);
5393  P = toPrimitive(P, true);
5394  if (IE8_DOM_DEFINE) try {
5395    return gOPD(O, P);
5396  } catch (e) { /* empty */ }
5397  if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
5398};
5399
5400
5401/***/ }),
5402
vendor: 370 bytes, lines 5403-5413
5403/***/ "./node_modules/core-js/library/modules/_object-gops.js":
5404/*!**************************************************************!*\
5405  !*** ./node_modules/core-js/library/modules/_object-gops.js ***!
5406  \**************************************************************/
5407/***/ ((__unused_webpack_module, exports) => {
5408
5409exports.f = Object.getOwnPropertySymbols;
5410
5411
5412/***/ }),
5413
vendor: 1,211 bytes, lines 5414-5440
5414/***/ "./node_modules/core-js/library/modules/_object-keys-internal.js":
5415/*!***********************************************************************!*\
5416  !*** ./node_modules/core-js/library/modules/_object-keys-internal.js ***!
5417  \***********************************************************************/
5418/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5419
5420var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js");
5421var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js");
5422var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/library/modules/_array-includes.js")(false);
5423var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO');
5424
5425module.exports = function (object, names) {
5426  var O = toIObject(object);
5427  var i = 0;
5428  var result = [];
5429  var key;
5430  for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
5431  // Don't enum bug & hidden keys
5432  while (names.length > i) if (has(O, key = names[i++])) {
5433    ~arrayIndexOf(result, key) || result.push(key);
5434  }
5435  return result;
5436};
5437
5438
5439/***/ }),
5440
vendor: 730 bytes, lines 5441-5457
5441/***/ "./node_modules/core-js/library/modules/_object-keys.js":
5442/*!**************************************************************!*\
5443  !*** ./node_modules/core-js/library/modules/_object-keys.js ***!
5444  \**************************************************************/
5445/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5446
5447// 19.1.2.14 / 15.2.3.14 Object.keys(O)
5448var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/library/modules/_object-keys-internal.js");
5449var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/library/modules/_enum-bug-keys.js");
5450
5451module.exports = Object.keys || function keys(O) {
5452  return $keys(O, enumBugKeys);
5453};
5454
5455
5456/***/ }),
5457
vendor: 361 bytes, lines 5458-5468
5458/***/ "./node_modules/core-js/library/modules/_object-pie.js":
5459/*!*************************************************************!*\
5460  !*** ./node_modules/core-js/library/modules/_object-pie.js ***!
5461  \*************************************************************/
5462/***/ ((__unused_webpack_module, exports) => {
5463
5464exports.f = {}.propertyIsEnumerable;
5465
5466
5467/***/ }),
5468
vendor: 919 bytes, lines 5469-5488
5469/***/ "./node_modules/core-js/library/modules/_object-sap.js":
5470/*!*************************************************************!*\
5471  !*** ./node_modules/core-js/library/modules/_object-sap.js ***!
5472  \*************************************************************/
5473/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5474
5475// most Object methods by ES6 should accept primitives
5476var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js");
5477var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js");
5478var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js");
5479module.exports = function (KEY, exec) {
5480  var fn = (core.Object || {})[KEY] || Object[KEY];
5481  var exp = {};
5482  exp[KEY] = exec(fn);
5483  $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
5484};
5485
5486
5487/***/ }),
5488
vendor: 1,223 bytes, lines 5489-5519
5489/***/ "./node_modules/core-js/library/modules/_object-to-array.js":
5490/*!******************************************************************!*\
5491  !*** ./node_modules/core-js/library/modules/_object-to-array.js ***!
5492  \******************************************************************/
5493/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5494
5495var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js");
5496var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js");
5497var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js");
5498var isEnum = (__webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js").f);
5499module.exports = function (isEntries) {
5500  return function (it) {
5501    var O = toIObject(it);
5502    var keys = getKeys(O);
5503    var length = keys.length;
5504    var i = 0;
5505    var result = [];
5506    var key;
5507    while (length > i) {
5508      key = keys[i++];
5509      if (!DESCRIPTORS || isEnum.call(O, key)) {
5510        result.push(isEntries ? [key, O[key]] : O[key]);
5511      }
5512    }
5513    return result;
5514  };
5515};
5516
5517
5518/***/ }),
5519
vendor: 483 bytes, lines 5520-5537
5520/***/ "./node_modules/core-js/library/modules/_property-desc.js":
5521/*!****************************************************************!*\
5522  !*** ./node_modules/core-js/library/modules/_property-desc.js ***!
5523  \****************************************************************/
5524/***/ ((module) => {
5525
5526module.exports = function (bitmap, value) {
5527  return {
5528    enumerable: !(bitmap & 1),
5529    configurable: !(bitmap & 2),
5530    writable: !(bitmap & 4),
5531    value: value
5532  };
5533};
5534
5535
5536/***/ }),
5537
vendor: 1,533 bytes, lines 5538-5572
5538/***/ "./node_modules/core-js/library/modules/_set-proto.js":
5539/*!************************************************************!*\
5540  !*** ./node_modules/core-js/library/modules/_set-proto.js ***!
5541  \************************************************************/
5542/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5543
5544// Works with __proto__ only. Old v8 can't work with null proto objects.
5545/* eslint-disable no-proto */
5546var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js");
5547var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js");
5548var check = function (O, proto) {
5549  anObject(O);
5550  if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
5551};
5552module.exports = {
5553  set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
5554    function (test, buggy, set) {
5555      try {
5556        set = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js")(Function.call, (__webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/library/modules/_object-gopd.js").f)(Object.prototype, '__proto__').set, 2);
5557        set(test, []);
5558        buggy = !(test instanceof Array);
5559      } catch (e) { buggy = true; }
5560      return function setPrototypeOf(O, proto) {
5561        check(O, proto);
5562        if (buggy) O.__proto__ = proto;
5563        else set(O, proto);
5564        return O;
5565      };
5566    }({}, false) : undefined),
5567  check: check
5568};
5569
5570
5571/***/ }),
5572
vendor: 639 bytes, lines 5573-5587
5573/***/ "./node_modules/core-js/library/modules/_shared-key.js":
5574/*!*************************************************************!*\
5575  !*** ./node_modules/core-js/library/modules/_shared-key.js ***!
5576  \*************************************************************/
5577/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5578
5579var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/library/modules/_shared.js")('keys');
5580var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js");
5581module.exports = function (key) {
5582  return shared[key] || (shared[key] = uid(key));
5583};
5584
5585
5586/***/ }),
5587
vendor: 963 bytes, lines 5588-5609
5588/***/ "./node_modules/core-js/library/modules/_shared.js":
5589/*!*********************************************************!*\
5590  !*** ./node_modules/core-js/library/modules/_shared.js ***!
5591  \*********************************************************/
5592/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5593
5594var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js");
5595var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js");
5596var SHARED = '__core-js_shared__';
5597var store = global[SHARED] || (global[SHARED] = {});
5598
5599(module.exports = function (key, value) {
5600  return store[key] || (store[key] = value !== undefined ? value : {});
5601})('versions', []).push({
5602  version: core.version,
5603  mode: __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js") ? 'pure' : 'global',
5604  copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
5605});
5606
5607
5608/***/ }),
5609
vendor: 669 bytes, lines 5610-5626
5610/***/ "./node_modules/core-js/library/modules/_to-absolute-index.js":
5611/*!********************************************************************!*\
5612  !*** ./node_modules/core-js/library/modules/_to-absolute-index.js ***!
5613  \********************************************************************/
5614/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5615
5616var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js");
5617var max = Math.max;
5618var min = Math.min;
5619module.exports = function (index, length) {
5620  index = toInteger(index);
5621  return index < 0 ? max(index + length, 0) : min(index, length);
5622};
5623
5624
5625/***/ }),
5626
vendor: 459 bytes, lines 5627-5642
5627/***/ "./node_modules/core-js/library/modules/_to-integer.js":
5628/*!*************************************************************!*\
5629  !*** ./node_modules/core-js/library/modules/_to-integer.js ***!
5630  \*************************************************************/
5631/***/ ((module) => {
5632
5633// 7.1.4 ToInteger
5634var ceil = Math.ceil;
5635var floor = Math.floor;
5636module.exports = function (it) {
5637  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
5638};
5639
5640
5641/***/ }),
5642
vendor: 702 bytes, lines 5643-5658
5643/***/ "./node_modules/core-js/library/modules/_to-iobject.js":
5644/*!*************************************************************!*\
5645  !*** ./node_modules/core-js/library/modules/_to-iobject.js ***!
5646  \*************************************************************/
5647/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5648
5649// to indexed object, toObject with fallback for non-array-like ES3 strings
5650var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/library/modules/_iobject.js");
5651var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js");
5652module.exports = function (it) {
5653  return IObject(defined(it));
5654};
5655
5656
5657/***/ }),
5658
vendor: 629 bytes, lines 5659-5674
5659/***/ "./node_modules/core-js/library/modules/_to-length.js":
5660/*!************************************************************!*\
5661  !*** ./node_modules/core-js/library/modules/_to-length.js ***!
5662  \************************************************************/
5663/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5664
5665// 7.1.15 ToLength
5666var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js");
5667var min = Math.min;
5668module.exports = function (it) {
5669  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
5670};
5671
5672
5673/***/ }),
5674
vendor: 543 bytes, lines 5675-5689
5675/***/ "./node_modules/core-js/library/modules/_to-object.js":
5676/*!************************************************************!*\
5677  !*** ./node_modules/core-js/library/modules/_to-object.js ***!
5678  \************************************************************/
5679/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5680
5681// 7.1.13 ToObject(argument)
5682var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js");
5683module.exports = function (it) {
5684  return Object(defined(it));
5685};
5686
5687
5688/***/ }),
5689
vendor: 1,080 bytes, lines 5690-5711
5690/***/ "./node_modules/core-js/library/modules/_to-primitive.js":
5691/*!***************************************************************!*\
5692  !*** ./node_modules/core-js/library/modules/_to-primitive.js ***!
5693  \***************************************************************/
5694/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5695
5696// 7.1.1 ToPrimitive(input [, PreferredType])
5697var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js");
5698// instead of the ES6 spec version, we didn't implement @@toPrimitive case
5699// and the second argument - flag - preferred type is a string
5700module.exports = function (it, S) {
5701  if (!isObject(it)) return it;
5702  var fn, val;
5703  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
5704  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
5705  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
5706  throw TypeError("Can't convert object to primitive value");
5707};
5708
5709
5710/***/ }),
5711
vendor: 432 bytes, lines 5712-5726
5712/***/ "./node_modules/core-js/library/modules/_uid.js":
5713/*!******************************************************!*\
5714  !*** ./node_modules/core-js/library/modules/_uid.js ***!
5715  \******************************************************/
5716/***/ ((module) => {
5717
5718var id = 0;
5719var px = Math.random();
5720module.exports = function (key) {
5721  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
5722};
5723
5724
5725/***/ }),
5726
vendor: 693 bytes, lines 5727-5740
5727/***/ "./node_modules/core-js/library/modules/es6.object.assign.js":
5728/*!*******************************************************************!*\
5729  !*** ./node_modules/core-js/library/modules/es6.object.assign.js ***!
5730  \*******************************************************************/
5731/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
5732
5733// 19.1.3.1 Object.assign(target, source)
5734var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js");
5735
5736$export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "./node_modules/core-js/library/modules/_object-assign.js") });
5737
5738
5739/***/ }),
5740
vendor: 693 bytes, lines 5741-5753
5741/***/ "./node_modules/core-js/library/modules/es6.object.create.js":
5742/*!*******************************************************************!*\
5743  !*** ./node_modules/core-js/library/modules/es6.object.create.js ***!
5744  \*******************************************************************/
5745/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
5746
5747var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js");
5748// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
5749$export($export.S, 'Object', { create: __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/library/modules/_object-create.js") });
5750
5751
5752/***/ }),
5753
vendor: 822 bytes, lines 5754-5772
5754/***/ "./node_modules/core-js/library/modules/es6.object.keys.js":
5755/*!*****************************************************************!*\
5756  !*** ./node_modules/core-js/library/modules/es6.object.keys.js ***!
5757  \*****************************************************************/
5758/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
5759
5760// 19.1.2.14 Object.keys(O)
5761var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js");
5762var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js");
5763
5764__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/library/modules/_object-sap.js")('keys', function () {
5765  return function keys(it) {
5766    return $keys(toObject(it));
5767  };
5768});
5769
5770
5771/***/ }),
5772
vendor: 729 bytes, lines 5773-5785
5773/***/ "./node_modules/core-js/library/modules/es6.object.set-prototype-of.js":
5774/*!*****************************************************************************!*\
5775  !*** ./node_modules/core-js/library/modules/es6.object.set-prototype-of.js ***!
5776  \*****************************************************************************/
5777/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
5778
5779// 19.1.3.19 Object.setPrototypeOf(O, proto)
5780var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js");
5781$export($export.S, 'Object', { setPrototypeOf: (__webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/library/modules/_set-proto.js").set) });
5782
5783
5784/***/ }),
5785
vendor: 782 bytes, lines 5786-5804
5786/***/ "./node_modules/core-js/library/modules/es7.object.entries.js":
5787/*!********************************************************************!*\
5788  !*** ./node_modules/core-js/library/modules/es7.object.entries.js ***!
5789  \********************************************************************/
5790/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
5791
5792// https://github.com/tc39/proposal-object-values-entries
5793var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js");
5794var $entries = __webpack_require__(/*! ./_object-to-array */ "./node_modules/core-js/library/modules/_object-to-array.js")(true);
5795
5796$export($export.S, 'Object', {
5797  entries: function entries(it) {
5798    return $entries(it);
5799  }
5800});
5801
5802
5803/***/ }),
5804
vendor: 912 bytes, lines 5805-5836
5805/***/ "./node_modules/dom-helpers/activeElement.js":
5806/*!***************************************************!*\
5807  !*** ./node_modules/dom-helpers/activeElement.js ***!
5808  \***************************************************/
5809/***/ ((module, exports, __webpack_require__) => {
5810
5811"use strict";
5812
5813
5814var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5815
5816exports.__esModule = true;
5817exports["default"] = activeElement;
5818
5819var _ownerDocument = _interopRequireDefault(__webpack_require__(/*! ./ownerDocument */ "./node_modules/dom-helpers/ownerDocument.js"));
5820
5821function activeElement(doc) {
5822  if (doc === void 0) {
5823    doc = (0, _ownerDocument.default)();
5824  }
5825
5826  try {
5827    return doc.activeElement;
5828  } catch (e) {
5829    /* ie throws if no active element */
5830  }
5831}
5832
5833module.exports = exports["default"];
5834
5835/***/ }),
5836
vendor: 1,064 bytes, lines 5837-5860
5837/***/ "./node_modules/dom-helpers/class/addClass.js":
5838/*!****************************************************!*\
5839  !*** ./node_modules/dom-helpers/class/addClass.js ***!
5840  \****************************************************/
5841/***/ ((module, exports, __webpack_require__) => {
5842
5843"use strict";
5844
5845
5846var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5847
5848exports.__esModule = true;
5849exports["default"] = addClass;
5850
5851var _hasClass = _interopRequireDefault(__webpack_require__(/*! ./hasClass */ "./node_modules/dom-helpers/class/hasClass.js"));
5852
5853function addClass(element, className) {
5854  if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);
5855}
5856
5857module.exports = exports["default"];
5858
5859/***/ }),
5860
vendor: 624 bytes, lines 5861-5880
5861/***/ "./node_modules/dom-helpers/class/hasClass.js":
5862/*!****************************************************!*\
5863  !*** ./node_modules/dom-helpers/class/hasClass.js ***!
5864  \****************************************************/
5865/***/ ((module, exports) => {
5866
5867"use strict";
5868
5869
5870exports.__esModule = true;
5871exports["default"] = hasClass;
5872
5873function hasClass(element, className) {
5874  if (element.classList) return !!className && element.classList.contains(className);else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
5875}
5876
5877module.exports = exports["default"];
5878
5879/***/ }),
5880
vendor: 1,202 bytes, lines 5881-5914
5881/***/ "./node_modules/dom-helpers/class/index.js":
5882/*!*************************************************!*\
5883  !*** ./node_modules/dom-helpers/class/index.js ***!
5884  \*************************************************/
5885/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5886
5887"use strict";
5888
5889
5890var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5891
5892exports.__esModule = true;
5893exports["default"] = void 0;
5894
5895var _addClass = _interopRequireDefault(__webpack_require__(/*! ./addClass */ "./node_modules/dom-helpers/class/addClass.js"));
5896
5897exports.addClass = _addClass.default;
5898
5899var _removeClass = _interopRequireDefault(__webpack_require__(/*! ./removeClass */ "./node_modules/dom-helpers/class/removeClass.js"));
5900
5901exports.removeClass = _removeClass.default;
5902
5903var _hasClass = _interopRequireDefault(__webpack_require__(/*! ./hasClass */ "./node_modules/dom-helpers/class/hasClass.js"));
5904
5905exports.hasClass = _hasClass.default;
5906var _default = {
5907  addClass: _addClass.default,
5908  removeClass: _removeClass.default,
5909  hasClass: _hasClass.default
5910};
5911exports["default"] = _default;
5912
5913/***/ }),
5914
vendor: 843 bytes, lines 5915-5933
5915/***/ "./node_modules/dom-helpers/class/removeClass.js":
5916/*!*******************************************************!*\
5917  !*** ./node_modules/dom-helpers/class/removeClass.js ***!
5918  \*******************************************************/
5919/***/ ((module) => {
5920
5921"use strict";
5922
5923
5924function replaceClassName(origClass, classToRemove) {
5925  return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
5926}
5927
5928module.exports = function removeClass(element, className) {
5929  if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
5930};
5931
5932/***/ }),
5933
vendor: 1,200 bytes, lines 5934-5966
5934/***/ "./node_modules/dom-helpers/events/filter.js":
5935/*!***************************************************!*\
5936  !*** ./node_modules/dom-helpers/events/filter.js ***!
5937  \***************************************************/
5938/***/ ((module, exports, __webpack_require__) => {
5939
5940"use strict";
5941
5942
5943var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5944
5945exports.__esModule = true;
5946exports["default"] = filterEvents;
5947
5948var _contains = _interopRequireDefault(__webpack_require__(/*! ../query/contains */ "./node_modules/dom-helpers/query/contains.js"));
5949
5950var _querySelectorAll = _interopRequireDefault(__webpack_require__(/*! ../query/querySelectorAll */ "./node_modules/dom-helpers/query/querySelectorAll.js"));
5951
5952function filterEvents(selector, handler) {
5953  return function filterHandler(e) {
5954    var top = e.currentTarget,
5955        target = e.target,
5956        matches = (0, _querySelectorAll.default)(top, selector);
5957    if (matches.some(function (match) {
5958      return (0, _contains.default)(match, target);
5959    })) handler.call(this, e);
5960  };
5961}
5962
5963module.exports = exports["default"];
5964
5965/***/ }),
5966
vendor: 1,282 bytes, lines 5967-6005
5967/***/ "./node_modules/dom-helpers/events/index.js":
5968/*!**************************************************!*\
5969  !*** ./node_modules/dom-helpers/events/index.js ***!
5970  \**************************************************/
5971/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5972
5973"use strict";
5974
5975
5976var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5977
5978exports.__esModule = true;
5979exports["default"] = void 0;
5980
5981var _on = _interopRequireDefault(__webpack_require__(/*! ./on */ "./node_modules/dom-helpers/events/on.js"));
5982
5983exports.on = _on.default;
5984
5985var _off = _interopRequireDefault(__webpack_require__(/*! ./off */ "./node_modules/dom-helpers/events/off.js"));
5986
5987exports.off = _off.default;
5988
5989var _filter = _interopRequireDefault(__webpack_require__(/*! ./filter */ "./node_modules/dom-helpers/events/filter.js"));
5990
5991exports.filter = _filter.default;
5992
5993var _listen = _interopRequireDefault(__webpack_require__(/*! ./listen */ "./node_modules/dom-helpers/events/listen.js"));
5994
5995exports.listen = _listen.default;
5996var _default = {
5997  on: _on.default,
5998  off: _off.default,
5999  filter: _filter.default,
6000  listen: _listen.default
6001};
6002exports["default"] = _default;
6003
6004/***/ }),
6005
vendor: 1,248 bytes, lines 6006-6042
6006/***/ "./node_modules/dom-helpers/events/listen.js":
6007/*!***************************************************!*\
6008  !*** ./node_modules/dom-helpers/events/listen.js ***!
6009  \***************************************************/
6010/***/ ((module, exports, __webpack_require__) => {
6011
6012"use strict";
6013
6014
6015var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6016
6017exports.__esModule = true;
6018exports["default"] = void 0;
6019
6020var _inDOM = _interopRequireDefault(__webpack_require__(/*! ../util/inDOM */ "./node_modules/dom-helpers/util/inDOM.js"));
6021
6022var _on = _interopRequireDefault(__webpack_require__(/*! ./on */ "./node_modules/dom-helpers/events/on.js"));
6023
6024var _off = _interopRequireDefault(__webpack_require__(/*! ./off */ "./node_modules/dom-helpers/events/off.js"));
6025
6026var listen = function listen() {};
6027
6028if (_inDOM.default) {
6029  listen = function listen(node, eventName, handler, capture) {
6030    (0, _on.default)(node, eventName, handler, capture);
6031    return function () {
6032      (0, _off.default)(node, eventName, handler, capture);
6033    };
6034  };
6035}
6036
6037var _default = listen;
6038exports["default"] = _default;
6039module.exports = exports["default"];
6040
6041/***/ }),
6042
vendor: 1,126 bytes, lines 6043-6076
6043/***/ "./node_modules/dom-helpers/events/off.js":
6044/*!************************************************!*\
6045  !*** ./node_modules/dom-helpers/events/off.js ***!
6046  \************************************************/
6047/***/ ((module, exports, __webpack_require__) => {
6048
6049"use strict";
6050
6051
6052var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6053
6054exports.__esModule = true;
6055exports["default"] = void 0;
6056
6057var _inDOM = _interopRequireDefault(__webpack_require__(/*! ../util/inDOM */ "./node_modules/dom-helpers/util/inDOM.js"));
6058
6059var off = function off() {};
6060
6061if (_inDOM.default) {
6062  off = function () {
6063    if (document.addEventListener) return function (node, eventName, handler, capture) {
6064      return node.removeEventListener(eventName, handler, capture || false);
6065    };else if (document.attachEvent) return function (node, eventName, handler) {
6066      return node.detachEvent('on' + eventName, handler);
6067    };
6068  }();
6069}
6070
6071var _default = off;
6072exports["default"] = _default;
6073module.exports = exports["default"];
6074
6075/***/ }),
6076
vendor: 1,269 bytes, lines 6077-6115
6077/***/ "./node_modules/dom-helpers/events/on.js":
6078/*!***********************************************!*\
6079  !*** ./node_modules/dom-helpers/events/on.js ***!
6080  \***********************************************/
6081/***/ ((module, exports, __webpack_require__) => {
6082
6083"use strict";
6084
6085
6086var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6087
6088exports.__esModule = true;
6089exports["default"] = void 0;
6090
6091var _inDOM = _interopRequireDefault(__webpack_require__(/*! ../util/inDOM */ "./node_modules/dom-helpers/util/inDOM.js"));
6092
6093var on = function on() {};
6094
6095if (_inDOM.default) {
6096  on = function () {
6097    if (document.addEventListener) return function (node, eventName, handler, capture) {
6098      return node.addEventListener(eventName, handler, capture || false);
6099    };else if (document.attachEvent) return function (node, eventName, handler) {
6100      return node.attachEvent('on' + eventName, function (e) {
6101        e = e || window.event;
6102        e.target = e.target || e.srcElement;
6103        e.currentTarget = node;
6104        handler.call(node, e);
6105      });
6106    };
6107  }();
6108}
6109
6110var _default = on;
6111exports["default"] = _default;
6112module.exports = exports["default"];
6113
6114/***/ }),
6115
vendor: 466 bytes, lines 6116-6135
6116/***/ "./node_modules/dom-helpers/ownerDocument.js":
6117/*!***************************************************!*\
6118  !*** ./node_modules/dom-helpers/ownerDocument.js ***!
6119  \***************************************************/
6120/***/ ((module, exports) => {
6121
6122"use strict";
6123
6124
6125exports.__esModule = true;
6126exports["default"] = ownerDocument;
6127
6128function ownerDocument(node) {
6129  return node && node.ownerDocument || document;
6130}
6131
6132module.exports = exports["default"];
6133
6134/***/ }),
6135
vendor: 1,362 bytes, lines 6136-6178
6136/***/ "./node_modules/dom-helpers/query/contains.js":
6137/*!****************************************************!*\
6138  !*** ./node_modules/dom-helpers/query/contains.js ***!
6139  \****************************************************/
6140/***/ ((module, exports, __webpack_require__) => {
6141
6142"use strict";
6143
6144
6145var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6146
6147exports.__esModule = true;
6148exports["default"] = void 0;
6149
6150var _inDOM = _interopRequireDefault(__webpack_require__(/*! ../util/inDOM */ "./node_modules/dom-helpers/util/inDOM.js"));
6151
6152var _default = function () {
6153  // HTML DOM and SVG DOM may have different support levels,
6154  // so we need to check on context instead of a document root element.
6155  return _inDOM.default ? function (context, node) {
6156    if (context.contains) {
6157      return context.contains(node);
6158    } else if (context.compareDocumentPosition) {
6159      return context === node || !!(context.compareDocumentPosition(node) & 16);
6160    } else {
6161      return fallback(context, node);
6162    }
6163  } : fallback;
6164}();
6165
6166exports["default"] = _default;
6167
6168function fallback(context, node) {
6169  if (node) do {
6170    if (node === context) return true;
6171  } while (node = node.parentNode);
6172  return false;
6173}
6174
6175module.exports = exports["default"];
6176
6177/***/ }),
6178
vendor: 521 bytes, lines 6179-6198
6179/***/ "./node_modules/dom-helpers/query/isWindow.js":
6180/*!****************************************************!*\
6181  !*** ./node_modules/dom-helpers/query/isWindow.js ***!
6182  \****************************************************/
6183/***/ ((module, exports) => {
6184
6185"use strict";
6186
6187
6188exports.__esModule = true;
6189exports["default"] = getWindow;
6190
6191function getWindow(node) {
6192  return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false;
6193}
6194
6195module.exports = exports["default"];
6196
6197/***/ }),
6198
vendor: 1,283 bytes, lines 6199-6239
6199/***/ "./node_modules/dom-helpers/query/querySelectorAll.js":
6200/*!************************************************************!*\
6201  !*** ./node_modules/dom-helpers/query/querySelectorAll.js ***!
6202  \************************************************************/
6203/***/ ((module, exports) => {
6204
6205"use strict";
6206
6207
6208exports.__esModule = true;
6209exports["default"] = qsa;
6210// Zepto.js
6211// (c) 2010-2015 Thomas Fuchs
6212// Zepto.js may be freely distributed under the MIT license.
6213var simpleSelectorRE = /^[\w-]*$/;
6214var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
6215
6216function qsa(element, selector) {
6217  var maybeID = selector[0] === '#',
6218      maybeClass = selector[0] === '.',
6219      nameOnly = maybeID || maybeClass ? selector.slice(1) : selector,
6220      isSimple = simpleSelectorRE.test(nameOnly),
6221      found;
6222
6223  if (isSimple) {
6224    if (maybeID) {
6225      element = element.getElementById ? element : document;
6226      return (found = element.getElementById(nameOnly)) ? [found] : [];
6227    }
6228
6229    if (element.getElementsByClassName && maybeClass) return toArray(element.getElementsByClassName(nameOnly));
6230    return toArray(element.getElementsByTagName(selector));
6231  }
6232
6233  return toArray(element.querySelectorAll(selector));
6234}
6235
6236module.exports = exports["default"];
6237
6238/***/ }),
6239
vendor: 2,177 bytes, lines 6240-6293
6240/***/ "./node_modules/dom-helpers/style/getComputedStyle.js":
6241/*!************************************************************!*\
6242  !*** ./node_modules/dom-helpers/style/getComputedStyle.js ***!
6243  \************************************************************/
6244/***/ ((module, exports, __webpack_require__) => {
6245
6246"use strict";
6247
6248
6249var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6250
6251exports.__esModule = true;
6252exports["default"] = _getComputedStyle;
6253
6254var _camelizeStyle = _interopRequireDefault(__webpack_require__(/*! ../util/camelizeStyle */ "./node_modules/dom-helpers/util/camelizeStyle.js"));
6255
6256var rposition = /^(top|right|bottom|left)$/;
6257var rnumnonpx = /^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i;
6258
6259function _getComputedStyle(node) {
6260  if (!node) throw new TypeError('No Element passed to `getComputedStyle()`');
6261  var doc = node.ownerDocument;
6262  return 'defaultView' in doc ? doc.defaultView.opener ? node.ownerDocument.defaultView.getComputedStyle(node, null) : window.getComputedStyle(node, null) : {
6263    //ie 8 "magic" from: https://github.com/jquery/jquery/blob/1.11-stable/src/css/curCSS.js#L72
6264    getPropertyValue: function getPropertyValue(prop) {
6265      var style = node.style;
6266      prop = (0, _camelizeStyle.default)(prop);
6267      if (prop == 'float') prop = 'styleFloat';
6268      var current = node.currentStyle[prop] || null;
6269      if (current == null && style && style[prop]) current = style[prop];
6270
6271      if (rnumnonpx.test(current) && !rposition.test(prop)) {
6272        // Remember the original values
6273        var left = style.left;
6274        var runStyle = node.runtimeStyle;
6275        var rsLeft = runStyle && runStyle.left; // Put in the new values to get a computed value out
6276
6277        if (rsLeft) runStyle.left = node.currentStyle.left;
6278        style.left = prop === 'fontSize' ? '1em' : current;
6279        current = style.pixelLeft + 'px'; // Revert the changed values
6280
6281        style.left = left;
6282        if (rsLeft) runStyle.left = rsLeft;
6283      }
6284
6285      return current;
6286    }
6287  };
6288}
6289
6290module.exports = exports["default"];
6291
6292/***/ }),
6293
vendor: 2,319 bytes, lines 6294-6355
6294/***/ "./node_modules/dom-helpers/style/index.js":
6295/*!*************************************************!*\
6296  !*** ./node_modules/dom-helpers/style/index.js ***!
6297  \*************************************************/
6298/***/ ((module, exports, __webpack_require__) => {
6299
6300"use strict";
6301
6302
6303var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6304
6305exports.__esModule = true;
6306exports["default"] = style;
6307
6308var _camelizeStyle = _interopRequireDefault(__webpack_require__(/*! ../util/camelizeStyle */ "./node_modules/dom-helpers/util/camelizeStyle.js"));
6309
6310var _hyphenateStyle = _interopRequireDefault(__webpack_require__(/*! ../util/hyphenateStyle */ "./node_modules/dom-helpers/util/hyphenateStyle.js"));
6311
6312var _getComputedStyle2 = _interopRequireDefault(__webpack_require__(/*! ./getComputedStyle */ "./node_modules/dom-helpers/style/getComputedStyle.js"));
6313
6314var _removeStyle = _interopRequireDefault(__webpack_require__(/*! ./removeStyle */ "./node_modules/dom-helpers/style/removeStyle.js"));
6315
6316var _properties = __webpack_require__(/*! ../transition/properties */ "./node_modules/dom-helpers/transition/properties.js");
6317
6318var _isTransform = _interopRequireDefault(__webpack_require__(/*! ../transition/isTransform */ "./node_modules/dom-helpers/transition/isTransform.js"));
6319
6320function style(node, property, value) {
6321  var css = '';
6322  var transforms = '';
6323  var props = property;
6324
6325  if (typeof property === 'string') {
6326    if (value === undefined) {
6327      return node.style[(0, _camelizeStyle.default)(property)] || (0, _getComputedStyle2.default)(node).getPropertyValue((0, _hyphenateStyle.default)(property));
6328    } else {
6329      (props = {})[property] = value;
6330    }
6331  }
6332
6333  Object.keys(props).forEach(function (key) {
6334    var value = props[key];
6335
6336    if (!value && value !== 0) {
6337      (0, _removeStyle.default)(node, (0, _hyphenateStyle.default)(key));
6338    } else if ((0, _isTransform.default)(key)) {
6339      transforms += key + "(" + value + ") ";
6340    } else {
6341      css += (0, _hyphenateStyle.default)(key) + ": " + value + ";";
6342    }
6343  });
6344
6345  if (transforms) {
6346    css += _properties.transform + ": " + transforms + ";";
6347  }
6348
6349  node.style.cssText += ';' + css;
6350}
6351
6352module.exports = exports["default"];
6353
6354/***/ }),
6355
vendor: 542 bytes, lines 6356-6375
6356/***/ "./node_modules/dom-helpers/style/removeStyle.js":
6357/*!*******************************************************!*\
6358  !*** ./node_modules/dom-helpers/style/removeStyle.js ***!
6359  \*******************************************************/
6360/***/ ((module, exports) => {
6361
6362"use strict";
6363
6364
6365exports.__esModule = true;
6366exports["default"] = removeStyle;
6367
6368function removeStyle(node, key) {
6369  return 'removeProperty' in node.style ? node.style.removeProperty(key) : node.style.removeAttribute(key);
6370}
6371
6372module.exports = exports["default"];
6373
6374/***/ }),
6375
vendor: 619 bytes, lines 6376-6396
6376/***/ "./node_modules/dom-helpers/transition/isTransform.js":
6377/*!************************************************************!*\
6378  !*** ./node_modules/dom-helpers/transition/isTransform.js ***!
6379  \************************************************************/
6380/***/ ((module, exports) => {
6381
6382"use strict";
6383
6384
6385exports.__esModule = true;
6386exports["default"] = isTransform;
6387var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;
6388
6389function isTransform(property) {
6390  return !!(property && supportedTransforms.test(property));
6391}
6392
6393module.exports = exports["default"];
6394
6395/***/ }),
6396
vendor: 3,917 bytes, lines 6397-6498
6397/***/ "./node_modules/dom-helpers/transition/properties.js":
6398/*!***********************************************************!*\
6399  !*** ./node_modules/dom-helpers/transition/properties.js ***!
6400  \***********************************************************/
6401/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6402
6403"use strict";
6404
6405
6406var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6407
6408exports.__esModule = true;
6409exports["default"] = exports.animationEnd = exports.animationDelay = exports.animationTiming = exports.animationDuration = exports.animationName = exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = void 0;
6410
6411var _inDOM = _interopRequireDefault(__webpack_require__(/*! ../util/inDOM */ "./node_modules/dom-helpers/util/inDOM.js"));
6412
6413var transform = 'transform';
6414exports.transform = transform;
6415var prefix, transitionEnd, animationEnd;
6416exports.animationEnd = animationEnd;
6417exports.transitionEnd = transitionEnd;
6418var transitionProperty, transitionDuration, transitionTiming, transitionDelay;
6419exports.transitionDelay = transitionDelay;
6420exports.transitionTiming = transitionTiming;
6421exports.transitionDuration = transitionDuration;
6422exports.transitionProperty = transitionProperty;
6423var animationName, animationDuration, animationTiming, animationDelay;
6424exports.animationDelay = animationDelay;
6425exports.animationTiming = animationTiming;
6426exports.animationDuration = animationDuration;
6427exports.animationName = animationName;
6428
6429if (_inDOM.default) {
6430  var _getTransitionPropert = getTransitionProperties();
6431
6432  prefix = _getTransitionPropert.prefix;
6433  exports.transitionEnd = transitionEnd = _getTransitionPropert.transitionEnd;
6434  exports.animationEnd = animationEnd = _getTransitionPropert.animationEnd;
6435  exports.transform = transform = prefix + "-" + transform;
6436  exports.transitionProperty = transitionProperty = prefix + "-transition-property";
6437  exports.transitionDuration = transitionDuration = prefix + "-transition-duration";
6438  exports.transitionDelay = transitionDelay = prefix + "-transition-delay";
6439  exports.transitionTiming = transitionTiming = prefix + "-transition-timing-function";
6440  exports.animationName = animationName = prefix + "-animation-name";
6441  exports.animationDuration = animationDuration = prefix + "-animation-duration";
6442  exports.animationTiming = animationTiming = prefix + "-animation-delay";
6443  exports.animationDelay = animationDelay = prefix + "-animation-timing-function";
6444}
6445
6446var _default = {
6447  transform: transform,
6448  end: transitionEnd,
6449  property: transitionProperty,
6450  timing: transitionTiming,
6451  delay: transitionDelay,
6452  duration: transitionDuration
6453};
6454exports["default"] = _default;
6455
6456function getTransitionProperties() {
6457  var style = document.createElement('div').style;
6458  var vendorMap = {
6459    O: function O(e) {
6460      return "o" + e.toLowerCase();
6461    },
6462    Moz: function Moz(e) {
6463      return e.toLowerCase();
6464    },
6465    Webkit: function Webkit(e) {
6466      return "webkit" + e;
6467    },
6468    ms: function ms(e) {
6469      return "MS" + e;
6470    }
6471  };
6472  var vendors = Object.keys(vendorMap);
6473  var transitionEnd, animationEnd;
6474  var prefix = '';
6475
6476  for (var i = 0; i < vendors.length; i++) {
6477    var vendor = vendors[i];
6478
6479    if (vendor + "TransitionProperty" in style) {
6480      prefix = "-" + vendor.toLowerCase();
6481      transitionEnd = vendorMap[vendor]('TransitionEnd');
6482      animationEnd = vendorMap[vendor]('AnimationEnd');
6483      break;
6484    }
6485  }
6486
6487  if (!transitionEnd && 'transitionProperty' in style) transitionEnd = 'transitionend';
6488  if (!animationEnd && 'animationName' in style) animationEnd = 'animationend';
6489  style = null;
6490  return {
6491    animationEnd: animationEnd,
6492    transitionEnd: transitionEnd,
6493    prefix: prefix
6494  };
6495}
6496
6497/***/ }),
6498
vendor: 521 bytes, lines 6499-6521
6499/***/ "./node_modules/dom-helpers/util/camelize.js":
6500/*!***************************************************!*\
6501  !*** ./node_modules/dom-helpers/util/camelize.js ***!
6502  \***************************************************/
6503/***/ ((module, exports) => {
6504
6505"use strict";
6506
6507
6508exports.__esModule = true;
6509exports["default"] = camelize;
6510var rHyphen = /-(.)/g;
6511
6512function camelize(string) {
6513  return string.replace(rHyphen, function (_, chr) {
6514    return chr.toUpperCase();
6515  });
6516}
6517
6518module.exports = exports["default"];
6519
6520/***/ }),
6521
vendor: 1,048 bytes, lines 6522-6552
6522/***/ "./node_modules/dom-helpers/util/camelizeStyle.js":
6523/*!********************************************************!*\
6524  !*** ./node_modules/dom-helpers/util/camelizeStyle.js ***!
6525  \********************************************************/
6526/***/ ((module, exports, __webpack_require__) => {
6527
6528"use strict";
6529
6530
6531var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6532
6533exports.__esModule = true;
6534exports["default"] = camelizeStyleName;
6535
6536var _camelize = _interopRequireDefault(__webpack_require__(/*! ./camelize */ "./node_modules/dom-helpers/util/camelize.js"));
6537
6538/**
6539 * Copyright 2014-2015, Facebook, Inc.
6540 * All rights reserved.
6541 * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js
6542 */
6543var msPattern = /^-ms-/;
6544
6545function camelizeStyleName(string) {
6546  return (0, _camelize.default)(string.replace(msPattern, 'ms-'));
6547}
6548
6549module.exports = exports["default"];
6550
6551/***/ }),
6552
vendor: 494 bytes, lines 6553-6573
6553/***/ "./node_modules/dom-helpers/util/hyphenate.js":
6554/*!****************************************************!*\
6555  !*** ./node_modules/dom-helpers/util/hyphenate.js ***!
6556  \****************************************************/
6557/***/ ((module, exports) => {
6558
6559"use strict";
6560
6561
6562exports.__esModule = true;
6563exports["default"] = hyphenate;
6564var rUpper = /([A-Z])/g;
6565
6566function hyphenate(string) {
6567  return string.replace(rUpper, '-$1').toLowerCase();
6568}
6569
6570module.exports = exports["default"];
6571
6572/***/ }),
6573
vendor: 1,059 bytes, lines 6574-6604
6574/***/ "./node_modules/dom-helpers/util/hyphenateStyle.js":
6575/*!*********************************************************!*\
6576  !*** ./node_modules/dom-helpers/util/hyphenateStyle.js ***!
6577  \*********************************************************/
6578/***/ ((module, exports, __webpack_require__) => {
6579
6580"use strict";
6581
6582
6583var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6584
6585exports.__esModule = true;
6586exports["default"] = hyphenateStyleName;
6587
6588var _hyphenate = _interopRequireDefault(__webpack_require__(/*! ./hyphenate */ "./node_modules/dom-helpers/util/hyphenate.js"));
6589
6590/**
6591 * Copyright 2013-2014, Facebook, Inc.
6592 * All rights reserved.
6593 * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js
6594 */
6595var msPattern = /^ms-/;
6596
6597function hyphenateStyleName(string) {
6598  return (0, _hyphenate.default)(string).replace(msPattern, '-ms-');
6599}
6600
6601module.exports = exports["default"];
6602
6603/***/ }),
6604
vendor: 498 bytes, lines 6605-6623
6605/***/ "./node_modules/dom-helpers/util/inDOM.js":
6606/*!************************************************!*\
6607  !*** ./node_modules/dom-helpers/util/inDOM.js ***!
6608  \************************************************/
6609/***/ ((module, exports) => {
6610
6611"use strict";
6612
6613
6614exports.__esModule = true;
6615exports["default"] = void 0;
6616
6617var _default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
6618
6619exports["default"] = _default;
6620module.exports = exports["default"];
6621
6622/***/ }),
6623
vendor: 1,254 bytes, lines 6624-6663
6624/***/ "./node_modules/dom-helpers/util/scrollbarSize.js":
6625/*!********************************************************!*\
6626  !*** ./node_modules/dom-helpers/util/scrollbarSize.js ***!
6627  \********************************************************/
6628/***/ ((module, exports, __webpack_require__) => {
6629
6630"use strict";
6631
6632
6633var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6634
6635exports.__esModule = true;
6636exports["default"] = scrollbarSize;
6637
6638var _inDOM = _interopRequireDefault(__webpack_require__(/*! ./inDOM */ "./node_modules/dom-helpers/util/inDOM.js"));
6639
6640var size;
6641
6642function scrollbarSize(recalc) {
6643  if (!size && size !== 0 || recalc) {
6644    if (_inDOM.default) {
6645      var scrollDiv = document.createElement('div');
6646      scrollDiv.style.position = 'absolute';
6647      scrollDiv.style.top = '-9999px';
6648      scrollDiv.style.width = '50px';
6649      scrollDiv.style.height = '50px';
6650      scrollDiv.style.overflow = 'scroll';
6651      document.body.appendChild(scrollDiv);
6652      size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
6653      document.body.removeChild(scrollDiv);
6654    }
6655  }
6656
6657  return size;
6658}
6659
6660module.exports = exports["default"];
6661
6662/***/ }),
6663
vendor: 1,636 bytes, lines 6664-6736
6664/***/ "./node_modules/http-build-query/index.js":
6665/*!************************************************!*\
6666  !*** ./node_modules/http-build-query/index.js ***!
6667  \************************************************/
6668/***/ ((module) => {
6669
6670var esc = function(param) {
6671  return encodeURIComponent(param)
6672    .replace(/[!'()*]/g, escape)
6673    .replace(/%20/g, '+');
6674};
6675
6676var isNumeric = function(n) {
6677  return !isNaN(parseFloat(n)) && isFinite(n);
6678};
6679
6680var cleanArray = function(actual) {
6681  var newArray = new Array();
6682  for (var i = 0; i < actual.length; i++) {
6683    if (actual[i]) {
6684      newArray.push(actual[i]);
6685    }
6686  }
6687  return newArray;
6688};
6689
6690var httpBuildQuery = function(queryData, numericPrefix, argSeparator, tempKey) {
6691  numericPrefix = numericPrefix || null;
6692  argSeparator = argSeparator || '&';
6693  tempKey = tempKey || null;
6694
6695  if (!queryData) {
6696    return '';
6697  }
6698
6699  var query = Object.keys(queryData).map(function(k) {
6700    var res;
6701    var key = k;
6702
6703    if (tempKey) {
6704      key = tempKey + '[' + key + ']';
6705    }
6706
6707    if (typeof queryData[k] === 'object' && queryData[k] !== null) {
6708      res = httpBuildQuery(queryData[k], null, argSeparator, key);
6709    } else {
6710      if (numericPrefix) {
6711        key = isNumeric(key) ? numericPrefix + Number(key) : key;
6712      }
6713
6714      var val = queryData[k];
6715
6716      val = val === true ? '1' : val;
6717      val = val === false ? '0' : val;
6718      val = val === 0 ? '0' : val;
6719      val = val || '';
6720
6721      res = esc(key) + '=' + esc(val);
6722    }
6723
6724    return res;
6725  });
6726
6727  return cleanArray(query)
6728    .join(argSeparator)
6729    .replace(/[!'()*]/g, '');
6730};
6731
6732module.exports = httpBuildQuery;
6733
6734
6735/***/ }),
6736
vendor: 1,591 bytes, lines 6737-6796
6737/***/ "./node_modules/invariant/browser.js":
6738/*!*******************************************!*\
6739  !*** ./node_modules/invariant/browser.js ***!
6740  \*******************************************/
6741/***/ ((module) => {
6742
6743"use strict";
6744/**
6745 * Copyright (c) 2013-present, Facebook, Inc.
6746 *
6747 * This source code is licensed under the MIT license found in the
6748 * LICENSE file in the root directory of this source tree.
6749 */
6750
6751
6752
6753/**
6754 * Use invariant() to assert state which your program assumes to be true.
6755 *
6756 * Provide sprintf-style format (only %s is supported) and arguments
6757 * to provide information about what broke and what you were
6758 * expecting.
6759 *
6760 * The invariant message will be stripped in production, but the invariant
6761 * will remain to ensure logic does not differ in production.
6762 */
6763
6764var invariant = function(condition, format, a, b, c, d, e, f) {
6765  if (true) {
6766    if (format === undefined) {
6767      throw new Error('invariant requires an error message argument');
6768    }
6769  }
6770
6771  if (!condition) {
6772    var error;
6773    if (format === undefined) {
6774      error = new Error(
6775        'Minified exception occurred; use the non-minified dev environment ' +
6776        'for the full error message and additional helpful warnings.'
6777      );
6778    } else {
6779      var args = [a, b, c, d, e, f];
6780      var argIndex = 0;
6781      error = new Error(
6782        format.replace(/%s/g, function() { return args[argIndex++]; })
6783      );
6784      error.name = 'Invariant Violation';
6785    }
6786
6787    error.framesToPop = 1; // we don't care about invariant's own frame
6788    throw error;
6789  }
6790};
6791
6792module.exports = invariant;
6793
6794
6795/***/ }),
6796
vendor: 293,871 bytes, lines 6797-17815
6797/***/ "./node_modules/jquery/dist/jquery.js":
6798/*!********************************************!*\
6799  !*** ./node_modules/jquery/dist/jquery.js ***!
6800  \********************************************/
6801/***/ (function(module, exports) {
6802
6803var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
6804 * jQuery JavaScript Library v1.12.4
6805 * http://jquery.com/
6806 *
6807 * Includes Sizzle.js
6808 * http://sizzlejs.com/
6809 *
6810 * Copyright jQuery Foundation and other contributors
6811 * Released under the MIT license
6812 * http://jquery.org/license
6813 *
6814 * Date: 2016-05-20T17:17Z
6815 */
6816
6817(function( global, factory ) {
6818
6819	if (  true && typeof module.exports === "object" ) {
6820		// For CommonJS and CommonJS-like environments where a proper `window`
6821		// is present, execute the factory and get jQuery.
6822		// For environments that do not have a `window` with a `document`
6823		// (such as Node.js), expose a factory as module.exports.
6824		// This accentuates the need for the creation of a real `window`.
6825		// e.g. var jQuery = require("jquery")(window);
6826		// See ticket #14549 for more info.
6827		module.exports = global.document ?
6828			factory( global, true ) :
6829			function( w ) {
6830				if ( !w.document ) {
6831					throw new Error( "jQuery requires a window with a document" );
6832				}
6833				return factory( w );
6834			};
6835	} else {
6836		factory( global );
6837	}
6838
6839// Pass this if window is not defined yet
6840}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
6841
6842// Support: Firefox 18+
6843// Can't be in strict mode, several libs including ASP.NET trace
6844// the stack via arguments.caller.callee and Firefox dies if
6845// you try to trace through "use strict" call chains. (#13335)
6846//"use strict";
6847var deletedIds = [];
6848
6849var document = window.document;
6850
6851var slice = deletedIds.slice;
6852
6853var concat = deletedIds.concat;
6854
6855var push = deletedIds.push;
6856
6857var indexOf = deletedIds.indexOf;
6858
6859var class2type = {};
6860
6861var toString = class2type.toString;
6862
6863var hasOwn = class2type.hasOwnProperty;
6864
6865var support = {};
6866
6867
6868
6869var
6870	version = "1.12.4",
6871
6872	// Define a local copy of jQuery
6873	jQuery = function( selector, context ) {
6874
6875		// The jQuery object is actually just the init constructor 'enhanced'
6876		// Need init if jQuery is called (just allow error to be thrown if not included)
6877		return new jQuery.fn.init( selector, context );
6878	},
6879
6880	// Support: Android<4.1, IE<9
6881	// Make sure we trim BOM and NBSP
6882	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
6883
6884	// Matches dashed string for camelizing
6885	rmsPrefix = /^-ms-/,
6886	rdashAlpha = /-([\da-z])/gi,
6887
6888	// Used by jQuery.camelCase as callback to replace()
6889	fcamelCase = function( all, letter ) {
6890		return letter.toUpperCase();
6891	};
6892
6893jQuery.fn = jQuery.prototype = {
6894
6895	// The current version of jQuery being used
6896	jquery: version,
6897
6898	constructor: jQuery,
6899
6900	// Start with an empty selector
6901	selector: "",
6902
6903	// The default length of a jQuery object is 0
6904	length: 0,
6905
6906	toArray: function() {
6907		return slice.call( this );
6908	},
6909
6910	// Get the Nth element in the matched element set OR
6911	// Get the whole matched element set as a clean array
6912	get: function( num ) {
6913		return num != null ?
6914
6915			// Return just the one element from the set
6916			( num < 0 ? this[ num + this.length ] : this[ num ] ) :
6917
6918			// Return all the elements in a clean array
6919			slice.call( this );
6920	},
6921
6922	// Take an array of elements and push it onto the stack
6923	// (returning the new matched element set)
6924	pushStack: function( elems ) {
6925
6926		// Build a new jQuery matched element set
6927		var ret = jQuery.merge( this.constructor(), elems );
6928
6929		// Add the old object onto the stack (as a reference)
6930		ret.prevObject = this;
6931		ret.context = this.context;
6932
6933		// Return the newly-formed element set
6934		return ret;
6935	},
6936
6937	// Execute a callback for every element in the matched set.
6938	each: function( callback ) {
6939		return jQuery.each( this, callback );
6940	},
6941
6942	map: function( callback ) {
6943		return this.pushStack( jQuery.map( this, function( elem, i ) {
6944			return callback.call( elem, i, elem );
6945		} ) );
6946	},
6947
6948	slice: function() {
6949		return this.pushStack( slice.apply( this, arguments ) );
6950	},
6951
6952	first: function() {
6953		return this.eq( 0 );
6954	},
6955
6956	last: function() {
6957		return this.eq( -1 );
6958	},
6959
6960	eq: function( i ) {
6961		var len = this.length,
6962			j = +i + ( i < 0 ? len : 0 );
6963		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
6964	},
6965
6966	end: function() {
6967		return this.prevObject || this.constructor();
6968	},
6969
6970	// For internal use only.
6971	// Behaves like an Array's method, not like a jQuery method.
6972	push: push,
6973	sort: deletedIds.sort,
6974	splice: deletedIds.splice
6975};
6976
6977jQuery.extend = jQuery.fn.extend = function() {
6978	var src, copyIsArray, copy, name, options, clone,
6979		target = arguments[ 0 ] || {},
6980		i = 1,
6981		length = arguments.length,
6982		deep = false;
6983
6984	// Handle a deep copy situation
6985	if ( typeof target === "boolean" ) {
6986		deep = target;
6987
6988		// skip the boolean and the target
6989		target = arguments[ i ] || {};
6990		i++;
6991	}
6992
6993	// Handle case when target is a string or something (possible in deep copy)
6994	if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
6995		target = {};
6996	}
6997
6998	// extend jQuery itself if only one argument is passed
6999	if ( i === length ) {
7000		target = this;
7001		i--;
7002	}
7003
7004	for ( ; i < length; i++ ) {
7005
7006		// Only deal with non-null/undefined values
7007		if ( ( options = arguments[ i ] ) != null ) {
7008
7009			// Extend the base object
7010			for ( name in options ) {
7011				src = target[ name ];
7012				copy = options[ name ];
7013
7014				// Prevent never-ending loop
7015				if ( target === copy ) {
7016					continue;
7017				}
7018
7019				// Recurse if we're merging plain objects or arrays
7020				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
7021					( copyIsArray = jQuery.isArray( copy ) ) ) ) {
7022
7023					if ( copyIsArray ) {
7024						copyIsArray = false;
7025						clone = src && jQuery.isArray( src ) ? src : [];
7026
7027					} else {
7028						clone = src && jQuery.isPlainObject( src ) ? src : {};
7029					}
7030
7031					// Never move original objects, clone them
7032					target[ name ] = jQuery.extend( deep, clone, copy );
7033
7034				// Don't bring in undefined values
7035				} else if ( copy !== undefined ) {
7036					target[ name ] = copy;
7037				}
7038			}
7039		}
7040	}
7041
7042	// Return the modified object
7043	return target;
7044};
7045
7046jQuery.extend( {
7047
7048	// Unique for each copy of jQuery on the page
7049	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
7050
7051	// Assume jQuery is ready without the ready module
7052	isReady: true,
7053
7054	error: function( msg ) {
7055		throw new Error( msg );
7056	},
7057
7058	noop: function() {},
7059
7060	// See test/unit/core.js for details concerning isFunction.
7061	// Since version 1.3, DOM methods and functions like alert
7062	// aren't supported. They return false on IE (#2968).
7063	isFunction: function( obj ) {
7064		return jQuery.type( obj ) === "function";
7065	},
7066
7067	isArray: Array.isArray || function( obj ) {
7068		return jQuery.type( obj ) === "array";
7069	},
7070
7071	isWindow: function( obj ) {
7072		/* jshint eqeqeq: false */
7073		return obj != null && obj == obj.window;
7074	},
7075
7076	isNumeric: function( obj ) {
7077
7078		// parseFloat NaNs numeric-cast false positives (null|true|false|"")
7079		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
7080		// subtraction forces infinities to NaN
7081		// adding 1 corrects loss of precision from parseFloat (#15100)
7082		var realStringObj = obj && obj.toString();
7083		return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
7084	},
7085
7086	isEmptyObject: function( obj ) {
7087		var name;
7088		for ( name in obj ) {
7089			return false;
7090		}
7091		return true;
7092	},
7093
7094	isPlainObject: function( obj ) {
7095		var key;
7096
7097		// Must be an Object.
7098		// Because of IE, we also have to check the presence of the constructor property.
7099		// Make sure that DOM nodes and window objects don't pass through, as well
7100		if ( !obj || jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
7101			return false;
7102		}
7103
7104		try {
7105
7106			// Not own constructor property must be Object
7107			if ( obj.constructor &&
7108				!hasOwn.call( obj, "constructor" ) &&
7109				!hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
7110				return false;
7111			}
7112		} catch ( e ) {
7113
7114			// IE8,9 Will throw exceptions on certain host objects #9897
7115			return false;
7116		}
7117
7118		// Support: IE<9
7119		// Handle iteration over inherited properties before own properties.
7120		if ( !support.ownFirst ) {
7121			for ( key in obj ) {
7122				return hasOwn.call( obj, key );
7123			}
7124		}
7125
7126		// Own properties are enumerated firstly, so to speed up,
7127		// if last one is own, then all properties are own.
7128		for ( key in obj ) {}
7129
7130		return key === undefined || hasOwn.call( obj, key );
7131	},
7132
7133	type: function( obj ) {
7134		if ( obj == null ) {
7135			return obj + "";
7136		}
7137		return typeof obj === "object" || typeof obj === "function" ?
7138			class2type[ toString.call( obj ) ] || "object" :
7139			typeof obj;
7140	},
7141
7142	// Workarounds based on findings by Jim Driscoll
7143	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
7144	globalEval: function( data ) {
7145		if ( data && jQuery.trim( data ) ) {
7146
7147			// We use execScript on Internet Explorer
7148			// We use an anonymous function so that context is window
7149			// rather than jQuery in Firefox
7150			( window.execScript || function( data ) {
7151				window[ "eval" ].call( window, data ); // jscs:ignore requireDotNotation
7152			} )( data );
7153		}
7154	},
7155
7156	// Convert dashed to camelCase; used by the css and data modules
7157	// Microsoft forgot to hump their vendor prefix (#9572)
7158	camelCase: function( string ) {
7159		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
7160	},
7161
7162	nodeName: function( elem, name ) {
7163		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
7164	},
7165
7166	each: function( obj, callback ) {
7167		var length, i = 0;
7168
7169		if ( isArrayLike( obj ) ) {
7170			length = obj.length;
7171			for ( ; i < length; i++ ) {
7172				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
7173					break;
7174				}
7175			}
7176		} else {
7177			for ( i in obj ) {
7178				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
7179					break;
7180				}
7181			}
7182		}
7183
7184		return obj;
7185	},
7186
7187	// Support: Android<4.1, IE<9
7188	trim: function( text ) {
7189		return text == null ?
7190			"" :
7191			( text + "" ).replace( rtrim, "" );
7192	},
7193
7194	// results is for internal usage only
7195	makeArray: function( arr, results ) {
7196		var ret = results || [];
7197
7198		if ( arr != null ) {
7199			if ( isArrayLike( Object( arr ) ) ) {
7200				jQuery.merge( ret,
7201					typeof arr === "string" ?
7202					[ arr ] : arr
7203				);
7204			} else {
7205				push.call( ret, arr );
7206			}
7207		}
7208
7209		return ret;
7210	},
7211
7212	inArray: function( elem, arr, i ) {
7213		var len;
7214
7215		if ( arr ) {
7216			if ( indexOf ) {
7217				return indexOf.call( arr, elem, i );
7218			}
7219
7220			len = arr.length;
7221			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
7222
7223			for ( ; i < len; i++ ) {
7224
7225				// Skip accessing in sparse arrays
7226				if ( i in arr && arr[ i ] === elem ) {
7227					return i;
7228				}
7229			}
7230		}
7231
7232		return -1;
7233	},
7234
7235	merge: function( first, second ) {
7236		var len = +second.length,
7237			j = 0,
7238			i = first.length;
7239
7240		while ( j < len ) {
7241			first[ i++ ] = second[ j++ ];
7242		}
7243
7244		// Support: IE<9
7245		// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
7246		if ( len !== len ) {
7247			while ( second[ j ] !== undefined ) {
7248				first[ i++ ] = second[ j++ ];
7249			}
7250		}
7251
7252		first.length = i;
7253
7254		return first;
7255	},
7256
7257	grep: function( elems, callback, invert ) {
7258		var callbackInverse,
7259			matches = [],
7260			i = 0,
7261			length = elems.length,
7262			callbackExpect = !invert;
7263
7264		// Go through the array, only saving the items
7265		// that pass the validator function
7266		for ( ; i < length; i++ ) {
7267			callbackInverse = !callback( elems[ i ], i );
7268			if ( callbackInverse !== callbackExpect ) {
7269				matches.push( elems[ i ] );
7270			}
7271		}
7272
7273		return matches;
7274	},
7275
7276	// arg is for internal usage only
7277	map: function( elems, callback, arg ) {
7278		var length, value,
7279			i = 0,
7280			ret = [];
7281
7282		// Go through the array, translating each of the items to their new values
7283		if ( isArrayLike( elems ) ) {
7284			length = elems.length;
7285			for ( ; i < length; i++ ) {
7286				value = callback( elems[ i ], i, arg );
7287
7288				if ( value != null ) {
7289					ret.push( value );
7290				}
7291			}
7292
7293		// Go through every key on the object,
7294		} else {
7295			for ( i in elems ) {
7296				value = callback( elems[ i ], i, arg );
7297
7298				if ( value != null ) {
7299					ret.push( value );
7300				}
7301			}
7302		}
7303
7304		// Flatten any nested arrays
7305		return concat.apply( [], ret );
7306	},
7307
7308	// A global GUID counter for objects
7309	guid: 1,
7310
7311	// Bind a function to a context, optionally partially applying any
7312	// arguments.
7313	proxy: function( fn, context ) {
7314		var args, proxy, tmp;
7315
7316		if ( typeof context === "string" ) {
7317			tmp = fn[ context ];
7318			context = fn;
7319			fn = tmp;
7320		}
7321
7322		// Quick check to determine if target is callable, in the spec
7323		// this throws a TypeError, but we will just return undefined.
7324		if ( !jQuery.isFunction( fn ) ) {
7325			return undefined;
7326		}
7327
7328		// Simulated bind
7329		args = slice.call( arguments, 2 );
7330		proxy = function() {
7331			return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
7332		};
7333
7334		// Set the guid of unique handler to the same of original handler, so it can be removed
7335		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
7336
7337		return proxy;
7338	},
7339
7340	now: function() {
7341		return +( new Date() );
7342	},
7343
7344	// jQuery.support is not used in Core but other projects attach their
7345	// properties to it so it needs to exist.
7346	support: support
7347} );
7348
7349// JSHint would error on this code due to the Symbol not being defined in ES5.
7350// Defining this global in .jshintrc would create a danger of using the global
7351// unguarded in another place, it seems safer to just disable JSHint for these
7352// three lines.
7353/* jshint ignore: start */
7354if ( typeof Symbol === "function" ) {
7355	jQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ];
7356}
7357/* jshint ignore: end */
7358
7359// Populate the class2type map
7360jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
7361function( i, name ) {
7362	class2type[ "[object " + name + "]" ] = name.toLowerCase();
7363} );
7364
7365function isArrayLike( obj ) {
7366
7367	// Support: iOS 8.2 (not reproducible in simulator)
7368	// `in` check used to prevent JIT error (gh-2145)
7369	// hasOwn isn't used here due to false negatives
7370	// regarding Nodelist length in IE
7371	var length = !!obj && "length" in obj && obj.length,
7372		type = jQuery.type( obj );
7373
7374	if ( type === "function" || jQuery.isWindow( obj ) ) {
7375		return false;
7376	}
7377
7378	return type === "array" || length === 0 ||
7379		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
7380}
7381var Sizzle =
7382/*!
7383 * Sizzle CSS Selector Engine v2.2.1
7384 * http://sizzlejs.com/
7385 *
7386 * Copyright jQuery Foundation and other contributors
7387 * Released under the MIT license
7388 * http://jquery.org/license
7389 *
7390 * Date: 2015-10-17
7391 */
7392(function( window ) {
7393
7394var i,
7395	support,
7396	Expr,
7397	getText,
7398	isXML,
7399	tokenize,
7400	compile,
7401	select,
7402	outermostContext,
7403	sortInput,
7404	hasDuplicate,
7405
7406	// Local document vars
7407	setDocument,
7408	document,
7409	docElem,
7410	documentIsHTML,
7411	rbuggyQSA,
7412	rbuggyMatches,
7413	matches,
7414	contains,
7415
7416	// Instance-specific data
7417	expando = "sizzle" + 1 * new Date(),
7418	preferredDoc = window.document,
7419	dirruns = 0,
7420	done = 0,
7421	classCache = createCache(),
7422	tokenCache = createCache(),
7423	compilerCache = createCache(),
7424	sortOrder = function( a, b ) {
7425		if ( a === b ) {
7426			hasDuplicate = true;
7427		}
7428		return 0;
7429	},
7430
7431	// General-purpose constants
7432	MAX_NEGATIVE = 1 << 31,
7433
7434	// Instance methods
7435	hasOwn = ({}).hasOwnProperty,
7436	arr = [],
7437	pop = arr.pop,
7438	push_native = arr.push,
7439	push = arr.push,
7440	slice = arr.slice,
7441	// Use a stripped-down indexOf as it's faster than native
7442	// http://jsperf.com/thor-indexof-vs-for/5
7443	indexOf = function( list, elem ) {
7444		var i = 0,
7445			len = list.length;
7446		for ( ; i < len; i++ ) {
7447			if ( list[i] === elem ) {
7448				return i;
7449			}
7450		}
7451		return -1;
7452	},
7453
7454	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
7455
7456	// Regular expressions
7457
7458	// http://www.w3.org/TR/css3-selectors/#whitespace
7459	whitespace = "[\\x20\\t\\r\\n\\f]",
7460
7461	// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
7462	identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
7463
7464	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
7465	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
7466		// Operator (capture 2)
7467		"*([*^$|!~]?=)" + whitespace +
7468		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
7469		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
7470		"*\\]",
7471
7472	pseudos = ":(" + identifier + ")(?:\\((" +
7473		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
7474		// 1. quoted (capture 3; capture 4 or capture 5)
7475		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
7476		// 2. simple (capture 6)
7477		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
7478		// 3. anything else (capture 2)
7479		".*" +
7480		")\\)|)",
7481
7482	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
7483	rwhitespace = new RegExp( whitespace + "+", "g" ),
7484	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
7485
7486	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
7487	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
7488
7489	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
7490
7491	rpseudo = new RegExp( pseudos ),
7492	ridentifier = new RegExp( "^" + identifier + "$" ),
7493
7494	matchExpr = {
7495		"ID": new RegExp( "^#(" + identifier + ")" ),
7496		"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
7497		"TAG": new RegExp( "^(" + identifier + "|[*])" ),
7498		"ATTR": new RegExp( "^" + attributes ),
7499		"PSEUDO": new RegExp( "^" + pseudos ),
7500		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
7501			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
7502			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
7503		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
7504		// For use in libraries implementing .is()
7505		// We use this for POS matching in `select`
7506		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
7507			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
7508	},
7509
7510	rinputs = /^(?:input|select|textarea|button)$/i,
7511	rheader = /^h\d$/i,
7512
7513	rnative = /^[^{]+\{\s*\[native \w/,
7514
7515	// Easily-parseable/retrievable ID or TAG or CLASS selectors
7516	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
7517
7518	rsibling = /[+~]/,
7519	rescape = /'|\\/g,
7520
7521	// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
7522	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
7523	funescape = function( _, escaped, escapedWhitespace ) {
7524		var high = "0x" + escaped - 0x10000;
7525		// NaN means non-codepoint
7526		// Support: Firefox<24
7527		// Workaround erroneous numeric interpretation of +"0x"
7528		return high !== high || escapedWhitespace ?
7529			escaped :
7530			high < 0 ?
7531				// BMP codepoint
7532				String.fromCharCode( high + 0x10000 ) :
7533				// Supplemental Plane codepoint (surrogate pair)
7534				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
7535	},
7536
7537	// Used for iframes
7538	// See setDocument()
7539	// Removing the function wrapper causes a "Permission Denied"
7540	// error in IE
7541	unloadHandler = function() {
7542		setDocument();
7543	};
7544
7545// Optimize for push.apply( _, NodeList )
7546try {
7547	push.apply(
7548		(arr = slice.call( preferredDoc.childNodes )),
7549		preferredDoc.childNodes
7550	);
7551	// Support: Android<4.0
7552	// Detect silently failing push.apply
7553	arr[ preferredDoc.childNodes.length ].nodeType;
7554} catch ( e ) {
7555	push = { apply: arr.length ?
7556
7557		// Leverage slice if possible
7558		function( target, els ) {
7559			push_native.apply( target, slice.call(els) );
7560		} :
7561
7562		// Support: IE<9
7563		// Otherwise append directly
7564		function( target, els ) {
7565			var j = target.length,
7566				i = 0;
7567			// Can't trust NodeList.length
7568			while ( (target[j++] = els[i++]) ) {}
7569			target.length = j - 1;
7570		}
7571	};
7572}
7573
7574function Sizzle( selector, context, results, seed ) {
7575	var m, i, elem, nid, nidselect, match, groups, newSelector,
7576		newContext = context && context.ownerDocument,
7577
7578		// nodeType defaults to 9, since context defaults to document
7579		nodeType = context ? context.nodeType : 9;
7580
7581	results = results || [];
7582
7583	// Return early from calls with invalid selector or context
7584	if ( typeof selector !== "string" || !selector ||
7585		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
7586
7587		return results;
7588	}
7589
7590	// Try to shortcut find operations (as opposed to filters) in HTML documents
7591	if ( !seed ) {
7592
7593		if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
7594			setDocument( context );
7595		}
7596		context = context || document;
7597
7598		if ( documentIsHTML ) {
7599
7600			// If the selector is sufficiently simple, try using a "get*By*" DOM method
7601			// (excepting DocumentFragment context, where the methods don't exist)
7602			if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
7603
7604				// ID selector
7605				if ( (m = match[1]) ) {
7606
7607					// Document context
7608					if ( nodeType === 9 ) {
7609						if ( (elem = context.getElementById( m )) ) {
7610
7611							// Support: IE, Opera, Webkit
7612							// TODO: identify versions
7613							// getElementById can match elements by name instead of ID
7614							if ( elem.id === m ) {
7615								results.push( elem );
7616								return results;
7617							}
7618						} else {
7619							return results;
7620						}
7621
7622					// Element context
7623					} else {
7624
7625						// Support: IE, Opera, Webkit
7626						// TODO: identify versions
7627						// getElementById can match elements by name instead of ID
7628						if ( newContext && (elem = newContext.getElementById( m )) &&
7629							contains( context, elem ) &&
7630							elem.id === m ) {
7631
7632							results.push( elem );
7633							return results;
7634						}
7635					}
7636
7637				// Type selector
7638				} else if ( match[2] ) {
7639					push.apply( results, context.getElementsByTagName( selector ) );
7640					return results;
7641
7642				// Class selector
7643				} else if ( (m = match[3]) && support.getElementsByClassName &&
7644					context.getElementsByClassName ) {
7645
7646					push.apply( results, context.getElementsByClassName( m ) );
7647					return results;
7648				}
7649			}
7650
7651			// Take advantage of querySelectorAll
7652			if ( support.qsa &&
7653				!compilerCache[ selector + " " ] &&
7654				(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
7655
7656				if ( nodeType !== 1 ) {
7657					newContext = context;
7658					newSelector = selector;
7659
7660				// qSA looks outside Element context, which is not what we want
7661				// Thanks to Andrew Dupont for this workaround technique
7662				// Support: IE <=8
7663				// Exclude object elements
7664				} else if ( context.nodeName.toLowerCase() !== "object" ) {
7665
7666					// Capture the context ID, setting it first if necessary
7667					if ( (nid = context.getAttribute( "id" )) ) {
7668						nid = nid.replace( rescape, "\\$&" );
7669					} else {
7670						context.setAttribute( "id", (nid = expando) );
7671					}
7672
7673					// Prefix every selector in the list
7674					groups = tokenize( selector );
7675					i = groups.length;
7676					nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
7677					while ( i-- ) {
7678						groups[i] = nidselect + " " + toSelector( groups[i] );
7679					}
7680					newSelector = groups.join( "," );
7681
7682					// Expand context for sibling selectors
7683					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
7684						context;
7685				}
7686
7687				if ( newSelector ) {
7688					try {
7689						push.apply( results,
7690							newContext.querySelectorAll( newSelector )
7691						);
7692						return results;
7693					} catch ( qsaError ) {
7694					} finally {
7695						if ( nid === expando ) {
7696							context.removeAttribute( "id" );
7697						}
7698					}
7699				}
7700			}
7701		}
7702	}
7703
7704	// All others
7705	return select( selector.replace( rtrim, "$1" ), context, results, seed );
7706}
7707
7708/**
7709 * Create key-value caches of limited size
7710 * @returns {function(string, object)} Returns the Object data after storing it on itself with
7711 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
7712 *	deleting the oldest entry
7713 */
7714function createCache() {
7715	var keys = [];
7716
7717	function cache( key, value ) {
7718		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
7719		if ( keys.push( key + " " ) > Expr.cacheLength ) {
7720			// Only keep the most recent entries
7721			delete cache[ keys.shift() ];
7722		}
7723		return (cache[ key + " " ] = value);
7724	}
7725	return cache;
7726}
7727
7728/**
7729 * Mark a function for special use by Sizzle
7730 * @param {Function} fn The function to mark
7731 */
7732function markFunction( fn ) {
7733	fn[ expando ] = true;
7734	return fn;
7735}
7736
7737/**
7738 * Support testing using an element
7739 * @param {Function} fn Passed the created div and expects a boolean result
7740 */
7741function assert( fn ) {
7742	var div = document.createElement("div");
7743
7744	try {
7745		return !!fn( div );
7746	} catch (e) {
7747		return false;
7748	} finally {
7749		// Remove from its parent by default
7750		if ( div.parentNode ) {
7751			div.parentNode.removeChild( div );
7752		}
7753		// release memory in IE
7754		div = null;
7755	}
7756}
7757
7758/**
7759 * Adds the same handler for all of the specified attrs
7760 * @param {String} attrs Pipe-separated list of attributes
7761 * @param {Function} handler The method that will be applied
7762 */
7763function addHandle( attrs, handler ) {
7764	var arr = attrs.split("|"),
7765		i = arr.length;
7766
7767	while ( i-- ) {
7768		Expr.attrHandle[ arr[i] ] = handler;
7769	}
7770}
7771
7772/**
7773 * Checks document order of two siblings
7774 * @param {Element} a
7775 * @param {Element} b
7776 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
7777 */
7778function siblingCheck( a, b ) {
7779	var cur = b && a,
7780		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
7781			( ~b.sourceIndex || MAX_NEGATIVE ) -
7782			( ~a.sourceIndex || MAX_NEGATIVE );
7783
7784	// Use IE sourceIndex if available on both nodes
7785	if ( diff ) {
7786		return diff;
7787	}
7788
7789	// Check if b follows a
7790	if ( cur ) {
7791		while ( (cur = cur.nextSibling) ) {
7792			if ( cur === b ) {
7793				return -1;
7794			}
7795		}
7796	}
7797
7798	return a ? 1 : -1;
7799}
7800
7801/**
7802 * Returns a function to use in pseudos for input types
7803 * @param {String} type
7804 */
7805function createInputPseudo( type ) {
7806	return function( elem ) {
7807		var name = elem.nodeName.toLowerCase();
7808		return name === "input" && elem.type === type;
7809	};
7810}
7811
7812/**
7813 * Returns a function to use in pseudos for buttons
7814 * @param {String} type
7815 */
7816function createButtonPseudo( type ) {
7817	return function( elem ) {
7818		var name = elem.nodeName.toLowerCase();
7819		return (name === "input" || name === "button") && elem.type === type;
7820	};
7821}
7822
7823/**
7824 * Returns a function to use in pseudos for positionals
7825 * @param {Function} fn
7826 */
7827function createPositionalPseudo( fn ) {
7828	return markFunction(function( argument ) {
7829		argument = +argument;
7830		return markFunction(function( seed, matches ) {
7831			var j,
7832				matchIndexes = fn( [], seed.length, argument ),
7833				i = matchIndexes.length;
7834
7835			// Match elements found at the specified indexes
7836			while ( i-- ) {
7837				if ( seed[ (j = matchIndexes[i]) ] ) {
7838					seed[j] = !(matches[j] = seed[j]);
7839				}
7840			}
7841		});
7842	});
7843}
7844
7845/**
7846 * Checks a node for validity as a Sizzle context
7847 * @param {Element|Object=} context
7848 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
7849 */
7850function testContext( context ) {
7851	return context && typeof context.getElementsByTagName !== "undefined" && context;
7852}
7853
7854// Expose support vars for convenience
7855support = Sizzle.support = {};
7856
7857/**
7858 * Detects XML nodes
7859 * @param {Element|Object} elem An element or a document
7860 * @returns {Boolean} True iff elem is a non-HTML XML node
7861 */
7862isXML = Sizzle.isXML = function( elem ) {
7863	// documentElement is verified for cases where it doesn't yet exist
7864	// (such as loading iframes in IE - #4833)
7865	var documentElement = elem && (elem.ownerDocument || elem).documentElement;
7866	return documentElement ? documentElement.nodeName !== "HTML" : false;
7867};
7868
7869/**
7870 * Sets document-related variables once based on the current document
7871 * @param {Element|Object} [doc] An element or document object to use to set the document
7872 * @returns {Object} Returns the current document
7873 */
7874setDocument = Sizzle.setDocument = function( node ) {
7875	var hasCompare, parent,
7876		doc = node ? node.ownerDocument || node : preferredDoc;
7877
7878	// Return early if doc is invalid or already selected
7879	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
7880		return document;
7881	}
7882
7883	// Update global variables
7884	document = doc;
7885	docElem = document.documentElement;
7886	documentIsHTML = !isXML( document );
7887
7888	// Support: IE 9-11, Edge
7889	// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
7890	if ( (parent = document.defaultView) && parent.top !== parent ) {
7891		// Support: IE 11
7892		if ( parent.addEventListener ) {
7893			parent.addEventListener( "unload", unloadHandler, false );
7894
7895		// Support: IE 9 - 10 only
7896		} else if ( parent.attachEvent ) {
7897			parent.attachEvent( "onunload", unloadHandler );
7898		}
7899	}
7900
7901	/* Attributes
7902	---------------------------------------------------------------------- */
7903
7904	// Support: IE<8
7905	// Verify that getAttribute really returns attributes and not properties
7906	// (excepting IE8 booleans)
7907	support.attributes = assert(function( div ) {
7908		div.className = "i";
7909		return !div.getAttribute("className");
7910	});
7911
7912	/* getElement(s)By*
7913	---------------------------------------------------------------------- */
7914
7915	// Check if getElementsByTagName("*") returns only elements
7916	support.getElementsByTagName = assert(function( div ) {
7917		div.appendChild( document.createComment("") );
7918		return !div.getElementsByTagName("*").length;
7919	});
7920
7921	// Support: IE<9
7922	support.getElementsByClassName = rnative.test( document.getElementsByClassName );
7923
7924	// Support: IE<10
7925	// Check if getElementById returns elements by name
7926	// The broken getElementById methods don't pick up programatically-set names,
7927	// so use a roundabout getElementsByName test
7928	support.getById = assert(function( div ) {
7929		docElem.appendChild( div ).id = expando;
7930		return !document.getElementsByName || !document.getElementsByName( expando ).length;
7931	});
7932
7933	// ID find and filter
7934	if ( support.getById ) {
7935		Expr.find["ID"] = function( id, context ) {
7936			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
7937				var m = context.getElementById( id );
7938				return m ? [ m ] : [];
7939			}
7940		};
7941		Expr.filter["ID"] = function( id ) {
7942			var attrId = id.replace( runescape, funescape );
7943			return function( elem ) {
7944				return elem.getAttribute("id") === attrId;
7945			};
7946		};
7947	} else {
7948		// Support: IE6/7
7949		// getElementById is not reliable as a find shortcut
7950		delete Expr.find["ID"];
7951
7952		Expr.filter["ID"] =  function( id ) {
7953			var attrId = id.replace( runescape, funescape );
7954			return function( elem ) {
7955				var node = typeof elem.getAttributeNode !== "undefined" &&
7956					elem.getAttributeNode("id");
7957				return node && node.value === attrId;
7958			};
7959		};
7960	}
7961
7962	// Tag
7963	Expr.find["TAG"] = support.getElementsByTagName ?
7964		function( tag, context ) {
7965			if ( typeof context.getElementsByTagName !== "undefined" ) {
7966				return context.getElementsByTagName( tag );
7967
7968			// DocumentFragment nodes don't have gEBTN
7969			} else if ( support.qsa ) {
7970				return context.querySelectorAll( tag );
7971			}
7972		} :
7973
7974		function( tag, context ) {
7975			var elem,
7976				tmp = [],
7977				i = 0,
7978				// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
7979				results = context.getElementsByTagName( tag );
7980
7981			// Filter out possible comments
7982			if ( tag === "*" ) {
7983				while ( (elem = results[i++]) ) {
7984					if ( elem.nodeType === 1 ) {
7985						tmp.push( elem );
7986					}
7987				}
7988
7989				return tmp;
7990			}
7991			return results;
7992		};
7993
7994	// Class
7995	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
7996		if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
7997			return context.getElementsByClassName( className );
7998		}
7999	};
8000
8001	/* QSA/matchesSelector
8002	---------------------------------------------------------------------- */
8003
8004	// QSA and matchesSelector support
8005
8006	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
8007	rbuggyMatches = [];
8008
8009	// qSa(:focus) reports false when true (Chrome 21)
8010	// We allow this because of a bug in IE8/9 that throws an error
8011	// whenever `document.activeElement` is accessed on an iframe
8012	// So, we allow :focus to pass through QSA all the time to avoid the IE error
8013	// See http://bugs.jquery.com/ticket/13378
8014	rbuggyQSA = [];
8015
8016	if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
8017		// Build QSA regex
8018		// Regex strategy adopted from Diego Perini
8019		assert(function( div ) {
8020			// Select is set to empty string on purpose
8021			// This is to test IE's treatment of not explicitly
8022			// setting a boolean content attribute,
8023			// since its presence should be enough
8024			// http://bugs.jquery.com/ticket/12359
8025			docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
8026				"<select id='" + expando + "-\r\\' msallowcapture=''>" +
8027				"<option selected=''></option></select>";
8028
8029			// Support: IE8, Opera 11-12.16
8030			// Nothing should be selected when empty strings follow ^= or $= or *=
8031			// The test attribute must be unknown in Opera but "safe" for WinRT
8032			// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
8033			if ( div.querySelectorAll("[msallowcapture^='']").length ) {
8034				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
8035			}
8036
8037			// Support: IE8
8038			// Boolean attributes and "value" are not treated correctly
8039			if ( !div.querySelectorAll("[selected]").length ) {
8040				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
8041			}
8042
8043			// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
8044			if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
8045				rbuggyQSA.push("~=");
8046			}
8047
8048			// Webkit/Opera - :checked should return selected option elements
8049			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
8050			// IE8 throws error here and will not see later tests
8051			if ( !div.querySelectorAll(":checked").length ) {
8052				rbuggyQSA.push(":checked");
8053			}
8054
8055			// Support: Safari 8+, iOS 8+
8056			// https://bugs.webkit.org/show_bug.cgi?id=136851
8057			// In-page `selector#id sibing-combinator selector` fails
8058			if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
8059				rbuggyQSA.push(".#.+[+~]");
8060			}
8061		});
8062
8063		assert(function( div ) {
8064			// Support: Windows 8 Native Apps
8065			// The type and name attributes are restricted during .innerHTML assignment
8066			var input = document.createElement("input");
8067			input.setAttribute( "type", "hidden" );
8068			div.appendChild( input ).setAttribute( "name", "D" );
8069
8070			// Support: IE8
8071			// Enforce case-sensitivity of name attribute
8072			if ( div.querySelectorAll("[name=d]").length ) {
8073				rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
8074			}
8075
8076			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
8077			// IE8 throws error here and will not see later tests
8078			if ( !div.querySelectorAll(":enabled").length ) {
8079				rbuggyQSA.push( ":enabled", ":disabled" );
8080			}
8081
8082			// Opera 10-11 does not throw on post-comma invalid pseudos
8083			div.querySelectorAll("*,:x");
8084			rbuggyQSA.push(",.*:");
8085		});
8086	}
8087
8088	if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
8089		docElem.webkitMatchesSelector ||
8090		docElem.mozMatchesSelector ||
8091		docElem.oMatchesSelector ||
8092		docElem.msMatchesSelector) )) ) {
8093
8094		assert(function( div ) {
8095			// Check to see if it's possible to do matchesSelector
8096			// on a disconnected node (IE 9)
8097			support.disconnectedMatch = matches.call( div, "div" );
8098
8099			// This should fail with an exception
8100			// Gecko does not error, returns false instead
8101			matches.call( div, "[s!='']:x" );
8102			rbuggyMatches.push( "!=", pseudos );
8103		});
8104	}
8105
8106	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
8107	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
8108
8109	/* Contains
8110	---------------------------------------------------------------------- */
8111	hasCompare = rnative.test( docElem.compareDocumentPosition );
8112
8113	// Element contains another
8114	// Purposefully self-exclusive
8115	// As in, an element does not contain itself
8116	contains = hasCompare || rnative.test( docElem.contains ) ?
8117		function( a, b ) {
8118			var adown = a.nodeType === 9 ? a.documentElement : a,
8119				bup = b && b.parentNode;
8120			return a === bup || !!( bup && bup.nodeType === 1 && (
8121				adown.contains ?
8122					adown.contains( bup ) :
8123					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
8124			));
8125		} :
8126		function( a, b ) {
8127			if ( b ) {
8128				while ( (b = b.parentNode) ) {
8129					if ( b === a ) {
8130						return true;
8131					}
8132				}
8133			}
8134			return false;
8135		};
8136
8137	/* Sorting
8138	---------------------------------------------------------------------- */
8139
8140	// Document order sorting
8141	sortOrder = hasCompare ?
8142	function( a, b ) {
8143
8144		// Flag for duplicate removal
8145		if ( a === b ) {
8146			hasDuplicate = true;
8147			return 0;
8148		}
8149
8150		// Sort on method existence if only one input has compareDocumentPosition
8151		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
8152		if ( compare ) {
8153			return compare;
8154		}
8155
8156		// Calculate position if both inputs belong to the same document
8157		compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
8158			a.compareDocumentPosition( b ) :
8159
8160			// Otherwise we know they are disconnected
8161			1;
8162
8163		// Disconnected nodes
8164		if ( compare & 1 ||
8165			(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
8166
8167			// Choose the first element that is related to our preferred document
8168			if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
8169				return -1;
8170			}
8171			if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
8172				return 1;
8173			}
8174
8175			// Maintain original order
8176			return sortInput ?
8177				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
8178				0;
8179		}
8180
8181		return compare & 4 ? -1 : 1;
8182	} :
8183	function( a, b ) {
8184		// Exit early if the nodes are identical
8185		if ( a === b ) {
8186			hasDuplicate = true;
8187			return 0;
8188		}
8189
8190		var cur,
8191			i = 0,
8192			aup = a.parentNode,
8193			bup = b.parentNode,
8194			ap = [ a ],
8195			bp = [ b ];
8196
8197		// Parentless nodes are either documents or disconnected
8198		if ( !aup || !bup ) {
8199			return a === document ? -1 :
8200				b === document ? 1 :
8201				aup ? -1 :
8202				bup ? 1 :
8203				sortInput ?
8204				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
8205				0;
8206
8207		// If the nodes are siblings, we can do a quick check
8208		} else if ( aup === bup ) {
8209			return siblingCheck( a, b );
8210		}
8211
8212		// Otherwise we need full lists of their ancestors for comparison
8213		cur = a;
8214		while ( (cur = cur.parentNode) ) {
8215			ap.unshift( cur );
8216		}
8217		cur = b;
8218		while ( (cur = cur.parentNode) ) {
8219			bp.unshift( cur );
8220		}
8221
8222		// Walk down the tree looking for a discrepancy
8223		while ( ap[i] === bp[i] ) {
8224			i++;
8225		}
8226
8227		return i ?
8228			// Do a sibling check if the nodes have a common ancestor
8229			siblingCheck( ap[i], bp[i] ) :
8230
8231			// Otherwise nodes in our document sort first
8232			ap[i] === preferredDoc ? -1 :
8233			bp[i] === preferredDoc ? 1 :
8234			0;
8235	};
8236
8237	return document;
8238};
8239
8240Sizzle.matches = function( expr, elements ) {
8241	return Sizzle( expr, null, null, elements );
8242};
8243
8244Sizzle.matchesSelector = function( elem, expr ) {
8245	// Set document vars if needed
8246	if ( ( elem.ownerDocument || elem ) !== document ) {
8247		setDocument( elem );
8248	}
8249
8250	// Make sure that attribute selectors are quoted
8251	expr = expr.replace( rattributeQuotes, "='$1']" );
8252
8253	if ( support.matchesSelector && documentIsHTML &&
8254		!compilerCache[ expr + " " ] &&
8255		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
8256		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
8257
8258		try {
8259			var ret = matches.call( elem, expr );
8260
8261			// IE 9's matchesSelector returns false on disconnected nodes
8262			if ( ret || support.disconnectedMatch ||
8263					// As well, disconnected nodes are said to be in a document
8264					// fragment in IE 9
8265					elem.document && elem.document.nodeType !== 11 ) {
8266				return ret;
8267			}
8268		} catch (e) {}
8269	}
8270
8271	return Sizzle( expr, document, null, [ elem ] ).length > 0;
8272};
8273
8274Sizzle.contains = function( context, elem ) {
8275	// Set document vars if needed
8276	if ( ( context.ownerDocument || context ) !== document ) {
8277		setDocument( context );
8278	}
8279	return contains( context, elem );
8280};
8281
8282Sizzle.attr = function( elem, name ) {
8283	// Set document vars if needed
8284	if ( ( elem.ownerDocument || elem ) !== document ) {
8285		setDocument( elem );
8286	}
8287
8288	var fn = Expr.attrHandle[ name.toLowerCase() ],
8289		// Don't get fooled by Object.prototype properties (jQuery #13807)
8290		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
8291			fn( elem, name, !documentIsHTML ) :
8292			undefined;
8293
8294	return val !== undefined ?
8295		val :
8296		support.attributes || !documentIsHTML ?
8297			elem.getAttribute( name ) :
8298			(val = elem.getAttributeNode(name)) && val.specified ?
8299				val.value :
8300				null;
8301};
8302
8303Sizzle.error = function( msg ) {
8304	throw new Error( "Syntax error, unrecognized expression: " + msg );
8305};
8306
8307/**
8308 * Document sorting and removing duplicates
8309 * @param {ArrayLike} results
8310 */
8311Sizzle.uniqueSort = function( results ) {
8312	var elem,
8313		duplicates = [],
8314		j = 0,
8315		i = 0;
8316
8317	// Unless we *know* we can detect duplicates, assume their presence
8318	hasDuplicate = !support.detectDuplicates;
8319	sortInput = !support.sortStable && results.slice( 0 );
8320	results.sort( sortOrder );
8321
8322	if ( hasDuplicate ) {
8323		while ( (elem = results[i++]) ) {
8324			if ( elem === results[ i ] ) {
8325				j = duplicates.push( i );
8326			}
8327		}
8328		while ( j-- ) {
8329			results.splice( duplicates[ j ], 1 );
8330		}
8331	}
8332
8333	// Clear input after sorting to release objects
8334	// See https://github.com/jquery/sizzle/pull/225
8335	sortInput = null;
8336
8337	return results;
8338};
8339
8340/**
8341 * Utility function for retrieving the text value of an array of DOM nodes
8342 * @param {Array|Element} elem
8343 */
8344getText = Sizzle.getText = function( elem ) {
8345	var node,
8346		ret = "",
8347		i = 0,
8348		nodeType = elem.nodeType;
8349
8350	if ( !nodeType ) {
8351		// If no nodeType, this is expected to be an array
8352		while ( (node = elem[i++]) ) {
8353			// Do not traverse comment nodes
8354			ret += getText( node );
8355		}
8356	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
8357		// Use textContent for elements
8358		// innerText usage removed for consistency of new lines (jQuery #11153)
8359		if ( typeof elem.textContent === "string" ) {
8360			return elem.textContent;
8361		} else {
8362			// Traverse its children
8363			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
8364				ret += getText( elem );
8365			}
8366		}
8367	} else if ( nodeType === 3 || nodeType === 4 ) {
8368		return elem.nodeValue;
8369	}
8370	// Do not include comment or processing instruction nodes
8371
8372	return ret;
8373};
8374
8375Expr = Sizzle.selectors = {
8376
8377	// Can be adjusted by the user
8378	cacheLength: 50,
8379
8380	createPseudo: markFunction,
8381
8382	match: matchExpr,
8383
8384	attrHandle: {},
8385
8386	find: {},
8387
8388	relative: {
8389		">": { dir: "parentNode", first: true },
8390		" ": { dir: "parentNode" },
8391		"+": { dir: "previousSibling", first: true },
8392		"~": { dir: "previousSibling" }
8393	},
8394
8395	preFilter: {
8396		"ATTR": function( match ) {
8397			match[1] = match[1].replace( runescape, funescape );
8398
8399			// Move the given value to match[3] whether quoted or unquoted
8400			match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
8401
8402			if ( match[2] === "~=" ) {
8403				match[3] = " " + match[3] + " ";
8404			}
8405
8406			return match.slice( 0, 4 );
8407		},
8408
8409		"CHILD": function( match ) {
8410			/* matches from matchExpr["CHILD"]
8411				1 type (only|nth|...)
8412				2 what (child|of-type)
8413				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
8414				4 xn-component of xn+y argument ([+-]?\d*n|)
8415				5 sign of xn-component
8416				6 x of xn-component
8417				7 sign of y-component
8418				8 y of y-component
8419			*/
8420			match[1] = match[1].toLowerCase();
8421
8422			if ( match[1].slice( 0, 3 ) === "nth" ) {
8423				// nth-* requires argument
8424				if ( !match[3] ) {
8425					Sizzle.error( match[0] );
8426				}
8427
8428				// numeric x and y parameters for Expr.filter.CHILD
8429				// remember that false/true cast respectively to 0/1
8430				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
8431				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
8432
8433			// other types prohibit arguments
8434			} else if ( match[3] ) {
8435				Sizzle.error( match[0] );
8436			}
8437
8438			return match;
8439		},
8440
8441		"PSEUDO": function( match ) {
8442			var excess,
8443				unquoted = !match[6] && match[2];
8444
8445			if ( matchExpr["CHILD"].test( match[0] ) ) {
8446				return null;
8447			}
8448
8449			// Accept quoted arguments as-is
8450			if ( match[3] ) {
8451				match[2] = match[4] || match[5] || "";
8452
8453			// Strip excess characters from unquoted arguments
8454			} else if ( unquoted && rpseudo.test( unquoted ) &&
8455				// Get excess from tokenize (recursively)
8456				(excess = tokenize( unquoted, true )) &&
8457				// advance to the next closing parenthesis
8458				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
8459
8460				// excess is a negative index
8461				match[0] = match[0].slice( 0, excess );
8462				match[2] = unquoted.slice( 0, excess );
8463			}
8464
8465			// Return only captures needed by the pseudo filter method (type and argument)
8466			return match.slice( 0, 3 );
8467		}
8468	},
8469
8470	filter: {
8471
8472		"TAG": function( nodeNameSelector ) {
8473			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
8474			return nodeNameSelector === "*" ?
8475				function() { return true; } :
8476				function( elem ) {
8477					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
8478				};
8479		},
8480
8481		"CLASS": function( className ) {
8482			var pattern = classCache[ className + " " ];
8483
8484			return pattern ||
8485				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
8486				classCache( className, function( elem ) {
8487					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
8488				});
8489		},
8490
8491		"ATTR": function( name, operator, check ) {
8492			return function( elem ) {
8493				var result = Sizzle.attr( elem, name );
8494
8495				if ( result == null ) {
8496					return operator === "!=";
8497				}
8498				if ( !operator ) {
8499					return true;
8500				}
8501
8502				result += "";
8503
8504				return operator === "=" ? result === check :
8505					operator === "!=" ? result !== check :
8506					operator === "^=" ? check && result.indexOf( check ) === 0 :
8507					operator === "*=" ? check && result.indexOf( check ) > -1 :
8508					operator === "$=" ? check && result.slice( -check.length ) === check :
8509					operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
8510					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
8511					false;
8512			};
8513		},
8514
8515		"CHILD": function( type, what, argument, first, last ) {
8516			var simple = type.slice( 0, 3 ) !== "nth",
8517				forward = type.slice( -4 ) !== "last",
8518				ofType = what === "of-type";
8519
8520			return first === 1 && last === 0 ?
8521
8522				// Shortcut for :nth-*(n)
8523				function( elem ) {
8524					return !!elem.parentNode;
8525				} :
8526
8527				function( elem, context, xml ) {
8528					var cache, uniqueCache, outerCache, node, nodeIndex, start,
8529						dir = simple !== forward ? "nextSibling" : "previousSibling",
8530						parent = elem.parentNode,
8531						name = ofType && elem.nodeName.toLowerCase(),
8532						useCache = !xml && !ofType,
8533						diff = false;
8534
8535					if ( parent ) {
8536
8537						// :(first|last|only)-(child|of-type)
8538						if ( simple ) {
8539							while ( dir ) {
8540								node = elem;
8541								while ( (node = node[ dir ]) ) {
8542									if ( ofType ?
8543										node.nodeName.toLowerCase() === name :
8544										node.nodeType === 1 ) {
8545
8546										return false;
8547									}
8548								}
8549								// Reverse direction for :only-* (if we haven't yet done so)
8550								start = dir = type === "only" && !start && "nextSibling";
8551							}
8552							return true;
8553						}
8554
8555						start = [ forward ? parent.firstChild : parent.lastChild ];
8556
8557						// non-xml :nth-child(...) stores cache data on `parent`
8558						if ( forward && useCache ) {
8559
8560							// Seek `elem` from a previously-cached index
8561
8562							// ...in a gzip-friendly way
8563							node = parent;
8564							outerCache = node[ expando ] || (node[ expando ] = {});
8565
8566							// Support: IE <9 only
8567							// Defend against cloned attroperties (jQuery gh-1709)
8568							uniqueCache = outerCache[ node.uniqueID ] ||
8569								(outerCache[ node.uniqueID ] = {});
8570
8571							cache = uniqueCache[ type ] || [];
8572							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
8573							diff = nodeIndex && cache[ 2 ];
8574							node = nodeIndex && parent.childNodes[ nodeIndex ];
8575
8576							while ( (node = ++nodeIndex && node && node[ dir ] ||
8577
8578								// Fallback to seeking `elem` from the start
8579								(diff = nodeIndex = 0) || start.pop()) ) {
8580
8581								// When found, cache indexes on `parent` and break
8582								if ( node.nodeType === 1 && ++diff && node === elem ) {
8583									uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
8584									break;
8585								}
8586							}
8587
8588						} else {
8589							// Use previously-cached element index if available
8590							if ( useCache ) {
8591								// ...in a gzip-friendly way
8592								node = elem;
8593								outerCache = node[ expando ] || (node[ expando ] = {});
8594
8595								// Support: IE <9 only
8596								// Defend against cloned attroperties (jQuery gh-1709)
8597								uniqueCache = outerCache[ node.uniqueID ] ||
8598									(outerCache[ node.uniqueID ] = {});
8599
8600								cache = uniqueCache[ type ] || [];
8601								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
8602								diff = nodeIndex;
8603							}
8604
8605							// xml :nth-child(...)
8606							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
8607							if ( diff === false ) {
8608								// Use the same loop as above to seek `elem` from the start
8609								while ( (node = ++nodeIndex && node && node[ dir ] ||
8610									(diff = nodeIndex = 0) || start.pop()) ) {
8611
8612									if ( ( ofType ?
8613										node.nodeName.toLowerCase() === name :
8614										node.nodeType === 1 ) &&
8615										++diff ) {
8616
8617										// Cache the index of each encountered element
8618										if ( useCache ) {
8619											outerCache = node[ expando ] || (node[ expando ] = {});
8620
8621											// Support: IE <9 only
8622											// Defend against cloned attroperties (jQuery gh-1709)
8623											uniqueCache = outerCache[ node.uniqueID ] ||
8624												(outerCache[ node.uniqueID ] = {});
8625
8626											uniqueCache[ type ] = [ dirruns, diff ];
8627										}
8628
8629										if ( node === elem ) {
8630											break;
8631										}
8632									}
8633								}
8634							}
8635						}
8636
8637						// Incorporate the offset, then check against cycle size
8638						diff -= last;
8639						return diff === first || ( diff % first === 0 && diff / first >= 0 );
8640					}
8641				};
8642		},
8643
8644		"PSEUDO": function( pseudo, argument ) {
8645			// pseudo-class names are case-insensitive
8646			// http://www.w3.org/TR/selectors/#pseudo-classes
8647			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
8648			// Remember that setFilters inherits from pseudos
8649			var args,
8650				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
8651					Sizzle.error( "unsupported pseudo: " + pseudo );
8652
8653			// The user may use createPseudo to indicate that
8654			// arguments are needed to create the filter function
8655			// just as Sizzle does
8656			if ( fn[ expando ] ) {
8657				return fn( argument );
8658			}
8659
8660			// But maintain support for old signatures
8661			if ( fn.length > 1 ) {
8662				args = [ pseudo, pseudo, "", argument ];
8663				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
8664					markFunction(function( seed, matches ) {
8665						var idx,
8666							matched = fn( seed, argument ),
8667							i = matched.length;
8668						while ( i-- ) {
8669							idx = indexOf( seed, matched[i] );
8670							seed[ idx ] = !( matches[ idx ] = matched[i] );
8671						}
8672					}) :
8673					function( elem ) {
8674						return fn( elem, 0, args );
8675					};
8676			}
8677
8678			return fn;
8679		}
8680	},
8681
8682	pseudos: {
8683		// Potentially complex pseudos
8684		"not": markFunction(function( selector ) {
8685			// Trim the selector passed to compile
8686			// to avoid treating leading and trailing
8687			// spaces as combinators
8688			var input = [],
8689				results = [],
8690				matcher = compile( selector.replace( rtrim, "$1" ) );
8691
8692			return matcher[ expando ] ?
8693				markFunction(function( seed, matches, context, xml ) {
8694					var elem,
8695						unmatched = matcher( seed, null, xml, [] ),
8696						i = seed.length;
8697
8698					// Match elements unmatched by `matcher`
8699					while ( i-- ) {
8700						if ( (elem = unmatched[i]) ) {
8701							seed[i] = !(matches[i] = elem);
8702						}
8703					}
8704				}) :
8705				function( elem, context, xml ) {
8706					input[0] = elem;
8707					matcher( input, null, xml, results );
8708					// Don't keep the element (issue #299)
8709					input[0] = null;
8710					return !results.pop();
8711				};
8712		}),
8713
8714		"has": markFunction(function( selector ) {
8715			return function( elem ) {
8716				return Sizzle( selector, elem ).length > 0;
8717			};
8718		}),
8719
8720		"contains": markFunction(function( text ) {
8721			text = text.replace( runescape, funescape );
8722			return function( elem ) {
8723				return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
8724			};
8725		}),
8726
8727		// "Whether an element is represented by a :lang() selector
8728		// is based solely on the element's language value
8729		// being equal to the identifier C,
8730		// or beginning with the identifier C immediately followed by "-".
8731		// The matching of C against the element's language value is performed case-insensitively.
8732		// The identifier C does not have to be a valid language name."
8733		// http://www.w3.org/TR/selectors/#lang-pseudo
8734		"lang": markFunction( function( lang ) {
8735			// lang value must be a valid identifier
8736			if ( !ridentifier.test(lang || "") ) {
8737				Sizzle.error( "unsupported lang: " + lang );
8738			}
8739			lang = lang.replace( runescape, funescape ).toLowerCase();
8740			return function( elem ) {
8741				var elemLang;
8742				do {
8743					if ( (elemLang = documentIsHTML ?
8744						elem.lang :
8745						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
8746
8747						elemLang = elemLang.toLowerCase();
8748						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
8749					}
8750				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
8751				return false;
8752			};
8753		}),
8754
8755		// Miscellaneous
8756		"target": function( elem ) {
8757			var hash = window.location && window.location.hash;
8758			return hash && hash.slice( 1 ) === elem.id;
8759		},
8760
8761		"root": function( elem ) {
8762			return elem === docElem;
8763		},
8764
8765		"focus": function( elem ) {
8766			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
8767		},
8768
8769		// Boolean properties
8770		"enabled": function( elem ) {
8771			return elem.disabled === false;
8772		},
8773
8774		"disabled": function( elem ) {
8775			return elem.disabled === true;
8776		},
8777
8778		"checked": function( elem ) {
8779			// In CSS3, :checked should return both checked and selected elements
8780			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
8781			var nodeName = elem.nodeName.toLowerCase();
8782			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
8783		},
8784
8785		"selected": function( elem ) {
8786			// Accessing this property makes selected-by-default
8787			// options in Safari work properly
8788			if ( elem.parentNode ) {
8789				elem.parentNode.selectedIndex;
8790			}
8791
8792			return elem.selected === true;
8793		},
8794
8795		// Contents
8796		"empty": function( elem ) {
8797			// http://www.w3.org/TR/selectors/#empty-pseudo
8798			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
8799			//   but not by others (comment: 8; processing instruction: 7; etc.)
8800			// nodeType < 6 works because attributes (2) do not appear as children
8801			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
8802				if ( elem.nodeType < 6 ) {
8803					return false;
8804				}
8805			}
8806			return true;
8807		},
8808
8809		"parent": function( elem ) {
8810			return !Expr.pseudos["empty"]( elem );
8811		},
8812
8813		// Element/input types
8814		"header": function( elem ) {
8815			return rheader.test( elem.nodeName );
8816		},
8817
8818		"input": function( elem ) {
8819			return rinputs.test( elem.nodeName );
8820		},
8821
8822		"button": function( elem ) {
8823			var name = elem.nodeName.toLowerCase();
8824			return name === "input" && elem.type === "button" || name === "button";
8825		},
8826
8827		"text": function( elem ) {
8828			var attr;
8829			return elem.nodeName.toLowerCase() === "input" &&
8830				elem.type === "text" &&
8831
8832				// Support: IE<8
8833				// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
8834				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
8835		},
8836
8837		// Position-in-collection
8838		"first": createPositionalPseudo(function() {
8839			return [ 0 ];
8840		}),
8841
8842		"last": createPositionalPseudo(function( matchIndexes, length ) {
8843			return [ length - 1 ];
8844		}),
8845
8846		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
8847			return [ argument < 0 ? argument + length : argument ];
8848		}),
8849
8850		"even": createPositionalPseudo(function( matchIndexes, length ) {
8851			var i = 0;
8852			for ( ; i < length; i += 2 ) {
8853				matchIndexes.push( i );
8854			}
8855			return matchIndexes;
8856		}),
8857
8858		"odd": createPositionalPseudo(function( matchIndexes, length ) {
8859			var i = 1;
8860			for ( ; i < length; i += 2 ) {
8861				matchIndexes.push( i );
8862			}
8863			return matchIndexes;
8864		}),
8865
8866		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
8867			var i = argument < 0 ? argument + length : argument;
8868			for ( ; --i >= 0; ) {
8869				matchIndexes.push( i );
8870			}
8871			return matchIndexes;
8872		}),
8873
8874		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
8875			var i = argument < 0 ? argument + length : argument;
8876			for ( ; ++i < length; ) {
8877				matchIndexes.push( i );
8878			}
8879			return matchIndexes;
8880		})
8881	}
8882};
8883
8884Expr.pseudos["nth"] = Expr.pseudos["eq"];
8885
8886// Add button/input type pseudos
8887for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
8888	Expr.pseudos[ i ] = createInputPseudo( i );
8889}
8890for ( i in { submit: true, reset: true } ) {
8891	Expr.pseudos[ i ] = createButtonPseudo( i );
8892}
8893
8894// Easy API for creating new setFilters
8895function setFilters() {}
8896setFilters.prototype = Expr.filters = Expr.pseudos;
8897Expr.setFilters = new setFilters();
8898
8899tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
8900	var matched, match, tokens, type,
8901		soFar, groups, preFilters,
8902		cached = tokenCache[ selector + " " ];
8903
8904	if ( cached ) {
8905		return parseOnly ? 0 : cached.slice( 0 );
8906	}
8907
8908	soFar = selector;
8909	groups = [];
8910	preFilters = Expr.preFilter;
8911
8912	while ( soFar ) {
8913
8914		// Comma and first run
8915		if ( !matched || (match = rcomma.exec( soFar )) ) {
8916			if ( match ) {
8917				// Don't consume trailing commas as valid
8918				soFar = soFar.slice( match[0].length ) || soFar;
8919			}
8920			groups.push( (tokens = []) );
8921		}
8922
8923		matched = false;
8924
8925		// Combinators
8926		if ( (match = rcombinators.exec( soFar )) ) {
8927			matched = match.shift();
8928			tokens.push({
8929				value: matched,
8930				// Cast descendant combinators to space
8931				type: match[0].replace( rtrim, " " )
8932			});
8933			soFar = soFar.slice( matched.length );
8934		}
8935
8936		// Filters
8937		for ( type in Expr.filter ) {
8938			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
8939				(match = preFilters[ type ]( match ))) ) {
8940				matched = match.shift();
8941				tokens.push({
8942					value: matched,
8943					type: type,
8944					matches: match
8945				});
8946				soFar = soFar.slice( matched.length );
8947			}
8948		}
8949
8950		if ( !matched ) {
8951			break;
8952		}
8953	}
8954
8955	// Return the length of the invalid excess
8956	// if we're just parsing
8957	// Otherwise, throw an error or return tokens
8958	return parseOnly ?
8959		soFar.length :
8960		soFar ?
8961			Sizzle.error( selector ) :
8962			// Cache the tokens
8963			tokenCache( selector, groups ).slice( 0 );
8964};
8965
8966function toSelector( tokens ) {
8967	var i = 0,
8968		len = tokens.length,
8969		selector = "";
8970	for ( ; i < len; i++ ) {
8971		selector += tokens[i].value;
8972	}
8973	return selector;
8974}
8975
8976function addCombinator( matcher, combinator, base ) {
8977	var dir = combinator.dir,
8978		checkNonElements = base && dir === "parentNode",
8979		doneName = done++;
8980
8981	return combinator.first ?
8982		// Check against closest ancestor/preceding element
8983		function( elem, context, xml ) {
8984			while ( (elem = elem[ dir ]) ) {
8985				if ( elem.nodeType === 1 || checkNonElements ) {
8986					return matcher( elem, context, xml );
8987				}
8988			}
8989		} :
8990
8991		// Check against all ancestor/preceding elements
8992		function( elem, context, xml ) {
8993			var oldCache, uniqueCache, outerCache,
8994				newCache = [ dirruns, doneName ];
8995
8996			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
8997			if ( xml ) {
8998				while ( (elem = elem[ dir ]) ) {
8999					if ( elem.nodeType === 1 || checkNonElements ) {
9000						if ( matcher( elem, context, xml ) ) {
9001							return true;
9002						}
9003					}
9004				}
9005			} else {
9006				while ( (elem = elem[ dir ]) ) {
9007					if ( elem.nodeType === 1 || checkNonElements ) {
9008						outerCache = elem[ expando ] || (elem[ expando ] = {});
9009
9010						// Support: IE <9 only
9011						// Defend against cloned attroperties (jQuery gh-1709)
9012						uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
9013
9014						if ( (oldCache = uniqueCache[ dir ]) &&
9015							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
9016
9017							// Assign to newCache so results back-propagate to previous elements
9018							return (newCache[ 2 ] = oldCache[ 2 ]);
9019						} else {
9020							// Reuse newcache so results back-propagate to previous elements
9021							uniqueCache[ dir ] = newCache;
9022
9023							// A match means we're done; a fail means we have to keep checking
9024							if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
9025								return true;
9026							}
9027						}
9028					}
9029				}
9030			}
9031		};
9032}
9033
9034function elementMatcher( matchers ) {
9035	return matchers.length > 1 ?
9036		function( elem, context, xml ) {
9037			var i = matchers.length;
9038			while ( i-- ) {
9039				if ( !matchers[i]( elem, context, xml ) ) {
9040					return false;
9041				}
9042			}
9043			return true;
9044		} :
9045		matchers[0];
9046}
9047
9048function multipleContexts( selector, contexts, results ) {
9049	var i = 0,
9050		len = contexts.length;
9051	for ( ; i < len; i++ ) {
9052		Sizzle( selector, contexts[i], results );
9053	}
9054	return results;
9055}
9056
9057function condense( unmatched, map, filter, context, xml ) {
9058	var elem,
9059		newUnmatched = [],
9060		i = 0,
9061		len = unmatched.length,
9062		mapped = map != null;
9063
9064	for ( ; i < len; i++ ) {
9065		if ( (elem = unmatched[i]) ) {
9066			if ( !filter || filter( elem, context, xml ) ) {
9067				newUnmatched.push( elem );
9068				if ( mapped ) {
9069					map.push( i );
9070				}
9071			}
9072		}
9073	}
9074
9075	return newUnmatched;
9076}
9077
9078function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
9079	if ( postFilter && !postFilter[ expando ] ) {
9080		postFilter = setMatcher( postFilter );
9081	}
9082	if ( postFinder && !postFinder[ expando ] ) {
9083		postFinder = setMatcher( postFinder, postSelector );
9084	}
9085	return markFunction(function( seed, results, context, xml ) {
9086		var temp, i, elem,
9087			preMap = [],
9088			postMap = [],
9089			preexisting = results.length,
9090
9091			// Get initial elements from seed or context
9092			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
9093
9094			// Prefilter to get matcher input, preserving a map for seed-results synchronization
9095			matcherIn = preFilter && ( seed || !selector ) ?
9096				condense( elems, preMap, preFilter, context, xml ) :
9097				elems,
9098
9099			matcherOut = matcher ?
9100				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
9101				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
9102
9103					// ...intermediate processing is necessary
9104					[] :
9105
9106					// ...otherwise use results directly
9107					results :
9108				matcherIn;
9109
9110		// Find primary matches
9111		if ( matcher ) {
9112			matcher( matcherIn, matcherOut, context, xml );
9113		}
9114
9115		// Apply postFilter
9116		if ( postFilter ) {
9117			temp = condense( matcherOut, postMap );
9118			postFilter( temp, [], context, xml );
9119
9120			// Un-match failing elements by moving them back to matcherIn
9121			i = temp.length;
9122			while ( i-- ) {
9123				if ( (elem = temp[i]) ) {
9124					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
9125				}
9126			}
9127		}
9128
9129		if ( seed ) {
9130			if ( postFinder || preFilter ) {
9131				if ( postFinder ) {
9132					// Get the final matcherOut by condensing this intermediate into postFinder contexts
9133					temp = [];
9134					i = matcherOut.length;
9135					while ( i-- ) {
9136						if ( (elem = matcherOut[i]) ) {
9137							// Restore matcherIn since elem is not yet a final match
9138							temp.push( (matcherIn[i] = elem) );
9139						}
9140					}
9141					postFinder( null, (matcherOut = []), temp, xml );
9142				}
9143
9144				// Move matched elements from seed to results to keep them synchronized
9145				i = matcherOut.length;
9146				while ( i-- ) {
9147					if ( (elem = matcherOut[i]) &&
9148						(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
9149
9150						seed[temp] = !(results[temp] = elem);
9151					}
9152				}
9153			}
9154
9155		// Add elements to results, through postFinder if defined
9156		} else {
9157			matcherOut = condense(
9158				matcherOut === results ?
9159					matcherOut.splice( preexisting, matcherOut.length ) :
9160					matcherOut
9161			);
9162			if ( postFinder ) {
9163				postFinder( null, results, matcherOut, xml );
9164			} else {
9165				push.apply( results, matcherOut );
9166			}
9167		}
9168	});
9169}
9170
9171function matcherFromTokens( tokens ) {
9172	var checkContext, matcher, j,
9173		len = tokens.length,
9174		leadingRelative = Expr.relative[ tokens[0].type ],
9175		implicitRelative = leadingRelative || Expr.relative[" "],
9176		i = leadingRelative ? 1 : 0,
9177
9178		// The foundational matcher ensures that elements are reachable from top-level context(s)
9179		matchContext = addCombinator( function( elem ) {
9180			return elem === checkContext;
9181		}, implicitRelative, true ),
9182		matchAnyContext = addCombinator( function( elem ) {
9183			return indexOf( checkContext, elem ) > -1;
9184		}, implicitRelative, true ),
9185		matchers = [ function( elem, context, xml ) {
9186			var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
9187				(checkContext = context).nodeType ?
9188					matchContext( elem, context, xml ) :
9189					matchAnyContext( elem, context, xml ) );
9190			// Avoid hanging onto element (issue #299)
9191			checkContext = null;
9192			return ret;
9193		} ];
9194
9195	for ( ; i < len; i++ ) {
9196		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
9197			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
9198		} else {
9199			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
9200
9201			// Return special upon seeing a positional matcher
9202			if ( matcher[ expando ] ) {
9203				// Find the next relative operator (if any) for proper handling
9204				j = ++i;
9205				for ( ; j < len; j++ ) {
9206					if ( Expr.relative[ tokens[j].type ] ) {
9207						break;
9208					}
9209				}
9210				return setMatcher(
9211					i > 1 && elementMatcher( matchers ),
9212					i > 1 && toSelector(
9213						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
9214						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
9215					).replace( rtrim, "$1" ),
9216					matcher,
9217					i < j && matcherFromTokens( tokens.slice( i, j ) ),
9218					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
9219					j < len && toSelector( tokens )
9220				);
9221			}
9222			matchers.push( matcher );
9223		}
9224	}
9225
9226	return elementMatcher( matchers );
9227}
9228
9229function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
9230	var bySet = setMatchers.length > 0,
9231		byElement = elementMatchers.length > 0,
9232		superMatcher = function( seed, context, xml, results, outermost ) {
9233			var elem, j, matcher,
9234				matchedCount = 0,
9235				i = "0",
9236				unmatched = seed && [],
9237				setMatched = [],
9238				contextBackup = outermostContext,
9239				// We must always have either seed elements or outermost context
9240				elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
9241				// Use integer dirruns iff this is the outermost matcher
9242				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
9243				len = elems.length;
9244
9245			if ( outermost ) {
9246				outermostContext = context === document || context || outermost;
9247			}
9248
9249			// Add elements passing elementMatchers directly to results
9250			// Support: IE<9, Safari
9251			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
9252			for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
9253				if ( byElement && elem ) {
9254					j = 0;
9255					if ( !context && elem.ownerDocument !== document ) {
9256						setDocument( elem );
9257						xml = !documentIsHTML;
9258					}
9259					while ( (matcher = elementMatchers[j++]) ) {
9260						if ( matcher( elem, context || document, xml) ) {
9261							results.push( elem );
9262							break;
9263						}
9264					}
9265					if ( outermost ) {
9266						dirruns = dirrunsUnique;
9267					}
9268				}
9269
9270				// Track unmatched elements for set filters
9271				if ( bySet ) {
9272					// They will have gone through all possible matchers
9273					if ( (elem = !matcher && elem) ) {
9274						matchedCount--;
9275					}
9276
9277					// Lengthen the array for every element, matched or not
9278					if ( seed ) {
9279						unmatched.push( elem );
9280					}
9281				}
9282			}
9283
9284			// `i` is now the count of elements visited above, and adding it to `matchedCount`
9285			// makes the latter nonnegative.
9286			matchedCount += i;
9287
9288			// Apply set filters to unmatched elements
9289			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
9290			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
9291			// no element matchers and no seed.
9292			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
9293			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
9294			// numerically zero.
9295			if ( bySet && i !== matchedCount ) {
9296				j = 0;
9297				while ( (matcher = setMatchers[j++]) ) {
9298					matcher( unmatched, setMatched, context, xml );
9299				}
9300
9301				if ( seed ) {
9302					// Reintegrate element matches to eliminate the need for sorting
9303					if ( matchedCount > 0 ) {
9304						while ( i-- ) {
9305							if ( !(unmatched[i] || setMatched[i]) ) {
9306								setMatched[i] = pop.call( results );
9307							}
9308						}
9309					}
9310
9311					// Discard index placeholder values to get only actual matches
9312					setMatched = condense( setMatched );
9313				}
9314
9315				// Add matches to results
9316				push.apply( results, setMatched );
9317
9318				// Seedless set matches succeeding multiple successful matchers stipulate sorting
9319				if ( outermost && !seed && setMatched.length > 0 &&
9320					( matchedCount + setMatchers.length ) > 1 ) {
9321
9322					Sizzle.uniqueSort( results );
9323				}
9324			}
9325
9326			// Override manipulation of globals by nested matchers
9327			if ( outermost ) {
9328				dirruns = dirrunsUnique;
9329				outermostContext = contextBackup;
9330			}
9331
9332			return unmatched;
9333		};
9334
9335	return bySet ?
9336		markFunction( superMatcher ) :
9337		superMatcher;
9338}
9339
9340compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
9341	var i,
9342		setMatchers = [],
9343		elementMatchers = [],
9344		cached = compilerCache[ selector + " " ];
9345
9346	if ( !cached ) {
9347		// Generate a function of recursive functions that can be used to check each element
9348		if ( !match ) {
9349			match = tokenize( selector );
9350		}
9351		i = match.length;
9352		while ( i-- ) {
9353			cached = matcherFromTokens( match[i] );
9354			if ( cached[ expando ] ) {
9355				setMatchers.push( cached );
9356			} else {
9357				elementMatchers.push( cached );
9358			}
9359		}
9360
9361		// Cache the compiled function
9362		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
9363
9364		// Save selector and tokenization
9365		cached.selector = selector;
9366	}
9367	return cached;
9368};
9369
9370/**
9371 * A low-level selection function that works with Sizzle's compiled
9372 *  selector functions
9373 * @param {String|Function} selector A selector or a pre-compiled
9374 *  selector function built with Sizzle.compile
9375 * @param {Element} context
9376 * @param {Array} [results]
9377 * @param {Array} [seed] A set of elements to match against
9378 */
9379select = Sizzle.select = function( selector, context, results, seed ) {
9380	var i, tokens, token, type, find,
9381		compiled = typeof selector === "function" && selector,
9382		match = !seed && tokenize( (selector = compiled.selector || selector) );
9383
9384	results = results || [];
9385
9386	// Try to minimize operations if there is only one selector in the list and no seed
9387	// (the latter of which guarantees us context)
9388	if ( match.length === 1 ) {
9389
9390		// Reduce context if the leading compound selector is an ID
9391		tokens = match[0] = match[0].slice( 0 );
9392		if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
9393				support.getById && context.nodeType === 9 && documentIsHTML &&
9394				Expr.relative[ tokens[1].type ] ) {
9395
9396			context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
9397			if ( !context ) {
9398				return results;
9399
9400			// Precompiled matchers will still verify ancestry, so step up a level
9401			} else if ( compiled ) {
9402				context = context.parentNode;
9403			}
9404
9405			selector = selector.slice( tokens.shift().value.length );
9406		}
9407
9408		// Fetch a seed set for right-to-left matching
9409		i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
9410		while ( i-- ) {
9411			token = tokens[i];
9412
9413			// Abort if we hit a combinator
9414			if ( Expr.relative[ (type = token.type) ] ) {
9415				break;
9416			}
9417			if ( (find = Expr.find[ type ]) ) {
9418				// Search, expanding context for leading sibling combinators
9419				if ( (seed = find(
9420					token.matches[0].replace( runescape, funescape ),
9421					rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
9422				)) ) {
9423
9424					// If seed is empty or no tokens remain, we can return early
9425					tokens.splice( i, 1 );
9426					selector = seed.length && toSelector( tokens );
9427					if ( !selector ) {
9428						push.apply( results, seed );
9429						return results;
9430					}
9431
9432					break;
9433				}
9434			}
9435		}
9436	}
9437
9438	// Compile and execute a filtering function if one is not provided
9439	// Provide `match` to avoid retokenization if we modified the selector above
9440	( compiled || compile( selector, match ) )(
9441		seed,
9442		context,
9443		!documentIsHTML,
9444		results,
9445		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
9446	);
9447	return results;
9448};
9449
9450// One-time assignments
9451
9452// Sort stability
9453support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
9454
9455// Support: Chrome 14-35+
9456// Always assume duplicates if they aren't passed to the comparison function
9457support.detectDuplicates = !!hasDuplicate;
9458
9459// Initialize against the default document
9460setDocument();
9461
9462// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
9463// Detached nodes confoundingly follow *each other*
9464support.sortDetached = assert(function( div1 ) {
9465	// Should return 1, but returns 4 (following)
9466	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
9467});
9468
9469// Support: IE<8
9470// Prevent attribute/property "interpolation"
9471// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
9472if ( !assert(function( div ) {
9473	div.innerHTML = "<a href='#'></a>";
9474	return div.firstChild.getAttribute("href") === "#" ;
9475}) ) {
9476	addHandle( "type|href|height|width", function( elem, name, isXML ) {
9477		if ( !isXML ) {
9478			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
9479		}
9480	});
9481}
9482
9483// Support: IE<9
9484// Use defaultValue in place of getAttribute("value")
9485if ( !support.attributes || !assert(function( div ) {
9486	div.innerHTML = "<input/>";
9487	div.firstChild.setAttribute( "value", "" );
9488	return div.firstChild.getAttribute( "value" ) === "";
9489}) ) {
9490	addHandle( "value", function( elem, name, isXML ) {
9491		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
9492			return elem.defaultValue;
9493		}
9494	});
9495}
9496
9497// Support: IE<9
9498// Use getAttributeNode to fetch booleans when getAttribute lies
9499if ( !assert(function( div ) {
9500	return div.getAttribute("disabled") == null;
9501}) ) {
9502	addHandle( booleans, function( elem, name, isXML ) {
9503		var val;
9504		if ( !isXML ) {
9505			return elem[ name ] === true ? name.toLowerCase() :
9506					(val = elem.getAttributeNode( name )) && val.specified ?
9507					val.value :
9508				null;
9509		}
9510	});
9511}
9512
9513return Sizzle;
9514
9515})( window );
9516
9517
9518
9519jQuery.find = Sizzle;
9520jQuery.expr = Sizzle.selectors;
9521jQuery.expr[ ":" ] = jQuery.expr.pseudos;
9522jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
9523jQuery.text = Sizzle.getText;
9524jQuery.isXMLDoc = Sizzle.isXML;
9525jQuery.contains = Sizzle.contains;
9526
9527
9528
9529var dir = function( elem, dir, until ) {
9530	var matched = [],
9531		truncate = until !== undefined;
9532
9533	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
9534		if ( elem.nodeType === 1 ) {
9535			if ( truncate && jQuery( elem ).is( until ) ) {
9536				break;
9537			}
9538			matched.push( elem );
9539		}
9540	}
9541	return matched;
9542};
9543
9544
9545var siblings = function( n, elem ) {
9546	var matched = [];
9547
9548	for ( ; n; n = n.nextSibling ) {
9549		if ( n.nodeType === 1 && n !== elem ) {
9550			matched.push( n );
9551		}
9552	}
9553
9554	return matched;
9555};
9556
9557
9558var rneedsContext = jQuery.expr.match.needsContext;
9559
9560var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
9561
9562
9563
9564var risSimple = /^.[^:#\[\.,]*$/;
9565
9566// Implement the identical functionality for filter and not
9567function winnow( elements, qualifier, not ) {
9568	if ( jQuery.isFunction( qualifier ) ) {
9569		return jQuery.grep( elements, function( elem, i ) {
9570			/* jshint -W018 */
9571			return !!qualifier.call( elem, i, elem ) !== not;
9572		} );
9573
9574	}
9575
9576	if ( qualifier.nodeType ) {
9577		return jQuery.grep( elements, function( elem ) {
9578			return ( elem === qualifier ) !== not;
9579		} );
9580
9581	}
9582
9583	if ( typeof qualifier === "string" ) {
9584		if ( risSimple.test( qualifier ) ) {
9585			return jQuery.filter( qualifier, elements, not );
9586		}
9587
9588		qualifier = jQuery.filter( qualifier, elements );
9589	}
9590
9591	return jQuery.grep( elements, function( elem ) {
9592		return ( jQuery.inArray( elem, qualifier ) > -1 ) !== not;
9593	} );
9594}
9595
9596jQuery.filter = function( expr, elems, not ) {
9597	var elem = elems[ 0 ];
9598
9599	if ( not ) {
9600		expr = ":not(" + expr + ")";
9601	}
9602
9603	return elems.length === 1 && elem.nodeType === 1 ?
9604		jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
9605		jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
9606			return elem.nodeType === 1;
9607		} ) );
9608};
9609
9610jQuery.fn.extend( {
9611	find: function( selector ) {
9612		var i,
9613			ret = [],
9614			self = this,
9615			len = self.length;
9616
9617		if ( typeof selector !== "string" ) {
9618			return this.pushStack( jQuery( selector ).filter( function() {
9619				for ( i = 0; i < len; i++ ) {
9620					if ( jQuery.contains( self[ i ], this ) ) {
9621						return true;
9622					}
9623				}
9624			} ) );
9625		}
9626
9627		for ( i = 0; i < len; i++ ) {
9628			jQuery.find( selector, self[ i ], ret );
9629		}
9630
9631		// Needed because $( selector, context ) becomes $( context ).find( selector )
9632		ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
9633		ret.selector = this.selector ? this.selector + " " + selector : selector;
9634		return ret;
9635	},
9636	filter: function( selector ) {
9637		return this.pushStack( winnow( this, selector || [], false ) );
9638	},
9639	not: function( selector ) {
9640		return this.pushStack( winnow( this, selector || [], true ) );
9641	},
9642	is: function( selector ) {
9643		return !!winnow(
9644			this,
9645
9646			// If this is a positional/relative selector, check membership in the returned set
9647			// so $("p:first").is("p:last") won't return true for a doc with two "p".
9648			typeof selector === "string" && rneedsContext.test( selector ) ?
9649				jQuery( selector ) :
9650				selector || [],
9651			false
9652		).length;
9653	}
9654} );
9655
9656
9657// Initialize a jQuery object
9658
9659
9660// A central reference to the root jQuery(document)
9661var rootjQuery,
9662
9663	// A simple way to check for HTML strings
9664	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
9665	// Strict HTML recognition (#11290: must start with <)
9666	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
9667
9668	init = jQuery.fn.init = function( selector, context, root ) {
9669		var match, elem;
9670
9671		// HANDLE: $(""), $(null), $(undefined), $(false)
9672		if ( !selector ) {
9673			return this;
9674		}
9675
9676		// init accepts an alternate rootjQuery
9677		// so migrate can support jQuery.sub (gh-2101)
9678		root = root || rootjQuery;
9679
9680		// Handle HTML strings
9681		if ( typeof selector === "string" ) {
9682			if ( selector.charAt( 0 ) === "<" &&
9683				selector.charAt( selector.length - 1 ) === ">" &&
9684				selector.length >= 3 ) {
9685
9686				// Assume that strings that start and end with <> are HTML and skip the regex check
9687				match = [ null, selector, null ];
9688
9689			} else {
9690				match = rquickExpr.exec( selector );
9691			}
9692
9693			// Match html or make sure no context is specified for #id
9694			if ( match && ( match[ 1 ] || !context ) ) {
9695
9696				// HANDLE: $(html) -> $(array)
9697				if ( match[ 1 ] ) {
9698					context = context instanceof jQuery ? context[ 0 ] : context;
9699
9700					// scripts is true for back-compat
9701					// Intentionally let the error be thrown if parseHTML is not present
9702					jQuery.merge( this, jQuery.parseHTML(
9703						match[ 1 ],
9704						context && context.nodeType ? context.ownerDocument || context : document,
9705						true
9706					) );
9707
9708					// HANDLE: $(html, props)
9709					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
9710						for ( match in context ) {
9711
9712							// Properties of context are called as methods if possible
9713							if ( jQuery.isFunction( this[ match ] ) ) {
9714								this[ match ]( context[ match ] );
9715
9716							// ...and otherwise set as attributes
9717							} else {
9718								this.attr( match, context[ match ] );
9719							}
9720						}
9721					}
9722
9723					return this;
9724
9725				// HANDLE: $(#id)
9726				} else {
9727					elem = document.getElementById( match[ 2 ] );
9728
9729					// Check parentNode to catch when Blackberry 4.6 returns
9730					// nodes that are no longer in the document #6963
9731					if ( elem && elem.parentNode ) {
9732
9733						// Handle the case where IE and Opera return items
9734						// by name instead of ID
9735						if ( elem.id !== match[ 2 ] ) {
9736							return rootjQuery.find( selector );
9737						}
9738
9739						// Otherwise, we inject the element directly into the jQuery object
9740						this.length = 1;
9741						this[ 0 ] = elem;
9742					}
9743
9744					this.context = document;
9745					this.selector = selector;
9746					return this;
9747				}
9748
9749			// HANDLE: $(expr, $(...))
9750			} else if ( !context || context.jquery ) {
9751				return ( context || root ).find( selector );
9752
9753			// HANDLE: $(expr, context)
9754			// (which is just equivalent to: $(context).find(expr)
9755			} else {
9756				return this.constructor( context ).find( selector );
9757			}
9758
9759		// HANDLE: $(DOMElement)
9760		} else if ( selector.nodeType ) {
9761			this.context = this[ 0 ] = selector;
9762			this.length = 1;
9763			return this;
9764
9765		// HANDLE: $(function)
9766		// Shortcut for document ready
9767		} else if ( jQuery.isFunction( selector ) ) {
9768			return typeof root.ready !== "undefined" ?
9769				root.ready( selector ) :
9770
9771				// Execute immediately if ready is not present
9772				selector( jQuery );
9773		}
9774
9775		if ( selector.selector !== undefined ) {
9776			this.selector = selector.selector;
9777			this.context = selector.context;
9778		}
9779
9780		return jQuery.makeArray( selector, this );
9781	};
9782
9783// Give the init function the jQuery prototype for later instantiation
9784init.prototype = jQuery.fn;
9785
9786// Initialize central reference
9787rootjQuery = jQuery( document );
9788
9789
9790var rparentsprev = /^(?:parents|prev(?:Until|All))/,
9791
9792	// methods guaranteed to produce a unique set when starting from a unique set
9793	guaranteedUnique = {
9794		children: true,
9795		contents: true,
9796		next: true,
9797		prev: true
9798	};
9799
9800jQuery.fn.extend( {
9801	has: function( target ) {
9802		var i,
9803			targets = jQuery( target, this ),
9804			len = targets.length;
9805
9806		return this.filter( function() {
9807			for ( i = 0; i < len; i++ ) {
9808				if ( jQuery.contains( this, targets[ i ] ) ) {
9809					return true;
9810				}
9811			}
9812		} );
9813	},
9814
9815	closest: function( selectors, context ) {
9816		var cur,
9817			i = 0,
9818			l = this.length,
9819			matched = [],
9820			pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
9821				jQuery( selectors, context || this.context ) :
9822				0;
9823
9824		for ( ; i < l; i++ ) {
9825			for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
9826
9827				// Always skip document fragments
9828				if ( cur.nodeType < 11 && ( pos ?
9829					pos.index( cur ) > -1 :
9830
9831					// Don't pass non-elements to Sizzle
9832					cur.nodeType === 1 &&
9833						jQuery.find.matchesSelector( cur, selectors ) ) ) {
9834
9835					matched.push( cur );
9836					break;
9837				}
9838			}
9839		}
9840
9841		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
9842	},
9843
9844	// Determine the position of an element within
9845	// the matched set of elements
9846	index: function( elem ) {
9847
9848		// No argument, return index in parent
9849		if ( !elem ) {
9850			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
9851		}
9852
9853		// index in selector
9854		if ( typeof elem === "string" ) {
9855			return jQuery.inArray( this[ 0 ], jQuery( elem ) );
9856		}
9857
9858		// Locate the position of the desired element
9859		return jQuery.inArray(
9860
9861			// If it receives a jQuery object, the first element is used
9862			elem.jquery ? elem[ 0 ] : elem, this );
9863	},
9864
9865	add: function( selector, context ) {
9866		return this.pushStack(
9867			jQuery.uniqueSort(
9868				jQuery.merge( this.get(), jQuery( selector, context ) )
9869			)
9870		);
9871	},
9872
9873	addBack: function( selector ) {
9874		return this.add( selector == null ?
9875			this.prevObject : this.prevObject.filter( selector )
9876		);
9877	}
9878} );
9879
9880function sibling( cur, dir ) {
9881	do {
9882		cur = cur[ dir ];
9883	} while ( cur && cur.nodeType !== 1 );
9884
9885	return cur;
9886}
9887
9888jQuery.each( {
9889	parent: function( elem ) {
9890		var parent = elem.parentNode;
9891		return parent && parent.nodeType !== 11 ? parent : null;
9892	},
9893	parents: function( elem ) {
9894		return dir( elem, "parentNode" );
9895	},
9896	parentsUntil: function( elem, i, until ) {
9897		return dir( elem, "parentNode", until );
9898	},
9899	next: function( elem ) {
9900		return sibling( elem, "nextSibling" );
9901	},
9902	prev: function( elem ) {
9903		return sibling( elem, "previousSibling" );
9904	},
9905	nextAll: function( elem ) {
9906		return dir( elem, "nextSibling" );
9907	},
9908	prevAll: function( elem ) {
9909		return dir( elem, "previousSibling" );
9910	},
9911	nextUntil: function( elem, i, until ) {
9912		return dir( elem, "nextSibling", until );
9913	},
9914	prevUntil: function( elem, i, until ) {
9915		return dir( elem, "previousSibling", until );
9916	},
9917	siblings: function( elem ) {
9918		return siblings( ( elem.parentNode || {} ).firstChild, elem );
9919	},
9920	children: function( elem ) {
9921		return siblings( elem.firstChild );
9922	},
9923	contents: function( elem ) {
9924		return jQuery.nodeName( elem, "iframe" ) ?
9925			elem.contentDocument || elem.contentWindow.document :
9926			jQuery.merge( [], elem.childNodes );
9927	}
9928}, function( name, fn ) {
9929	jQuery.fn[ name ] = function( until, selector ) {
9930		var ret = jQuery.map( this, fn, until );
9931
9932		if ( name.slice( -5 ) !== "Until" ) {
9933			selector = until;
9934		}
9935
9936		if ( selector && typeof selector === "string" ) {
9937			ret = jQuery.filter( selector, ret );
9938		}
9939
9940		if ( this.length > 1 ) {
9941
9942			// Remove duplicates
9943			if ( !guaranteedUnique[ name ] ) {
9944				ret = jQuery.uniqueSort( ret );
9945			}
9946
9947			// Reverse order for parents* and prev-derivatives
9948			if ( rparentsprev.test( name ) ) {
9949				ret = ret.reverse();
9950			}
9951		}
9952
9953		return this.pushStack( ret );
9954	};
9955} );
9956var rnotwhite = ( /\S+/g );
9957
9958
9959
9960// Convert String-formatted options into Object-formatted ones
9961function createOptions( options ) {
9962	var object = {};
9963	jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
9964		object[ flag ] = true;
9965	} );
9966	return object;
9967}
9968
9969/*
9970 * Create a callback list using the following parameters:
9971 *
9972 *	options: an optional list of space-separated options that will change how
9973 *			the callback list behaves or a more traditional option object
9974 *
9975 * By default a callback list will act like an event callback list and can be
9976 * "fired" multiple times.
9977 *
9978 * Possible options:
9979 *
9980 *	once:			will ensure the callback list can only be fired once (like a Deferred)
9981 *
9982 *	memory:			will keep track of previous values and will call any callback added
9983 *					after the list has been fired right away with the latest "memorized"
9984 *					values (like a Deferred)
9985 *
9986 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
9987 *
9988 *	stopOnFalse:	interrupt callings when a callback returns false
9989 *
9990 */
9991jQuery.Callbacks = function( options ) {
9992
9993	// Convert options from String-formatted to Object-formatted if needed
9994	// (we check in cache first)
9995	options = typeof options === "string" ?
9996		createOptions( options ) :
9997		jQuery.extend( {}, options );
9998
9999	var // Flag to know if list is currently firing
10000		firing,
10001
10002		// Last fire value for non-forgettable lists
10003		memory,
10004
10005		// Flag to know if list was already fired
10006		fired,
10007
10008		// Flag to prevent firing
10009		locked,
10010
10011		// Actual callback list
10012		list = [],
10013
10014		// Queue of execution data for repeatable lists
10015		queue = [],
10016
10017		// Index of currently firing callback (modified by add/remove as needed)
10018		firingIndex = -1,
10019
10020		// Fire callbacks
10021		fire = function() {
10022
10023			// Enforce single-firing
10024			locked = options.once;
10025
10026			// Execute callbacks for all pending executions,
10027			// respecting firingIndex overrides and runtime changes
10028			fired = firing = true;
10029			for ( ; queue.length; firingIndex = -1 ) {
10030				memory = queue.shift();
10031				while ( ++firingIndex < list.length ) {
10032
10033					// Run callback and check for early termination
10034					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
10035						options.stopOnFalse ) {
10036
10037						// Jump to end and forget the data so .add doesn't re-fire
10038						firingIndex = list.length;
10039						memory = false;
10040					}
10041				}
10042			}
10043
10044			// Forget the data if we're done with it
10045			if ( !options.memory ) {
10046				memory = false;
10047			}
10048
10049			firing = false;
10050
10051			// Clean up if we're done firing for good
10052			if ( locked ) {
10053
10054				// Keep an empty list if we have data for future add calls
10055				if ( memory ) {
10056					list = [];
10057
10058				// Otherwise, this object is spent
10059				} else {
10060					list = "";
10061				}
10062			}
10063		},
10064
10065		// Actual Callbacks object
10066		self = {
10067
10068			// Add a callback or a collection of callbacks to the list
10069			add: function() {
10070				if ( list ) {
10071
10072					// If we have memory from a past run, we should fire after adding
10073					if ( memory && !firing ) {
10074						firingIndex = list.length - 1;
10075						queue.push( memory );
10076					}
10077
10078					( function add( args ) {
10079						jQuery.each( args, function( _, arg ) {
10080							if ( jQuery.isFunction( arg ) ) {
10081								if ( !options.unique || !self.has( arg ) ) {
10082									list.push( arg );
10083								}
10084							} else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
10085
10086								// Inspect recursively
10087								add( arg );
10088							}
10089						} );
10090					} )( arguments );
10091
10092					if ( memory && !firing ) {
10093						fire();
10094					}
10095				}
10096				return this;
10097			},
10098
10099			// Remove a callback from the list
10100			remove: function() {
10101				jQuery.each( arguments, function( _, arg ) {
10102					var index;
10103					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
10104						list.splice( index, 1 );
10105
10106						// Handle firing indexes
10107						if ( index <= firingIndex ) {
10108							firingIndex--;
10109						}
10110					}
10111				} );
10112				return this;
10113			},
10114
10115			// Check if a given callback is in the list.
10116			// If no argument is given, return whether or not list has callbacks attached.
10117			has: function( fn ) {
10118				return fn ?
10119					jQuery.inArray( fn, list ) > -1 :
10120					list.length > 0;
10121			},
10122
10123			// Remove all callbacks from the list
10124			empty: function() {
10125				if ( list ) {
10126					list = [];
10127				}
10128				return this;
10129			},
10130
10131			// Disable .fire and .add
10132			// Abort any current/pending executions
10133			// Clear all callbacks and values
10134			disable: function() {
10135				locked = queue = [];
10136				list = memory = "";
10137				return this;
10138			},
10139			disabled: function() {
10140				return !list;
10141			},
10142
10143			// Disable .fire
10144			// Also disable .add unless we have memory (since it would have no effect)
10145			// Abort any pending executions
10146			lock: function() {
10147				locked = true;
10148				if ( !memory ) {
10149					self.disable();
10150				}
10151				return this;
10152			},
10153			locked: function() {
10154				return !!locked;
10155			},
10156
10157			// Call all callbacks with the given context and arguments
10158			fireWith: function( context, args ) {
10159				if ( !locked ) {
10160					args = args || [];
10161					args = [ context, args.slice ? args.slice() : args ];
10162					queue.push( args );
10163					if ( !firing ) {
10164						fire();
10165					}
10166				}
10167				return this;
10168			},
10169
10170			// Call all the callbacks with the given arguments
10171			fire: function() {
10172				self.fireWith( this, arguments );
10173				return this;
10174			},
10175
10176			// To know if the callbacks have already been called at least once
10177			fired: function() {
10178				return !!fired;
10179			}
10180		};
10181
10182	return self;
10183};
10184
10185
10186jQuery.extend( {
10187
10188	Deferred: function( func ) {
10189		var tuples = [
10190
10191				// action, add listener, listener list, final state
10192				[ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
10193				[ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
10194				[ "notify", "progress", jQuery.Callbacks( "memory" ) ]
10195			],
10196			state = "pending",
10197			promise = {
10198				state: function() {
10199					return state;
10200				},
10201				always: function() {
10202					deferred.done( arguments ).fail( arguments );
10203					return this;
10204				},
10205				then: function( /* fnDone, fnFail, fnProgress */ ) {
10206					var fns = arguments;
10207					return jQuery.Deferred( function( newDefer ) {
10208						jQuery.each( tuples, function( i, tuple ) {
10209							var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
10210
10211							// deferred[ done | fail | progress ] for forwarding actions to newDefer
10212							deferred[ tuple[ 1 ] ]( function() {
10213								var returned = fn && fn.apply( this, arguments );
10214								if ( returned && jQuery.isFunction( returned.promise ) ) {
10215									returned.promise()
10216										.progress( newDefer.notify )
10217										.done( newDefer.resolve )
10218										.fail( newDefer.reject );
10219								} else {
10220									newDefer[ tuple[ 0 ] + "With" ](
10221										this === promise ? newDefer.promise() : this,
10222										fn ? [ returned ] : arguments
10223									);
10224								}
10225							} );
10226						} );
10227						fns = null;
10228					} ).promise();
10229				},
10230
10231				// Get a promise for this deferred
10232				// If obj is provided, the promise aspect is added to the object
10233				promise: function( obj ) {
10234					return obj != null ? jQuery.extend( obj, promise ) : promise;
10235				}
10236			},
10237			deferred = {};
10238
10239		// Keep pipe for back-compat
10240		promise.pipe = promise.then;
10241
10242		// Add list-specific methods
10243		jQuery.each( tuples, function( i, tuple ) {
10244			var list = tuple[ 2 ],
10245				stateString = tuple[ 3 ];
10246
10247			// promise[ done | fail | progress ] = list.add
10248			promise[ tuple[ 1 ] ] = list.add;
10249
10250			// Handle state
10251			if ( stateString ) {
10252				list.add( function() {
10253
10254					// state = [ resolved | rejected ]
10255					state = stateString;
10256
10257				// [ reject_list | resolve_list ].disable; progress_list.lock
10258				}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
10259			}
10260
10261			// deferred[ resolve | reject | notify ]
10262			deferred[ tuple[ 0 ] ] = function() {
10263				deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
10264				return this;
10265			};
10266			deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
10267		} );
10268
10269		// Make the deferred a promise
10270		promise.promise( deferred );
10271
10272		// Call given func if any
10273		if ( func ) {
10274			func.call( deferred, deferred );
10275		}
10276
10277		// All done!
10278		return deferred;
10279	},
10280
10281	// Deferred helper
10282	when: function( subordinate /* , ..., subordinateN */ ) {
10283		var i = 0,
10284			resolveValues = slice.call( arguments ),
10285			length = resolveValues.length,
10286
10287			// the count of uncompleted subordinates
10288			remaining = length !== 1 ||
10289				( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
10290
10291			// the master Deferred.
10292			// If resolveValues consist of only a single Deferred, just use that.
10293			deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
10294
10295			// Update function for both resolve and progress values
10296			updateFunc = function( i, contexts, values ) {
10297				return function( value ) {
10298					contexts[ i ] = this;
10299					values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
10300					if ( values === progressValues ) {
10301						deferred.notifyWith( contexts, values );
10302
10303					} else if ( !( --remaining ) ) {
10304						deferred.resolveWith( contexts, values );
10305					}
10306				};
10307			},
10308
10309			progressValues, progressContexts, resolveContexts;
10310
10311		// add listeners to Deferred subordinates; treat others as resolved
10312		if ( length > 1 ) {
10313			progressValues = new Array( length );
10314			progressContexts = new Array( length );
10315			resolveContexts = new Array( length );
10316			for ( ; i < length; i++ ) {
10317				if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
10318					resolveValues[ i ].promise()
10319						.progress( updateFunc( i, progressContexts, progressValues ) )
10320						.done( updateFunc( i, resolveContexts, resolveValues ) )
10321						.fail( deferred.reject );
10322				} else {
10323					--remaining;
10324				}
10325			}
10326		}
10327
10328		// if we're not waiting on anything, resolve the master
10329		if ( !remaining ) {
10330			deferred.resolveWith( resolveContexts, resolveValues );
10331		}
10332
10333		return deferred.promise();
10334	}
10335} );
10336
10337
10338// The deferred used on DOM ready
10339var readyList;
10340
10341jQuery.fn.ready = function( fn ) {
10342
10343	// Add the callback
10344	jQuery.ready.promise().done( fn );
10345
10346	return this;
10347};
10348
10349jQuery.extend( {
10350
10351	// Is the DOM ready to be used? Set to true once it occurs.
10352	isReady: false,
10353
10354	// A counter to track how many items to wait for before
10355	// the ready event fires. See #6781
10356	readyWait: 1,
10357
10358	// Hold (or release) the ready event
10359	holdReady: function( hold ) {
10360		if ( hold ) {
10361			jQuery.readyWait++;
10362		} else {
10363			jQuery.ready( true );
10364		}
10365	},
10366
10367	// Handle when the DOM is ready
10368	ready: function( wait ) {
10369
10370		// Abort if there are pending holds or we're already ready
10371		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
10372			return;
10373		}
10374
10375		// Remember that the DOM is ready
10376		jQuery.isReady = true;
10377
10378		// If a normal DOM Ready event fired, decrement, and wait if need be
10379		if ( wait !== true && --jQuery.readyWait > 0 ) {
10380			return;
10381		}
10382
10383		// If there are functions bound, to execute
10384		readyList.resolveWith( document, [ jQuery ] );
10385
10386		// Trigger any bound ready events
10387		if ( jQuery.fn.triggerHandler ) {
10388			jQuery( document ).triggerHandler( "ready" );
10389			jQuery( document ).off( "ready" );
10390		}
10391	}
10392} );
10393
10394/**
10395 * Clean-up method for dom ready events
10396 */
10397function detach() {
10398	if ( document.addEventListener ) {
10399		document.removeEventListener( "DOMContentLoaded", completed );
10400		window.removeEventListener( "load", completed );
10401
10402	} else {
10403		document.detachEvent( "onreadystatechange", completed );
10404		window.detachEvent( "onload", completed );
10405	}
10406}
10407
10408/**
10409 * The ready event handler and self cleanup method
10410 */
10411function completed() {
10412
10413	// readyState === "complete" is good enough for us to call the dom ready in oldIE
10414	if ( document.addEventListener ||
10415		window.event.type === "load" ||
10416		document.readyState === "complete" ) {
10417
10418		detach();
10419		jQuery.ready();
10420	}
10421}
10422
10423jQuery.ready.promise = function( obj ) {
10424	if ( !readyList ) {
10425
10426		readyList = jQuery.Deferred();
10427
10428		// Catch cases where $(document).ready() is called
10429		// after the browser event has already occurred.
10430		// Support: IE6-10
10431		// Older IE sometimes signals "interactive" too soon
10432		if ( document.readyState === "complete" ||
10433			( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
10434
10435			// Handle it asynchronously to allow scripts the opportunity to delay ready
10436			window.setTimeout( jQuery.ready );
10437
10438		// Standards-based browsers support DOMContentLoaded
10439		} else if ( document.addEventListener ) {
10440
10441			// Use the handy event callback
10442			document.addEventListener( "DOMContentLoaded", completed );
10443
10444			// A fallback to window.onload, that will always work
10445			window.addEventListener( "load", completed );
10446
10447		// If IE event model is used
10448		} else {
10449
10450			// Ensure firing before onload, maybe late but safe also for iframes
10451			document.attachEvent( "onreadystatechange", completed );
10452
10453			// A fallback to window.onload, that will always work
10454			window.attachEvent( "onload", completed );
10455
10456			// If IE and not a frame
10457			// continually check to see if the document is ready
10458			var top = false;
10459
10460			try {
10461				top = window.frameElement == null && document.documentElement;
10462			} catch ( e ) {}
10463
10464			if ( top && top.doScroll ) {
10465				( function doScrollCheck() {
10466					if ( !jQuery.isReady ) {
10467
10468						try {
10469
10470							// Use the trick by Diego Perini
10471							// http://javascript.nwbox.com/IEContentLoaded/
10472							top.doScroll( "left" );
10473						} catch ( e ) {
10474							return window.setTimeout( doScrollCheck, 50 );
10475						}
10476
10477						// detach all dom ready events
10478						detach();
10479
10480						// and execute any waiting functions
10481						jQuery.ready();
10482					}
10483				} )();
10484			}
10485		}
10486	}
10487	return readyList.promise( obj );
10488};
10489
10490// Kick off the DOM ready check even if the user does not
10491jQuery.ready.promise();
10492
10493
10494
10495
10496// Support: IE<9
10497// Iteration over object's inherited properties before its own
10498var i;
10499for ( i in jQuery( support ) ) {
10500	break;
10501}
10502support.ownFirst = i === "0";
10503
10504// Note: most support tests are defined in their respective modules.
10505// false until the test is run
10506support.inlineBlockNeedsLayout = false;
10507
10508// Execute ASAP in case we need to set body.style.zoom
10509jQuery( function() {
10510
10511	// Minified: var a,b,c,d
10512	var val, div, body, container;
10513
10514	body = document.getElementsByTagName( "body" )[ 0 ];
10515	if ( !body || !body.style ) {
10516
10517		// Return for frameset docs that don't have a body
10518		return;
10519	}
10520
10521	// Setup
10522	div = document.createElement( "div" );
10523	container = document.createElement( "div" );
10524	container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
10525	body.appendChild( container ).appendChild( div );
10526
10527	if ( typeof div.style.zoom !== "undefined" ) {
10528
10529		// Support: IE<8
10530		// Check if natively block-level elements act like inline-block
10531		// elements when setting their display to 'inline' and giving
10532		// them layout
10533		div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
10534
10535		support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
10536		if ( val ) {
10537
10538			// Prevent IE 6 from affecting layout for positioned elements #11048
10539			// Prevent IE from shrinking the body in IE 7 mode #12869
10540			// Support: IE<8
10541			body.style.zoom = 1;
10542		}
10543	}
10544
10545	body.removeChild( container );
10546} );
10547
10548
10549( function() {
10550	var div = document.createElement( "div" );
10551
10552	// Support: IE<9
10553	support.deleteExpando = true;
10554	try {
10555		delete div.test;
10556	} catch ( e ) {
10557		support.deleteExpando = false;
10558	}
10559
10560	// Null elements to avoid leaks in IE.
10561	div = null;
10562} )();
10563var acceptData = function( elem ) {
10564	var noData = jQuery.noData[ ( elem.nodeName + " " ).toLowerCase() ],
10565		nodeType = +elem.nodeType || 1;
10566
10567	// Do not set data on non-element DOM nodes because it will not be cleared (#8335).
10568	return nodeType !== 1 && nodeType !== 9 ?
10569		false :
10570
10571		// Nodes accept data unless otherwise specified; rejection can be conditional
10572		!noData || noData !== true && elem.getAttribute( "classid" ) === noData;
10573};
10574
10575
10576
10577
10578var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
10579	rmultiDash = /([A-Z])/g;
10580
10581function dataAttr( elem, key, data ) {
10582
10583	// If nothing was found internally, try to fetch any
10584	// data from the HTML5 data-* attribute
10585	if ( data === undefined && elem.nodeType === 1 ) {
10586
10587		var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
10588
10589		data = elem.getAttribute( name );
10590
10591		if ( typeof data === "string" ) {
10592			try {
10593				data = data === "true" ? true :
10594					data === "false" ? false :
10595					data === "null" ? null :
10596
10597					// Only convert to a number if it doesn't change the string
10598					+data + "" === data ? +data :
10599					rbrace.test( data ) ? jQuery.parseJSON( data ) :
10600					data;
10601			} catch ( e ) {}
10602
10603			// Make sure we set the data so it isn't changed later
10604			jQuery.data( elem, key, data );
10605
10606		} else {
10607			data = undefined;
10608		}
10609	}
10610
10611	return data;
10612}
10613
10614// checks a cache object for emptiness
10615function isEmptyDataObject( obj ) {
10616	var name;
10617	for ( name in obj ) {
10618
10619		// if the public data object is empty, the private is still empty
10620		if ( name === "data" && jQuery.isEmptyObject( obj[ name ] ) ) {
10621			continue;
10622		}
10623		if ( name !== "toJSON" ) {
10624			return false;
10625		}
10626	}
10627
10628	return true;
10629}
10630
10631function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
10632	if ( !acceptData( elem ) ) {
10633		return;
10634	}
10635
10636	var ret, thisCache,
10637		internalKey = jQuery.expando,
10638
10639		// We have to handle DOM nodes and JS objects differently because IE6-7
10640		// can't GC object references properly across the DOM-JS boundary
10641		isNode = elem.nodeType,
10642
10643		// Only DOM nodes need the global jQuery cache; JS object data is
10644		// attached directly to the object so GC can occur automatically
10645		cache = isNode ? jQuery.cache : elem,
10646
10647		// Only defining an ID for JS objects if its cache already exists allows
10648		// the code to shortcut on the same path as a DOM node with no cache
10649		id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
10650
10651	// Avoid doing any more work than we need to when trying to get data on an
10652	// object that has no data at all
10653	if ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&
10654		data === undefined && typeof name === "string" ) {
10655		return;
10656	}
10657
10658	if ( !id ) {
10659
10660		// Only DOM nodes need a new unique ID for each element since their data
10661		// ends up in the global cache
10662		if ( isNode ) {
10663			id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;
10664		} else {
10665			id = internalKey;
10666		}
10667	}
10668
10669	if ( !cache[ id ] ) {
10670
10671		// Avoid exposing jQuery metadata on plain JS objects when the object
10672		// is serialized using JSON.stringify
10673		cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
10674	}
10675
10676	// An object can be passed to jQuery.data instead of a key/value pair; this gets
10677	// shallow copied over onto the existing cache
10678	if ( typeof name === "object" || typeof name === "function" ) {
10679		if ( pvt ) {
10680			cache[ id ] = jQuery.extend( cache[ id ], name );
10681		} else {
10682			cache[ id ].data = jQuery.extend( cache[ id ].data, name );
10683		}
10684	}
10685
10686	thisCache = cache[ id ];
10687
10688	// jQuery data() is stored in a separate object inside the object's internal data
10689	// cache in order to avoid key collisions between internal data and user-defined
10690	// data.
10691	if ( !pvt ) {
10692		if ( !thisCache.data ) {
10693			thisCache.data = {};
10694		}
10695
10696		thisCache = thisCache.data;
10697	}
10698
10699	if ( data !== undefined ) {
10700		thisCache[ jQuery.camelCase( name ) ] = data;
10701	}
10702
10703	// Check for both converted-to-camel and non-converted data property names
10704	// If a data property was specified
10705	if ( typeof name === "string" ) {
10706
10707		// First Try to find as-is property data
10708		ret = thisCache[ name ];
10709
10710		// Test for null|undefined property data
10711		if ( ret == null ) {
10712
10713			// Try to find the camelCased property
10714			ret = thisCache[ jQuery.camelCase( name ) ];
10715		}
10716	} else {
10717		ret = thisCache;
10718	}
10719
10720	return ret;
10721}
10722
10723function internalRemoveData( elem, name, pvt ) {
10724	if ( !acceptData( elem ) ) {
10725		return;
10726	}
10727
10728	var thisCache, i,
10729		isNode = elem.nodeType,
10730
10731		// See jQuery.data for more information
10732		cache = isNode ? jQuery.cache : elem,
10733		id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
10734
10735	// If there is already no cache entry for this object, there is no
10736	// purpose in continuing
10737	if ( !cache[ id ] ) {
10738		return;
10739	}
10740
10741	if ( name ) {
10742
10743		thisCache = pvt ? cache[ id ] : cache[ id ].data;
10744
10745		if ( thisCache ) {
10746
10747			// Support array or space separated string names for data keys
10748			if ( !jQuery.isArray( name ) ) {
10749
10750				// try the string as a key before any manipulation
10751				if ( name in thisCache ) {
10752					name = [ name ];
10753				} else {
10754
10755					// split the camel cased version by spaces unless a key with the spaces exists
10756					name = jQuery.camelCase( name );
10757					if ( name in thisCache ) {
10758						name = [ name ];
10759					} else {
10760						name = name.split( " " );
10761					}
10762				}
10763			} else {
10764
10765				// If "name" is an array of keys...
10766				// When data is initially created, via ("key", "val") signature,
10767				// keys will be converted to camelCase.
10768				// Since there is no way to tell _how_ a key was added, remove
10769				// both plain key and camelCase key. #12786
10770				// This will only penalize the array argument path.
10771				name = name.concat( jQuery.map( name, jQuery.camelCase ) );
10772			}
10773
10774			i = name.length;
10775			while ( i-- ) {
10776				delete thisCache[ name[ i ] ];
10777			}
10778
10779			// If there is no data left in the cache, we want to continue
10780			// and let the cache object itself get destroyed
10781			if ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) {
10782				return;
10783			}
10784		}
10785	}
10786
10787	// See jQuery.data for more information
10788	if ( !pvt ) {
10789		delete cache[ id ].data;
10790
10791		// Don't destroy the parent cache unless the internal data object
10792		// had been the only thing left in it
10793		if ( !isEmptyDataObject( cache[ id ] ) ) {
10794			return;
10795		}
10796	}
10797
10798	// Destroy the cache
10799	if ( isNode ) {
10800		jQuery.cleanData( [ elem ], true );
10801
10802	// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
10803	/* jshint eqeqeq: false */
10804	} else if ( support.deleteExpando || cache != cache.window ) {
10805		/* jshint eqeqeq: true */
10806		delete cache[ id ];
10807
10808	// When all else fails, undefined
10809	} else {
10810		cache[ id ] = undefined;
10811	}
10812}
10813
10814jQuery.extend( {
10815	cache: {},
10816
10817	// The following elements (space-suffixed to avoid Object.prototype collisions)
10818	// throw uncatchable exceptions if you attempt to set expando properties
10819	noData: {
10820		"applet ": true,
10821		"embed ": true,
10822
10823		// ...but Flash objects (which have this classid) *can* handle expandos
10824		"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
10825	},
10826
10827	hasData: function( elem ) {
10828		elem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ];
10829		return !!elem && !isEmptyDataObject( elem );
10830	},
10831
10832	data: function( elem, name, data ) {
10833		return internalData( elem, name, data );
10834	},
10835
10836	removeData: function( elem, name ) {
10837		return internalRemoveData( elem, name );
10838	},
10839
10840	// For internal use only.
10841	_data: function( elem, name, data ) {
10842		return internalData( elem, name, data, true );
10843	},
10844
10845	_removeData: function( elem, name ) {
10846		return internalRemoveData( elem, name, true );
10847	}
10848} );
10849
10850jQuery.fn.extend( {
10851	data: function( key, value ) {
10852		var i, name, data,
10853			elem = this[ 0 ],
10854			attrs = elem && elem.attributes;
10855
10856		// Special expections of .data basically thwart jQuery.access,
10857		// so implement the relevant behavior ourselves
10858
10859		// Gets all values
10860		if ( key === undefined ) {
10861			if ( this.length ) {
10862				data = jQuery.data( elem );
10863
10864				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
10865					i = attrs.length;
10866					while ( i-- ) {
10867
10868						// Support: IE11+
10869						// The attrs elements can be null (#14894)
10870						if ( attrs[ i ] ) {
10871							name = attrs[ i ].name;
10872							if ( name.indexOf( "data-" ) === 0 ) {
10873								name = jQuery.camelCase( name.slice( 5 ) );
10874								dataAttr( elem, name, data[ name ] );
10875							}
10876						}
10877					}
10878					jQuery._data( elem, "parsedAttrs", true );
10879				}
10880			}
10881
10882			return data;
10883		}
10884
10885		// Sets multiple values
10886		if ( typeof key === "object" ) {
10887			return this.each( function() {
10888				jQuery.data( this, key );
10889			} );
10890		}
10891
10892		return arguments.length > 1 ?
10893
10894			// Sets one value
10895			this.each( function() {
10896				jQuery.data( this, key, value );
10897			} ) :
10898
10899			// Gets one value
10900			// Try to fetch any internally stored data first
10901			elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;
10902	},
10903
10904	removeData: function( key ) {
10905		return this.each( function() {
10906			jQuery.removeData( this, key );
10907		} );
10908	}
10909} );
10910
10911
10912jQuery.extend( {
10913	queue: function( elem, type, data ) {
10914		var queue;
10915
10916		if ( elem ) {
10917			type = ( type || "fx" ) + "queue";
10918			queue = jQuery._data( elem, type );
10919
10920			// Speed up dequeue by getting out quickly if this is just a lookup
10921			if ( data ) {
10922				if ( !queue || jQuery.isArray( data ) ) {
10923					queue = jQuery._data( elem, type, jQuery.makeArray( data ) );
10924				} else {
10925					queue.push( data );
10926				}
10927			}
10928			return queue || [];
10929		}
10930	},
10931
10932	dequeue: function( elem, type ) {
10933		type = type || "fx";
10934
10935		var queue = jQuery.queue( elem, type ),
10936			startLength = queue.length,
10937			fn = queue.shift(),
10938			hooks = jQuery._queueHooks( elem, type ),
10939			next = function() {
10940				jQuery.dequeue( elem, type );
10941			};
10942
10943		// If the fx queue is dequeued, always remove the progress sentinel
10944		if ( fn === "inprogress" ) {
10945			fn = queue.shift();
10946			startLength--;
10947		}
10948
10949		if ( fn ) {
10950
10951			// Add a progress sentinel to prevent the fx queue from being
10952			// automatically dequeued
10953			if ( type === "fx" ) {
10954				queue.unshift( "inprogress" );
10955			}
10956
10957			// clear up the last queue stop function
10958			delete hooks.stop;
10959			fn.call( elem, next, hooks );
10960		}
10961
10962		if ( !startLength && hooks ) {
10963			hooks.empty.fire();
10964		}
10965	},
10966
10967	// not intended for public consumption - generates a queueHooks object,
10968	// or returns the current one
10969	_queueHooks: function( elem, type ) {
10970		var key = type + "queueHooks";
10971		return jQuery._data( elem, key ) || jQuery._data( elem, key, {
10972			empty: jQuery.Callbacks( "once memory" ).add( function() {
10973				jQuery._removeData( elem, type + "queue" );
10974				jQuery._removeData( elem, key );
10975			} )
10976		} );
10977	}
10978} );
10979
10980jQuery.fn.extend( {
10981	queue: function( type, data ) {
10982		var setter = 2;
10983
10984		if ( typeof type !== "string" ) {
10985			data = type;
10986			type = "fx";
10987			setter--;
10988		}
10989
10990		if ( arguments.length < setter ) {
10991			return jQuery.queue( this[ 0 ], type );
10992		}
10993
10994		return data === undefined ?
10995			this :
10996			this.each( function() {
10997				var queue = jQuery.queue( this, type, data );
10998
10999				// ensure a hooks for this queue
11000				jQuery._queueHooks( this, type );
11001
11002				if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
11003					jQuery.dequeue( this, type );
11004				}
11005			} );
11006	},
11007	dequeue: function( type ) {
11008		return this.each( function() {
11009			jQuery.dequeue( this, type );
11010		} );
11011	},
11012	clearQueue: function( type ) {
11013		return this.queue( type || "fx", [] );
11014	},
11015
11016	// Get a promise resolved when queues of a certain type
11017	// are emptied (fx is the type by default)
11018	promise: function( type, obj ) {
11019		var tmp,
11020			count = 1,
11021			defer = jQuery.Deferred(),
11022			elements = this,
11023			i = this.length,
11024			resolve = function() {
11025				if ( !( --count ) ) {
11026					defer.resolveWith( elements, [ elements ] );
11027				}
11028			};
11029
11030		if ( typeof type !== "string" ) {
11031			obj = type;
11032			type = undefined;
11033		}
11034		type = type || "fx";
11035
11036		while ( i-- ) {
11037			tmp = jQuery._data( elements[ i ], type + "queueHooks" );
11038			if ( tmp && tmp.empty ) {
11039				count++;
11040				tmp.empty.add( resolve );
11041			}
11042		}
11043		resolve();
11044		return defer.promise( obj );
11045	}
11046} );
11047
11048
11049( function() {
11050	var shrinkWrapBlocksVal;
11051
11052	support.shrinkWrapBlocks = function() {
11053		if ( shrinkWrapBlocksVal != null ) {
11054			return shrinkWrapBlocksVal;
11055		}
11056
11057		// Will be changed later if needed.
11058		shrinkWrapBlocksVal = false;
11059
11060		// Minified: var b,c,d
11061		var div, body, container;
11062
11063		body = document.getElementsByTagName( "body" )[ 0 ];
11064		if ( !body || !body.style ) {
11065
11066			// Test fired too early or in an unsupported environment, exit.
11067			return;
11068		}
11069
11070		// Setup
11071		div = document.createElement( "div" );
11072		container = document.createElement( "div" );
11073		container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
11074		body.appendChild( container ).appendChild( div );
11075
11076		// Support: IE6
11077		// Check if elements with layout shrink-wrap their children
11078		if ( typeof div.style.zoom !== "undefined" ) {
11079
11080			// Reset CSS: box-sizing; display; margin; border
11081			div.style.cssText =
11082
11083				// Support: Firefox<29, Android 2.3
11084				// Vendor-prefix box-sizing
11085				"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
11086				"box-sizing:content-box;display:block;margin:0;border:0;" +
11087				"padding:1px;width:1px;zoom:1";
11088			div.appendChild( document.createElement( "div" ) ).style.width = "5px";
11089			shrinkWrapBlocksVal = div.offsetWidth !== 3;
11090		}
11091
11092		body.removeChild( container );
11093
11094		return shrinkWrapBlocksVal;
11095	};
11096
11097} )();
11098var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
11099
11100var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
11101
11102
11103var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
11104
11105var isHidden = function( elem, el ) {
11106
11107		// isHidden might be called from jQuery#filter function;
11108		// in that case, element will be second argument
11109		elem = el || elem;
11110		return jQuery.css( elem, "display" ) === "none" ||
11111			!jQuery.contains( elem.ownerDocument, elem );
11112	};
11113
11114
11115
11116function adjustCSS( elem, prop, valueParts, tween ) {
11117	var adjusted,
11118		scale = 1,
11119		maxIterations = 20,
11120		currentValue = tween ?
11121			function() { return tween.cur(); } :
11122			function() { return jQuery.css( elem, prop, "" ); },
11123		initial = currentValue(),
11124		unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
11125
11126		// Starting value computation is required for potential unit mismatches
11127		initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
11128			rcssNum.exec( jQuery.css( elem, prop ) );
11129
11130	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
11131
11132		// Trust units reported by jQuery.css
11133		unit = unit || initialInUnit[ 3 ];
11134
11135		// Make sure we update the tween properties later on
11136		valueParts = valueParts || [];
11137
11138		// Iteratively approximate from a nonzero starting point
11139		initialInUnit = +initial || 1;
11140
11141		do {
11142
11143			// If previous iteration zeroed out, double until we get *something*.
11144			// Use string for doubling so we don't accidentally see scale as unchanged below
11145			scale = scale || ".5";
11146
11147			// Adjust and apply
11148			initialInUnit = initialInUnit / scale;
11149			jQuery.style( elem, prop, initialInUnit + unit );
11150
11151		// Update scale, tolerating zero or NaN from tween.cur()
11152		// Break the loop if scale is unchanged or perfect, or if we've just had enough.
11153		} while (
11154			scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
11155		);
11156	}
11157
11158	if ( valueParts ) {
11159		initialInUnit = +initialInUnit || +initial || 0;
11160
11161		// Apply relative offset (+=/-=) if specified
11162		adjusted = valueParts[ 1 ] ?
11163			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
11164			+valueParts[ 2 ];
11165		if ( tween ) {
11166			tween.unit = unit;
11167			tween.start = initialInUnit;
11168			tween.end = adjusted;
11169		}
11170	}
11171	return adjusted;
11172}
11173
11174
11175// Multifunctional method to get and set values of a collection
11176// The value/s can optionally be executed if it's a function
11177var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
11178	var i = 0,
11179		length = elems.length,
11180		bulk = key == null;
11181
11182	// Sets many values
11183	if ( jQuery.type( key ) === "object" ) {
11184		chainable = true;
11185		for ( i in key ) {
11186			access( elems, fn, i, key[ i ], true, emptyGet, raw );
11187		}
11188
11189	// Sets one value
11190	} else if ( value !== undefined ) {
11191		chainable = true;
11192
11193		if ( !jQuery.isFunction( value ) ) {
11194			raw = true;
11195		}
11196
11197		if ( bulk ) {
11198
11199			// Bulk operations run against the entire set
11200			if ( raw ) {
11201				fn.call( elems, value );
11202				fn = null;
11203
11204			// ...except when executing function values
11205			} else {
11206				bulk = fn;
11207				fn = function( elem, key, value ) {
11208					return bulk.call( jQuery( elem ), value );
11209				};
11210			}
11211		}
11212
11213		if ( fn ) {
11214			for ( ; i < length; i++ ) {
11215				fn(
11216					elems[ i ],
11217					key,
11218					raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) )
11219				);
11220			}
11221		}
11222	}
11223
11224	return chainable ?
11225		elems :
11226
11227		// Gets
11228		bulk ?
11229			fn.call( elems ) :
11230			length ? fn( elems[ 0 ], key ) : emptyGet;
11231};
11232var rcheckableType = ( /^(?:checkbox|radio)$/i );
11233
11234var rtagName = ( /<([\w:-]+)/ );
11235
11236var rscriptType = ( /^$|\/(?:java|ecma)script/i );
11237
11238var rleadingWhitespace = ( /^\s+/ );
11239
11240var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" +
11241		"details|dialog|figcaption|figure|footer|header|hgroup|main|" +
11242		"mark|meter|nav|output|picture|progress|section|summary|template|time|video";
11243
11244
11245
11246function createSafeFragment( document ) {
11247	var list = nodeNames.split( "|" ),
11248		safeFrag = document.createDocumentFragment();
11249
11250	if ( safeFrag.createElement ) {
11251		while ( list.length ) {
11252			safeFrag.createElement(
11253				list.pop()
11254			);
11255		}
11256	}
11257	return safeFrag;
11258}
11259
11260
11261( function() {
11262	var div = document.createElement( "div" ),
11263		fragment = document.createDocumentFragment(),
11264		input = document.createElement( "input" );
11265
11266	// Setup
11267	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
11268
11269	// IE strips leading whitespace when .innerHTML is used
11270	support.leadingWhitespace = div.firstChild.nodeType === 3;
11271
11272	// Make sure that tbody elements aren't automatically inserted
11273	// IE will insert them into empty tables
11274	support.tbody = !div.getElementsByTagName( "tbody" ).length;
11275
11276	// Make sure that link elements get serialized correctly by innerHTML
11277	// This requires a wrapper element in IE
11278	support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;
11279
11280	// Makes sure cloning an html5 element does not cause problems
11281	// Where outerHTML is undefined, this still works
11282	support.html5Clone =
11283		document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";
11284
11285	// Check if a disconnected checkbox will retain its checked
11286	// value of true after appended to the DOM (IE6/7)
11287	input.type = "checkbox";
11288	input.checked = true;
11289	fragment.appendChild( input );
11290	support.appendChecked = input.checked;
11291
11292	// Make sure textarea (and checkbox) defaultValue is properly cloned
11293	// Support: IE6-IE11+
11294	div.innerHTML = "<textarea>x</textarea>";
11295	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
11296
11297	// #11217 - WebKit loses check when the name is after the checked attribute
11298	fragment.appendChild( div );
11299
11300	// Support: Windows Web Apps (WWA)
11301	// `name` and `type` must use .setAttribute for WWA (#14901)
11302	input = document.createElement( "input" );
11303	input.setAttribute( "type", "radio" );
11304	input.setAttribute( "checked", "checked" );
11305	input.setAttribute( "name", "t" );
11306
11307	div.appendChild( input );
11308
11309	// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
11310	// old WebKit doesn't clone checked state correctly in fragments
11311	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
11312
11313	// Support: IE<9
11314	// Cloned elements keep attachEvent handlers, we use addEventListener on IE9+
11315	support.noCloneEvent = !!div.addEventListener;
11316
11317	// Support: IE<9
11318	// Since attributes and properties are the same in IE,
11319	// cleanData must set properties to undefined rather than use removeAttribute
11320	div[ jQuery.expando ] = 1;
11321	support.attributes = !div.getAttribute( jQuery.expando );
11322} )();
11323
11324
11325// We have to close these tags to support XHTML (#13200)
11326var wrapMap = {
11327	option: [ 1, "<select multiple='multiple'>", "</select>" ],
11328	legend: [ 1, "<fieldset>", "</fieldset>" ],
11329	area: [ 1, "<map>", "</map>" ],
11330
11331	// Support: IE8
11332	param: [ 1, "<object>", "</object>" ],
11333	thead: [ 1, "<table>", "</table>" ],
11334	tr: [ 2, "<table><tbody>", "</tbody></table>" ],
11335	col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
11336	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
11337
11338	// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
11339	// unless wrapped in a div with non-breaking characters in front of it.
11340	_default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
11341};
11342
11343// Support: IE8-IE9
11344wrapMap.optgroup = wrapMap.option;
11345
11346wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
11347wrapMap.th = wrapMap.td;
11348
11349
11350function getAll( context, tag ) {
11351	var elems, elem,
11352		i = 0,
11353		found = typeof context.getElementsByTagName !== "undefined" ?
11354			context.getElementsByTagName( tag || "*" ) :
11355			typeof context.querySelectorAll !== "undefined" ?
11356				context.querySelectorAll( tag || "*" ) :
11357				undefined;
11358
11359	if ( !found ) {
11360		for ( found = [], elems = context.childNodes || context;
11361			( elem = elems[ i ] ) != null;
11362			i++
11363		) {
11364			if ( !tag || jQuery.nodeName( elem, tag ) ) {
11365				found.push( elem );
11366			} else {
11367				jQuery.merge( found, getAll( elem, tag ) );
11368			}
11369		}
11370	}
11371
11372	return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
11373		jQuery.merge( [ context ], found ) :
11374		found;
11375}
11376
11377
11378// Mark scripts as having already been evaluated
11379function setGlobalEval( elems, refElements ) {
11380	var elem,
11381		i = 0;
11382	for ( ; ( elem = elems[ i ] ) != null; i++ ) {
11383		jQuery._data(
11384			elem,
11385			"globalEval",
11386			!refElements || jQuery._data( refElements[ i ], "globalEval" )
11387		);
11388	}
11389}
11390
11391
11392var rhtml = /<|&#?\w+;/,
11393	rtbody = /<tbody/i;
11394
11395function fixDefaultChecked( elem ) {
11396	if ( rcheckableType.test( elem.type ) ) {
11397		elem.defaultChecked = elem.checked;
11398	}
11399}
11400
11401function buildFragment( elems, context, scripts, selection, ignored ) {
11402	var j, elem, contains,
11403		tmp, tag, tbody, wrap,
11404		l = elems.length,
11405
11406		// Ensure a safe fragment
11407		safe = createSafeFragment( context ),
11408
11409		nodes = [],
11410		i = 0;
11411
11412	for ( ; i < l; i++ ) {
11413		elem = elems[ i ];
11414
11415		if ( elem || elem === 0 ) {
11416
11417			// Add nodes directly
11418			if ( jQuery.type( elem ) === "object" ) {
11419				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
11420
11421			// Convert non-html into a text node
11422			} else if ( !rhtml.test( elem ) ) {
11423				nodes.push( context.createTextNode( elem ) );
11424
11425			// Convert html into DOM nodes
11426			} else {
11427				tmp = tmp || safe.appendChild( context.createElement( "div" ) );
11428
11429				// Deserialize a standard representation
11430				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
11431				wrap = wrapMap[ tag ] || wrapMap._default;
11432
11433				tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
11434
11435				// Descend through wrappers to the right content
11436				j = wrap[ 0 ];
11437				while ( j-- ) {
11438					tmp = tmp.lastChild;
11439				}
11440
11441				// Manually add leading whitespace removed by IE
11442				if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
11443					nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );
11444				}
11445
11446				// Remove IE's autoinserted <tbody> from table fragments
11447				if ( !support.tbody ) {
11448
11449					// String was a <table>, *may* have spurious <tbody>
11450					elem = tag === "table" && !rtbody.test( elem ) ?
11451						tmp.firstChild :
11452
11453						// String was a bare <thead> or <tfoot>
11454						wrap[ 1 ] === "<table>" && !rtbody.test( elem ) ?
11455							tmp :
11456							0;
11457
11458					j = elem && elem.childNodes.length;
11459					while ( j-- ) {
11460						if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) &&
11461							!tbody.childNodes.length ) {
11462
11463							elem.removeChild( tbody );
11464						}
11465					}
11466				}
11467
11468				jQuery.merge( nodes, tmp.childNodes );
11469
11470				// Fix #12392 for WebKit and IE > 9
11471				tmp.textContent = "";
11472
11473				// Fix #12392 for oldIE
11474				while ( tmp.firstChild ) {
11475					tmp.removeChild( tmp.firstChild );
11476				}
11477
11478				// Remember the top-level container for proper cleanup
11479				tmp = safe.lastChild;
11480			}
11481		}
11482	}
11483
11484	// Fix #11356: Clear elements from fragment
11485	if ( tmp ) {
11486		safe.removeChild( tmp );
11487	}
11488
11489	// Reset defaultChecked for any radios and checkboxes
11490	// about to be appended to the DOM in IE 6/7 (#8060)
11491	if ( !support.appendChecked ) {
11492		jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
11493	}
11494
11495	i = 0;
11496	while ( ( elem = nodes[ i++ ] ) ) {
11497
11498		// Skip elements already in the context collection (trac-4087)
11499		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
11500			if ( ignored ) {
11501				ignored.push( elem );
11502			}
11503
11504			continue;
11505		}
11506
11507		contains = jQuery.contains( elem.ownerDocument, elem );
11508
11509		// Append to fragment
11510		tmp = getAll( safe.appendChild( elem ), "script" );
11511
11512		// Preserve script evaluation history
11513		if ( contains ) {
11514			setGlobalEval( tmp );
11515		}
11516
11517		// Capture executables
11518		if ( scripts ) {
11519			j = 0;
11520			while ( ( elem = tmp[ j++ ] ) ) {
11521				if ( rscriptType.test( elem.type || "" ) ) {
11522					scripts.push( elem );
11523				}
11524			}
11525		}
11526	}
11527
11528	tmp = null;
11529
11530	return safe;
11531}
11532
11533
11534( function() {
11535	var i, eventName,
11536		div = document.createElement( "div" );
11537
11538	// Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)
11539	for ( i in { submit: true, change: true, focusin: true } ) {
11540		eventName = "on" + i;
11541
11542		if ( !( support[ i ] = eventName in window ) ) {
11543
11544			// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
11545			div.setAttribute( eventName, "t" );
11546			support[ i ] = div.attributes[ eventName ].expando === false;
11547		}
11548	}
11549
11550	// Null elements to avoid leaks in IE.
11551	div = null;
11552} )();
11553
11554
11555var rformElems = /^(?:input|select|textarea)$/i,
11556	rkeyEvent = /^key/,
11557	rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
11558	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
11559	rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
11560
11561function returnTrue() {
11562	return true;
11563}
11564
11565function returnFalse() {
11566	return false;
11567}
11568
11569// Support: IE9
11570// See #13393 for more info
11571function safeActiveElement() {
11572	try {
11573		return document.activeElement;
11574	} catch ( err ) { }
11575}
11576
11577function on( elem, types, selector, data, fn, one ) {
11578	var origFn, type;
11579
11580	// Types can be a map of types/handlers
11581	if ( typeof types === "object" ) {
11582
11583		// ( types-Object, selector, data )
11584		if ( typeof selector !== "string" ) {
11585
11586			// ( types-Object, data )
11587			data = data || selector;
11588			selector = undefined;
11589		}
11590		for ( type in types ) {
11591			on( elem, type, selector, data, types[ type ], one );
11592		}
11593		return elem;
11594	}
11595
11596	if ( data == null && fn == null ) {
11597
11598		// ( types, fn )
11599		fn = selector;
11600		data = selector = undefined;
11601	} else if ( fn == null ) {
11602		if ( typeof selector === "string" ) {
11603
11604			// ( types, selector, fn )
11605			fn = data;
11606			data = undefined;
11607		} else {
11608
11609			// ( types, data, fn )
11610			fn = data;
11611			data = selector;
11612			selector = undefined;
11613		}
11614	}
11615	if ( fn === false ) {
11616		fn = returnFalse;
11617	} else if ( !fn ) {
11618		return elem;
11619	}
11620
11621	if ( one === 1 ) {
11622		origFn = fn;
11623		fn = function( event ) {
11624
11625			// Can use an empty set, since event contains the info
11626			jQuery().off( event );
11627			return origFn.apply( this, arguments );
11628		};
11629
11630		// Use same guid so caller can remove using origFn
11631		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
11632	}
11633	return elem.each( function() {
11634		jQuery.event.add( this, types, fn, data, selector );
11635	} );
11636}
11637
11638/*
11639 * Helper functions for managing events -- not part of the public interface.
11640 * Props to Dean Edwards' addEvent library for many of the ideas.
11641 */
11642jQuery.event = {
11643
11644	global: {},
11645
11646	add: function( elem, types, handler, data, selector ) {
11647		var tmp, events, t, handleObjIn,
11648			special, eventHandle, handleObj,
11649			handlers, type, namespaces, origType,
11650			elemData = jQuery._data( elem );
11651
11652		// Don't attach events to noData or text/comment nodes (but allow plain objects)
11653		if ( !elemData ) {
11654			return;
11655		}
11656
11657		// Caller can pass in an object of custom data in lieu of the handler
11658		if ( handler.handler ) {
11659			handleObjIn = handler;
11660			handler = handleObjIn.handler;
11661			selector = handleObjIn.selector;
11662		}
11663
11664		// Make sure that the handler has a unique ID, used to find/remove it later
11665		if ( !handler.guid ) {
11666			handler.guid = jQuery.guid++;
11667		}
11668
11669		// Init the element's event structure and main handler, if this is the first
11670		if ( !( events = elemData.events ) ) {
11671			events = elemData.events = {};
11672		}
11673		if ( !( eventHandle = elemData.handle ) ) {
11674			eventHandle = elemData.handle = function( e ) {
11675
11676				// Discard the second event of a jQuery.event.trigger() and
11677				// when an event is called after a page has unloaded
11678				return typeof jQuery !== "undefined" &&
11679					( !e || jQuery.event.triggered !== e.type ) ?
11680					jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
11681					undefined;
11682			};
11683
11684			// Add elem as a property of the handle fn to prevent a memory leak
11685			// with IE non-native events
11686			eventHandle.elem = elem;
11687		}
11688
11689		// Handle multiple events separated by a space
11690		types = ( types || "" ).match( rnotwhite ) || [ "" ];
11691		t = types.length;
11692		while ( t-- ) {
11693			tmp = rtypenamespace.exec( types[ t ] ) || [];
11694			type = origType = tmp[ 1 ];
11695			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
11696
11697			// There *must* be a type, no attaching namespace-only handlers
11698			if ( !type ) {
11699				continue;
11700			}
11701
11702			// If event changes its type, use the special event handlers for the changed type
11703			special = jQuery.event.special[ type ] || {};
11704
11705			// If selector defined, determine special event api type, otherwise given type
11706			type = ( selector ? special.delegateType : special.bindType ) || type;
11707
11708			// Update special based on newly reset type
11709			special = jQuery.event.special[ type ] || {};
11710
11711			// handleObj is passed to all event handlers
11712			handleObj = jQuery.extend( {
11713				type: type,
11714				origType: origType,
11715				data: data,
11716				handler: handler,
11717				guid: handler.guid,
11718				selector: selector,
11719				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
11720				namespace: namespaces.join( "." )
11721			}, handleObjIn );
11722
11723			// Init the event handler queue if we're the first
11724			if ( !( handlers = events[ type ] ) ) {
11725				handlers = events[ type ] = [];
11726				handlers.delegateCount = 0;
11727
11728				// Only use addEventListener/attachEvent if the special events handler returns false
11729				if ( !special.setup ||
11730					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
11731
11732					// Bind the global event handler to the element
11733					if ( elem.addEventListener ) {
11734						elem.addEventListener( type, eventHandle, false );
11735
11736					} else if ( elem.attachEvent ) {
11737						elem.attachEvent( "on" + type, eventHandle );
11738					}
11739				}
11740			}
11741
11742			if ( special.add ) {
11743				special.add.call( elem, handleObj );
11744
11745				if ( !handleObj.handler.guid ) {
11746					handleObj.handler.guid = handler.guid;
11747				}
11748			}
11749
11750			// Add to the element's handler list, delegates in front
11751			if ( selector ) {
11752				handlers.splice( handlers.delegateCount++, 0, handleObj );
11753			} else {
11754				handlers.push( handleObj );
11755			}
11756
11757			// Keep track of which events have ever been used, for event optimization
11758			jQuery.event.global[ type ] = true;
11759		}
11760
11761		// Nullify elem to prevent memory leaks in IE
11762		elem = null;
11763	},
11764
11765	// Detach an event or set of events from an element
11766	remove: function( elem, types, handler, selector, mappedTypes ) {
11767		var j, handleObj, tmp,
11768			origCount, t, events,
11769			special, handlers, type,
11770			namespaces, origType,
11771			elemData = jQuery.hasData( elem ) && jQuery._data( elem );
11772
11773		if ( !elemData || !( events = elemData.events ) ) {
11774			return;
11775		}
11776
11777		// Once for each type.namespace in types; type may be omitted
11778		types = ( types || "" ).match( rnotwhite ) || [ "" ];
11779		t = types.length;
11780		while ( t-- ) {
11781			tmp = rtypenamespace.exec( types[ t ] ) || [];
11782			type = origType = tmp[ 1 ];
11783			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
11784
11785			// Unbind all events (on this namespace, if provided) for the element
11786			if ( !type ) {
11787				for ( type in events ) {
11788					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
11789				}
11790				continue;
11791			}
11792
11793			special = jQuery.event.special[ type ] || {};
11794			type = ( selector ? special.delegateType : special.bindType ) || type;
11795			handlers = events[ type ] || [];
11796			tmp = tmp[ 2 ] &&
11797				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
11798
11799			// Remove matching events
11800			origCount = j = handlers.length;
11801			while ( j-- ) {
11802				handleObj = handlers[ j ];
11803
11804				if ( ( mappedTypes || origType === handleObj.origType ) &&
11805					( !handler || handler.guid === handleObj.guid ) &&
11806					( !tmp || tmp.test( handleObj.namespace ) ) &&
11807					( !selector || selector === handleObj.selector ||
11808						selector === "**" && handleObj.selector ) ) {
11809					handlers.splice( j, 1 );
11810
11811					if ( handleObj.selector ) {
11812						handlers.delegateCount--;
11813					}
11814					if ( special.remove ) {
11815						special.remove.call( elem, handleObj );
11816					}
11817				}
11818			}
11819
11820			// Remove generic event handler if we removed something and no more handlers exist
11821			// (avoids potential for endless recursion during removal of special event handlers)
11822			if ( origCount && !handlers.length ) {
11823				if ( !special.teardown ||
11824					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
11825
11826					jQuery.removeEvent( elem, type, elemData.handle );
11827				}
11828
11829				delete events[ type ];
11830			}
11831		}
11832
11833		// Remove the expando if it's no longer used
11834		if ( jQuery.isEmptyObject( events ) ) {
11835			delete elemData.handle;
11836
11837			// removeData also checks for emptiness and clears the expando if empty
11838			// so use it instead of delete
11839			jQuery._removeData( elem, "events" );
11840		}
11841	},
11842
11843	trigger: function( event, data, elem, onlyHandlers ) {
11844		var handle, ontype, cur,
11845			bubbleType, special, tmp, i,
11846			eventPath = [ elem || document ],
11847			type = hasOwn.call( event, "type" ) ? event.type : event,
11848			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
11849
11850		cur = tmp = elem = elem || document;
11851
11852		// Don't do events on text and comment nodes
11853		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
11854			return;
11855		}
11856
11857		// focus/blur morphs to focusin/out; ensure we're not firing them right now
11858		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
11859			return;
11860		}
11861
11862		if ( type.indexOf( "." ) > -1 ) {
11863
11864			// Namespaced trigger; create a regexp to match event type in handle()
11865			namespaces = type.split( "." );
11866			type = namespaces.shift();
11867			namespaces.sort();
11868		}
11869		ontype = type.indexOf( ":" ) < 0 && "on" + type;
11870
11871		// Caller can pass in a jQuery.Event object, Object, or just an event type string
11872		event = event[ jQuery.expando ] ?
11873			event :
11874			new jQuery.Event( type, typeof event === "object" && event );
11875
11876		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
11877		event.isTrigger = onlyHandlers ? 2 : 3;
11878		event.namespace = namespaces.join( "." );
11879		event.rnamespace = event.namespace ?
11880			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
11881			null;
11882
11883		// Clean up the event in case it is being reused
11884		event.result = undefined;
11885		if ( !event.target ) {
11886			event.target = elem;
11887		}
11888
11889		// Clone any incoming data and prepend the event, creating the handler arg list
11890		data = data == null ?
11891			[ event ] :
11892			jQuery.makeArray( data, [ event ] );
11893
11894		// Allow special events to draw outside the lines
11895		special = jQuery.event.special[ type ] || {};
11896		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
11897			return;
11898		}
11899
11900		// Determine event propagation path in advance, per W3C events spec (#9951)
11901		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
11902		if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
11903
11904			bubbleType = special.delegateType || type;
11905			if ( !rfocusMorph.test( bubbleType + type ) ) {
11906				cur = cur.parentNode;
11907			}
11908			for ( ; cur; cur = cur.parentNode ) {
11909				eventPath.push( cur );
11910				tmp = cur;
11911			}
11912
11913			// Only add window if we got to document (e.g., not plain obj or detached DOM)
11914			if ( tmp === ( elem.ownerDocument || document ) ) {
11915				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
11916			}
11917		}
11918
11919		// Fire handlers on the event path
11920		i = 0;
11921		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
11922
11923			event.type = i > 1 ?
11924				bubbleType :
11925				special.bindType || type;
11926
11927			// jQuery handler
11928			handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] &&
11929				jQuery._data( cur, "handle" );
11930
11931			if ( handle ) {
11932				handle.apply( cur, data );
11933			}
11934
11935			// Native handler
11936			handle = ontype && cur[ ontype ];
11937			if ( handle && handle.apply && acceptData( cur ) ) {
11938				event.result = handle.apply( cur, data );
11939				if ( event.result === false ) {
11940					event.preventDefault();
11941				}
11942			}
11943		}
11944		event.type = type;
11945
11946		// If nobody prevented the default action, do it now
11947		if ( !onlyHandlers && !event.isDefaultPrevented() ) {
11948
11949			if (
11950				( !special._default ||
11951				 special._default.apply( eventPath.pop(), data ) === false
11952				) && acceptData( elem )
11953			) {
11954
11955				// Call a native DOM method on the target with the same name name as the event.
11956				// Can't use an .isFunction() check here because IE6/7 fails that test.
11957				// Don't do default actions on window, that's where global variables be (#6170)
11958				if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
11959
11960					// Don't re-trigger an onFOO event when we call its FOO() method
11961					tmp = elem[ ontype ];
11962
11963					if ( tmp ) {
11964						elem[ ontype ] = null;
11965					}
11966
11967					// Prevent re-triggering of the same event, since we already bubbled it above
11968					jQuery.event.triggered = type;
11969					try {
11970						elem[ type ]();
11971					} catch ( e ) {
11972
11973						// IE<9 dies on focus/blur to hidden element (#1486,#12518)
11974						// only reproducible on winXP IE8 native, not IE9 in IE8 mode
11975					}
11976					jQuery.event.triggered = undefined;
11977
11978					if ( tmp ) {
11979						elem[ ontype ] = tmp;
11980					}
11981				}
11982			}
11983		}
11984
11985		return event.result;
11986	},
11987
11988	dispatch: function( event ) {
11989
11990		// Make a writable jQuery.Event from the native event object
11991		event = jQuery.event.fix( event );
11992
11993		var i, j, ret, matched, handleObj,
11994			handlerQueue = [],
11995			args = slice.call( arguments ),
11996			handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
11997			special = jQuery.event.special[ event.type ] || {};
11998
11999		// Use the fix-ed jQuery.Event rather than the (read-only) native event
12000		args[ 0 ] = event;
12001		event.delegateTarget = this;
12002
12003		// Call the preDispatch hook for the mapped type, and let it bail if desired
12004		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
12005			return;
12006		}
12007
12008		// Determine handlers
12009		handlerQueue = jQuery.event.handlers.call( this, event, handlers );
12010
12011		// Run delegates first; they may want to stop propagation beneath us
12012		i = 0;
12013		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
12014			event.currentTarget = matched.elem;
12015
12016			j = 0;
12017			while ( ( handleObj = matched.handlers[ j++ ] ) &&
12018				!event.isImmediatePropagationStopped() ) {
12019
12020				// Triggered event must either 1) have no namespace, or 2) have namespace(s)
12021				// a subset or equal to those in the bound event (both can have no namespace).
12022				if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
12023
12024					event.handleObj = handleObj;
12025					event.data = handleObj.data;
12026
12027					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
12028						handleObj.handler ).apply( matched.elem, args );
12029
12030					if ( ret !== undefined ) {
12031						if ( ( event.result = ret ) === false ) {
12032							event.preventDefault();
12033							event.stopPropagation();
12034						}
12035					}
12036				}
12037			}
12038		}
12039
12040		// Call the postDispatch hook for the mapped type
12041		if ( special.postDispatch ) {
12042			special.postDispatch.call( this, event );
12043		}
12044
12045		return event.result;
12046	},
12047
12048	handlers: function( event, handlers ) {
12049		var i, matches, sel, handleObj,
12050			handlerQueue = [],
12051			delegateCount = handlers.delegateCount,
12052			cur = event.target;
12053
12054		// Support (at least): Chrome, IE9
12055		// Find delegate handlers
12056		// Black-hole SVG <use> instance trees (#13180)
12057		//
12058		// Support: Firefox<=42+
12059		// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
12060		if ( delegateCount && cur.nodeType &&
12061			( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
12062
12063			/* jshint eqeqeq: false */
12064			for ( ; cur != this; cur = cur.parentNode || this ) {
12065				/* jshint eqeqeq: true */
12066
12067				// Don't check non-elements (#13208)
12068				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
12069				if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
12070					matches = [];
12071					for ( i = 0; i < delegateCount; i++ ) {
12072						handleObj = handlers[ i ];
12073
12074						// Don't conflict with Object.prototype properties (#13203)
12075						sel = handleObj.selector + " ";
12076
12077						if ( matches[ sel ] === undefined ) {
12078							matches[ sel ] = handleObj.needsContext ?
12079								jQuery( sel, this ).index( cur ) > -1 :
12080								jQuery.find( sel, this, null, [ cur ] ).length;
12081						}
12082						if ( matches[ sel ] ) {
12083							matches.push( handleObj );
12084						}
12085					}
12086					if ( matches.length ) {
12087						handlerQueue.push( { elem: cur, handlers: matches } );
12088					}
12089				}
12090			}
12091		}
12092
12093		// Add the remaining (directly-bound) handlers
12094		if ( delegateCount < handlers.length ) {
12095			handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
12096		}
12097
12098		return handlerQueue;
12099	},
12100
12101	fix: function( event ) {
12102		if ( event[ jQuery.expando ] ) {
12103			return event;
12104		}
12105
12106		// Create a writable copy of the event object and normalize some properties
12107		var i, prop, copy,
12108			type = event.type,
12109			originalEvent = event,
12110			fixHook = this.fixHooks[ type ];
12111
12112		if ( !fixHook ) {
12113			this.fixHooks[ type ] = fixHook =
12114				rmouseEvent.test( type ) ? this.mouseHooks :
12115				rkeyEvent.test( type ) ? this.keyHooks :
12116				{};
12117		}
12118		copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
12119
12120		event = new jQuery.Event( originalEvent );
12121
12122		i = copy.length;
12123		while ( i-- ) {
12124			prop = copy[ i ];
12125			event[ prop ] = originalEvent[ prop ];
12126		}
12127
12128		// Support: IE<9
12129		// Fix target property (#1925)
12130		if ( !event.target ) {
12131			event.target = originalEvent.srcElement || document;
12132		}
12133
12134		// Support: Safari 6-8+
12135		// Target should not be a text node (#504, #13143)
12136		if ( event.target.nodeType === 3 ) {
12137			event.target = event.target.parentNode;
12138		}
12139
12140		// Support: IE<9
12141		// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
12142		event.metaKey = !!event.metaKey;
12143
12144		return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
12145	},
12146
12147	// Includes some event props shared by KeyEvent and MouseEvent
12148	props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +
12149		"metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ),
12150
12151	fixHooks: {},
12152
12153	keyHooks: {
12154		props: "char charCode key keyCode".split( " " ),
12155		filter: function( event, original ) {
12156
12157			// Add which for key events
12158			if ( event.which == null ) {
12159				event.which = original.charCode != null ? original.charCode : original.keyCode;
12160			}
12161
12162			return event;
12163		}
12164	},
12165
12166	mouseHooks: {
12167		props: ( "button buttons clientX clientY fromElement offsetX offsetY " +
12168			"pageX pageY screenX screenY toElement" ).split( " " ),
12169		filter: function( event, original ) {
12170			var body, eventDoc, doc,
12171				button = original.button,
12172				fromElement = original.fromElement;
12173
12174			// Calculate pageX/Y if missing and clientX/Y available
12175			if ( event.pageX == null && original.clientX != null ) {
12176				eventDoc = event.target.ownerDocument || document;
12177				doc = eventDoc.documentElement;
12178				body = eventDoc.body;
12179
12180				event.pageX = original.clientX +
12181					( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
12182					( doc && doc.clientLeft || body && body.clientLeft || 0 );
12183				event.pageY = original.clientY +
12184					( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) -
12185					( doc && doc.clientTop  || body && body.clientTop  || 0 );
12186			}
12187
12188			// Add relatedTarget, if necessary
12189			if ( !event.relatedTarget && fromElement ) {
12190				event.relatedTarget = fromElement === event.target ?
12191					original.toElement :
12192					fromElement;
12193			}
12194
12195			// Add which for click: 1 === left; 2 === middle; 3 === right
12196			// Note: button is not normalized, so don't use it
12197			if ( !event.which && button !== undefined ) {
12198				event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
12199			}
12200
12201			return event;
12202		}
12203	},
12204
12205	special: {
12206		load: {
12207
12208			// Prevent triggered image.load events from bubbling to window.load
12209			noBubble: true
12210		},
12211		focus: {
12212
12213			// Fire native event if possible so blur/focus sequence is correct
12214			trigger: function() {
12215				if ( this !== safeActiveElement() && this.focus ) {
12216					try {
12217						this.focus();
12218						return false;
12219					} catch ( e ) {
12220
12221						// Support: IE<9
12222						// If we error on focus to hidden element (#1486, #12518),
12223						// let .trigger() run the handlers
12224					}
12225				}
12226			},
12227			delegateType: "focusin"
12228		},
12229		blur: {
12230			trigger: function() {
12231				if ( this === safeActiveElement() && this.blur ) {
12232					this.blur();
12233					return false;
12234				}
12235			},
12236			delegateType: "focusout"
12237		},
12238		click: {
12239
12240			// For checkbox, fire native event so checked state will be right
12241			trigger: function() {
12242				if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
12243					this.click();
12244					return false;
12245				}
12246			},
12247
12248			// For cross-browser consistency, don't fire native .click() on links
12249			_default: function( event ) {
12250				return jQuery.nodeName( event.target, "a" );
12251			}
12252		},
12253
12254		beforeunload: {
12255			postDispatch: function( event ) {
12256
12257				// Support: Firefox 20+
12258				// Firefox doesn't alert if the returnValue field is not set.
12259				if ( event.result !== undefined && event.originalEvent ) {
12260					event.originalEvent.returnValue = event.result;
12261				}
12262			}
12263		}
12264	},
12265
12266	// Piggyback on a donor event to simulate a different one
12267	simulate: function( type, elem, event ) {
12268		var e = jQuery.extend(
12269			new jQuery.Event(),
12270			event,
12271			{
12272				type: type,
12273				isSimulated: true
12274
12275				// Previously, `originalEvent: {}` was set here, so stopPropagation call
12276				// would not be triggered on donor event, since in our own
12277				// jQuery.event.stopPropagation function we had a check for existence of
12278				// originalEvent.stopPropagation method, so, consequently it would be a noop.
12279				//
12280				// Guard for simulated events was moved to jQuery.event.stopPropagation function
12281				// since `originalEvent` should point to the original event for the
12282				// constancy with other events and for more focused logic
12283			}
12284		);
12285
12286		jQuery.event.trigger( e, null, elem );
12287
12288		if ( e.isDefaultPrevented() ) {
12289			event.preventDefault();
12290		}
12291	}
12292};
12293
12294jQuery.removeEvent = document.removeEventListener ?
12295	function( elem, type, handle ) {
12296
12297		// This "if" is needed for plain objects
12298		if ( elem.removeEventListener ) {
12299			elem.removeEventListener( type, handle );
12300		}
12301	} :
12302	function( elem, type, handle ) {
12303		var name = "on" + type;
12304
12305		if ( elem.detachEvent ) {
12306
12307			// #8545, #7054, preventing memory leaks for custom events in IE6-8
12308			// detachEvent needed property on element, by name of that event,
12309			// to properly expose it to GC
12310			if ( typeof elem[ name ] === "undefined" ) {
12311				elem[ name ] = null;
12312			}
12313
12314			elem.detachEvent( name, handle );
12315		}
12316	};
12317
12318jQuery.Event = function( src, props ) {
12319
12320	// Allow instantiation without the 'new' keyword
12321	if ( !( this instanceof jQuery.Event ) ) {
12322		return new jQuery.Event( src, props );
12323	}
12324
12325	// Event object
12326	if ( src && src.type ) {
12327		this.originalEvent = src;
12328		this.type = src.type;
12329
12330		// Events bubbling up the document may have been marked as prevented
12331		// by a handler lower down the tree; reflect the correct value.
12332		this.isDefaultPrevented = src.defaultPrevented ||
12333				src.defaultPrevented === undefined &&
12334
12335				// Support: IE < 9, Android < 4.0
12336				src.returnValue === false ?
12337			returnTrue :
12338			returnFalse;
12339
12340	// Event type
12341	} else {
12342		this.type = src;
12343	}
12344
12345	// Put explicitly provided properties onto the event object
12346	if ( props ) {
12347		jQuery.extend( this, props );
12348	}
12349
12350	// Create a timestamp if incoming event doesn't have one
12351	this.timeStamp = src && src.timeStamp || jQuery.now();
12352
12353	// Mark it as fixed
12354	this[ jQuery.expando ] = true;
12355};
12356
12357// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
12358// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
12359jQuery.Event.prototype = {
12360	constructor: jQuery.Event,
12361	isDefaultPrevented: returnFalse,
12362	isPropagationStopped: returnFalse,
12363	isImmediatePropagationStopped: returnFalse,
12364
12365	preventDefault: function() {
12366		var e = this.originalEvent;
12367
12368		this.isDefaultPrevented = returnTrue;
12369		if ( !e ) {
12370			return;
12371		}
12372
12373		// If preventDefault exists, run it on the original event
12374		if ( e.preventDefault ) {
12375			e.preventDefault();
12376
12377		// Support: IE
12378		// Otherwise set the returnValue property of the original event to false
12379		} else {
12380			e.returnValue = false;
12381		}
12382	},
12383	stopPropagation: function() {
12384		var e = this.originalEvent;
12385
12386		this.isPropagationStopped = returnTrue;
12387
12388		if ( !e || this.isSimulated ) {
12389			return;
12390		}
12391
12392		// If stopPropagation exists, run it on the original event
12393		if ( e.stopPropagation ) {
12394			e.stopPropagation();
12395		}
12396
12397		// Support: IE
12398		// Set the cancelBubble property of the original event to true
12399		e.cancelBubble = true;
12400	},
12401	stopImmediatePropagation: function() {
12402		var e = this.originalEvent;
12403
12404		this.isImmediatePropagationStopped = returnTrue;
12405
12406		if ( e && e.stopImmediatePropagation ) {
12407			e.stopImmediatePropagation();
12408		}
12409
12410		this.stopPropagation();
12411	}
12412};
12413
12414// Create mouseenter/leave events using mouseover/out and event-time checks
12415// so that event delegation works in jQuery.
12416// Do the same for pointerenter/pointerleave and pointerover/pointerout
12417//
12418// Support: Safari 7 only
12419// Safari sends mouseenter too often; see:
12420// https://code.google.com/p/chromium/issues/detail?id=470258
12421// for the description of the bug (it existed in older Chrome versions as well).
12422jQuery.each( {
12423	mouseenter: "mouseover",
12424	mouseleave: "mouseout",
12425	pointerenter: "pointerover",
12426	pointerleave: "pointerout"
12427}, function( orig, fix ) {
12428	jQuery.event.special[ orig ] = {
12429		delegateType: fix,
12430		bindType: fix,
12431
12432		handle: function( event ) {
12433			var ret,
12434				target = this,
12435				related = event.relatedTarget,
12436				handleObj = event.handleObj;
12437
12438			// For mouseenter/leave call the handler if related is outside the target.
12439			// NB: No relatedTarget if the mouse left/entered the browser window
12440			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
12441				event.type = handleObj.origType;
12442				ret = handleObj.handler.apply( this, arguments );
12443				event.type = fix;
12444			}
12445			return ret;
12446		}
12447	};
12448} );
12449
12450// IE submit delegation
12451if ( !support.submit ) {
12452
12453	jQuery.event.special.submit = {
12454		setup: function() {
12455
12456			// Only need this for delegated form submit events
12457			if ( jQuery.nodeName( this, "form" ) ) {
12458				return false;
12459			}
12460
12461			// Lazy-add a submit handler when a descendant form may potentially be submitted
12462			jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
12463
12464				// Node name check avoids a VML-related crash in IE (#9807)
12465				var elem = e.target,
12466					form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ?
12467
12468						// Support: IE <=8
12469						// We use jQuery.prop instead of elem.form
12470						// to allow fixing the IE8 delegated submit issue (gh-2332)
12471						// by 3rd party polyfills/workarounds.
12472						jQuery.prop( elem, "form" ) :
12473						undefined;
12474
12475				if ( form && !jQuery._data( form, "submit" ) ) {
12476					jQuery.event.add( form, "submit._submit", function( event ) {
12477						event._submitBubble = true;
12478					} );
12479					jQuery._data( form, "submit", true );
12480				}
12481			} );
12482
12483			// return undefined since we don't need an event listener
12484		},
12485
12486		postDispatch: function( event ) {
12487
12488			// If form was submitted by the user, bubble the event up the tree
12489			if ( event._submitBubble ) {
12490				delete event._submitBubble;
12491				if ( this.parentNode && !event.isTrigger ) {
12492					jQuery.event.simulate( "submit", this.parentNode, event );
12493				}
12494			}
12495		},
12496
12497		teardown: function() {
12498
12499			// Only need this for delegated form submit events
12500			if ( jQuery.nodeName( this, "form" ) ) {
12501				return false;
12502			}
12503
12504			// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
12505			jQuery.event.remove( this, "._submit" );
12506		}
12507	};
12508}
12509
12510// IE change delegation and checkbox/radio fix
12511if ( !support.change ) {
12512
12513	jQuery.event.special.change = {
12514
12515		setup: function() {
12516
12517			if ( rformElems.test( this.nodeName ) ) {
12518
12519				// IE doesn't fire change on a check/radio until blur; trigger it on click
12520				// after a propertychange. Eat the blur-change in special.change.handle.
12521				// This still fires onchange a second time for check/radio after blur.
12522				if ( this.type === "checkbox" || this.type === "radio" ) {
12523					jQuery.event.add( this, "propertychange._change", function( event ) {
12524						if ( event.originalEvent.propertyName === "checked" ) {
12525							this._justChanged = true;
12526						}
12527					} );
12528					jQuery.event.add( this, "click._change", function( event ) {
12529						if ( this._justChanged && !event.isTrigger ) {
12530							this._justChanged = false;
12531						}
12532
12533						// Allow triggered, simulated change events (#11500)
12534						jQuery.event.simulate( "change", this, event );
12535					} );
12536				}
12537				return false;
12538			}
12539
12540			// Delegated event; lazy-add a change handler on descendant inputs
12541			jQuery.event.add( this, "beforeactivate._change", function( e ) {
12542				var elem = e.target;
12543
12544				if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "change" ) ) {
12545					jQuery.event.add( elem, "change._change", function( event ) {
12546						if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
12547							jQuery.event.simulate( "change", this.parentNode, event );
12548						}
12549					} );
12550					jQuery._data( elem, "change", true );
12551				}
12552			} );
12553		},
12554
12555		handle: function( event ) {
12556			var elem = event.target;
12557
12558			// Swallow native change events from checkbox/radio, we already triggered them above
12559			if ( this !== elem || event.isSimulated || event.isTrigger ||
12560				( elem.type !== "radio" && elem.type !== "checkbox" ) ) {
12561
12562				return event.handleObj.handler.apply( this, arguments );
12563			}
12564		},
12565
12566		teardown: function() {
12567			jQuery.event.remove( this, "._change" );
12568
12569			return !rformElems.test( this.nodeName );
12570		}
12571	};
12572}
12573
12574// Support: Firefox
12575// Firefox doesn't have focus(in | out) events
12576// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
12577//
12578// Support: Chrome, Safari
12579// focus(in | out) events fire after focus & blur events,
12580// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
12581// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
12582if ( !support.focusin ) {
12583	jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
12584
12585		// Attach a single capturing handler on the document while someone wants focusin/focusout
12586		var handler = function( event ) {
12587			jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
12588		};
12589
12590		jQuery.event.special[ fix ] = {
12591			setup: function() {
12592				var doc = this.ownerDocument || this,
12593					attaches = jQuery._data( doc, fix );
12594
12595				if ( !attaches ) {
12596					doc.addEventListener( orig, handler, true );
12597				}
12598				jQuery._data( doc, fix, ( attaches || 0 ) + 1 );
12599			},
12600			teardown: function() {
12601				var doc = this.ownerDocument || this,
12602					attaches = jQuery._data( doc, fix ) - 1;
12603
12604				if ( !attaches ) {
12605					doc.removeEventListener( orig, handler, true );
12606					jQuery._removeData( doc, fix );
12607				} else {
12608					jQuery._data( doc, fix, attaches );
12609				}
12610			}
12611		};
12612	} );
12613}
12614
12615jQuery.fn.extend( {
12616
12617	on: function( types, selector, data, fn ) {
12618		return on( this, types, selector, data, fn );
12619	},
12620	one: function( types, selector, data, fn ) {
12621		return on( this, types, selector, data, fn, 1 );
12622	},
12623	off: function( types, selector, fn ) {
12624		var handleObj, type;
12625		if ( types && types.preventDefault && types.handleObj ) {
12626
12627			// ( event )  dispatched jQuery.Event
12628			handleObj = types.handleObj;
12629			jQuery( types.delegateTarget ).off(
12630				handleObj.namespace ?
12631					handleObj.origType + "." + handleObj.namespace :
12632					handleObj.origType,
12633				handleObj.selector,
12634				handleObj.handler
12635			);
12636			return this;
12637		}
12638		if ( typeof types === "object" ) {
12639
12640			// ( types-object [, selector] )
12641			for ( type in types ) {
12642				this.off( type, selector, types[ type ] );
12643			}
12644			return this;
12645		}
12646		if ( selector === false || typeof selector === "function" ) {
12647
12648			// ( types [, fn] )
12649			fn = selector;
12650			selector = undefined;
12651		}
12652		if ( fn === false ) {
12653			fn = returnFalse;
12654		}
12655		return this.each( function() {
12656			jQuery.event.remove( this, types, fn, selector );
12657		} );
12658	},
12659
12660	trigger: function( type, data ) {
12661		return this.each( function() {
12662			jQuery.event.trigger( type, data, this );
12663		} );
12664	},
12665	triggerHandler: function( type, data ) {
12666		var elem = this[ 0 ];
12667		if ( elem ) {
12668			return jQuery.event.trigger( type, data, elem, true );
12669		}
12670	}
12671} );
12672
12673
12674var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
12675	rnoshimcache = new RegExp( "<(?:" + nodeNames + ")[\\s/>]", "i" ),
12676	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
12677
12678	// Support: IE 10-11, Edge 10240+
12679	// In IE/Edge using regex groups here causes severe slowdowns.
12680	// See https://connect.microsoft.com/IE/feedback/details/1736512/
12681	rnoInnerhtml = /<script|<style|<link/i,
12682
12683	// checked="checked" or checked
12684	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
12685	rscriptTypeMasked = /^true\/(.*)/,
12686	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
12687	safeFragment = createSafeFragment( document ),
12688	fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) );
12689
12690// Support: IE<8
12691// Manipulating tables requires a tbody
12692function manipulationTarget( elem, content ) {
12693	return jQuery.nodeName( elem, "table" ) &&
12694		jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
12695
12696		elem.getElementsByTagName( "tbody" )[ 0 ] ||
12697			elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) :
12698		elem;
12699}
12700
12701// Replace/restore the type attribute of script elements for safe DOM manipulation
12702function disableScript( elem ) {
12703	elem.type = ( jQuery.find.attr( elem, "type" ) !== null ) + "/" + elem.type;
12704	return elem;
12705}
12706function restoreScript( elem ) {
12707	var match = rscriptTypeMasked.exec( elem.type );
12708	if ( match ) {
12709		elem.type = match[ 1 ];
12710	} else {
12711		elem.removeAttribute( "type" );
12712	}
12713	return elem;
12714}
12715
12716function cloneCopyEvent( src, dest ) {
12717	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
12718		return;
12719	}
12720
12721	var type, i, l,
12722		oldData = jQuery._data( src ),
12723		curData = jQuery._data( dest, oldData ),
12724		events = oldData.events;
12725
12726	if ( events ) {
12727		delete curData.handle;
12728		curData.events = {};
12729
12730		for ( type in events ) {
12731			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
12732				jQuery.event.add( dest, type, events[ type ][ i ] );
12733			}
12734		}
12735	}
12736
12737	// make the cloned public data object a copy from the original
12738	if ( curData.data ) {
12739		curData.data = jQuery.extend( {}, curData.data );
12740	}
12741}
12742
12743function fixCloneNodeIssues( src, dest ) {
12744	var nodeName, e, data;
12745
12746	// We do not need to do anything for non-Elements
12747	if ( dest.nodeType !== 1 ) {
12748		return;
12749	}
12750
12751	nodeName = dest.nodeName.toLowerCase();
12752
12753	// IE6-8 copies events bound via attachEvent when using cloneNode.
12754	if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
12755		data = jQuery._data( dest );
12756
12757		for ( e in data.events ) {
12758			jQuery.removeEvent( dest, e, data.handle );
12759		}
12760
12761		// Event data gets referenced instead of copied if the expando gets copied too
12762		dest.removeAttribute( jQuery.expando );
12763	}
12764
12765	// IE blanks contents when cloning scripts, and tries to evaluate newly-set text
12766	if ( nodeName === "script" && dest.text !== src.text ) {
12767		disableScript( dest ).text = src.text;
12768		restoreScript( dest );
12769
12770	// IE6-10 improperly clones children of object elements using classid.
12771	// IE10 throws NoModificationAllowedError if parent is null, #12132.
12772	} else if ( nodeName === "object" ) {
12773		if ( dest.parentNode ) {
12774			dest.outerHTML = src.outerHTML;
12775		}
12776
12777		// This path appears unavoidable for IE9. When cloning an object
12778		// element in IE9, the outerHTML strategy above is not sufficient.
12779		// If the src has innerHTML and the destination does not,
12780		// copy the src.innerHTML into the dest.innerHTML. #10324
12781		if ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {
12782			dest.innerHTML = src.innerHTML;
12783		}
12784
12785	} else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
12786
12787		// IE6-8 fails to persist the checked state of a cloned checkbox
12788		// or radio button. Worse, IE6-7 fail to give the cloned element
12789		// a checked appearance if the defaultChecked value isn't also set
12790
12791		dest.defaultChecked = dest.checked = src.checked;
12792
12793		// IE6-7 get confused and end up setting the value of a cloned
12794		// checkbox/radio button to an empty string instead of "on"
12795		if ( dest.value !== src.value ) {
12796			dest.value = src.value;
12797		}
12798
12799	// IE6-8 fails to return the selected option to the default selected
12800	// state when cloning options
12801	} else if ( nodeName === "option" ) {
12802		dest.defaultSelected = dest.selected = src.defaultSelected;
12803
12804	// IE6-8 fails to set the defaultValue to the correct value when
12805	// cloning other types of input fields
12806	} else if ( nodeName === "input" || nodeName === "textarea" ) {
12807		dest.defaultValue = src.defaultValue;
12808	}
12809}
12810
12811function domManip( collection, args, callback, ignored ) {
12812
12813	// Flatten any nested arrays
12814	args = concat.apply( [], args );
12815
12816	var first, node, hasScripts,
12817		scripts, doc, fragment,
12818		i = 0,
12819		l = collection.length,
12820		iNoClone = l - 1,
12821		value = args[ 0 ],
12822		isFunction = jQuery.isFunction( value );
12823
12824	// We can't cloneNode fragments that contain checked, in WebKit
12825	if ( isFunction ||
12826			( l > 1 && typeof value === "string" &&
12827				!support.checkClone && rchecked.test( value ) ) ) {
12828		return collection.each( function( index ) {
12829			var self = collection.eq( index );
12830			if ( isFunction ) {
12831				args[ 0 ] = value.call( this, index, self.html() );
12832			}
12833			domManip( self, args, callback, ignored );
12834		} );
12835	}
12836
12837	if ( l ) {
12838		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
12839		first = fragment.firstChild;
12840
12841		if ( fragment.childNodes.length === 1 ) {
12842			fragment = first;
12843		}
12844
12845		// Require either new content or an interest in ignored elements to invoke the callback
12846		if ( first || ignored ) {
12847			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
12848			hasScripts = scripts.length;
12849
12850			// Use the original fragment for the last item
12851			// instead of the first because it can end up
12852			// being emptied incorrectly in certain situations (#8070).
12853			for ( ; i < l; i++ ) {
12854				node = fragment;
12855
12856				if ( i !== iNoClone ) {
12857					node = jQuery.clone( node, true, true );
12858
12859					// Keep references to cloned scripts for later restoration
12860					if ( hasScripts ) {
12861
12862						// Support: Android<4.1, PhantomJS<2
12863						// push.apply(_, arraylike) throws on ancient WebKit
12864						jQuery.merge( scripts, getAll( node, "script" ) );
12865					}
12866				}
12867
12868				callback.call( collection[ i ], node, i );
12869			}
12870
12871			if ( hasScripts ) {
12872				doc = scripts[ scripts.length - 1 ].ownerDocument;
12873
12874				// Reenable scripts
12875				jQuery.map( scripts, restoreScript );
12876
12877				// Evaluate executable scripts on first document insertion
12878				for ( i = 0; i < hasScripts; i++ ) {
12879					node = scripts[ i ];
12880					if ( rscriptType.test( node.type || "" ) &&
12881						!jQuery._data( node, "globalEval" ) &&
12882						jQuery.contains( doc, node ) ) {
12883
12884						if ( node.src ) {
12885
12886							// Optional AJAX dependency, but won't run scripts if not present
12887							if ( jQuery._evalUrl ) {
12888								jQuery._evalUrl( node.src );
12889							}
12890						} else {
12891							jQuery.globalEval(
12892								( node.text || node.textContent || node.innerHTML || "" )
12893									.replace( rcleanScript, "" )
12894							);
12895						}
12896					}
12897				}
12898			}
12899
12900			// Fix #11809: Avoid leaking memory
12901			fragment = first = null;
12902		}
12903	}
12904
12905	return collection;
12906}
12907
12908function remove( elem, selector, keepData ) {
12909	var node,
12910		elems = selector ? jQuery.filter( selector, elem ) : elem,
12911		i = 0;
12912
12913	for ( ; ( node = elems[ i ] ) != null; i++ ) {
12914
12915		if ( !keepData && node.nodeType === 1 ) {
12916			jQuery.cleanData( getAll( node ) );
12917		}
12918
12919		if ( node.parentNode ) {
12920			if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
12921				setGlobalEval( getAll( node, "script" ) );
12922			}
12923			node.parentNode.removeChild( node );
12924		}
12925	}
12926
12927	return elem;
12928}
12929
12930jQuery.extend( {
12931	htmlPrefilter: function( html ) {
12932		return html.replace( rxhtmlTag, "<$1></$2>" );
12933	},
12934
12935	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
12936		var destElements, node, clone, i, srcElements,
12937			inPage = jQuery.contains( elem.ownerDocument, elem );
12938
12939		if ( support.html5Clone || jQuery.isXMLDoc( elem ) ||
12940			!rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
12941
12942			clone = elem.cloneNode( true );
12943
12944		// IE<=8 does not properly clone detached, unknown element nodes
12945		} else {
12946			fragmentDiv.innerHTML = elem.outerHTML;
12947			fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
12948		}
12949
12950		if ( ( !support.noCloneEvent || !support.noCloneChecked ) &&
12951				( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) {
12952
12953			// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
12954			destElements = getAll( clone );
12955			srcElements = getAll( elem );
12956
12957			// Fix all IE cloning issues
12958			for ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) {
12959
12960				// Ensure that the destination node is not null; Fixes #9587
12961				if ( destElements[ i ] ) {
12962					fixCloneNodeIssues( node, destElements[ i ] );
12963				}
12964			}
12965		}
12966
12967		// Copy the events from the original to the clone
12968		if ( dataAndEvents ) {
12969			if ( deepDataAndEvents ) {
12970				srcElements = srcElements || getAll( elem );
12971				destElements = destElements || getAll( clone );
12972
12973				for ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) {
12974					cloneCopyEvent( node, destElements[ i ] );
12975				}
12976			} else {
12977				cloneCopyEvent( elem, clone );
12978			}
12979		}
12980
12981		// Preserve script evaluation history
12982		destElements = getAll( clone, "script" );
12983		if ( destElements.length > 0 ) {
12984			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
12985		}
12986
12987		destElements = srcElements = node = null;
12988
12989		// Return the cloned set
12990		return clone;
12991	},
12992
12993	cleanData: function( elems, /* internal */ forceAcceptData ) {
12994		var elem, type, id, data,
12995			i = 0,
12996			internalKey = jQuery.expando,
12997			cache = jQuery.cache,
12998			attributes = support.attributes,
12999			special = jQuery.event.special;
13000
13001		for ( ; ( elem = elems[ i ] ) != null; i++ ) {
13002			if ( forceAcceptData || acceptData( elem ) ) {
13003
13004				id = elem[ internalKey ];
13005				data = id && cache[ id ];
13006
13007				if ( data ) {
13008					if ( data.events ) {
13009						for ( type in data.events ) {
13010							if ( special[ type ] ) {
13011								jQuery.event.remove( elem, type );
13012
13013							// This is a shortcut to avoid jQuery.event.remove's overhead
13014							} else {
13015								jQuery.removeEvent( elem, type, data.handle );
13016							}
13017						}
13018					}
13019
13020					// Remove cache only if it was not already removed by jQuery.event.remove
13021					if ( cache[ id ] ) {
13022
13023						delete cache[ id ];
13024
13025						// Support: IE<9
13026						// IE does not allow us to delete expando properties from nodes
13027						// IE creates expando attributes along with the property
13028						// IE does not have a removeAttribute function on Document nodes
13029						if ( !attributes && typeof elem.removeAttribute !== "undefined" ) {
13030							elem.removeAttribute( internalKey );
13031
13032						// Webkit & Blink performance suffers when deleting properties
13033						// from DOM nodes, so set to undefined instead
13034						// https://code.google.com/p/chromium/issues/detail?id=378607
13035						} else {
13036							elem[ internalKey ] = undefined;
13037						}
13038
13039						deletedIds.push( id );
13040					}
13041				}
13042			}
13043		}
13044	}
13045} );
13046
13047jQuery.fn.extend( {
13048
13049	// Keep domManip exposed until 3.0 (gh-2225)
13050	domManip: domManip,
13051
13052	detach: function( selector ) {
13053		return remove( this, selector, true );
13054	},
13055
13056	remove: function( selector ) {
13057		return remove( this, selector );
13058	},
13059
13060	text: function( value ) {
13061		return access( this, function( value ) {
13062			return value === undefined ?
13063				jQuery.text( this ) :
13064				this.empty().append(
13065					( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value )
13066				);
13067		}, null, value, arguments.length );
13068	},
13069
13070	append: function() {
13071		return domManip( this, arguments, function( elem ) {
13072			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
13073				var target = manipulationTarget( this, elem );
13074				target.appendChild( elem );
13075			}
13076		} );
13077	},
13078
13079	prepend: function() {
13080		return domManip( this, arguments, function( elem ) {
13081			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
13082				var target = manipulationTarget( this, elem );
13083				target.insertBefore( elem, target.firstChild );
13084			}
13085		} );
13086	},
13087
13088	before: function() {
13089		return domManip( this, arguments, function( elem ) {
13090			if ( this.parentNode ) {
13091				this.parentNode.insertBefore( elem, this );
13092			}
13093		} );
13094	},
13095
13096	after: function() {
13097		return domManip( this, arguments, function( elem ) {
13098			if ( this.parentNode ) {
13099				this.parentNode.insertBefore( elem, this.nextSibling );
13100			}
13101		} );
13102	},
13103
13104	empty: function() {
13105		var elem,
13106			i = 0;
13107
13108		for ( ; ( elem = this[ i ] ) != null; i++ ) {
13109
13110			// Remove element nodes and prevent memory leaks
13111			if ( elem.nodeType === 1 ) {
13112				jQuery.cleanData( getAll( elem, false ) );
13113			}
13114
13115			// Remove any remaining nodes
13116			while ( elem.firstChild ) {
13117				elem.removeChild( elem.firstChild );
13118			}
13119
13120			// If this is a select, ensure that it displays empty (#12336)
13121			// Support: IE<9
13122			if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
13123				elem.options.length = 0;
13124			}
13125		}
13126
13127		return this;
13128	},
13129
13130	clone: function( dataAndEvents, deepDataAndEvents ) {
13131		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
13132		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
13133
13134		return this.map( function() {
13135			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
13136		} );
13137	},
13138
13139	html: function( value ) {
13140		return access( this, function( value ) {
13141			var elem = this[ 0 ] || {},
13142				i = 0,
13143				l = this.length;
13144
13145			if ( value === undefined ) {
13146				return elem.nodeType === 1 ?
13147					elem.innerHTML.replace( rinlinejQuery, "" ) :
13148					undefined;
13149			}
13150
13151			// See if we can take a shortcut and just use innerHTML
13152			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
13153				( support.htmlSerialize || !rnoshimcache.test( value )  ) &&
13154				( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
13155				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
13156
13157				value = jQuery.htmlPrefilter( value );
13158
13159				try {
13160					for ( ; i < l; i++ ) {
13161
13162						// Remove element nodes and prevent memory leaks
13163						elem = this[ i ] || {};
13164						if ( elem.nodeType === 1 ) {
13165							jQuery.cleanData( getAll( elem, false ) );
13166							elem.innerHTML = value;
13167						}
13168					}
13169
13170					elem = 0;
13171
13172				// If using innerHTML throws an exception, use the fallback method
13173				} catch ( e ) {}
13174			}
13175
13176			if ( elem ) {
13177				this.empty().append( value );
13178			}
13179		}, null, value, arguments.length );
13180	},
13181
13182	replaceWith: function() {
13183		var ignored = [];
13184
13185		// Make the changes, replacing each non-ignored context element with the new content
13186		return domManip( this, arguments, function( elem ) {
13187			var parent = this.parentNode;
13188
13189			if ( jQuery.inArray( this, ignored ) < 0 ) {
13190				jQuery.cleanData( getAll( this ) );
13191				if ( parent ) {
13192					parent.replaceChild( elem, this );
13193				}
13194			}
13195
13196		// Force callback invocation
13197		}, ignored );
13198	}
13199} );
13200
13201jQuery.each( {
13202	appendTo: "append",
13203	prependTo: "prepend",
13204	insertBefore: "before",
13205	insertAfter: "after",
13206	replaceAll: "replaceWith"
13207}, function( name, original ) {
13208	jQuery.fn[ name ] = function( selector ) {
13209		var elems,
13210			i = 0,
13211			ret = [],
13212			insert = jQuery( selector ),
13213			last = insert.length - 1;
13214
13215		for ( ; i <= last; i++ ) {
13216			elems = i === last ? this : this.clone( true );
13217			jQuery( insert[ i ] )[ original ]( elems );
13218
13219			// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
13220			push.apply( ret, elems.get() );
13221		}
13222
13223		return this.pushStack( ret );
13224	};
13225} );
13226
13227
13228var iframe,
13229	elemdisplay = {
13230
13231		// Support: Firefox
13232		// We have to pre-define these values for FF (#10227)
13233		HTML: "block",
13234		BODY: "block"
13235	};
13236
13237/**
13238 * Retrieve the actual display of a element
13239 * @param {String} name nodeName of the element
13240 * @param {Object} doc Document object
13241 */
13242
13243// Called only from within defaultDisplay
13244function actualDisplay( name, doc ) {
13245	var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
13246
13247		display = jQuery.css( elem[ 0 ], "display" );
13248
13249	// We don't have any data stored on the element,
13250	// so use "detach" method as fast way to get rid of the element
13251	elem.detach();
13252
13253	return display;
13254}
13255
13256/**
13257 * Try to determine the default display value of an element
13258 * @param {String} nodeName
13259 */
13260function defaultDisplay( nodeName ) {
13261	var doc = document,
13262		display = elemdisplay[ nodeName ];
13263
13264	if ( !display ) {
13265		display = actualDisplay( nodeName, doc );
13266
13267		// If the simple way fails, read from inside an iframe
13268		if ( display === "none" || !display ) {
13269
13270			// Use the already-created iframe if possible
13271			iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
13272				.appendTo( doc.documentElement );
13273
13274			// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
13275			doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
13276
13277			// Support: IE
13278			doc.write();
13279			doc.close();
13280
13281			display = actualDisplay( nodeName, doc );
13282			iframe.detach();
13283		}
13284
13285		// Store the correct default display
13286		elemdisplay[ nodeName ] = display;
13287	}
13288
13289	return display;
13290}
13291var rmargin = ( /^margin/ );
13292
13293var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
13294
13295var swap = function( elem, options, callback, args ) {
13296	var ret, name,
13297		old = {};
13298
13299	// Remember the old values, and insert the new ones
13300	for ( name in options ) {
13301		old[ name ] = elem.style[ name ];
13302		elem.style[ name ] = options[ name ];
13303	}
13304
13305	ret = callback.apply( elem, args || [] );
13306
13307	// Revert the old values
13308	for ( name in options ) {
13309		elem.style[ name ] = old[ name ];
13310	}
13311
13312	return ret;
13313};
13314
13315
13316var documentElement = document.documentElement;
13317
13318
13319
13320( function() {
13321	var pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal,
13322		reliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal,
13323		container = document.createElement( "div" ),
13324		div = document.createElement( "div" );
13325
13326	// Finish early in limited (non-browser) environments
13327	if ( !div.style ) {
13328		return;
13329	}
13330
13331	div.style.cssText = "float:left;opacity:.5";
13332
13333	// Support: IE<9
13334	// Make sure that element opacity exists (as opposed to filter)
13335	support.opacity = div.style.opacity === "0.5";
13336
13337	// Verify style float existence
13338	// (IE uses styleFloat instead of cssFloat)
13339	support.cssFloat = !!div.style.cssFloat;
13340
13341	div.style.backgroundClip = "content-box";
13342	div.cloneNode( true ).style.backgroundClip = "";
13343	support.clearCloneStyle = div.style.backgroundClip === "content-box";
13344
13345	container = document.createElement( "div" );
13346	container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
13347		"padding:0;margin-top:1px;position:absolute";
13348	div.innerHTML = "";
13349	container.appendChild( div );
13350
13351	// Support: Firefox<29, Android 2.3
13352	// Vendor-prefix box-sizing
13353	support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" ||
13354		div.style.WebkitBoxSizing === "";
13355
13356	jQuery.extend( support, {
13357		reliableHiddenOffsets: function() {
13358			if ( pixelPositionVal == null ) {
13359				computeStyleTests();
13360			}
13361			return reliableHiddenOffsetsVal;
13362		},
13363
13364		boxSizingReliable: function() {
13365
13366			// We're checking for pixelPositionVal here instead of boxSizingReliableVal
13367			// since that compresses better and they're computed together anyway.
13368			if ( pixelPositionVal == null ) {
13369				computeStyleTests();
13370			}
13371			return boxSizingReliableVal;
13372		},
13373
13374		pixelMarginRight: function() {
13375
13376			// Support: Android 4.0-4.3
13377			if ( pixelPositionVal == null ) {
13378				computeStyleTests();
13379			}
13380			return pixelMarginRightVal;
13381		},
13382
13383		pixelPosition: function() {
13384			if ( pixelPositionVal == null ) {
13385				computeStyleTests();
13386			}
13387			return pixelPositionVal;
13388		},
13389
13390		reliableMarginRight: function() {
13391
13392			// Support: Android 2.3
13393			if ( pixelPositionVal == null ) {
13394				computeStyleTests();
13395			}
13396			return reliableMarginRightVal;
13397		},
13398
13399		reliableMarginLeft: function() {
13400
13401			// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
13402			if ( pixelPositionVal == null ) {
13403				computeStyleTests();
13404			}
13405			return reliableMarginLeftVal;
13406		}
13407	} );
13408
13409	function computeStyleTests() {
13410		var contents, divStyle,
13411			documentElement = document.documentElement;
13412
13413		// Setup
13414		documentElement.appendChild( container );
13415
13416		div.style.cssText =
13417
13418			// Support: Android 2.3
13419			// Vendor-prefix box-sizing
13420			"-webkit-box-sizing:border-box;box-sizing:border-box;" +
13421			"position:relative;display:block;" +
13422			"margin:auto;border:1px;padding:1px;" +
13423			"top:1%;width:50%";
13424
13425		// Support: IE<9
13426		// Assume reasonable values in the absence of getComputedStyle
13427		pixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false;
13428		pixelMarginRightVal = reliableMarginRightVal = true;
13429
13430		// Check for getComputedStyle so that this code is not run in IE<9.
13431		if ( window.getComputedStyle ) {
13432			divStyle = window.getComputedStyle( div );
13433			pixelPositionVal = ( divStyle || {} ).top !== "1%";
13434			reliableMarginLeftVal = ( divStyle || {} ).marginLeft === "2px";
13435			boxSizingReliableVal = ( divStyle || { width: "4px" } ).width === "4px";
13436
13437			// Support: Android 4.0 - 4.3 only
13438			// Some styles come back with percentage values, even though they shouldn't
13439			div.style.marginRight = "50%";
13440			pixelMarginRightVal = ( divStyle || { marginRight: "4px" } ).marginRight === "4px";
13441
13442			// Support: Android 2.3 only
13443			// Div with explicit width and no margin-right incorrectly
13444			// gets computed margin-right based on width of container (#3333)
13445			// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
13446			contents = div.appendChild( document.createElement( "div" ) );
13447
13448			// Reset CSS: box-sizing; display; margin; border; padding
13449			contents.style.cssText = div.style.cssText =
13450
13451				// Support: Android 2.3
13452				// Vendor-prefix box-sizing
13453				"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
13454				"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
13455			contents.style.marginRight = contents.style.width = "0";
13456			div.style.width = "1px";
13457
13458			reliableMarginRightVal =
13459				!parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );
13460
13461			div.removeChild( contents );
13462		}
13463
13464		// Support: IE6-8
13465		// First check that getClientRects works as expected
13466		// Check if table cells still have offsetWidth/Height when they are set
13467		// to display:none and there are still other visible table cells in a
13468		// table row; if so, offsetWidth/Height are not reliable for use when
13469		// determining if an element has been hidden directly using
13470		// display:none (it is still safe to use offsets if a parent element is
13471		// hidden; don safety goggles and see bug #4512 for more information).
13472		div.style.display = "none";
13473		reliableHiddenOffsetsVal = div.getClientRects().length === 0;
13474		if ( reliableHiddenOffsetsVal ) {
13475			div.style.display = "";
13476			div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
13477			div.childNodes[ 0 ].style.borderCollapse = "separate";
13478			contents = div.getElementsByTagName( "td" );
13479			contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";
13480			reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
13481			if ( reliableHiddenOffsetsVal ) {
13482				contents[ 0 ].style.display = "";
13483				contents[ 1 ].style.display = "none";
13484				reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
13485			}
13486		}
13487
13488		// Teardown
13489		documentElement.removeChild( container );
13490	}
13491
13492} )();
13493
13494
13495var getStyles, curCSS,
13496	rposition = /^(top|right|bottom|left)$/;
13497
13498if ( window.getComputedStyle ) {
13499	getStyles = function( elem ) {
13500
13501		// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
13502		// IE throws on elements created in popups
13503		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
13504		var view = elem.ownerDocument.defaultView;
13505
13506		if ( !view || !view.opener ) {
13507			view = window;
13508		}
13509
13510		return view.getComputedStyle( elem );
13511	};
13512
13513	curCSS = function( elem, name, computed ) {
13514		var width, minWidth, maxWidth, ret,
13515			style = elem.style;
13516
13517		computed = computed || getStyles( elem );
13518
13519		// getPropertyValue is only needed for .css('filter') in IE9, see #12537
13520		ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
13521
13522		// Support: Opera 12.1x only
13523		// Fall back to style even without computed
13524		// computed is undefined for elems on document fragments
13525		if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
13526			ret = jQuery.style( elem, name );
13527		}
13528
13529		if ( computed ) {
13530
13531			// A tribute to the "awesome hack by Dean Edwards"
13532			// Chrome < 17 and Safari 5.0 uses "computed value"
13533			// instead of "used value" for margin-right
13534			// Safari 5.1.7 (at least) returns percentage for a larger set of values,
13535			// but width seems to be reliably pixels
13536			// this is against the CSSOM draft spec:
13537			// http://dev.w3.org/csswg/cssom/#resolved-values
13538			if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
13539
13540				// Remember the original values
13541				width = style.width;
13542				minWidth = style.minWidth;
13543				maxWidth = style.maxWidth;
13544
13545				// Put in the new values to get a computed value out
13546				style.minWidth = style.maxWidth = style.width = ret;
13547				ret = computed.width;
13548
13549				// Revert the changed values
13550				style.width = width;
13551				style.minWidth = minWidth;
13552				style.maxWidth = maxWidth;
13553			}
13554		}
13555
13556		// Support: IE
13557		// IE returns zIndex value as an integer.
13558		return ret === undefined ?
13559			ret :
13560			ret + "";
13561	};
13562} else if ( documentElement.currentStyle ) {
13563	getStyles = function( elem ) {
13564		return elem.currentStyle;
13565	};
13566
13567	curCSS = function( elem, name, computed ) {
13568		var left, rs, rsLeft, ret,
13569			style = elem.style;
13570
13571		computed = computed || getStyles( elem );
13572		ret = computed ? computed[ name ] : undefined;
13573
13574		// Avoid setting ret to empty string here
13575		// so we don't default to auto
13576		if ( ret == null && style && style[ name ] ) {
13577			ret = style[ name ];
13578		}
13579
13580		// From the awesome hack by Dean Edwards
13581		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
13582
13583		// If we're not dealing with a regular pixel number
13584		// but a number that has a weird ending, we need to convert it to pixels
13585		// but not position css attributes, as those are
13586		// proportional to the parent element instead
13587		// and we can't measure the parent instead because it
13588		// might trigger a "stacking dolls" problem
13589		if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
13590
13591			// Remember the original values
13592			left = style.left;
13593			rs = elem.runtimeStyle;
13594			rsLeft = rs && rs.left;
13595
13596			// Put in the new values to get a computed value out
13597			if ( rsLeft ) {
13598				rs.left = elem.currentStyle.left;
13599			}
13600			style.left = name === "fontSize" ? "1em" : ret;
13601			ret = style.pixelLeft + "px";
13602
13603			// Revert the changed values
13604			style.left = left;
13605			if ( rsLeft ) {
13606				rs.left = rsLeft;
13607			}
13608		}
13609
13610		// Support: IE
13611		// IE returns zIndex value as an integer.
13612		return ret === undefined ?
13613			ret :
13614			ret + "" || "auto";
13615	};
13616}
13617
13618
13619
13620
13621function addGetHookIf( conditionFn, hookFn ) {
13622
13623	// Define the hook, we'll check on the first run if it's really needed.
13624	return {
13625		get: function() {
13626			if ( conditionFn() ) {
13627
13628				// Hook not needed (or it's not possible to use it due
13629				// to missing dependency), remove it.
13630				delete this.get;
13631				return;
13632			}
13633
13634			// Hook needed; redefine it so that the support test is not executed again.
13635			return ( this.get = hookFn ).apply( this, arguments );
13636		}
13637	};
13638}
13639
13640
13641var
13642
13643		ralpha = /alpha\([^)]*\)/i,
13644	ropacity = /opacity\s*=\s*([^)]*)/i,
13645
13646	// swappable if display is none or starts with table except
13647	// "table", "table-cell", or "table-caption"
13648	// see here for display values:
13649	// https://developer.mozilla.org/en-US/docs/CSS/display
13650	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
13651	rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
13652
13653	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
13654	cssNormalTransform = {
13655		letterSpacing: "0",
13656		fontWeight: "400"
13657	},
13658
13659	cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
13660	emptyStyle = document.createElement( "div" ).style;
13661
13662
13663// return a css property mapped to a potentially vendor prefixed property
13664function vendorPropName( name ) {
13665
13666	// shortcut for names that are not vendor prefixed
13667	if ( name in emptyStyle ) {
13668		return name;
13669	}
13670
13671	// check for vendor prefixed names
13672	var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),
13673		i = cssPrefixes.length;
13674
13675	while ( i-- ) {
13676		name = cssPrefixes[ i ] + capName;
13677		if ( name in emptyStyle ) {
13678			return name;
13679		}
13680	}
13681}
13682
13683function showHide( elements, show ) {
13684	var display, elem, hidden,
13685		values = [],
13686		index = 0,
13687		length = elements.length;
13688
13689	for ( ; index < length; index++ ) {
13690		elem = elements[ index ];
13691		if ( !elem.style ) {
13692			continue;
13693		}
13694
13695		values[ index ] = jQuery._data( elem, "olddisplay" );
13696		display = elem.style.display;
13697		if ( show ) {
13698
13699			// Reset the inline display of this element to learn if it is
13700			// being hidden by cascaded rules or not
13701			if ( !values[ index ] && display === "none" ) {
13702				elem.style.display = "";
13703			}
13704
13705			// Set elements which have been overridden with display: none
13706			// in a stylesheet to whatever the default browser style is
13707			// for such an element
13708			if ( elem.style.display === "" && isHidden( elem ) ) {
13709				values[ index ] =
13710					jQuery._data( elem, "olddisplay", defaultDisplay( elem.nodeName ) );
13711			}
13712		} else {
13713			hidden = isHidden( elem );
13714
13715			if ( display && display !== "none" || !hidden ) {
13716				jQuery._data(
13717					elem,
13718					"olddisplay",
13719					hidden ? display : jQuery.css( elem, "display" )
13720				);
13721			}
13722		}
13723	}
13724
13725	// Set the display of most of the elements in a second loop
13726	// to avoid the constant reflow
13727	for ( index = 0; index < length; index++ ) {
13728		elem = elements[ index ];
13729		if ( !elem.style ) {
13730			continue;
13731		}
13732		if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
13733			elem.style.display = show ? values[ index ] || "" : "none";
13734		}
13735	}
13736
13737	return elements;
13738}
13739
13740function setPositiveNumber( elem, value, subtract ) {
13741	var matches = rnumsplit.exec( value );
13742	return matches ?
13743
13744		// Guard against undefined "subtract", e.g., when used as in cssHooks
13745		Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
13746		value;
13747}
13748
13749function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
13750	var i = extra === ( isBorderBox ? "border" : "content" ) ?
13751
13752		// If we already have the right measurement, avoid augmentation
13753		4 :
13754
13755		// Otherwise initialize for horizontal or vertical properties
13756		name === "width" ? 1 : 0,
13757
13758		val = 0;
13759
13760	for ( ; i < 4; i += 2 ) {
13761
13762		// both box models exclude margin, so add it if we want it
13763		if ( extra === "margin" ) {
13764			val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
13765		}
13766
13767		if ( isBorderBox ) {
13768
13769			// border-box includes padding, so remove it if we want content
13770			if ( extra === "content" ) {
13771				val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
13772			}
13773
13774			// at this point, extra isn't border nor margin, so remove border
13775			if ( extra !== "margin" ) {
13776				val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
13777			}
13778		} else {
13779
13780			// at this point, extra isn't content, so add padding
13781			val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
13782
13783			// at this point, extra isn't content nor padding, so add border
13784			if ( extra !== "padding" ) {
13785				val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
13786			}
13787		}
13788	}
13789
13790	return val;
13791}
13792
13793function getWidthOrHeight( elem, name, extra ) {
13794
13795	// Start with offset property, which is equivalent to the border-box value
13796	var valueIsBorderBox = true,
13797		val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
13798		styles = getStyles( elem ),
13799		isBorderBox = support.boxSizing &&
13800			jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
13801
13802	// some non-html elements return undefined for offsetWidth, so check for null/undefined
13803	// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
13804	// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
13805	if ( val <= 0 || val == null ) {
13806
13807		// Fall back to computed then uncomputed css if necessary
13808		val = curCSS( elem, name, styles );
13809		if ( val < 0 || val == null ) {
13810			val = elem.style[ name ];
13811		}
13812
13813		// Computed unit is not pixels. Stop here and return.
13814		if ( rnumnonpx.test( val ) ) {
13815			return val;
13816		}
13817
13818		// we need the check for style in case a browser which returns unreliable values
13819		// for getComputedStyle silently falls back to the reliable elem.style
13820		valueIsBorderBox = isBorderBox &&
13821			( support.boxSizingReliable() || val === elem.style[ name ] );
13822
13823		// Normalize "", auto, and prepare for extra
13824		val = parseFloat( val ) || 0;
13825	}
13826
13827	// use the active box-sizing model to add/subtract irrelevant styles
13828	return ( val +
13829		augmentWidthOrHeight(
13830			elem,
13831			name,
13832			extra || ( isBorderBox ? "border" : "content" ),
13833			valueIsBorderBox,
13834			styles
13835		)
13836	) + "px";
13837}
13838
13839jQuery.extend( {
13840
13841	// Add in style property hooks for overriding the default
13842	// behavior of getting and setting a style property
13843	cssHooks: {
13844		opacity: {
13845			get: function( elem, computed ) {
13846				if ( computed ) {
13847
13848					// We should always get a number back from opacity
13849					var ret = curCSS( elem, "opacity" );
13850					return ret === "" ? "1" : ret;
13851				}
13852			}
13853		}
13854	},
13855
13856	// Don't automatically add "px" to these possibly-unitless properties
13857	cssNumber: {
13858		"animationIterationCount": true,
13859		"columnCount": true,
13860		"fillOpacity": true,
13861		"flexGrow": true,
13862		"flexShrink": true,
13863		"fontWeight": true,
13864		"lineHeight": true,
13865		"opacity": true,
13866		"order": true,
13867		"orphans": true,
13868		"widows": true,
13869		"zIndex": true,
13870		"zoom": true
13871	},
13872
13873	// Add in properties whose names you wish to fix before
13874	// setting or getting the value
13875	cssProps: {
13876
13877		// normalize float css property
13878		"float": support.cssFloat ? "cssFloat" : "styleFloat"
13879	},
13880
13881	// Get and set the style property on a DOM Node
13882	style: function( elem, name, value, extra ) {
13883
13884		// Don't set styles on text and comment nodes
13885		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
13886			return;
13887		}
13888
13889		// Make sure that we're working with the right name
13890		var ret, type, hooks,
13891			origName = jQuery.camelCase( name ),
13892			style = elem.style;
13893
13894		name = jQuery.cssProps[ origName ] ||
13895			( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
13896
13897		// gets hook for the prefixed version
13898		// followed by the unprefixed version
13899		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
13900
13901		// Check if we're setting a value
13902		if ( value !== undefined ) {
13903			type = typeof value;
13904
13905			// Convert "+=" or "-=" to relative numbers (#7345)
13906			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
13907				value = adjustCSS( elem, name, ret );
13908
13909				// Fixes bug #9237
13910				type = "number";
13911			}
13912
13913			// Make sure that null and NaN values aren't set. See: #7116
13914			if ( value == null || value !== value ) {
13915				return;
13916			}
13917
13918			// If a number was passed in, add the unit (except for certain CSS properties)
13919			if ( type === "number" ) {
13920				value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
13921			}
13922
13923			// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
13924			// but it would mean to define eight
13925			// (for every problematic property) identical functions
13926			if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
13927				style[ name ] = "inherit";
13928			}
13929
13930			// If a hook was provided, use that value, otherwise just set the specified value
13931			if ( !hooks || !( "set" in hooks ) ||
13932				( value = hooks.set( elem, value, extra ) ) !== undefined ) {
13933
13934				// Support: IE
13935				// Swallow errors from 'invalid' CSS values (#5509)
13936				try {
13937					style[ name ] = value;
13938				} catch ( e ) {}
13939			}
13940
13941		} else {
13942
13943			// If a hook was provided get the non-computed value from there
13944			if ( hooks && "get" in hooks &&
13945				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
13946
13947				return ret;
13948			}
13949
13950			// Otherwise just get the value from the style object
13951			return style[ name ];
13952		}
13953	},
13954
13955	css: function( elem, name, extra, styles ) {
13956		var num, val, hooks,
13957			origName = jQuery.camelCase( name );
13958
13959		// Make sure that we're working with the right name
13960		name = jQuery.cssProps[ origName ] ||
13961			( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
13962
13963		// gets hook for the prefixed version
13964		// followed by the unprefixed version
13965		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
13966
13967		// If a hook was provided get the computed value from there
13968		if ( hooks && "get" in hooks ) {
13969			val = hooks.get( elem, true, extra );
13970		}
13971
13972		// Otherwise, if a way to get the computed value exists, use that
13973		if ( val === undefined ) {
13974			val = curCSS( elem, name, styles );
13975		}
13976
13977		//convert "normal" to computed value
13978		if ( val === "normal" && name in cssNormalTransform ) {
13979			val = cssNormalTransform[ name ];
13980		}
13981
13982		// Return, converting to number if forced or a qualifier was provided and val looks numeric
13983		if ( extra === "" || extra ) {
13984			num = parseFloat( val );
13985			return extra === true || isFinite( num ) ? num || 0 : val;
13986		}
13987		return val;
13988	}
13989} );
13990
13991jQuery.each( [ "height", "width" ], function( i, name ) {
13992	jQuery.cssHooks[ name ] = {
13993		get: function( elem, computed, extra ) {
13994			if ( computed ) {
13995
13996				// certain elements can have dimension info if we invisibly show them
13997				// however, it must have a current display style that would benefit from this
13998				return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
13999					elem.offsetWidth === 0 ?
14000						swap( elem, cssShow, function() {
14001							return getWidthOrHeight( elem, name, extra );
14002						} ) :
14003						getWidthOrHeight( elem, name, extra );
14004			}
14005		},
14006
14007		set: function( elem, value, extra ) {
14008			var styles = extra && getStyles( elem );
14009			return setPositiveNumber( elem, value, extra ?
14010				augmentWidthOrHeight(
14011					elem,
14012					name,
14013					extra,
14014					support.boxSizing &&
14015						jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
14016					styles
14017				) : 0
14018			);
14019		}
14020	};
14021} );
14022
14023if ( !support.opacity ) {
14024	jQuery.cssHooks.opacity = {
14025		get: function( elem, computed ) {
14026
14027			// IE uses filters for opacity
14028			return ropacity.test( ( computed && elem.currentStyle ?
14029				elem.currentStyle.filter :
14030				elem.style.filter ) || "" ) ?
14031					( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
14032					computed ? "1" : "";
14033		},
14034
14035		set: function( elem, value ) {
14036			var style = elem.style,
14037				currentStyle = elem.currentStyle,
14038				opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
14039				filter = currentStyle && currentStyle.filter || style.filter || "";
14040
14041			// IE has trouble with opacity if it does not have layout
14042			// Force it by setting the zoom level
14043			style.zoom = 1;
14044
14045			// if setting opacity to 1, and no other filters exist -
14046			// attempt to remove filter attribute #6652
14047			// if value === "", then remove inline opacity #12685
14048			if ( ( value >= 1 || value === "" ) &&
14049					jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
14050					style.removeAttribute ) {
14051
14052				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
14053				// if "filter:" is present at all, clearType is disabled, we want to avoid this
14054				// style.removeAttribute is IE Only, but so apparently is this code path...
14055				style.removeAttribute( "filter" );
14056
14057				// if there is no filter style applied in a css rule
14058				// or unset inline opacity, we are done
14059				if ( value === "" || currentStyle && !currentStyle.filter ) {
14060					return;
14061				}
14062			}
14063
14064			// otherwise, set new filter values
14065			style.filter = ralpha.test( filter ) ?
14066				filter.replace( ralpha, opacity ) :
14067				filter + " " + opacity;
14068		}
14069	};
14070}
14071
14072jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
14073	function( elem, computed ) {
14074		if ( computed ) {
14075			return swap( elem, { "display": "inline-block" },
14076				curCSS, [ elem, "marginRight" ] );
14077		}
14078	}
14079);
14080
14081jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
14082	function( elem, computed ) {
14083		if ( computed ) {
14084			return (
14085				parseFloat( curCSS( elem, "marginLeft" ) ) ||
14086
14087				// Support: IE<=11+
14088				// Running getBoundingClientRect on a disconnected node in IE throws an error
14089				// Support: IE8 only
14090				// getClientRects() errors on disconnected elems
14091				( jQuery.contains( elem.ownerDocument, elem ) ?
14092					elem.getBoundingClientRect().left -
14093						swap( elem, { marginLeft: 0 }, function() {
14094							return elem.getBoundingClientRect().left;
14095						} ) :
14096					0
14097				)
14098			) + "px";
14099		}
14100	}
14101);
14102
14103// These hooks are used by animate to expand properties
14104jQuery.each( {
14105	margin: "",
14106	padding: "",
14107	border: "Width"
14108}, function( prefix, suffix ) {
14109	jQuery.cssHooks[ prefix + suffix ] = {
14110		expand: function( value ) {
14111			var i = 0,
14112				expanded = {},
14113
14114				// assumes a single number if not a string
14115				parts = typeof value === "string" ? value.split( " " ) : [ value ];
14116
14117			for ( ; i < 4; i++ ) {
14118				expanded[ prefix + cssExpand[ i ] + suffix ] =
14119					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
14120			}
14121
14122			return expanded;
14123		}
14124	};
14125
14126	if ( !rmargin.test( prefix ) ) {
14127		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
14128	}
14129} );
14130
14131jQuery.fn.extend( {
14132	css: function( name, value ) {
14133		return access( this, function( elem, name, value ) {
14134			var styles, len,
14135				map = {},
14136				i = 0;
14137
14138			if ( jQuery.isArray( name ) ) {
14139				styles = getStyles( elem );
14140				len = name.length;
14141
14142				for ( ; i < len; i++ ) {
14143					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
14144				}
14145
14146				return map;
14147			}
14148
14149			return value !== undefined ?
14150				jQuery.style( elem, name, value ) :
14151				jQuery.css( elem, name );
14152		}, name, value, arguments.length > 1 );
14153	},
14154	show: function() {
14155		return showHide( this, true );
14156	},
14157	hide: function() {
14158		return showHide( this );
14159	},
14160	toggle: function( state ) {
14161		if ( typeof state === "boolean" ) {
14162			return state ? this.show() : this.hide();
14163		}
14164
14165		return this.each( function() {
14166			if ( isHidden( this ) ) {
14167				jQuery( this ).show();
14168			} else {
14169				jQuery( this ).hide();
14170			}
14171		} );
14172	}
14173} );
14174
14175
14176function Tween( elem, options, prop, end, easing ) {
14177	return new Tween.prototype.init( elem, options, prop, end, easing );
14178}
14179jQuery.Tween = Tween;
14180
14181Tween.prototype = {
14182	constructor: Tween,
14183	init: function( elem, options, prop, end, easing, unit ) {
14184		this.elem = elem;
14185		this.prop = prop;
14186		this.easing = easing || jQuery.easing._default;
14187		this.options = options;
14188		this.start = this.now = this.cur();
14189		this.end = end;
14190		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
14191	},
14192	cur: function() {
14193		var hooks = Tween.propHooks[ this.prop ];
14194
14195		return hooks && hooks.get ?
14196			hooks.get( this ) :
14197			Tween.propHooks._default.get( this );
14198	},
14199	run: function( percent ) {
14200		var eased,
14201			hooks = Tween.propHooks[ this.prop ];
14202
14203		if ( this.options.duration ) {
14204			this.pos = eased = jQuery.easing[ this.easing ](
14205				percent, this.options.duration * percent, 0, 1, this.options.duration
14206			);
14207		} else {
14208			this.pos = eased = percent;
14209		}
14210		this.now = ( this.end - this.start ) * eased + this.start;
14211
14212		if ( this.options.step ) {
14213			this.options.step.call( this.elem, this.now, this );
14214		}
14215
14216		if ( hooks && hooks.set ) {
14217			hooks.set( this );
14218		} else {
14219			Tween.propHooks._default.set( this );
14220		}
14221		return this;
14222	}
14223};
14224
14225Tween.prototype.init.prototype = Tween.prototype;
14226
14227Tween.propHooks = {
14228	_default: {
14229		get: function( tween ) {
14230			var result;
14231
14232			// Use a property on the element directly when it is not a DOM element,
14233			// or when there is no matching style property that exists.
14234			if ( tween.elem.nodeType !== 1 ||
14235				tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
14236				return tween.elem[ tween.prop ];
14237			}
14238
14239			// passing an empty string as a 3rd parameter to .css will automatically
14240			// attempt a parseFloat and fallback to a string if the parse fails
14241			// so, simple values such as "10px" are parsed to Float.
14242			// complex values such as "rotate(1rad)" are returned as is.
14243			result = jQuery.css( tween.elem, tween.prop, "" );
14244
14245			// Empty strings, null, undefined and "auto" are converted to 0.
14246			return !result || result === "auto" ? 0 : result;
14247		},
14248		set: function( tween ) {
14249
14250			// use step hook for back compat - use cssHook if its there - use .style if its
14251			// available and use plain properties where available
14252			if ( jQuery.fx.step[ tween.prop ] ) {
14253				jQuery.fx.step[ tween.prop ]( tween );
14254			} else if ( tween.elem.nodeType === 1 &&
14255				( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
14256					jQuery.cssHooks[ tween.prop ] ) ) {
14257				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
14258			} else {
14259				tween.elem[ tween.prop ] = tween.now;
14260			}
14261		}
14262	}
14263};
14264
14265// Support: IE <=9
14266// Panic based approach to setting things on disconnected nodes
14267
14268Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
14269	set: function( tween ) {
14270		if ( tween.elem.nodeType && tween.elem.parentNode ) {
14271			tween.elem[ tween.prop ] = tween.now;
14272		}
14273	}
14274};
14275
14276jQuery.easing = {
14277	linear: function( p ) {
14278		return p;
14279	},
14280	swing: function( p ) {
14281		return 0.5 - Math.cos( p * Math.PI ) / 2;
14282	},
14283	_default: "swing"
14284};
14285
14286jQuery.fx = Tween.prototype.init;
14287
14288// Back Compat <1.8 extension point
14289jQuery.fx.step = {};
14290
14291
14292
14293
14294var
14295	fxNow, timerId,
14296	rfxtypes = /^(?:toggle|show|hide)$/,
14297	rrun = /queueHooks$/;
14298
14299// Animations created synchronously will run synchronously
14300function createFxNow() {
14301	window.setTimeout( function() {
14302		fxNow = undefined;
14303	} );
14304	return ( fxNow = jQuery.now() );
14305}
14306
14307// Generate parameters to create a standard animation
14308function genFx( type, includeWidth ) {
14309	var which,
14310		attrs = { height: type },
14311		i = 0;
14312
14313	// if we include width, step value is 1 to do all cssExpand values,
14314	// if we don't include width, step value is 2 to skip over Left and Right
14315	includeWidth = includeWidth ? 1 : 0;
14316	for ( ; i < 4 ; i += 2 - includeWidth ) {
14317		which = cssExpand[ i ];
14318		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
14319	}
14320
14321	if ( includeWidth ) {
14322		attrs.opacity = attrs.width = type;
14323	}
14324
14325	return attrs;
14326}
14327
14328function createTween( value, prop, animation ) {
14329	var tween,
14330		collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
14331		index = 0,
14332		length = collection.length;
14333	for ( ; index < length; index++ ) {
14334		if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
14335
14336			// we're done with this property
14337			return tween;
14338		}
14339	}
14340}
14341
14342function defaultPrefilter( elem, props, opts ) {
14343	/* jshint validthis: true */
14344	var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
14345		anim = this,
14346		orig = {},
14347		style = elem.style,
14348		hidden = elem.nodeType && isHidden( elem ),
14349		dataShow = jQuery._data( elem, "fxshow" );
14350
14351	// handle queue: false promises
14352	if ( !opts.queue ) {
14353		hooks = jQuery._queueHooks( elem, "fx" );
14354		if ( hooks.unqueued == null ) {
14355			hooks.unqueued = 0;
14356			oldfire = hooks.empty.fire;
14357			hooks.empty.fire = function() {
14358				if ( !hooks.unqueued ) {
14359					oldfire();
14360				}
14361			};
14362		}
14363		hooks.unqueued++;
14364
14365		anim.always( function() {
14366
14367			// doing this makes sure that the complete handler will be called
14368			// before this completes
14369			anim.always( function() {
14370				hooks.unqueued--;
14371				if ( !jQuery.queue( elem, "fx" ).length ) {
14372					hooks.empty.fire();
14373				}
14374			} );
14375		} );
14376	}
14377
14378	// height/width overflow pass
14379	if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
14380
14381		// Make sure that nothing sneaks out
14382		// Record all 3 overflow attributes because IE does not
14383		// change the overflow attribute when overflowX and
14384		// overflowY are set to the same value
14385		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
14386
14387		// Set display property to inline-block for height/width
14388		// animations on inline elements that are having width/height animated
14389		display = jQuery.css( elem, "display" );
14390
14391		// Test default display if display is currently "none"
14392		checkDisplay = display === "none" ?
14393			jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
14394
14395		if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
14396
14397			// inline-level elements accept inline-block;
14398			// block-level elements need to be inline with layout
14399			if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
14400				style.display = "inline-block";
14401			} else {
14402				style.zoom = 1;
14403			}
14404		}
14405	}
14406
14407	if ( opts.overflow ) {
14408		style.overflow = "hidden";
14409		if ( !support.shrinkWrapBlocks() ) {
14410			anim.always( function() {
14411				style.overflow = opts.overflow[ 0 ];
14412				style.overflowX = opts.overflow[ 1 ];
14413				style.overflowY = opts.overflow[ 2 ];
14414			} );
14415		}
14416	}
14417
14418	// show/hide pass
14419	for ( prop in props ) {
14420		value = props[ prop ];
14421		if ( rfxtypes.exec( value ) ) {
14422			delete props[ prop ];
14423			toggle = toggle || value === "toggle";
14424			if ( value === ( hidden ? "hide" : "show" ) ) {
14425
14426				// If there is dataShow left over from a stopped hide or show
14427				// and we are going to proceed with show, we should pretend to be hidden
14428				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
14429					hidden = true;
14430				} else {
14431					continue;
14432				}
14433			}
14434			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
14435
14436		// Any non-fx value stops us from restoring the original display value
14437		} else {
14438			display = undefined;
14439		}
14440	}
14441
14442	if ( !jQuery.isEmptyObject( orig ) ) {
14443		if ( dataShow ) {
14444			if ( "hidden" in dataShow ) {
14445				hidden = dataShow.hidden;
14446			}
14447		} else {
14448			dataShow = jQuery._data( elem, "fxshow", {} );
14449		}
14450
14451		// store state if its toggle - enables .stop().toggle() to "reverse"
14452		if ( toggle ) {
14453			dataShow.hidden = !hidden;
14454		}
14455		if ( hidden ) {
14456			jQuery( elem ).show();
14457		} else {
14458			anim.done( function() {
14459				jQuery( elem ).hide();
14460			} );
14461		}
14462		anim.done( function() {
14463			var prop;
14464			jQuery._removeData( elem, "fxshow" );
14465			for ( prop in orig ) {
14466				jQuery.style( elem, prop, orig[ prop ] );
14467			}
14468		} );
14469		for ( prop in orig ) {
14470			tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
14471
14472			if ( !( prop in dataShow ) ) {
14473				dataShow[ prop ] = tween.start;
14474				if ( hidden ) {
14475					tween.end = tween.start;
14476					tween.start = prop === "width" || prop === "height" ? 1 : 0;
14477				}
14478			}
14479		}
14480
14481	// If this is a noop like .hide().hide(), restore an overwritten display value
14482	} else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : display ) === "inline" ) {
14483		style.display = display;
14484	}
14485}
14486
14487function propFilter( props, specialEasing ) {
14488	var index, name, easing, value, hooks;
14489
14490	// camelCase, specialEasing and expand cssHook pass
14491	for ( index in props ) {
14492		name = jQuery.camelCase( index );
14493		easing = specialEasing[ name ];
14494		value = props[ index ];
14495		if ( jQuery.isArray( value ) ) {
14496			easing = value[ 1 ];
14497			value = props[ index ] = value[ 0 ];
14498		}
14499
14500		if ( index !== name ) {
14501			props[ name ] = value;
14502			delete props[ index ];
14503		}
14504
14505		hooks = jQuery.cssHooks[ name ];
14506		if ( hooks && "expand" in hooks ) {
14507			value = hooks.expand( value );
14508			delete props[ name ];
14509
14510			// not quite $.extend, this wont overwrite keys already present.
14511			// also - reusing 'index' from above because we have the correct "name"
14512			for ( index in value ) {
14513				if ( !( index in props ) ) {
14514					props[ index ] = value[ index ];
14515					specialEasing[ index ] = easing;
14516				}
14517			}
14518		} else {
14519			specialEasing[ name ] = easing;
14520		}
14521	}
14522}
14523
14524function Animation( elem, properties, options ) {
14525	var result,
14526		stopped,
14527		index = 0,
14528		length = Animation.prefilters.length,
14529		deferred = jQuery.Deferred().always( function() {
14530
14531			// don't match elem in the :animated selector
14532			delete tick.elem;
14533		} ),
14534		tick = function() {
14535			if ( stopped ) {
14536				return false;
14537			}
14538			var currentTime = fxNow || createFxNow(),
14539				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
14540
14541				// Support: Android 2.3
14542				// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
14543				temp = remaining / animation.duration || 0,
14544				percent = 1 - temp,
14545				index = 0,
14546				length = animation.tweens.length;
14547
14548			for ( ; index < length ; index++ ) {
14549				animation.tweens[ index ].run( percent );
14550			}
14551
14552			deferred.notifyWith( elem, [ animation, percent, remaining ] );
14553
14554			if ( percent < 1 && length ) {
14555				return remaining;
14556			} else {
14557				deferred.resolveWith( elem, [ animation ] );
14558				return false;
14559			}
14560		},
14561		animation = deferred.promise( {
14562			elem: elem,
14563			props: jQuery.extend( {}, properties ),
14564			opts: jQuery.extend( true, {
14565				specialEasing: {},
14566				easing: jQuery.easing._default
14567			}, options ),
14568			originalProperties: properties,
14569			originalOptions: options,
14570			startTime: fxNow || createFxNow(),
14571			duration: options.duration,
14572			tweens: [],
14573			createTween: function( prop, end ) {
14574				var tween = jQuery.Tween( elem, animation.opts, prop, end,
14575						animation.opts.specialEasing[ prop ] || animation.opts.easing );
14576				animation.tweens.push( tween );
14577				return tween;
14578			},
14579			stop: function( gotoEnd ) {
14580				var index = 0,
14581
14582					// if we are going to the end, we want to run all the tweens
14583					// otherwise we skip this part
14584					length = gotoEnd ? animation.tweens.length : 0;
14585				if ( stopped ) {
14586					return this;
14587				}
14588				stopped = true;
14589				for ( ; index < length ; index++ ) {
14590					animation.tweens[ index ].run( 1 );
14591				}
14592
14593				// resolve when we played the last frame
14594				// otherwise, reject
14595				if ( gotoEnd ) {
14596					deferred.notifyWith( elem, [ animation, 1, 0 ] );
14597					deferred.resolveWith( elem, [ animation, gotoEnd ] );
14598				} else {
14599					deferred.rejectWith( elem, [ animation, gotoEnd ] );
14600				}
14601				return this;
14602			}
14603		} ),
14604		props = animation.props;
14605
14606	propFilter( props, animation.opts.specialEasing );
14607
14608	for ( ; index < length ; index++ ) {
14609		result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
14610		if ( result ) {
14611			if ( jQuery.isFunction( result.stop ) ) {
14612				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
14613					jQuery.proxy( result.stop, result );
14614			}
14615			return result;
14616		}
14617	}
14618
14619	jQuery.map( props, createTween, animation );
14620
14621	if ( jQuery.isFunction( animation.opts.start ) ) {
14622		animation.opts.start.call( elem, animation );
14623	}
14624
14625	jQuery.fx.timer(
14626		jQuery.extend( tick, {
14627			elem: elem,
14628			anim: animation,
14629			queue: animation.opts.queue
14630		} )
14631	);
14632
14633	// attach callbacks from options
14634	return animation.progress( animation.opts.progress )
14635		.done( animation.opts.done, animation.opts.complete )
14636		.fail( animation.opts.fail )
14637		.always( animation.opts.always );
14638}
14639
14640jQuery.Animation = jQuery.extend( Animation, {
14641
14642	tweeners: {
14643		"*": [ function( prop, value ) {
14644			var tween = this.createTween( prop, value );
14645			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
14646			return tween;
14647		} ]
14648	},
14649
14650	tweener: function( props, callback ) {
14651		if ( jQuery.isFunction( props ) ) {
14652			callback = props;
14653			props = [ "*" ];
14654		} else {
14655			props = props.match( rnotwhite );
14656		}
14657
14658		var prop,
14659			index = 0,
14660			length = props.length;
14661
14662		for ( ; index < length ; index++ ) {
14663			prop = props[ index ];
14664			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
14665			Animation.tweeners[ prop ].unshift( callback );
14666		}
14667	},
14668
14669	prefilters: [ defaultPrefilter ],
14670
14671	prefilter: function( callback, prepend ) {
14672		if ( prepend ) {
14673			Animation.prefilters.unshift( callback );
14674		} else {
14675			Animation.prefilters.push( callback );
14676		}
14677	}
14678} );
14679
14680jQuery.speed = function( speed, easing, fn ) {
14681	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
14682		complete: fn || !fn && easing ||
14683			jQuery.isFunction( speed ) && speed,
14684		duration: speed,
14685		easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
14686	};
14687
14688	opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
14689		opt.duration in jQuery.fx.speeds ?
14690			jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
14691
14692	// normalize opt.queue - true/undefined/null -> "fx"
14693	if ( opt.queue == null || opt.queue === true ) {
14694		opt.queue = "fx";
14695	}
14696
14697	// Queueing
14698	opt.old = opt.complete;
14699
14700	opt.complete = function() {
14701		if ( jQuery.isFunction( opt.old ) ) {
14702			opt.old.call( this );
14703		}
14704
14705		if ( opt.queue ) {
14706			jQuery.dequeue( this, opt.queue );
14707		}
14708	};
14709
14710	return opt;
14711};
14712
14713jQuery.fn.extend( {
14714	fadeTo: function( speed, to, easing, callback ) {
14715
14716		// show any hidden elements after setting opacity to 0
14717		return this.filter( isHidden ).css( "opacity", 0 ).show()
14718
14719			// animate to the value specified
14720			.end().animate( { opacity: to }, speed, easing, callback );
14721	},
14722	animate: function( prop, speed, easing, callback ) {
14723		var empty = jQuery.isEmptyObject( prop ),
14724			optall = jQuery.speed( speed, easing, callback ),
14725			doAnimation = function() {
14726
14727				// Operate on a copy of prop so per-property easing won't be lost
14728				var anim = Animation( this, jQuery.extend( {}, prop ), optall );
14729
14730				// Empty animations, or finishing resolves immediately
14731				if ( empty || jQuery._data( this, "finish" ) ) {
14732					anim.stop( true );
14733				}
14734			};
14735			doAnimation.finish = doAnimation;
14736
14737		return empty || optall.queue === false ?
14738			this.each( doAnimation ) :
14739			this.queue( optall.queue, doAnimation );
14740	},
14741	stop: function( type, clearQueue, gotoEnd ) {
14742		var stopQueue = function( hooks ) {
14743			var stop = hooks.stop;
14744			delete hooks.stop;
14745			stop( gotoEnd );
14746		};
14747
14748		if ( typeof type !== "string" ) {
14749			gotoEnd = clearQueue;
14750			clearQueue = type;
14751			type = undefined;
14752		}
14753		if ( clearQueue && type !== false ) {
14754			this.queue( type || "fx", [] );
14755		}
14756
14757		return this.each( function() {
14758			var dequeue = true,
14759				index = type != null && type + "queueHooks",
14760				timers = jQuery.timers,
14761				data = jQuery._data( this );
14762
14763			if ( index ) {
14764				if ( data[ index ] && data[ index ].stop ) {
14765					stopQueue( data[ index ] );
14766				}
14767			} else {
14768				for ( index in data ) {
14769					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
14770						stopQueue( data[ index ] );
14771					}
14772				}
14773			}
14774
14775			for ( index = timers.length; index--; ) {
14776				if ( timers[ index ].elem === this &&
14777					( type == null || timers[ index ].queue === type ) ) {
14778
14779					timers[ index ].anim.stop( gotoEnd );
14780					dequeue = false;
14781					timers.splice( index, 1 );
14782				}
14783			}
14784
14785			// start the next in the queue if the last step wasn't forced
14786			// timers currently will call their complete callbacks, which will dequeue
14787			// but only if they were gotoEnd
14788			if ( dequeue || !gotoEnd ) {
14789				jQuery.dequeue( this, type );
14790			}
14791		} );
14792	},
14793	finish: function( type ) {
14794		if ( type !== false ) {
14795			type = type || "fx";
14796		}
14797		return this.each( function() {
14798			var index,
14799				data = jQuery._data( this ),
14800				queue = data[ type + "queue" ],
14801				hooks = data[ type + "queueHooks" ],
14802				timers = jQuery.timers,
14803				length = queue ? queue.length : 0;
14804
14805			// enable finishing flag on private data
14806			data.finish = true;
14807
14808			// empty the queue first
14809			jQuery.queue( this, type, [] );
14810
14811			if ( hooks && hooks.stop ) {
14812				hooks.stop.call( this, true );
14813			}
14814
14815			// look for any active animations, and finish them
14816			for ( index = timers.length; index--; ) {
14817				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
14818					timers[ index ].anim.stop( true );
14819					timers.splice( index, 1 );
14820				}
14821			}
14822
14823			// look for any animations in the old queue and finish them
14824			for ( index = 0; index < length; index++ ) {
14825				if ( queue[ index ] && queue[ index ].finish ) {
14826					queue[ index ].finish.call( this );
14827				}
14828			}
14829
14830			// turn off finishing flag
14831			delete data.finish;
14832		} );
14833	}
14834} );
14835
14836jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
14837	var cssFn = jQuery.fn[ name ];
14838	jQuery.fn[ name ] = function( speed, easing, callback ) {
14839		return speed == null || typeof speed === "boolean" ?
14840			cssFn.apply( this, arguments ) :
14841			this.animate( genFx( name, true ), speed, easing, callback );
14842	};
14843} );
14844
14845// Generate shortcuts for custom animations
14846jQuery.each( {
14847	slideDown: genFx( "show" ),
14848	slideUp: genFx( "hide" ),
14849	slideToggle: genFx( "toggle" ),
14850	fadeIn: { opacity: "show" },
14851	fadeOut: { opacity: "hide" },
14852	fadeToggle: { opacity: "toggle" }
14853}, function( name, props ) {
14854	jQuery.fn[ name ] = function( speed, easing, callback ) {
14855		return this.animate( props, speed, easing, callback );
14856	};
14857} );
14858
14859jQuery.timers = [];
14860jQuery.fx.tick = function() {
14861	var timer,
14862		timers = jQuery.timers,
14863		i = 0;
14864
14865	fxNow = jQuery.now();
14866
14867	for ( ; i < timers.length; i++ ) {
14868		timer = timers[ i ];
14869
14870		// Checks the timer has not already been removed
14871		if ( !timer() && timers[ i ] === timer ) {
14872			timers.splice( i--, 1 );
14873		}
14874	}
14875
14876	if ( !timers.length ) {
14877		jQuery.fx.stop();
14878	}
14879	fxNow = undefined;
14880};
14881
14882jQuery.fx.timer = function( timer ) {
14883	jQuery.timers.push( timer );
14884	if ( timer() ) {
14885		jQuery.fx.start();
14886	} else {
14887		jQuery.timers.pop();
14888	}
14889};
14890
14891jQuery.fx.interval = 13;
14892
14893jQuery.fx.start = function() {
14894	if ( !timerId ) {
14895		timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
14896	}
14897};
14898
14899jQuery.fx.stop = function() {
14900	window.clearInterval( timerId );
14901	timerId = null;
14902};
14903
14904jQuery.fx.speeds = {
14905	slow: 600,
14906	fast: 200,
14907
14908	// Default speed
14909	_default: 400
14910};
14911
14912
14913// Based off of the plugin by Clint Helfers, with permission.
14914// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
14915jQuery.fn.delay = function( time, type ) {
14916	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
14917	type = type || "fx";
14918
14919	return this.queue( type, function( next, hooks ) {
14920		var timeout = window.setTimeout( next, time );
14921		hooks.stop = function() {
14922			window.clearTimeout( timeout );
14923		};
14924	} );
14925};
14926
14927
14928( function() {
14929	var a,
14930		input = document.createElement( "input" ),
14931		div = document.createElement( "div" ),
14932		select = document.createElement( "select" ),
14933		opt = select.appendChild( document.createElement( "option" ) );
14934
14935	// Setup
14936	div = document.createElement( "div" );
14937	div.setAttribute( "className", "t" );
14938	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
14939	a = div.getElementsByTagName( "a" )[ 0 ];
14940
14941	// Support: Windows Web Apps (WWA)
14942	// `type` must use .setAttribute for WWA (#14901)
14943	input.setAttribute( "type", "checkbox" );
14944	div.appendChild( input );
14945
14946	a = div.getElementsByTagName( "a" )[ 0 ];
14947
14948	// First batch of tests.
14949	a.style.cssText = "top:1px";
14950
14951	// Test setAttribute on camelCase class.
14952	// If it works, we need attrFixes when doing get/setAttribute (ie6/7)
14953	support.getSetAttribute = div.className !== "t";
14954
14955	// Get the style information from getAttribute
14956	// (IE uses .cssText instead)
14957	support.style = /top/.test( a.getAttribute( "style" ) );
14958
14959	// Make sure that URLs aren't manipulated
14960	// (IE normalizes it by default)
14961	support.hrefNormalized = a.getAttribute( "href" ) === "/a";
14962
14963	// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
14964	support.checkOn = !!input.value;
14965
14966	// Make sure that a selected-by-default option has a working selected property.
14967	// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
14968	support.optSelected = opt.selected;
14969
14970	// Tests for enctype support on a form (#6743)
14971	support.enctype = !!document.createElement( "form" ).enctype;
14972
14973	// Make sure that the options inside disabled selects aren't marked as disabled
14974	// (WebKit marks them as disabled)
14975	select.disabled = true;
14976	support.optDisabled = !opt.disabled;
14977
14978	// Support: IE8 only
14979	// Check if we can trust getAttribute("value")
14980	input = document.createElement( "input" );
14981	input.setAttribute( "value", "" );
14982	support.input = input.getAttribute( "value" ) === "";
14983
14984	// Check if an input maintains its value after becoming a radio
14985	input.value = "t";
14986	input.setAttribute( "type", "radio" );
14987	support.radioValue = input.value === "t";
14988} )();
14989
14990
14991var rreturn = /\r/g,
14992	rspaces = /[\x20\t\r\n\f]+/g;
14993
14994jQuery.fn.extend( {
14995	val: function( value ) {
14996		var hooks, ret, isFunction,
14997			elem = this[ 0 ];
14998
14999		if ( !arguments.length ) {
15000			if ( elem ) {
15001				hooks = jQuery.valHooks[ elem.type ] ||
15002					jQuery.valHooks[ elem.nodeName.toLowerCase() ];
15003
15004				if (
15005					hooks &&
15006					"get" in hooks &&
15007					( ret = hooks.get( elem, "value" ) ) !== undefined
15008				) {
15009					return ret;
15010				}
15011
15012				ret = elem.value;
15013
15014				return typeof ret === "string" ?
15015
15016					// handle most common string cases
15017					ret.replace( rreturn, "" ) :
15018
15019					// handle cases where value is null/undef or number
15020					ret == null ? "" : ret;
15021			}
15022
15023			return;
15024		}
15025
15026		isFunction = jQuery.isFunction( value );
15027
15028		return this.each( function( i ) {
15029			var val;
15030
15031			if ( this.nodeType !== 1 ) {
15032				return;
15033			}
15034
15035			if ( isFunction ) {
15036				val = value.call( this, i, jQuery( this ).val() );
15037			} else {
15038				val = value;
15039			}
15040
15041			// Treat null/undefined as ""; convert numbers to string
15042			if ( val == null ) {
15043				val = "";
15044			} else if ( typeof val === "number" ) {
15045				val += "";
15046			} else if ( jQuery.isArray( val ) ) {
15047				val = jQuery.map( val, function( value ) {
15048					return value == null ? "" : value + "";
15049				} );
15050			}
15051
15052			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
15053
15054			// If set returns undefined, fall back to normal setting
15055			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
15056				this.value = val;
15057			}
15058		} );
15059	}
15060} );
15061
15062jQuery.extend( {
15063	valHooks: {
15064		option: {
15065			get: function( elem ) {
15066				var val = jQuery.find.attr( elem, "value" );
15067				return val != null ?
15068					val :
15069
15070					// Support: IE10-11+
15071					// option.text throws exceptions (#14686, #14858)
15072					// Strip and collapse whitespace
15073					// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
15074					jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
15075			}
15076		},
15077		select: {
15078			get: function( elem ) {
15079				var value, option,
15080					options = elem.options,
15081					index = elem.selectedIndex,
15082					one = elem.type === "select-one" || index < 0,
15083					values = one ? null : [],
15084					max = one ? index + 1 : options.length,
15085					i = index < 0 ?
15086						max :
15087						one ? index : 0;
15088
15089				// Loop through all the selected options
15090				for ( ; i < max; i++ ) {
15091					option = options[ i ];
15092
15093					// oldIE doesn't update selected after form reset (#2551)
15094					if ( ( option.selected || i === index ) &&
15095
15096							// Don't return options that are disabled or in a disabled optgroup
15097							( support.optDisabled ?
15098								!option.disabled :
15099								option.getAttribute( "disabled" ) === null ) &&
15100							( !option.parentNode.disabled ||
15101								!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
15102
15103						// Get the specific value for the option
15104						value = jQuery( option ).val();
15105
15106						// We don't need an array for one selects
15107						if ( one ) {
15108							return value;
15109						}
15110
15111						// Multi-Selects return an array
15112						values.push( value );
15113					}
15114				}
15115
15116				return values;
15117			},
15118
15119			set: function( elem, value ) {
15120				var optionSet, option,
15121					options = elem.options,
15122					values = jQuery.makeArray( value ),
15123					i = options.length;
15124
15125				while ( i-- ) {
15126					option = options[ i ];
15127
15128					if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) {
15129
15130						// Support: IE6
15131						// When new option element is added to select box we need to
15132						// force reflow of newly added node in order to workaround delay
15133						// of initialization properties
15134						try {
15135							option.selected = optionSet = true;
15136
15137						} catch ( _ ) {
15138
15139							// Will be executed only in IE6
15140							option.scrollHeight;
15141						}
15142
15143					} else {
15144						option.selected = false;
15145					}
15146				}
15147
15148				// Force browsers to behave consistently when non-matching value is set
15149				if ( !optionSet ) {
15150					elem.selectedIndex = -1;
15151				}
15152
15153				return options;
15154			}
15155		}
15156	}
15157} );
15158
15159// Radios and checkboxes getter/setter
15160jQuery.each( [ "radio", "checkbox" ], function() {
15161	jQuery.valHooks[ this ] = {
15162		set: function( elem, value ) {
15163			if ( jQuery.isArray( value ) ) {
15164				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
15165			}
15166		}
15167	};
15168	if ( !support.checkOn ) {
15169		jQuery.valHooks[ this ].get = function( elem ) {
15170			return elem.getAttribute( "value" ) === null ? "on" : elem.value;
15171		};
15172	}
15173} );
15174
15175
15176
15177
15178var nodeHook, boolHook,
15179	attrHandle = jQuery.expr.attrHandle,
15180	ruseDefault = /^(?:checked|selected)$/i,
15181	getSetAttribute = support.getSetAttribute,
15182	getSetInput = support.input;
15183
15184jQuery.fn.extend( {
15185	attr: function( name, value ) {
15186		return access( this, jQuery.attr, name, value, arguments.length > 1 );
15187	},
15188
15189	removeAttr: function( name ) {
15190		return this.each( function() {
15191			jQuery.removeAttr( this, name );
15192		} );
15193	}
15194} );
15195
15196jQuery.extend( {
15197	attr: function( elem, name, value ) {
15198		var ret, hooks,
15199			nType = elem.nodeType;
15200
15201		// Don't get/set attributes on text, comment and attribute nodes
15202		if ( nType === 3 || nType === 8 || nType === 2 ) {
15203			return;
15204		}
15205
15206		// Fallback to prop when attributes are not supported
15207		if ( typeof elem.getAttribute === "undefined" ) {
15208			return jQuery.prop( elem, name, value );
15209		}
15210
15211		// All attributes are lowercase
15212		// Grab necessary hook if one is defined
15213		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
15214			name = name.toLowerCase();
15215			hooks = jQuery.attrHooks[ name ] ||
15216				( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
15217		}
15218
15219		if ( value !== undefined ) {
15220			if ( value === null ) {
15221				jQuery.removeAttr( elem, name );
15222				return;
15223			}
15224
15225			if ( hooks && "set" in hooks &&
15226				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
15227				return ret;
15228			}
15229
15230			elem.setAttribute( name, value + "" );
15231			return value;
15232		}
15233
15234		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
15235			return ret;
15236		}
15237
15238		ret = jQuery.find.attr( elem, name );
15239
15240		// Non-existent attributes return null, we normalize to undefined
15241		return ret == null ? undefined : ret;
15242	},
15243
15244	attrHooks: {
15245		type: {
15246			set: function( elem, value ) {
15247				if ( !support.radioValue && value === "radio" &&
15248					jQuery.nodeName( elem, "input" ) ) {
15249
15250					// Setting the type on a radio button after the value resets the value in IE8-9
15251					// Reset value to default in case type is set after value during creation
15252					var val = elem.value;
15253					elem.setAttribute( "type", value );
15254					if ( val ) {
15255						elem.value = val;
15256					}
15257					return value;
15258				}
15259			}
15260		}
15261	},
15262
15263	removeAttr: function( elem, value ) {
15264		var name, propName,
15265			i = 0,
15266			attrNames = value && value.match( rnotwhite );
15267
15268		if ( attrNames && elem.nodeType === 1 ) {
15269			while ( ( name = attrNames[ i++ ] ) ) {
15270				propName = jQuery.propFix[ name ] || name;
15271
15272				// Boolean attributes get special treatment (#10870)
15273				if ( jQuery.expr.match.bool.test( name ) ) {
15274
15275					// Set corresponding property to false
15276					if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
15277						elem[ propName ] = false;
15278
15279					// Support: IE<9
15280					// Also clear defaultChecked/defaultSelected (if appropriate)
15281					} else {
15282						elem[ jQuery.camelCase( "default-" + name ) ] =
15283							elem[ propName ] = false;
15284					}
15285
15286				// See #9699 for explanation of this approach (setting first, then removal)
15287				} else {
15288					jQuery.attr( elem, name, "" );
15289				}
15290
15291				elem.removeAttribute( getSetAttribute ? name : propName );
15292			}
15293		}
15294	}
15295} );
15296
15297// Hooks for boolean attributes
15298boolHook = {
15299	set: function( elem, value, name ) {
15300		if ( value === false ) {
15301
15302			// Remove boolean attributes when set to false
15303			jQuery.removeAttr( elem, name );
15304		} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
15305
15306			// IE<8 needs the *property* name
15307			elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
15308
15309		} else {
15310
15311			// Support: IE<9
15312			// Use defaultChecked and defaultSelected for oldIE
15313			elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
15314		}
15315		return name;
15316	}
15317};
15318
15319jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
15320	var getter = attrHandle[ name ] || jQuery.find.attr;
15321
15322	if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
15323		attrHandle[ name ] = function( elem, name, isXML ) {
15324			var ret, handle;
15325			if ( !isXML ) {
15326
15327				// Avoid an infinite loop by temporarily removing this function from the getter
15328				handle = attrHandle[ name ];
15329				attrHandle[ name ] = ret;
15330				ret = getter( elem, name, isXML ) != null ?
15331					name.toLowerCase() :
15332					null;
15333				attrHandle[ name ] = handle;
15334			}
15335			return ret;
15336		};
15337	} else {
15338		attrHandle[ name ] = function( elem, name, isXML ) {
15339			if ( !isXML ) {
15340				return elem[ jQuery.camelCase( "default-" + name ) ] ?
15341					name.toLowerCase() :
15342					null;
15343			}
15344		};
15345	}
15346} );
15347
15348// fix oldIE attroperties
15349if ( !getSetInput || !getSetAttribute ) {
15350	jQuery.attrHooks.value = {
15351		set: function( elem, value, name ) {
15352			if ( jQuery.nodeName( elem, "input" ) ) {
15353
15354				// Does not return so that setAttribute is also used
15355				elem.defaultValue = value;
15356			} else {
15357
15358				// Use nodeHook if defined (#1954); otherwise setAttribute is fine
15359				return nodeHook && nodeHook.set( elem, value, name );
15360			}
15361		}
15362	};
15363}
15364
15365// IE6/7 do not support getting/setting some attributes with get/setAttribute
15366if ( !getSetAttribute ) {
15367
15368	// Use this for any attribute in IE6/7
15369	// This fixes almost every IE6/7 issue
15370	nodeHook = {
15371		set: function( elem, value, name ) {
15372
15373			// Set the existing or create a new attribute node
15374			var ret = elem.getAttributeNode( name );
15375			if ( !ret ) {
15376				elem.setAttributeNode(
15377					( ret = elem.ownerDocument.createAttribute( name ) )
15378				);
15379			}
15380
15381			ret.value = value += "";
15382
15383			// Break association with cloned elements by also using setAttribute (#9646)
15384			if ( name === "value" || value === elem.getAttribute( name ) ) {
15385				return value;
15386			}
15387		}
15388	};
15389
15390	// Some attributes are constructed with empty-string values when not defined
15391	attrHandle.id = attrHandle.name = attrHandle.coords =
15392		function( elem, name, isXML ) {
15393			var ret;
15394			if ( !isXML ) {
15395				return ( ret = elem.getAttributeNode( name ) ) && ret.value !== "" ?
15396					ret.value :
15397					null;
15398			}
15399		};
15400
15401	// Fixing value retrieval on a button requires this module
15402	jQuery.valHooks.button = {
15403		get: function( elem, name ) {
15404			var ret = elem.getAttributeNode( name );
15405			if ( ret && ret.specified ) {
15406				return ret.value;
15407			}
15408		},
15409		set: nodeHook.set
15410	};
15411
15412	// Set contenteditable to false on removals(#10429)
15413	// Setting to empty string throws an error as an invalid value
15414	jQuery.attrHooks.contenteditable = {
15415		set: function( elem, value, name ) {
15416			nodeHook.set( elem, value === "" ? false : value, name );
15417		}
15418	};
15419
15420	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
15421	// This is for removals
15422	jQuery.each( [ "width", "height" ], function( i, name ) {
15423		jQuery.attrHooks[ name ] = {
15424			set: function( elem, value ) {
15425				if ( value === "" ) {
15426					elem.setAttribute( name, "auto" );
15427					return value;
15428				}
15429			}
15430		};
15431	} );
15432}
15433
15434if ( !support.style ) {
15435	jQuery.attrHooks.style = {
15436		get: function( elem ) {
15437
15438			// Return undefined in the case of empty string
15439			// Note: IE uppercases css property names, but if we were to .toLowerCase()
15440			// .cssText, that would destroy case sensitivity in URL's, like in "background"
15441			return elem.style.cssText || undefined;
15442		},
15443		set: function( elem, value ) {
15444			return ( elem.style.cssText = value + "" );
15445		}
15446	};
15447}
15448
15449
15450
15451
15452var rfocusable = /^(?:input|select|textarea|button|object)$/i,
15453	rclickable = /^(?:a|area)$/i;
15454
15455jQuery.fn.extend( {
15456	prop: function( name, value ) {
15457		return access( this, jQuery.prop, name, value, arguments.length > 1 );
15458	},
15459
15460	removeProp: function( name ) {
15461		name = jQuery.propFix[ name ] || name;
15462		return this.each( function() {
15463
15464			// try/catch handles cases where IE balks (such as removing a property on window)
15465			try {
15466				this[ name ] = undefined;
15467				delete this[ name ];
15468			} catch ( e ) {}
15469		} );
15470	}
15471} );
15472
15473jQuery.extend( {
15474	prop: function( elem, name, value ) {
15475		var ret, hooks,
15476			nType = elem.nodeType;
15477
15478		// Don't get/set properties on text, comment and attribute nodes
15479		if ( nType === 3 || nType === 8 || nType === 2 ) {
15480			return;
15481		}
15482
15483		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
15484
15485			// Fix name and attach hooks
15486			name = jQuery.propFix[ name ] || name;
15487			hooks = jQuery.propHooks[ name ];
15488		}
15489
15490		if ( value !== undefined ) {
15491			if ( hooks && "set" in hooks &&
15492				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
15493				return ret;
15494			}
15495
15496			return ( elem[ name ] = value );
15497		}
15498
15499		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
15500			return ret;
15501		}
15502
15503		return elem[ name ];
15504	},
15505
15506	propHooks: {
15507		tabIndex: {
15508			get: function( elem ) {
15509
15510				// elem.tabIndex doesn't always return the
15511				// correct value when it hasn't been explicitly set
15512				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
15513				// Use proper attribute retrieval(#12072)
15514				var tabindex = jQuery.find.attr( elem, "tabindex" );
15515
15516				return tabindex ?
15517					parseInt( tabindex, 10 ) :
15518					rfocusable.test( elem.nodeName ) ||
15519						rclickable.test( elem.nodeName ) && elem.href ?
15520							0 :
15521							-1;
15522			}
15523		}
15524	},
15525
15526	propFix: {
15527		"for": "htmlFor",
15528		"class": "className"
15529	}
15530} );
15531
15532// Some attributes require a special call on IE
15533// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
15534if ( !support.hrefNormalized ) {
15535
15536	// href/src property should get the full normalized URL (#10299/#12915)
15537	jQuery.each( [ "href", "src" ], function( i, name ) {
15538		jQuery.propHooks[ name ] = {
15539			get: function( elem ) {
15540				return elem.getAttribute( name, 4 );
15541			}
15542		};
15543	} );
15544}
15545
15546// Support: Safari, IE9+
15547// Accessing the selectedIndex property
15548// forces the browser to respect setting selected
15549// on the option
15550// The getter ensures a default option is selected
15551// when in an optgroup
15552if ( !support.optSelected ) {
15553	jQuery.propHooks.selected = {
15554		get: function( elem ) {
15555			var parent = elem.parentNode;
15556
15557			if ( parent ) {
15558				parent.selectedIndex;
15559
15560				// Make sure that it also works with optgroups, see #5701
15561				if ( parent.parentNode ) {
15562					parent.parentNode.selectedIndex;
15563				}
15564			}
15565			return null;
15566		},
15567		set: function( elem ) {
15568			var parent = elem.parentNode;
15569			if ( parent ) {
15570				parent.selectedIndex;
15571
15572				if ( parent.parentNode ) {
15573					parent.parentNode.selectedIndex;
15574				}
15575			}
15576		}
15577	};
15578}
15579
15580jQuery.each( [
15581	"tabIndex",
15582	"readOnly",
15583	"maxLength",
15584	"cellSpacing",
15585	"cellPadding",
15586	"rowSpan",
15587	"colSpan",
15588	"useMap",
15589	"frameBorder",
15590	"contentEditable"
15591], function() {
15592	jQuery.propFix[ this.toLowerCase() ] = this;
15593} );
15594
15595// IE6/7 call enctype encoding
15596if ( !support.enctype ) {
15597	jQuery.propFix.enctype = "encoding";
15598}
15599
15600
15601
15602
15603var rclass = /[\t\r\n\f]/g;
15604
15605function getClass( elem ) {
15606	return jQuery.attr( elem, "class" ) || "";
15607}
15608
15609jQuery.fn.extend( {
15610	addClass: function( value ) {
15611		var classes, elem, cur, curValue, clazz, j, finalValue,
15612			i = 0;
15613
15614		if ( jQuery.isFunction( value ) ) {
15615			return this.each( function( j ) {
15616				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
15617			} );
15618		}
15619
15620		if ( typeof value === "string" && value ) {
15621			classes = value.match( rnotwhite ) || [];
15622
15623			while ( ( elem = this[ i++ ] ) ) {
15624				curValue = getClass( elem );
15625				cur = elem.nodeType === 1 &&
15626					( " " + curValue + " " ).replace( rclass, " " );
15627
15628				if ( cur ) {
15629					j = 0;
15630					while ( ( clazz = classes[ j++ ] ) ) {
15631						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
15632							cur += clazz + " ";
15633						}
15634					}
15635
15636					// only assign if different to avoid unneeded rendering.
15637					finalValue = jQuery.trim( cur );
15638					if ( curValue !== finalValue ) {
15639						jQuery.attr( elem, "class", finalValue );
15640					}
15641				}
15642			}
15643		}
15644
15645		return this;
15646	},
15647
15648	removeClass: function( value ) {
15649		var classes, elem, cur, curValue, clazz, j, finalValue,
15650			i = 0;
15651
15652		if ( jQuery.isFunction( value ) ) {
15653			return this.each( function( j ) {
15654				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
15655			} );
15656		}
15657
15658		if ( !arguments.length ) {
15659			return this.attr( "class", "" );
15660		}
15661
15662		if ( typeof value === "string" && value ) {
15663			classes = value.match( rnotwhite ) || [];
15664
15665			while ( ( elem = this[ i++ ] ) ) {
15666				curValue = getClass( elem );
15667
15668				// This expression is here for better compressibility (see addClass)
15669				cur = elem.nodeType === 1 &&
15670					( " " + curValue + " " ).replace( rclass, " " );
15671
15672				if ( cur ) {
15673					j = 0;
15674					while ( ( clazz = classes[ j++ ] ) ) {
15675
15676						// Remove *all* instances
15677						while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
15678							cur = cur.replace( " " + clazz + " ", " " );
15679						}
15680					}
15681
15682					// Only assign if different to avoid unneeded rendering.
15683					finalValue = jQuery.trim( cur );
15684					if ( curValue !== finalValue ) {
15685						jQuery.attr( elem, "class", finalValue );
15686					}
15687				}
15688			}
15689		}
15690
15691		return this;
15692	},
15693
15694	toggleClass: function( value, stateVal ) {
15695		var type = typeof value;
15696
15697		if ( typeof stateVal === "boolean" && type === "string" ) {
15698			return stateVal ? this.addClass( value ) : this.removeClass( value );
15699		}
15700
15701		if ( jQuery.isFunction( value ) ) {
15702			return this.each( function( i ) {
15703				jQuery( this ).toggleClass(
15704					value.call( this, i, getClass( this ), stateVal ),
15705					stateVal
15706				);
15707			} );
15708		}
15709
15710		return this.each( function() {
15711			var className, i, self, classNames;
15712
15713			if ( type === "string" ) {
15714
15715				// Toggle individual class names
15716				i = 0;
15717				self = jQuery( this );
15718				classNames = value.match( rnotwhite ) || [];
15719
15720				while ( ( className = classNames[ i++ ] ) ) {
15721
15722					// Check each className given, space separated list
15723					if ( self.hasClass( className ) ) {
15724						self.removeClass( className );
15725					} else {
15726						self.addClass( className );
15727					}
15728				}
15729
15730			// Toggle whole class name
15731			} else if ( value === undefined || type === "boolean" ) {
15732				className = getClass( this );
15733				if ( className ) {
15734
15735					// store className if set
15736					jQuery._data( this, "__className__", className );
15737				}
15738
15739				// If the element has a class name or if we're passed "false",
15740				// then remove the whole classname (if there was one, the above saved it).
15741				// Otherwise bring back whatever was previously saved (if anything),
15742				// falling back to the empty string if nothing was stored.
15743				jQuery.attr( this, "class",
15744					className || value === false ?
15745					"" :
15746					jQuery._data( this, "__className__" ) || ""
15747				);
15748			}
15749		} );
15750	},
15751
15752	hasClass: function( selector ) {
15753		var className, elem,
15754			i = 0;
15755
15756		className = " " + selector + " ";
15757		while ( ( elem = this[ i++ ] ) ) {
15758			if ( elem.nodeType === 1 &&
15759				( " " + getClass( elem ) + " " ).replace( rclass, " " )
15760					.indexOf( className ) > -1
15761			) {
15762				return true;
15763			}
15764		}
15765
15766		return false;
15767	}
15768} );
15769
15770
15771
15772
15773// Return jQuery for attributes-only inclusion
15774
15775
15776jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " +
15777	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
15778	"change select submit keydown keypress keyup error contextmenu" ).split( " " ),
15779	function( i, name ) {
15780
15781	// Handle event binding
15782	jQuery.fn[ name ] = function( data, fn ) {
15783		return arguments.length > 0 ?
15784			this.on( name, null, data, fn ) :
15785			this.trigger( name );
15786	};
15787} );
15788
15789jQuery.fn.extend( {
15790	hover: function( fnOver, fnOut ) {
15791		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
15792	}
15793} );
15794
15795
15796var location = window.location;
15797
15798var nonce = jQuery.now();
15799
15800var rquery = ( /\?/ );
15801
15802
15803
15804var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
15805
15806jQuery.parseJSON = function( data ) {
15807
15808	// Attempt to parse using the native JSON parser first
15809	if ( window.JSON && window.JSON.parse ) {
15810
15811		// Support: Android 2.3
15812		// Workaround failure to string-cast null input
15813		return window.JSON.parse( data + "" );
15814	}
15815
15816	var requireNonComma,
15817		depth = null,
15818		str = jQuery.trim( data + "" );
15819
15820	// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
15821	// after removing valid tokens
15822	return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {
15823
15824		// Force termination if we see a misplaced comma
15825		if ( requireNonComma && comma ) {
15826			depth = 0;
15827		}
15828
15829		// Perform no more replacements after returning to outermost depth
15830		if ( depth === 0 ) {
15831			return token;
15832		}
15833
15834		// Commas must not follow "[", "{", or ","
15835		requireNonComma = open || comma;
15836
15837		// Determine new depth
15838		// array/object open ("[" or "{"): depth += true - false (increment)
15839		// array/object close ("]" or "}"): depth += false - true (decrement)
15840		// other cases ("," or primitive): depth += true - true (numeric cast)
15841		depth += !close - !open;
15842
15843		// Remove this token
15844		return "";
15845	} ) ) ?
15846		( Function( "return " + str ) )() :
15847		jQuery.error( "Invalid JSON: " + data );
15848};
15849
15850
15851// Cross-browser xml parsing
15852jQuery.parseXML = function( data ) {
15853	var xml, tmp;
15854	if ( !data || typeof data !== "string" ) {
15855		return null;
15856	}
15857	try {
15858		if ( window.DOMParser ) { // Standard
15859			tmp = new window.DOMParser();
15860			xml = tmp.parseFromString( data, "text/xml" );
15861		} else { // IE
15862			xml = new window.ActiveXObject( "Microsoft.XMLDOM" );
15863			xml.async = "false";
15864			xml.loadXML( data );
15865		}
15866	} catch ( e ) {
15867		xml = undefined;
15868	}
15869	if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
15870		jQuery.error( "Invalid XML: " + data );
15871	}
15872	return xml;
15873};
15874
15875
15876var
15877	rhash = /#.*$/,
15878	rts = /([?&])_=[^&]*/,
15879
15880	// IE leaves an \r character at EOL
15881	rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
15882
15883	// #7653, #8125, #8152: local protocol detection
15884	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
15885	rnoContent = /^(?:GET|HEAD)$/,
15886	rprotocol = /^\/\//,
15887	rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
15888
15889	/* Prefilters
15890	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
15891	 * 2) These are called:
15892	 *    - BEFORE asking for a transport
15893	 *    - AFTER param serialization (s.data is a string if s.processData is true)
15894	 * 3) key is the dataType
15895	 * 4) the catchall symbol "*" can be used
15896	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
15897	 */
15898	prefilters = {},
15899
15900	/* Transports bindings
15901	 * 1) key is the dataType
15902	 * 2) the catchall symbol "*" can be used
15903	 * 3) selection will start with transport dataType and THEN go to "*" if needed
15904	 */
15905	transports = {},
15906
15907	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
15908	allTypes = "*/".concat( "*" ),
15909
15910	// Document location
15911	ajaxLocation = location.href,
15912
15913	// Segment location into parts
15914	ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
15915
15916// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
15917function addToPrefiltersOrTransports( structure ) {
15918
15919	// dataTypeExpression is optional and defaults to "*"
15920	return function( dataTypeExpression, func ) {
15921
15922		if ( typeof dataTypeExpression !== "string" ) {
15923			func = dataTypeExpression;
15924			dataTypeExpression = "*";
15925		}
15926
15927		var dataType,
15928			i = 0,
15929			dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
15930
15931		if ( jQuery.isFunction( func ) ) {
15932
15933			// For each dataType in the dataTypeExpression
15934			while ( ( dataType = dataTypes[ i++ ] ) ) {
15935
15936				// Prepend if requested
15937				if ( dataType.charAt( 0 ) === "+" ) {
15938					dataType = dataType.slice( 1 ) || "*";
15939					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
15940
15941				// Otherwise append
15942				} else {
15943					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
15944				}
15945			}
15946		}
15947	};
15948}
15949
15950// Base inspection function for prefilters and transports
15951function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
15952
15953	var inspected = {},
15954		seekingTransport = ( structure === transports );
15955
15956	function inspect( dataType ) {
15957		var selected;
15958		inspected[ dataType ] = true;
15959		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
15960			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
15961			if ( typeof dataTypeOrTransport === "string" &&
15962				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
15963
15964				options.dataTypes.unshift( dataTypeOrTransport );
15965				inspect( dataTypeOrTransport );
15966				return false;
15967			} else if ( seekingTransport ) {
15968				return !( selected = dataTypeOrTransport );
15969			}
15970		} );
15971		return selected;
15972	}
15973
15974	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
15975}
15976
15977// A special extend for ajax options
15978// that takes "flat" options (not to be deep extended)
15979// Fixes #9887
15980function ajaxExtend( target, src ) {
15981	var deep, key,
15982		flatOptions = jQuery.ajaxSettings.flatOptions || {};
15983
15984	for ( key in src ) {
15985		if ( src[ key ] !== undefined ) {
15986			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
15987		}
15988	}
15989	if ( deep ) {
15990		jQuery.extend( true, target, deep );
15991	}
15992
15993	return target;
15994}
15995
15996/* Handles responses to an ajax request:
15997 * - finds the right dataType (mediates between content-type and expected dataType)
15998 * - returns the corresponding response
15999 */
16000function ajaxHandleResponses( s, jqXHR, responses ) {
16001	var firstDataType, ct, finalDataType, type,
16002		contents = s.contents,
16003		dataTypes = s.dataTypes;
16004
16005	// Remove auto dataType and get content-type in the process
16006	while ( dataTypes[ 0 ] === "*" ) {
16007		dataTypes.shift();
16008		if ( ct === undefined ) {
16009			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
16010		}
16011	}
16012
16013	// Check if we're dealing with a known content-type
16014	if ( ct ) {
16015		for ( type in contents ) {
16016			if ( contents[ type ] && contents[ type ].test( ct ) ) {
16017				dataTypes.unshift( type );
16018				break;
16019			}
16020		}
16021	}
16022
16023	// Check to see if we have a response for the expected dataType
16024	if ( dataTypes[ 0 ] in responses ) {
16025		finalDataType = dataTypes[ 0 ];
16026	} else {
16027
16028		// Try convertible dataTypes
16029		for ( type in responses ) {
16030			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
16031				finalDataType = type;
16032				break;
16033			}
16034			if ( !firstDataType ) {
16035				firstDataType = type;
16036			}
16037		}
16038
16039		// Or just use first one
16040		finalDataType = finalDataType || firstDataType;
16041	}
16042
16043	// If we found a dataType
16044	// We add the dataType to the list if needed
16045	// and return the corresponding response
16046	if ( finalDataType ) {
16047		if ( finalDataType !== dataTypes[ 0 ] ) {
16048			dataTypes.unshift( finalDataType );
16049		}
16050		return responses[ finalDataType ];
16051	}
16052}
16053
16054/* Chain conversions given the request and the original response
16055 * Also sets the responseXXX fields on the jqXHR instance
16056 */
16057function ajaxConvert( s, response, jqXHR, isSuccess ) {
16058	var conv2, current, conv, tmp, prev,
16059		converters = {},
16060
16061		// Work with a copy of dataTypes in case we need to modify it for conversion
16062		dataTypes = s.dataTypes.slice();
16063
16064	// Create converters map with lowercased keys
16065	if ( dataTypes[ 1 ] ) {
16066		for ( conv in s.converters ) {
16067			converters[ conv.toLowerCase() ] = s.converters[ conv ];
16068		}
16069	}
16070
16071	current = dataTypes.shift();
16072
16073	// Convert to each sequential dataType
16074	while ( current ) {
16075
16076		if ( s.responseFields[ current ] ) {
16077			jqXHR[ s.responseFields[ current ] ] = response;
16078		}
16079
16080		// Apply the dataFilter if provided
16081		if ( !prev && isSuccess && s.dataFilter ) {
16082			response = s.dataFilter( response, s.dataType );
16083		}
16084
16085		prev = current;
16086		current = dataTypes.shift();
16087
16088		if ( current ) {
16089
16090			// There's only work to do if current dataType is non-auto
16091			if ( current === "*" ) {
16092
16093				current = prev;
16094
16095			// Convert response if prev dataType is non-auto and differs from current
16096			} else if ( prev !== "*" && prev !== current ) {
16097
16098				// Seek a direct converter
16099				conv = converters[ prev + " " + current ] || converters[ "* " + current ];
16100
16101				// If none found, seek a pair
16102				if ( !conv ) {
16103					for ( conv2 in converters ) {
16104
16105						// If conv2 outputs current
16106						tmp = conv2.split( " " );
16107						if ( tmp[ 1 ] === current ) {
16108
16109							// If prev can be converted to accepted input
16110							conv = converters[ prev + " " + tmp[ 0 ] ] ||
16111								converters[ "* " + tmp[ 0 ] ];
16112							if ( conv ) {
16113
16114								// Condense equivalence converters
16115								if ( conv === true ) {
16116									conv = converters[ conv2 ];
16117
16118								// Otherwise, insert the intermediate dataType
16119								} else if ( converters[ conv2 ] !== true ) {
16120									current = tmp[ 0 ];
16121									dataTypes.unshift( tmp[ 1 ] );
16122								}
16123								break;
16124							}
16125						}
16126					}
16127				}
16128
16129				// Apply converter (if not an equivalence)
16130				if ( conv !== true ) {
16131
16132					// Unless errors are allowed to bubble, catch and return them
16133					if ( conv && s[ "throws" ] ) { // jscs:ignore requireDotNotation
16134						response = conv( response );
16135					} else {
16136						try {
16137							response = conv( response );
16138						} catch ( e ) {
16139							return {
16140								state: "parsererror",
16141								error: conv ? e : "No conversion from " + prev + " to " + current
16142							};
16143						}
16144					}
16145				}
16146			}
16147		}
16148	}
16149
16150	return { state: "success", data: response };
16151}
16152
16153jQuery.extend( {
16154
16155	// Counter for holding the number of active queries
16156	active: 0,
16157
16158	// Last-Modified header cache for next request
16159	lastModified: {},
16160	etag: {},
16161
16162	ajaxSettings: {
16163		url: ajaxLocation,
16164		type: "GET",
16165		isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
16166		global: true,
16167		processData: true,
16168		async: true,
16169		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
16170		/*
16171		timeout: 0,
16172		data: null,
16173		dataType: null,
16174		username: null,
16175		password: null,
16176		cache: null,
16177		throws: false,
16178		traditional: false,
16179		headers: {},
16180		*/
16181
16182		accepts: {
16183			"*": allTypes,
16184			text: "text/plain",
16185			html: "text/html",
16186			xml: "application/xml, text/xml",
16187			json: "application/json, text/javascript"
16188		},
16189
16190		contents: {
16191			xml: /\bxml\b/,
16192			html: /\bhtml/,
16193			json: /\bjson\b/
16194		},
16195
16196		responseFields: {
16197			xml: "responseXML",
16198			text: "responseText",
16199			json: "responseJSON"
16200		},
16201
16202		// Data converters
16203		// Keys separate source (or catchall "*") and destination types with a single space
16204		converters: {
16205
16206			// Convert anything to text
16207			"* text": String,
16208
16209			// Text to html (true = no transformation)
16210			"text html": true,
16211
16212			// Evaluate text as a json expression
16213			"text json": jQuery.parseJSON,
16214
16215			// Parse text as xml
16216			"text xml": jQuery.parseXML
16217		},
16218
16219		// For options that shouldn't be deep extended:
16220		// you can add your own custom options here if
16221		// and when you create one that shouldn't be
16222		// deep extended (see ajaxExtend)
16223		flatOptions: {
16224			url: true,
16225			context: true
16226		}
16227	},
16228
16229	// Creates a full fledged settings object into target
16230	// with both ajaxSettings and settings fields.
16231	// If target is omitted, writes into ajaxSettings.
16232	ajaxSetup: function( target, settings ) {
16233		return settings ?
16234
16235			// Building a settings object
16236			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
16237
16238			// Extending ajaxSettings
16239			ajaxExtend( jQuery.ajaxSettings, target );
16240	},
16241
16242	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
16243	ajaxTransport: addToPrefiltersOrTransports( transports ),
16244
16245	// Main method
16246	ajax: function( url, options ) {
16247
16248		// If url is an object, simulate pre-1.5 signature
16249		if ( typeof url === "object" ) {
16250			options = url;
16251			url = undefined;
16252		}
16253
16254		// Force options to be an object
16255		options = options || {};
16256
16257		var
16258
16259			// Cross-domain detection vars
16260			parts,
16261
16262			// Loop variable
16263			i,
16264
16265			// URL without anti-cache param
16266			cacheURL,
16267
16268			// Response headers as string
16269			responseHeadersString,
16270
16271			// timeout handle
16272			timeoutTimer,
16273
16274			// To know if global events are to be dispatched
16275			fireGlobals,
16276
16277			transport,
16278
16279			// Response headers
16280			responseHeaders,
16281
16282			// Create the final options object
16283			s = jQuery.ajaxSetup( {}, options ),
16284
16285			// Callbacks context
16286			callbackContext = s.context || s,
16287
16288			// Context for global events is callbackContext if it is a DOM node or jQuery collection
16289			globalEventContext = s.context &&
16290				( callbackContext.nodeType || callbackContext.jquery ) ?
16291					jQuery( callbackContext ) :
16292					jQuery.event,
16293
16294			// Deferreds
16295			deferred = jQuery.Deferred(),
16296			completeDeferred = jQuery.Callbacks( "once memory" ),
16297
16298			// Status-dependent callbacks
16299			statusCode = s.statusCode || {},
16300
16301			// Headers (they are sent all at once)
16302			requestHeaders = {},
16303			requestHeadersNames = {},
16304
16305			// The jqXHR state
16306			state = 0,
16307
16308			// Default abort message
16309			strAbort = "canceled",
16310
16311			// Fake xhr
16312			jqXHR = {
16313				readyState: 0,
16314
16315				// Builds headers hashtable if needed
16316				getResponseHeader: function( key ) {
16317					var match;
16318					if ( state === 2 ) {
16319						if ( !responseHeaders ) {
16320							responseHeaders = {};
16321							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
16322								responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
16323							}
16324						}
16325						match = responseHeaders[ key.toLowerCase() ];
16326					}
16327					return match == null ? null : match;
16328				},
16329
16330				// Raw string
16331				getAllResponseHeaders: function() {
16332					return state === 2 ? responseHeadersString : null;
16333				},
16334
16335				// Caches the header
16336				setRequestHeader: function( name, value ) {
16337					var lname = name.toLowerCase();
16338					if ( !state ) {
16339						name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
16340						requestHeaders[ name ] = value;
16341					}
16342					return this;
16343				},
16344
16345				// Overrides response content-type header
16346				overrideMimeType: function( type ) {
16347					if ( !state ) {
16348						s.mimeType = type;
16349					}
16350					return this;
16351				},
16352
16353				// Status-dependent callbacks
16354				statusCode: function( map ) {
16355					var code;
16356					if ( map ) {
16357						if ( state < 2 ) {
16358							for ( code in map ) {
16359
16360								// Lazy-add the new callback in a way that preserves old ones
16361								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
16362							}
16363						} else {
16364
16365							// Execute the appropriate callbacks
16366							jqXHR.always( map[ jqXHR.status ] );
16367						}
16368					}
16369					return this;
16370				},
16371
16372				// Cancel the request
16373				abort: function( statusText ) {
16374					var finalText = statusText || strAbort;
16375					if ( transport ) {
16376						transport.abort( finalText );
16377					}
16378					done( 0, finalText );
16379					return this;
16380				}
16381			};
16382
16383		// Attach deferreds
16384		deferred.promise( jqXHR ).complete = completeDeferred.add;
16385		jqXHR.success = jqXHR.done;
16386		jqXHR.error = jqXHR.fail;
16387
16388		// Remove hash character (#7531: and string promotion)
16389		// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
16390		// Handle falsy url in the settings object (#10093: consistency with old signature)
16391		// We also use the url parameter if available
16392		s.url = ( ( url || s.url || ajaxLocation ) + "" )
16393			.replace( rhash, "" )
16394			.replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
16395
16396		// Alias method option to type as per ticket #12004
16397		s.type = options.method || options.type || s.method || s.type;
16398
16399		// Extract dataTypes list
16400		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
16401
16402		// A cross-domain request is in order when we have a protocol:host:port mismatch
16403		if ( s.crossDomain == null ) {
16404			parts = rurl.exec( s.url.toLowerCase() );
16405			s.crossDomain = !!( parts &&
16406				( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
16407					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
16408						( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
16409			);
16410		}
16411
16412		// Convert data if not already a string
16413		if ( s.data && s.processData && typeof s.data !== "string" ) {
16414			s.data = jQuery.param( s.data, s.traditional );
16415		}
16416
16417		// Apply prefilters
16418		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
16419
16420		// If request was aborted inside a prefilter, stop there
16421		if ( state === 2 ) {
16422			return jqXHR;
16423		}
16424
16425		// We can fire global events as of now if asked to
16426		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
16427		fireGlobals = jQuery.event && s.global;
16428
16429		// Watch for a new set of requests
16430		if ( fireGlobals && jQuery.active++ === 0 ) {
16431			jQuery.event.trigger( "ajaxStart" );
16432		}
16433
16434		// Uppercase the type
16435		s.type = s.type.toUpperCase();
16436
16437		// Determine if request has content
16438		s.hasContent = !rnoContent.test( s.type );
16439
16440		// Save the URL in case we're toying with the If-Modified-Since
16441		// and/or If-None-Match header later on
16442		cacheURL = s.url;
16443
16444		// More options handling for requests with no content
16445		if ( !s.hasContent ) {
16446
16447			// If data is available, append data to url
16448			if ( s.data ) {
16449				cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
16450
16451				// #9682: remove data so that it's not used in an eventual retry
16452				delete s.data;
16453			}
16454
16455			// Add anti-cache in url if needed
16456			if ( s.cache === false ) {
16457				s.url = rts.test( cacheURL ) ?
16458
16459					// If there is already a '_' parameter, set its value
16460					cacheURL.replace( rts, "$1_=" + nonce++ ) :
16461
16462					// Otherwise add one to the end
16463					cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
16464			}
16465		}
16466
16467		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
16468		if ( s.ifModified ) {
16469			if ( jQuery.lastModified[ cacheURL ] ) {
16470				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
16471			}
16472			if ( jQuery.etag[ cacheURL ] ) {
16473				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
16474			}
16475		}
16476
16477		// Set the correct header, if data is being sent
16478		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
16479			jqXHR.setRequestHeader( "Content-Type", s.contentType );
16480		}
16481
16482		// Set the Accepts header for the server, depending on the dataType
16483		jqXHR.setRequestHeader(
16484			"Accept",
16485			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
16486				s.accepts[ s.dataTypes[ 0 ] ] +
16487					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
16488				s.accepts[ "*" ]
16489		);
16490
16491		// Check for headers option
16492		for ( i in s.headers ) {
16493			jqXHR.setRequestHeader( i, s.headers[ i ] );
16494		}
16495
16496		// Allow custom headers/mimetypes and early abort
16497		if ( s.beforeSend &&
16498			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
16499
16500			// Abort if not done already and return
16501			return jqXHR.abort();
16502		}
16503
16504		// aborting is no longer a cancellation
16505		strAbort = "abort";
16506
16507		// Install callbacks on deferreds
16508		for ( i in { success: 1, error: 1, complete: 1 } ) {
16509			jqXHR[ i ]( s[ i ] );
16510		}
16511
16512		// Get transport
16513		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
16514
16515		// If no transport, we auto-abort
16516		if ( !transport ) {
16517			done( -1, "No Transport" );
16518		} else {
16519			jqXHR.readyState = 1;
16520
16521			// Send global event
16522			if ( fireGlobals ) {
16523				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
16524			}
16525
16526			// If request was aborted inside ajaxSend, stop there
16527			if ( state === 2 ) {
16528				return jqXHR;
16529			}
16530
16531			// Timeout
16532			if ( s.async && s.timeout > 0 ) {
16533				timeoutTimer = window.setTimeout( function() {
16534					jqXHR.abort( "timeout" );
16535				}, s.timeout );
16536			}
16537
16538			try {
16539				state = 1;
16540				transport.send( requestHeaders, done );
16541			} catch ( e ) {
16542
16543				// Propagate exception as error if not done
16544				if ( state < 2 ) {
16545					done( -1, e );
16546
16547				// Simply rethrow otherwise
16548				} else {
16549					throw e;
16550				}
16551			}
16552		}
16553
16554		// Callback for when everything is done
16555		function done( status, nativeStatusText, responses, headers ) {
16556			var isSuccess, success, error, response, modified,
16557				statusText = nativeStatusText;
16558
16559			// Called once
16560			if ( state === 2 ) {
16561				return;
16562			}
16563
16564			// State is "done" now
16565			state = 2;
16566
16567			// Clear timeout if it exists
16568			if ( timeoutTimer ) {
16569				window.clearTimeout( timeoutTimer );
16570			}
16571
16572			// Dereference transport for early garbage collection
16573			// (no matter how long the jqXHR object will be used)
16574			transport = undefined;
16575
16576			// Cache response headers
16577			responseHeadersString = headers || "";
16578
16579			// Set readyState
16580			jqXHR.readyState = status > 0 ? 4 : 0;
16581
16582			// Determine if successful
16583			isSuccess = status >= 200 && status < 300 || status === 304;
16584
16585			// Get response data
16586			if ( responses ) {
16587				response = ajaxHandleResponses( s, jqXHR, responses );
16588			}
16589
16590			// Convert no matter what (that way responseXXX fields are always set)
16591			response = ajaxConvert( s, response, jqXHR, isSuccess );
16592
16593			// If successful, handle type chaining
16594			if ( isSuccess ) {
16595
16596				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
16597				if ( s.ifModified ) {
16598					modified = jqXHR.getResponseHeader( "Last-Modified" );
16599					if ( modified ) {
16600						jQuery.lastModified[ cacheURL ] = modified;
16601					}
16602					modified = jqXHR.getResponseHeader( "etag" );
16603					if ( modified ) {
16604						jQuery.etag[ cacheURL ] = modified;
16605					}
16606				}
16607
16608				// if no content
16609				if ( status === 204 || s.type === "HEAD" ) {
16610					statusText = "nocontent";
16611
16612				// if not modified
16613				} else if ( status === 304 ) {
16614					statusText = "notmodified";
16615
16616				// If we have data, let's convert it
16617				} else {
16618					statusText = response.state;
16619					success = response.data;
16620					error = response.error;
16621					isSuccess = !error;
16622				}
16623			} else {
16624
16625				// We extract error from statusText
16626				// then normalize statusText and status for non-aborts
16627				error = statusText;
16628				if ( status || !statusText ) {
16629					statusText = "error";
16630					if ( status < 0 ) {
16631						status = 0;
16632					}
16633				}
16634			}
16635
16636			// Set data for the fake xhr object
16637			jqXHR.status = status;
16638			jqXHR.statusText = ( nativeStatusText || statusText ) + "";
16639
16640			// Success/Error
16641			if ( isSuccess ) {
16642				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
16643			} else {
16644				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
16645			}
16646
16647			// Status-dependent callbacks
16648			jqXHR.statusCode( statusCode );
16649			statusCode = undefined;
16650
16651			if ( fireGlobals ) {
16652				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
16653					[ jqXHR, s, isSuccess ? success : error ] );
16654			}
16655
16656			// Complete
16657			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
16658
16659			if ( fireGlobals ) {
16660				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
16661
16662				// Handle the global AJAX counter
16663				if ( !( --jQuery.active ) ) {
16664					jQuery.event.trigger( "ajaxStop" );
16665				}
16666			}
16667		}
16668
16669		return jqXHR;
16670	},
16671
16672	getJSON: function( url, data, callback ) {
16673		return jQuery.get( url, data, callback, "json" );
16674	},
16675
16676	getScript: function( url, callback ) {
16677		return jQuery.get( url, undefined, callback, "script" );
16678	}
16679} );
16680
16681jQuery.each( [ "get", "post" ], function( i, method ) {
16682	jQuery[ method ] = function( url, data, callback, type ) {
16683
16684		// shift arguments if data argument was omitted
16685		if ( jQuery.isFunction( data ) ) {
16686			type = type || callback;
16687			callback = data;
16688			data = undefined;
16689		}
16690
16691		// The url can be an options object (which then must have .url)
16692		return jQuery.ajax( jQuery.extend( {
16693			url: url,
16694			type: method,
16695			dataType: type,
16696			data: data,
16697			success: callback
16698		}, jQuery.isPlainObject( url ) && url ) );
16699	};
16700} );
16701
16702
16703jQuery._evalUrl = function( url ) {
16704	return jQuery.ajax( {
16705		url: url,
16706
16707		// Make this explicit, since user can override this through ajaxSetup (#11264)
16708		type: "GET",
16709		dataType: "script",
16710		cache: true,
16711		async: false,
16712		global: false,
16713		"throws": true
16714	} );
16715};
16716
16717
16718jQuery.fn.extend( {
16719	wrapAll: function( html ) {
16720		if ( jQuery.isFunction( html ) ) {
16721			return this.each( function( i ) {
16722				jQuery( this ).wrapAll( html.call( this, i ) );
16723			} );
16724		}
16725
16726		if ( this[ 0 ] ) {
16727
16728			// The elements to wrap the target around
16729			var wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
16730
16731			if ( this[ 0 ].parentNode ) {
16732				wrap.insertBefore( this[ 0 ] );
16733			}
16734
16735			wrap.map( function() {
16736				var elem = this;
16737
16738				while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
16739					elem = elem.firstChild;
16740				}
16741
16742				return elem;
16743			} ).append( this );
16744		}
16745
16746		return this;
16747	},
16748
16749	wrapInner: function( html ) {
16750		if ( jQuery.isFunction( html ) ) {
16751			return this.each( function( i ) {
16752				jQuery( this ).wrapInner( html.call( this, i ) );
16753			} );
16754		}
16755
16756		return this.each( function() {
16757			var self = jQuery( this ),
16758				contents = self.contents();
16759
16760			if ( contents.length ) {
16761				contents.wrapAll( html );
16762
16763			} else {
16764				self.append( html );
16765			}
16766		} );
16767	},
16768
16769	wrap: function( html ) {
16770		var isFunction = jQuery.isFunction( html );
16771
16772		return this.each( function( i ) {
16773			jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
16774		} );
16775	},
16776
16777	unwrap: function() {
16778		return this.parent().each( function() {
16779			if ( !jQuery.nodeName( this, "body" ) ) {
16780				jQuery( this ).replaceWith( this.childNodes );
16781			}
16782		} ).end();
16783	}
16784} );
16785
16786
16787function getDisplay( elem ) {
16788	return elem.style && elem.style.display || jQuery.css( elem, "display" );
16789}
16790
16791function filterHidden( elem ) {
16792
16793	// Disconnected elements are considered hidden
16794	if ( !jQuery.contains( elem.ownerDocument || document, elem ) ) {
16795		return true;
16796	}
16797	while ( elem && elem.nodeType === 1 ) {
16798		if ( getDisplay( elem ) === "none" || elem.type === "hidden" ) {
16799			return true;
16800		}
16801		elem = elem.parentNode;
16802	}
16803	return false;
16804}
16805
16806jQuery.expr.filters.hidden = function( elem ) {
16807
16808	// Support: Opera <= 12.12
16809	// Opera reports offsetWidths and offsetHeights less than zero on some elements
16810	return support.reliableHiddenOffsets() ?
16811		( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&
16812			!elem.getClientRects().length ) :
16813			filterHidden( elem );
16814};
16815
16816jQuery.expr.filters.visible = function( elem ) {
16817	return !jQuery.expr.filters.hidden( elem );
16818};
16819
16820
16821
16822
16823var r20 = /%20/g,
16824	rbracket = /\[\]$/,
16825	rCRLF = /\r?\n/g,
16826	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
16827	rsubmittable = /^(?:input|select|textarea|keygen)/i;
16828
16829function buildParams( prefix, obj, traditional, add ) {
16830	var name;
16831
16832	if ( jQuery.isArray( obj ) ) {
16833
16834		// Serialize array item.
16835		jQuery.each( obj, function( i, v ) {
16836			if ( traditional || rbracket.test( prefix ) ) {
16837
16838				// Treat each array item as a scalar.
16839				add( prefix, v );
16840
16841			} else {
16842
16843				// Item is non-scalar (array or object), encode its numeric index.
16844				buildParams(
16845					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
16846					v,
16847					traditional,
16848					add
16849				);
16850			}
16851		} );
16852
16853	} else if ( !traditional && jQuery.type( obj ) === "object" ) {
16854
16855		// Serialize object item.
16856		for ( name in obj ) {
16857			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
16858		}
16859
16860	} else {
16861
16862		// Serialize scalar item.
16863		add( prefix, obj );
16864	}
16865}
16866
16867// Serialize an array of form elements or a set of
16868// key/values into a query string
16869jQuery.param = function( a, traditional ) {
16870	var prefix,
16871		s = [],
16872		add = function( key, value ) {
16873
16874			// If value is a function, invoke it and return its value
16875			value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
16876			s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
16877		};
16878
16879	// Set traditional to true for jQuery <= 1.3.2 behavior.
16880	if ( traditional === undefined ) {
16881		traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
16882	}
16883
16884	// If an array was passed in, assume that it is an array of form elements.
16885	if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
16886
16887		// Serialize the form elements
16888		jQuery.each( a, function() {
16889			add( this.name, this.value );
16890		} );
16891
16892	} else {
16893
16894		// If traditional, encode the "old" way (the way 1.3.2 or older
16895		// did it), otherwise encode params recursively.
16896		for ( prefix in a ) {
16897			buildParams( prefix, a[ prefix ], traditional, add );
16898		}
16899	}
16900
16901	// Return the resulting serialization
16902	return s.join( "&" ).replace( r20, "+" );
16903};
16904
16905jQuery.fn.extend( {
16906	serialize: function() {
16907		return jQuery.param( this.serializeArray() );
16908	},
16909	serializeArray: function() {
16910		return this.map( function() {
16911
16912			// Can add propHook for "elements" to filter or add form elements
16913			var elements = jQuery.prop( this, "elements" );
16914			return elements ? jQuery.makeArray( elements ) : this;
16915		} )
16916		.filter( function() {
16917			var type = this.type;
16918
16919			// Use .is(":disabled") so that fieldset[disabled] works
16920			return this.name && !jQuery( this ).is( ":disabled" ) &&
16921				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
16922				( this.checked || !rcheckableType.test( type ) );
16923		} )
16924		.map( function( i, elem ) {
16925			var val = jQuery( this ).val();
16926
16927			return val == null ?
16928				null :
16929				jQuery.isArray( val ) ?
16930					jQuery.map( val, function( val ) {
16931						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
16932					} ) :
16933					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
16934		} ).get();
16935	}
16936} );
16937
16938
16939// Create the request object
16940// (This is still attached to ajaxSettings for backward compatibility)
16941jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
16942
16943	// Support: IE6-IE8
16944	function() {
16945
16946		// XHR cannot access local files, always use ActiveX for that case
16947		if ( this.isLocal ) {
16948			return createActiveXHR();
16949		}
16950
16951		// Support: IE 9-11
16952		// IE seems to error on cross-domain PATCH requests when ActiveX XHR
16953		// is used. In IE 9+ always use the native XHR.
16954		// Note: this condition won't catch Edge as it doesn't define
16955		// document.documentMode but it also doesn't support ActiveX so it won't
16956		// reach this code.
16957		if ( document.documentMode > 8 ) {
16958			return createStandardXHR();
16959		}
16960
16961		// Support: IE<9
16962		// oldIE XHR does not support non-RFC2616 methods (#13240)
16963		// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx
16964		// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
16965		// Although this check for six methods instead of eight
16966		// since IE also does not support "trace" and "connect"
16967		return /^(get|post|head|put|delete|options)$/i.test( this.type ) &&
16968			createStandardXHR() || createActiveXHR();
16969	} :
16970
16971	// For all other browsers, use the standard XMLHttpRequest object
16972	createStandardXHR;
16973
16974var xhrId = 0,
16975	xhrCallbacks = {},
16976	xhrSupported = jQuery.ajaxSettings.xhr();
16977
16978// Support: IE<10
16979// Open requests must be manually aborted on unload (#5280)
16980// See https://support.microsoft.com/kb/2856746 for more info
16981if ( window.attachEvent ) {
16982	window.attachEvent( "onunload", function() {
16983		for ( var key in xhrCallbacks ) {
16984			xhrCallbacks[ key ]( undefined, true );
16985		}
16986	} );
16987}
16988
16989// Determine support properties
16990support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
16991xhrSupported = support.ajax = !!xhrSupported;
16992
16993// Create transport if the browser can provide an xhr
16994if ( xhrSupported ) {
16995
16996	jQuery.ajaxTransport( function( options ) {
16997
16998		// Cross domain only allowed if supported through XMLHttpRequest
16999		if ( !options.crossDomain || support.cors ) {
17000
17001			var callback;
17002
17003			return {
17004				send: function( headers, complete ) {
17005					var i,
17006						xhr = options.xhr(),
17007						id = ++xhrId;
17008
17009					// Open the socket
17010					xhr.open(
17011						options.type,
17012						options.url,
17013						options.async,
17014						options.username,
17015						options.password
17016					);
17017
17018					// Apply custom fields if provided
17019					if ( options.xhrFields ) {
17020						for ( i in options.xhrFields ) {
17021							xhr[ i ] = options.xhrFields[ i ];
17022						}
17023					}
17024
17025					// Override mime type if needed
17026					if ( options.mimeType && xhr.overrideMimeType ) {
17027						xhr.overrideMimeType( options.mimeType );
17028					}
17029
17030					// X-Requested-With header
17031					// For cross-domain requests, seeing as conditions for a preflight are
17032					// akin to a jigsaw puzzle, we simply never set it to be sure.
17033					// (it can always be set on a per-request basis or even using ajaxSetup)
17034					// For same-domain requests, won't change header if already provided.
17035					if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
17036						headers[ "X-Requested-With" ] = "XMLHttpRequest";
17037					}
17038
17039					// Set headers
17040					for ( i in headers ) {
17041
17042						// Support: IE<9
17043						// IE's ActiveXObject throws a 'Type Mismatch' exception when setting
17044						// request header to a null-value.
17045						//
17046						// To keep consistent with other XHR implementations, cast the value
17047						// to string and ignore `undefined`.
17048						if ( headers[ i ] !== undefined ) {
17049							xhr.setRequestHeader( i, headers[ i ] + "" );
17050						}
17051					}
17052
17053					// Do send the request
17054					// This may raise an exception which is actually
17055					// handled in jQuery.ajax (so no try/catch here)
17056					xhr.send( ( options.hasContent && options.data ) || null );
17057
17058					// Listener
17059					callback = function( _, isAbort ) {
17060						var status, statusText, responses;
17061
17062						// Was never called and is aborted or complete
17063						if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
17064
17065							// Clean up
17066							delete xhrCallbacks[ id ];
17067							callback = undefined;
17068							xhr.onreadystatechange = jQuery.noop;
17069
17070							// Abort manually if needed
17071							if ( isAbort ) {
17072								if ( xhr.readyState !== 4 ) {
17073									xhr.abort();
17074								}
17075							} else {
17076								responses = {};
17077								status = xhr.status;
17078
17079								// Support: IE<10
17080								// Accessing binary-data responseText throws an exception
17081								// (#11426)
17082								if ( typeof xhr.responseText === "string" ) {
17083									responses.text = xhr.responseText;
17084								}
17085
17086								// Firefox throws an exception when accessing
17087								// statusText for faulty cross-domain requests
17088								try {
17089									statusText = xhr.statusText;
17090								} catch ( e ) {
17091
17092									// We normalize with Webkit giving an empty statusText
17093									statusText = "";
17094								}
17095
17096								// Filter status for non standard behaviors
17097
17098								// If the request is local and we have data: assume a success
17099								// (success with no data won't get notified, that's the best we
17100								// can do given current implementations)
17101								if ( !status && options.isLocal && !options.crossDomain ) {
17102									status = responses.text ? 200 : 404;
17103
17104								// IE - #1450: sometimes returns 1223 when it should be 204
17105								} else if ( status === 1223 ) {
17106									status = 204;
17107								}
17108							}
17109						}
17110
17111						// Call complete if needed
17112						if ( responses ) {
17113							complete( status, statusText, responses, xhr.getAllResponseHeaders() );
17114						}
17115					};
17116
17117					// Do send the request
17118					// `xhr.send` may raise an exception, but it will be
17119					// handled in jQuery.ajax (so no try/catch here)
17120					if ( !options.async ) {
17121
17122						// If we're in sync mode we fire the callback
17123						callback();
17124					} else if ( xhr.readyState === 4 ) {
17125
17126						// (IE6 & IE7) if it's in cache and has been
17127						// retrieved directly we need to fire the callback
17128						window.setTimeout( callback );
17129					} else {
17130
17131						// Register the callback, but delay it in case `xhr.send` throws
17132						// Add to the list of active xhr callbacks
17133						xhr.onreadystatechange = xhrCallbacks[ id ] = callback;
17134					}
17135				},
17136
17137				abort: function() {
17138					if ( callback ) {
17139						callback( undefined, true );
17140					}
17141				}
17142			};
17143		}
17144	} );
17145}
17146
17147// Functions to create xhrs
17148function createStandardXHR() {
17149	try {
17150		return new window.XMLHttpRequest();
17151	} catch ( e ) {}
17152}
17153
17154function createActiveXHR() {
17155	try {
17156		return new window.ActiveXObject( "Microsoft.XMLHTTP" );
17157	} catch ( e ) {}
17158}
17159
17160
17161
17162
17163// Install script dataType
17164jQuery.ajaxSetup( {
17165	accepts: {
17166		script: "text/javascript, application/javascript, " +
17167			"application/ecmascript, application/x-ecmascript"
17168	},
17169	contents: {
17170		script: /\b(?:java|ecma)script\b/
17171	},
17172	converters: {
17173		"text script": function( text ) {
17174			jQuery.globalEval( text );
17175			return text;
17176		}
17177	}
17178} );
17179
17180// Handle cache's special case and global
17181jQuery.ajaxPrefilter( "script", function( s ) {
17182	if ( s.cache === undefined ) {
17183		s.cache = false;
17184	}
17185	if ( s.crossDomain ) {
17186		s.type = "GET";
17187		s.global = false;
17188	}
17189} );
17190
17191// Bind script tag hack transport
17192jQuery.ajaxTransport( "script", function( s ) {
17193
17194	// This transport only deals with cross domain requests
17195	if ( s.crossDomain ) {
17196
17197		var script,
17198			head = document.head || jQuery( "head" )[ 0 ] || document.documentElement;
17199
17200		return {
17201
17202			send: function( _, callback ) {
17203
17204				script = document.createElement( "script" );
17205
17206				script.async = true;
17207
17208				if ( s.scriptCharset ) {
17209					script.charset = s.scriptCharset;
17210				}
17211
17212				script.src = s.url;
17213
17214				// Attach handlers for all browsers
17215				script.onload = script.onreadystatechange = function( _, isAbort ) {
17216
17217					if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
17218
17219						// Handle memory leak in IE
17220						script.onload = script.onreadystatechange = null;
17221
17222						// Remove the script
17223						if ( script.parentNode ) {
17224							script.parentNode.removeChild( script );
17225						}
17226
17227						// Dereference the script
17228						script = null;
17229
17230						// Callback if not abort
17231						if ( !isAbort ) {
17232							callback( 200, "success" );
17233						}
17234					}
17235				};
17236
17237				// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
17238				// Use native DOM manipulation to avoid our domManip AJAX trickery
17239				head.insertBefore( script, head.firstChild );
17240			},
17241
17242			abort: function() {
17243				if ( script ) {
17244					script.onload( undefined, true );
17245				}
17246			}
17247		};
17248	}
17249} );
17250
17251
17252
17253
17254var oldCallbacks = [],
17255	rjsonp = /(=)\?(?=&|$)|\?\?/;
17256
17257// Default jsonp settings
17258jQuery.ajaxSetup( {
17259	jsonp: "callback",
17260	jsonpCallback: function() {
17261		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
17262		this[ callback ] = true;
17263		return callback;
17264	}
17265} );
17266
17267// Detect, normalize options and install callbacks for jsonp requests
17268jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
17269
17270	var callbackName, overwritten, responseContainer,
17271		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
17272			"url" :
17273			typeof s.data === "string" &&
17274				( s.contentType || "" )
17275					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
17276				rjsonp.test( s.data ) && "data"
17277		);
17278
17279	// Handle iff the expected data type is "jsonp" or we have a parameter to set
17280	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
17281
17282		// Get callback name, remembering preexisting value associated with it
17283		callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
17284			s.jsonpCallback() :
17285			s.jsonpCallback;
17286
17287		// Insert callback into url or form data
17288		if ( jsonProp ) {
17289			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
17290		} else if ( s.jsonp !== false ) {
17291			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
17292		}
17293
17294		// Use data converter to retrieve json after script execution
17295		s.converters[ "script json" ] = function() {
17296			if ( !responseContainer ) {
17297				jQuery.error( callbackName + " was not called" );
17298			}
17299			return responseContainer[ 0 ];
17300		};
17301
17302		// force json dataType
17303		s.dataTypes[ 0 ] = "json";
17304
17305		// Install callback
17306		overwritten = window[ callbackName ];
17307		window[ callbackName ] = function() {
17308			responseContainer = arguments;
17309		};
17310
17311		// Clean-up function (fires after converters)
17312		jqXHR.always( function() {
17313
17314			// If previous value didn't exist - remove it
17315			if ( overwritten === undefined ) {
17316				jQuery( window ).removeProp( callbackName );
17317
17318			// Otherwise restore preexisting value
17319			} else {
17320				window[ callbackName ] = overwritten;
17321			}
17322
17323			// Save back as free
17324			if ( s[ callbackName ] ) {
17325
17326				// make sure that re-using the options doesn't screw things around
17327				s.jsonpCallback = originalSettings.jsonpCallback;
17328
17329				// save the callback name for future use
17330				oldCallbacks.push( callbackName );
17331			}
17332
17333			// Call if it was a function and we have a response
17334			if ( responseContainer && jQuery.isFunction( overwritten ) ) {
17335				overwritten( responseContainer[ 0 ] );
17336			}
17337
17338			responseContainer = overwritten = undefined;
17339		} );
17340
17341		// Delegate to script
17342		return "script";
17343	}
17344} );
17345
17346
17347
17348
17349// data: string of html
17350// context (optional): If specified, the fragment will be created in this context,
17351// defaults to document
17352// keepScripts (optional): If true, will include scripts passed in the html string
17353jQuery.parseHTML = function( data, context, keepScripts ) {
17354	if ( !data || typeof data !== "string" ) {
17355		return null;
17356	}
17357	if ( typeof context === "boolean" ) {
17358		keepScripts = context;
17359		context = false;
17360	}
17361	context = context || document;
17362
17363	var parsed = rsingleTag.exec( data ),
17364		scripts = !keepScripts && [];
17365
17366	// Single tag
17367	if ( parsed ) {
17368		return [ context.createElement( parsed[ 1 ] ) ];
17369	}
17370
17371	parsed = buildFragment( [ data ], context, scripts );
17372
17373	if ( scripts && scripts.length ) {
17374		jQuery( scripts ).remove();
17375	}
17376
17377	return jQuery.merge( [], parsed.childNodes );
17378};
17379
17380
17381// Keep a copy of the old load method
17382var _load = jQuery.fn.load;
17383
17384/**
17385 * Load a url into a page
17386 */
17387jQuery.fn.load = function( url, params, callback ) {
17388	if ( typeof url !== "string" && _load ) {
17389		return _load.apply( this, arguments );
17390	}
17391
17392	var selector, type, response,
17393		self = this,
17394		off = url.indexOf( " " );
17395
17396	if ( off > -1 ) {
17397		selector = jQuery.trim( url.slice( off, url.length ) );
17398		url = url.slice( 0, off );
17399	}
17400
17401	// If it's a function
17402	if ( jQuery.isFunction( params ) ) {
17403
17404		// We assume that it's the callback
17405		callback = params;
17406		params = undefined;
17407
17408	// Otherwise, build a param string
17409	} else if ( params && typeof params === "object" ) {
17410		type = "POST";
17411	}
17412
17413	// If we have elements to modify, make the request
17414	if ( self.length > 0 ) {
17415		jQuery.ajax( {
17416			url: url,
17417
17418			// If "type" variable is undefined, then "GET" method will be used.
17419			// Make value of this field explicit since
17420			// user can override it through ajaxSetup method
17421			type: type || "GET",
17422			dataType: "html",
17423			data: params
17424		} ).done( function( responseText ) {
17425
17426			// Save response for use in complete callback
17427			response = arguments;
17428
17429			self.html( selector ?
17430
17431				// If a selector was specified, locate the right elements in a dummy div
17432				// Exclude scripts to avoid IE 'Permission Denied' errors
17433				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
17434
17435				// Otherwise use the full result
17436				responseText );
17437
17438		// If the request succeeds, this function gets "data", "status", "jqXHR"
17439		// but they are ignored because response was set above.
17440		// If it fails, this function gets "jqXHR", "status", "error"
17441		} ).always( callback && function( jqXHR, status ) {
17442			self.each( function() {
17443				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
17444			} );
17445		} );
17446	}
17447
17448	return this;
17449};
17450
17451
17452
17453
17454// Attach a bunch of functions for handling common AJAX events
17455jQuery.each( [
17456	"ajaxStart",
17457	"ajaxStop",
17458	"ajaxComplete",
17459	"ajaxError",
17460	"ajaxSuccess",
17461	"ajaxSend"
17462], function( i, type ) {
17463	jQuery.fn[ type ] = function( fn ) {
17464		return this.on( type, fn );
17465	};
17466} );
17467
17468
17469
17470
17471jQuery.expr.filters.animated = function( elem ) {
17472	return jQuery.grep( jQuery.timers, function( fn ) {
17473		return elem === fn.elem;
17474	} ).length;
17475};
17476
17477
17478
17479
17480
17481/**
17482 * Gets a window from an element
17483 */
17484function getWindow( elem ) {
17485	return jQuery.isWindow( elem ) ?
17486		elem :
17487		elem.nodeType === 9 ?
17488			elem.defaultView || elem.parentWindow :
17489			false;
17490}
17491
17492jQuery.offset = {
17493	setOffset: function( elem, options, i ) {
17494		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
17495			position = jQuery.css( elem, "position" ),
17496			curElem = jQuery( elem ),
17497			props = {};
17498
17499		// set position first, in-case top/left are set even on static elem
17500		if ( position === "static" ) {
17501			elem.style.position = "relative";
17502		}
17503
17504		curOffset = curElem.offset();
17505		curCSSTop = jQuery.css( elem, "top" );
17506		curCSSLeft = jQuery.css( elem, "left" );
17507		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
17508			jQuery.inArray( "auto", [ curCSSTop, curCSSLeft ] ) > -1;
17509
17510		// need to be able to calculate position if either top or left
17511		// is auto and position is either absolute or fixed
17512		if ( calculatePosition ) {
17513			curPosition = curElem.position();
17514			curTop = curPosition.top;
17515			curLeft = curPosition.left;
17516		} else {
17517			curTop = parseFloat( curCSSTop ) || 0;
17518			curLeft = parseFloat( curCSSLeft ) || 0;
17519		}
17520
17521		if ( jQuery.isFunction( options ) ) {
17522
17523			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
17524			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
17525		}
17526
17527		if ( options.top != null ) {
17528			props.top = ( options.top - curOffset.top ) + curTop;
17529		}
17530		if ( options.left != null ) {
17531			props.left = ( options.left - curOffset.left ) + curLeft;
17532		}
17533
17534		if ( "using" in options ) {
17535			options.using.call( elem, props );
17536		} else {
17537			curElem.css( props );
17538		}
17539	}
17540};
17541
17542jQuery.fn.extend( {
17543	offset: function( options ) {
17544		if ( arguments.length ) {
17545			return options === undefined ?
17546				this :
17547				this.each( function( i ) {
17548					jQuery.offset.setOffset( this, options, i );
17549				} );
17550		}
17551
17552		var docElem, win,
17553			box = { top: 0, left: 0 },
17554			elem = this[ 0 ],
17555			doc = elem && elem.ownerDocument;
17556
17557		if ( !doc ) {
17558			return;
17559		}
17560
17561		docElem = doc.documentElement;
17562
17563		// Make sure it's not a disconnected DOM node
17564		if ( !jQuery.contains( docElem, elem ) ) {
17565			return box;
17566		}
17567
17568		// If we don't have gBCR, just use 0,0 rather than error
17569		// BlackBerry 5, iOS 3 (original iPhone)
17570		if ( typeof elem.getBoundingClientRect !== "undefined" ) {
17571			box = elem.getBoundingClientRect();
17572		}
17573		win = getWindow( doc );
17574		return {
17575			top: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),
17576			left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
17577		};
17578	},
17579
17580	position: function() {
17581		if ( !this[ 0 ] ) {
17582			return;
17583		}
17584
17585		var offsetParent, offset,
17586			parentOffset = { top: 0, left: 0 },
17587			elem = this[ 0 ];
17588
17589		// Fixed elements are offset from window (parentOffset = {top:0, left: 0},
17590		// because it is its only offset parent
17591		if ( jQuery.css( elem, "position" ) === "fixed" ) {
17592
17593			// we assume that getBoundingClientRect is available when computed position is fixed
17594			offset = elem.getBoundingClientRect();
17595		} else {
17596
17597			// Get *real* offsetParent
17598			offsetParent = this.offsetParent();
17599
17600			// Get correct offsets
17601			offset = this.offset();
17602			if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
17603				parentOffset = offsetParent.offset();
17604			}
17605
17606			// Add offsetParent borders
17607			parentOffset.top  += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
17608			parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
17609		}
17610
17611		// Subtract parent offsets and element margins
17612		// note: when an element has margin: auto the offsetLeft and marginLeft
17613		// are the same in Safari causing offset.left to incorrectly be 0
17614		return {
17615			top:  offset.top  - parentOffset.top - jQuery.css( elem, "marginTop", true ),
17616			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
17617		};
17618	},
17619
17620	offsetParent: function() {
17621		return this.map( function() {
17622			var offsetParent = this.offsetParent;
17623
17624			while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) &&
17625				jQuery.css( offsetParent, "position" ) === "static" ) ) {
17626				offsetParent = offsetParent.offsetParent;
17627			}
17628			return offsetParent || documentElement;
17629		} );
17630	}
17631} );
17632
17633// Create scrollLeft and scrollTop methods
17634jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
17635	var top = /Y/.test( prop );
17636
17637	jQuery.fn[ method ] = function( val ) {
17638		return access( this, function( elem, method, val ) {
17639			var win = getWindow( elem );
17640
17641			if ( val === undefined ) {
17642				return win ? ( prop in win ) ? win[ prop ] :
17643					win.document.documentElement[ method ] :
17644					elem[ method ];
17645			}
17646
17647			if ( win ) {
17648				win.scrollTo(
17649					!top ? val : jQuery( win ).scrollLeft(),
17650					top ? val : jQuery( win ).scrollTop()
17651				);
17652
17653			} else {
17654				elem[ method ] = val;
17655			}
17656		}, method, val, arguments.length, null );
17657	};
17658} );
17659
17660// Support: Safari<7-8+, Chrome<37-44+
17661// Add the top/left cssHooks using jQuery.fn.position
17662// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
17663// getComputedStyle returns percent when specified for top/left/bottom/right
17664// rather than make the css module depend on the offset module, we just check for it here
17665jQuery.each( [ "top", "left" ], function( i, prop ) {
17666	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
17667		function( elem, computed ) {
17668			if ( computed ) {
17669				computed = curCSS( elem, prop );
17670
17671				// if curCSS returns percentage, fallback to offset
17672				return rnumnonpx.test( computed ) ?
17673					jQuery( elem ).position()[ prop ] + "px" :
17674					computed;
17675			}
17676		}
17677	);
17678} );
17679
17680
17681// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
17682jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
17683	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
17684	function( defaultExtra, funcName ) {
17685
17686		// margin is only for outerHeight, outerWidth
17687		jQuery.fn[ funcName ] = function( margin, value ) {
17688			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
17689				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
17690
17691			return access( this, function( elem, type, value ) {
17692				var doc;
17693
17694				if ( jQuery.isWindow( elem ) ) {
17695
17696					// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
17697					// isn't a whole lot we can do. See pull request at this URL for discussion:
17698					// https://github.com/jquery/jquery/pull/764
17699					return elem.document.documentElement[ "client" + name ];
17700				}
17701
17702				// Get document width or height
17703				if ( elem.nodeType === 9 ) {
17704					doc = elem.documentElement;
17705
17706					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
17707					// whichever is greatest
17708					// unfortunately, this causes bug #3838 in IE6/8 only,
17709					// but there is currently no good, small way to fix it.
17710					return Math.max(
17711						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
17712						elem.body[ "offset" + name ], doc[ "offset" + name ],
17713						doc[ "client" + name ]
17714					);
17715				}
17716
17717				return value === undefined ?
17718
17719					// Get width or height on the element, requesting but not forcing parseFloat
17720					jQuery.css( elem, type, extra ) :
17721
17722					// Set width or height on the element
17723					jQuery.style( elem, type, value, extra );
17724			}, type, chainable ? margin : undefined, chainable, null );
17725		};
17726	} );
17727} );
17728
17729
17730jQuery.fn.extend( {
17731
17732	bind: function( types, data, fn ) {
17733		return this.on( types, null, data, fn );
17734	},
17735	unbind: function( types, fn ) {
17736		return this.off( types, null, fn );
17737	},
17738
17739	delegate: function( selector, types, data, fn ) {
17740		return this.on( types, selector, data, fn );
17741	},
17742	undelegate: function( selector, types, fn ) {
17743
17744		// ( namespace ) or ( selector, types [, fn] )
17745		return arguments.length === 1 ?
17746			this.off( selector, "**" ) :
17747			this.off( types, selector || "**", fn );
17748	}
17749} );
17750
17751// The number of elements contained in the matched element set
17752jQuery.fn.size = function() {
17753	return this.length;
17754};
17755
17756jQuery.fn.andSelf = jQuery.fn.addBack;
17757
17758
17759
17760
17761// Register as a named AMD module, since jQuery can be concatenated with other
17762// files that may use define, but not via a proper concatenation script that
17763// understands anonymous AMD modules. A named AMD is safest and most robust
17764// way to register. Lowercase jquery is used because AMD module names are
17765// derived from file names, and jQuery is normally delivered in a lowercase
17766// file name. Do this after creating the global so that if an AMD module wants
17767// to call noConflict to hide this version of jQuery, it will work.
17768
17769// Note that for maximum portability, libraries that are not jQuery should
17770// declare themselves as anonymous modules, and avoid setting a global if an
17771// AMD loader is present. jQuery is a special case. For more information, see
17772// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
17773
17774if ( true ) {
17775	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
17776		return jQuery;
17777	}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
17778		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
17779}
17780
17781
17782
17783var
17784
17785	// Map over jQuery in case of overwrite
17786	_jQuery = window.jQuery,
17787
17788	// Map over the $ in case of overwrite
17789	_$ = window.$;
17790
17791jQuery.noConflict = function( deep ) {
17792	if ( window.$ === jQuery ) {
17793		window.$ = _$;
17794	}
17795
17796	if ( deep && window.jQuery === jQuery ) {
17797		window.jQuery = _jQuery;
17798	}
17799
17800	return jQuery;
17801};
17802
17803// Expose jQuery and $ identifiers, even in
17804// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
17805// and CommonJS for browser emulators (#13566)
17806if ( !noGlobal ) {
17807	window.jQuery = window.$ = jQuery;
17808}
17809
17810return jQuery;
17811}));
17812
17813
17814/***/ }),
17815
vendor: 2,343 bytes, lines 17816-17916
17816/***/ "./node_modules/object-assign/index.js":
17817/*!*********************************************!*\
17818  !*** ./node_modules/object-assign/index.js ***!
17819  \*********************************************/
17820/***/ ((module) => {
17821
17822"use strict";
17823/*
17824object-assign
17825(c) Sindre Sorhus
17826@license MIT
17827*/
17828
17829
17830/* eslint-disable no-unused-vars */
17831var getOwnPropertySymbols = Object.getOwnPropertySymbols;
17832var hasOwnProperty = Object.prototype.hasOwnProperty;
17833var propIsEnumerable = Object.prototype.propertyIsEnumerable;
17834
17835function toObject(val) {
17836	if (val === null || val === undefined) {
17837		throw new TypeError('Object.assign cannot be called with null or undefined');
17838	}
17839
17840	return Object(val);
17841}
17842
17843function shouldUseNative() {
17844	try {
17845		if (!Object.assign) {
17846			return false;
17847		}
17848
17849		// Detect buggy property enumeration order in older V8 versions.
17850
17851		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
17852		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
17853		test1[5] = 'de';
17854		if (Object.getOwnPropertyNames(test1)[0] === '5') {
17855			return false;
17856		}
17857
17858		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
17859		var test2 = {};
17860		for (var i = 0; i < 10; i++) {
17861			test2['_' + String.fromCharCode(i)] = i;
17862		}
17863		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
17864			return test2[n];
17865		});
17866		if (order2.join('') !== '0123456789') {
17867			return false;
17868		}
17869
17870		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
17871		var test3 = {};
17872		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
17873			test3[letter] = letter;
17874		});
17875		if (Object.keys(Object.assign({}, test3)).join('') !==
17876				'abcdefghijklmnopqrst') {
17877			return false;
17878		}
17879
17880		return true;
17881	} catch (err) {
17882		// We don't expect any of the above to throw, but better to be safe.
17883		return false;
17884	}
17885}
17886
17887module.exports = shouldUseNative() ? Object.assign : function (target, source) {
17888	var from;
17889	var to = toObject(target);
17890	var symbols;
17891
17892	for (var s = 1; s < arguments.length; s++) {
17893		from = Object(arguments[s]);
17894
17895		for (var key in from) {
17896			if (hasOwnProperty.call(from, key)) {
17897				to[key] = from[key];
17898			}
17899		}
17900
17901		if (getOwnPropertySymbols) {
17902			symbols = getOwnPropertySymbols(from);
17903			for (var i = 0; i < symbols.length; i++) {
17904				if (propIsEnumerable.call(from, symbols[i])) {
17905					to[symbols[i]] = from[symbols[i]];
17906				}
17907			}
17908		}
17909	}
17910
17911	return to;
17912};
17913
17914
17915/***/ }),
17916
vendor: 89,083 bytes, lines 17917-20547
17917/***/ "./node_modules/popper.js/dist/esm/popper.js":
17918/*!***************************************************!*\
17919  !*** ./node_modules/popper.js/dist/esm/popper.js ***!
17920  \***************************************************/
17921/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17922
17923"use strict";
17924__webpack_require__.r(__webpack_exports__);
17925/* harmony export */ __webpack_require__.d(__webpack_exports__, {
17926/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
17927/* harmony export */ });
17928/**!
17929 * @fileOverview Kickass library to create and place poppers near their reference elements.
17930 * @version 1.16.1
17931 * @license
17932 * Copyright (c) 2016 Federico Zivolo and contributors
17933 *
17934 * Permission is hereby granted, free of charge, to any person obtaining a copy
17935 * of this software and associated documentation files (the "Software"), to deal
17936 * in the Software without restriction, including without limitation the rights
17937 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17938 * copies of the Software, and to permit persons to whom the Software is
17939 * furnished to do so, subject to the following conditions:
17940 *
17941 * The above copyright notice and this permission notice shall be included in all
17942 * copies or substantial portions of the Software.
17943 *
17944 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17945 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17946 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17947 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17948 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17949 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17950 * SOFTWARE.
17951 */
17952var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
17953
17954var timeoutDuration = function () {
17955  var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
17956  for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
17957    if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
17958      return 1;
17959    }
17960  }
17961  return 0;
17962}();
17963
17964function microtaskDebounce(fn) {
17965  var called = false;
17966  return function () {
17967    if (called) {
17968      return;
17969    }
17970    called = true;
17971    window.Promise.resolve().then(function () {
17972      called = false;
17973      fn();
17974    });
17975  };
17976}
17977
17978function taskDebounce(fn) {
17979  var scheduled = false;
17980  return function () {
17981    if (!scheduled) {
17982      scheduled = true;
17983      setTimeout(function () {
17984        scheduled = false;
17985        fn();
17986      }, timeoutDuration);
17987    }
17988  };
17989}
17990
17991var supportsMicroTasks = isBrowser && window.Promise;
17992
17993/**
17994* Create a debounced version of a method, that's asynchronously deferred
17995* but called in the minimum time possible.
17996*
17997* @method
17998* @memberof Popper.Utils
17999* @argument {Function} fn
18000* @returns {Function}
18001*/
18002var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
18003
18004/**
18005 * Check if the given variable is a function
18006 * @method
18007 * @memberof Popper.Utils
18008 * @argument {Any} functionToCheck - variable to check
18009 * @returns {Boolean} answer to: is a function?
18010 */
18011function isFunction(functionToCheck) {
18012  var getType = {};
18013  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
18014}
18015
18016/**
18017 * Get CSS computed property of the given element
18018 * @method
18019 * @memberof Popper.Utils
18020 * @argument {Eement} element
18021 * @argument {String} property
18022 */
18023function getStyleComputedProperty(element, property) {
18024  if (element.nodeType !== 1) {
18025    return [];
18026  }
18027  // NOTE: 1 DOM access here
18028  var window = element.ownerDocument.defaultView;
18029  var css = window.getComputedStyle(element, null);
18030  return property ? css[property] : css;
18031}
18032
18033/**
18034 * Returns the parentNode or the host of the element
18035 * @method
18036 * @memberof Popper.Utils
18037 * @argument {Element} element
18038 * @returns {Element} parent
18039 */
18040function getParentNode(element) {
18041  if (element.nodeName === 'HTML') {
18042    return element;
18043  }
18044  return element.parentNode || element.host;
18045}
18046
18047/**
18048 * Returns the scrolling parent of the given element
18049 * @method
18050 * @memberof Popper.Utils
18051 * @argument {Element} element
18052 * @returns {Element} scroll parent
18053 */
18054function getScrollParent(element) {
18055  // Return body, `getScroll` will take care to get the correct `scrollTop` from it
18056  if (!element) {
18057    return document.body;
18058  }
18059
18060  switch (element.nodeName) {
18061    case 'HTML':
18062    case 'BODY':
18063      return element.ownerDocument.body;
18064    case '#document':
18065      return element.body;
18066  }
18067
18068  // Firefox want us to check `-x` and `-y` variations as well
18069
18070  var _getStyleComputedProp = getStyleComputedProperty(element),
18071      overflow = _getStyleComputedProp.overflow,
18072      overflowX = _getStyleComputedProp.overflowX,
18073      overflowY = _getStyleComputedProp.overflowY;
18074
18075  if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
18076    return element;
18077  }
18078
18079  return getScrollParent(getParentNode(element));
18080}
18081
18082/**
18083 * Returns the reference node of the reference object, or the reference object itself.
18084 * @method
18085 * @memberof Popper.Utils
18086 * @param {Element|Object} reference - the reference element (the popper will be relative to this)
18087 * @returns {Element} parent
18088 */
18089function getReferenceNode(reference) {
18090  return reference && reference.referenceNode ? reference.referenceNode : reference;
18091}
18092
18093var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
18094var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
18095
18096/**
18097 * Determines if the browser is Internet Explorer
18098 * @method
18099 * @memberof Popper.Utils
18100 * @param {Number} version to check
18101 * @returns {Boolean} isIE
18102 */
18103function isIE(version) {
18104  if (version === 11) {
18105    return isIE11;
18106  }
18107  if (version === 10) {
18108    return isIE10;
18109  }
18110  return isIE11 || isIE10;
18111}
18112
18113/**
18114 * Returns the offset parent of the given element
18115 * @method
18116 * @memberof Popper.Utils
18117 * @argument {Element} element
18118 * @returns {Element} offset parent
18119 */
18120function getOffsetParent(element) {
18121  if (!element) {
18122    return document.documentElement;
18123  }
18124
18125  var noOffsetParent = isIE(10) ? document.body : null;
18126
18127  // NOTE: 1 DOM access here
18128  var offsetParent = element.offsetParent || null;
18129  // Skip hidden elements which don't have an offsetParent
18130  while (offsetParent === noOffsetParent && element.nextElementSibling) {
18131    offsetParent = (element = element.nextElementSibling).offsetParent;
18132  }
18133
18134  var nodeName = offsetParent && offsetParent.nodeName;
18135
18136  if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
18137    return element ? element.ownerDocument.documentElement : document.documentElement;
18138  }
18139
18140  // .offsetParent will return the closest TH, TD or TABLE in case
18141  // no offsetParent is present, I hate this job...
18142  if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
18143    return getOffsetParent(offsetParent);
18144  }
18145
18146  return offsetParent;
18147}
18148
18149function isOffsetContainer(element) {
18150  var nodeName = element.nodeName;
18151
18152  if (nodeName === 'BODY') {
18153    return false;
18154  }
18155  return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
18156}
18157
18158/**
18159 * Finds the root node (document, shadowDOM root) of the given element
18160 * @method
18161 * @memberof Popper.Utils
18162 * @argument {Element} node
18163 * @returns {Element} root node
18164 */
18165function getRoot(node) {
18166  if (node.parentNode !== null) {
18167    return getRoot(node.parentNode);
18168  }
18169
18170  return node;
18171}
18172
18173/**
18174 * Finds the offset parent common to the two provided nodes
18175 * @method
18176 * @memberof Popper.Utils
18177 * @argument {Element} element1
18178 * @argument {Element} element2
18179 * @returns {Element} common offset parent
18180 */
18181function findCommonOffsetParent(element1, element2) {
18182  // This check is needed to avoid errors in case one of the elements isn't defined for any reason
18183  if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
18184    return document.documentElement;
18185  }
18186
18187  // Here we make sure to give as "start" the element that comes first in the DOM
18188  var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
18189  var start = order ? element1 : element2;
18190  var end = order ? element2 : element1;
18191
18192  // Get common ancestor container
18193  var range = document.createRange();
18194  range.setStart(start, 0);
18195  range.setEnd(end, 0);
18196  var commonAncestorContainer = range.commonAncestorContainer;
18197
18198  // Both nodes are inside #document
18199
18200  if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
18201    if (isOffsetContainer(commonAncestorContainer)) {
18202      return commonAncestorContainer;
18203    }
18204
18205    return getOffsetParent(commonAncestorContainer);
18206  }
18207
18208  // one of the nodes is inside shadowDOM, find which one
18209  var element1root = getRoot(element1);
18210  if (element1root.host) {
18211    return findCommonOffsetParent(element1root.host, element2);
18212  } else {
18213    return findCommonOffsetParent(element1, getRoot(element2).host);
18214  }
18215}
18216
18217/**
18218 * Gets the scroll value of the given element in the given side (top and left)
18219 * @method
18220 * @memberof Popper.Utils
18221 * @argument {Element} element
18222 * @argument {String} side `top` or `left`
18223 * @returns {number} amount of scrolled pixels
18224 */
18225function getScroll(element) {
18226  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
18227
18228  var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
18229  var nodeName = element.nodeName;
18230
18231  if (nodeName === 'BODY' || nodeName === 'HTML') {
18232    var html = element.ownerDocument.documentElement;
18233    var scrollingElement = element.ownerDocument.scrollingElement || html;
18234    return scrollingElement[upperSide];
18235  }
18236
18237  return element[upperSide];
18238}
18239
18240/*
18241 * Sum or subtract the element scroll values (left and top) from a given rect object
18242 * @method
18243 * @memberof Popper.Utils
18244 * @param {Object} rect - Rect object you want to change
18245 * @param {HTMLElement} element - The element from the function reads the scroll values
18246 * @param {Boolean} subtract - set to true if you want to subtract the scroll values
18247 * @return {Object} rect - The modifier rect object
18248 */
18249function includeScroll(rect, element) {
18250  var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
18251
18252  var scrollTop = getScroll(element, 'top');
18253  var scrollLeft = getScroll(element, 'left');
18254  var modifier = subtract ? -1 : 1;
18255  rect.top += scrollTop * modifier;
18256  rect.bottom += scrollTop * modifier;
18257  rect.left += scrollLeft * modifier;
18258  rect.right += scrollLeft * modifier;
18259  return rect;
18260}
18261
18262/*
18263 * Helper to detect borders of a given element
18264 * @method
18265 * @memberof Popper.Utils
18266 * @param {CSSStyleDeclaration} styles
18267 * Result of `getStyleComputedProperty` on the given element
18268 * @param {String} axis - `x` or `y`
18269 * @return {number} borders - The borders size of the given axis
18270 */
18271
18272function getBordersSize(styles, axis) {
18273  var sideA = axis === 'x' ? 'Left' : 'Top';
18274  var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
18275
18276  return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);
18277}
18278
18279function getSize(axis, body, html, computedStyle) {
18280  return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
18281}
18282
18283function getWindowSizes(document) {
18284  var body = document.body;
18285  var html = document.documentElement;
18286  var computedStyle = isIE(10) && getComputedStyle(html);
18287
18288  return {
18289    height: getSize('Height', body, html, computedStyle),
18290    width: getSize('Width', body, html, computedStyle)
18291  };
18292}
18293
18294var classCallCheck = function (instance, Constructor) {
18295  if (!(instance instanceof Constructor)) {
18296    throw new TypeError("Cannot call a class as a function");
18297  }
18298};
18299
18300var createClass = function () {
18301  function defineProperties(target, props) {
18302    for (var i = 0; i < props.length; i++) {
18303      var descriptor = props[i];
18304      descriptor.enumerable = descriptor.enumerable || false;
18305      descriptor.configurable = true;
18306      if ("value" in descriptor) descriptor.writable = true;
18307      Object.defineProperty(target, descriptor.key, descriptor);
18308    }
18309  }
18310
18311  return function (Constructor, protoProps, staticProps) {
18312    if (protoProps) defineProperties(Constructor.prototype, protoProps);
18313    if (staticProps) defineProperties(Constructor, staticProps);
18314    return Constructor;
18315  };
18316}();
18317
18318
18319
18320
18321
18322var defineProperty = function (obj, key, value) {
18323  if (key in obj) {
18324    Object.defineProperty(obj, key, {
18325      value: value,
18326      enumerable: true,
18327      configurable: true,
18328      writable: true
18329    });
18330  } else {
18331    obj[key] = value;
18332  }
18333
18334  return obj;
18335};
18336
18337var _extends = Object.assign || function (target) {
18338  for (var i = 1; i < arguments.length; i++) {
18339    var source = arguments[i];
18340
18341    for (var key in source) {
18342      if (Object.prototype.hasOwnProperty.call(source, key)) {
18343        target[key] = source[key];
18344      }
18345    }
18346  }
18347
18348  return target;
18349};
18350
18351/**
18352 * Given element offsets, generate an output similar to getBoundingClientRect
18353 * @method
18354 * @memberof Popper.Utils
18355 * @argument {Object} offsets
18356 * @returns {Object} ClientRect like output
18357 */
18358function getClientRect(offsets) {
18359  return _extends({}, offsets, {
18360    right: offsets.left + offsets.width,
18361    bottom: offsets.top + offsets.height
18362  });
18363}
18364
18365/**
18366 * Get bounding client rect of given element
18367 * @method
18368 * @memberof Popper.Utils
18369 * @param {HTMLElement} element
18370 * @return {Object} client rect
18371 */
18372function getBoundingClientRect(element) {
18373  var rect = {};
18374
18375  // IE10 10 FIX: Please, don't ask, the element isn't
18376  // considered in DOM in some circumstances...
18377  // This isn't reproducible in IE10 compatibility mode of IE11
18378  try {
18379    if (isIE(10)) {
18380      rect = element.getBoundingClientRect();
18381      var scrollTop = getScroll(element, 'top');
18382      var scrollLeft = getScroll(element, 'left');
18383      rect.top += scrollTop;
18384      rect.left += scrollLeft;
18385      rect.bottom += scrollTop;
18386      rect.right += scrollLeft;
18387    } else {
18388      rect = element.getBoundingClientRect();
18389    }
18390  } catch (e) {}
18391
18392  var result = {
18393    left: rect.left,
18394    top: rect.top,
18395    width: rect.right - rect.left,
18396    height: rect.bottom - rect.top
18397  };
18398
18399  // subtract scrollbar size from sizes
18400  var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
18401  var width = sizes.width || element.clientWidth || result.width;
18402  var height = sizes.height || element.clientHeight || result.height;
18403
18404  var horizScrollbar = element.offsetWidth - width;
18405  var vertScrollbar = element.offsetHeight - height;
18406
18407  // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
18408  // we make this check conditional for performance reasons
18409  if (horizScrollbar || vertScrollbar) {
18410    var styles = getStyleComputedProperty(element);
18411    horizScrollbar -= getBordersSize(styles, 'x');
18412    vertScrollbar -= getBordersSize(styles, 'y');
18413
18414    result.width -= horizScrollbar;
18415    result.height -= vertScrollbar;
18416  }
18417
18418  return getClientRect(result);
18419}
18420
18421function getOffsetRectRelativeToArbitraryNode(children, parent) {
18422  var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
18423
18424  var isIE10 = isIE(10);
18425  var isHTML = parent.nodeName === 'HTML';
18426  var childrenRect = getBoundingClientRect(children);
18427  var parentRect = getBoundingClientRect(parent);
18428  var scrollParent = getScrollParent(children);
18429
18430  var styles = getStyleComputedProperty(parent);
18431  var borderTopWidth = parseFloat(styles.borderTopWidth);
18432  var borderLeftWidth = parseFloat(styles.borderLeftWidth);
18433
18434  // In cases where the parent is fixed, we must ignore negative scroll in offset calc
18435  if (fixedPosition && isHTML) {
18436    parentRect.top = Math.max(parentRect.top, 0);
18437    parentRect.left = Math.max(parentRect.left, 0);
18438  }
18439  var offsets = getClientRect({
18440    top: childrenRect.top - parentRect.top - borderTopWidth,
18441    left: childrenRect.left - parentRect.left - borderLeftWidth,
18442    width: childrenRect.width,
18443    height: childrenRect.height
18444  });
18445  offsets.marginTop = 0;
18446  offsets.marginLeft = 0;
18447
18448  // Subtract margins of documentElement in case it's being used as parent
18449  // we do this only on HTML because it's the only element that behaves
18450  // differently when margins are applied to it. The margins are included in
18451  // the box of the documentElement, in the other cases not.
18452  if (!isIE10 && isHTML) {
18453    var marginTop = parseFloat(styles.marginTop);
18454    var marginLeft = parseFloat(styles.marginLeft);
18455
18456    offsets.top -= borderTopWidth - marginTop;
18457    offsets.bottom -= borderTopWidth - marginTop;
18458    offsets.left -= borderLeftWidth - marginLeft;
18459    offsets.right -= borderLeftWidth - marginLeft;
18460
18461    // Attach marginTop and marginLeft because in some circumstances we may need them
18462    offsets.marginTop = marginTop;
18463    offsets.marginLeft = marginLeft;
18464  }
18465
18466  if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
18467    offsets = includeScroll(offsets, parent);
18468  }
18469
18470  return offsets;
18471}
18472
18473function getViewportOffsetRectRelativeToArtbitraryNode(element) {
18474  var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
18475
18476  var html = element.ownerDocument.documentElement;
18477  var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
18478  var width = Math.max(html.clientWidth, window.innerWidth || 0);
18479  var height = Math.max(html.clientHeight, window.innerHeight || 0);
18480
18481  var scrollTop = !excludeScroll ? getScroll(html) : 0;
18482  var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
18483
18484  var offset = {
18485    top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
18486    left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
18487    width: width,
18488    height: height
18489  };
18490
18491  return getClientRect(offset);
18492}
18493
18494/**
18495 * Check if the given element is fixed or is inside a fixed parent
18496 * @method
18497 * @memberof Popper.Utils
18498 * @argument {Element} element
18499 * @argument {Element} customContainer
18500 * @returns {Boolean} answer to "isFixed?"
18501 */
18502function isFixed(element) {
18503  var nodeName = element.nodeName;
18504  if (nodeName === 'BODY' || nodeName === 'HTML') {
18505    return false;
18506  }
18507  if (getStyleComputedProperty(element, 'position') === 'fixed') {
18508    return true;
18509  }
18510  var parentNode = getParentNode(element);
18511  if (!parentNode) {
18512    return false;
18513  }
18514  return isFixed(parentNode);
18515}
18516
18517/**
18518 * Finds the first parent of an element that has a transformed property defined
18519 * @method
18520 * @memberof Popper.Utils
18521 * @argument {Element} element
18522 * @returns {Element} first transformed parent or documentElement
18523 */
18524
18525function getFixedPositionOffsetParent(element) {
18526  // This check is needed to avoid errors in case one of the elements isn't defined for any reason
18527  if (!element || !element.parentElement || isIE()) {
18528    return document.documentElement;
18529  }
18530  var el = element.parentElement;
18531  while (el && getStyleComputedProperty(el, 'transform') === 'none') {
18532    el = el.parentElement;
18533  }
18534  return el || document.documentElement;
18535}
18536
18537/**
18538 * Computed the boundaries limits and return them
18539 * @method
18540 * @memberof Popper.Utils
18541 * @param {HTMLElement} popper
18542 * @param {HTMLElement} reference
18543 * @param {number} padding
18544 * @param {HTMLElement} boundariesElement - Element used to define the boundaries
18545 * @param {Boolean} fixedPosition - Is in fixed position mode
18546 * @returns {Object} Coordinates of the boundaries
18547 */
18548function getBoundaries(popper, reference, padding, boundariesElement) {
18549  var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
18550
18551  // NOTE: 1 DOM access here
18552
18553  var boundaries = { top: 0, left: 0 };
18554  var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
18555
18556  // Handle viewport case
18557  if (boundariesElement === 'viewport') {
18558    boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
18559  } else {
18560    // Handle other cases based on DOM element used as boundaries
18561    var boundariesNode = void 0;
18562    if (boundariesElement === 'scrollParent') {
18563      boundariesNode = getScrollParent(getParentNode(reference));
18564      if (boundariesNode.nodeName === 'BODY') {
18565        boundariesNode = popper.ownerDocument.documentElement;
18566      }
18567    } else if (boundariesElement === 'window') {
18568      boundariesNode = popper.ownerDocument.documentElement;
18569    } else {
18570      boundariesNode = boundariesElement;
18571    }
18572
18573    var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
18574
18575    // In case of HTML, we need a different computation
18576    if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
18577      var _getWindowSizes = getWindowSizes(popper.ownerDocument),
18578          height = _getWindowSizes.height,
18579          width = _getWindowSizes.width;
18580
18581      boundaries.top += offsets.top - offsets.marginTop;
18582      boundaries.bottom = height + offsets.top;
18583      boundaries.left += offsets.left - offsets.marginLeft;
18584      boundaries.right = width + offsets.left;
18585    } else {
18586      // for all the other DOM elements, this one is good
18587      boundaries = offsets;
18588    }
18589  }
18590
18591  // Add paddings
18592  padding = padding || 0;
18593  var isPaddingNumber = typeof padding === 'number';
18594  boundaries.left += isPaddingNumber ? padding : padding.left || 0;
18595  boundaries.top += isPaddingNumber ? padding : padding.top || 0;
18596  boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
18597  boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
18598
18599  return boundaries;
18600}
18601
18602function getArea(_ref) {
18603  var width = _ref.width,
18604      height = _ref.height;
18605
18606  return width * height;
18607}
18608
18609/**
18610 * Utility used to transform the `auto` placement to the placement with more
18611 * available space.
18612 * @method
18613 * @memberof Popper.Utils
18614 * @argument {Object} data - The data object generated by update method
18615 * @argument {Object} options - Modifiers configuration and options
18616 * @returns {Object} The data object, properly modified
18617 */
18618function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
18619  var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
18620
18621  if (placement.indexOf('auto') === -1) {
18622    return placement;
18623  }
18624
18625  var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
18626
18627  var rects = {
18628    top: {
18629      width: boundaries.width,
18630      height: refRect.top - boundaries.top
18631    },
18632    right: {
18633      width: boundaries.right - refRect.right,
18634      height: boundaries.height
18635    },
18636    bottom: {
18637      width: boundaries.width,
18638      height: boundaries.bottom - refRect.bottom
18639    },
18640    left: {
18641      width: refRect.left - boundaries.left,
18642      height: boundaries.height
18643    }
18644  };
18645
18646  var sortedAreas = Object.keys(rects).map(function (key) {
18647    return _extends({
18648      key: key
18649    }, rects[key], {
18650      area: getArea(rects[key])
18651    });
18652  }).sort(function (a, b) {
18653    return b.area - a.area;
18654  });
18655
18656  var filteredAreas = sortedAreas.filter(function (_ref2) {
18657    var width = _ref2.width,
18658        height = _ref2.height;
18659    return width >= popper.clientWidth && height >= popper.clientHeight;
18660  });
18661
18662  var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
18663
18664  var variation = placement.split('-')[1];
18665
18666  return computedPlacement + (variation ? '-' + variation : '');
18667}
18668
18669/**
18670 * Get offsets to the reference element
18671 * @method
18672 * @memberof Popper.Utils
18673 * @param {Object} state
18674 * @param {Element} popper - the popper element
18675 * @param {Element} reference - the reference element (the popper will be relative to this)
18676 * @param {Element} fixedPosition - is in fixed position mode
18677 * @returns {Object} An object containing the offsets which will be applied to the popper
18678 */
18679function getReferenceOffsets(state, popper, reference) {
18680  var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
18681
18682  var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
18683  return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
18684}
18685
18686/**
18687 * Get the outer sizes of the given element (offset size + margins)
18688 * @method
18689 * @memberof Popper.Utils
18690 * @argument {Element} element
18691 * @returns {Object} object containing width and height properties
18692 */
18693function getOuterSizes(element) {
18694  var window = element.ownerDocument.defaultView;
18695  var styles = window.getComputedStyle(element);
18696  var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
18697  var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
18698  var result = {
18699    width: element.offsetWidth + y,
18700    height: element.offsetHeight + x
18701  };
18702  return result;
18703}
18704
18705/**
18706 * Get the opposite placement of the given one
18707 * @method
18708 * @memberof Popper.Utils
18709 * @argument {String} placement
18710 * @returns {String} flipped placement
18711 */
18712function getOppositePlacement(placement) {
18713  var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
18714  return placement.replace(/left|right|bottom|top/g, function (matched) {
18715    return hash[matched];
18716  });
18717}
18718
18719/**
18720 * Get offsets to the popper
18721 * @method
18722 * @memberof Popper.Utils
18723 * @param {Object} position - CSS position the Popper will get applied
18724 * @param {HTMLElement} popper - the popper element
18725 * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
18726 * @param {String} placement - one of the valid placement options
18727 * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
18728 */
18729function getPopperOffsets(popper, referenceOffsets, placement) {
18730  placement = placement.split('-')[0];
18731
18732  // Get popper node sizes
18733  var popperRect = getOuterSizes(popper);
18734
18735  // Add position, width and height to our offsets object
18736  var popperOffsets = {
18737    width: popperRect.width,
18738    height: popperRect.height
18739  };
18740
18741  // depending by the popper placement we have to compute its offsets slightly differently
18742  var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
18743  var mainSide = isHoriz ? 'top' : 'left';
18744  var secondarySide = isHoriz ? 'left' : 'top';
18745  var measurement = isHoriz ? 'height' : 'width';
18746  var secondaryMeasurement = !isHoriz ? 'height' : 'width';
18747
18748  popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
18749  if (placement === secondarySide) {
18750    popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
18751  } else {
18752    popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
18753  }
18754
18755  return popperOffsets;
18756}
18757
18758/**
18759 * Mimics the `find` method of Array
18760 * @method
18761 * @memberof Popper.Utils
18762 * @argument {Array} arr
18763 * @argument prop
18764 * @argument value
18765 * @returns index or -1
18766 */
18767function find(arr, check) {
18768  // use native find if supported
18769  if (Array.prototype.find) {
18770    return arr.find(check);
18771  }
18772
18773  // use `filter` to obtain the same behavior of `find`
18774  return arr.filter(check)[0];
18775}
18776
18777/**
18778 * Return the index of the matching object
18779 * @method
18780 * @memberof Popper.Utils
18781 * @argument {Array} arr
18782 * @argument prop
18783 * @argument value
18784 * @returns index or -1
18785 */
18786function findIndex(arr, prop, value) {
18787  // use native findIndex if supported
18788  if (Array.prototype.findIndex) {
18789    return arr.findIndex(function (cur) {
18790      return cur[prop] === value;
18791    });
18792  }
18793
18794  // use `find` + `indexOf` if `findIndex` isn't supported
18795  var match = find(arr, function (obj) {
18796    return obj[prop] === value;
18797  });
18798  return arr.indexOf(match);
18799}
18800
18801/**
18802 * Loop trough the list of modifiers and run them in order,
18803 * each of them will then edit the data object.
18804 * @method
18805 * @memberof Popper.Utils
18806 * @param {dataObject} data
18807 * @param {Array} modifiers
18808 * @param {String} ends - Optional modifier name used as stopper
18809 * @returns {dataObject}
18810 */
18811function runModifiers(modifiers, data, ends) {
18812  var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
18813
18814  modifiersToRun.forEach(function (modifier) {
18815    if (modifier['function']) {
18816      // eslint-disable-line dot-notation
18817      console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
18818    }
18819    var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
18820    if (modifier.enabled && isFunction(fn)) {
18821      // Add properties to offsets to make them a complete clientRect object
18822      // we do this before each modifier to make sure the previous one doesn't
18823      // mess with these values
18824      data.offsets.popper = getClientRect(data.offsets.popper);
18825      data.offsets.reference = getClientRect(data.offsets.reference);
18826
18827      data = fn(data, modifier);
18828    }
18829  });
18830
18831  return data;
18832}
18833
18834/**
18835 * Updates the position of the popper, computing the new offsets and applying
18836 * the new style.<br />
18837 * Prefer `scheduleUpdate` over `update` because of performance reasons.
18838 * @method
18839 * @memberof Popper
18840 */
18841function update() {
18842  // if popper is destroyed, don't perform any further update
18843  if (this.state.isDestroyed) {
18844    return;
18845  }
18846
18847  var data = {
18848    instance: this,
18849    styles: {},
18850    arrowStyles: {},
18851    attributes: {},
18852    flipped: false,
18853    offsets: {}
18854  };
18855
18856  // compute reference element offsets
18857  data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
18858
18859  // compute auto placement, store placement inside the data object,
18860  // modifiers will be able to edit `placement` if needed
18861  // and refer to originalPlacement to know the original value
18862  data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
18863
18864  // store the computed placement inside `originalPlacement`
18865  data.originalPlacement = data.placement;
18866
18867  data.positionFixed = this.options.positionFixed;
18868
18869  // compute the popper offsets
18870  data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
18871
18872  data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
18873
18874  // run the modifiers
18875  data = runModifiers(this.modifiers, data);
18876
18877  // the first `update` will call `onCreate` callback
18878  // the other ones will call `onUpdate` callback
18879  if (!this.state.isCreated) {
18880    this.state.isCreated = true;
18881    this.options.onCreate(data);
18882  } else {
18883    this.options.onUpdate(data);
18884  }
18885}
18886
18887/**
18888 * Helper used to know if the given modifier is enabled.
18889 * @method
18890 * @memberof Popper.Utils
18891 * @returns {Boolean}
18892 */
18893function isModifierEnabled(modifiers, modifierName) {
18894  return modifiers.some(function (_ref) {
18895    var name = _ref.name,
18896        enabled = _ref.enabled;
18897    return enabled && name === modifierName;
18898  });
18899}
18900
18901/**
18902 * Get the prefixed supported property name
18903 * @method
18904 * @memberof Popper.Utils
18905 * @argument {String} property (camelCase)
18906 * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
18907 */
18908function getSupportedPropertyName(property) {
18909  var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
18910  var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
18911
18912  for (var i = 0; i < prefixes.length; i++) {
18913    var prefix = prefixes[i];
18914    var toCheck = prefix ? '' + prefix + upperProp : property;
18915    if (typeof document.body.style[toCheck] !== 'undefined') {
18916      return toCheck;
18917    }
18918  }
18919  return null;
18920}
18921
18922/**
18923 * Destroys the popper.
18924 * @method
18925 * @memberof Popper
18926 */
18927function destroy() {
18928  this.state.isDestroyed = true;
18929
18930  // touch DOM only if `applyStyle` modifier is enabled
18931  if (isModifierEnabled(this.modifiers, 'applyStyle')) {
18932    this.popper.removeAttribute('x-placement');
18933    this.popper.style.position = '';
18934    this.popper.style.top = '';
18935    this.popper.style.left = '';
18936    this.popper.style.right = '';
18937    this.popper.style.bottom = '';
18938    this.popper.style.willChange = '';
18939    this.popper.style[getSupportedPropertyName('transform')] = '';
18940  }
18941
18942  this.disableEventListeners();
18943
18944  // remove the popper if user explicitly asked for the deletion on destroy
18945  // do not use `remove` because IE11 doesn't support it
18946  if (this.options.removeOnDestroy) {
18947    this.popper.parentNode.removeChild(this.popper);
18948  }
18949  return this;
18950}
18951
18952/**
18953 * Get the window associated with the element
18954 * @argument {Element} element
18955 * @returns {Window}
18956 */
18957function getWindow(element) {
18958  var ownerDocument = element.ownerDocument;
18959  return ownerDocument ? ownerDocument.defaultView : window;
18960}
18961
18962function attachToScrollParents(scrollParent, event, callback, scrollParents) {
18963  var isBody = scrollParent.nodeName === 'BODY';
18964  var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
18965  target.addEventListener(event, callback, { passive: true });
18966
18967  if (!isBody) {
18968    attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
18969  }
18970  scrollParents.push(target);
18971}
18972
18973/**
18974 * Setup needed event listeners used to update the popper position
18975 * @method
18976 * @memberof Popper.Utils
18977 * @private
18978 */
18979function setupEventListeners(reference, options, state, updateBound) {
18980  // Resize event listener on window
18981  state.updateBound = updateBound;
18982  getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
18983
18984  // Scroll event listener on scroll parents
18985  var scrollElement = getScrollParent(reference);
18986  attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
18987  state.scrollElement = scrollElement;
18988  state.eventsEnabled = true;
18989
18990  return state;
18991}
18992
18993/**
18994 * It will add resize/scroll events and start recalculating
18995 * position of the popper element when they are triggered.
18996 * @method
18997 * @memberof Popper
18998 */
18999function enableEventListeners() {
19000  if (!this.state.eventsEnabled) {
19001    this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
19002  }
19003}
19004
19005/**
19006 * Remove event listeners used to update the popper position
19007 * @method
19008 * @memberof Popper.Utils
19009 * @private
19010 */
19011function removeEventListeners(reference, state) {
19012  // Remove resize event listener on window
19013  getWindow(reference).removeEventListener('resize', state.updateBound);
19014
19015  // Remove scroll event listener on scroll parents
19016  state.scrollParents.forEach(function (target) {
19017    target.removeEventListener('scroll', state.updateBound);
19018  });
19019
19020  // Reset state
19021  state.updateBound = null;
19022  state.scrollParents = [];
19023  state.scrollElement = null;
19024  state.eventsEnabled = false;
19025  return state;
19026}
19027
19028/**
19029 * It will remove resize/scroll events and won't recalculate popper position
19030 * when they are triggered. It also won't trigger `onUpdate` callback anymore,
19031 * unless you call `update` method manually.
19032 * @method
19033 * @memberof Popper
19034 */
19035function disableEventListeners() {
19036  if (this.state.eventsEnabled) {
19037    cancelAnimationFrame(this.scheduleUpdate);
19038    this.state = removeEventListeners(this.reference, this.state);
19039  }
19040}
19041
19042/**
19043 * Tells if a given input is a number
19044 * @method
19045 * @memberof Popper.Utils
19046 * @param {*} input to check
19047 * @return {Boolean}
19048 */
19049function isNumeric(n) {
19050  return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
19051}
19052
19053/**
19054 * Set the style to the given popper
19055 * @method
19056 * @memberof Popper.Utils
19057 * @argument {Element} element - Element to apply the style to
19058 * @argument {Object} styles
19059 * Object with a list of properties and values which will be applied to the element
19060 */
19061function setStyles(element, styles) {
19062  Object.keys(styles).forEach(function (prop) {
19063    var unit = '';
19064    // add unit if the value is numeric and is one of the following
19065    if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
19066      unit = 'px';
19067    }
19068    element.style[prop] = styles[prop] + unit;
19069  });
19070}
19071
19072/**
19073 * Set the attributes to the given popper
19074 * @method
19075 * @memberof Popper.Utils
19076 * @argument {Element} element - Element to apply the attributes to
19077 * @argument {Object} styles
19078 * Object with a list of properties and values which will be applied to the element
19079 */
19080function setAttributes(element, attributes) {
19081  Object.keys(attributes).forEach(function (prop) {
19082    var value = attributes[prop];
19083    if (value !== false) {
19084      element.setAttribute(prop, attributes[prop]);
19085    } else {
19086      element.removeAttribute(prop);
19087    }
19088  });
19089}
19090
19091/**
19092 * @function
19093 * @memberof Modifiers
19094 * @argument {Object} data - The data object generated by `update` method
19095 * @argument {Object} data.styles - List of style properties - values to apply to popper element
19096 * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
19097 * @argument {Object} options - Modifiers configuration and options
19098 * @returns {Object} The same data object
19099 */
19100function applyStyle(data) {
19101  // any property present in `data.styles` will be applied to the popper,
19102  // in this way we can make the 3rd party modifiers add custom styles to it
19103  // Be aware, modifiers could override the properties defined in the previous
19104  // lines of this modifier!
19105  setStyles(data.instance.popper, data.styles);
19106
19107  // any property present in `data.attributes` will be applied to the popper,
19108  // they will be set as HTML attributes of the element
19109  setAttributes(data.instance.popper, data.attributes);
19110
19111  // if arrowElement is defined and arrowStyles has some properties
19112  if (data.arrowElement && Object.keys(data.arrowStyles).length) {
19113    setStyles(data.arrowElement, data.arrowStyles);
19114  }
19115
19116  return data;
19117}
19118
19119/**
19120 * Set the x-placement attribute before everything else because it could be used
19121 * to add margins to the popper margins needs to be calculated to get the
19122 * correct popper offsets.
19123 * @method
19124 * @memberof Popper.modifiers
19125 * @param {HTMLElement} reference - The reference element used to position the popper
19126 * @param {HTMLElement} popper - The HTML element used as popper
19127 * @param {Object} options - Popper.js options
19128 */
19129function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
19130  // compute reference element offsets
19131  var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
19132
19133  // compute auto placement, store placement inside the data object,
19134  // modifiers will be able to edit `placement` if needed
19135  // and refer to originalPlacement to know the original value
19136  var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
19137
19138  popper.setAttribute('x-placement', placement);
19139
19140  // Apply `position` to popper before anything else because
19141  // without the position applied we can't guarantee correct computations
19142  setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
19143
19144  return options;
19145}
19146
19147/**
19148 * @function
19149 * @memberof Popper.Utils
19150 * @argument {Object} data - The data object generated by `update` method
19151 * @argument {Boolean} shouldRound - If the offsets should be rounded at all
19152 * @returns {Object} The popper's position offsets rounded
19153 *
19154 * The tale of pixel-perfect positioning. It's still not 100% perfect, but as
19155 * good as it can be within reason.
19156 * Discussion here: https://github.com/FezVrasta/popper.js/pull/715
19157 *
19158 * Low DPI screens cause a popper to be blurry if not using full pixels (Safari
19159 * as well on High DPI screens).
19160 *
19161 * Firefox prefers no rounding for positioning and does not have blurriness on
19162 * high DPI screens.
19163 *
19164 * Only horizontal placement and left/right values need to be considered.
19165 */
19166function getRoundedOffsets(data, shouldRound) {
19167  var _data$offsets = data.offsets,
19168      popper = _data$offsets.popper,
19169      reference = _data$offsets.reference;
19170  var round = Math.round,
19171      floor = Math.floor;
19172
19173  var noRound = function noRound(v) {
19174    return v;
19175  };
19176
19177  var referenceWidth = round(reference.width);
19178  var popperWidth = round(popper.width);
19179
19180  var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
19181  var isVariation = data.placement.indexOf('-') !== -1;
19182  var sameWidthParity = referenceWidth % 2 === popperWidth % 2;
19183  var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;
19184
19185  var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;
19186  var verticalToInteger = !shouldRound ? noRound : round;
19187
19188  return {
19189    left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),
19190    top: verticalToInteger(popper.top),
19191    bottom: verticalToInteger(popper.bottom),
19192    right: horizontalToInteger(popper.right)
19193  };
19194}
19195
19196var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);
19197
19198/**
19199 * @function
19200 * @memberof Modifiers
19201 * @argument {Object} data - The data object generated by `update` method
19202 * @argument {Object} options - Modifiers configuration and options
19203 * @returns {Object} The data object, properly modified
19204 */
19205function computeStyle(data, options) {
19206  var x = options.x,
19207      y = options.y;
19208  var popper = data.offsets.popper;
19209
19210  // Remove this legacy support in Popper.js v2
19211
19212  var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
19213    return modifier.name === 'applyStyle';
19214  }).gpuAcceleration;
19215  if (legacyGpuAccelerationOption !== undefined) {
19216    console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
19217  }
19218  var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
19219
19220  var offsetParent = getOffsetParent(data.instance.popper);
19221  var offsetParentRect = getBoundingClientRect(offsetParent);
19222
19223  // Styles
19224  var styles = {
19225    position: popper.position
19226  };
19227
19228  var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);
19229
19230  var sideA = x === 'bottom' ? 'top' : 'bottom';
19231  var sideB = y === 'right' ? 'left' : 'right';
19232
19233  // if gpuAcceleration is set to `true` and transform is supported,
19234  //  we use `translate3d` to apply the position to the popper we
19235  // automatically use the supported prefixed version if needed
19236  var prefixedProperty = getSupportedPropertyName('transform');
19237
19238  // now, let's make a step back and look at this code closely (wtf?)
19239  // If the content of the popper grows once it's been positioned, it
19240  // may happen that the popper gets misplaced because of the new content
19241  // overflowing its reference element
19242  // To avoid this problem, we provide two options (x and y), which allow
19243  // the consumer to define the offset origin.
19244  // If we position a popper on top of a reference element, we can set
19245  // `x` to `top` to make the popper grow towards its top instead of
19246  // its bottom.
19247  var left = void 0,
19248      top = void 0;
19249  if (sideA === 'bottom') {
19250    // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)
19251    // and not the bottom of the html element
19252    if (offsetParent.nodeName === 'HTML') {
19253      top = -offsetParent.clientHeight + offsets.bottom;
19254    } else {
19255      top = -offsetParentRect.height + offsets.bottom;
19256    }
19257  } else {
19258    top = offsets.top;
19259  }
19260  if (sideB === 'right') {
19261    if (offsetParent.nodeName === 'HTML') {
19262      left = -offsetParent.clientWidth + offsets.right;
19263    } else {
19264      left = -offsetParentRect.width + offsets.right;
19265    }
19266  } else {
19267    left = offsets.left;
19268  }
19269  if (gpuAcceleration && prefixedProperty) {
19270    styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
19271    styles[sideA] = 0;
19272    styles[sideB] = 0;
19273    styles.willChange = 'transform';
19274  } else {
19275    // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
19276    var invertTop = sideA === 'bottom' ? -1 : 1;
19277    var invertLeft = sideB === 'right' ? -1 : 1;
19278    styles[sideA] = top * invertTop;
19279    styles[sideB] = left * invertLeft;
19280    styles.willChange = sideA + ', ' + sideB;
19281  }
19282
19283  // Attributes
19284  var attributes = {
19285    'x-placement': data.placement
19286  };
19287
19288  // Update `data` attributes, styles and arrowStyles
19289  data.attributes = _extends({}, attributes, data.attributes);
19290  data.styles = _extends({}, styles, data.styles);
19291  data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
19292
19293  return data;
19294}
19295
19296/**
19297 * Helper used to know if the given modifier depends from another one.<br />
19298 * It checks if the needed modifier is listed and enabled.
19299 * @method
19300 * @memberof Popper.Utils
19301 * @param {Array} modifiers - list of modifiers
19302 * @param {String} requestingName - name of requesting modifier
19303 * @param {String} requestedName - name of requested modifier
19304 * @returns {Boolean}
19305 */
19306function isModifierRequired(modifiers, requestingName, requestedName) {
19307  var requesting = find(modifiers, function (_ref) {
19308    var name = _ref.name;
19309    return name === requestingName;
19310  });
19311
19312  var isRequired = !!requesting && modifiers.some(function (modifier) {
19313    return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
19314  });
19315
19316  if (!isRequired) {
19317    var _requesting = '`' + requestingName + '`';
19318    var requested = '`' + requestedName + '`';
19319    console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
19320  }
19321  return isRequired;
19322}
19323
19324/**
19325 * @function
19326 * @memberof Modifiers
19327 * @argument {Object} data - The data object generated by update method
19328 * @argument {Object} options - Modifiers configuration and options
19329 * @returns {Object} The data object, properly modified
19330 */
19331function arrow(data, options) {
19332  var _data$offsets$arrow;
19333
19334  // arrow depends on keepTogether in order to work
19335  if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
19336    return data;
19337  }
19338
19339  var arrowElement = options.element;
19340
19341  // if arrowElement is a string, suppose it's a CSS selector
19342  if (typeof arrowElement === 'string') {
19343    arrowElement = data.instance.popper.querySelector(arrowElement);
19344
19345    // if arrowElement is not found, don't run the modifier
19346    if (!arrowElement) {
19347      return data;
19348    }
19349  } else {
19350    // if the arrowElement isn't a query selector we must check that the
19351    // provided DOM node is child of its popper node
19352    if (!data.instance.popper.contains(arrowElement)) {
19353      console.warn('WARNING: `arrow.element` must be child of its popper element!');
19354      return data;
19355    }
19356  }
19357
19358  var placement = data.placement.split('-')[0];
19359  var _data$offsets = data.offsets,
19360      popper = _data$offsets.popper,
19361      reference = _data$offsets.reference;
19362
19363  var isVertical = ['left', 'right'].indexOf(placement) !== -1;
19364
19365  var len = isVertical ? 'height' : 'width';
19366  var sideCapitalized = isVertical ? 'Top' : 'Left';
19367  var side = sideCapitalized.toLowerCase();
19368  var altSide = isVertical ? 'left' : 'top';
19369  var opSide = isVertical ? 'bottom' : 'right';
19370  var arrowElementSize = getOuterSizes(arrowElement)[len];
19371
19372  //
19373  // extends keepTogether behavior making sure the popper and its
19374  // reference have enough pixels in conjunction
19375  //
19376
19377  // top/left side
19378  if (reference[opSide] - arrowElementSize < popper[side]) {
19379    data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
19380  }
19381  // bottom/right side
19382  if (reference[side] + arrowElementSize > popper[opSide]) {
19383    data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
19384  }
19385  data.offsets.popper = getClientRect(data.offsets.popper);
19386
19387  // compute center of the popper
19388  var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
19389
19390  // Compute the sideValue using the updated popper offsets
19391  // take popper margin in account because we don't have this info available
19392  var css = getStyleComputedProperty(data.instance.popper);
19393  var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);
19394  var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);
19395  var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
19396
19397  // prevent arrowElement from being placed not contiguously to its popper
19398  sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
19399
19400  data.arrowElement = arrowElement;
19401  data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
19402
19403  return data;
19404}
19405
19406/**
19407 * Get the opposite placement variation of the given one
19408 * @method
19409 * @memberof Popper.Utils
19410 * @argument {String} placement variation
19411 * @returns {String} flipped placement variation
19412 */
19413function getOppositeVariation(variation) {
19414  if (variation === 'end') {
19415    return 'start';
19416  } else if (variation === 'start') {
19417    return 'end';
19418  }
19419  return variation;
19420}
19421
19422/**
19423 * List of accepted placements to use as values of the `placement` option.<br />
19424 * Valid placements are:
19425 * - `auto`
19426 * - `top`
19427 * - `right`
19428 * - `bottom`
19429 * - `left`
19430 *
19431 * Each placement can have a variation from this list:
19432 * - `-start`
19433 * - `-end`
19434 *
19435 * Variations are interpreted easily if you think of them as the left to right
19436 * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
19437 * is right.<br />
19438 * Vertically (`left` and `right`), `start` is top and `end` is bottom.
19439 *
19440 * Some valid examples are:
19441 * - `top-end` (on top of reference, right aligned)
19442 * - `right-start` (on right of reference, top aligned)
19443 * - `bottom` (on bottom, centered)
19444 * - `auto-end` (on the side with more space available, alignment depends by placement)
19445 *
19446 * @static
19447 * @type {Array}
19448 * @enum {String}
19449 * @readonly
19450 * @method placements
19451 * @memberof Popper
19452 */
19453var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
19454
19455// Get rid of `auto` `auto-start` and `auto-end`
19456var validPlacements = placements.slice(3);
19457
19458/**
19459 * Given an initial placement, returns all the subsequent placements
19460 * clockwise (or counter-clockwise).
19461 *
19462 * @method
19463 * @memberof Popper.Utils
19464 * @argument {String} placement - A valid placement (it accepts variations)
19465 * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
19466 * @returns {Array} placements including their variations
19467 */
19468function clockwise(placement) {
19469  var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
19470
19471  var index = validPlacements.indexOf(placement);
19472  var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
19473  return counter ? arr.reverse() : arr;
19474}
19475
19476var BEHAVIORS = {
19477  FLIP: 'flip',
19478  CLOCKWISE: 'clockwise',
19479  COUNTERCLOCKWISE: 'counterclockwise'
19480};
19481
19482/**
19483 * @function
19484 * @memberof Modifiers
19485 * @argument {Object} data - The data object generated by update method
19486 * @argument {Object} options - Modifiers configuration and options
19487 * @returns {Object} The data object, properly modified
19488 */
19489function flip(data, options) {
19490  // if `inner` modifier is enabled, we can't use the `flip` modifier
19491  if (isModifierEnabled(data.instance.modifiers, 'inner')) {
19492    return data;
19493  }
19494
19495  if (data.flipped && data.placement === data.originalPlacement) {
19496    // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
19497    return data;
19498  }
19499
19500  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
19501
19502  var placement = data.placement.split('-')[0];
19503  var placementOpposite = getOppositePlacement(placement);
19504  var variation = data.placement.split('-')[1] || '';
19505
19506  var flipOrder = [];
19507
19508  switch (options.behavior) {
19509    case BEHAVIORS.FLIP:
19510      flipOrder = [placement, placementOpposite];
19511      break;
19512    case BEHAVIORS.CLOCKWISE:
19513      flipOrder = clockwise(placement);
19514      break;
19515    case BEHAVIORS.COUNTERCLOCKWISE:
19516      flipOrder = clockwise(placement, true);
19517      break;
19518    default:
19519      flipOrder = options.behavior;
19520  }
19521
19522  flipOrder.forEach(function (step, index) {
19523    if (placement !== step || flipOrder.length === index + 1) {
19524      return data;
19525    }
19526
19527    placement = data.placement.split('-')[0];
19528    placementOpposite = getOppositePlacement(placement);
19529
19530    var popperOffsets = data.offsets.popper;
19531    var refOffsets = data.offsets.reference;
19532
19533    // using floor because the reference offsets may contain decimals we are not going to consider here
19534    var floor = Math.floor;
19535    var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
19536
19537    var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
19538    var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
19539    var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
19540    var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
19541
19542    var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
19543
19544    // flip the variation if required
19545    var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
19546
19547    // flips variation if reference element overflows boundaries
19548    var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
19549
19550    // flips variation if popper content overflows boundaries
19551    var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
19552
19553    var flippedVariation = flippedVariationByRef || flippedVariationByContent;
19554
19555    if (overlapsRef || overflowsBoundaries || flippedVariation) {
19556      // this boolean to detect any flip loop
19557      data.flipped = true;
19558
19559      if (overlapsRef || overflowsBoundaries) {
19560        placement = flipOrder[index + 1];
19561      }
19562
19563      if (flippedVariation) {
19564        variation = getOppositeVariation(variation);
19565      }
19566
19567      data.placement = placement + (variation ? '-' + variation : '');
19568
19569      // this object contains `position`, we want to preserve it along with
19570      // any additional property we may add in the future
19571      data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
19572
19573      data = runModifiers(data.instance.modifiers, data, 'flip');
19574    }
19575  });
19576  return data;
19577}
19578
19579/**
19580 * @function
19581 * @memberof Modifiers
19582 * @argument {Object} data - The data object generated by update method
19583 * @argument {Object} options - Modifiers configuration and options
19584 * @returns {Object} The data object, properly modified
19585 */
19586function keepTogether(data) {
19587  var _data$offsets = data.offsets,
19588      popper = _data$offsets.popper,
19589      reference = _data$offsets.reference;
19590
19591  var placement = data.placement.split('-')[0];
19592  var floor = Math.floor;
19593  var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
19594  var side = isVertical ? 'right' : 'bottom';
19595  var opSide = isVertical ? 'left' : 'top';
19596  var measurement = isVertical ? 'width' : 'height';
19597
19598  if (popper[side] < floor(reference[opSide])) {
19599    data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
19600  }
19601  if (popper[opSide] > floor(reference[side])) {
19602    data.offsets.popper[opSide] = floor(reference[side]);
19603  }
19604
19605  return data;
19606}
19607
19608/**
19609 * Converts a string containing value + unit into a px value number
19610 * @function
19611 * @memberof {modifiers~offset}
19612 * @private
19613 * @argument {String} str - Value + unit string
19614 * @argument {String} measurement - `height` or `width`
19615 * @argument {Object} popperOffsets
19616 * @argument {Object} referenceOffsets
19617 * @returns {Number|String}
19618 * Value in pixels, or original string if no values were extracted
19619 */
19620function toValue(str, measurement, popperOffsets, referenceOffsets) {
19621  // separate value from unit
19622  var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
19623  var value = +split[1];
19624  var unit = split[2];
19625
19626  // If it's not a number it's an operator, I guess
19627  if (!value) {
19628    return str;
19629  }
19630
19631  if (unit.indexOf('%') === 0) {
19632    var element = void 0;
19633    switch (unit) {
19634      case '%p':
19635        element = popperOffsets;
19636        break;
19637      case '%':
19638      case '%r':
19639      default:
19640        element = referenceOffsets;
19641    }
19642
19643    var rect = getClientRect(element);
19644    return rect[measurement] / 100 * value;
19645  } else if (unit === 'vh' || unit === 'vw') {
19646    // if is a vh or vw, we calculate the size based on the viewport
19647    var size = void 0;
19648    if (unit === 'vh') {
19649      size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
19650    } else {
19651      size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
19652    }
19653    return size / 100 * value;
19654  } else {
19655    // if is an explicit pixel unit, we get rid of the unit and keep the value
19656    // if is an implicit unit, it's px, and we return just the value
19657    return value;
19658  }
19659}
19660
19661/**
19662 * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
19663 * @function
19664 * @memberof {modifiers~offset}
19665 * @private
19666 * @argument {String} offset
19667 * @argument {Object} popperOffsets
19668 * @argument {Object} referenceOffsets
19669 * @argument {String} basePlacement
19670 * @returns {Array} a two cells array with x and y offsets in numbers
19671 */
19672function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
19673  var offsets = [0, 0];
19674
19675  // Use height if placement is left or right and index is 0 otherwise use width
19676  // in this way the first offset will use an axis and the second one
19677  // will use the other one
19678  var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
19679
19680  // Split the offset string to obtain a list of values and operands
19681  // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
19682  var fragments = offset.split(/(\+|\-)/).map(function (frag) {
19683    return frag.trim();
19684  });
19685
19686  // Detect if the offset string contains a pair of values or a single one
19687  // they could be separated by comma or space
19688  var divider = fragments.indexOf(find(fragments, function (frag) {
19689    return frag.search(/,|\s/) !== -1;
19690  }));
19691
19692  if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
19693    console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
19694  }
19695
19696  // If divider is found, we divide the list of values and operands to divide
19697  // them by ofset X and Y.
19698  var splitRegex = /\s*,\s*|\s+/;
19699  var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
19700
19701  // Convert the values with units to absolute pixels to allow our computations
19702  ops = ops.map(function (op, index) {
19703    // Most of the units rely on the orientation of the popper
19704    var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
19705    var mergeWithPrevious = false;
19706    return op
19707    // This aggregates any `+` or `-` sign that aren't considered operators
19708    // e.g.: 10 + +5 => [10, +, +5]
19709    .reduce(function (a, b) {
19710      if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
19711        a[a.length - 1] = b;
19712        mergeWithPrevious = true;
19713        return a;
19714      } else if (mergeWithPrevious) {
19715        a[a.length - 1] += b;
19716        mergeWithPrevious = false;
19717        return a;
19718      } else {
19719        return a.concat(b);
19720      }
19721    }, [])
19722    // Here we convert the string values into number values (in px)
19723    .map(function (str) {
19724      return toValue(str, measurement, popperOffsets, referenceOffsets);
19725    });
19726  });
19727
19728  // Loop trough the offsets arrays and execute the operations
19729  ops.forEach(function (op, index) {
19730    op.forEach(function (frag, index2) {
19731      if (isNumeric(frag)) {
19732        offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
19733      }
19734    });
19735  });
19736  return offsets;
19737}
19738
19739/**
19740 * @function
19741 * @memberof Modifiers
19742 * @argument {Object} data - The data object generated by update method
19743 * @argument {Object} options - Modifiers configuration and options
19744 * @argument {Number|String} options.offset=0
19745 * The offset value as described in the modifier description
19746 * @returns {Object} The data object, properly modified
19747 */
19748function offset(data, _ref) {
19749  var offset = _ref.offset;
19750  var placement = data.placement,
19751      _data$offsets = data.offsets,
19752      popper = _data$offsets.popper,
19753      reference = _data$offsets.reference;
19754
19755  var basePlacement = placement.split('-')[0];
19756
19757  var offsets = void 0;
19758  if (isNumeric(+offset)) {
19759    offsets = [+offset, 0];
19760  } else {
19761    offsets = parseOffset(offset, popper, reference, basePlacement);
19762  }
19763
19764  if (basePlacement === 'left') {
19765    popper.top += offsets[0];
19766    popper.left -= offsets[1];
19767  } else if (basePlacement === 'right') {
19768    popper.top += offsets[0];
19769    popper.left += offsets[1];
19770  } else if (basePlacement === 'top') {
19771    popper.left += offsets[0];
19772    popper.top -= offsets[1];
19773  } else if (basePlacement === 'bottom') {
19774    popper.left += offsets[0];
19775    popper.top += offsets[1];
19776  }
19777
19778  data.popper = popper;
19779  return data;
19780}
19781
19782/**
19783 * @function
19784 * @memberof Modifiers
19785 * @argument {Object} data - The data object generated by `update` method
19786 * @argument {Object} options - Modifiers configuration and options
19787 * @returns {Object} The data object, properly modified
19788 */
19789function preventOverflow(data, options) {
19790  var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
19791
19792  // If offsetParent is the reference element, we really want to
19793  // go one step up and use the next offsetParent as reference to
19794  // avoid to make this modifier completely useless and look like broken
19795  if (data.instance.reference === boundariesElement) {
19796    boundariesElement = getOffsetParent(boundariesElement);
19797  }
19798
19799  // NOTE: DOM access here
19800  // resets the popper's position so that the document size can be calculated excluding
19801  // the size of the popper element itself
19802  var transformProp = getSupportedPropertyName('transform');
19803  var popperStyles = data.instance.popper.style; // assignment to help minification
19804  var top = popperStyles.top,
19805      left = popperStyles.left,
19806      transform = popperStyles[transformProp];
19807
19808  popperStyles.top = '';
19809  popperStyles.left = '';
19810  popperStyles[transformProp] = '';
19811
19812  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
19813
19814  // NOTE: DOM access here
19815  // restores the original style properties after the offsets have been computed
19816  popperStyles.top = top;
19817  popperStyles.left = left;
19818  popperStyles[transformProp] = transform;
19819
19820  options.boundaries = boundaries;
19821
19822  var order = options.priority;
19823  var popper = data.offsets.popper;
19824
19825  var check = {
19826    primary: function primary(placement) {
19827      var value = popper[placement];
19828      if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
19829        value = Math.max(popper[placement], boundaries[placement]);
19830      }
19831      return defineProperty({}, placement, value);
19832    },
19833    secondary: function secondary(placement) {
19834      var mainSide = placement === 'right' ? 'left' : 'top';
19835      var value = popper[mainSide];
19836      if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
19837        value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
19838      }
19839      return defineProperty({}, mainSide, value);
19840    }
19841  };
19842
19843  order.forEach(function (placement) {
19844    var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
19845    popper = _extends({}, popper, check[side](placement));
19846  });
19847
19848  data.offsets.popper = popper;
19849
19850  return data;
19851}
19852
19853/**
19854 * @function
19855 * @memberof Modifiers
19856 * @argument {Object} data - The data object generated by `update` method
19857 * @argument {Object} options - Modifiers configuration and options
19858 * @returns {Object} The data object, properly modified
19859 */
19860function shift(data) {
19861  var placement = data.placement;
19862  var basePlacement = placement.split('-')[0];
19863  var shiftvariation = placement.split('-')[1];
19864
19865  // if shift shiftvariation is specified, run the modifier
19866  if (shiftvariation) {
19867    var _data$offsets = data.offsets,
19868        reference = _data$offsets.reference,
19869        popper = _data$offsets.popper;
19870
19871    var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
19872    var side = isVertical ? 'left' : 'top';
19873    var measurement = isVertical ? 'width' : 'height';
19874
19875    var shiftOffsets = {
19876      start: defineProperty({}, side, reference[side]),
19877      end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
19878    };
19879
19880    data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
19881  }
19882
19883  return data;
19884}
19885
19886/**
19887 * @function
19888 * @memberof Modifiers
19889 * @argument {Object} data - The data object generated by update method
19890 * @argument {Object} options - Modifiers configuration and options
19891 * @returns {Object} The data object, properly modified
19892 */
19893function hide(data) {
19894  if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
19895    return data;
19896  }
19897
19898  var refRect = data.offsets.reference;
19899  var bound = find(data.instance.modifiers, function (modifier) {
19900    return modifier.name === 'preventOverflow';
19901  }).boundaries;
19902
19903  if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
19904    // Avoid unnecessary DOM access if visibility hasn't changed
19905    if (data.hide === true) {
19906      return data;
19907    }
19908
19909    data.hide = true;
19910    data.attributes['x-out-of-boundaries'] = '';
19911  } else {
19912    // Avoid unnecessary DOM access if visibility hasn't changed
19913    if (data.hide === false) {
19914      return data;
19915    }
19916
19917    data.hide = false;
19918    data.attributes['x-out-of-boundaries'] = false;
19919  }
19920
19921  return data;
19922}
19923
19924/**
19925 * @function
19926 * @memberof Modifiers
19927 * @argument {Object} data - The data object generated by `update` method
19928 * @argument {Object} options - Modifiers configuration and options
19929 * @returns {Object} The data object, properly modified
19930 */
19931function inner(data) {
19932  var placement = data.placement;
19933  var basePlacement = placement.split('-')[0];
19934  var _data$offsets = data.offsets,
19935      popper = _data$offsets.popper,
19936      reference = _data$offsets.reference;
19937
19938  var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
19939
19940  var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
19941
19942  popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
19943
19944  data.placement = getOppositePlacement(placement);
19945  data.offsets.popper = getClientRect(popper);
19946
19947  return data;
19948}
19949
19950/**
19951 * Modifier function, each modifier can have a function of this type assigned
19952 * to its `fn` property.<br />
19953 * These functions will be called on each update, this means that you must
19954 * make sure they are performant enough to avoid performance bottlenecks.
19955 *
19956 * @function ModifierFn
19957 * @argument {dataObject} data - The data object generated by `update` method
19958 * @argument {Object} options - Modifiers configuration and options
19959 * @returns {dataObject} The data object, properly modified
19960 */
19961
19962/**
19963 * Modifiers are plugins used to alter the behavior of your poppers.<br />
19964 * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
19965 * needed by the library.
19966 *
19967 * Usually you don't want to override the `order`, `fn` and `onLoad` props.
19968 * All the other properties are configurations that could be tweaked.
19969 * @namespace modifiers
19970 */
19971var modifiers = {
19972  /**
19973   * Modifier used to shift the popper on the start or end of its reference
19974   * element.<br />
19975   * It will read the variation of the `placement` property.<br />
19976   * It can be one either `-end` or `-start`.
19977   * @memberof modifiers
19978   * @inner
19979   */
19980  shift: {
19981    /** @prop {number} order=100 - Index used to define the order of execution */
19982    order: 100,
19983    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
19984    enabled: true,
19985    /** @prop {ModifierFn} */
19986    fn: shift
19987  },
19988
19989  /**
19990   * The `offset` modifier can shift your popper on both its axis.
19991   *
19992   * It accepts the following units:
19993   * - `px` or unit-less, interpreted as pixels
19994   * - `%` or `%r`, percentage relative to the length of the reference element
19995   * - `%p`, percentage relative to the length of the popper element
19996   * - `vw`, CSS viewport width unit
19997   * - `vh`, CSS viewport height unit
19998   *
19999   * For length is intended the main axis relative to the placement of the popper.<br />
20000   * This means that if the placement is `top` or `bottom`, the length will be the
20001   * `width`. In case of `left` or `right`, it will be the `height`.
20002   *
20003   * You can provide a single value (as `Number` or `String`), or a pair of values
20004   * as `String` divided by a comma or one (or more) white spaces.<br />
20005   * The latter is a deprecated method because it leads to confusion and will be
20006   * removed in v2.<br />
20007   * Additionally, it accepts additions and subtractions between different units.
20008   * Note that multiplications and divisions aren't supported.
20009   *
20010   * Valid examples are:
20011   * ```
20012   * 10
20013   * '10%'
20014   * '10, 10'
20015   * '10%, 10'
20016   * '10 + 10%'
20017   * '10 - 5vh + 3%'
20018   * '-10px + 5vh, 5px - 6%'
20019   * ```
20020   * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
20021   * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
20022   * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).
20023   *
20024   * @memberof modifiers
20025   * @inner
20026   */
20027  offset: {
20028    /** @prop {number} order=200 - Index used to define the order of execution */
20029    order: 200,
20030    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
20031    enabled: true,
20032    /** @prop {ModifierFn} */
20033    fn: offset,
20034    /** @prop {Number|String} offset=0
20035     * The offset value as described in the modifier description
20036     */
20037    offset: 0
20038  },
20039
20040  /**
20041   * Modifier used to prevent the popper from being positioned outside the boundary.
20042   *
20043   * A scenario exists where the reference itself is not within the boundaries.<br />
20044   * We can say it has "escaped the boundaries" — or just "escaped".<br />
20045   * In this case we need to decide whether the popper should either:
20046   *
20047   * - detach from the reference and remain "trapped" in the boundaries, or
20048   * - if it should ignore the boundary and "escape with its reference"
20049   *
20050   * When `escapeWithReference` is set to`true` and reference is completely
20051   * outside its boundaries, the popper will overflow (or completely leave)
20052   * the boundaries in order to remain attached to the edge of the reference.
20053   *
20054   * @memberof modifiers
20055   * @inner
20056   */
20057  preventOverflow: {
20058    /** @prop {number} order=300 - Index used to define the order of execution */
20059    order: 300,
20060    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
20061    enabled: true,
20062    /** @prop {ModifierFn} */
20063    fn: preventOverflow,
20064    /**
20065     * @prop {Array} [priority=['left','right','top','bottom']]
20066     * Popper will try to prevent overflow following these priorities by default,
20067     * then, it could overflow on the left and on top of the `boundariesElement`
20068     */
20069    priority: ['left', 'right', 'top', 'bottom'],
20070    /**
20071     * @prop {number} padding=5
20072     * Amount of pixel used to define a minimum distance between the boundaries
20073     * and the popper. This makes sure the popper always has a little padding
20074     * between the edges of its container
20075     */
20076    padding: 5,
20077    /**
20078     * @prop {String|HTMLElement} boundariesElement='scrollParent'
20079     * Boundaries used by the modifier. Can be `scrollParent`, `window`,
20080     * `viewport` or any DOM element.
20081     */
20082    boundariesElement: 'scrollParent'
20083  },
20084
20085  /**
20086   * Modifier used to make sure the reference and its popper stay near each other
20087   * without leaving any gap between the two. Especially useful when the arrow is
20088   * enabled and you want to ensure that it points to its reference element.
20089   * It cares only about the first axis. You can still have poppers with margin
20090   * between the popper and its reference element.
20091   * @memberof modifiers
20092   * @inner
20093   */
20094  keepTogether: {
20095    /** @prop {number} order=400 - Index used to define the order of execution */
20096    order: 400,
20097    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
20098    enabled: true,
20099    /** @prop {ModifierFn} */
20100    fn: keepTogether
20101  },
20102
20103  /**
20104   * This modifier is used to move the `arrowElement` of the popper to make
20105   * sure it is positioned between the reference element and its popper element.
20106   * It will read the outer size of the `arrowElement` node to detect how many
20107   * pixels of conjunction are needed.
20108   *
20109   * It has no effect if no `arrowElement` is provided.
20110   * @memberof modifiers
20111   * @inner
20112   */
20113  arrow: {
20114    /** @prop {number} order=500 - Index used to define the order of execution */
20115    order: 500,
20116    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
20117    enabled: true,
20118    /** @prop {ModifierFn} */
20119    fn: arrow,
20120    /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
20121    element: '[x-arrow]'
20122  },
20123
20124  /**
20125   * Modifier used to flip the popper's placement when it starts to overlap its
20126   * reference element.
20127   *
20128   * Requires the `preventOverflow` modifier before it in order to work.
20129   *
20130   * **NOTE:** this modifier will interrupt the current update cycle and will
20131   * restart it if it detects the need to flip the placement.
20132   * @memberof modifiers
20133   * @inner
20134   */
20135  flip: {
20136    /** @prop {number} order=600 - Index used to define the order of execution */
20137    order: 600,
20138    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
20139    enabled: true,
20140    /** @prop {ModifierFn} */
20141    fn: flip,
20142    /**
20143     * @prop {String|Array} behavior='flip'
20144     * The behavior used to change the popper's placement. It can be one of
20145     * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
20146     * placements (with optional variations)
20147     */
20148    behavior: 'flip',
20149    /**
20150     * @prop {number} padding=5
20151     * The popper will flip if it hits the edges of the `boundariesElement`
20152     */
20153    padding: 5,
20154    /**
20155     * @prop {String|HTMLElement} boundariesElement='viewport'
20156     * The element which will define the boundaries of the popper position.
20157     * The popper will never be placed outside of the defined boundaries
20158     * (except if `keepTogether` is enabled)
20159     */
20160    boundariesElement: 'viewport',
20161    /**
20162     * @prop {Boolean} flipVariations=false
20163     * The popper will switch placement variation between `-start` and `-end` when
20164     * the reference element overlaps its boundaries.
20165     *
20166     * The original placement should have a set variation.
20167     */
20168    flipVariations: false,
20169    /**
20170     * @prop {Boolean} flipVariationsByContent=false
20171     * The popper will switch placement variation between `-start` and `-end` when
20172     * the popper element overlaps its reference boundaries.
20173     *
20174     * The original placement should have a set variation.
20175     */
20176    flipVariationsByContent: false
20177  },
20178
20179  /**
20180   * Modifier used to make the popper flow toward the inner of the reference element.
20181   * By default, when this modifier is disabled, the popper will be placed outside
20182   * the reference element.
20183   * @memberof modifiers
20184   * @inner
20185   */
20186  inner: {
20187    /** @prop {number} order=700 - Index used to define the order of execution */
20188    order: 700,
20189    /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
20190    enabled: false,
20191    /** @prop {ModifierFn} */
20192    fn: inner
20193  },
20194
20195  /**
20196   * Modifier used to hide the popper when its reference element is outside of the
20197   * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
20198   * be used to hide with a CSS selector the popper when its reference is
20199   * out of boundaries.
20200   *
20201   * Requires the `preventOverflow` modifier before it in order to work.
20202   * @memberof modifiers
20203   * @inner
20204   */
20205  hide: {
20206    /** @prop {number} order=800 - Index used to define the order of execution */
20207    order: 800,
20208    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
20209    enabled: true,
20210    /** @prop {ModifierFn} */
20211    fn: hide
20212  },
20213
20214  /**
20215   * Computes the style that will be applied to the popper element to gets
20216   * properly positioned.
20217   *
20218   * Note that this modifier will not touch the DOM, it just prepares the styles
20219   * so that `applyStyle` modifier can apply it. This separation is useful
20220   * in case you need to replace `applyStyle` with a custom implementation.
20221   *
20222   * This modifier has `850` as `order` value to maintain backward compatibility
20223   * with previous versions of Popper.js. Expect the modifiers ordering method
20224   * to change in future major versions of the library.
20225   *
20226   * @memberof modifiers
20227   * @inner
20228   */
20229  computeStyle: {
20230    /** @prop {number} order=850 - Index used to define the order of execution */
20231    order: 850,
20232    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
20233    enabled: true,
20234    /** @prop {ModifierFn} */
20235    fn: computeStyle,
20236    /**
20237     * @prop {Boolean} gpuAcceleration=true
20238     * If true, it uses the CSS 3D transformation to position the popper.
20239     * Otherwise, it will use the `top` and `left` properties
20240     */
20241    gpuAcceleration: true,
20242    /**
20243     * @prop {string} [x='bottom']
20244     * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
20245     * Change this if your popper should grow in a direction different from `bottom`
20246     */
20247    x: 'bottom',
20248    /**
20249     * @prop {string} [x='left']
20250     * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
20251     * Change this if your popper should grow in a direction different from `right`
20252     */
20253    y: 'right'
20254  },
20255
20256  /**
20257   * Applies the computed styles to the popper element.
20258   *
20259   * All the DOM manipulations are limited to this modifier. This is useful in case
20260   * you want to integrate Popper.js inside a framework or view library and you
20261   * want to delegate all the DOM manipulations to it.
20262   *
20263   * Note that if you disable this modifier, you must make sure the popper element
20264   * has its position set to `absolute` before Popper.js can do its work!
20265   *
20266   * Just disable this modifier and define your own to achieve the desired effect.
20267   *
20268   * @memberof modifiers
20269   * @inner
20270   */
20271  applyStyle: {
20272    /** @prop {number} order=900 - Index used to define the order of execution */
20273    order: 900,
20274    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
20275    enabled: true,
20276    /** @prop {ModifierFn} */
20277    fn: applyStyle,
20278    /** @prop {Function} */
20279    onLoad: applyStyleOnLoad,
20280    /**
20281     * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
20282     * @prop {Boolean} gpuAcceleration=true
20283     * If true, it uses the CSS 3D transformation to position the popper.
20284     * Otherwise, it will use the `top` and `left` properties
20285     */
20286    gpuAcceleration: undefined
20287  }
20288};
20289
20290/**
20291 * The `dataObject` is an object containing all the information used by Popper.js.
20292 * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
20293 * @name dataObject
20294 * @property {Object} data.instance The Popper.js instance
20295 * @property {String} data.placement Placement applied to popper
20296 * @property {String} data.originalPlacement Placement originally defined on init
20297 * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
20298 * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
20299 * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
20300 * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
20301 * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
20302 * @property {Object} data.boundaries Offsets of the popper boundaries
20303 * @property {Object} data.offsets The measurements of popper, reference and arrow elements
20304 * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
20305 * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
20306 * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
20307 */
20308
20309/**
20310 * Default options provided to Popper.js constructor.<br />
20311 * These can be overridden using the `options` argument of Popper.js.<br />
20312 * To override an option, simply pass an object with the same
20313 * structure of the `options` object, as the 3rd argument. For example:
20314 * ```
20315 * new Popper(ref, pop, {
20316 *   modifiers: {
20317 *     preventOverflow: { enabled: false }
20318 *   }
20319 * })
20320 * ```
20321 * @type {Object}
20322 * @static
20323 * @memberof Popper
20324 */
20325var Defaults = {
20326  /**
20327   * Popper's placement.
20328   * @prop {Popper.placements} placement='bottom'
20329   */
20330  placement: 'bottom',
20331
20332  /**
20333   * Set this to true if you want popper to position it self in 'fixed' mode
20334   * @prop {Boolean} positionFixed=false
20335   */
20336  positionFixed: false,
20337
20338  /**
20339   * Whether events (resize, scroll) are initially enabled.
20340   * @prop {Boolean} eventsEnabled=true
20341   */
20342  eventsEnabled: true,
20343
20344  /**
20345   * Set to true if you want to automatically remove the popper when
20346   * you call the `destroy` method.
20347   * @prop {Boolean} removeOnDestroy=false
20348   */
20349  removeOnDestroy: false,
20350
20351  /**
20352   * Callback called when the popper is created.<br />
20353   * By default, it is set to no-op.<br />
20354   * Access Popper.js instance with `data.instance`.
20355   * @prop {onCreate}
20356   */
20357  onCreate: function onCreate() {},
20358
20359  /**
20360   * Callback called when the popper is updated. This callback is not called
20361   * on the initialization/creation of the popper, but only on subsequent
20362   * updates.<br />
20363   * By default, it is set to no-op.<br />
20364   * Access Popper.js instance with `data.instance`.
20365   * @prop {onUpdate}
20366   */
20367  onUpdate: function onUpdate() {},
20368
20369  /**
20370   * List of modifiers used to modify the offsets before they are applied to the popper.
20371   * They provide most of the functionalities of Popper.js.
20372   * @prop {modifiers}
20373   */
20374  modifiers: modifiers
20375};
20376
20377/**
20378 * @callback onCreate
20379 * @param {dataObject} data
20380 */
20381
20382/**
20383 * @callback onUpdate
20384 * @param {dataObject} data
20385 */
20386
20387// Utils
20388// Methods
20389var Popper = function () {
20390  /**
20391   * Creates a new Popper.js instance.
20392   * @class Popper
20393   * @param {Element|referenceObject} reference - The reference element used to position the popper
20394   * @param {Element} popper - The HTML / XML element used as the popper
20395   * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
20396   * @return {Object} instance - The generated Popper.js instance
20397   */
20398  function Popper(reference, popper) {
20399    var _this = this;
20400
20401    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
20402    classCallCheck(this, Popper);
20403
20404    this.scheduleUpdate = function () {
20405      return requestAnimationFrame(_this.update);
20406    };
20407
20408    // make update() debounced, so that it only runs at most once-per-tick
20409    this.update = debounce(this.update.bind(this));
20410
20411    // with {} we create a new object with the options inside it
20412    this.options = _extends({}, Popper.Defaults, options);
20413
20414    // init state
20415    this.state = {
20416      isDestroyed: false,
20417      isCreated: false,
20418      scrollParents: []
20419    };
20420
20421    // get reference and popper elements (allow jQuery wrappers)
20422    this.reference = reference && reference.jquery ? reference[0] : reference;
20423    this.popper = popper && popper.jquery ? popper[0] : popper;
20424
20425    // Deep merge modifiers options
20426    this.options.modifiers = {};
20427    Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
20428      _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
20429    });
20430
20431    // Refactoring modifiers' list (Object => Array)
20432    this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
20433      return _extends({
20434        name: name
20435      }, _this.options.modifiers[name]);
20436    })
20437    // sort the modifiers by order
20438    .sort(function (a, b) {
20439      return a.order - b.order;
20440    });
20441
20442    // modifiers have the ability to execute arbitrary code when Popper.js get inited
20443    // such code is executed in the same order of its modifier
20444    // they could add new properties to their options configuration
20445    // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
20446    this.modifiers.forEach(function (modifierOptions) {
20447      if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
20448        modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
20449      }
20450    });
20451
20452    // fire the first update to position the popper in the right place
20453    this.update();
20454
20455    var eventsEnabled = this.options.eventsEnabled;
20456    if (eventsEnabled) {
20457      // setup event listeners, they will take care of update the position in specific situations
20458      this.enableEventListeners();
20459    }
20460
20461    this.state.eventsEnabled = eventsEnabled;
20462  }
20463
20464  // We can't use class properties because they don't get listed in the
20465  // class prototype and break stuff like Sinon stubs
20466
20467
20468  createClass(Popper, [{
20469    key: 'update',
20470    value: function update$$1() {
20471      return update.call(this);
20472    }
20473  }, {
20474    key: 'destroy',
20475    value: function destroy$$1() {
20476      return destroy.call(this);
20477    }
20478  }, {
20479    key: 'enableEventListeners',
20480    value: function enableEventListeners$$1() {
20481      return enableEventListeners.call(this);
20482    }
20483  }, {
20484    key: 'disableEventListeners',
20485    value: function disableEventListeners$$1() {
20486      return disableEventListeners.call(this);
20487    }
20488
20489    /**
20490     * Schedules an update. It will run on the next UI update available.
20491     * @method scheduleUpdate
20492     * @memberof Popper
20493     */
20494
20495
20496    /**
20497     * Collection of utilities useful when writing custom modifiers.
20498     * Starting from version 1.7, this method is available only if you
20499     * include `popper-utils.js` before `popper.js`.
20500     *
20501     * **DEPRECATION**: This way to access PopperUtils is deprecated
20502     * and will be removed in v2! Use the PopperUtils module directly instead.
20503     * Due to the high instability of the methods contained in Utils, we can't
20504     * guarantee them to follow semver. Use them at your own risk!
20505     * @static
20506     * @private
20507     * @type {Object}
20508     * @deprecated since version 1.8
20509     * @member Utils
20510     * @memberof Popper
20511     */
20512
20513  }]);
20514  return Popper;
20515}();
20516
20517/**
20518 * The `referenceObject` is an object that provides an interface compatible with Popper.js
20519 * and lets you use it as replacement of a real DOM node.<br />
20520 * You can use this method to position a popper relatively to a set of coordinates
20521 * in case you don't have a DOM node to use as reference.
20522 *
20523 * ```
20524 * new Popper(referenceObject, popperNode);
20525 * ```
20526 *
20527 * NB: This feature isn't supported in Internet Explorer 10.
20528 * @name referenceObject
20529 * @property {Function} data.getBoundingClientRect
20530 * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
20531 * @property {number} data.clientWidth
20532 * An ES6 getter that will return the width of the virtual reference element.
20533 * @property {number} data.clientHeight
20534 * An ES6 getter that will return the height of the virtual reference element.
20535 */
20536
20537
20538Popper.Utils = (typeof window !== 'undefined' ? window : __webpack_require__.g).PopperUtils;
20539Popper.placements = placements;
20540Popper.Defaults = Defaults;
20541
20542/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Popper);
20543//# sourceMappingURL=popper.js.map
20544
20545
20546/***/ }),
20547
vendor: 2,161 bytes, lines 20548-20592
20548/***/ "./node_modules/prop-types-extra/lib/componentOrElement.js":
20549/*!*****************************************************************!*\
20550  !*** ./node_modules/prop-types-extra/lib/componentOrElement.js ***!
20551  \*****************************************************************/
20552/***/ ((module, exports, __webpack_require__) => {
20553
20554"use strict";
20555
20556
20557Object.defineProperty(exports, "__esModule", ({
20558  value: true
20559}));
20560
20561var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
20562
20563var _react = __webpack_require__(/*! react */ "./node_modules/react/index.js");
20564
20565var _react2 = _interopRequireDefault(_react);
20566
20567var _createChainableTypeChecker = __webpack_require__(/*! ./utils/createChainableTypeChecker */ "./node_modules/prop-types-extra/lib/utils/createChainableTypeChecker.js");
20568
20569var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
20570
20571function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20572
20573function validate(props, propName, componentName, location, propFullName) {
20574  var propValue = props[propName];
20575  var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);
20576
20577  if (_react2.default.isValidElement(propValue)) {
20578    return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.');
20579  }
20580
20581  if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) {
20582    return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.');
20583  }
20584
20585  return null;
20586}
20587
20588exports["default"] = (0, _createChainableTypeChecker2.default)(validate);
20589module.exports = exports['default'];
20590
20591/***/ }),
20592
vendor: 1,737 bytes, lines 20593-20647
20593/***/ "./node_modules/prop-types-extra/lib/deprecated.js":
20594/*!*********************************************************!*\
20595  !*** ./node_modules/prop-types-extra/lib/deprecated.js ***!
20596  \*********************************************************/
20597/***/ ((module, exports, __webpack_require__) => {
20598
20599"use strict";
20600
20601
20602Object.defineProperty(exports, "__esModule", ({
20603  value: true
20604}));
20605exports["default"] = deprecated;
20606
20607var _warning = __webpack_require__(/*! warning */ "./node_modules/prop-types-extra/node_modules/warning/warning.js");
20608
20609var _warning2 = _interopRequireDefault(_warning);
20610
20611function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20612
20613var warned = {};
20614
20615function deprecated(validator, reason) {
20616  return function validate(props, propName, componentName, location, propFullName) {
20617    var componentNameSafe = componentName || '<<anonymous>>';
20618    var propFullNameSafe = propFullName || propName;
20619
20620    if (props[propName] != null) {
20621      var messageKey = componentName + '.' + propName;
20622
20623      (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason + '.'));
20624
20625      warned[messageKey] = true;
20626    }
20627
20628    for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
20629      args[_key - 5] = arguments[_key];
20630    }
20631
20632    return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
20633  };
20634}
20635
20636/* eslint-disable no-underscore-dangle */
20637function _resetWarned() {
20638  warned = {};
20639}
20640
20641deprecated._resetWarned = _resetWarned;
20642/* eslint-enable no-underscore-dangle */
20643
20644module.exports = exports['default'];
20645
20646/***/ }),
20647
vendor: 1,786 bytes, lines 20648-20691
20648/***/ "./node_modules/prop-types-extra/lib/elementType.js":
20649/*!**********************************************************!*\
20650  !*** ./node_modules/prop-types-extra/lib/elementType.js ***!
20651  \**********************************************************/
20652/***/ ((module, exports, __webpack_require__) => {
20653
20654"use strict";
20655
20656
20657Object.defineProperty(exports, "__esModule", ({
20658  value: true
20659}));
20660
20661var _react = __webpack_require__(/*! react */ "./node_modules/react/index.js");
20662
20663var _react2 = _interopRequireDefault(_react);
20664
20665var _reactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
20666
20667var _createChainableTypeChecker = __webpack_require__(/*! ./utils/createChainableTypeChecker */ "./node_modules/prop-types-extra/lib/utils/createChainableTypeChecker.js");
20668
20669var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
20670
20671function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20672
20673function elementType(props, propName, componentName, location, propFullName) {
20674  var propValue = props[propName];
20675
20676  if (_react2.default.isValidElement(propValue)) {
20677    return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`,expected an element type (a string ') + ', component class, or function component).');
20678  }
20679
20680  if (!(0, _reactIs.isValidElementType)(propValue)) {
20681    return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + ', component class, or function component).');
20682  }
20683
20684  return null;
20685}
20686
20687exports["default"] = (0, _createChainableTypeChecker2.default)(elementType);
20688module.exports = exports['default'];
20689
20690/***/ }),
20691
vendor: 1,802 bytes, lines 20692-20744
20692/***/ "./node_modules/prop-types-extra/lib/utils/createChainableTypeChecker.js":
20693/*!*******************************************************************************!*\
20694  !*** ./node_modules/prop-types-extra/lib/utils/createChainableTypeChecker.js ***!
20695  \*******************************************************************************/
20696/***/ ((module, exports) => {
20697
20698"use strict";
20699
20700
20701Object.defineProperty(exports, "__esModule", ({
20702  value: true
20703}));
20704exports["default"] = createChainableTypeChecker;
20705/**
20706 * Copyright 2013-present, Facebook, Inc.
20707 * All rights reserved.
20708 *
20709 * This source code is licensed under the BSD-style license found in the
20710 * LICENSE file in the root directory of this source tree. An additional grant
20711 * of patent rights can be found in the PATENTS file in the same directory.
20712 */
20713
20714// Mostly taken from ReactPropTypes.
20715
20716function createChainableTypeChecker(validate) {
20717  function checkType(isRequired, props, propName, componentName, location, propFullName) {
20718    var componentNameSafe = componentName || '<<anonymous>>';
20719    var propFullNameSafe = propFullName || propName;
20720
20721    if (props[propName] == null) {
20722      if (isRequired) {
20723        return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));
20724      }
20725
20726      return null;
20727    }
20728
20729    for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
20730      args[_key - 6] = arguments[_key];
20731    }
20732
20733    return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));
20734  }
20735
20736  var chainedCheckType = checkType.bind(null, false);
20737  chainedCheckType.isRequired = checkType.bind(null, true);
20738
20739  return chainedCheckType;
20740}
20741module.exports = exports['default'];
20742
20743/***/ }),
20744
vendor: 2,104 bytes, lines 20745-20817
20745/***/ "./node_modules/prop-types-extra/node_modules/warning/warning.js":
20746/*!***********************************************************************!*\
20747  !*** ./node_modules/prop-types-extra/node_modules/warning/warning.js ***!
20748  \***********************************************************************/
20749/***/ ((module) => {
20750
20751"use strict";
20752/**
20753 * Copyright (c) 2014-present, Facebook, Inc.
20754 *
20755 * This source code is licensed under the MIT license found in the
20756 * LICENSE file in the root directory of this source tree.
20757 */
20758
20759
20760
20761/**
20762 * Similar to invariant but only logs a warning if the condition is not met.
20763 * This can be used to log issues in development environments in critical
20764 * paths. Removing the logging code for production environments will keep the
20765 * same logic and follow the same code paths.
20766 */
20767
20768var __DEV__ = "development" !== 'production';
20769
20770var warning = function() {};
20771
20772if (__DEV__) {
20773  var printWarning = function printWarning(format, args) {
20774    var len = arguments.length;
20775    args = new Array(len > 1 ? len - 1 : 0);
20776    for (var key = 1; key < len; key++) {
20777      args[key - 1] = arguments[key];
20778    }
20779    var argIndex = 0;
20780    var message = 'Warning: ' +
20781      format.replace(/%s/g, function() {
20782        return args[argIndex++];
20783      });
20784    if (typeof console !== 'undefined') {
20785      console.error(message);
20786    }
20787    try {
20788      // --- Welcome to debugging React ---
20789      // This error was thrown as a convenience so that you can use this stack
20790      // to find the callsite that caused this warning to fire.
20791      throw new Error(message);
20792    } catch (x) {}
20793  }
20794
20795  warning = function(condition, format, args) {
20796    var len = arguments.length;
20797    args = new Array(len > 2 ? len - 2 : 0);
20798    for (var key = 2; key < len; key++) {
20799      args[key - 2] = arguments[key];
20800    }
20801    if (format === undefined) {
20802      throw new Error(
20803          '`warning(condition, format, ...args)` requires a warning ' +
20804          'message argument'
20805      );
20806    }
20807    if (!condition) {
20808      printWarning.apply(null, [format].concat(args));
20809    }
20810  };
20811}
20812
20813module.exports = warning;
20814
20815
20816/***/ }),
20817
vendor: 4,061 bytes, lines 20818-20930
20818/***/ "./node_modules/prop-types/checkPropTypes.js":
20819/*!***************************************************!*\
20820  !*** ./node_modules/prop-types/checkPropTypes.js ***!
20821  \***************************************************/
20822/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
20823
20824"use strict";
20825/**
20826 * Copyright (c) 2013-present, Facebook, Inc.
20827 *
20828 * This source code is licensed under the MIT license found in the
20829 * LICENSE file in the root directory of this source tree.
20830 */
20831
20832
20833
20834var printWarning = function() {};
20835
20836if (true) {
20837  var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
20838  var loggedTypeFailures = {};
20839  var has = Function.call.bind(Object.prototype.hasOwnProperty);
20840
20841  printWarning = function(text) {
20842    var message = 'Warning: ' + text;
20843    if (typeof console !== 'undefined') {
20844      console.error(message);
20845    }
20846    try {
20847      // --- Welcome to debugging React ---
20848      // This error was thrown as a convenience so that you can use this stack
20849      // to find the callsite that caused this warning to fire.
20850      throw new Error(message);
20851    } catch (x) {}
20852  };
20853}
20854
20855/**
20856 * Assert that the values match with the type specs.
20857 * Error messages are memorized and will only be shown once.
20858 *
20859 * @param {object} typeSpecs Map of name to a ReactPropType
20860 * @param {object} values Runtime values that need to be type-checked
20861 * @param {string} location e.g. "prop", "context", "child context"
20862 * @param {string} componentName Name of the component for error messages.
20863 * @param {?Function} getStack Returns the component stack.
20864 * @private
20865 */
20866function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
20867  if (true) {
20868    for (var typeSpecName in typeSpecs) {
20869      if (has(typeSpecs, typeSpecName)) {
20870        var error;
20871        // Prop type validation may throw. In case they do, we don't want to
20872        // fail the render phase where it didn't fail before. So we log it.
20873        // After these have been cleaned up, we'll let them throw.
20874        try {
20875          // This is intentionally an invariant that gets caught. It's the same
20876          // behavior as without this statement except with a better message.
20877          if (typeof typeSpecs[typeSpecName] !== 'function') {
20878            var err = Error(
20879              (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
20880              'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
20881            );
20882            err.name = 'Invariant Violation';
20883            throw err;
20884          }
20885          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
20886        } catch (ex) {
20887          error = ex;
20888        }
20889        if (error && !(error instanceof Error)) {
20890          printWarning(
20891            (componentName || 'React class') + ': type specification of ' +
20892            location + ' `' + typeSpecName + '` is invalid; the type checker ' +
20893            'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
20894            'You may have forgotten to pass an argument to the type checker ' +
20895            'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
20896            'shape all require an argument).'
20897          );
20898        }
20899        if (error instanceof Error && !(error.message in loggedTypeFailures)) {
20900          // Only monitor this failure once because there tends to be a lot of the
20901          // same error.
20902          loggedTypeFailures[error.message] = true;
20903
20904          var stack = getStack ? getStack() : '';
20905
20906          printWarning(
20907            'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
20908          );
20909        }
20910      }
20911    }
20912  }
20913}
20914
20915/**
20916 * Resets warning cache when testing.
20917 *
20918 * @private
20919 */
20920checkPropTypes.resetWarningCache = function() {
20921  if (true) {
20922    loggedTypeFailures = {};
20923  }
20924}
20925
20926module.exports = checkPropTypes;
20927
20928
20929/***/ }),
20930
vendor: 21,982 bytes, lines 20931-21532
20931/***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
20932/*!************************************************************!*\
20933  !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
20934  \************************************************************/
20935/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
20936
20937"use strict";
20938/**
20939 * Copyright (c) 2013-present, Facebook, Inc.
20940 *
20941 * This source code is licensed under the MIT license found in the
20942 * LICENSE file in the root directory of this source tree.
20943 */
20944
20945
20946
20947var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
20948var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
20949
20950var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
20951var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
20952
20953var has = Function.call.bind(Object.prototype.hasOwnProperty);
20954var printWarning = function() {};
20955
20956if (true) {
20957  printWarning = function(text) {
20958    var message = 'Warning: ' + text;
20959    if (typeof console !== 'undefined') {
20960      console.error(message);
20961    }
20962    try {
20963      // --- Welcome to debugging React ---
20964      // This error was thrown as a convenience so that you can use this stack
20965      // to find the callsite that caused this warning to fire.
20966      throw new Error(message);
20967    } catch (x) {}
20968  };
20969}
20970
20971function emptyFunctionThatReturnsNull() {
20972  return null;
20973}
20974
20975module.exports = function(isValidElement, throwOnDirectAccess) {
20976  /* global Symbol */
20977  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
20978  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
20979
20980  /**
20981   * Returns the iterator method function contained on the iterable object.
20982   *
20983   * Be sure to invoke the function with the iterable as context:
20984   *
20985   *     var iteratorFn = getIteratorFn(myIterable);
20986   *     if (iteratorFn) {
20987   *       var iterator = iteratorFn.call(myIterable);
20988   *       ...
20989   *     }
20990   *
20991   * @param {?object} maybeIterable
20992   * @return {?function}
20993   */
20994  function getIteratorFn(maybeIterable) {
20995    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
20996    if (typeof iteratorFn === 'function') {
20997      return iteratorFn;
20998    }
20999  }
21000
21001  /**
21002   * Collection of methods that allow declaration and validation of props that are
21003   * supplied to React components. Example usage:
21004   *
21005   *   var Props = require('ReactPropTypes');
21006   *   var MyArticle = React.createClass({
21007   *     propTypes: {
21008   *       // An optional string prop named "description".
21009   *       description: Props.string,
21010   *
21011   *       // A required enum prop named "category".
21012   *       category: Props.oneOf(['News','Photos']).isRequired,
21013   *
21014   *       // A prop named "dialog" that requires an instance of Dialog.
21015   *       dialog: Props.instanceOf(Dialog).isRequired
21016   *     },
21017   *     render: function() { ... }
21018   *   });
21019   *
21020   * A more formal specification of how these methods are used:
21021   *
21022   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
21023   *   decl := ReactPropTypes.{type}(.isRequired)?
21024   *
21025   * Each and every declaration produces a function with the same signature. This
21026   * allows the creation of custom validation functions. For example:
21027   *
21028   *  var MyLink = React.createClass({
21029   *    propTypes: {
21030   *      // An optional string or URI prop named "href".
21031   *      href: function(props, propName, componentName) {
21032   *        var propValue = props[propName];
21033   *        if (propValue != null && typeof propValue !== 'string' &&
21034   *            !(propValue instanceof URI)) {
21035   *          return new Error(
21036   *            'Expected a string or an URI for ' + propName + ' in ' +
21037   *            componentName
21038   *          );
21039   *        }
21040   *      }
21041   *    },
21042   *    render: function() {...}
21043   *  });
21044   *
21045   * @internal
21046   */
21047
21048  var ANONYMOUS = '<<anonymous>>';
21049
21050  // Important!
21051  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
21052  var ReactPropTypes = {
21053    array: createPrimitiveTypeChecker('array'),
21054    bool: createPrimitiveTypeChecker('boolean'),
21055    func: createPrimitiveTypeChecker('function'),
21056    number: createPrimitiveTypeChecker('number'),
21057    object: createPrimitiveTypeChecker('object'),
21058    string: createPrimitiveTypeChecker('string'),
21059    symbol: createPrimitiveTypeChecker('symbol'),
21060
21061    any: createAnyTypeChecker(),
21062    arrayOf: createArrayOfTypeChecker,
21063    element: createElementTypeChecker(),
21064    elementType: createElementTypeTypeChecker(),
21065    instanceOf: createInstanceTypeChecker,
21066    node: createNodeChecker(),
21067    objectOf: createObjectOfTypeChecker,
21068    oneOf: createEnumTypeChecker,
21069    oneOfType: createUnionTypeChecker,
21070    shape: createShapeTypeChecker,
21071    exact: createStrictShapeTypeChecker,
21072  };
21073
21074  /**
21075   * inlined Object.is polyfill to avoid requiring consumers ship their own
21076   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
21077   */
21078  /*eslint-disable no-self-compare*/
21079  function is(x, y) {
21080    // SameValue algorithm
21081    if (x === y) {
21082      // Steps 1-5, 7-10
21083      // Steps 6.b-6.e: +0 != -0
21084      return x !== 0 || 1 / x === 1 / y;
21085    } else {
21086      // Step 6.a: NaN == NaN
21087      return x !== x && y !== y;
21088    }
21089  }
21090  /*eslint-enable no-self-compare*/
21091
21092  /**
21093   * We use an Error-like object for backward compatibility as people may call
21094   * PropTypes directly and inspect their output. However, we don't use real
21095   * Errors anymore. We don't inspect their stack anyway, and creating them
21096   * is prohibitively expensive if they are created too often, such as what
21097   * happens in oneOfType() for any type before the one that matched.
21098   */
21099  function PropTypeError(message) {
21100    this.message = message;
21101    this.stack = '';
21102  }
21103  // Make `instanceof Error` still work for returned errors.
21104  PropTypeError.prototype = Error.prototype;
21105
21106  function createChainableTypeChecker(validate) {
21107    if (true) {
21108      var manualPropTypeCallCache = {};
21109      var manualPropTypeWarningCount = 0;
21110    }
21111    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
21112      componentName = componentName || ANONYMOUS;
21113      propFullName = propFullName || propName;
21114
21115      if (secret !== ReactPropTypesSecret) {
21116        if (throwOnDirectAccess) {
21117          // New behavior only for users of `prop-types` package
21118          var err = new Error(
21119            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
21120            'Use `PropTypes.checkPropTypes()` to call them. ' +
21121            'Read more at http://fb.me/use-check-prop-types'
21122          );
21123          err.name = 'Invariant Violation';
21124          throw err;
21125        } else if ( true && typeof console !== 'undefined') {
21126          // Old behavior for people using React.PropTypes
21127          var cacheKey = componentName + ':' + propName;
21128          if (
21129            !manualPropTypeCallCache[cacheKey] &&
21130            // Avoid spamming the console because they are often not actionable except for lib authors
21131            manualPropTypeWarningCount < 3
21132          ) {
21133            printWarning(
21134              'You are manually calling a React.PropTypes validation ' +
21135              'function for the `' + propFullName + '` prop on `' + componentName  + '`. This is deprecated ' +
21136              'and will throw in the standalone `prop-types` package. ' +
21137              'You may be seeing this warning due to a third-party PropTypes ' +
21138              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
21139            );
21140            manualPropTypeCallCache[cacheKey] = true;
21141            manualPropTypeWarningCount++;
21142          }
21143        }
21144      }
21145      if (props[propName] == null) {
21146        if (isRequired) {
21147          if (props[propName] === null) {
21148            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
21149          }
21150          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
21151        }
21152        return null;
21153      } else {
21154        return validate(props, propName, componentName, location, propFullName);
21155      }
21156    }
21157
21158    var chainedCheckType = checkType.bind(null, false);
21159    chainedCheckType.isRequired = checkType.bind(null, true);
21160
21161    return chainedCheckType;
21162  }
21163
21164  function createPrimitiveTypeChecker(expectedType) {
21165    function validate(props, propName, componentName, location, propFullName, secret) {
21166      var propValue = props[propName];
21167      var propType = getPropType(propValue);
21168      if (propType !== expectedType) {
21169        // `propValue` being instance of, say, date/regexp, pass the 'object'
21170        // check, but we can offer a more precise error message here rather than
21171        // 'of type `object`'.
21172        var preciseType = getPreciseType(propValue);
21173
21174        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
21175      }
21176      return null;
21177    }
21178    return createChainableTypeChecker(validate);
21179  }
21180
21181  function createAnyTypeChecker() {
21182    return createChainableTypeChecker(emptyFunctionThatReturnsNull);
21183  }
21184
21185  function createArrayOfTypeChecker(typeChecker) {
21186    function validate(props, propName, componentName, location, propFullName) {
21187      if (typeof typeChecker !== 'function') {
21188        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
21189      }
21190      var propValue = props[propName];
21191      if (!Array.isArray(propValue)) {
21192        var propType = getPropType(propValue);
21193        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
21194      }
21195      for (var i = 0; i < propValue.length; i++) {
21196        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
21197        if (error instanceof Error) {
21198          return error;
21199        }
21200      }
21201      return null;
21202    }
21203    return createChainableTypeChecker(validate);
21204  }
21205
21206  function createElementTypeChecker() {
21207    function validate(props, propName, componentName, location, propFullName) {
21208      var propValue = props[propName];
21209      if (!isValidElement(propValue)) {
21210        var propType = getPropType(propValue);
21211        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
21212      }
21213      return null;
21214    }
21215    return createChainableTypeChecker(validate);
21216  }
21217
21218  function createElementTypeTypeChecker() {
21219    function validate(props, propName, componentName, location, propFullName) {
21220      var propValue = props[propName];
21221      if (!ReactIs.isValidElementType(propValue)) {
21222        var propType = getPropType(propValue);
21223        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
21224      }
21225      return null;
21226    }
21227    return createChainableTypeChecker(validate);
21228  }
21229
21230  function createInstanceTypeChecker(expectedClass) {
21231    function validate(props, propName, componentName, location, propFullName) {
21232      if (!(props[propName] instanceof expectedClass)) {
21233        var expectedClassName = expectedClass.name || ANONYMOUS;
21234        var actualClassName = getClassName(props[propName]);
21235        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
21236      }
21237      return null;
21238    }
21239    return createChainableTypeChecker(validate);
21240  }
21241
21242  function createEnumTypeChecker(expectedValues) {
21243    if (!Array.isArray(expectedValues)) {
21244      if (true) {
21245        if (arguments.length > 1) {
21246          printWarning(
21247            'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
21248            'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
21249          );
21250        } else {
21251          printWarning('Invalid argument supplied to oneOf, expected an array.');
21252        }
21253      }
21254      return emptyFunctionThatReturnsNull;
21255    }
21256
21257    function validate(props, propName, componentName, location, propFullName) {
21258      var propValue = props[propName];
21259      for (var i = 0; i < expectedValues.length; i++) {
21260        if (is(propValue, expectedValues[i])) {
21261          return null;
21262        }
21263      }
21264
21265      var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
21266        var type = getPreciseType(value);
21267        if (type === 'symbol') {
21268          return String(value);
21269        }
21270        return value;
21271      });
21272      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
21273    }
21274    return createChainableTypeChecker(validate);
21275  }
21276
21277  function createObjectOfTypeChecker(typeChecker) {
21278    function validate(props, propName, componentName, location, propFullName) {
21279      if (typeof typeChecker !== 'function') {
21280        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
21281      }
21282      var propValue = props[propName];
21283      var propType = getPropType(propValue);
21284      if (propType !== 'object') {
21285        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
21286      }
21287      for (var key in propValue) {
21288        if (has(propValue, key)) {
21289          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
21290          if (error instanceof Error) {
21291            return error;
21292          }
21293        }
21294      }
21295      return null;
21296    }
21297    return createChainableTypeChecker(validate);
21298  }
21299
21300  function createUnionTypeChecker(arrayOfTypeCheckers) {
21301    if (!Array.isArray(arrayOfTypeCheckers)) {
21302       true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
21303      return emptyFunctionThatReturnsNull;
21304    }
21305
21306    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
21307      var checker = arrayOfTypeCheckers[i];
21308      if (typeof checker !== 'function') {
21309        printWarning(
21310          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
21311          'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
21312        );
21313        return emptyFunctionThatReturnsNull;
21314      }
21315    }
21316
21317    function validate(props, propName, componentName, location, propFullName) {
21318      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
21319        var checker = arrayOfTypeCheckers[i];
21320        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
21321          return null;
21322        }
21323      }
21324
21325      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
21326    }
21327    return createChainableTypeChecker(validate);
21328  }
21329
21330  function createNodeChecker() {
21331    function validate(props, propName, componentName, location, propFullName) {
21332      if (!isNode(props[propName])) {
21333        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
21334      }
21335      return null;
21336    }
21337    return createChainableTypeChecker(validate);
21338  }
21339
21340  function createShapeTypeChecker(shapeTypes) {
21341    function validate(props, propName, componentName, location, propFullName) {
21342      var propValue = props[propName];
21343      var propType = getPropType(propValue);
21344      if (propType !== 'object') {
21345        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
21346      }
21347      for (var key in shapeTypes) {
21348        var checker = shapeTypes[key];
21349        if (!checker) {
21350          continue;
21351        }
21352        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
21353        if (error) {
21354          return error;
21355        }
21356      }
21357      return null;
21358    }
21359    return createChainableTypeChecker(validate);
21360  }
21361
21362  function createStrictShapeTypeChecker(shapeTypes) {
21363    function validate(props, propName, componentName, location, propFullName) {
21364      var propValue = props[propName];
21365      var propType = getPropType(propValue);
21366      if (propType !== 'object') {
21367        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
21368      }
21369      // We need to check all keys in case some are required but missing from
21370      // props.
21371      var allKeys = assign({}, props[propName], shapeTypes);
21372      for (var key in allKeys) {
21373        var checker = shapeTypes[key];
21374        if (!checker) {
21375          return new PropTypeError(
21376            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
21377            '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
21378            '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
21379          );
21380        }
21381        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
21382        if (error) {
21383          return error;
21384        }
21385      }
21386      return null;
21387    }
21388
21389    return createChainableTypeChecker(validate);
21390  }
21391
21392  function isNode(propValue) {
21393    switch (typeof propValue) {
21394      case 'number':
21395      case 'string':
21396      case 'undefined':
21397        return true;
21398      case 'boolean':
21399        return !propValue;
21400      case 'object':
21401        if (Array.isArray(propValue)) {
21402          return propValue.every(isNode);
21403        }
21404        if (propValue === null || isValidElement(propValue)) {
21405          return true;
21406        }
21407
21408        var iteratorFn = getIteratorFn(propValue);
21409        if (iteratorFn) {
21410          var iterator = iteratorFn.call(propValue);
21411          var step;
21412          if (iteratorFn !== propValue.entries) {
21413            while (!(step = iterator.next()).done) {
21414              if (!isNode(step.value)) {
21415                return false;
21416              }
21417            }
21418          } else {
21419            // Iterator will provide entry [k,v] tuples rather than values.
21420            while (!(step = iterator.next()).done) {
21421              var entry = step.value;
21422              if (entry) {
21423                if (!isNode(entry[1])) {
21424                  return false;
21425                }
21426              }
21427            }
21428          }
21429        } else {
21430          return false;
21431        }
21432
21433        return true;
21434      default:
21435        return false;
21436    }
21437  }
21438
21439  function isSymbol(propType, propValue) {
21440    // Native Symbol.
21441    if (propType === 'symbol') {
21442      return true;
21443    }
21444
21445    // falsy value can't be a Symbol
21446    if (!propValue) {
21447      return false;
21448    }
21449
21450    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
21451    if (propValue['@@toStringTag'] === 'Symbol') {
21452      return true;
21453    }
21454
21455    // Fallback for non-spec compliant Symbols which are polyfilled.
21456    if (typeof Symbol === 'function' && propValue instanceof Symbol) {
21457      return true;
21458    }
21459
21460    return false;
21461  }
21462
21463  // Equivalent of `typeof` but with special handling for array and regexp.
21464  function getPropType(propValue) {
21465    var propType = typeof propValue;
21466    if (Array.isArray(propValue)) {
21467      return 'array';
21468    }
21469    if (propValue instanceof RegExp) {
21470      // Old webkits (at least until Android 4.0) return 'function' rather than
21471      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
21472      // passes PropTypes.object.
21473      return 'object';
21474    }
21475    if (isSymbol(propType, propValue)) {
21476      return 'symbol';
21477    }
21478    return propType;
21479  }
21480
21481  // This handles more types than `getPropType`. Only used for error messages.
21482  // See `createPrimitiveTypeChecker`.
21483  function getPreciseType(propValue) {
21484    if (typeof propValue === 'undefined' || propValue === null) {
21485      return '' + propValue;
21486    }
21487    var propType = getPropType(propValue);
21488    if (propType === 'object') {
21489      if (propValue instanceof Date) {
21490        return 'date';
21491      } else if (propValue instanceof RegExp) {
21492        return 'regexp';
21493      }
21494    }
21495    return propType;
21496  }
21497
21498  // Returns a string that is postfixed to a warning about an invalid type.
21499  // For example, "undefined" or "of type array"
21500  function getPostfixForTypeWarning(value) {
21501    var type = getPreciseType(value);
21502    switch (type) {
21503      case 'array':
21504      case 'object':
21505        return 'an ' + type;
21506      case 'boolean':
21507      case 'date':
21508      case 'regexp':
21509        return 'a ' + type;
21510      default:
21511        return type;
21512    }
21513  }
21514
21515  // Returns class name of the object, if any.
21516  function getClassName(propValue) {
21517    if (!propValue.constructor || !propValue.constructor.name) {
21518      return ANONYMOUS;
21519    }
21520    return propValue.constructor.name;
21521  }
21522
21523  ReactPropTypes.checkPropTypes = checkPropTypes;
21524  ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
21525  ReactPropTypes.PropTypes = ReactPropTypes;
21526
21527  return ReactPropTypes;
21528};
21529
21530
21531/***/ }),
21532
vendor: 889 bytes, lines 21533-21557
21533/***/ "./node_modules/prop-types/index.js":
21534/*!******************************************!*\
21535  !*** ./node_modules/prop-types/index.js ***!
21536  \******************************************/
21537/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
21538
21539/**
21540 * Copyright (c) 2013-present, Facebook, Inc.
21541 *
21542 * This source code is licensed under the MIT license found in the
21543 * LICENSE file in the root directory of this source tree.
21544 */
21545
21546if (true) {
21547  var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
21548
21549  // By explicitly using `prop-types` you are opting into new development behavior.
21550  // http://fb.me/prop-types-in-prod
21551  var throwOnDirectAccess = true;
21552  module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
21553} else {}
21554
21555
21556/***/ }),
21557
vendor: 613 bytes, lines 21558-21580
21558/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
21559/*!*************************************************************!*\
21560  !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
21561  \*************************************************************/
21562/***/ ((module) => {
21563
21564"use strict";
21565/**
21566 * Copyright (c) 2013-present, Facebook, Inc.
21567 *
21568 * This source code is licensed under the MIT license found in the
21569 * LICENSE file in the root directory of this source tree.
21570 */
21571
21572
21573
21574var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
21575
21576module.exports = ReactPropTypesSecret;
21577
21578
21579/***/ }),
21580
vendor: 2,500 bytes, lines 21581-21641
21581/***/ "./node_modules/react-bootstrap/es/CloseButton.js":
21582/*!********************************************************!*\
21583  !*** ./node_modules/react-bootstrap/es/CloseButton.js ***!
21584  \********************************************************/
21585/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21586
21587"use strict";
21588__webpack_require__.r(__webpack_exports__);
21589/* harmony export */ __webpack_require__.d(__webpack_exports__, {
21590/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
21591/* harmony export */ });
21592/* harmony import */ var _babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js");
21593/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
21594/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
21595/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
21596
21597
21598
21599var propTypes = {
21600  label: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string.isRequired),
21601  onClick: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)
21602};
21603var defaultProps = {
21604  label: 'Close'
21605};
21606
21607var CloseButton =
21608/*#__PURE__*/
21609function (_React$Component) {
21610  (0,_babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(CloseButton, _React$Component);
21611
21612  function CloseButton() {
21613    return _React$Component.apply(this, arguments) || this;
21614  }
21615
21616  var _proto = CloseButton.prototype;
21617
21618  _proto.render = function render() {
21619    var _this$props = this.props,
21620        label = _this$props.label,
21621        onClick = _this$props.onClick;
21622    return react__WEBPACK_IMPORTED_MODULE_2__.createElement("button", {
21623      type: "button",
21624      className: "close",
21625      onClick: onClick
21626    }, react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", {
21627      "aria-hidden": "true"
21628    }, "\xD7"), react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", {
21629      className: "sr-only"
21630    }, label));
21631  };
21632
21633  return CloseButton;
21634}(react__WEBPACK_IMPORTED_MODULE_2__.Component);
21635
21636CloseButton.propTypes = propTypes;
21637CloseButton.defaultProps = defaultProps;
21638/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CloseButton);
21639
21640/***/ }),
21641
vendor: 5,687 bytes, lines 21642-21772
21642/***/ "./node_modules/react-bootstrap/es/Fade.js":
21643/*!*************************************************!*\
21644  !*** ./node_modules/react-bootstrap/es/Fade.js ***!
21645  \*************************************************/
21646/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21647
21648"use strict";
21649__webpack_require__.r(__webpack_exports__);
21650/* harmony export */ __webpack_require__.d(__webpack_exports__, {
21651/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
21652/* harmony export */ });
21653/* harmony import */ var _babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/extends */ "./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js");
21654/* harmony import */ var _babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js");
21655/* harmony import */ var _babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js");
21656/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
21657/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
21658/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
21659/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
21660/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);
21661/* harmony import */ var react_transition_group_Transition__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-transition-group/Transition */ "./node_modules/react-transition-group/Transition.js");
21662
21663
21664
21665
21666var _fadeStyles;
21667
21668
21669
21670
21671
21672var propTypes = {
21673  /**
21674   * Show the component; triggers the fade in or fade out animation
21675   */
21676  in: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),
21677
21678  /**
21679   * Wait until the first "enter" transition to mount the component (add it to the DOM)
21680   */
21681  mountOnEnter: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),
21682
21683  /**
21684   * Unmount the component (remove it from the DOM) when it is faded out
21685   */
21686  unmountOnExit: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),
21687
21688  /**
21689   * Run the fade in animation when the component mounts, if it is initially
21690   * shown
21691   */
21692  appear: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),
21693
21694  /**
21695   * Duration of the fade animation in milliseconds, to ensure that finishing
21696   * callbacks are fired even if the original browser transition end events are
21697   * canceled
21698   */
21699  timeout: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),
21700
21701  /**
21702   * Callback fired before the component fades in
21703   */
21704  onEnter: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),
21705
21706  /**
21707   * Callback fired after the component starts to fade in
21708   */
21709  onEntering: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),
21710
21711  /**
21712   * Callback fired after the has component faded in
21713   */
21714  onEntered: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),
21715
21716  /**
21717   * Callback fired before the component fades out
21718   */
21719  onExit: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),
21720
21721  /**
21722   * Callback fired after the component starts to fade out
21723   */
21724  onExiting: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),
21725
21726  /**
21727   * Callback fired after the component has faded out
21728   */
21729  onExited: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func)
21730};
21731var defaultProps = {
21732  in: false,
21733  timeout: 300,
21734  mountOnEnter: false,
21735  unmountOnExit: false,
21736  appear: false
21737};
21738var fadeStyles = (_fadeStyles = {}, _fadeStyles[react_transition_group_Transition__WEBPACK_IMPORTED_MODULE_6__.ENTERING] = 'in', _fadeStyles[react_transition_group_Transition__WEBPACK_IMPORTED_MODULE_6__.ENTERED] = 'in', _fadeStyles);
21739
21740var Fade =
21741/*#__PURE__*/
21742function (_React$Component) {
21743  (0,_babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__["default"])(Fade, _React$Component);
21744
21745  function Fade() {
21746    return _React$Component.apply(this, arguments) || this;
21747  }
21748
21749  var _proto = Fade.prototype;
21750
21751  _proto.render = function render() {
21752    var _this$props = this.props,
21753        className = _this$props.className,
21754        children = _this$props.children,
21755        props = (0,_babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["className", "children"]);
21756
21757    return react__WEBPACK_IMPORTED_MODULE_4__.createElement(react_transition_group_Transition__WEBPACK_IMPORTED_MODULE_6__["default"], props, function (status, innerProps) {
21758      return react__WEBPACK_IMPORTED_MODULE_4__.cloneElement(children, (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerProps, {
21759        className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('fade', className, children.props.className, fadeStyles[status])
21760      }));
21761    });
21762  };
21763
21764  return Fade;
21765}(react__WEBPACK_IMPORTED_MODULE_4__.Component);
21766
21767Fade.propTypes = propTypes;
21768Fade.defaultProps = defaultProps;
21769/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Fade);
21770
21771/***/ }),
21772
vendor: 19,192 bytes, lines 21773-22118
21773/***/ "./node_modules/react-bootstrap/es/Modal.js":
21774/*!**************************************************!*\
21775  !*** ./node_modules/react-bootstrap/es/Modal.js ***!
21776  \**************************************************/
21777/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21778
21779"use strict";
21780__webpack_require__.r(__webpack_exports__);
21781/* harmony export */ __webpack_require__.d(__webpack_exports__, {
21782/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
21783/* harmony export */ });
21784/* harmony import */ var _babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js");
21785/* harmony import */ var _babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js");
21786/* harmony import */ var _babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime-corejs2/helpers/esm/assertThisInitialized.js");
21787/* harmony import */ var _babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/extends */ "./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js");
21788/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
21789/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);
21790/* harmony import */ var dom_helpers_events__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dom-helpers/events */ "./node_modules/dom-helpers/events/index.js");
21791/* harmony import */ var dom_helpers_ownerDocument__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dom-helpers/ownerDocument */ "./node_modules/dom-helpers/ownerDocument.js");
21792/* harmony import */ var dom_helpers_ownerDocument__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dom_helpers_ownerDocument__WEBPACK_IMPORTED_MODULE_6__);
21793/* harmony import */ var dom_helpers_util_inDOM__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! dom-helpers/util/inDOM */ "./node_modules/dom-helpers/util/inDOM.js");
21794/* harmony import */ var dom_helpers_util_inDOM__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(dom_helpers_util_inDOM__WEBPACK_IMPORTED_MODULE_7__);
21795/* harmony import */ var dom_helpers_util_scrollbarSize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! dom-helpers/util/scrollbarSize */ "./node_modules/dom-helpers/util/scrollbarSize.js");
21796/* harmony import */ var dom_helpers_util_scrollbarSize__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(dom_helpers_util_scrollbarSize__WEBPACK_IMPORTED_MODULE_8__);
21797/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
21798/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
21799/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_10__);
21800/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
21801/* harmony import */ var react_overlays_lib_Modal__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react-overlays/lib/Modal */ "./node_modules/react-overlays/lib/Modal.js");
21802/* harmony import */ var react_overlays_lib_Modal__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_overlays_lib_Modal__WEBPACK_IMPORTED_MODULE_12__);
21803/* harmony import */ var react_overlays_lib_utils_isOverflowing__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react-overlays/lib/utils/isOverflowing */ "./node_modules/react-overlays/lib/utils/isOverflowing.js");
21804/* harmony import */ var react_overlays_lib_utils_isOverflowing__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_overlays_lib_utils_isOverflowing__WEBPACK_IMPORTED_MODULE_13__);
21805/* harmony import */ var prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! prop-types-extra/lib/elementType */ "./node_modules/prop-types-extra/lib/elementType.js");
21806/* harmony import */ var prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_14__);
21807/* harmony import */ var _Fade__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Fade */ "./node_modules/react-bootstrap/es/Fade.js");
21808/* harmony import */ var _ModalBody__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ModalBody */ "./node_modules/react-bootstrap/es/ModalBody.js");
21809/* harmony import */ var _ModalDialog__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ModalDialog */ "./node_modules/react-bootstrap/es/ModalDialog.js");
21810/* harmony import */ var _ModalFooter__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./ModalFooter */ "./node_modules/react-bootstrap/es/ModalFooter.js");
21811/* harmony import */ var _ModalHeader__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ModalHeader */ "./node_modules/react-bootstrap/es/ModalHeader.js");
21812/* harmony import */ var _ModalTitle__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./ModalTitle */ "./node_modules/react-bootstrap/es/ModalTitle.js");
21813/* harmony import */ var _utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./utils/bootstrapUtils */ "./node_modules/react-bootstrap/es/utils/bootstrapUtils.js");
21814/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./utils/createChainedFunction */ "./node_modules/react-bootstrap/es/utils/createChainedFunction.js");
21815/* harmony import */ var _utils_splitComponentProps__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./utils/splitComponentProps */ "./node_modules/react-bootstrap/es/utils/splitComponentProps.js");
21816/* harmony import */ var _utils_StyleConfig__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./utils/StyleConfig */ "./node_modules/react-bootstrap/es/utils/StyleConfig.js");
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843var propTypes = (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__["default"])({}, (react_overlays_lib_Modal__WEBPACK_IMPORTED_MODULE_12___default().propTypes), _ModalDialog__WEBPACK_IMPORTED_MODULE_15__["default"].propTypes, {
21844  /**
21845   * Include a backdrop component. Specify 'static' for a backdrop that doesn't
21846   * trigger an "onHide" when clicked.
21847   */
21848  backdrop: prop_types__WEBPACK_IMPORTED_MODULE_10___default().oneOf(['static', true, false]),
21849
21850  /**
21851   * Add an optional extra class name to .modal-backdrop
21852   * It could end up looking like class="modal-backdrop foo-modal-backdrop in".
21853   */
21854  backdropClassName: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().string),
21855
21856  /**
21857   * Close the modal when escape key is pressed
21858   */
21859  keyboard: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool),
21860
21861  /**
21862   * Open and close the Modal with a slide and fade animation.
21863   */
21864  animation: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool),
21865
21866  /**
21867   * A Component type that provides the modal content Markup. This is a useful
21868   * prop when you want to use your own styles and markup to create a custom
21869   * modal component.
21870   */
21871  dialogComponentClass: (prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_14___default()),
21872
21873  /**
21874   * When `true` The modal will automatically shift focus to itself when it
21875   * opens, and replace it to the last focused element when it closes.
21876   * Generally this should never be set to false as it makes the Modal less
21877   * accessible to assistive technologies, like screen-readers.
21878   */
21879  autoFocus: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool),
21880
21881  /**
21882   * When `true` The modal will prevent focus from leaving the Modal while
21883   * open. Consider leaving the default value here, as it is necessary to make
21884   * the Modal work well with assistive technologies, such as screen readers.
21885   */
21886  enforceFocus: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool),
21887
21888  /**
21889   * When `true` The modal will restore focus to previously focused element once
21890   * modal is hidden
21891   */
21892  restoreFocus: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool),
21893
21894  /**
21895   * When `true` The modal will show itself.
21896   */
21897  show: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool),
21898
21899  /**
21900   * A callback fired when the header closeButton or non-static backdrop is
21901   * clicked. Required if either are specified.
21902   */
21903  onHide: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func),
21904
21905  /**
21906   * Callback fired before the Modal transitions in
21907   */
21908  onEnter: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func),
21909
21910  /**
21911   * Callback fired as the Modal begins to transition in
21912   */
21913  onEntering: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func),
21914
21915  /**
21916   * Callback fired after the Modal finishes transitioning in
21917   */
21918  onEntered: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func),
21919
21920  /**
21921   * Callback fired right before the Modal transitions out
21922   */
21923  onExit: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func),
21924
21925  /**
21926   * Callback fired as the Modal begins to transition out
21927   */
21928  onExiting: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func),
21929
21930  /**
21931   * Callback fired after the Modal finishes transitioning out
21932   */
21933  onExited: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func),
21934
21935  /**
21936   * @private
21937   */
21938  container: (react_overlays_lib_Modal__WEBPACK_IMPORTED_MODULE_12___default().propTypes.container)
21939});
21940
21941var defaultProps = (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__["default"])({}, (react_overlays_lib_Modal__WEBPACK_IMPORTED_MODULE_12___default().defaultProps), {
21942  animation: true,
21943  dialogComponentClass: _ModalDialog__WEBPACK_IMPORTED_MODULE_15__["default"]
21944});
21945
21946var childContextTypes = {
21947  $bs_modal: prop_types__WEBPACK_IMPORTED_MODULE_10___default().shape({
21948    onHide: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func)
21949  })
21950};
21951/* eslint-disable no-use-before-define, react/no-multi-comp */
21952
21953function DialogTransition(props) {
21954  return react__WEBPACK_IMPORTED_MODULE_9__.createElement(_Fade__WEBPACK_IMPORTED_MODULE_16__["default"], (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__["default"])({}, props, {
21955    timeout: Modal.TRANSITION_DURATION
21956  }));
21957}
21958
21959function BackdropTransition(props) {
21960  return react__WEBPACK_IMPORTED_MODULE_9__.createElement(_Fade__WEBPACK_IMPORTED_MODULE_16__["default"], (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__["default"])({}, props, {
21961    timeout: Modal.BACKDROP_TRANSITION_DURATION
21962  }));
21963}
21964/* eslint-enable no-use-before-define */
21965
21966
21967var Modal =
21968/*#__PURE__*/
21969function (_React$Component) {
21970  (0,_babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(Modal, _React$Component);
21971
21972  function Modal(props, context) {
21973    var _this;
21974
21975    _this = _React$Component.call(this, props, context) || this;
21976
21977    _this.handleDialogBackdropMouseDown = function () {
21978      _this._waitingForMouseUp = true;
21979    };
21980
21981    _this.handleMouseUp = function (ev) {
21982      var dialogNode = _this._modal.getDialogElement();
21983
21984      if (_this._waitingForMouseUp && ev.target === dialogNode) {
21985        _this._ignoreBackdropClick = true;
21986      }
21987
21988      _this._waitingForMouseUp = false;
21989    };
21990
21991    _this.handleEntering = _this.handleEntering.bind((0,_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])(_this)));
21992    _this.handleExited = _this.handleExited.bind((0,_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])(_this)));
21993    _this.handleWindowResize = _this.handleWindowResize.bind((0,_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])(_this)));
21994    _this.handleDialogClick = _this.handleDialogClick.bind((0,_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])(_this)));
21995    _this.setModalRef = _this.setModalRef.bind((0,_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])(_this)));
21996    _this.state = {
21997      style: {}
21998    };
21999    return _this;
22000  }
22001
22002  var _proto = Modal.prototype;
22003
22004  _proto.getChildContext = function getChildContext() {
22005    return {
22006      $bs_modal: {
22007        onHide: this.props.onHide
22008      }
22009    };
22010  };
22011
22012  _proto.componentWillUnmount = function componentWillUnmount() {
22013    // Clean up the listener if we need to.
22014    this.handleExited();
22015  };
22016
22017  _proto.setModalRef = function setModalRef(ref) {
22018    this._modal = ref;
22019  };
22020
22021  _proto.handleDialogClick = function handleDialogClick(e) {
22022    if (this._ignoreBackdropClick || e.target !== e.currentTarget) {
22023      this._ignoreBackdropClick = false;
22024      return;
22025    }
22026
22027    this.props.onHide();
22028  };
22029
22030  _proto.handleEntering = function handleEntering() {
22031    // FIXME: This should work even when animation is disabled.
22032    dom_helpers_events__WEBPACK_IMPORTED_MODULE_5__["default"].on(window, 'resize', this.handleWindowResize);
22033    this.updateStyle();
22034  };
22035
22036  _proto.handleExited = function handleExited() {
22037    // FIXME: This should work even when animation is disabled.
22038    dom_helpers_events__WEBPACK_IMPORTED_MODULE_5__["default"].off(window, 'resize', this.handleWindowResize);
22039  };
22040
22041  _proto.handleWindowResize = function handleWindowResize() {
22042    this.updateStyle();
22043  };
22044
22045  _proto.updateStyle = function updateStyle() {
22046    if (!(dom_helpers_util_inDOM__WEBPACK_IMPORTED_MODULE_7___default())) {
22047      return;
22048    }
22049
22050    var dialogNode = this._modal.getDialogElement();
22051
22052    var dialogHeight = dialogNode.scrollHeight;
22053    var document = dom_helpers_ownerDocument__WEBPACK_IMPORTED_MODULE_6___default()(dialogNode);
22054    var bodyIsOverflowing = react_overlays_lib_utils_isOverflowing__WEBPACK_IMPORTED_MODULE_13___default()(react_dom__WEBPACK_IMPORTED_MODULE_11__.findDOMNode(this.props.container || document.body));
22055    var modalIsOverflowing = dialogHeight > document.documentElement.clientHeight;
22056    this.setState({
22057      style: {
22058        paddingRight: bodyIsOverflowing && !modalIsOverflowing ? dom_helpers_util_scrollbarSize__WEBPACK_IMPORTED_MODULE_8___default()() : undefined,
22059        paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? dom_helpers_util_scrollbarSize__WEBPACK_IMPORTED_MODULE_8___default()() : undefined
22060      }
22061    });
22062  };
22063
22064  _proto.render = function render() {
22065    var _this$props = this.props,
22066        backdrop = _this$props.backdrop,
22067        backdropClassName = _this$props.backdropClassName,
22068        animation = _this$props.animation,
22069        show = _this$props.show,
22070        Dialog = _this$props.dialogComponentClass,
22071        className = _this$props.className,
22072        style = _this$props.style,
22073        children = _this$props.children,
22074        onEntering = _this$props.onEntering,
22075        onExited = _this$props.onExited,
22076        props = (0,_babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_this$props, ["backdrop", "backdropClassName", "animation", "show", "dialogComponentClass", "className", "style", "children", "onEntering", "onExited"]);
22077
22078    var _splitComponentProps = (0,_utils_splitComponentProps__WEBPACK_IMPORTED_MODULE_17__["default"])(props, (react_overlays_lib_Modal__WEBPACK_IMPORTED_MODULE_12___default())),
22079        baseModalProps = _splitComponentProps[0],
22080        dialogProps = _splitComponentProps[1];
22081
22082    var inClassName = show && !animation && 'in';
22083    return react__WEBPACK_IMPORTED_MODULE_9__.createElement((react_overlays_lib_Modal__WEBPACK_IMPORTED_MODULE_12___default()), (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__["default"])({}, baseModalProps, {
22084      ref: this.setModalRef,
22085      show: show,
22086      containerClassName: (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_18__.prefix)(props, 'open'),
22087      transition: animation ? DialogTransition : undefined,
22088      backdrop: backdrop,
22089      backdropTransition: animation ? BackdropTransition : undefined,
22090      backdropClassName: classnames__WEBPACK_IMPORTED_MODULE_4___default()((0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_18__.prefix)(props, 'backdrop'), backdropClassName, inClassName),
22091      onEntering: (0,_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_19__["default"])(onEntering, this.handleEntering),
22092      onExited: (0,_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_19__["default"])(onExited, this.handleExited),
22093      onMouseUp: this.handleMouseUp
22094    }), react__WEBPACK_IMPORTED_MODULE_9__.createElement(Dialog, (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__["default"])({}, dialogProps, {
22095      style: (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__["default"])({}, this.state.style, style),
22096      className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(className, inClassName),
22097      onClick: backdrop === true ? this.handleDialogClick : null,
22098      onMouseDownDialog: this.handleDialogBackdropMouseDown
22099    }), children));
22100  };
22101
22102  return Modal;
22103}(react__WEBPACK_IMPORTED_MODULE_9__.Component);
22104
22105Modal.propTypes = propTypes;
22106Modal.defaultProps = defaultProps;
22107Modal.childContextTypes = childContextTypes;
22108Modal.Body = _ModalBody__WEBPACK_IMPORTED_MODULE_20__["default"];
22109Modal.Header = _ModalHeader__WEBPACK_IMPORTED_MODULE_21__["default"];
22110Modal.Title = _ModalTitle__WEBPACK_IMPORTED_MODULE_22__["default"];
22111Modal.Footer = _ModalFooter__WEBPACK_IMPORTED_MODULE_23__["default"];
22112Modal.Dialog = _ModalDialog__WEBPACK_IMPORTED_MODULE_15__["default"];
22113Modal.TRANSITION_DURATION = 300;
22114Modal.BACKDROP_TRANSITION_DURATION = 150;
22115/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_18__.bsClass)('modal', (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_18__.bsSizes)([_utils_StyleConfig__WEBPACK_IMPORTED_MODULE_24__.Size.LARGE, _utils_StyleConfig__WEBPACK_IMPORTED_MODULE_24__.Size.SMALL], Modal)));
22116
22117/***/ }),
22118
vendor: 4,011 bytes, lines 22119-22188
22119/***/ "./node_modules/react-bootstrap/es/ModalBody.js":
22120/*!******************************************************!*\
22121  !*** ./node_modules/react-bootstrap/es/ModalBody.js ***!
22122  \******************************************************/
22123/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22124
22125"use strict";
22126__webpack_require__.r(__webpack_exports__);
22127/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22128/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
22129/* harmony export */ });
22130/* harmony import */ var _babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/extends */ "./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js");
22131/* harmony import */ var _babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js");
22132/* harmony import */ var _babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js");
22133/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
22134/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
22135/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
22136/* harmony import */ var prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types-extra/lib/elementType */ "./node_modules/prop-types-extra/lib/elementType.js");
22137/* harmony import */ var prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5__);
22138/* harmony import */ var _utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/bootstrapUtils */ "./node_modules/react-bootstrap/es/utils/bootstrapUtils.js");
22139
22140
22141
22142
22143
22144
22145
22146var propTypes = {
22147  componentClass: (prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5___default())
22148};
22149var defaultProps = {
22150  componentClass: 'div'
22151};
22152
22153var ModalBody =
22154/*#__PURE__*/
22155function (_React$Component) {
22156  (0,_babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__["default"])(ModalBody, _React$Component);
22157
22158  function ModalBody() {
22159    return _React$Component.apply(this, arguments) || this;
22160  }
22161
22162  var _proto = ModalBody.prototype;
22163
22164  _proto.render = function render() {
22165    var _this$props = this.props,
22166        Component = _this$props.componentClass,
22167        className = _this$props.className,
22168        props = (0,_babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["componentClass", "className"]);
22169
22170    var _splitBsProps = (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.splitBsProps)(props),
22171        bsProps = _splitBsProps[0],
22172        elementProps = _splitBsProps[1];
22173
22174    var classes = (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.getClassSet)(bsProps);
22175    return react__WEBPACK_IMPORTED_MODULE_4__.createElement(Component, (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, elementProps, {
22176      className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(className, classes)
22177    }));
22178  };
22179
22180  return ModalBody;
22181}(react__WEBPACK_IMPORTED_MODULE_4__.Component);
22182
22183ModalBody.propTypes = propTypes;
22184ModalBody.defaultProps = defaultProps;
22185/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.bsClass)('modal-body', ModalBody));
22186
22187/***/ }),
22188
vendor: 5,439 bytes, lines 22189-22280
22189/***/ "./node_modules/react-bootstrap/es/ModalDialog.js":
22190/*!********************************************************!*\
22191  !*** ./node_modules/react-bootstrap/es/ModalDialog.js ***!
22192  \********************************************************/
22193/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22194
22195"use strict";
22196__webpack_require__.r(__webpack_exports__);
22197/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22198/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
22199/* harmony export */ });
22200/* harmony import */ var _babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/extends */ "./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js");
22201/* harmony import */ var _babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js");
22202/* harmony import */ var _babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js");
22203/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
22204/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
22205/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
22206/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
22207/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);
22208/* harmony import */ var _utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/bootstrapUtils */ "./node_modules/react-bootstrap/es/utils/bootstrapUtils.js");
22209/* harmony import */ var _utils_StyleConfig__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/StyleConfig */ "./node_modules/react-bootstrap/es/utils/StyleConfig.js");
22210
22211
22212
22213
22214
22215
22216
22217
22218var propTypes = {
22219  /**
22220   * A css class to apply to the Modal dialog DOM node.
22221   */
22222  dialogClassName: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string)
22223};
22224
22225var ModalDialog =
22226/*#__PURE__*/
22227function (_React$Component) {
22228  (0,_babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__["default"])(ModalDialog, _React$Component);
22229
22230  function ModalDialog() {
22231    return _React$Component.apply(this, arguments) || this;
22232  }
22233
22234  var _proto = ModalDialog.prototype;
22235
22236  _proto.render = function render() {
22237    var _extends2;
22238
22239    var _this$props = this.props,
22240        dialogClassName = _this$props.dialogClassName,
22241        className = _this$props.className,
22242        style = _this$props.style,
22243        children = _this$props.children,
22244        onMouseDownDialog = _this$props.onMouseDownDialog,
22245        props = (0,_babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["dialogClassName", "className", "style", "children", "onMouseDownDialog"]);
22246
22247    var _splitBsProps = (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.splitBsProps)(props),
22248        bsProps = _splitBsProps[0],
22249        elementProps = _splitBsProps[1];
22250
22251    var bsClassName = (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.prefix)(bsProps);
22252
22253    var modalStyle = (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({
22254      display: 'block'
22255    }, style);
22256
22257    var dialogClasses = (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.getClassSet)(bsProps), (_extends2 = {}, _extends2[bsClassName] = false, _extends2[(0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.prefix)(bsProps, 'dialog')] = true, _extends2));
22258
22259    return react__WEBPACK_IMPORTED_MODULE_4__.createElement("div", (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, elementProps, {
22260      tabIndex: "-1",
22261      role: "dialog",
22262      style: modalStyle,
22263      className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(className, bsClassName)
22264    }), react__WEBPACK_IMPORTED_MODULE_4__.createElement("div", {
22265      className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(dialogClassName, dialogClasses),
22266      onMouseDown: onMouseDownDialog
22267    }, react__WEBPACK_IMPORTED_MODULE_4__.createElement("div", {
22268      className: (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.prefix)(bsProps, 'content'),
22269      role: "document"
22270    }, children)));
22271  };
22272
22273  return ModalDialog;
22274}(react__WEBPACK_IMPORTED_MODULE_4__.Component);
22275
22276ModalDialog.propTypes = propTypes;
22277/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.bsClass)('modal', (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.bsSizes)([_utils_StyleConfig__WEBPACK_IMPORTED_MODULE_7__.Size.LARGE, _utils_StyleConfig__WEBPACK_IMPORTED_MODULE_7__.Size.SMALL], ModalDialog)));
22278
22279/***/ }),
22280
vendor: 4,037 bytes, lines 22281-22350
22281/***/ "./node_modules/react-bootstrap/es/ModalFooter.js":
22282/*!********************************************************!*\
22283  !*** ./node_modules/react-bootstrap/es/ModalFooter.js ***!
22284  \********************************************************/
22285/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22286
22287"use strict";
22288__webpack_require__.r(__webpack_exports__);
22289/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22290/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
22291/* harmony export */ });
22292/* harmony import */ var _babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/extends */ "./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js");
22293/* harmony import */ var _babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js");
22294/* harmony import */ var _babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js");
22295/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
22296/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
22297/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
22298/* harmony import */ var prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types-extra/lib/elementType */ "./node_modules/prop-types-extra/lib/elementType.js");
22299/* harmony import */ var prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5__);
22300/* harmony import */ var _utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/bootstrapUtils */ "./node_modules/react-bootstrap/es/utils/bootstrapUtils.js");
22301
22302
22303
22304
22305
22306
22307
22308var propTypes = {
22309  componentClass: (prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5___default())
22310};
22311var defaultProps = {
22312  componentClass: 'div'
22313};
22314
22315var ModalFooter =
22316/*#__PURE__*/
22317function (_React$Component) {
22318  (0,_babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__["default"])(ModalFooter, _React$Component);
22319
22320  function ModalFooter() {
22321    return _React$Component.apply(this, arguments) || this;
22322  }
22323
22324  var _proto = ModalFooter.prototype;
22325
22326  _proto.render = function render() {
22327    var _this$props = this.props,
22328        Component = _this$props.componentClass,
22329        className = _this$props.className,
22330        props = (0,_babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["componentClass", "className"]);
22331
22332    var _splitBsProps = (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.splitBsProps)(props),
22333        bsProps = _splitBsProps[0],
22334        elementProps = _splitBsProps[1];
22335
22336    var classes = (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.getClassSet)(bsProps);
22337    return react__WEBPACK_IMPORTED_MODULE_4__.createElement(Component, (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, elementProps, {
22338      className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(className, classes)
22339    }));
22340  };
22341
22342  return ModalFooter;
22343}(react__WEBPACK_IMPORTED_MODULE_4__.Component);
22344
22345ModalFooter.propTypes = propTypes;
22346ModalFooter.defaultProps = defaultProps;
22347/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.bsClass)('modal-footer', ModalFooter));
22348
22349/***/ }),
22350
vendor: 5,610 bytes, lines 22351-22457
22351/***/ "./node_modules/react-bootstrap/es/ModalHeader.js":
22352/*!********************************************************!*\
22353  !*** ./node_modules/react-bootstrap/es/ModalHeader.js ***!
22354  \********************************************************/
22355/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22356
22357"use strict";
22358__webpack_require__.r(__webpack_exports__);
22359/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22360/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
22361/* harmony export */ });
22362/* harmony import */ var _babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/extends */ "./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js");
22363/* harmony import */ var _babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js");
22364/* harmony import */ var _babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js");
22365/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
22366/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
22367/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
22368/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
22369/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
22370/* harmony import */ var _utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/bootstrapUtils */ "./node_modules/react-bootstrap/es/utils/bootstrapUtils.js");
22371/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/createChainedFunction */ "./node_modules/react-bootstrap/es/utils/createChainedFunction.js");
22372/* harmony import */ var _CloseButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CloseButton */ "./node_modules/react-bootstrap/es/CloseButton.js");
22373
22374
22375
22376
22377
22378
22379
22380
22381 // TODO: `aria-label` should be `closeLabel`.
22382
22383var propTypes = {
22384  /**
22385   * Provides an accessible label for the close
22386   * button. It is used for Assistive Technology when the label text is not
22387   * readable.
22388   */
22389  closeLabel: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
22390
22391  /**
22392   * Specify whether the Component should contain a close button
22393   */
22394  closeButton: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
22395
22396  /**
22397   * A Callback fired when the close button is clicked. If used directly inside
22398   * a Modal component, the onHide will automatically be propagated up to the
22399   * parent Modal `onHide`.
22400   */
22401  onHide: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)
22402};
22403var defaultProps = {
22404  closeLabel: 'Close',
22405  closeButton: false
22406};
22407var contextTypes = {
22408  $bs_modal: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
22409    onHide: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)
22410  })
22411};
22412
22413var ModalHeader =
22414/*#__PURE__*/
22415function (_React$Component) {
22416  (0,_babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__["default"])(ModalHeader, _React$Component);
22417
22418  function ModalHeader() {
22419    return _React$Component.apply(this, arguments) || this;
22420  }
22421
22422  var _proto = ModalHeader.prototype;
22423
22424  _proto.render = function render() {
22425    var _this$props = this.props,
22426        closeLabel = _this$props.closeLabel,
22427        closeButton = _this$props.closeButton,
22428        onHide = _this$props.onHide,
22429        className = _this$props.className,
22430        children = _this$props.children,
22431        props = (0,_babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["closeLabel", "closeButton", "onHide", "className", "children"]);
22432
22433    var modal = this.context.$bs_modal;
22434
22435    var _splitBsProps = (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.splitBsProps)(props),
22436        bsProps = _splitBsProps[0],
22437        elementProps = _splitBsProps[1];
22438
22439    var classes = (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.getClassSet)(bsProps);
22440    return react__WEBPACK_IMPORTED_MODULE_5__.createElement("div", (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, elementProps, {
22441      className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(className, classes)
22442    }), closeButton && react__WEBPACK_IMPORTED_MODULE_5__.createElement(_CloseButton__WEBPACK_IMPORTED_MODULE_7__["default"], {
22443      label: closeLabel,
22444      onClick: (0,_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_8__["default"])(modal && modal.onHide, onHide)
22445    }), children);
22446  };
22447
22448  return ModalHeader;
22449}(react__WEBPACK_IMPORTED_MODULE_5__.Component);
22450
22451ModalHeader.propTypes = propTypes;
22452ModalHeader.defaultProps = defaultProps;
22453ModalHeader.contextTypes = contextTypes;
22454/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.bsClass)('modal-header', ModalHeader));
22455
22456/***/ }),
22457
vendor: 4,023 bytes, lines 22458-22527
22458/***/ "./node_modules/react-bootstrap/es/ModalTitle.js":
22459/*!*******************************************************!*\
22460  !*** ./node_modules/react-bootstrap/es/ModalTitle.js ***!
22461  \*******************************************************/
22462/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22463
22464"use strict";
22465__webpack_require__.r(__webpack_exports__);
22466/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22467/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
22468/* harmony export */ });
22469/* harmony import */ var _babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/extends */ "./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js");
22470/* harmony import */ var _babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js");
22471/* harmony import */ var _babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js");
22472/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
22473/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
22474/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
22475/* harmony import */ var prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types-extra/lib/elementType */ "./node_modules/prop-types-extra/lib/elementType.js");
22476/* harmony import */ var prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5__);
22477/* harmony import */ var _utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/bootstrapUtils */ "./node_modules/react-bootstrap/es/utils/bootstrapUtils.js");
22478
22479
22480
22481
22482
22483
22484
22485var propTypes = {
22486  componentClass: (prop_types_extra_lib_elementType__WEBPACK_IMPORTED_MODULE_5___default())
22487};
22488var defaultProps = {
22489  componentClass: 'h4'
22490};
22491
22492var ModalTitle =
22493/*#__PURE__*/
22494function (_React$Component) {
22495  (0,_babel_runtime_corejs2_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__["default"])(ModalTitle, _React$Component);
22496
22497  function ModalTitle() {
22498    return _React$Component.apply(this, arguments) || this;
22499  }
22500
22501  var _proto = ModalTitle.prototype;
22502
22503  _proto.render = function render() {
22504    var _this$props = this.props,
22505        Component = _this$props.componentClass,
22506        className = _this$props.className,
22507        props = (0,_babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["componentClass", "className"]);
22508
22509    var _splitBsProps = (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.splitBsProps)(props),
22510        bsProps = _splitBsProps[0],
22511        elementProps = _splitBsProps[1];
22512
22513    var classes = (0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.getClassSet)(bsProps);
22514    return react__WEBPACK_IMPORTED_MODULE_4__.createElement(Component, (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, elementProps, {
22515      className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(className, classes)
22516    }));
22517  };
22518
22519  return ModalTitle;
22520}(react__WEBPACK_IMPORTED_MODULE_4__.Component);
22521
22522ModalTitle.propTypes = propTypes;
22523ModalTitle.defaultProps = defaultProps;
22524/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_bootstrapUtils__WEBPACK_IMPORTED_MODULE_6__.bsClass)('modal-title', ModalTitle));
22525
22526/***/ }),
22527
vendor: 1,270 bytes, lines 22528-22573
22528/***/ "./node_modules/react-bootstrap/es/utils/StyleConfig.js":
22529/*!**************************************************************!*\
22530  !*** ./node_modules/react-bootstrap/es/utils/StyleConfig.js ***!
22531  \**************************************************************/
22532/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22533
22534"use strict";
22535__webpack_require__.r(__webpack_exports__);
22536/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22537/* harmony export */   "Size": () => (/* binding */ Size),
22538/* harmony export */   "SIZE_MAP": () => (/* binding */ SIZE_MAP),
22539/* harmony export */   "DEVICE_SIZES": () => (/* binding */ DEVICE_SIZES),
22540/* harmony export */   "State": () => (/* binding */ State),
22541/* harmony export */   "Style": () => (/* binding */ Style)
22542/* harmony export */ });
22543var Size = {
22544  LARGE: 'large',
22545  SMALL: 'small',
22546  XSMALL: 'xsmall'
22547};
22548var SIZE_MAP = {
22549  large: 'lg',
22550  medium: 'md',
22551  small: 'sm',
22552  xsmall: 'xs',
22553  lg: 'lg',
22554  md: 'md',
22555  sm: 'sm',
22556  xs: 'xs'
22557};
22558var DEVICE_SIZES = ['lg', 'md', 'sm', 'xs'];
22559var State = {
22560  SUCCESS: 'success',
22561  WARNING: 'warning',
22562  DANGER: 'danger',
22563  INFO: 'info'
22564};
22565var Style = {
22566  DEFAULT: 'default',
22567  PRIMARY: 'primary',
22568  LINK: 'link',
22569  INVERSE: 'inverse'
22570};
22571
22572/***/ }),
22573
vendor: 7,820 bytes, lines 22574-22784
22574/***/ "./node_modules/react-bootstrap/es/utils/bootstrapUtils.js":
22575/*!*****************************************************************!*\
22576  !*** ./node_modules/react-bootstrap/es/utils/bootstrapUtils.js ***!
22577  \*****************************************************************/
22578/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22579
22580"use strict";
22581__webpack_require__.r(__webpack_exports__);
22582/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22583/* harmony export */   "prefix": () => (/* binding */ prefix),
22584/* harmony export */   "bsClass": () => (/* binding */ bsClass),
22585/* harmony export */   "bsStyles": () => (/* binding */ bsStyles),
22586/* harmony export */   "bsSizes": () => (/* binding */ bsSizes),
22587/* harmony export */   "getClassSet": () => (/* binding */ getClassSet),
22588/* harmony export */   "splitBsProps": () => (/* binding */ splitBsProps),
22589/* harmony export */   "splitBsPropsAndOmit": () => (/* binding */ splitBsPropsAndOmit),
22590/* harmony export */   "addStyle": () => (/* binding */ addStyle),
22591/* harmony export */   "_curry": () => (/* binding */ _curry)
22592/* harmony export */ });
22593/* harmony import */ var _babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/core-js/object/entries */ "./node_modules/@babel/runtime-corejs2/core-js/object/entries.js");
22594/* harmony import */ var _babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_0__);
22595/* harmony import */ var _babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs2/helpers/esm/extends */ "./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js");
22596/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
22597/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_2__);
22598/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
22599/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
22600/* harmony import */ var _StyleConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./StyleConfig */ "./node_modules/react-bootstrap/es/utils/StyleConfig.js");
22601
22602
22603// TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.
22604
22605
22606
22607
22608function curry(fn) {
22609  return function () {
22610    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
22611      args[_key] = arguments[_key];
22612    }
22613
22614    var last = args[args.length - 1];
22615
22616    if (typeof last === 'function') {
22617      return fn.apply(void 0, args);
22618    }
22619
22620    return function (Component) {
22621      return fn.apply(void 0, args.concat([Component]));
22622    };
22623  };
22624}
22625
22626function prefix(props, variant) {
22627  var bsClass = (props.bsClass || '').trim();
22628  !(bsClass != null) ?  true ? invariant__WEBPACK_IMPORTED_MODULE_2___default()(false, 'A `bsClass` prop is required for this component') : 0 : void 0;
22629  return bsClass + (variant ? "-" + variant : '');
22630}
22631var bsClass = curry(function (defaultClass, Component) {
22632  var propTypes = Component.propTypes || (Component.propTypes = {});
22633  var defaultProps = Component.defaultProps || (Component.defaultProps = {});
22634  propTypes.bsClass = (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string);
22635  defaultProps.bsClass = defaultClass;
22636  return Component;
22637});
22638var bsStyles = curry(function (styles, defaultStyle, Component) {
22639  if (typeof defaultStyle !== 'string') {
22640    Component = defaultStyle;
22641    defaultStyle = undefined;
22642  }
22643
22644  var existing = Component.STYLES || [];
22645  var propTypes = Component.propTypes || {};
22646  styles.forEach(function (style) {
22647    if (existing.indexOf(style) === -1) {
22648      existing.push(style);
22649    }
22650  });
22651  var propType = prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(existing); // expose the values on the propType function for documentation
22652
22653  Component.STYLES = existing;
22654  propType._values = existing;
22655  Component.propTypes = (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, propTypes, {
22656    bsStyle: propType
22657  });
22658
22659  if (defaultStyle !== undefined) {
22660    var defaultProps = Component.defaultProps || (Component.defaultProps = {});
22661    defaultProps.bsStyle = defaultStyle;
22662  }
22663
22664  return Component;
22665});
22666var bsSizes = curry(function (sizes, defaultSize, Component) {
22667  if (typeof defaultSize !== 'string') {
22668    Component = defaultSize;
22669    defaultSize = undefined;
22670  }
22671
22672  var existing = Component.SIZES || [];
22673  var propTypes = Component.propTypes || {};
22674  sizes.forEach(function (size) {
22675    if (existing.indexOf(size) === -1) {
22676      existing.push(size);
22677    }
22678  });
22679  var values = [];
22680  existing.forEach(function (size) {
22681    var mappedSize = _StyleConfig__WEBPACK_IMPORTED_MODULE_4__.SIZE_MAP[size];
22682
22683    if (mappedSize && mappedSize !== size) {
22684      values.push(mappedSize);
22685    }
22686
22687    values.push(size);
22688  });
22689  var propType = prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(values);
22690  propType._values = values; // expose the values on the propType function for documentation
22691
22692  Component.SIZES = existing;
22693  Component.propTypes = (0,_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, propTypes, {
22694    bsSize: propType
22695  });
22696
22697  if (defaultSize !== undefined) {
22698    if (!Component.defaultProps) {
22699      Component.defaultProps = {};
22700    }
22701
22702    Component.defaultProps.bsSize = defaultSize;
22703  }
22704
22705  return Component;
22706});
22707function getClassSet(props) {
22708  var _classes;
22709
22710  var classes = (_classes = {}, _classes[prefix(props)] = true, _classes);
22711
22712  if (props.bsSize) {
22713    var bsSize = _StyleConfig__WEBPACK_IMPORTED_MODULE_4__.SIZE_MAP[props.bsSize] || props.bsSize;
22714    classes[prefix(props, bsSize)] = true;
22715  }
22716
22717  if (props.bsStyle) {
22718    classes[prefix(props, props.bsStyle)] = true;
22719  }
22720
22721  return classes;
22722}
22723
22724function getBsProps(props) {
22725  return {
22726    bsClass: props.bsClass,
22727    bsSize: props.bsSize,
22728    bsStyle: props.bsStyle,
22729    bsRole: props.bsRole
22730  };
22731}
22732
22733function isBsProp(propName) {
22734  return propName === 'bsClass' || propName === 'bsSize' || propName === 'bsStyle' || propName === 'bsRole';
22735}
22736
22737function splitBsProps(props) {
22738  var elementProps = {};
22739
22740  _babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_0___default()(props).forEach(function (_ref) {
22741    var propName = _ref[0],
22742        propValue = _ref[1];
22743
22744    if (!isBsProp(propName)) {
22745      elementProps[propName] = propValue;
22746    }
22747  });
22748
22749  return [getBsProps(props), elementProps];
22750}
22751function splitBsPropsAndOmit(props, omittedPropNames) {
22752  var isOmittedProp = {};
22753  omittedPropNames.forEach(function (propName) {
22754    isOmittedProp[propName] = true;
22755  });
22756  var elementProps = {};
22757
22758  _babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_0___default()(props).forEach(function (_ref2) {
22759    var propName = _ref2[0],
22760        propValue = _ref2[1];
22761
22762    if (!isBsProp(propName) && !isOmittedProp[propName]) {
22763      elementProps[propName] = propValue;
22764    }
22765  });
22766
22767  return [getBsProps(props), elementProps];
22768}
22769/**
22770 * Add a style variant to a Component. Mutates the propTypes of the component
22771 * in order to validate the new variant.
22772 */
22773
22774function addStyle(Component) {
22775  for (var _len2 = arguments.length, styleVariant = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
22776    styleVariant[_key2 - 1] = arguments[_key2];
22777  }
22778
22779  bsStyles(styleVariant)(Component);
22780}
22781var _curry = curry;
22782
22783/***/ }),
22784
vendor: 1,633 bytes, lines 22785-22835
22785/***/ "./node_modules/react-bootstrap/es/utils/createChainedFunction.js":
22786/*!************************************************************************!*\
22787  !*** ./node_modules/react-bootstrap/es/utils/createChainedFunction.js ***!
22788  \************************************************************************/
22789/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22790
22791"use strict";
22792__webpack_require__.r(__webpack_exports__);
22793/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22794/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
22795/* harmony export */ });
22796/**
22797 * Safe chained function
22798 *
22799 * Will only create a new function if needed,
22800 * otherwise will pass back existing functions or null.
22801 *
22802 * @param {function} functions to chain
22803 * @returns {function|null}
22804 */
22805function createChainedFunction() {
22806  for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
22807    funcs[_key] = arguments[_key];
22808  }
22809
22810  return funcs.filter(function (f) {
22811    return f != null;
22812  }).reduce(function (acc, f) {
22813    if (typeof f !== 'function') {
22814      throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');
22815    }
22816
22817    if (acc === null) {
22818      return f;
22819    }
22820
22821    return function chainedFunction() {
22822      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
22823        args[_key2] = arguments[_key2];
22824      }
22825
22826      acc.apply(this, args);
22827      f.apply(this, args);
22828    };
22829  }, null);
22830}
22831
22832/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createChainedFunction);
22833
22834/***/ }),
22835
vendor: 1,591 bytes, lines 22836-22870
22836/***/ "./node_modules/react-bootstrap/es/utils/splitComponentProps.js":
22837/*!**********************************************************************!*\
22838  !*** ./node_modules/react-bootstrap/es/utils/splitComponentProps.js ***!
22839  \**********************************************************************/
22840/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22841
22842"use strict";
22843__webpack_require__.r(__webpack_exports__);
22844/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22845/* harmony export */   "default": () => (/* binding */ splitComponentProps)
22846/* harmony export */ });
22847/* harmony import */ var _babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/core-js/object/entries */ "./node_modules/@babel/runtime-corejs2/core-js/object/entries.js");
22848/* harmony import */ var _babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_0__);
22849
22850function splitComponentProps(props, Component) {
22851  var componentPropTypes = Component.propTypes;
22852  var parentProps = {};
22853  var childProps = {};
22854
22855  _babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_0___default()(props).forEach(function (_ref) {
22856    var propName = _ref[0],
22857        propValue = _ref[1];
22858
22859    if (componentPropTypes[propName]) {
22860      parentProps[propName] = propValue;
22861    } else {
22862      childProps[propName] = propValue;
22863    }
22864  });
22865
22866  return [parentProps, childProps];
22867}
22868
22869/***/ }),
22870
vendor: 894,764 bytes, lines 22871-49138
22871/***/ "./node_modules/react-dom/cjs/react-dom.development.js":
22872/*!*************************************************************!*\
22873  !*** ./node_modules/react-dom/cjs/react-dom.development.js ***!
22874  \*************************************************************/
22875/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
22876
22877"use strict";
22878/** @license React v17.0.2
22879 * react-dom.development.js
22880 *
22881 * Copyright (c) Facebook, Inc. and its affiliates.
22882 *
22883 * This source code is licensed under the MIT license found in the
22884 * LICENSE file in the root directory of this source tree.
22885 */
22886
22887
22888
22889if (true) {
22890  (function() {
22891'use strict';
22892
22893var React = __webpack_require__(/*! react */ "./node_modules/react/index.js");
22894var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
22895var Scheduler = __webpack_require__(/*! scheduler */ "./node_modules/scheduler/index.js");
22896var tracing = __webpack_require__(/*! scheduler/tracing */ "./node_modules/scheduler/tracing.js");
22897
22898var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
22899
22900// by calls to these methods by a Babel plugin.
22901//
22902// In PROD (or in packages without access to React internals),
22903// they are left as they are instead.
22904
22905function warn(format) {
22906  {
22907    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
22908      args[_key - 1] = arguments[_key];
22909    }
22910
22911    printWarning('warn', format, args);
22912  }
22913}
22914function error(format) {
22915  {
22916    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
22917      args[_key2 - 1] = arguments[_key2];
22918    }
22919
22920    printWarning('error', format, args);
22921  }
22922}
22923
22924function printWarning(level, format, args) {
22925  // When changing this logic, you might want to also
22926  // update consoleWithStackDev.www.js as well.
22927  {
22928    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
22929    var stack = ReactDebugCurrentFrame.getStackAddendum();
22930
22931    if (stack !== '') {
22932      format += '%s';
22933      args = args.concat([stack]);
22934    }
22935
22936    var argsWithFormat = args.map(function (item) {
22937      return '' + item;
22938    }); // Careful: RN currently depends on this prefix
22939
22940    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
22941    // breaks IE9: https://github.com/facebook/react/issues/13610
22942    // eslint-disable-next-line react-internal/no-production-logging
22943
22944    Function.prototype.apply.call(console[level], console, argsWithFormat);
22945  }
22946}
22947
22948if (!React) {
22949  {
22950    throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." );
22951  }
22952}
22953
22954var FunctionComponent = 0;
22955var ClassComponent = 1;
22956var IndeterminateComponent = 2; // Before we know whether it is function or class
22957
22958var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
22959
22960var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
22961
22962var HostComponent = 5;
22963var HostText = 6;
22964var Fragment = 7;
22965var Mode = 8;
22966var ContextConsumer = 9;
22967var ContextProvider = 10;
22968var ForwardRef = 11;
22969var Profiler = 12;
22970var SuspenseComponent = 13;
22971var MemoComponent = 14;
22972var SimpleMemoComponent = 15;
22973var LazyComponent = 16;
22974var IncompleteClassComponent = 17;
22975var DehydratedFragment = 18;
22976var SuspenseListComponent = 19;
22977var FundamentalComponent = 20;
22978var ScopeComponent = 21;
22979var Block = 22;
22980var OffscreenComponent = 23;
22981var LegacyHiddenComponent = 24;
22982
22983// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
22984
22985var enableProfilerTimer = true; // Record durations for commit and passive effects phases.
22986
22987var enableFundamentalAPI = false; // Experimental Scope support.
22988var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects)
22989var warnAboutStringRefs = false;
22990
22991var allNativeEvents = new Set();
22992/**
22993 * Mapping from registration name to event name
22994 */
22995
22996
22997var registrationNameDependencies = {};
22998/**
22999 * Mapping from lowercase registration names to the properly cased version,
23000 * used to warn in the case of missing event handlers. Available
23001 * only in true.
23002 * @type {Object}
23003 */
23004
23005var possibleRegistrationNames =  {} ; // Trust the developer to only use possibleRegistrationNames in true
23006
23007function registerTwoPhaseEvent(registrationName, dependencies) {
23008  registerDirectEvent(registrationName, dependencies);
23009  registerDirectEvent(registrationName + 'Capture', dependencies);
23010}
23011function registerDirectEvent(registrationName, dependencies) {
23012  {
23013    if (registrationNameDependencies[registrationName]) {
23014      error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);
23015    }
23016  }
23017
23018  registrationNameDependencies[registrationName] = dependencies;
23019
23020  {
23021    var lowerCasedName = registrationName.toLowerCase();
23022    possibleRegistrationNames[lowerCasedName] = registrationName;
23023
23024    if (registrationName === 'onDoubleClick') {
23025      possibleRegistrationNames.ondblclick = registrationName;
23026    }
23027  }
23028
23029  for (var i = 0; i < dependencies.length; i++) {
23030    allNativeEvents.add(dependencies[i]);
23031  }
23032}
23033
23034var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
23035
23036// A reserved attribute.
23037// It is handled by React separately and shouldn't be written to the DOM.
23038var RESERVED = 0; // A simple string attribute.
23039// Attributes that aren't in the filter are presumed to have this type.
23040
23041var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
23042// "enumerated" attributes with "true" and "false" as possible values.
23043// When true, it should be set to a "true" string.
23044// When false, it should be set to a "false" string.
23045
23046var BOOLEANISH_STRING = 2; // A real boolean attribute.
23047// When true, it should be present (set either to an empty string or its name).
23048// When false, it should be omitted.
23049
23050var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
23051// When true, it should be present (set either to an empty string or its name).
23052// When false, it should be omitted.
23053// For any other value, should be present with that value.
23054
23055var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
23056// When falsy, it should be removed.
23057
23058var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
23059// When falsy, it should be removed.
23060
23061var POSITIVE_NUMERIC = 6;
23062
23063/* eslint-disable max-len */
23064var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
23065/* eslint-enable max-len */
23066
23067var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
23068var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
23069var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
23070var hasOwnProperty = Object.prototype.hasOwnProperty;
23071var illegalAttributeNameCache = {};
23072var validatedAttributeNameCache = {};
23073function isAttributeNameSafe(attributeName) {
23074  if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
23075    return true;
23076  }
23077
23078  if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
23079    return false;
23080  }
23081
23082  if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
23083    validatedAttributeNameCache[attributeName] = true;
23084    return true;
23085  }
23086
23087  illegalAttributeNameCache[attributeName] = true;
23088
23089  {
23090    error('Invalid attribute name: `%s`', attributeName);
23091  }
23092
23093  return false;
23094}
23095function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
23096  if (propertyInfo !== null) {
23097    return propertyInfo.type === RESERVED;
23098  }
23099
23100  if (isCustomComponentTag) {
23101    return false;
23102  }
23103
23104  if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
23105    return true;
23106  }
23107
23108  return false;
23109}
23110function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
23111  if (propertyInfo !== null && propertyInfo.type === RESERVED) {
23112    return false;
23113  }
23114
23115  switch (typeof value) {
23116    case 'function': // $FlowIssue symbol is perfectly valid here
23117
23118    case 'symbol':
23119      // eslint-disable-line
23120      return true;
23121
23122    case 'boolean':
23123      {
23124        if (isCustomComponentTag) {
23125          return false;
23126        }
23127
23128        if (propertyInfo !== null) {
23129          return !propertyInfo.acceptsBooleans;
23130        } else {
23131          var prefix = name.toLowerCase().slice(0, 5);
23132          return prefix !== 'data-' && prefix !== 'aria-';
23133        }
23134      }
23135
23136    default:
23137      return false;
23138  }
23139}
23140function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
23141  if (value === null || typeof value === 'undefined') {
23142    return true;
23143  }
23144
23145  if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
23146    return true;
23147  }
23148
23149  if (isCustomComponentTag) {
23150    return false;
23151  }
23152
23153  if (propertyInfo !== null) {
23154
23155    switch (propertyInfo.type) {
23156      case BOOLEAN:
23157        return !value;
23158
23159      case OVERLOADED_BOOLEAN:
23160        return value === false;
23161
23162      case NUMERIC:
23163        return isNaN(value);
23164
23165      case POSITIVE_NUMERIC:
23166        return isNaN(value) || value < 1;
23167    }
23168  }
23169
23170  return false;
23171}
23172function getPropertyInfo(name) {
23173  return properties.hasOwnProperty(name) ? properties[name] : null;
23174}
23175
23176function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
23177  this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
23178  this.attributeName = attributeName;
23179  this.attributeNamespace = attributeNamespace;
23180  this.mustUseProperty = mustUseProperty;
23181  this.propertyName = name;
23182  this.type = type;
23183  this.sanitizeURL = sanitizeURL;
23184  this.removeEmptyString = removeEmptyString;
23185} // When adding attributes to this list, be sure to also add them to
23186// the `possibleStandardNames` module to ensure casing and incorrect
23187// name warnings.
23188
23189
23190var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
23191
23192var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
23193// elements (not just inputs). Now that ReactDOMInput assigns to the
23194// defaultValue property -- do we need this?
23195'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
23196reservedProps.forEach(function (name) {
23197  properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
23198  name, // attributeName
23199  null, // attributeNamespace
23200  false, // sanitizeURL
23201  false);
23202}); // A few React string attributes have a different name.
23203// This is a mapping from React prop names to the attribute names.
23204
23205[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
23206  var name = _ref[0],
23207      attributeName = _ref[1];
23208  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
23209  attributeName, // attributeName
23210  null, // attributeNamespace
23211  false, // sanitizeURL
23212  false);
23213}); // These are "enumerated" HTML attributes that accept "true" and "false".
23214// In React, we let users pass `true` and `false` even though technically
23215// these aren't boolean attributes (they are coerced to strings).
23216
23217['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
23218  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
23219  name.toLowerCase(), // attributeName
23220  null, // attributeNamespace
23221  false, // sanitizeURL
23222  false);
23223}); // These are "enumerated" SVG attributes that accept "true" and "false".
23224// In React, we let users pass `true` and `false` even though technically
23225// these aren't boolean attributes (they are coerced to strings).
23226// Since these are SVG attributes, their attribute names are case-sensitive.
23227
23228['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
23229  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
23230  name, // attributeName
23231  null, // attributeNamespace
23232  false, // sanitizeURL
23233  false);
23234}); // These are HTML boolean attributes.
23235
23236['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
23237// on the client side because the browsers are inconsistent. Instead we call focus().
23238'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
23239'itemScope'].forEach(function (name) {
23240  properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
23241  name.toLowerCase(), // attributeName
23242  null, // attributeNamespace
23243  false, // sanitizeURL
23244  false);
23245}); // These are the few React props that we set as DOM properties
23246// rather than attributes. These are all booleans.
23247
23248['checked', // Note: `option.selected` is not updated if `select.multiple` is
23249// disabled with `removeAttribute`. We have special logic for handling this.
23250'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
23251// you'll need to set attributeName to name.toLowerCase()
23252// instead in the assignment below.
23253].forEach(function (name) {
23254  properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
23255  name, // attributeName
23256  null, // attributeNamespace
23257  false, // sanitizeURL
23258  false);
23259}); // These are HTML attributes that are "overloaded booleans": they behave like
23260// booleans, but can also accept a string value.
23261
23262['capture', 'download' // NOTE: if you add a camelCased prop to this list,
23263// you'll need to set attributeName to name.toLowerCase()
23264// instead in the assignment below.
23265].forEach(function (name) {
23266  properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
23267  name, // attributeName
23268  null, // attributeNamespace
23269  false, // sanitizeURL
23270  false);
23271}); // These are HTML attributes that must be positive numbers.
23272
23273['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
23274// you'll need to set attributeName to name.toLowerCase()
23275// instead in the assignment below.
23276].forEach(function (name) {
23277  properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
23278  name, // attributeName
23279  null, // attributeNamespace
23280  false, // sanitizeURL
23281  false);
23282}); // These are HTML attributes that must be numbers.
23283
23284['rowSpan', 'start'].forEach(function (name) {
23285  properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
23286  name.toLowerCase(), // attributeName
23287  null, // attributeNamespace
23288  false, // sanitizeURL
23289  false);
23290});
23291var CAMELIZE = /[\-\:]([a-z])/g;
23292
23293var capitalize = function (token) {
23294  return token[1].toUpperCase();
23295}; // This is a list of all SVG attributes that need special casing, namespacing,
23296// or boolean value assignment. Regular attributes that just accept strings
23297// and have the same names are omitted, just like in the HTML attribute filter.
23298// Some of these attributes can be hard to find. This list was created by
23299// scraping the MDN documentation.
23300
23301
23302['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
23303// you'll need to set attributeName to name.toLowerCase()
23304// instead in the assignment below.
23305].forEach(function (attributeName) {
23306  var name = attributeName.replace(CAMELIZE, capitalize);
23307  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
23308  attributeName, null, // attributeNamespace
23309  false, // sanitizeURL
23310  false);
23311}); // String SVG attributes with the xlink namespace.
23312
23313['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
23314// you'll need to set attributeName to name.toLowerCase()
23315// instead in the assignment below.
23316].forEach(function (attributeName) {
23317  var name = attributeName.replace(CAMELIZE, capitalize);
23318  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
23319  attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
23320  false);
23321}); // String SVG attributes with the xml namespace.
23322
23323['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
23324// you'll need to set attributeName to name.toLowerCase()
23325// instead in the assignment below.
23326].forEach(function (attributeName) {
23327  var name = attributeName.replace(CAMELIZE, capitalize);
23328  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
23329  attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
23330  false);
23331}); // These attribute exists both in HTML and SVG.
23332// The attribute name is case-sensitive in SVG so we can't just use
23333// the React name like we do for attributes that exist only in HTML.
23334
23335['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
23336  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
23337  attributeName.toLowerCase(), // attributeName
23338  null, // attributeNamespace
23339  false, // sanitizeURL
23340  false);
23341}); // These attributes accept URLs. These must not allow javascript: URLS.
23342// These will also need to accept Trusted Types object in the future.
23343
23344var xlinkHref = 'xlinkHref';
23345properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
23346'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
23347false);
23348['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
23349  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
23350  attributeName.toLowerCase(), // attributeName
23351  null, // attributeNamespace
23352  true, // sanitizeURL
23353  true);
23354});
23355
23356// and any newline or tab are filtered out as if they're not part of the URL.
23357// https://url.spec.whatwg.org/#url-parsing
23358// Tab or newline are defined as \r\n\t:
23359// https://infra.spec.whatwg.org/#ascii-tab-or-newline
23360// A C0 control is a code point in the range \u0000 NULL to \u001F
23361// INFORMATION SEPARATOR ONE, inclusive:
23362// https://infra.spec.whatwg.org/#c0-control-or-space
23363
23364/* eslint-disable max-len */
23365
23366var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
23367var didWarn = false;
23368
23369function sanitizeURL(url) {
23370  {
23371    if (!didWarn && isJavaScriptProtocol.test(url)) {
23372      didWarn = true;
23373
23374      error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
23375    }
23376  }
23377}
23378
23379/**
23380 * Get the value for a property on a node. Only used in DEV for SSR validation.
23381 * The "expected" argument is used as a hint of what the expected value is.
23382 * Some properties have multiple equivalent values.
23383 */
23384function getValueForProperty(node, name, expected, propertyInfo) {
23385  {
23386    if (propertyInfo.mustUseProperty) {
23387      var propertyName = propertyInfo.propertyName;
23388      return node[propertyName];
23389    } else {
23390      if ( propertyInfo.sanitizeURL) {
23391        // If we haven't fully disabled javascript: URLs, and if
23392        // the hydration is successful of a javascript: URL, we
23393        // still want to warn on the client.
23394        sanitizeURL('' + expected);
23395      }
23396
23397      var attributeName = propertyInfo.attributeName;
23398      var stringValue = null;
23399
23400      if (propertyInfo.type === OVERLOADED_BOOLEAN) {
23401        if (node.hasAttribute(attributeName)) {
23402          var value = node.getAttribute(attributeName);
23403
23404          if (value === '') {
23405            return true;
23406          }
23407
23408          if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
23409            return value;
23410          }
23411
23412          if (value === '' + expected) {
23413            return expected;
23414          }
23415
23416          return value;
23417        }
23418      } else if (node.hasAttribute(attributeName)) {
23419        if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
23420          // We had an attribute but shouldn't have had one, so read it
23421          // for the error message.
23422          return node.getAttribute(attributeName);
23423        }
23424
23425        if (propertyInfo.type === BOOLEAN) {
23426          // If this was a boolean, it doesn't matter what the value is
23427          // the fact that we have it is the same as the expected.
23428          return expected;
23429        } // Even if this property uses a namespace we use getAttribute
23430        // because we assume its namespaced name is the same as our config.
23431        // To use getAttributeNS we need the local name which we don't have
23432        // in our config atm.
23433
23434
23435        stringValue = node.getAttribute(attributeName);
23436      }
23437
23438      if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
23439        return stringValue === null ? expected : stringValue;
23440      } else if (stringValue === '' + expected) {
23441        return expected;
23442      } else {
23443        return stringValue;
23444      }
23445    }
23446  }
23447}
23448/**
23449 * Get the value for a attribute on a node. Only used in DEV for SSR validation.
23450 * The third argument is used as a hint of what the expected value is. Some
23451 * attributes have multiple equivalent values.
23452 */
23453
23454function getValueForAttribute(node, name, expected) {
23455  {
23456    if (!isAttributeNameSafe(name)) {
23457      return;
23458    } // If the object is an opaque reference ID, it's expected that
23459    // the next prop is different than the server value, so just return
23460    // expected
23461
23462
23463    if (isOpaqueHydratingObject(expected)) {
23464      return expected;
23465    }
23466
23467    if (!node.hasAttribute(name)) {
23468      return expected === undefined ? undefined : null;
23469    }
23470
23471    var value = node.getAttribute(name);
23472
23473    if (value === '' + expected) {
23474      return expected;
23475    }
23476
23477    return value;
23478  }
23479}
23480/**
23481 * Sets the value for a property on a node.
23482 *
23483 * @param {DOMElement} node
23484 * @param {string} name
23485 * @param {*} value
23486 */
23487
23488function setValueForProperty(node, name, value, isCustomComponentTag) {
23489  var propertyInfo = getPropertyInfo(name);
23490
23491  if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
23492    return;
23493  }
23494
23495  if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
23496    value = null;
23497  } // If the prop isn't in the special list, treat it as a simple attribute.
23498
23499
23500  if (isCustomComponentTag || propertyInfo === null) {
23501    if (isAttributeNameSafe(name)) {
23502      var _attributeName = name;
23503
23504      if (value === null) {
23505        node.removeAttribute(_attributeName);
23506      } else {
23507        node.setAttribute(_attributeName,  '' + value);
23508      }
23509    }
23510
23511    return;
23512  }
23513
23514  var mustUseProperty = propertyInfo.mustUseProperty;
23515
23516  if (mustUseProperty) {
23517    var propertyName = propertyInfo.propertyName;
23518
23519    if (value === null) {
23520      var type = propertyInfo.type;
23521      node[propertyName] = type === BOOLEAN ? false : '';
23522    } else {
23523      // Contrary to `setAttribute`, object properties are properly
23524      // `toString`ed by IE8/9.
23525      node[propertyName] = value;
23526    }
23527
23528    return;
23529  } // The rest are treated as attributes with special cases.
23530
23531
23532  var attributeName = propertyInfo.attributeName,
23533      attributeNamespace = propertyInfo.attributeNamespace;
23534
23535  if (value === null) {
23536    node.removeAttribute(attributeName);
23537  } else {
23538    var _type = propertyInfo.type;
23539    var attributeValue;
23540
23541    if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
23542      // If attribute type is boolean, we know for sure it won't be an execution sink
23543      // and we won't require Trusted Type here.
23544      attributeValue = '';
23545    } else {
23546      // `setAttribute` with objects becomes only `[object]` in IE8/9,
23547      // ('' + value) makes it output the correct toString()-value.
23548      {
23549        attributeValue = '' + value;
23550      }
23551
23552      if (propertyInfo.sanitizeURL) {
23553        sanitizeURL(attributeValue.toString());
23554      }
23555    }
23556
23557    if (attributeNamespace) {
23558      node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
23559    } else {
23560      node.setAttribute(attributeName, attributeValue);
23561    }
23562  }
23563}
23564
23565// ATTENTION
23566// When adding new symbols to this file,
23567// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
23568// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
23569// nor polyfill, then a plain number is used for performance.
23570var REACT_ELEMENT_TYPE = 0xeac7;
23571var REACT_PORTAL_TYPE = 0xeaca;
23572var REACT_FRAGMENT_TYPE = 0xeacb;
23573var REACT_STRICT_MODE_TYPE = 0xeacc;
23574var REACT_PROFILER_TYPE = 0xead2;
23575var REACT_PROVIDER_TYPE = 0xeacd;
23576var REACT_CONTEXT_TYPE = 0xeace;
23577var REACT_FORWARD_REF_TYPE = 0xead0;
23578var REACT_SUSPENSE_TYPE = 0xead1;
23579var REACT_SUSPENSE_LIST_TYPE = 0xead8;
23580var REACT_MEMO_TYPE = 0xead3;
23581var REACT_LAZY_TYPE = 0xead4;
23582var REACT_BLOCK_TYPE = 0xead9;
23583var REACT_SERVER_BLOCK_TYPE = 0xeada;
23584var REACT_FUNDAMENTAL_TYPE = 0xead5;
23585var REACT_SCOPE_TYPE = 0xead7;
23586var REACT_OPAQUE_ID_TYPE = 0xeae0;
23587var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
23588var REACT_OFFSCREEN_TYPE = 0xeae2;
23589var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
23590
23591if (typeof Symbol === 'function' && Symbol.for) {
23592  var symbolFor = Symbol.for;
23593  REACT_ELEMENT_TYPE = symbolFor('react.element');
23594  REACT_PORTAL_TYPE = symbolFor('react.portal');
23595  REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
23596  REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
23597  REACT_PROFILER_TYPE = symbolFor('react.profiler');
23598  REACT_PROVIDER_TYPE = symbolFor('react.provider');
23599  REACT_CONTEXT_TYPE = symbolFor('react.context');
23600  REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
23601  REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
23602  REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
23603  REACT_MEMO_TYPE = symbolFor('react.memo');
23604  REACT_LAZY_TYPE = symbolFor('react.lazy');
23605  REACT_BLOCK_TYPE = symbolFor('react.block');
23606  REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
23607  REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
23608  REACT_SCOPE_TYPE = symbolFor('react.scope');
23609  REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
23610  REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
23611  REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
23612  REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
23613}
23614
23615var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
23616var FAUX_ITERATOR_SYMBOL = '@@iterator';
23617function getIteratorFn(maybeIterable) {
23618  if (maybeIterable === null || typeof maybeIterable !== 'object') {
23619    return null;
23620  }
23621
23622  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
23623
23624  if (typeof maybeIterator === 'function') {
23625    return maybeIterator;
23626  }
23627
23628  return null;
23629}
23630
23631// Helpers to patch console.logs to avoid logging during side-effect free
23632// replaying on render function. This currently only patches the object
23633// lazily which won't cover if the log function was extracted eagerly.
23634// We could also eagerly patch the method.
23635var disabledDepth = 0;
23636var prevLog;
23637var prevInfo;
23638var prevWarn;
23639var prevError;
23640var prevGroup;
23641var prevGroupCollapsed;
23642var prevGroupEnd;
23643
23644function disabledLog() {}
23645
23646disabledLog.__reactDisabledLog = true;
23647function disableLogs() {
23648  {
23649    if (disabledDepth === 0) {
23650      /* eslint-disable react-internal/no-production-logging */
23651      prevLog = console.log;
23652      prevInfo = console.info;
23653      prevWarn = console.warn;
23654      prevError = console.error;
23655      prevGroup = console.group;
23656      prevGroupCollapsed = console.groupCollapsed;
23657      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
23658
23659      var props = {
23660        configurable: true,
23661        enumerable: true,
23662        value: disabledLog,
23663        writable: true
23664      }; // $FlowFixMe Flow thinks console is immutable.
23665
23666      Object.defineProperties(console, {
23667        info: props,
23668        log: props,
23669        warn: props,
23670        error: props,
23671        group: props,
23672        groupCollapsed: props,
23673        groupEnd: props
23674      });
23675      /* eslint-enable react-internal/no-production-logging */
23676    }
23677
23678    disabledDepth++;
23679  }
23680}
23681function reenableLogs() {
23682  {
23683    disabledDepth--;
23684
23685    if (disabledDepth === 0) {
23686      /* eslint-disable react-internal/no-production-logging */
23687      var props = {
23688        configurable: true,
23689        enumerable: true,
23690        writable: true
23691      }; // $FlowFixMe Flow thinks console is immutable.
23692
23693      Object.defineProperties(console, {
23694        log: _assign({}, props, {
23695          value: prevLog
23696        }),
23697        info: _assign({}, props, {
23698          value: prevInfo
23699        }),
23700        warn: _assign({}, props, {
23701          value: prevWarn
23702        }),
23703        error: _assign({}, props, {
23704          value: prevError
23705        }),
23706        group: _assign({}, props, {
23707          value: prevGroup
23708        }),
23709        groupCollapsed: _assign({}, props, {
23710          value: prevGroupCollapsed
23711        }),
23712        groupEnd: _assign({}, props, {
23713          value: prevGroupEnd
23714        })
23715      });
23716      /* eslint-enable react-internal/no-production-logging */
23717    }
23718
23719    if (disabledDepth < 0) {
23720      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
23721    }
23722  }
23723}
23724
23725var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
23726var prefix;
23727function describeBuiltInComponentFrame(name, source, ownerFn) {
23728  {
23729    if (prefix === undefined) {
23730      // Extract the VM specific prefix used by each line.
23731      try {
23732        throw Error();
23733      } catch (x) {
23734        var match = x.stack.trim().match(/\n( *(at )?)/);
23735        prefix = match && match[1] || '';
23736      }
23737    } // We use the prefix to ensure our stacks line up with native stack frames.
23738
23739
23740    return '\n' + prefix + name;
23741  }
23742}
23743var reentry = false;
23744var componentFrameCache;
23745
23746{
23747  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
23748  componentFrameCache = new PossiblyWeakMap();
23749}
23750
23751function describeNativeComponentFrame(fn, construct) {
23752  // If something asked for a stack inside a fake render, it should get ignored.
23753  if (!fn || reentry) {
23754    return '';
23755  }
23756
23757  {
23758    var frame = componentFrameCache.get(fn);
23759
23760    if (frame !== undefined) {
23761      return frame;
23762    }
23763  }
23764
23765  var control;
23766  reentry = true;
23767  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
23768
23769  Error.prepareStackTrace = undefined;
23770  var previousDispatcher;
23771
23772  {
23773    previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
23774    // for warnings.
23775
23776    ReactCurrentDispatcher.current = null;
23777    disableLogs();
23778  }
23779
23780  try {
23781    // This should throw.
23782    if (construct) {
23783      // Something should be setting the props in the constructor.
23784      var Fake = function () {
23785        throw Error();
23786      }; // $FlowFixMe
23787
23788
23789      Object.defineProperty(Fake.prototype, 'props', {
23790        set: function () {
23791          // We use a throwing setter instead of frozen or non-writable props
23792          // because that won't throw in a non-strict mode function.
23793          throw Error();
23794        }
23795      });
23796
23797      if (typeof Reflect === 'object' && Reflect.construct) {
23798        // We construct a different control for this case to include any extra
23799        // frames added by the construct call.
23800        try {
23801          Reflect.construct(Fake, []);
23802        } catch (x) {
23803          control = x;
23804        }
23805
23806        Reflect.construct(fn, [], Fake);
23807      } else {
23808        try {
23809          Fake.call();
23810        } catch (x) {
23811          control = x;
23812        }
23813
23814        fn.call(Fake.prototype);
23815      }
23816    } else {
23817      try {
23818        throw Error();
23819      } catch (x) {
23820        control = x;
23821      }
23822
23823      fn();
23824    }
23825  } catch (sample) {
23826    // This is inlined manually because closure doesn't do it for us.
23827    if (sample && control && typeof sample.stack === 'string') {
23828      // This extracts the first frame from the sample that isn't also in the control.
23829      // Skipping one frame that we assume is the frame that calls the two.
23830      var sampleLines = sample.stack.split('\n');
23831      var controlLines = control.stack.split('\n');
23832      var s = sampleLines.length - 1;
23833      var c = controlLines.length - 1;
23834
23835      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
23836        // We expect at least one stack frame to be shared.
23837        // Typically this will be the root most one. However, stack frames may be
23838        // cut off due to maximum stack limits. In this case, one maybe cut off
23839        // earlier than the other. We assume that the sample is longer or the same
23840        // and there for cut off earlier. So we should find the root most frame in
23841        // the sample somewhere in the control.
23842        c--;
23843      }
23844
23845      for (; s >= 1 && c >= 0; s--, c--) {
23846        // Next we find the first one that isn't the same which should be the
23847        // frame that called our sample function and the control.
23848        if (sampleLines[s] !== controlLines[c]) {
23849          // In V8, the first line is describing the message but other VMs don't.
23850          // If we're about to return the first line, and the control is also on the same
23851          // line, that's a pretty good indicator that our sample threw at same line as
23852          // the control. I.e. before we entered the sample frame. So we ignore this result.
23853          // This can happen if you passed a class to function component, or non-function.
23854          if (s !== 1 || c !== 1) {
23855            do {
23856              s--;
23857              c--; // We may still have similar intermediate frames from the construct call.
23858              // The next one that isn't the same should be our match though.
23859
23860              if (c < 0 || sampleLines[s] !== controlLines[c]) {
23861                // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
23862                var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
23863
23864                {
23865                  if (typeof fn === 'function') {
23866                    componentFrameCache.set(fn, _frame);
23867                  }
23868                } // Return the line we found.
23869
23870
23871                return _frame;
23872              }
23873            } while (s >= 1 && c >= 0);
23874          }
23875
23876          break;
23877        }
23878      }
23879    }
23880  } finally {
23881    reentry = false;
23882
23883    {
23884      ReactCurrentDispatcher.current = previousDispatcher;
23885      reenableLogs();
23886    }
23887
23888    Error.prepareStackTrace = previousPrepareStackTrace;
23889  } // Fallback to just using the name if we couldn't make it throw.
23890
23891
23892  var name = fn ? fn.displayName || fn.name : '';
23893  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
23894
23895  {
23896    if (typeof fn === 'function') {
23897      componentFrameCache.set(fn, syntheticFrame);
23898    }
23899  }
23900
23901  return syntheticFrame;
23902}
23903
23904function describeClassComponentFrame(ctor, source, ownerFn) {
23905  {
23906    return describeNativeComponentFrame(ctor, true);
23907  }
23908}
23909function describeFunctionComponentFrame(fn, source, ownerFn) {
23910  {
23911    return describeNativeComponentFrame(fn, false);
23912  }
23913}
23914
23915function shouldConstruct(Component) {
23916  var prototype = Component.prototype;
23917  return !!(prototype && prototype.isReactComponent);
23918}
23919
23920function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
23921
23922  if (type == null) {
23923    return '';
23924  }
23925
23926  if (typeof type === 'function') {
23927    {
23928      return describeNativeComponentFrame(type, shouldConstruct(type));
23929    }
23930  }
23931
23932  if (typeof type === 'string') {
23933    return describeBuiltInComponentFrame(type);
23934  }
23935
23936  switch (type) {
23937    case REACT_SUSPENSE_TYPE:
23938      return describeBuiltInComponentFrame('Suspense');
23939
23940    case REACT_SUSPENSE_LIST_TYPE:
23941      return describeBuiltInComponentFrame('SuspenseList');
23942  }
23943
23944  if (typeof type === 'object') {
23945    switch (type.$$typeof) {
23946      case REACT_FORWARD_REF_TYPE:
23947        return describeFunctionComponentFrame(type.render);
23948
23949      case REACT_MEMO_TYPE:
23950        // Memo may contain any component type so we recursively resolve it.
23951        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
23952
23953      case REACT_BLOCK_TYPE:
23954        return describeFunctionComponentFrame(type._render);
23955
23956      case REACT_LAZY_TYPE:
23957        {
23958          var lazyComponent = type;
23959          var payload = lazyComponent._payload;
23960          var init = lazyComponent._init;
23961
23962          try {
23963            // Lazy may contain any component type so we recursively resolve it.
23964            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
23965          } catch (x) {}
23966        }
23967    }
23968  }
23969
23970  return '';
23971}
23972
23973function describeFiber(fiber) {
23974  var owner =  fiber._debugOwner ? fiber._debugOwner.type : null ;
23975  var source =  fiber._debugSource ;
23976
23977  switch (fiber.tag) {
23978    case HostComponent:
23979      return describeBuiltInComponentFrame(fiber.type);
23980
23981    case LazyComponent:
23982      return describeBuiltInComponentFrame('Lazy');
23983
23984    case SuspenseComponent:
23985      return describeBuiltInComponentFrame('Suspense');
23986
23987    case SuspenseListComponent:
23988      return describeBuiltInComponentFrame('SuspenseList');
23989
23990    case FunctionComponent:
23991    case IndeterminateComponent:
23992    case SimpleMemoComponent:
23993      return describeFunctionComponentFrame(fiber.type);
23994
23995    case ForwardRef:
23996      return describeFunctionComponentFrame(fiber.type.render);
23997
23998    case Block:
23999      return describeFunctionComponentFrame(fiber.type._render);
24000
24001    case ClassComponent:
24002      return describeClassComponentFrame(fiber.type);
24003
24004    default:
24005      return '';
24006  }
24007}
24008
24009function getStackByFiberInDevAndProd(workInProgress) {
24010  try {
24011    var info = '';
24012    var node = workInProgress;
24013
24014    do {
24015      info += describeFiber(node);
24016      node = node.return;
24017    } while (node);
24018
24019    return info;
24020  } catch (x) {
24021    return '\nError generating stack: ' + x.message + '\n' + x.stack;
24022  }
24023}
24024
24025function getWrappedName(outerType, innerType, wrapperName) {
24026  var functionName = innerType.displayName || innerType.name || '';
24027  return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
24028}
24029
24030function getContextName(type) {
24031  return type.displayName || 'Context';
24032}
24033
24034function getComponentName(type) {
24035  if (type == null) {
24036    // Host root, text node or just invalid type.
24037    return null;
24038  }
24039
24040  {
24041    if (typeof type.tag === 'number') {
24042      error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
24043    }
24044  }
24045
24046  if (typeof type === 'function') {
24047    return type.displayName || type.name || null;
24048  }
24049
24050  if (typeof type === 'string') {
24051    return type;
24052  }
24053
24054  switch (type) {
24055    case REACT_FRAGMENT_TYPE:
24056      return 'Fragment';
24057
24058    case REACT_PORTAL_TYPE:
24059      return 'Portal';
24060
24061    case REACT_PROFILER_TYPE:
24062      return 'Profiler';
24063
24064    case REACT_STRICT_MODE_TYPE:
24065      return 'StrictMode';
24066
24067    case REACT_SUSPENSE_TYPE:
24068      return 'Suspense';
24069
24070    case REACT_SUSPENSE_LIST_TYPE:
24071      return 'SuspenseList';
24072  }
24073
24074  if (typeof type === 'object') {
24075    switch (type.$$typeof) {
24076      case REACT_CONTEXT_TYPE:
24077        var context = type;
24078        return getContextName(context) + '.Consumer';
24079
24080      case REACT_PROVIDER_TYPE:
24081        var provider = type;
24082        return getContextName(provider._context) + '.Provider';
24083
24084      case REACT_FORWARD_REF_TYPE:
24085        return getWrappedName(type, type.render, 'ForwardRef');
24086
24087      case REACT_MEMO_TYPE:
24088        return getComponentName(type.type);
24089
24090      case REACT_BLOCK_TYPE:
24091        return getComponentName(type._render);
24092
24093      case REACT_LAZY_TYPE:
24094        {
24095          var lazyComponent = type;
24096          var payload = lazyComponent._payload;
24097          var init = lazyComponent._init;
24098
24099          try {
24100            return getComponentName(init(payload));
24101          } catch (x) {
24102            return null;
24103          }
24104        }
24105    }
24106  }
24107
24108  return null;
24109}
24110
24111var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
24112var current = null;
24113var isRendering = false;
24114function getCurrentFiberOwnerNameInDevOrNull() {
24115  {
24116    if (current === null) {
24117      return null;
24118    }
24119
24120    var owner = current._debugOwner;
24121
24122    if (owner !== null && typeof owner !== 'undefined') {
24123      return getComponentName(owner.type);
24124    }
24125  }
24126
24127  return null;
24128}
24129
24130function getCurrentFiberStackInDev() {
24131  {
24132    if (current === null) {
24133      return '';
24134    } // Safe because if current fiber exists, we are reconciling,
24135    // and it is guaranteed to be the work-in-progress version.
24136
24137
24138    return getStackByFiberInDevAndProd(current);
24139  }
24140}
24141
24142function resetCurrentFiber() {
24143  {
24144    ReactDebugCurrentFrame.getCurrentStack = null;
24145    current = null;
24146    isRendering = false;
24147  }
24148}
24149function setCurrentFiber(fiber) {
24150  {
24151    ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
24152    current = fiber;
24153    isRendering = false;
24154  }
24155}
24156function setIsRendering(rendering) {
24157  {
24158    isRendering = rendering;
24159  }
24160}
24161function getIsRendering() {
24162  {
24163    return isRendering;
24164  }
24165}
24166
24167// Flow does not allow string concatenation of most non-string types. To work
24168// around this limitation, we use an opaque type that can only be obtained by
24169// passing the value through getToStringValue first.
24170function toString(value) {
24171  return '' + value;
24172}
24173function getToStringValue(value) {
24174  switch (typeof value) {
24175    case 'boolean':
24176    case 'number':
24177    case 'object':
24178    case 'string':
24179    case 'undefined':
24180      return value;
24181
24182    default:
24183      // function, symbol are assigned as empty strings
24184      return '';
24185  }
24186}
24187
24188var hasReadOnlyValue = {
24189  button: true,
24190  checkbox: true,
24191  image: true,
24192  hidden: true,
24193  radio: true,
24194  reset: true,
24195  submit: true
24196};
24197function checkControlledValueProps(tagName, props) {
24198  {
24199    if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
24200      error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
24201    }
24202
24203    if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
24204      error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
24205    }
24206  }
24207}
24208
24209function isCheckable(elem) {
24210  var type = elem.type;
24211  var nodeName = elem.nodeName;
24212  return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
24213}
24214
24215function getTracker(node) {
24216  return node._valueTracker;
24217}
24218
24219function detachTracker(node) {
24220  node._valueTracker = null;
24221}
24222
24223function getValueFromNode(node) {
24224  var value = '';
24225
24226  if (!node) {
24227    return value;
24228  }
24229
24230  if (isCheckable(node)) {
24231    value = node.checked ? 'true' : 'false';
24232  } else {
24233    value = node.value;
24234  }
24235
24236  return value;
24237}
24238
24239function trackValueOnNode(node) {
24240  var valueField = isCheckable(node) ? 'checked' : 'value';
24241  var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
24242  var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail
24243  // and don't track value will cause over reporting of changes,
24244  // but it's better then a hard failure
24245  // (needed for certain tests that spyOn input values and Safari)
24246
24247  if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
24248    return;
24249  }
24250
24251  var get = descriptor.get,
24252      set = descriptor.set;
24253  Object.defineProperty(node, valueField, {
24254    configurable: true,
24255    get: function () {
24256      return get.call(this);
24257    },
24258    set: function (value) {
24259      currentValue = '' + value;
24260      set.call(this, value);
24261    }
24262  }); // We could've passed this the first time
24263  // but it triggers a bug in IE11 and Edge 14/15.
24264  // Calling defineProperty() again should be equivalent.
24265  // https://github.com/facebook/react/issues/11768
24266
24267  Object.defineProperty(node, valueField, {
24268    enumerable: descriptor.enumerable
24269  });
24270  var tracker = {
24271    getValue: function () {
24272      return currentValue;
24273    },
24274    setValue: function (value) {
24275      currentValue = '' + value;
24276    },
24277    stopTracking: function () {
24278      detachTracker(node);
24279      delete node[valueField];
24280    }
24281  };
24282  return tracker;
24283}
24284
24285function track(node) {
24286  if (getTracker(node)) {
24287    return;
24288  } // TODO: Once it's just Fiber we can move this to node._wrapperState
24289
24290
24291  node._valueTracker = trackValueOnNode(node);
24292}
24293function updateValueIfChanged(node) {
24294  if (!node) {
24295    return false;
24296  }
24297
24298  var tracker = getTracker(node); // if there is no tracker at this point it's unlikely
24299  // that trying again will succeed
24300
24301  if (!tracker) {
24302    return true;
24303  }
24304
24305  var lastValue = tracker.getValue();
24306  var nextValue = getValueFromNode(node);
24307
24308  if (nextValue !== lastValue) {
24309    tracker.setValue(nextValue);
24310    return true;
24311  }
24312
24313  return false;
24314}
24315
24316function getActiveElement(doc) {
24317  doc = doc || (typeof document !== 'undefined' ? document : undefined);
24318
24319  if (typeof doc === 'undefined') {
24320    return null;
24321  }
24322
24323  try {
24324    return doc.activeElement || doc.body;
24325  } catch (e) {
24326    return doc.body;
24327  }
24328}
24329
24330var didWarnValueDefaultValue = false;
24331var didWarnCheckedDefaultChecked = false;
24332var didWarnControlledToUncontrolled = false;
24333var didWarnUncontrolledToControlled = false;
24334
24335function isControlled(props) {
24336  var usesChecked = props.type === 'checkbox' || props.type === 'radio';
24337  return usesChecked ? props.checked != null : props.value != null;
24338}
24339/**
24340 * Implements an <input> host component that allows setting these optional
24341 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
24342 *
24343 * If `checked` or `value` are not supplied (or null/undefined), user actions
24344 * that affect the checked state or value will trigger updates to the element.
24345 *
24346 * If they are supplied (and not null/undefined), the rendered element will not
24347 * trigger updates to the element. Instead, the props must change in order for
24348 * the rendered element to be updated.
24349 *
24350 * The rendered element will be initialized as unchecked (or `defaultChecked`)
24351 * with an empty value (or `defaultValue`).
24352 *
24353 * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
24354 */
24355
24356
24357function getHostProps(element, props) {
24358  var node = element;
24359  var checked = props.checked;
24360
24361  var hostProps = _assign({}, props, {
24362    defaultChecked: undefined,
24363    defaultValue: undefined,
24364    value: undefined,
24365    checked: checked != null ? checked : node._wrapperState.initialChecked
24366  });
24367
24368  return hostProps;
24369}
24370function initWrapperState(element, props) {
24371  {
24372    checkControlledValueProps('input', props);
24373
24374    if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
24375      error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
24376
24377      didWarnCheckedDefaultChecked = true;
24378    }
24379
24380    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
24381      error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
24382
24383      didWarnValueDefaultValue = true;
24384    }
24385  }
24386
24387  var node = element;
24388  var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
24389  node._wrapperState = {
24390    initialChecked: props.checked != null ? props.checked : props.defaultChecked,
24391    initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
24392    controlled: isControlled(props)
24393  };
24394}
24395function updateChecked(element, props) {
24396  var node = element;
24397  var checked = props.checked;
24398
24399  if (checked != null) {
24400    setValueForProperty(node, 'checked', checked, false);
24401  }
24402}
24403function updateWrapper(element, props) {
24404  var node = element;
24405
24406  {
24407    var controlled = isControlled(props);
24408
24409    if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
24410      error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
24411
24412      didWarnUncontrolledToControlled = true;
24413    }
24414
24415    if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
24416      error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
24417
24418      didWarnControlledToUncontrolled = true;
24419    }
24420  }
24421
24422  updateChecked(element, props);
24423  var value = getToStringValue(props.value);
24424  var type = props.type;
24425
24426  if (value != null) {
24427    if (type === 'number') {
24428      if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.
24429      // eslint-disable-next-line
24430      node.value != value) {
24431        node.value = toString(value);
24432      }
24433    } else if (node.value !== toString(value)) {
24434      node.value = toString(value);
24435    }
24436  } else if (type === 'submit' || type === 'reset') {
24437    // Submit/reset inputs need the attribute removed completely to avoid
24438    // blank-text buttons.
24439    node.removeAttribute('value');
24440    return;
24441  }
24442
24443  {
24444    // When syncing the value attribute, the value comes from a cascade of
24445    // properties:
24446    //  1. The value React property
24447    //  2. The defaultValue React property
24448    //  3. Otherwise there should be no change
24449    if (props.hasOwnProperty('value')) {
24450      setDefaultValue(node, props.type, value);
24451    } else if (props.hasOwnProperty('defaultValue')) {
24452      setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
24453    }
24454  }
24455
24456  {
24457    // When syncing the checked attribute, it only changes when it needs
24458    // to be removed, such as transitioning from a checkbox into a text input
24459    if (props.checked == null && props.defaultChecked != null) {
24460      node.defaultChecked = !!props.defaultChecked;
24461    }
24462  }
24463}
24464function postMountWrapper(element, props, isHydrating) {
24465  var node = element; // Do not assign value if it is already set. This prevents user text input
24466  // from being lost during SSR hydration.
24467
24468  if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
24469    var type = props.type;
24470    var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the
24471    // default value provided by the browser. See: #12872
24472
24473    if (isButton && (props.value === undefined || props.value === null)) {
24474      return;
24475    }
24476
24477    var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input
24478    // from being lost during SSR hydration.
24479
24480    if (!isHydrating) {
24481      {
24482        // When syncing the value attribute, the value property should use
24483        // the wrapperState._initialValue property. This uses:
24484        //
24485        //   1. The value React property when present
24486        //   2. The defaultValue React property when present
24487        //   3. An empty string
24488        if (initialValue !== node.value) {
24489          node.value = initialValue;
24490        }
24491      }
24492    }
24493
24494    {
24495      // Otherwise, the value attribute is synchronized to the property,
24496      // so we assign defaultValue to the same thing as the value property
24497      // assignment step above.
24498      node.defaultValue = initialValue;
24499    }
24500  } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
24501  // this is needed to work around a chrome bug where setting defaultChecked
24502  // will sometimes influence the value of checked (even after detachment).
24503  // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
24504  // We need to temporarily unset name to avoid disrupting radio button groups.
24505
24506
24507  var name = node.name;
24508
24509  if (name !== '') {
24510    node.name = '';
24511  }
24512
24513  {
24514    // When syncing the checked attribute, both the checked property and
24515    // attribute are assigned at the same time using defaultChecked. This uses:
24516    //
24517    //   1. The checked React property when present
24518    //   2. The defaultChecked React property when present
24519    //   3. Otherwise, false
24520    node.defaultChecked = !node.defaultChecked;
24521    node.defaultChecked = !!node._wrapperState.initialChecked;
24522  }
24523
24524  if (name !== '') {
24525    node.name = name;
24526  }
24527}
24528function restoreControlledState(element, props) {
24529  var node = element;
24530  updateWrapper(node, props);
24531  updateNamedCousins(node, props);
24532}
24533
24534function updateNamedCousins(rootNode, props) {
24535  var name = props.name;
24536
24537  if (props.type === 'radio' && name != null) {
24538    var queryRoot = rootNode;
24539
24540    while (queryRoot.parentNode) {
24541      queryRoot = queryRoot.parentNode;
24542    } // If `rootNode.form` was non-null, then we could try `form.elements`,
24543    // but that sometimes behaves strangely in IE8. We could also try using
24544    // `form.getElementsByName`, but that will only return direct children
24545    // and won't include inputs that use the HTML5 `form=` attribute. Since
24546    // the input might not even be in a form. It might not even be in the
24547    // document. Let's just use the local `querySelectorAll` to ensure we don't
24548    // miss anything.
24549
24550
24551    var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
24552
24553    for (var i = 0; i < group.length; i++) {
24554      var otherNode = group[i];
24555
24556      if (otherNode === rootNode || otherNode.form !== rootNode.form) {
24557        continue;
24558      } // This will throw if radio buttons rendered by different copies of React
24559      // and the same name are rendered into the same form (same as #1939).
24560      // That's probably okay; we don't support it just as we don't support
24561      // mixing React radio buttons with non-React ones.
24562
24563
24564      var otherProps = getFiberCurrentPropsFromNode(otherNode);
24565
24566      if (!otherProps) {
24567        {
24568          throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." );
24569        }
24570      } // We need update the tracked value on the named cousin since the value
24571      // was changed but the input saw no event or value set
24572
24573
24574      updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that
24575      // was previously checked to update will cause it to be come re-checked
24576      // as appropriate.
24577
24578      updateWrapper(otherNode, otherProps);
24579    }
24580  }
24581} // In Chrome, assigning defaultValue to certain input types triggers input validation.
24582// For number inputs, the display value loses trailing decimal points. For email inputs,
24583// Chrome raises "The specified value <x> is not a valid email address".
24584//
24585// Here we check to see if the defaultValue has actually changed, avoiding these problems
24586// when the user is inputting text
24587//
24588// https://github.com/facebook/react/issues/7253
24589
24590
24591function setDefaultValue(node, type, value) {
24592  if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
24593  type !== 'number' || getActiveElement(node.ownerDocument) !== node) {
24594    if (value == null) {
24595      node.defaultValue = toString(node._wrapperState.initialValue);
24596    } else if (node.defaultValue !== toString(value)) {
24597      node.defaultValue = toString(value);
24598    }
24599  }
24600}
24601
24602var didWarnSelectedSetOnOption = false;
24603var didWarnInvalidChild = false;
24604
24605function flattenChildren(children) {
24606  var content = ''; // Flatten children. We'll warn if they are invalid
24607  // during validateProps() which runs for hydration too.
24608  // Note that this would throw on non-element objects.
24609  // Elements are stringified (which is normally irrelevant
24610  // but matters for <fbt>).
24611
24612  React.Children.forEach(children, function (child) {
24613    if (child == null) {
24614      return;
24615    }
24616
24617    content += child; // Note: we don't warn about invalid children here.
24618    // Instead, this is done separately below so that
24619    // it happens during the hydration code path too.
24620  });
24621  return content;
24622}
24623/**
24624 * Implements an <option> host component that warns when `selected` is set.
24625 */
24626
24627
24628function validateProps(element, props) {
24629  {
24630    // This mirrors the code path above, but runs for hydration too.
24631    // Warn about invalid children here so that client and hydration are consistent.
24632    // TODO: this seems like it could cause a DEV-only throw for hydration
24633    // if children contains a non-element object. We should try to avoid that.
24634    if (typeof props.children === 'object' && props.children !== null) {
24635      React.Children.forEach(props.children, function (child) {
24636        if (child == null) {
24637          return;
24638        }
24639
24640        if (typeof child === 'string' || typeof child === 'number') {
24641          return;
24642        }
24643
24644        if (typeof child.type !== 'string') {
24645          return;
24646        }
24647
24648        if (!didWarnInvalidChild) {
24649          didWarnInvalidChild = true;
24650
24651          error('Only strings and numbers are supported as <option> children.');
24652        }
24653      });
24654    } // TODO: Remove support for `selected` in <option>.
24655
24656
24657    if (props.selected != null && !didWarnSelectedSetOnOption) {
24658      error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
24659
24660      didWarnSelectedSetOnOption = true;
24661    }
24662  }
24663}
24664function postMountWrapper$1(element, props) {
24665  // value="" should make a value attribute (#6219)
24666  if (props.value != null) {
24667    element.setAttribute('value', toString(getToStringValue(props.value)));
24668  }
24669}
24670function getHostProps$1(element, props) {
24671  var hostProps = _assign({
24672    children: undefined
24673  }, props);
24674
24675  var content = flattenChildren(props.children);
24676
24677  if (content) {
24678    hostProps.children = content;
24679  }
24680
24681  return hostProps;
24682}
24683
24684var didWarnValueDefaultValue$1;
24685
24686{
24687  didWarnValueDefaultValue$1 = false;
24688}
24689
24690function getDeclarationErrorAddendum() {
24691  var ownerName = getCurrentFiberOwnerNameInDevOrNull();
24692
24693  if (ownerName) {
24694    return '\n\nCheck the render method of `' + ownerName + '`.';
24695  }
24696
24697  return '';
24698}
24699
24700var valuePropNames = ['value', 'defaultValue'];
24701/**
24702 * Validation function for `value` and `defaultValue`.
24703 */
24704
24705function checkSelectPropTypes(props) {
24706  {
24707    checkControlledValueProps('select', props);
24708
24709    for (var i = 0; i < valuePropNames.length; i++) {
24710      var propName = valuePropNames[i];
24711
24712      if (props[propName] == null) {
24713        continue;
24714      }
24715
24716      var isArray = Array.isArray(props[propName]);
24717
24718      if (props.multiple && !isArray) {
24719        error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
24720      } else if (!props.multiple && isArray) {
24721        error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
24722      }
24723    }
24724  }
24725}
24726
24727function updateOptions(node, multiple, propValue, setDefaultSelected) {
24728  var options = node.options;
24729
24730  if (multiple) {
24731    var selectedValues = propValue;
24732    var selectedValue = {};
24733
24734    for (var i = 0; i < selectedValues.length; i++) {
24735      // Prefix to avoid chaos with special keys.
24736      selectedValue['$' + selectedValues[i]] = true;
24737    }
24738
24739    for (var _i = 0; _i < options.length; _i++) {
24740      var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
24741
24742      if (options[_i].selected !== selected) {
24743        options[_i].selected = selected;
24744      }
24745
24746      if (selected && setDefaultSelected) {
24747        options[_i].defaultSelected = true;
24748      }
24749    }
24750  } else {
24751    // Do not set `select.value` as exact behavior isn't consistent across all
24752    // browsers for all cases.
24753    var _selectedValue = toString(getToStringValue(propValue));
24754
24755    var defaultSelected = null;
24756
24757    for (var _i2 = 0; _i2 < options.length; _i2++) {
24758      if (options[_i2].value === _selectedValue) {
24759        options[_i2].selected = true;
24760
24761        if (setDefaultSelected) {
24762          options[_i2].defaultSelected = true;
24763        }
24764
24765        return;
24766      }
24767
24768      if (defaultSelected === null && !options[_i2].disabled) {
24769        defaultSelected = options[_i2];
24770      }
24771    }
24772
24773    if (defaultSelected !== null) {
24774      defaultSelected.selected = true;
24775    }
24776  }
24777}
24778/**
24779 * Implements a <select> host component that allows optionally setting the
24780 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
24781 * stringable. If `multiple` is true, the prop must be an array of stringables.
24782 *
24783 * If `value` is not supplied (or null/undefined), user actions that change the
24784 * selected option will trigger updates to the rendered options.
24785 *
24786 * If it is supplied (and not null/undefined), the rendered options will not
24787 * update in response to user actions. Instead, the `value` prop must change in
24788 * order for the rendered options to update.
24789 *
24790 * If `defaultValue` is provided, any options with the supplied values will be
24791 * selected.
24792 */
24793
24794
24795function getHostProps$2(element, props) {
24796  return _assign({}, props, {
24797    value: undefined
24798  });
24799}
24800function initWrapperState$1(element, props) {
24801  var node = element;
24802
24803  {
24804    checkSelectPropTypes(props);
24805  }
24806
24807  node._wrapperState = {
24808    wasMultiple: !!props.multiple
24809  };
24810
24811  {
24812    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
24813      error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
24814
24815      didWarnValueDefaultValue$1 = true;
24816    }
24817  }
24818}
24819function postMountWrapper$2(element, props) {
24820  var node = element;
24821  node.multiple = !!props.multiple;
24822  var value = props.value;
24823
24824  if (value != null) {
24825    updateOptions(node, !!props.multiple, value, false);
24826  } else if (props.defaultValue != null) {
24827    updateOptions(node, !!props.multiple, props.defaultValue, true);
24828  }
24829}
24830function postUpdateWrapper(element, props) {
24831  var node = element;
24832  var wasMultiple = node._wrapperState.wasMultiple;
24833  node._wrapperState.wasMultiple = !!props.multiple;
24834  var value = props.value;
24835
24836  if (value != null) {
24837    updateOptions(node, !!props.multiple, value, false);
24838  } else if (wasMultiple !== !!props.multiple) {
24839    // For simplicity, reapply `defaultValue` if `multiple` is toggled.
24840    if (props.defaultValue != null) {
24841      updateOptions(node, !!props.multiple, props.defaultValue, true);
24842    } else {
24843      // Revert the select back to its default unselected state.
24844      updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
24845    }
24846  }
24847}
24848function restoreControlledState$1(element, props) {
24849  var node = element;
24850  var value = props.value;
24851
24852  if (value != null) {
24853    updateOptions(node, !!props.multiple, value, false);
24854  }
24855}
24856
24857var didWarnValDefaultVal = false;
24858
24859/**
24860 * Implements a <textarea> host component that allows setting `value`, and
24861 * `defaultValue`. This differs from the traditional DOM API because value is
24862 * usually set as PCDATA children.
24863 *
24864 * If `value` is not supplied (or null/undefined), user actions that affect the
24865 * value will trigger updates to the element.
24866 *
24867 * If `value` is supplied (and not null/undefined), the rendered element will
24868 * not trigger updates to the element. Instead, the `value` prop must change in
24869 * order for the rendered element to be updated.
24870 *
24871 * The rendered element will be initialized with an empty value, the prop
24872 * `defaultValue` if specified, or the children content (deprecated).
24873 */
24874function getHostProps$3(element, props) {
24875  var node = element;
24876
24877  if (!(props.dangerouslySetInnerHTML == null)) {
24878    {
24879      throw Error( "`dangerouslySetInnerHTML` does not make sense on <textarea>." );
24880    }
24881  } // Always set children to the same thing. In IE9, the selection range will
24882  // get reset if `textContent` is mutated.  We could add a check in setTextContent
24883  // to only set the value if/when the value differs from the node value (which would
24884  // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
24885  // solution. The value can be a boolean or object so that's why it's forced
24886  // to be a string.
24887
24888
24889  var hostProps = _assign({}, props, {
24890    value: undefined,
24891    defaultValue: undefined,
24892    children: toString(node._wrapperState.initialValue)
24893  });
24894
24895  return hostProps;
24896}
24897function initWrapperState$2(element, props) {
24898  var node = element;
24899
24900  {
24901    checkControlledValueProps('textarea', props);
24902
24903    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
24904      error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
24905
24906      didWarnValDefaultVal = true;
24907    }
24908  }
24909
24910  var initialValue = props.value; // Only bother fetching default value if we're going to use it
24911
24912  if (initialValue == null) {
24913    var children = props.children,
24914        defaultValue = props.defaultValue;
24915
24916    if (children != null) {
24917      {
24918        error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
24919      }
24920
24921      {
24922        if (!(defaultValue == null)) {
24923          {
24924            throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
24925          }
24926        }
24927
24928        if (Array.isArray(children)) {
24929          if (!(children.length <= 1)) {
24930            {
24931              throw Error( "<textarea> can only have at most one child." );
24932            }
24933          }
24934
24935          children = children[0];
24936        }
24937
24938        defaultValue = children;
24939      }
24940    }
24941
24942    if (defaultValue == null) {
24943      defaultValue = '';
24944    }
24945
24946    initialValue = defaultValue;
24947  }
24948
24949  node._wrapperState = {
24950    initialValue: getToStringValue(initialValue)
24951  };
24952}
24953function updateWrapper$1(element, props) {
24954  var node = element;
24955  var value = getToStringValue(props.value);
24956  var defaultValue = getToStringValue(props.defaultValue);
24957
24958  if (value != null) {
24959    // Cast `value` to a string to ensure the value is set correctly. While
24960    // browsers typically do this as necessary, jsdom doesn't.
24961    var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed
24962
24963    if (newValue !== node.value) {
24964      node.value = newValue;
24965    }
24966
24967    if (props.defaultValue == null && node.defaultValue !== newValue) {
24968      node.defaultValue = newValue;
24969    }
24970  }
24971
24972  if (defaultValue != null) {
24973    node.defaultValue = toString(defaultValue);
24974  }
24975}
24976function postMountWrapper$3(element, props) {
24977  var node = element; // This is in postMount because we need access to the DOM node, which is not
24978  // available until after the component has mounted.
24979
24980  var textContent = node.textContent; // Only set node.value if textContent is equal to the expected
24981  // initial value. In IE10/IE11 there is a bug where the placeholder attribute
24982  // will populate textContent as well.
24983  // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
24984
24985  if (textContent === node._wrapperState.initialValue) {
24986    if (textContent !== '' && textContent !== null) {
24987      node.value = textContent;
24988    }
24989  }
24990}
24991function restoreControlledState$2(element, props) {
24992  // DOM component is still mounted; update
24993  updateWrapper$1(element, props);
24994}
24995
24996var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
24997var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
24998var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
24999var Namespaces = {
25000  html: HTML_NAMESPACE,
25001  mathml: MATH_NAMESPACE,
25002  svg: SVG_NAMESPACE
25003}; // Assumes there is no parent namespace.
25004
25005function getIntrinsicNamespace(type) {
25006  switch (type) {
25007    case 'svg':
25008      return SVG_NAMESPACE;
25009
25010    case 'math':
25011      return MATH_NAMESPACE;
25012
25013    default:
25014      return HTML_NAMESPACE;
25015  }
25016}
25017function getChildNamespace(parentNamespace, type) {
25018  if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
25019    // No (or default) parent namespace: potential entry point.
25020    return getIntrinsicNamespace(type);
25021  }
25022
25023  if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
25024    // We're leaving SVG.
25025    return HTML_NAMESPACE;
25026  } // By default, pass namespace below.
25027
25028
25029  return parentNamespace;
25030}
25031
25032/* globals MSApp */
25033
25034/**
25035 * Create a function which has 'unsafe' privileges (required by windows8 apps)
25036 */
25037var createMicrosoftUnsafeLocalFunction = function (func) {
25038  if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
25039    return function (arg0, arg1, arg2, arg3) {
25040      MSApp.execUnsafeLocalFunction(function () {
25041        return func(arg0, arg1, arg2, arg3);
25042      });
25043    };
25044  } else {
25045    return func;
25046  }
25047};
25048
25049var reusableSVGContainer;
25050/**
25051 * Set the innerHTML property of a node
25052 *
25053 * @param {DOMElement} node
25054 * @param {string} html
25055 * @internal
25056 */
25057
25058var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
25059  if (node.namespaceURI === Namespaces.svg) {
25060
25061    if (!('innerHTML' in node)) {
25062      // IE does not have innerHTML for SVG nodes, so instead we inject the
25063      // new markup in a temp node and then move the child nodes across into
25064      // the target node
25065      reusableSVGContainer = reusableSVGContainer || document.createElement('div');
25066      reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';
25067      var svgNode = reusableSVGContainer.firstChild;
25068
25069      while (node.firstChild) {
25070        node.removeChild(node.firstChild);
25071      }
25072
25073      while (svgNode.firstChild) {
25074        node.appendChild(svgNode.firstChild);
25075      }
25076
25077      return;
25078    }
25079  }
25080
25081  node.innerHTML = html;
25082});
25083
25084/**
25085 * HTML nodeType values that represent the type of the node
25086 */
25087var ELEMENT_NODE = 1;
25088var TEXT_NODE = 3;
25089var COMMENT_NODE = 8;
25090var DOCUMENT_NODE = 9;
25091var DOCUMENT_FRAGMENT_NODE = 11;
25092
25093/**
25094 * Set the textContent property of a node. For text updates, it's faster
25095 * to set the `nodeValue` of the Text node directly instead of using
25096 * `.textContent` which will remove the existing node and create a new one.
25097 *
25098 * @param {DOMElement} node
25099 * @param {string} text
25100 * @internal
25101 */
25102
25103var setTextContent = function (node, text) {
25104  if (text) {
25105    var firstChild = node.firstChild;
25106
25107    if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
25108      firstChild.nodeValue = text;
25109      return;
25110    }
25111  }
25112
25113  node.textContent = text;
25114};
25115
25116// List derived from Gecko source code:
25117// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
25118var shorthandToLonghand = {
25119  animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
25120  background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
25121  backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
25122  border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
25123  borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
25124  borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
25125  borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
25126  borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
25127  borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
25128  borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
25129  borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
25130  borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
25131  borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
25132  borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
25133  borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
25134  borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
25135  borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
25136  columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
25137  columns: ['columnCount', 'columnWidth'],
25138  flex: ['flexBasis', 'flexGrow', 'flexShrink'],
25139  flexFlow: ['flexDirection', 'flexWrap'],
25140  font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
25141  fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
25142  gap: ['columnGap', 'rowGap'],
25143  grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
25144  gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
25145  gridColumn: ['gridColumnEnd', 'gridColumnStart'],
25146  gridColumnGap: ['columnGap'],
25147  gridGap: ['columnGap', 'rowGap'],
25148  gridRow: ['gridRowEnd', 'gridRowStart'],
25149  gridRowGap: ['rowGap'],
25150  gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
25151  listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
25152  margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
25153  marker: ['markerEnd', 'markerMid', 'markerStart'],
25154  mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
25155  maskPosition: ['maskPositionX', 'maskPositionY'],
25156  outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
25157  overflow: ['overflowX', 'overflowY'],
25158  padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
25159  placeContent: ['alignContent', 'justifyContent'],
25160  placeItems: ['alignItems', 'justifyItems'],
25161  placeSelf: ['alignSelf', 'justifySelf'],
25162  textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
25163  textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
25164  transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
25165  wordWrap: ['overflowWrap']
25166};
25167
25168/**
25169 * CSS properties which accept numbers but are not in units of "px".
25170 */
25171var isUnitlessNumber = {
25172  animationIterationCount: true,
25173  borderImageOutset: true,
25174  borderImageSlice: true,
25175  borderImageWidth: true,
25176  boxFlex: true,
25177  boxFlexGroup: true,
25178  boxOrdinalGroup: true,
25179  columnCount: true,
25180  columns: true,
25181  flex: true,
25182  flexGrow: true,
25183  flexPositive: true,
25184  flexShrink: true,
25185  flexNegative: true,
25186  flexOrder: true,
25187  gridArea: true,
25188  gridRow: true,
25189  gridRowEnd: true,
25190  gridRowSpan: true,
25191  gridRowStart: true,
25192  gridColumn: true,
25193  gridColumnEnd: true,
25194  gridColumnSpan: true,
25195  gridColumnStart: true,
25196  fontWeight: true,
25197  lineClamp: true,
25198  lineHeight: true,
25199  opacity: true,
25200  order: true,
25201  orphans: true,
25202  tabSize: true,
25203  widows: true,
25204  zIndex: true,
25205  zoom: true,
25206  // SVG-related properties
25207  fillOpacity: true,
25208  floodOpacity: true,
25209  stopOpacity: true,
25210  strokeDasharray: true,
25211  strokeDashoffset: true,
25212  strokeMiterlimit: true,
25213  strokeOpacity: true,
25214  strokeWidth: true
25215};
25216/**
25217 * @param {string} prefix vendor-specific prefix, eg: Webkit
25218 * @param {string} key style name, eg: transitionDuration
25219 * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
25220 * WebkitTransitionDuration
25221 */
25222
25223function prefixKey(prefix, key) {
25224  return prefix + key.charAt(0).toUpperCase() + key.substring(1);
25225}
25226/**
25227 * Support style names that may come passed in prefixed by adding permutations
25228 * of vendor prefixes.
25229 */
25230
25231
25232var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
25233// infinite loop, because it iterates over the newly added props too.
25234
25235Object.keys(isUnitlessNumber).forEach(function (prop) {
25236  prefixes.forEach(function (prefix) {
25237    isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
25238  });
25239});
25240
25241/**
25242 * Convert a value into the proper css writable value. The style name `name`
25243 * should be logical (no hyphens), as specified
25244 * in `CSSProperty.isUnitlessNumber`.
25245 *
25246 * @param {string} name CSS property name such as `topMargin`.
25247 * @param {*} value CSS property value such as `10px`.
25248 * @return {string} Normalized style value with dimensions applied.
25249 */
25250
25251function dangerousStyleValue(name, value, isCustomProperty) {
25252  // Note that we've removed escapeTextForBrowser() calls here since the
25253  // whole string will be escaped when the attribute is injected into
25254  // the markup. If you provide unsafe user data here they can inject
25255  // arbitrary CSS which may be problematic (I couldn't repro this):
25256  // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
25257  // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
25258  // This is not an XSS hole but instead a potential CSS injection issue
25259  // which has lead to a greater discussion about how we're going to
25260  // trust URLs moving forward. See #2115901
25261  var isEmpty = value == null || typeof value === 'boolean' || value === '';
25262
25263  if (isEmpty) {
25264    return '';
25265  }
25266
25267  if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
25268    return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
25269  }
25270
25271  return ('' + value).trim();
25272}
25273
25274var uppercasePattern = /([A-Z])/g;
25275var msPattern = /^ms-/;
25276/**
25277 * Hyphenates a camelcased CSS property name, for example:
25278 *
25279 *   > hyphenateStyleName('backgroundColor')
25280 *   < "background-color"
25281 *   > hyphenateStyleName('MozTransition')
25282 *   < "-moz-transition"
25283 *   > hyphenateStyleName('msTransition')
25284 *   < "-ms-transition"
25285 *
25286 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
25287 * is converted to `-ms-`.
25288 */
25289
25290function hyphenateStyleName(name) {
25291  return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
25292}
25293
25294var warnValidStyle = function () {};
25295
25296{
25297  // 'msTransform' is correct, but the other prefixes should be capitalized
25298  var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
25299  var msPattern$1 = /^-ms-/;
25300  var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
25301
25302  var badStyleValueWithSemicolonPattern = /;\s*$/;
25303  var warnedStyleNames = {};
25304  var warnedStyleValues = {};
25305  var warnedForNaNValue = false;
25306  var warnedForInfinityValue = false;
25307
25308  var camelize = function (string) {
25309    return string.replace(hyphenPattern, function (_, character) {
25310      return character.toUpperCase();
25311    });
25312  };
25313
25314  var warnHyphenatedStyleName = function (name) {
25315    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
25316      return;
25317    }
25318
25319    warnedStyleNames[name] = true;
25320
25321    error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
25322    // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
25323    // is converted to lowercase `ms`.
25324    camelize(name.replace(msPattern$1, 'ms-')));
25325  };
25326
25327  var warnBadVendoredStyleName = function (name) {
25328    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
25329      return;
25330    }
25331
25332    warnedStyleNames[name] = true;
25333
25334    error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
25335  };
25336
25337  var warnStyleValueWithSemicolon = function (name, value) {
25338    if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
25339      return;
25340    }
25341
25342    warnedStyleValues[value] = true;
25343
25344    error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
25345  };
25346
25347  var warnStyleValueIsNaN = function (name, value) {
25348    if (warnedForNaNValue) {
25349      return;
25350    }
25351
25352    warnedForNaNValue = true;
25353
25354    error('`NaN` is an invalid value for the `%s` css style property.', name);
25355  };
25356
25357  var warnStyleValueIsInfinity = function (name, value) {
25358    if (warnedForInfinityValue) {
25359      return;
25360    }
25361
25362    warnedForInfinityValue = true;
25363
25364    error('`Infinity` is an invalid value for the `%s` css style property.', name);
25365  };
25366
25367  warnValidStyle = function (name, value) {
25368    if (name.indexOf('-') > -1) {
25369      warnHyphenatedStyleName(name);
25370    } else if (badVendoredStyleNamePattern.test(name)) {
25371      warnBadVendoredStyleName(name);
25372    } else if (badStyleValueWithSemicolonPattern.test(value)) {
25373      warnStyleValueWithSemicolon(name, value);
25374    }
25375
25376    if (typeof value === 'number') {
25377      if (isNaN(value)) {
25378        warnStyleValueIsNaN(name, value);
25379      } else if (!isFinite(value)) {
25380        warnStyleValueIsInfinity(name, value);
25381      }
25382    }
25383  };
25384}
25385
25386var warnValidStyle$1 = warnValidStyle;
25387
25388/**
25389 * Operations for dealing with CSS properties.
25390 */
25391
25392/**
25393 * This creates a string that is expected to be equivalent to the style
25394 * attribute generated by server-side rendering. It by-passes warnings and
25395 * security checks so it's not safe to use this value for anything other than
25396 * comparison. It is only used in DEV for SSR validation.
25397 */
25398
25399function createDangerousStringForStyles(styles) {
25400  {
25401    var serialized = '';
25402    var delimiter = '';
25403
25404    for (var styleName in styles) {
25405      if (!styles.hasOwnProperty(styleName)) {
25406        continue;
25407      }
25408
25409      var styleValue = styles[styleName];
25410
25411      if (styleValue != null) {
25412        var isCustomProperty = styleName.indexOf('--') === 0;
25413        serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';
25414        serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
25415        delimiter = ';';
25416      }
25417    }
25418
25419    return serialized || null;
25420  }
25421}
25422/**
25423 * Sets the value for multiple styles on a node.  If a value is specified as
25424 * '' (empty string), the corresponding style property will be unset.
25425 *
25426 * @param {DOMElement} node
25427 * @param {object} styles
25428 */
25429
25430function setValueForStyles(node, styles) {
25431  var style = node.style;
25432
25433  for (var styleName in styles) {
25434    if (!styles.hasOwnProperty(styleName)) {
25435      continue;
25436    }
25437
25438    var isCustomProperty = styleName.indexOf('--') === 0;
25439
25440    {
25441      if (!isCustomProperty) {
25442        warnValidStyle$1(styleName, styles[styleName]);
25443      }
25444    }
25445
25446    var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
25447
25448    if (styleName === 'float') {
25449      styleName = 'cssFloat';
25450    }
25451
25452    if (isCustomProperty) {
25453      style.setProperty(styleName, styleValue);
25454    } else {
25455      style[styleName] = styleValue;
25456    }
25457  }
25458}
25459
25460function isValueEmpty(value) {
25461  return value == null || typeof value === 'boolean' || value === '';
25462}
25463/**
25464 * Given {color: 'red', overflow: 'hidden'} returns {
25465 *   color: 'color',
25466 *   overflowX: 'overflow',
25467 *   overflowY: 'overflow',
25468 * }. This can be read as "the overflowY property was set by the overflow
25469 * shorthand". That is, the values are the property that each was derived from.
25470 */
25471
25472
25473function expandShorthandMap(styles) {
25474  var expanded = {};
25475
25476  for (var key in styles) {
25477    var longhands = shorthandToLonghand[key] || [key];
25478
25479    for (var i = 0; i < longhands.length; i++) {
25480      expanded[longhands[i]] = key;
25481    }
25482  }
25483
25484  return expanded;
25485}
25486/**
25487 * When mixing shorthand and longhand property names, we warn during updates if
25488 * we expect an incorrect result to occur. In particular, we warn for:
25489 *
25490 * Updating a shorthand property (longhand gets overwritten):
25491 *   {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
25492 *   becomes .style.font = 'baz'
25493 * Removing a shorthand property (longhand gets lost too):
25494 *   {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
25495 *   becomes .style.font = ''
25496 * Removing a longhand property (should revert to shorthand; doesn't):
25497 *   {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
25498 *   becomes .style.fontVariant = ''
25499 */
25500
25501
25502function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
25503  {
25504    if (!nextStyles) {
25505      return;
25506    }
25507
25508    var expandedUpdates = expandShorthandMap(styleUpdates);
25509    var expandedStyles = expandShorthandMap(nextStyles);
25510    var warnedAbout = {};
25511
25512    for (var key in expandedUpdates) {
25513      var originalKey = expandedUpdates[key];
25514      var correctOriginalKey = expandedStyles[key];
25515
25516      if (correctOriginalKey && originalKey !== correctOriginalKey) {
25517        var warningKey = originalKey + ',' + correctOriginalKey;
25518
25519        if (warnedAbout[warningKey]) {
25520          continue;
25521        }
25522
25523        warnedAbout[warningKey] = true;
25524
25525        error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
25526      }
25527    }
25528  }
25529}
25530
25531// For HTML, certain tags should omit their close tag. We keep a list for
25532// those special-case tags.
25533var omittedCloseTags = {
25534  area: true,
25535  base: true,
25536  br: true,
25537  col: true,
25538  embed: true,
25539  hr: true,
25540  img: true,
25541  input: true,
25542  keygen: true,
25543  link: true,
25544  meta: true,
25545  param: true,
25546  source: true,
25547  track: true,
25548  wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
25549
25550};
25551
25552// `omittedCloseTags` except that `menuitem` should still have its closing tag.
25553
25554var voidElementTags = _assign({
25555  menuitem: true
25556}, omittedCloseTags);
25557
25558var HTML = '__html';
25559
25560function assertValidProps(tag, props) {
25561  if (!props) {
25562    return;
25563  } // Note the use of `==` which checks for null or undefined.
25564
25565
25566  if (voidElementTags[tag]) {
25567    if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
25568      {
25569        throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
25570      }
25571    }
25572  }
25573
25574  if (props.dangerouslySetInnerHTML != null) {
25575    if (!(props.children == null)) {
25576      {
25577        throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
25578      }
25579    }
25580
25581    if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
25582      {
25583        throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
25584      }
25585    }
25586  }
25587
25588  {
25589    if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
25590      error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');
25591    }
25592  }
25593
25594  if (!(props.style == null || typeof props.style === 'object')) {
25595    {
25596      throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
25597    }
25598  }
25599}
25600
25601function isCustomComponent(tagName, props) {
25602  if (tagName.indexOf('-') === -1) {
25603    return typeof props.is === 'string';
25604  }
25605
25606  switch (tagName) {
25607    // These are reserved SVG and MathML elements.
25608    // We don't mind this list too much because we expect it to never grow.
25609    // The alternative is to track the namespace in a few places which is convoluted.
25610    // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
25611    case 'annotation-xml':
25612    case 'color-profile':
25613    case 'font-face':
25614    case 'font-face-src':
25615    case 'font-face-uri':
25616    case 'font-face-format':
25617    case 'font-face-name':
25618    case 'missing-glyph':
25619      return false;
25620
25621    default:
25622      return true;
25623  }
25624}
25625
25626// When adding attributes to the HTML or SVG allowed attribute list, be sure to
25627// also add them to this module to ensure casing and incorrect name
25628// warnings.
25629var possibleStandardNames = {
25630  // HTML
25631  accept: 'accept',
25632  acceptcharset: 'acceptCharset',
25633  'accept-charset': 'acceptCharset',
25634  accesskey: 'accessKey',
25635  action: 'action',
25636  allowfullscreen: 'allowFullScreen',
25637  alt: 'alt',
25638  as: 'as',
25639  async: 'async',
25640  autocapitalize: 'autoCapitalize',
25641  autocomplete: 'autoComplete',
25642  autocorrect: 'autoCorrect',
25643  autofocus: 'autoFocus',
25644  autoplay: 'autoPlay',
25645  autosave: 'autoSave',
25646  capture: 'capture',
25647  cellpadding: 'cellPadding',
25648  cellspacing: 'cellSpacing',
25649  challenge: 'challenge',
25650  charset: 'charSet',
25651  checked: 'checked',
25652  children: 'children',
25653  cite: 'cite',
25654  class: 'className',
25655  classid: 'classID',
25656  classname: 'className',
25657  cols: 'cols',
25658  colspan: 'colSpan',
25659  content: 'content',
25660  contenteditable: 'contentEditable',
25661  contextmenu: 'contextMenu',
25662  controls: 'controls',
25663  controlslist: 'controlsList',
25664  coords: 'coords',
25665  crossorigin: 'crossOrigin',
25666  dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
25667  data: 'data',
25668  datetime: 'dateTime',
25669  default: 'default',
25670  defaultchecked: 'defaultChecked',
25671  defaultvalue: 'defaultValue',
25672  defer: 'defer',
25673  dir: 'dir',
25674  disabled: 'disabled',
25675  disablepictureinpicture: 'disablePictureInPicture',
25676  disableremoteplayback: 'disableRemotePlayback',
25677  download: 'download',
25678  draggable: 'draggable',
25679  enctype: 'encType',
25680  enterkeyhint: 'enterKeyHint',
25681  for: 'htmlFor',
25682  form: 'form',
25683  formmethod: 'formMethod',
25684  formaction: 'formAction',
25685  formenctype: 'formEncType',
25686  formnovalidate: 'formNoValidate',
25687  formtarget: 'formTarget',
25688  frameborder: 'frameBorder',
25689  headers: 'headers',
25690  height: 'height',
25691  hidden: 'hidden',
25692  high: 'high',
25693  href: 'href',
25694  hreflang: 'hrefLang',
25695  htmlfor: 'htmlFor',
25696  httpequiv: 'httpEquiv',
25697  'http-equiv': 'httpEquiv',
25698  icon: 'icon',
25699  id: 'id',
25700  innerhtml: 'innerHTML',
25701  inputmode: 'inputMode',
25702  integrity: 'integrity',
25703  is: 'is',
25704  itemid: 'itemID',
25705  itemprop: 'itemProp',
25706  itemref: 'itemRef',
25707  itemscope: 'itemScope',
25708  itemtype: 'itemType',
25709  keyparams: 'keyParams',
25710  keytype: 'keyType',
25711  kind: 'kind',
25712  label: 'label',
25713  lang: 'lang',
25714  list: 'list',
25715  loop: 'loop',
25716  low: 'low',
25717  manifest: 'manifest',
25718  marginwidth: 'marginWidth',
25719  marginheight: 'marginHeight',
25720  max: 'max',
25721  maxlength: 'maxLength',
25722  media: 'media',
25723  mediagroup: 'mediaGroup',
25724  method: 'method',
25725  min: 'min',
25726  minlength: 'minLength',
25727  multiple: 'multiple',
25728  muted: 'muted',
25729  name: 'name',
25730  nomodule: 'noModule',
25731  nonce: 'nonce',
25732  novalidate: 'noValidate',
25733  open: 'open',
25734  optimum: 'optimum',
25735  pattern: 'pattern',
25736  placeholder: 'placeholder',
25737  playsinline: 'playsInline',
25738  poster: 'poster',
25739  preload: 'preload',
25740  profile: 'profile',
25741  radiogroup: 'radioGroup',
25742  readonly: 'readOnly',
25743  referrerpolicy: 'referrerPolicy',
25744  rel: 'rel',
25745  required: 'required',
25746  reversed: 'reversed',
25747  role: 'role',
25748  rows: 'rows',
25749  rowspan: 'rowSpan',
25750  sandbox: 'sandbox',
25751  scope: 'scope',
25752  scoped: 'scoped',
25753  scrolling: 'scrolling',
25754  seamless: 'seamless',
25755  selected: 'selected',
25756  shape: 'shape',
25757  size: 'size',
25758  sizes: 'sizes',
25759  span: 'span',
25760  spellcheck: 'spellCheck',
25761  src: 'src',
25762  srcdoc: 'srcDoc',
25763  srclang: 'srcLang',
25764  srcset: 'srcSet',
25765  start: 'start',
25766  step: 'step',
25767  style: 'style',
25768  summary: 'summary',
25769  tabindex: 'tabIndex',
25770  target: 'target',
25771  title: 'title',
25772  type: 'type',
25773  usemap: 'useMap',
25774  value: 'value',
25775  width: 'width',
25776  wmode: 'wmode',
25777  wrap: 'wrap',
25778  // SVG
25779  about: 'about',
25780  accentheight: 'accentHeight',
25781  'accent-height': 'accentHeight',
25782  accumulate: 'accumulate',
25783  additive: 'additive',
25784  alignmentbaseline: 'alignmentBaseline',
25785  'alignment-baseline': 'alignmentBaseline',
25786  allowreorder: 'allowReorder',
25787  alphabetic: 'alphabetic',
25788  amplitude: 'amplitude',
25789  arabicform: 'arabicForm',
25790  'arabic-form': 'arabicForm',
25791  ascent: 'ascent',
25792  attributename: 'attributeName',
25793  attributetype: 'attributeType',
25794  autoreverse: 'autoReverse',
25795  azimuth: 'azimuth',
25796  basefrequency: 'baseFrequency',
25797  baselineshift: 'baselineShift',
25798  'baseline-shift': 'baselineShift',
25799  baseprofile: 'baseProfile',
25800  bbox: 'bbox',
25801  begin: 'begin',
25802  bias: 'bias',
25803  by: 'by',
25804  calcmode: 'calcMode',
25805  capheight: 'capHeight',
25806  'cap-height': 'capHeight',
25807  clip: 'clip',
25808  clippath: 'clipPath',
25809  'clip-path': 'clipPath',
25810  clippathunits: 'clipPathUnits',
25811  cliprule: 'clipRule',
25812  'clip-rule': 'clipRule',
25813  color: 'color',
25814  colorinterpolation: 'colorInterpolation',
25815  'color-interpolation': 'colorInterpolation',
25816  colorinterpolationfilters: 'colorInterpolationFilters',
25817  'color-interpolation-filters': 'colorInterpolationFilters',
25818  colorprofile: 'colorProfile',
25819  'color-profile': 'colorProfile',
25820  colorrendering: 'colorRendering',
25821  'color-rendering': 'colorRendering',
25822  contentscripttype: 'contentScriptType',
25823  contentstyletype: 'contentStyleType',
25824  cursor: 'cursor',
25825  cx: 'cx',
25826  cy: 'cy',
25827  d: 'd',
25828  datatype: 'datatype',
25829  decelerate: 'decelerate',
25830  descent: 'descent',
25831  diffuseconstant: 'diffuseConstant',
25832  direction: 'direction',
25833  display: 'display',
25834  divisor: 'divisor',
25835  dominantbaseline: 'dominantBaseline',
25836  'dominant-baseline': 'dominantBaseline',
25837  dur: 'dur',
25838  dx: 'dx',
25839  dy: 'dy',
25840  edgemode: 'edgeMode',
25841  elevation: 'elevation',
25842  enablebackground: 'enableBackground',
25843  'enable-background': 'enableBackground',
25844  end: 'end',
25845  exponent: 'exponent',
25846  externalresourcesrequired: 'externalResourcesRequired',
25847  fill: 'fill',
25848  fillopacity: 'fillOpacity',
25849  'fill-opacity': 'fillOpacity',
25850  fillrule: 'fillRule',
25851  'fill-rule': 'fillRule',
25852  filter: 'filter',
25853  filterres: 'filterRes',
25854  filterunits: 'filterUnits',
25855  floodopacity: 'floodOpacity',
25856  'flood-opacity': 'floodOpacity',
25857  floodcolor: 'floodColor',
25858  'flood-color': 'floodColor',
25859  focusable: 'focusable',
25860  fontfamily: 'fontFamily',
25861  'font-family': 'fontFamily',
25862  fontsize: 'fontSize',
25863  'font-size': 'fontSize',
25864  fontsizeadjust: 'fontSizeAdjust',
25865  'font-size-adjust': 'fontSizeAdjust',
25866  fontstretch: 'fontStretch',
25867  'font-stretch': 'fontStretch',
25868  fontstyle: 'fontStyle',
25869  'font-style': 'fontStyle',
25870  fontvariant: 'fontVariant',
25871  'font-variant': 'fontVariant',
25872  fontweight: 'fontWeight',
25873  'font-weight': 'fontWeight',
25874  format: 'format',
25875  from: 'from',
25876  fx: 'fx',
25877  fy: 'fy',
25878  g1: 'g1',
25879  g2: 'g2',
25880  glyphname: 'glyphName',
25881  'glyph-name': 'glyphName',
25882  glyphorientationhorizontal: 'glyphOrientationHorizontal',
25883  'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
25884  glyphorientationvertical: 'glyphOrientationVertical',
25885  'glyph-orientation-vertical': 'glyphOrientationVertical',
25886  glyphref: 'glyphRef',
25887  gradienttransform: 'gradientTransform',
25888  gradientunits: 'gradientUnits',
25889  hanging: 'hanging',
25890  horizadvx: 'horizAdvX',
25891  'horiz-adv-x': 'horizAdvX',
25892  horizoriginx: 'horizOriginX',
25893  'horiz-origin-x': 'horizOriginX',
25894  ideographic: 'ideographic',
25895  imagerendering: 'imageRendering',
25896  'image-rendering': 'imageRendering',
25897  in2: 'in2',
25898  in: 'in',
25899  inlist: 'inlist',
25900  intercept: 'intercept',
25901  k1: 'k1',
25902  k2: 'k2',
25903  k3: 'k3',
25904  k4: 'k4',
25905  k: 'k',
25906  kernelmatrix: 'kernelMatrix',
25907  kernelunitlength: 'kernelUnitLength',
25908  kerning: 'kerning',
25909  keypoints: 'keyPoints',
25910  keysplines: 'keySplines',
25911  keytimes: 'keyTimes',
25912  lengthadjust: 'lengthAdjust',
25913  letterspacing: 'letterSpacing',
25914  'letter-spacing': 'letterSpacing',
25915  lightingcolor: 'lightingColor',
25916  'lighting-color': 'lightingColor',
25917  limitingconeangle: 'limitingConeAngle',
25918  local: 'local',
25919  markerend: 'markerEnd',
25920  'marker-end': 'markerEnd',
25921  markerheight: 'markerHeight',
25922  markermid: 'markerMid',
25923  'marker-mid': 'markerMid',
25924  markerstart: 'markerStart',
25925  'marker-start': 'markerStart',
25926  markerunits: 'markerUnits',
25927  markerwidth: 'markerWidth',
25928  mask: 'mask',
25929  maskcontentunits: 'maskContentUnits',
25930  maskunits: 'maskUnits',
25931  mathematical: 'mathematical',
25932  mode: 'mode',
25933  numoctaves: 'numOctaves',
25934  offset: 'offset',
25935  opacity: 'opacity',
25936  operator: 'operator',
25937  order: 'order',
25938  orient: 'orient',
25939  orientation: 'orientation',
25940  origin: 'origin',
25941  overflow: 'overflow',
25942  overlineposition: 'overlinePosition',
25943  'overline-position': 'overlinePosition',
25944  overlinethickness: 'overlineThickness',
25945  'overline-thickness': 'overlineThickness',
25946  paintorder: 'paintOrder',
25947  'paint-order': 'paintOrder',
25948  panose1: 'panose1',
25949  'panose-1': 'panose1',
25950  pathlength: 'pathLength',
25951  patterncontentunits: 'patternContentUnits',
25952  patterntransform: 'patternTransform',
25953  patternunits: 'patternUnits',
25954  pointerevents: 'pointerEvents',
25955  'pointer-events': 'pointerEvents',
25956  points: 'points',
25957  pointsatx: 'pointsAtX',
25958  pointsaty: 'pointsAtY',
25959  pointsatz: 'pointsAtZ',
25960  prefix: 'prefix',
25961  preservealpha: 'preserveAlpha',
25962  preserveaspectratio: 'preserveAspectRatio',
25963  primitiveunits: 'primitiveUnits',
25964  property: 'property',
25965  r: 'r',
25966  radius: 'radius',
25967  refx: 'refX',
25968  refy: 'refY',
25969  renderingintent: 'renderingIntent',
25970  'rendering-intent': 'renderingIntent',
25971  repeatcount: 'repeatCount',
25972  repeatdur: 'repeatDur',
25973  requiredextensions: 'requiredExtensions',
25974  requiredfeatures: 'requiredFeatures',
25975  resource: 'resource',
25976  restart: 'restart',
25977  result: 'result',
25978  results: 'results',
25979  rotate: 'rotate',
25980  rx: 'rx',
25981  ry: 'ry',
25982  scale: 'scale',
25983  security: 'security',
25984  seed: 'seed',
25985  shaperendering: 'shapeRendering',
25986  'shape-rendering': 'shapeRendering',
25987  slope: 'slope',
25988  spacing: 'spacing',
25989  specularconstant: 'specularConstant',
25990  specularexponent: 'specularExponent',
25991  speed: 'speed',
25992  spreadmethod: 'spreadMethod',
25993  startoffset: 'startOffset',
25994  stddeviation: 'stdDeviation',
25995  stemh: 'stemh',
25996  stemv: 'stemv',
25997  stitchtiles: 'stitchTiles',
25998  stopcolor: 'stopColor',
25999  'stop-color': 'stopColor',
26000  stopopacity: 'stopOpacity',
26001  'stop-opacity': 'stopOpacity',
26002  strikethroughposition: 'strikethroughPosition',
26003  'strikethrough-position': 'strikethroughPosition',
26004  strikethroughthickness: 'strikethroughThickness',
26005  'strikethrough-thickness': 'strikethroughThickness',
26006  string: 'string',
26007  stroke: 'stroke',
26008  strokedasharray: 'strokeDasharray',
26009  'stroke-dasharray': 'strokeDasharray',
26010  strokedashoffset: 'strokeDashoffset',
26011  'stroke-dashoffset': 'strokeDashoffset',
26012  strokelinecap: 'strokeLinecap',
26013  'stroke-linecap': 'strokeLinecap',
26014  strokelinejoin: 'strokeLinejoin',
26015  'stroke-linejoin': 'strokeLinejoin',
26016  strokemiterlimit: 'strokeMiterlimit',
26017  'stroke-miterlimit': 'strokeMiterlimit',
26018  strokewidth: 'strokeWidth',
26019  'stroke-width': 'strokeWidth',
26020  strokeopacity: 'strokeOpacity',
26021  'stroke-opacity': 'strokeOpacity',
26022  suppresscontenteditablewarning: 'suppressContentEditableWarning',
26023  suppresshydrationwarning: 'suppressHydrationWarning',
26024  surfacescale: 'surfaceScale',
26025  systemlanguage: 'systemLanguage',
26026  tablevalues: 'tableValues',
26027  targetx: 'targetX',
26028  targety: 'targetY',
26029  textanchor: 'textAnchor',
26030  'text-anchor': 'textAnchor',
26031  textdecoration: 'textDecoration',
26032  'text-decoration': 'textDecoration',
26033  textlength: 'textLength',
26034  textrendering: 'textRendering',
26035  'text-rendering': 'textRendering',
26036  to: 'to',
26037  transform: 'transform',
26038  typeof: 'typeof',
26039  u1: 'u1',
26040  u2: 'u2',
26041  underlineposition: 'underlinePosition',
26042  'underline-position': 'underlinePosition',
26043  underlinethickness: 'underlineThickness',
26044  'underline-thickness': 'underlineThickness',
26045  unicode: 'unicode',
26046  unicodebidi: 'unicodeBidi',
26047  'unicode-bidi': 'unicodeBidi',
26048  unicoderange: 'unicodeRange',
26049  'unicode-range': 'unicodeRange',
26050  unitsperem: 'unitsPerEm',
26051  'units-per-em': 'unitsPerEm',
26052  unselectable: 'unselectable',
26053  valphabetic: 'vAlphabetic',
26054  'v-alphabetic': 'vAlphabetic',
26055  values: 'values',
26056  vectoreffect: 'vectorEffect',
26057  'vector-effect': 'vectorEffect',
26058  version: 'version',
26059  vertadvy: 'vertAdvY',
26060  'vert-adv-y': 'vertAdvY',
26061  vertoriginx: 'vertOriginX',
26062  'vert-origin-x': 'vertOriginX',
26063  vertoriginy: 'vertOriginY',
26064  'vert-origin-y': 'vertOriginY',
26065  vhanging: 'vHanging',
26066  'v-hanging': 'vHanging',
26067  videographic: 'vIdeographic',
26068  'v-ideographic': 'vIdeographic',
26069  viewbox: 'viewBox',
26070  viewtarget: 'viewTarget',
26071  visibility: 'visibility',
26072  vmathematical: 'vMathematical',
26073  'v-mathematical': 'vMathematical',
26074  vocab: 'vocab',
26075  widths: 'widths',
26076  wordspacing: 'wordSpacing',
26077  'word-spacing': 'wordSpacing',
26078  writingmode: 'writingMode',
26079  'writing-mode': 'writingMode',
26080  x1: 'x1',
26081  x2: 'x2',
26082  x: 'x',
26083  xchannelselector: 'xChannelSelector',
26084  xheight: 'xHeight',
26085  'x-height': 'xHeight',
26086  xlinkactuate: 'xlinkActuate',
26087  'xlink:actuate': 'xlinkActuate',
26088  xlinkarcrole: 'xlinkArcrole',
26089  'xlink:arcrole': 'xlinkArcrole',
26090  xlinkhref: 'xlinkHref',
26091  'xlink:href': 'xlinkHref',
26092  xlinkrole: 'xlinkRole',
26093  'xlink:role': 'xlinkRole',
26094  xlinkshow: 'xlinkShow',
26095  'xlink:show': 'xlinkShow',
26096  xlinktitle: 'xlinkTitle',
26097  'xlink:title': 'xlinkTitle',
26098  xlinktype: 'xlinkType',
26099  'xlink:type': 'xlinkType',
26100  xmlbase: 'xmlBase',
26101  'xml:base': 'xmlBase',
26102  xmllang: 'xmlLang',
26103  'xml:lang': 'xmlLang',
26104  xmlns: 'xmlns',
26105  'xml:space': 'xmlSpace',
26106  xmlnsxlink: 'xmlnsXlink',
26107  'xmlns:xlink': 'xmlnsXlink',
26108  xmlspace: 'xmlSpace',
26109  y1: 'y1',
26110  y2: 'y2',
26111  y: 'y',
26112  ychannelselector: 'yChannelSelector',
26113  z: 'z',
26114  zoomandpan: 'zoomAndPan'
26115};
26116
26117var ariaProperties = {
26118  'aria-current': 0,
26119  // state
26120  'aria-details': 0,
26121  'aria-disabled': 0,
26122  // state
26123  'aria-hidden': 0,
26124  // state
26125  'aria-invalid': 0,
26126  // state
26127  'aria-keyshortcuts': 0,
26128  'aria-label': 0,
26129  'aria-roledescription': 0,
26130  // Widget Attributes
26131  'aria-autocomplete': 0,
26132  'aria-checked': 0,
26133  'aria-expanded': 0,
26134  'aria-haspopup': 0,
26135  'aria-level': 0,
26136  'aria-modal': 0,
26137  'aria-multiline': 0,
26138  'aria-multiselectable': 0,
26139  'aria-orientation': 0,
26140  'aria-placeholder': 0,
26141  'aria-pressed': 0,
26142  'aria-readonly': 0,
26143  'aria-required': 0,
26144  'aria-selected': 0,
26145  'aria-sort': 0,
26146  'aria-valuemax': 0,
26147  'aria-valuemin': 0,
26148  'aria-valuenow': 0,
26149  'aria-valuetext': 0,
26150  // Live Region Attributes
26151  'aria-atomic': 0,
26152  'aria-busy': 0,
26153  'aria-live': 0,
26154  'aria-relevant': 0,
26155  // Drag-and-Drop Attributes
26156  'aria-dropeffect': 0,
26157  'aria-grabbed': 0,
26158  // Relationship Attributes
26159  'aria-activedescendant': 0,
26160  'aria-colcount': 0,
26161  'aria-colindex': 0,
26162  'aria-colspan': 0,
26163  'aria-controls': 0,
26164  'aria-describedby': 0,
26165  'aria-errormessage': 0,
26166  'aria-flowto': 0,
26167  'aria-labelledby': 0,
26168  'aria-owns': 0,
26169  'aria-posinset': 0,
26170  'aria-rowcount': 0,
26171  'aria-rowindex': 0,
26172  'aria-rowspan': 0,
26173  'aria-setsize': 0
26174};
26175
26176var warnedProperties = {};
26177var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
26178var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
26179var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
26180
26181function validateProperty(tagName, name) {
26182  {
26183    if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
26184      return true;
26185    }
26186
26187    if (rARIACamel.test(name)) {
26188      var ariaName = 'aria-' + name.slice(4).toLowerCase();
26189      var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
26190      // DOM properties, then it is an invalid aria-* attribute.
26191
26192      if (correctName == null) {
26193        error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
26194
26195        warnedProperties[name] = true;
26196        return true;
26197      } // aria-* attributes should be lowercase; suggest the lowercase version.
26198
26199
26200      if (name !== correctName) {
26201        error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
26202
26203        warnedProperties[name] = true;
26204        return true;
26205      }
26206    }
26207
26208    if (rARIA.test(name)) {
26209      var lowerCasedName = name.toLowerCase();
26210      var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
26211      // DOM properties, then it is an invalid aria-* attribute.
26212
26213      if (standardName == null) {
26214        warnedProperties[name] = true;
26215        return false;
26216      } // aria-* attributes should be lowercase; suggest the lowercase version.
26217
26218
26219      if (name !== standardName) {
26220        error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
26221
26222        warnedProperties[name] = true;
26223        return true;
26224      }
26225    }
26226  }
26227
26228  return true;
26229}
26230
26231function warnInvalidARIAProps(type, props) {
26232  {
26233    var invalidProps = [];
26234
26235    for (var key in props) {
26236      var isValid = validateProperty(type, key);
26237
26238      if (!isValid) {
26239        invalidProps.push(key);
26240      }
26241    }
26242
26243    var unknownPropString = invalidProps.map(function (prop) {
26244      return '`' + prop + '`';
26245    }).join(', ');
26246
26247    if (invalidProps.length === 1) {
26248      error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
26249    } else if (invalidProps.length > 1) {
26250      error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
26251    }
26252  }
26253}
26254
26255function validateProperties(type, props) {
26256  if (isCustomComponent(type, props)) {
26257    return;
26258  }
26259
26260  warnInvalidARIAProps(type, props);
26261}
26262
26263var didWarnValueNull = false;
26264function validateProperties$1(type, props) {
26265  {
26266    if (type !== 'input' && type !== 'textarea' && type !== 'select') {
26267      return;
26268    }
26269
26270    if (props != null && props.value === null && !didWarnValueNull) {
26271      didWarnValueNull = true;
26272
26273      if (type === 'select' && props.multiple) {
26274        error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
26275      } else {
26276        error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
26277      }
26278    }
26279  }
26280}
26281
26282var validateProperty$1 = function () {};
26283
26284{
26285  var warnedProperties$1 = {};
26286  var _hasOwnProperty = Object.prototype.hasOwnProperty;
26287  var EVENT_NAME_REGEX = /^on./;
26288  var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
26289  var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
26290  var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
26291
26292  validateProperty$1 = function (tagName, name, value, eventRegistry) {
26293    if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
26294      return true;
26295    }
26296
26297    var lowerCasedName = name.toLowerCase();
26298
26299    if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
26300      error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
26301
26302      warnedProperties$1[name] = true;
26303      return true;
26304    } // We can't rely on the event system being injected on the server.
26305
26306
26307    if (eventRegistry != null) {
26308      var registrationNameDependencies = eventRegistry.registrationNameDependencies,
26309          possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
26310
26311      if (registrationNameDependencies.hasOwnProperty(name)) {
26312        return true;
26313      }
26314
26315      var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
26316
26317      if (registrationName != null) {
26318        error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
26319
26320        warnedProperties$1[name] = true;
26321        return true;
26322      }
26323
26324      if (EVENT_NAME_REGEX.test(name)) {
26325        error('Unknown event handler property `%s`. It will be ignored.', name);
26326
26327        warnedProperties$1[name] = true;
26328        return true;
26329      }
26330    } else if (EVENT_NAME_REGEX.test(name)) {
26331      // If no event plugins have been injected, we are in a server environment.
26332      // So we can't tell if the event name is correct for sure, but we can filter
26333      // out known bad ones like `onclick`. We can't suggest a specific replacement though.
26334      if (INVALID_EVENT_NAME_REGEX.test(name)) {
26335        error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
26336      }
26337
26338      warnedProperties$1[name] = true;
26339      return true;
26340    } // Let the ARIA attribute hook validate ARIA attributes
26341
26342
26343    if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
26344      return true;
26345    }
26346
26347    if (lowerCasedName === 'innerhtml') {
26348      error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
26349
26350      warnedProperties$1[name] = true;
26351      return true;
26352    }
26353
26354    if (lowerCasedName === 'aria') {
26355      error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
26356
26357      warnedProperties$1[name] = true;
26358      return true;
26359    }
26360
26361    if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
26362      error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
26363
26364      warnedProperties$1[name] = true;
26365      return true;
26366    }
26367
26368    if (typeof value === 'number' && isNaN(value)) {
26369      error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
26370
26371      warnedProperties$1[name] = true;
26372      return true;
26373    }
26374
26375    var propertyInfo = getPropertyInfo(name);
26376    var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
26377
26378    if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
26379      var standardName = possibleStandardNames[lowerCasedName];
26380
26381      if (standardName !== name) {
26382        error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
26383
26384        warnedProperties$1[name] = true;
26385        return true;
26386      }
26387    } else if (!isReserved && name !== lowerCasedName) {
26388      // Unknown attributes should have lowercase casing since that's how they
26389      // will be cased anyway with server rendering.
26390      error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
26391
26392      warnedProperties$1[name] = true;
26393      return true;
26394    }
26395
26396    if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
26397      if (value) {
26398        error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
26399      } else {
26400        error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
26401      }
26402
26403      warnedProperties$1[name] = true;
26404      return true;
26405    } // Now that we've validated casing, do not validate
26406    // data types for reserved props
26407
26408
26409    if (isReserved) {
26410      return true;
26411    } // Warn when a known attribute is a bad type
26412
26413
26414    if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
26415      warnedProperties$1[name] = true;
26416      return false;
26417    } // Warn when passing the strings 'false' or 'true' into a boolean prop
26418
26419
26420    if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
26421      error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
26422
26423      warnedProperties$1[name] = true;
26424      return true;
26425    }
26426
26427    return true;
26428  };
26429}
26430
26431var warnUnknownProperties = function (type, props, eventRegistry) {
26432  {
26433    var unknownProps = [];
26434
26435    for (var key in props) {
26436      var isValid = validateProperty$1(type, key, props[key], eventRegistry);
26437
26438      if (!isValid) {
26439        unknownProps.push(key);
26440      }
26441    }
26442
26443    var unknownPropString = unknownProps.map(function (prop) {
26444      return '`' + prop + '`';
26445    }).join(', ');
26446
26447    if (unknownProps.length === 1) {
26448      error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
26449    } else if (unknownProps.length > 1) {
26450      error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
26451    }
26452  }
26453};
26454
26455function validateProperties$2(type, props, eventRegistry) {
26456  if (isCustomComponent(type, props)) {
26457    return;
26458  }
26459
26460  warnUnknownProperties(type, props, eventRegistry);
26461}
26462
26463var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;
26464var IS_NON_DELEGATED = 1 << 1;
26465var IS_CAPTURE_PHASE = 1 << 2;
26466var IS_REPLAYED = 1 << 4;
26467// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when
26468// we call willDeferLaterForLegacyFBSupport, thus not bailing out
26469// will result in endless cycles like an infinite loop.
26470// We also don't want to defer during event replaying.
26471
26472var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;
26473
26474/**
26475 * Gets the target node from a native browser event by accounting for
26476 * inconsistencies in browser DOM APIs.
26477 *
26478 * @param {object} nativeEvent Native browser event.
26479 * @return {DOMEventTarget} Target node.
26480 */
26481
26482function getEventTarget(nativeEvent) {
26483  // Fallback to nativeEvent.srcElement for IE9
26484  // https://github.com/facebook/react/issues/12506
26485  var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
26486
26487  if (target.correspondingUseElement) {
26488    target = target.correspondingUseElement;
26489  } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
26490  // @see http://www.quirksmode.org/js/events_properties.html
26491
26492
26493  return target.nodeType === TEXT_NODE ? target.parentNode : target;
26494}
26495
26496var restoreImpl = null;
26497var restoreTarget = null;
26498var restoreQueue = null;
26499
26500function restoreStateOfTarget(target) {
26501  // We perform this translation at the end of the event loop so that we
26502  // always receive the correct fiber here
26503  var internalInstance = getInstanceFromNode(target);
26504
26505  if (!internalInstance) {
26506    // Unmounted
26507    return;
26508  }
26509
26510  if (!(typeof restoreImpl === 'function')) {
26511    {
26512      throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." );
26513    }
26514  }
26515
26516  var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
26517
26518  if (stateNode) {
26519    var _props = getFiberCurrentPropsFromNode(stateNode);
26520
26521    restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
26522  }
26523}
26524
26525function setRestoreImplementation(impl) {
26526  restoreImpl = impl;
26527}
26528function enqueueStateRestore(target) {
26529  if (restoreTarget) {
26530    if (restoreQueue) {
26531      restoreQueue.push(target);
26532    } else {
26533      restoreQueue = [target];
26534    }
26535  } else {
26536    restoreTarget = target;
26537  }
26538}
26539function needsStateRestore() {
26540  return restoreTarget !== null || restoreQueue !== null;
26541}
26542function restoreStateIfNeeded() {
26543  if (!restoreTarget) {
26544    return;
26545  }
26546
26547  var target = restoreTarget;
26548  var queuedTargets = restoreQueue;
26549  restoreTarget = null;
26550  restoreQueue = null;
26551  restoreStateOfTarget(target);
26552
26553  if (queuedTargets) {
26554    for (var i = 0; i < queuedTargets.length; i++) {
26555      restoreStateOfTarget(queuedTargets[i]);
26556    }
26557  }
26558}
26559
26560// the renderer. Such as when we're dispatching events or if third party
26561// libraries need to call batchedUpdates. Eventually, this API will go away when
26562// everything is batched by default. We'll then have a similar API to opt-out of
26563// scheduled work and instead do synchronous work.
26564// Defaults
26565
26566var batchedUpdatesImpl = function (fn, bookkeeping) {
26567  return fn(bookkeeping);
26568};
26569
26570var discreteUpdatesImpl = function (fn, a, b, c, d) {
26571  return fn(a, b, c, d);
26572};
26573
26574var flushDiscreteUpdatesImpl = function () {};
26575
26576var batchedEventUpdatesImpl = batchedUpdatesImpl;
26577var isInsideEventHandler = false;
26578var isBatchingEventUpdates = false;
26579
26580function finishEventHandler() {
26581  // Here we wait until all updates have propagated, which is important
26582  // when using controlled components within layers:
26583  // https://github.com/facebook/react/issues/1698
26584  // Then we restore state of any controlled component.
26585  var controlledComponentsHavePendingUpdates = needsStateRestore();
26586
26587  if (controlledComponentsHavePendingUpdates) {
26588    // If a controlled event was fired, we may need to restore the state of
26589    // the DOM node back to the controlled value. This is necessary when React
26590    // bails out of the update without touching the DOM.
26591    flushDiscreteUpdatesImpl();
26592    restoreStateIfNeeded();
26593  }
26594}
26595
26596function batchedUpdates(fn, bookkeeping) {
26597  if (isInsideEventHandler) {
26598    // If we are currently inside another batch, we need to wait until it
26599    // fully completes before restoring state.
26600    return fn(bookkeeping);
26601  }
26602
26603  isInsideEventHandler = true;
26604
26605  try {
26606    return batchedUpdatesImpl(fn, bookkeeping);
26607  } finally {
26608    isInsideEventHandler = false;
26609    finishEventHandler();
26610  }
26611}
26612function batchedEventUpdates(fn, a, b) {
26613  if (isBatchingEventUpdates) {
26614    // If we are currently inside another batch, we need to wait until it
26615    // fully completes before restoring state.
26616    return fn(a, b);
26617  }
26618
26619  isBatchingEventUpdates = true;
26620
26621  try {
26622    return batchedEventUpdatesImpl(fn, a, b);
26623  } finally {
26624    isBatchingEventUpdates = false;
26625    finishEventHandler();
26626  }
26627}
26628function discreteUpdates(fn, a, b, c, d) {
26629  var prevIsInsideEventHandler = isInsideEventHandler;
26630  isInsideEventHandler = true;
26631
26632  try {
26633    return discreteUpdatesImpl(fn, a, b, c, d);
26634  } finally {
26635    isInsideEventHandler = prevIsInsideEventHandler;
26636
26637    if (!isInsideEventHandler) {
26638      finishEventHandler();
26639    }
26640  }
26641}
26642function flushDiscreteUpdatesIfNeeded(timeStamp) {
26643  {
26644    if (!isInsideEventHandler) {
26645      flushDiscreteUpdatesImpl();
26646    }
26647  }
26648}
26649function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
26650  batchedUpdatesImpl = _batchedUpdatesImpl;
26651  discreteUpdatesImpl = _discreteUpdatesImpl;
26652  flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
26653  batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
26654}
26655
26656function isInteractive(tag) {
26657  return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
26658}
26659
26660function shouldPreventMouseEvent(name, type, props) {
26661  switch (name) {
26662    case 'onClick':
26663    case 'onClickCapture':
26664    case 'onDoubleClick':
26665    case 'onDoubleClickCapture':
26666    case 'onMouseDown':
26667    case 'onMouseDownCapture':
26668    case 'onMouseMove':
26669    case 'onMouseMoveCapture':
26670    case 'onMouseUp':
26671    case 'onMouseUpCapture':
26672    case 'onMouseEnter':
26673      return !!(props.disabled && isInteractive(type));
26674
26675    default:
26676      return false;
26677  }
26678}
26679/**
26680 * @param {object} inst The instance, which is the source of events.
26681 * @param {string} registrationName Name of listener (e.g. `onClick`).
26682 * @return {?function} The stored callback.
26683 */
26684
26685
26686function getListener(inst, registrationName) {
26687  var stateNode = inst.stateNode;
26688
26689  if (stateNode === null) {
26690    // Work in progress (ex: onload events in incremental mode).
26691    return null;
26692  }
26693
26694  var props = getFiberCurrentPropsFromNode(stateNode);
26695
26696  if (props === null) {
26697    // Work in progress.
26698    return null;
26699  }
26700
26701  var listener = props[registrationName];
26702
26703  if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
26704    return null;
26705  }
26706
26707  if (!(!listener || typeof listener === 'function')) {
26708    {
26709      throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
26710    }
26711  }
26712
26713  return listener;
26714}
26715
26716var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners
26717// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
26718
26719if (canUseDOM) {
26720  try {
26721    var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value
26722
26723    Object.defineProperty(options, 'passive', {
26724      get: function () {
26725        passiveBrowserEventsSupported = true;
26726      }
26727    });
26728    window.addEventListener('test', options, options);
26729    window.removeEventListener('test', options, options);
26730  } catch (e) {
26731    passiveBrowserEventsSupported = false;
26732  }
26733}
26734
26735function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
26736  var funcArgs = Array.prototype.slice.call(arguments, 3);
26737
26738  try {
26739    func.apply(context, funcArgs);
26740  } catch (error) {
26741    this.onError(error);
26742  }
26743}
26744
26745var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
26746
26747{
26748  // In DEV mode, we swap out invokeGuardedCallback for a special version
26749  // that plays more nicely with the browser's DevTools. The idea is to preserve
26750  // "Pause on exceptions" behavior. Because React wraps all user-provided
26751  // functions in invokeGuardedCallback, and the production version of
26752  // invokeGuardedCallback uses a try-catch, all user exceptions are treated
26753  // like caught exceptions, and the DevTools won't pause unless the developer
26754  // takes the extra step of enabling pause on caught exceptions. This is
26755  // unintuitive, though, because even though React has caught the error, from
26756  // the developer's perspective, the error is uncaught.
26757  //
26758  // To preserve the expected "Pause on exceptions" behavior, we don't use a
26759  // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
26760  // DOM node, and call the user-provided callback from inside an event handler
26761  // for that fake event. If the callback throws, the error is "captured" using
26762  // a global event handler. But because the error happens in a different
26763  // event loop context, it does not interrupt the normal program flow.
26764  // Effectively, this gives us try-catch behavior without actually using
26765  // try-catch. Neat!
26766  // Check that the browser supports the APIs we need to implement our special
26767  // DEV version of invokeGuardedCallback
26768  if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
26769    var fakeNode = document.createElement('react');
26770
26771    invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
26772      // If document doesn't exist we know for sure we will crash in this method
26773      // when we call document.createEvent(). However this can cause confusing
26774      // errors: https://github.com/facebookincubator/create-react-app/issues/3482
26775      // So we preemptively throw with a better message instead.
26776      if (!(typeof document !== 'undefined')) {
26777        {
26778          throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
26779        }
26780      }
26781
26782      var evt = document.createEvent('Event');
26783      var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
26784      // set this to true at the beginning, then set it to false right after
26785      // calling the function. If the function errors, `didError` will never be
26786      // set to false. This strategy works even if the browser is flaky and
26787      // fails to call our global error handler, because it doesn't rely on
26788      // the error event at all.
26789
26790      var didError = true; // Keeps track of the value of window.event so that we can reset it
26791      // during the callback to let user code access window.event in the
26792      // browsers that support it.
26793
26794      var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
26795      // dispatching: https://github.com/facebook/react/issues/13688
26796
26797      var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
26798
26799      function restoreAfterDispatch() {
26800        // We immediately remove the callback from event listeners so that
26801        // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
26802        // nested call would trigger the fake event handlers of any call higher
26803        // in the stack.
26804        fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
26805        // window.event assignment in both IE <= 10 as they throw an error
26806        // "Member not found" in strict mode, and in Firefox which does not
26807        // support window.event.
26808
26809        if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
26810          window.event = windowEvent;
26811        }
26812      } // Create an event handler for our fake event. We will synchronously
26813      // dispatch our fake event using `dispatchEvent`. Inside the handler, we
26814      // call the user-provided callback.
26815
26816
26817      var funcArgs = Array.prototype.slice.call(arguments, 3);
26818
26819      function callCallback() {
26820        didCall = true;
26821        restoreAfterDispatch();
26822        func.apply(context, funcArgs);
26823        didError = false;
26824      } // Create a global error event handler. We use this to capture the value
26825      // that was thrown. It's possible that this error handler will fire more
26826      // than once; for example, if non-React code also calls `dispatchEvent`
26827      // and a handler for that event throws. We should be resilient to most of
26828      // those cases. Even if our error event handler fires more than once, the
26829      // last error event is always used. If the callback actually does error,
26830      // we know that the last error event is the correct one, because it's not
26831      // possible for anything else to have happened in between our callback
26832      // erroring and the code that follows the `dispatchEvent` call below. If
26833      // the callback doesn't error, but the error event was fired, we know to
26834      // ignore it because `didError` will be false, as described above.
26835
26836
26837      var error; // Use this to track whether the error event is ever called.
26838
26839      var didSetError = false;
26840      var isCrossOriginError = false;
26841
26842      function handleWindowError(event) {
26843        error = event.error;
26844        didSetError = true;
26845
26846        if (error === null && event.colno === 0 && event.lineno === 0) {
26847          isCrossOriginError = true;
26848        }
26849
26850        if (event.defaultPrevented) {
26851          // Some other error handler has prevented default.
26852          // Browsers silence the error report if this happens.
26853          // We'll remember this to later decide whether to log it or not.
26854          if (error != null && typeof error === 'object') {
26855            try {
26856              error._suppressLogging = true;
26857            } catch (inner) {// Ignore.
26858            }
26859          }
26860        }
26861      } // Create a fake event type.
26862
26863
26864      var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
26865
26866      window.addEventListener('error', handleWindowError);
26867      fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
26868      // errors, it will trigger our global error handler.
26869
26870      evt.initEvent(evtType, false, false);
26871      fakeNode.dispatchEvent(evt);
26872
26873      if (windowEventDescriptor) {
26874        Object.defineProperty(window, 'event', windowEventDescriptor);
26875      }
26876
26877      if (didCall && didError) {
26878        if (!didSetError) {
26879          // The callback errored, but the error event never fired.
26880          error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
26881        } else if (isCrossOriginError) {
26882          error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
26883        }
26884
26885        this.onError(error);
26886      } // Remove our event listeners
26887
26888
26889      window.removeEventListener('error', handleWindowError);
26890
26891      if (!didCall) {
26892        // Something went really wrong, and our event was not dispatched.
26893        // https://github.com/facebook/react/issues/16734
26894        // https://github.com/facebook/react/issues/16585
26895        // Fall back to the production implementation.
26896        restoreAfterDispatch();
26897        return invokeGuardedCallbackProd.apply(this, arguments);
26898      }
26899    };
26900  }
26901}
26902
26903var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
26904
26905var hasError = false;
26906var caughtError = null; // Used by event system to capture/rethrow the first error.
26907
26908var hasRethrowError = false;
26909var rethrowError = null;
26910var reporter = {
26911  onError: function (error) {
26912    hasError = true;
26913    caughtError = error;
26914  }
26915};
26916/**
26917 * Call a function while guarding against errors that happens within it.
26918 * Returns an error if it throws, otherwise null.
26919 *
26920 * In production, this is implemented using a try-catch. The reason we don't
26921 * use a try-catch directly is so that we can swap out a different
26922 * implementation in DEV mode.
26923 *
26924 * @param {String} name of the guard to use for logging or debugging
26925 * @param {Function} func The function to invoke
26926 * @param {*} context The context to use when calling the function
26927 * @param {...*} args Arguments for function
26928 */
26929
26930function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
26931  hasError = false;
26932  caughtError = null;
26933  invokeGuardedCallbackImpl$1.apply(reporter, arguments);
26934}
26935/**
26936 * Same as invokeGuardedCallback, but instead of returning an error, it stores
26937 * it in a global so it can be rethrown by `rethrowCaughtError` later.
26938 * TODO: See if caughtError and rethrowError can be unified.
26939 *
26940 * @param {String} name of the guard to use for logging or debugging
26941 * @param {Function} func The function to invoke
26942 * @param {*} context The context to use when calling the function
26943 * @param {...*} args Arguments for function
26944 */
26945
26946function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
26947  invokeGuardedCallback.apply(this, arguments);
26948
26949  if (hasError) {
26950    var error = clearCaughtError();
26951
26952    if (!hasRethrowError) {
26953      hasRethrowError = true;
26954      rethrowError = error;
26955    }
26956  }
26957}
26958/**
26959 * During execution of guarded functions we will capture the first error which
26960 * we will rethrow to be handled by the top level error handler.
26961 */
26962
26963function rethrowCaughtError() {
26964  if (hasRethrowError) {
26965    var error = rethrowError;
26966    hasRethrowError = false;
26967    rethrowError = null;
26968    throw error;
26969  }
26970}
26971function hasCaughtError() {
26972  return hasError;
26973}
26974function clearCaughtError() {
26975  if (hasError) {
26976    var error = caughtError;
26977    hasError = false;
26978    caughtError = null;
26979    return error;
26980  } else {
26981    {
26982      {
26983        throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
26984      }
26985    }
26986  }
26987}
26988
26989/**
26990 * `ReactInstanceMap` maintains a mapping from a public facing stateful
26991 * instance (key) and the internal representation (value). This allows public
26992 * methods to accept the user facing instance as an argument and map them back
26993 * to internal methods.
26994 *
26995 * Note that this module is currently shared and assumed to be stateless.
26996 * If this becomes an actual Map, that will break.
26997 */
26998function get(key) {
26999  return key._reactInternals;
27000}
27001function has(key) {
27002  return key._reactInternals !== undefined;
27003}
27004function set(key, value) {
27005  key._reactInternals = value;
27006}
27007
27008// Don't change these two values. They're used by React Dev Tools.
27009var NoFlags =
27010/*                      */
270110;
27012var PerformedWork =
27013/*                */
270141; // You can change the rest (and add more).
27015
27016var Placement =
27017/*                    */
270182;
27019var Update =
27020/*                       */
270214;
27022var PlacementAndUpdate =
27023/*           */
270246;
27025var Deletion =
27026/*                     */
270278;
27028var ContentReset =
27029/*                 */
2703016;
27031var Callback =
27032/*                     */
2703332;
27034var DidCapture =
27035/*                   */
2703664;
27037var Ref =
27038/*                          */
27039128;
27040var Snapshot =
27041/*                     */
27042256;
27043var Passive =
27044/*                      */
27045512; // TODO (effects) Remove this bit once the new reconciler is synced to the old.
27046
27047var PassiveUnmountPendingDev =
27048/*     */
270498192;
27050var Hydrating =
27051/*                    */
270521024;
27053var HydratingAndUpdate =
27054/*           */
270551028; // Passive & Update & Callback & Ref & Snapshot
27056
27057var LifecycleEffectMask =
27058/*          */
27059932; // Union of all host effects
27060
27061var HostEffectMask =
27062/*               */
270632047; // These are not really side effects, but we still reuse this field.
27064
27065var Incomplete =
27066/*                   */
270672048;
27068var ShouldCapture =
27069/*                */
270704096;
27071var ForceUpdateForLegacySuspense =
27072/* */
2707316384; // Static tags describe aspects of a fiber that are not specific to a render,
27074
27075var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
27076function getNearestMountedFiber(fiber) {
27077  var node = fiber;
27078  var nearestMounted = fiber;
27079
27080  if (!fiber.alternate) {
27081    // If there is no alternate, this might be a new tree that isn't inserted
27082    // yet. If it is, then it will have a pending insertion effect on it.
27083    var nextNode = node;
27084
27085    do {
27086      node = nextNode;
27087
27088      if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
27089        // This is an insertion or in-progress hydration. The nearest possible
27090        // mounted fiber is the parent but we need to continue to figure out
27091        // if that one is still mounted.
27092        nearestMounted = node.return;
27093      }
27094
27095      nextNode = node.return;
27096    } while (nextNode);
27097  } else {
27098    while (node.return) {
27099      node = node.return;
27100    }
27101  }
27102
27103  if (node.tag === HostRoot) {
27104    // TODO: Check if this was a nested HostRoot when used with
27105    // renderContainerIntoSubtree.
27106    return nearestMounted;
27107  } // If we didn't hit the root, that means that we're in an disconnected tree
27108  // that has been unmounted.
27109
27110
27111  return null;
27112}
27113function getSuspenseInstanceFromFiber(fiber) {
27114  if (fiber.tag === SuspenseComponent) {
27115    var suspenseState = fiber.memoizedState;
27116
27117    if (suspenseState === null) {
27118      var current = fiber.alternate;
27119
27120      if (current !== null) {
27121        suspenseState = current.memoizedState;
27122      }
27123    }
27124
27125    if (suspenseState !== null) {
27126      return suspenseState.dehydrated;
27127    }
27128  }
27129
27130  return null;
27131}
27132function getContainerFromFiber(fiber) {
27133  return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
27134}
27135function isFiberMounted(fiber) {
27136  return getNearestMountedFiber(fiber) === fiber;
27137}
27138function isMounted(component) {
27139  {
27140    var owner = ReactCurrentOwner.current;
27141
27142    if (owner !== null && owner.tag === ClassComponent) {
27143      var ownerFiber = owner;
27144      var instance = ownerFiber.stateNode;
27145
27146      if (!instance._warnedAboutRefsInRender) {
27147        error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');
27148      }
27149
27150      instance._warnedAboutRefsInRender = true;
27151    }
27152  }
27153
27154  var fiber = get(component);
27155
27156  if (!fiber) {
27157    return false;
27158  }
27159
27160  return getNearestMountedFiber(fiber) === fiber;
27161}
27162
27163function assertIsMounted(fiber) {
27164  if (!(getNearestMountedFiber(fiber) === fiber)) {
27165    {
27166      throw Error( "Unable to find node on an unmounted component." );
27167    }
27168  }
27169}
27170
27171function findCurrentFiberUsingSlowPath(fiber) {
27172  var alternate = fiber.alternate;
27173
27174  if (!alternate) {
27175    // If there is no alternate, then we only need to check if it is mounted.
27176    var nearestMounted = getNearestMountedFiber(fiber);
27177
27178    if (!(nearestMounted !== null)) {
27179      {
27180        throw Error( "Unable to find node on an unmounted component." );
27181      }
27182    }
27183
27184    if (nearestMounted !== fiber) {
27185      return null;
27186    }
27187
27188    return fiber;
27189  } // If we have two possible branches, we'll walk backwards up to the root
27190  // to see what path the root points to. On the way we may hit one of the
27191  // special cases and we'll deal with them.
27192
27193
27194  var a = fiber;
27195  var b = alternate;
27196
27197  while (true) {
27198    var parentA = a.return;
27199
27200    if (parentA === null) {
27201      // We're at the root.
27202      break;
27203    }
27204
27205    var parentB = parentA.alternate;
27206
27207    if (parentB === null) {
27208      // There is no alternate. This is an unusual case. Currently, it only
27209      // happens when a Suspense component is hidden. An extra fragment fiber
27210      // is inserted in between the Suspense fiber and its children. Skip
27211      // over this extra fragment fiber and proceed to the next parent.
27212      var nextParent = parentA.return;
27213
27214      if (nextParent !== null) {
27215        a = b = nextParent;
27216        continue;
27217      } // If there's no parent, we're at the root.
27218
27219
27220      break;
27221    } // If both copies of the parent fiber point to the same child, we can
27222    // assume that the child is current. This happens when we bailout on low
27223    // priority: the bailed out fiber's child reuses the current child.
27224
27225
27226    if (parentA.child === parentB.child) {
27227      var child = parentA.child;
27228
27229      while (child) {
27230        if (child === a) {
27231          // We've determined that A is the current branch.
27232          assertIsMounted(parentA);
27233          return fiber;
27234        }
27235
27236        if (child === b) {
27237          // We've determined that B is the current branch.
27238          assertIsMounted(parentA);
27239          return alternate;
27240        }
27241
27242        child = child.sibling;
27243      } // We should never have an alternate for any mounting node. So the only
27244      // way this could possibly happen is if this was unmounted, if at all.
27245
27246
27247      {
27248        {
27249          throw Error( "Unable to find node on an unmounted component." );
27250        }
27251      }
27252    }
27253
27254    if (a.return !== b.return) {
27255      // The return pointer of A and the return pointer of B point to different
27256      // fibers. We assume that return pointers never criss-cross, so A must
27257      // belong to the child set of A.return, and B must belong to the child
27258      // set of B.return.
27259      a = parentA;
27260      b = parentB;
27261    } else {
27262      // The return pointers point to the same fiber. We'll have to use the
27263      // default, slow path: scan the child sets of each parent alternate to see
27264      // which child belongs to which set.
27265      //
27266      // Search parent A's child set
27267      var didFindChild = false;
27268      var _child = parentA.child;
27269
27270      while (_child) {
27271        if (_child === a) {
27272          didFindChild = true;
27273          a = parentA;
27274          b = parentB;
27275          break;
27276        }
27277
27278        if (_child === b) {
27279          didFindChild = true;
27280          b = parentA;
27281          a = parentB;
27282          break;
27283        }
27284
27285        _child = _child.sibling;
27286      }
27287
27288      if (!didFindChild) {
27289        // Search parent B's child set
27290        _child = parentB.child;
27291
27292        while (_child) {
27293          if (_child === a) {
27294            didFindChild = true;
27295            a = parentB;
27296            b = parentA;
27297            break;
27298          }
27299
27300          if (_child === b) {
27301            didFindChild = true;
27302            b = parentB;
27303            a = parentA;
27304            break;
27305          }
27306
27307          _child = _child.sibling;
27308        }
27309
27310        if (!didFindChild) {
27311          {
27312            throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
27313          }
27314        }
27315      }
27316    }
27317
27318    if (!(a.alternate === b)) {
27319      {
27320        throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
27321      }
27322    }
27323  } // If the root is not a host container, we're in a disconnected tree. I.e.
27324  // unmounted.
27325
27326
27327  if (!(a.tag === HostRoot)) {
27328    {
27329      throw Error( "Unable to find node on an unmounted component." );
27330    }
27331  }
27332
27333  if (a.stateNode.current === a) {
27334    // We've determined that A is the current branch.
27335    return fiber;
27336  } // Otherwise B has to be current branch.
27337
27338
27339  return alternate;
27340}
27341function findCurrentHostFiber(parent) {
27342  var currentParent = findCurrentFiberUsingSlowPath(parent);
27343
27344  if (!currentParent) {
27345    return null;
27346  } // Next we'll drill down this component to find the first HostComponent/Text.
27347
27348
27349  var node = currentParent;
27350
27351  while (true) {
27352    if (node.tag === HostComponent || node.tag === HostText) {
27353      return node;
27354    } else if (node.child) {
27355      node.child.return = node;
27356      node = node.child;
27357      continue;
27358    }
27359
27360    if (node === currentParent) {
27361      return null;
27362    }
27363
27364    while (!node.sibling) {
27365      if (!node.return || node.return === currentParent) {
27366        return null;
27367      }
27368
27369      node = node.return;
27370    }
27371
27372    node.sibling.return = node.return;
27373    node = node.sibling;
27374  } // Flow needs the return null here, but ESLint complains about it.
27375  // eslint-disable-next-line no-unreachable
27376
27377
27378  return null;
27379}
27380function findCurrentHostFiberWithNoPortals(parent) {
27381  var currentParent = findCurrentFiberUsingSlowPath(parent);
27382
27383  if (!currentParent) {
27384    return null;
27385  } // Next we'll drill down this component to find the first HostComponent/Text.
27386
27387
27388  var node = currentParent;
27389
27390  while (true) {
27391    if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
27392      return node;
27393    } else if (node.child && node.tag !== HostPortal) {
27394      node.child.return = node;
27395      node = node.child;
27396      continue;
27397    }
27398
27399    if (node === currentParent) {
27400      return null;
27401    }
27402
27403    while (!node.sibling) {
27404      if (!node.return || node.return === currentParent) {
27405        return null;
27406      }
27407
27408      node = node.return;
27409    }
27410
27411    node.sibling.return = node.return;
27412    node = node.sibling;
27413  } // Flow needs the return null here, but ESLint complains about it.
27414  // eslint-disable-next-line no-unreachable
27415
27416
27417  return null;
27418}
27419function doesFiberContain(parentFiber, childFiber) {
27420  var node = childFiber;
27421  var parentFiberAlternate = parentFiber.alternate;
27422
27423  while (node !== null) {
27424    if (node === parentFiber || node === parentFiberAlternate) {
27425      return true;
27426    }
27427
27428    node = node.return;
27429  }
27430
27431  return false;
27432}
27433
27434var attemptUserBlockingHydration;
27435function setAttemptUserBlockingHydration(fn) {
27436  attemptUserBlockingHydration = fn;
27437}
27438var attemptContinuousHydration;
27439function setAttemptContinuousHydration(fn) {
27440  attemptContinuousHydration = fn;
27441}
27442var attemptHydrationAtCurrentPriority;
27443function setAttemptHydrationAtCurrentPriority(fn) {
27444  attemptHydrationAtCurrentPriority = fn;
27445}
27446var attemptHydrationAtPriority;
27447function setAttemptHydrationAtPriority(fn) {
27448  attemptHydrationAtPriority = fn;
27449} // TODO: Upgrade this definition once we're on a newer version of Flow that
27450var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
27451
27452var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
27453// if the last target was dehydrated.
27454
27455var queuedFocus = null;
27456var queuedDrag = null;
27457var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
27458
27459var queuedPointers = new Map();
27460var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
27461
27462var queuedExplicitHydrationTargets = [];
27463function hasQueuedDiscreteEvents() {
27464  return queuedDiscreteEvents.length > 0;
27465}
27466var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase
27467'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];
27468function isReplayableDiscreteEvent(eventType) {
27469  return discreteReplayableEvents.indexOf(eventType) > -1;
27470}
27471
27472function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
27473  return {
27474    blockedOn: blockedOn,
27475    domEventName: domEventName,
27476    eventSystemFlags: eventSystemFlags | IS_REPLAYED,
27477    nativeEvent: nativeEvent,
27478    targetContainers: [targetContainer]
27479  };
27480}
27481
27482function queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
27483  var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
27484  queuedDiscreteEvents.push(queuedEvent);
27485} // Resets the replaying for this type of continuous event to no event.
27486
27487function clearIfContinuousEvent(domEventName, nativeEvent) {
27488  switch (domEventName) {
27489    case 'focusin':
27490    case 'focusout':
27491      queuedFocus = null;
27492      break;
27493
27494    case 'dragenter':
27495    case 'dragleave':
27496      queuedDrag = null;
27497      break;
27498
27499    case 'mouseover':
27500    case 'mouseout':
27501      queuedMouse = null;
27502      break;
27503
27504    case 'pointerover':
27505    case 'pointerout':
27506      {
27507        var pointerId = nativeEvent.pointerId;
27508        queuedPointers.delete(pointerId);
27509        break;
27510      }
27511
27512    case 'gotpointercapture':
27513    case 'lostpointercapture':
27514      {
27515        var _pointerId = nativeEvent.pointerId;
27516        queuedPointerCaptures.delete(_pointerId);
27517        break;
27518      }
27519  }
27520}
27521
27522function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
27523  if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
27524    var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
27525
27526    if (blockedOn !== null) {
27527      var _fiber2 = getInstanceFromNode(blockedOn);
27528
27529      if (_fiber2 !== null) {
27530        // Attempt to increase the priority of this target.
27531        attemptContinuousHydration(_fiber2);
27532      }
27533    }
27534
27535    return queuedEvent;
27536  } // If we have already queued this exact event, then it's because
27537  // the different event systems have different DOM event listeners.
27538  // We can accumulate the flags, and the targetContainers, and
27539  // store a single event to be replayed.
27540
27541
27542  existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
27543  var targetContainers = existingQueuedEvent.targetContainers;
27544
27545  if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {
27546    targetContainers.push(targetContainer);
27547  }
27548
27549  return existingQueuedEvent;
27550}
27551
27552function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
27553  // These set relatedTarget to null because the replayed event will be treated as if we
27554  // moved from outside the window (no target) onto the target once it hydrates.
27555  // Instead of mutating we could clone the event.
27556  switch (domEventName) {
27557    case 'focusin':
27558      {
27559        var focusEvent = nativeEvent;
27560        queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);
27561        return true;
27562      }
27563
27564    case 'dragenter':
27565      {
27566        var dragEvent = nativeEvent;
27567        queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);
27568        return true;
27569      }
27570
27571    case 'mouseover':
27572      {
27573        var mouseEvent = nativeEvent;
27574        queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);
27575        return true;
27576      }
27577
27578    case 'pointerover':
27579      {
27580        var pointerEvent = nativeEvent;
27581        var pointerId = pointerEvent.pointerId;
27582        queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));
27583        return true;
27584      }
27585
27586    case 'gotpointercapture':
27587      {
27588        var _pointerEvent = nativeEvent;
27589        var _pointerId2 = _pointerEvent.pointerId;
27590        queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));
27591        return true;
27592      }
27593  }
27594
27595  return false;
27596} // Check if this target is unblocked. Returns true if it's unblocked.
27597
27598function attemptExplicitHydrationTarget(queuedTarget) {
27599  // TODO: This function shares a lot of logic with attemptToDispatchEvent.
27600  // Try to unify them. It's a bit tricky since it would require two return
27601  // values.
27602  var targetInst = getClosestInstanceFromNode(queuedTarget.target);
27603
27604  if (targetInst !== null) {
27605    var nearestMounted = getNearestMountedFiber(targetInst);
27606
27607    if (nearestMounted !== null) {
27608      var tag = nearestMounted.tag;
27609
27610      if (tag === SuspenseComponent) {
27611        var instance = getSuspenseInstanceFromFiber(nearestMounted);
27612
27613        if (instance !== null) {
27614          // We're blocked on hydrating this boundary.
27615          // Increase its priority.
27616          queuedTarget.blockedOn = instance;
27617          attemptHydrationAtPriority(queuedTarget.lanePriority, function () {
27618            Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {
27619              attemptHydrationAtCurrentPriority(nearestMounted);
27620            });
27621          });
27622          return;
27623        }
27624      } else if (tag === HostRoot) {
27625        var root = nearestMounted.stateNode;
27626
27627        if (root.hydrate) {
27628          queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
27629          // a root other than sync.
27630
27631          return;
27632        }
27633      }
27634    }
27635  }
27636
27637  queuedTarget.blockedOn = null;
27638}
27639
27640function attemptReplayContinuousQueuedEvent(queuedEvent) {
27641  if (queuedEvent.blockedOn !== null) {
27642    return false;
27643  }
27644
27645  var targetContainers = queuedEvent.targetContainers;
27646
27647  while (targetContainers.length > 0) {
27648    var targetContainer = targetContainers[0];
27649    var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);
27650
27651    if (nextBlockedOn !== null) {
27652      // We're still blocked. Try again later.
27653      var _fiber3 = getInstanceFromNode(nextBlockedOn);
27654
27655      if (_fiber3 !== null) {
27656        attemptContinuousHydration(_fiber3);
27657      }
27658
27659      queuedEvent.blockedOn = nextBlockedOn;
27660      return false;
27661    } // This target container was successfully dispatched. Try the next.
27662
27663
27664    targetContainers.shift();
27665  }
27666
27667  return true;
27668}
27669
27670function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
27671  if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
27672    map.delete(key);
27673  }
27674}
27675
27676function replayUnblockedEvents() {
27677  hasScheduledReplayAttempt = false; // First replay discrete events.
27678
27679  while (queuedDiscreteEvents.length > 0) {
27680    var nextDiscreteEvent = queuedDiscreteEvents[0];
27681
27682    if (nextDiscreteEvent.blockedOn !== null) {
27683      // We're still blocked.
27684      // Increase the priority of this boundary to unblock
27685      // the next discrete event.
27686      var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn);
27687
27688      if (_fiber4 !== null) {
27689        attemptUserBlockingHydration(_fiber4);
27690      }
27691
27692      break;
27693    }
27694
27695    var targetContainers = nextDiscreteEvent.targetContainers;
27696
27697    while (targetContainers.length > 0) {
27698      var targetContainer = targetContainers[0];
27699      var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent);
27700
27701      if (nextBlockedOn !== null) {
27702        // We're still blocked. Try again later.
27703        nextDiscreteEvent.blockedOn = nextBlockedOn;
27704        break;
27705      } // This target container was successfully dispatched. Try the next.
27706
27707
27708      targetContainers.shift();
27709    }
27710
27711    if (nextDiscreteEvent.blockedOn === null) {
27712      // We've successfully replayed the first event. Let's try the next one.
27713      queuedDiscreteEvents.shift();
27714    }
27715  } // Next replay any continuous events.
27716
27717
27718  if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
27719    queuedFocus = null;
27720  }
27721
27722  if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
27723    queuedDrag = null;
27724  }
27725
27726  if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
27727    queuedMouse = null;
27728  }
27729
27730  queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
27731  queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
27732}
27733
27734function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
27735  if (queuedEvent.blockedOn === unblocked) {
27736    queuedEvent.blockedOn = null;
27737
27738    if (!hasScheduledReplayAttempt) {
27739      hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
27740      // now unblocked. This first might not actually be unblocked yet.
27741      // We could check it early to avoid scheduling an unnecessary callback.
27742
27743      Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);
27744    }
27745  }
27746}
27747
27748function retryIfBlockedOn(unblocked) {
27749  // Mark anything that was blocked on this as no longer blocked
27750  // and eligible for a replay.
27751  if (queuedDiscreteEvents.length > 0) {
27752    scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
27753    // worth it because we expect very few discrete events to queue up and once
27754    // we are actually fully unblocked it will be fast to replay them.
27755
27756    for (var i = 1; i < queuedDiscreteEvents.length; i++) {
27757      var queuedEvent = queuedDiscreteEvents[i];
27758
27759      if (queuedEvent.blockedOn === unblocked) {
27760        queuedEvent.blockedOn = null;
27761      }
27762    }
27763  }
27764
27765  if (queuedFocus !== null) {
27766    scheduleCallbackIfUnblocked(queuedFocus, unblocked);
27767  }
27768
27769  if (queuedDrag !== null) {
27770    scheduleCallbackIfUnblocked(queuedDrag, unblocked);
27771  }
27772
27773  if (queuedMouse !== null) {
27774    scheduleCallbackIfUnblocked(queuedMouse, unblocked);
27775  }
27776
27777  var unblock = function (queuedEvent) {
27778    return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
27779  };
27780
27781  queuedPointers.forEach(unblock);
27782  queuedPointerCaptures.forEach(unblock);
27783
27784  for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
27785    var queuedTarget = queuedExplicitHydrationTargets[_i];
27786
27787    if (queuedTarget.blockedOn === unblocked) {
27788      queuedTarget.blockedOn = null;
27789    }
27790  }
27791
27792  while (queuedExplicitHydrationTargets.length > 0) {
27793    var nextExplicitTarget = queuedExplicitHydrationTargets[0];
27794
27795    if (nextExplicitTarget.blockedOn !== null) {
27796      // We're still blocked.
27797      break;
27798    } else {
27799      attemptExplicitHydrationTarget(nextExplicitTarget);
27800
27801      if (nextExplicitTarget.blockedOn === null) {
27802        // We're unblocked.
27803        queuedExplicitHydrationTargets.shift();
27804      }
27805    }
27806  }
27807}
27808
27809var DiscreteEvent = 0;
27810var UserBlockingEvent = 1;
27811var ContinuousEvent = 2;
27812
27813/**
27814 * Generate a mapping of standard vendor prefixes using the defined style property and event name.
27815 *
27816 * @param {string} styleProp
27817 * @param {string} eventName
27818 * @returns {object}
27819 */
27820
27821function makePrefixMap(styleProp, eventName) {
27822  var prefixes = {};
27823  prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
27824  prefixes['Webkit' + styleProp] = 'webkit' + eventName;
27825  prefixes['Moz' + styleProp] = 'moz' + eventName;
27826  return prefixes;
27827}
27828/**
27829 * A list of event names to a configurable list of vendor prefixes.
27830 */
27831
27832
27833var vendorPrefixes = {
27834  animationend: makePrefixMap('Animation', 'AnimationEnd'),
27835  animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
27836  animationstart: makePrefixMap('Animation', 'AnimationStart'),
27837  transitionend: makePrefixMap('Transition', 'TransitionEnd')
27838};
27839/**
27840 * Event names that have already been detected and prefixed (if applicable).
27841 */
27842
27843var prefixedEventNames = {};
27844/**
27845 * Element to check for prefixes on.
27846 */
27847
27848var style = {};
27849/**
27850 * Bootstrap if a DOM exists.
27851 */
27852
27853if (canUseDOM) {
27854  style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
27855  // the un-prefixed "animation" and "transition" properties are defined on the
27856  // style object but the events that fire will still be prefixed, so we need
27857  // to check if the un-prefixed events are usable, and if not remove them from the map.
27858
27859  if (!('AnimationEvent' in window)) {
27860    delete vendorPrefixes.animationend.animation;
27861    delete vendorPrefixes.animationiteration.animation;
27862    delete vendorPrefixes.animationstart.animation;
27863  } // Same as above
27864
27865
27866  if (!('TransitionEvent' in window)) {
27867    delete vendorPrefixes.transitionend.transition;
27868  }
27869}
27870/**
27871 * Attempts to determine the correct vendor prefixed event name.
27872 *
27873 * @param {string} eventName
27874 * @returns {string}
27875 */
27876
27877
27878function getVendorPrefixedEventName(eventName) {
27879  if (prefixedEventNames[eventName]) {
27880    return prefixedEventNames[eventName];
27881  } else if (!vendorPrefixes[eventName]) {
27882    return eventName;
27883  }
27884
27885  var prefixMap = vendorPrefixes[eventName];
27886
27887  for (var styleProp in prefixMap) {
27888    if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
27889      return prefixedEventNames[eventName] = prefixMap[styleProp];
27890    }
27891  }
27892
27893  return eventName;
27894}
27895
27896var ANIMATION_END = getVendorPrefixedEventName('animationend');
27897var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');
27898var ANIMATION_START = getVendorPrefixedEventName('animationstart');
27899var TRANSITION_END = getVendorPrefixedEventName('transitionend');
27900
27901var topLevelEventsToReactNames = new Map();
27902var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
27903// the code required to apply the same logic for event prioritization and that of the
27904// SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
27905// duplication (for which there would be quite a bit). For the events that are not needed
27906// for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
27907// array of top level events.
27908// Lastly, we ignore prettier so we can keep the formatting sane.
27909// prettier-ignore
27910
27911var discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful!
27912'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful!
27913'focusout', 'blur', // Careful!
27914'input', 'input', 'invalid', 'invalid', 'keydown', 'keyDown', 'keypress', 'keyPress', 'keyup', 'keyUp', 'mousedown', 'mouseDown', 'mouseup', 'mouseUp', 'paste', 'paste', 'pause', 'pause', 'play', 'play', 'pointercancel', 'pointerCancel', 'pointerdown', 'pointerDown', 'pointerup', 'pointerUp', 'ratechange', 'rateChange', 'reset', 'reset', 'seeked', 'seeked', 'submit', 'submit', 'touchcancel', 'touchCancel', 'touchend', 'touchEnd', 'touchstart', 'touchStart', 'volumechange', 'volumeChange'];
27915var otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate'];
27916
27917
27918var userBlockingPairsForSimpleEventPlugin = ['drag', 'drag', 'dragenter', 'dragEnter', 'dragexit', 'dragExit', 'dragleave', 'dragLeave', 'dragover', 'dragOver', 'mousemove', 'mouseMove', 'mouseout', 'mouseOut', 'mouseover', 'mouseOver', 'pointermove', 'pointerMove', 'pointerout', 'pointerOut', 'pointerover', 'pointerOver', 'scroll', 'scroll', 'toggle', 'toggle', 'touchmove', 'touchMove', 'wheel', 'wheel']; // prettier-ignore
27919
27920var continuousPairsForSimpleEventPlugin = ['abort', 'abort', ANIMATION_END, 'animationEnd', ANIMATION_ITERATION, 'animationIteration', ANIMATION_START, 'animationStart', 'canplay', 'canPlay', 'canplaythrough', 'canPlayThrough', 'durationchange', 'durationChange', 'emptied', 'emptied', 'encrypted', 'encrypted', 'ended', 'ended', 'error', 'error', 'gotpointercapture', 'gotPointerCapture', 'load', 'load', 'loadeddata', 'loadedData', 'loadedmetadata', 'loadedMetadata', 'loadstart', 'loadStart', 'lostpointercapture', 'lostPointerCapture', 'playing', 'playing', 'progress', 'progress', 'seeking', 'seeking', 'stalled', 'stalled', 'suspend', 'suspend', 'timeupdate', 'timeUpdate', TRANSITION_END, 'transitionEnd', 'waiting', 'waiting'];
27921/**
27922 * Turns
27923 * ['abort', ...]
27924 *
27925 * into
27926 *
27927 * topLevelEventsToReactNames = new Map([
27928 *   ['abort', 'onAbort'],
27929 * ]);
27930 *
27931 * and registers them.
27932 */
27933
27934function registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {
27935  // As the event types are in pairs of two, we need to iterate
27936  // through in twos. The events are in pairs of two to save code
27937  // and improve init perf of processing this array, as it will
27938  // result in far fewer object allocations and property accesses
27939  // if we only use three arrays to process all the categories of
27940  // instead of tuples.
27941  for (var i = 0; i < eventTypes.length; i += 2) {
27942    var topEvent = eventTypes[i];
27943    var event = eventTypes[i + 1];
27944    var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
27945    var reactName = 'on' + capitalizedEvent;
27946    eventPriorities.set(topEvent, priority);
27947    topLevelEventsToReactNames.set(topEvent, reactName);
27948    registerTwoPhaseEvent(reactName, [topEvent]);
27949  }
27950}
27951
27952function setEventPriorities(eventTypes, priority) {
27953  for (var i = 0; i < eventTypes.length; i++) {
27954    eventPriorities.set(eventTypes[i], priority);
27955  }
27956}
27957
27958function getEventPriorityForPluginSystem(domEventName) {
27959  var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might
27960  // want to warn if we can't detect the priority
27961  // for the event.
27962
27963  return priority === undefined ? ContinuousEvent : priority;
27964}
27965function registerSimpleEvents() {
27966  registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
27967  registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
27968  registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent);
27969  setEventPriorities(otherDiscreteEvents, DiscreteEvent);
27970}
27971
27972var Scheduler_now = Scheduler.unstable_now;
27973
27974{
27975  // Provide explicit error message when production+profiling bundle of e.g.
27976  // react-dom is used with production (non-profiling) bundle of
27977  // scheduler/tracing
27978  if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
27979    {
27980      throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
27981    }
27982  }
27983}
27984// ascending numbers so we can compare them like numbers. They start at 90 to
27985// avoid clashing with Scheduler's priorities.
27986
27987var ImmediatePriority = 99;
27988var UserBlockingPriority = 98;
27989var NormalPriority = 97;
27990var LowPriority = 96;
27991var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.
27992
27993var NoPriority = 90;
27994var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
27995
27996var SyncLanePriority = 15;
27997var SyncBatchedLanePriority = 14;
27998var InputDiscreteHydrationLanePriority = 13;
27999var InputDiscreteLanePriority = 12;
28000var InputContinuousHydrationLanePriority = 11;
28001var InputContinuousLanePriority = 10;
28002var DefaultHydrationLanePriority = 9;
28003var DefaultLanePriority = 8;
28004var TransitionHydrationPriority = 7;
28005var TransitionPriority = 6;
28006var RetryLanePriority = 5;
28007var SelectiveHydrationLanePriority = 4;
28008var IdleHydrationLanePriority = 3;
28009var IdleLanePriority = 2;
28010var OffscreenLanePriority = 1;
28011var NoLanePriority = 0;
28012var TotalLanes = 31;
28013var NoLanes =
28014/*                        */
280150;
28016var NoLane =
28017/*                          */
280180;
28019var SyncLane =
28020/*                        */
280211;
28022var SyncBatchedLane =
28023/*                 */
280242;
28025var InputDiscreteHydrationLane =
28026/*      */
280274;
28028var InputDiscreteLanes =
28029/*                    */
2803024;
28031var InputContinuousHydrationLane =
28032/*           */
2803332;
28034var InputContinuousLanes =
28035/*                  */
28036192;
28037var DefaultHydrationLane =
28038/*            */
28039256;
28040var DefaultLanes =
28041/*                   */
280423584;
28043var TransitionHydrationLane =
28044/*                */
280454096;
28046var TransitionLanes =
28047/*                       */
280484186112;
28049var RetryLanes =
28050/*                            */
2805162914560;
28052var SomeRetryLane =
28053/*                  */
2805433554432;
28055var SelectiveHydrationLane =
28056/*          */
2805767108864;
28058var NonIdleLanes =
28059/*                                 */
28060134217727;
28061var IdleHydrationLane =
28062/*               */
28063134217728;
28064var IdleLanes =
28065/*                             */
28066805306368;
28067var OffscreenLane =
28068/*                   */
280691073741824;
28070var NoTimestamp = -1;
28071function setCurrentUpdateLanePriority(newLanePriority) {
28072} // "Registers" used to "return" multiple values
28073// Used by getHighestPriorityLanes and getNextLanes:
28074
28075var return_highestLanePriority = DefaultLanePriority;
28076
28077function getHighestPriorityLanes(lanes) {
28078  if ((SyncLane & lanes) !== NoLanes) {
28079    return_highestLanePriority = SyncLanePriority;
28080    return SyncLane;
28081  }
28082
28083  if ((SyncBatchedLane & lanes) !== NoLanes) {
28084    return_highestLanePriority = SyncBatchedLanePriority;
28085    return SyncBatchedLane;
28086  }
28087
28088  if ((InputDiscreteHydrationLane & lanes) !== NoLanes) {
28089    return_highestLanePriority = InputDiscreteHydrationLanePriority;
28090    return InputDiscreteHydrationLane;
28091  }
28092
28093  var inputDiscreteLanes = InputDiscreteLanes & lanes;
28094
28095  if (inputDiscreteLanes !== NoLanes) {
28096    return_highestLanePriority = InputDiscreteLanePriority;
28097    return inputDiscreteLanes;
28098  }
28099
28100  if ((lanes & InputContinuousHydrationLane) !== NoLanes) {
28101    return_highestLanePriority = InputContinuousHydrationLanePriority;
28102    return InputContinuousHydrationLane;
28103  }
28104
28105  var inputContinuousLanes = InputContinuousLanes & lanes;
28106
28107  if (inputContinuousLanes !== NoLanes) {
28108    return_highestLanePriority = InputContinuousLanePriority;
28109    return inputContinuousLanes;
28110  }
28111
28112  if ((lanes & DefaultHydrationLane) !== NoLanes) {
28113    return_highestLanePriority = DefaultHydrationLanePriority;
28114    return DefaultHydrationLane;
28115  }
28116
28117  var defaultLanes = DefaultLanes & lanes;
28118
28119  if (defaultLanes !== NoLanes) {
28120    return_highestLanePriority = DefaultLanePriority;
28121    return defaultLanes;
28122  }
28123
28124  if ((lanes & TransitionHydrationLane) !== NoLanes) {
28125    return_highestLanePriority = TransitionHydrationPriority;
28126    return TransitionHydrationLane;
28127  }
28128
28129  var transitionLanes = TransitionLanes & lanes;
28130
28131  if (transitionLanes !== NoLanes) {
28132    return_highestLanePriority = TransitionPriority;
28133    return transitionLanes;
28134  }
28135
28136  var retryLanes = RetryLanes & lanes;
28137
28138  if (retryLanes !== NoLanes) {
28139    return_highestLanePriority = RetryLanePriority;
28140    return retryLanes;
28141  }
28142
28143  if (lanes & SelectiveHydrationLane) {
28144    return_highestLanePriority = SelectiveHydrationLanePriority;
28145    return SelectiveHydrationLane;
28146  }
28147
28148  if ((lanes & IdleHydrationLane) !== NoLanes) {
28149    return_highestLanePriority = IdleHydrationLanePriority;
28150    return IdleHydrationLane;
28151  }
28152
28153  var idleLanes = IdleLanes & lanes;
28154
28155  if (idleLanes !== NoLanes) {
28156    return_highestLanePriority = IdleLanePriority;
28157    return idleLanes;
28158  }
28159
28160  if ((OffscreenLane & lanes) !== NoLanes) {
28161    return_highestLanePriority = OffscreenLanePriority;
28162    return OffscreenLane;
28163  }
28164
28165  {
28166    error('Should have found matching lanes. This is a bug in React.');
28167  } // This shouldn't be reachable, but as a fallback, return the entire bitmask.
28168
28169
28170  return_highestLanePriority = DefaultLanePriority;
28171  return lanes;
28172}
28173
28174function schedulerPriorityToLanePriority(schedulerPriorityLevel) {
28175  switch (schedulerPriorityLevel) {
28176    case ImmediatePriority:
28177      return SyncLanePriority;
28178
28179    case UserBlockingPriority:
28180      return InputContinuousLanePriority;
28181
28182    case NormalPriority:
28183    case LowPriority:
28184      // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.
28185      return DefaultLanePriority;
28186
28187    case IdlePriority:
28188      return IdleLanePriority;
28189
28190    default:
28191      return NoLanePriority;
28192  }
28193}
28194function lanePriorityToSchedulerPriority(lanePriority) {
28195  switch (lanePriority) {
28196    case SyncLanePriority:
28197    case SyncBatchedLanePriority:
28198      return ImmediatePriority;
28199
28200    case InputDiscreteHydrationLanePriority:
28201    case InputDiscreteLanePriority:
28202    case InputContinuousHydrationLanePriority:
28203    case InputContinuousLanePriority:
28204      return UserBlockingPriority;
28205
28206    case DefaultHydrationLanePriority:
28207    case DefaultLanePriority:
28208    case TransitionHydrationPriority:
28209    case TransitionPriority:
28210    case SelectiveHydrationLanePriority:
28211    case RetryLanePriority:
28212      return NormalPriority;
28213
28214    case IdleHydrationLanePriority:
28215    case IdleLanePriority:
28216    case OffscreenLanePriority:
28217      return IdlePriority;
28218
28219    case NoLanePriority:
28220      return NoPriority;
28221
28222    default:
28223      {
28224        {
28225          throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
28226        }
28227      }
28228
28229  }
28230}
28231function getNextLanes(root, wipLanes) {
28232  // Early bailout if there's no pending work left.
28233  var pendingLanes = root.pendingLanes;
28234
28235  if (pendingLanes === NoLanes) {
28236    return_highestLanePriority = NoLanePriority;
28237    return NoLanes;
28238  }
28239
28240  var nextLanes = NoLanes;
28241  var nextLanePriority = NoLanePriority;
28242  var expiredLanes = root.expiredLanes;
28243  var suspendedLanes = root.suspendedLanes;
28244  var pingedLanes = root.pingedLanes; // Check if any work has expired.
28245
28246  if (expiredLanes !== NoLanes) {
28247    nextLanes = expiredLanes;
28248    nextLanePriority = return_highestLanePriority = SyncLanePriority;
28249  } else {
28250    // Do not work on any idle work until all the non-idle work has finished,
28251    // even if the work is suspended.
28252    var nonIdlePendingLanes = pendingLanes & NonIdleLanes;
28253
28254    if (nonIdlePendingLanes !== NoLanes) {
28255      var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;
28256
28257      if (nonIdleUnblockedLanes !== NoLanes) {
28258        nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);
28259        nextLanePriority = return_highestLanePriority;
28260      } else {
28261        var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;
28262
28263        if (nonIdlePingedLanes !== NoLanes) {
28264          nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
28265          nextLanePriority = return_highestLanePriority;
28266        }
28267      }
28268    } else {
28269      // The only remaining work is Idle.
28270      var unblockedLanes = pendingLanes & ~suspendedLanes;
28271
28272      if (unblockedLanes !== NoLanes) {
28273        nextLanes = getHighestPriorityLanes(unblockedLanes);
28274        nextLanePriority = return_highestLanePriority;
28275      } else {
28276        if (pingedLanes !== NoLanes) {
28277          nextLanes = getHighestPriorityLanes(pingedLanes);
28278          nextLanePriority = return_highestLanePriority;
28279        }
28280      }
28281    }
28282  }
28283
28284  if (nextLanes === NoLanes) {
28285    // This should only be reachable if we're suspended
28286    // TODO: Consider warning in this path if a fallback timer is not scheduled.
28287    return NoLanes;
28288  } // If there are higher priority lanes, we'll include them even if they
28289  // are suspended.
28290
28291
28292  nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt
28293  // it and we'll lose our progress. We should only do this if the new lanes are
28294  // higher priority.
28295
28296  if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't
28297  // bother waiting until the root is complete.
28298  (wipLanes & suspendedLanes) === NoLanes) {
28299    getHighestPriorityLanes(wipLanes);
28300    var wipLanePriority = return_highestLanePriority;
28301
28302    if (nextLanePriority <= wipLanePriority) {
28303      return wipLanes;
28304    } else {
28305      return_highestLanePriority = nextLanePriority;
28306    }
28307  } // Check for entangled lanes and add them to the batch.
28308  //
28309  // A lane is said to be entangled with another when it's not allowed to render
28310  // in a batch that does not also include the other lane. Typically we do this
28311  // when multiple updates have the same source, and we only want to respond to
28312  // the most recent event from that source.
28313  //
28314  // Note that we apply entanglements *after* checking for partial work above.
28315  // This means that if a lane is entangled during an interleaved event while
28316  // it's already rendering, we won't interrupt it. This is intentional, since
28317  // entanglement is usually "best effort": we'll try our best to render the
28318  // lanes in the same batch, but it's not worth throwing out partially
28319  // completed work in order to do it.
28320  //
28321  // For those exceptions where entanglement is semantically important, like
28322  // useMutableSource, we should ensure that there is no partial work at the
28323  // time we apply the entanglement.
28324
28325
28326  var entangledLanes = root.entangledLanes;
28327
28328  if (entangledLanes !== NoLanes) {
28329    var entanglements = root.entanglements;
28330    var lanes = nextLanes & entangledLanes;
28331
28332    while (lanes > 0) {
28333      var index = pickArbitraryLaneIndex(lanes);
28334      var lane = 1 << index;
28335      nextLanes |= entanglements[index];
28336      lanes &= ~lane;
28337    }
28338  }
28339
28340  return nextLanes;
28341}
28342function getMostRecentEventTime(root, lanes) {
28343  var eventTimes = root.eventTimes;
28344  var mostRecentEventTime = NoTimestamp;
28345
28346  while (lanes > 0) {
28347    var index = pickArbitraryLaneIndex(lanes);
28348    var lane = 1 << index;
28349    var eventTime = eventTimes[index];
28350
28351    if (eventTime > mostRecentEventTime) {
28352      mostRecentEventTime = eventTime;
28353    }
28354
28355    lanes &= ~lane;
28356  }
28357
28358  return mostRecentEventTime;
28359}
28360
28361function computeExpirationTime(lane, currentTime) {
28362  // TODO: Expiration heuristic is constant per lane, so could use a map.
28363  getHighestPriorityLanes(lane);
28364  var priority = return_highestLanePriority;
28365
28366  if (priority >= InputContinuousLanePriority) {
28367    // User interactions should expire slightly more quickly.
28368    //
28369    // NOTE: This is set to the corresponding constant as in Scheduler.js. When
28370    // we made it larger, a product metric in www regressed, suggesting there's
28371    // a user interaction that's being starved by a series of synchronous
28372    // updates. If that theory is correct, the proper solution is to fix the
28373    // starvation. However, this scenario supports the idea that expiration
28374    // times are an important safeguard when starvation does happen.
28375    //
28376    // Also note that, in the case of user input specifically, this will soon no
28377    // longer be an issue because we plan to make user input synchronous by
28378    // default (until you enter `startTransition`, of course.)
28379    //
28380    // If weren't planning to make these updates synchronous soon anyway, I
28381    // would probably make this number a configurable parameter.
28382    return currentTime + 250;
28383  } else if (priority >= TransitionPriority) {
28384    return currentTime + 5000;
28385  } else {
28386    // Anything idle priority or lower should never expire.
28387    return NoTimestamp;
28388  }
28389}
28390
28391function markStarvedLanesAsExpired(root, currentTime) {
28392  // TODO: This gets called every time we yield. We can optimize by storing
28393  // the earliest expiration time on the root. Then use that to quickly bail out
28394  // of this function.
28395  var pendingLanes = root.pendingLanes;
28396  var suspendedLanes = root.suspendedLanes;
28397  var pingedLanes = root.pingedLanes;
28398  var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their
28399  // expiration time. If so, we'll assume the update is being starved and mark
28400  // it as expired to force it to finish.
28401
28402  var lanes = pendingLanes;
28403
28404  while (lanes > 0) {
28405    var index = pickArbitraryLaneIndex(lanes);
28406    var lane = 1 << index;
28407    var expirationTime = expirationTimes[index];
28408
28409    if (expirationTime === NoTimestamp) {
28410      // Found a pending lane with no expiration time. If it's not suspended, or
28411      // if it's pinged, assume it's CPU-bound. Compute a new expiration time
28412      // using the current time.
28413      if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {
28414        // Assumes timestamps are monotonically increasing.
28415        expirationTimes[index] = computeExpirationTime(lane, currentTime);
28416      }
28417    } else if (expirationTime <= currentTime) {
28418      // This lane expired
28419      root.expiredLanes |= lane;
28420    }
28421
28422    lanes &= ~lane;
28423  }
28424} // This returns the highest priority pending lanes regardless of whether they
28425function getLanesToRetrySynchronouslyOnError(root) {
28426  var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;
28427
28428  if (everythingButOffscreen !== NoLanes) {
28429    return everythingButOffscreen;
28430  }
28431
28432  if (everythingButOffscreen & OffscreenLane) {
28433    return OffscreenLane;
28434  }
28435
28436  return NoLanes;
28437}
28438function returnNextLanesPriority() {
28439  return return_highestLanePriority;
28440}
28441function includesNonIdleWork(lanes) {
28442  return (lanes & NonIdleLanes) !== NoLanes;
28443}
28444function includesOnlyRetries(lanes) {
28445  return (lanes & RetryLanes) === lanes;
28446}
28447function includesOnlyTransitions(lanes) {
28448  return (lanes & TransitionLanes) === lanes;
28449} // To ensure consistency across multiple updates in the same event, this should
28450// be a pure function, so that it always returns the same lane for given inputs.
28451
28452function findUpdateLane(lanePriority, wipLanes) {
28453  switch (lanePriority) {
28454    case NoLanePriority:
28455      break;
28456
28457    case SyncLanePriority:
28458      return SyncLane;
28459
28460    case SyncBatchedLanePriority:
28461      return SyncBatchedLane;
28462
28463    case InputDiscreteLanePriority:
28464      {
28465        var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);
28466
28467        if (_lane === NoLane) {
28468          // Shift to the next priority level
28469          return findUpdateLane(InputContinuousLanePriority, wipLanes);
28470        }
28471
28472        return _lane;
28473      }
28474
28475    case InputContinuousLanePriority:
28476      {
28477        var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes);
28478
28479        if (_lane2 === NoLane) {
28480          // Shift to the next priority level
28481          return findUpdateLane(DefaultLanePriority, wipLanes);
28482        }
28483
28484        return _lane2;
28485      }
28486
28487    case DefaultLanePriority:
28488      {
28489        var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes);
28490
28491        if (_lane3 === NoLane) {
28492          // If all the default lanes are already being worked on, look for a
28493          // lane in the transition range.
28494          _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes);
28495
28496          if (_lane3 === NoLane) {
28497            // All the transition lanes are taken, too. This should be very
28498            // rare, but as a last resort, pick a default lane. This will have
28499            // the effect of interrupting the current work-in-progress render.
28500            _lane3 = pickArbitraryLane(DefaultLanes);
28501          }
28502        }
28503
28504        return _lane3;
28505      }
28506
28507    case TransitionPriority: // Should be handled by findTransitionLane instead
28508
28509    case RetryLanePriority:
28510      // Should be handled by findRetryLane instead
28511      break;
28512
28513    case IdleLanePriority:
28514      var lane = pickArbitraryLane(IdleLanes & ~wipLanes);
28515
28516      if (lane === NoLane) {
28517        lane = pickArbitraryLane(IdleLanes);
28518      }
28519
28520      return lane;
28521  }
28522
28523  {
28524    {
28525      throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
28526    }
28527  }
28528} // To ensure consistency across multiple updates in the same event, this should
28529// be pure function, so that it always returns the same lane for given inputs.
28530
28531function findTransitionLane(wipLanes, pendingLanes) {
28532  // First look for lanes that are completely unclaimed, i.e. have no
28533  // pending work.
28534  var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes);
28535
28536  if (lane === NoLane) {
28537    // If all lanes have pending work, look for a lane that isn't currently
28538    // being worked on.
28539    lane = pickArbitraryLane(TransitionLanes & ~wipLanes);
28540
28541    if (lane === NoLane) {
28542      // If everything is being worked on, pick any lane. This has the
28543      // effect of interrupting the current work-in-progress.
28544      lane = pickArbitraryLane(TransitionLanes);
28545    }
28546  }
28547
28548  return lane;
28549} // To ensure consistency across multiple updates in the same event, this should
28550// be pure function, so that it always returns the same lane for given inputs.
28551
28552function findRetryLane(wipLanes) {
28553  // This is a fork of `findUpdateLane` designed specifically for Suspense
28554  // "retries" — a special update that attempts to flip a Suspense boundary
28555  // from its placeholder state to its primary/resolved state.
28556  var lane = pickArbitraryLane(RetryLanes & ~wipLanes);
28557
28558  if (lane === NoLane) {
28559    lane = pickArbitraryLane(RetryLanes);
28560  }
28561
28562  return lane;
28563}
28564
28565function getHighestPriorityLane(lanes) {
28566  return lanes & -lanes;
28567}
28568
28569function getLowestPriorityLane(lanes) {
28570  // This finds the most significant non-zero bit.
28571  var index = 31 - clz32(lanes);
28572  return index < 0 ? NoLanes : 1 << index;
28573}
28574
28575function getEqualOrHigherPriorityLanes(lanes) {
28576  return (getLowestPriorityLane(lanes) << 1) - 1;
28577}
28578
28579function pickArbitraryLane(lanes) {
28580  // This wrapper function gets inlined. Only exists so to communicate that it
28581  // doesn't matter which bit is selected; you can pick any bit without
28582  // affecting the algorithms where its used. Here I'm using
28583  // getHighestPriorityLane because it requires the fewest operations.
28584  return getHighestPriorityLane(lanes);
28585}
28586
28587function pickArbitraryLaneIndex(lanes) {
28588  return 31 - clz32(lanes);
28589}
28590
28591function laneToIndex(lane) {
28592  return pickArbitraryLaneIndex(lane);
28593}
28594
28595function includesSomeLane(a, b) {
28596  return (a & b) !== NoLanes;
28597}
28598function isSubsetOfLanes(set, subset) {
28599  return (set & subset) === subset;
28600}
28601function mergeLanes(a, b) {
28602  return a | b;
28603}
28604function removeLanes(set, subset) {
28605  return set & ~subset;
28606} // Seems redundant, but it changes the type from a single lane (used for
28607// updates) to a group of lanes (used for flushing work).
28608
28609function laneToLanes(lane) {
28610  return lane;
28611}
28612function higherPriorityLane(a, b) {
28613  // This works because the bit ranges decrease in priority as you go left.
28614  return a !== NoLane && a < b ? a : b;
28615}
28616function createLaneMap(initial) {
28617  // Intentionally pushing one by one.
28618  // https://v8.dev/blog/elements-kinds#avoid-creating-holes
28619  var laneMap = [];
28620
28621  for (var i = 0; i < TotalLanes; i++) {
28622    laneMap.push(initial);
28623  }
28624
28625  return laneMap;
28626}
28627function markRootUpdated(root, updateLane, eventTime) {
28628  root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But
28629  // it's not practical to try every single possible combination. We need a
28630  // heuristic to decide which lanes to attempt to render, and in which batches.
28631  // For now, we use the same heuristic as in the old ExpirationTimes model:
28632  // retry any lane at equal or lower priority, but don't try updates at higher
28633  // priority without also including the lower priority updates. This works well
28634  // when considering updates across different priority levels, but isn't
28635  // sufficient for updates within the same priority, since we want to treat
28636  // those updates as parallel.
28637  // Unsuspend any update at equal or lower priority.
28638
28639  var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111
28640
28641  root.suspendedLanes &= higherPriorityLanes;
28642  root.pingedLanes &= higherPriorityLanes;
28643  var eventTimes = root.eventTimes;
28644  var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most
28645  // recent event, and we assume time is monotonically increasing.
28646
28647  eventTimes[index] = eventTime;
28648}
28649function markRootSuspended(root, suspendedLanes) {
28650  root.suspendedLanes |= suspendedLanes;
28651  root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.
28652
28653  var expirationTimes = root.expirationTimes;
28654  var lanes = suspendedLanes;
28655
28656  while (lanes > 0) {
28657    var index = pickArbitraryLaneIndex(lanes);
28658    var lane = 1 << index;
28659    expirationTimes[index] = NoTimestamp;
28660    lanes &= ~lane;
28661  }
28662}
28663function markRootPinged(root, pingedLanes, eventTime) {
28664  root.pingedLanes |= root.suspendedLanes & pingedLanes;
28665}
28666function markDiscreteUpdatesExpired(root) {
28667  root.expiredLanes |= InputDiscreteLanes & root.pendingLanes;
28668}
28669function hasDiscreteLanes(lanes) {
28670  return (lanes & InputDiscreteLanes) !== NoLanes;
28671}
28672function markRootMutableRead(root, updateLane) {
28673  root.mutableReadLanes |= updateLane & root.pendingLanes;
28674}
28675function markRootFinished(root, remainingLanes) {
28676  var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
28677  root.pendingLanes = remainingLanes; // Let's try everything again
28678
28679  root.suspendedLanes = 0;
28680  root.pingedLanes = 0;
28681  root.expiredLanes &= remainingLanes;
28682  root.mutableReadLanes &= remainingLanes;
28683  root.entangledLanes &= remainingLanes;
28684  var entanglements = root.entanglements;
28685  var eventTimes = root.eventTimes;
28686  var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work
28687
28688  var lanes = noLongerPendingLanes;
28689
28690  while (lanes > 0) {
28691    var index = pickArbitraryLaneIndex(lanes);
28692    var lane = 1 << index;
28693    entanglements[index] = NoLanes;
28694    eventTimes[index] = NoTimestamp;
28695    expirationTimes[index] = NoTimestamp;
28696    lanes &= ~lane;
28697  }
28698}
28699function markRootEntangled(root, entangledLanes) {
28700  root.entangledLanes |= entangledLanes;
28701  var entanglements = root.entanglements;
28702  var lanes = entangledLanes;
28703
28704  while (lanes > 0) {
28705    var index = pickArbitraryLaneIndex(lanes);
28706    var lane = 1 << index;
28707    entanglements[index] |= entangledLanes;
28708    lanes &= ~lane;
28709  }
28710}
28711var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer.
28712// Based on:
28713// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
28714
28715var log = Math.log;
28716var LN2 = Math.LN2;
28717
28718function clz32Fallback(lanes) {
28719  if (lanes === 0) {
28720    return 32;
28721  }
28722
28723  return 31 - (log(lanes) / LN2 | 0) | 0;
28724}
28725
28726// Intentionally not named imports because Rollup would use dynamic dispatch for
28727var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority,
28728    runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?
28729
28730var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.
28731// We'd like to remove this but it's not clear if this is safe.
28732
28733function setEnabled(enabled) {
28734  _enabled = !!enabled;
28735}
28736function isEnabled() {
28737  return _enabled;
28738}
28739function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {
28740  var eventPriority = getEventPriorityForPluginSystem(domEventName);
28741  var listenerWrapper;
28742
28743  switch (eventPriority) {
28744    case DiscreteEvent:
28745      listenerWrapper = dispatchDiscreteEvent;
28746      break;
28747
28748    case UserBlockingEvent:
28749      listenerWrapper = dispatchUserBlockingUpdate;
28750      break;
28751
28752    case ContinuousEvent:
28753    default:
28754      listenerWrapper = dispatchEvent;
28755      break;
28756  }
28757
28758  return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);
28759}
28760
28761function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
28762  {
28763    flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
28764  }
28765
28766  discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent);
28767}
28768
28769function dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) {
28770  {
28771    runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent));
28772  }
28773}
28774
28775function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
28776  if (!_enabled) {
28777    return;
28778  }
28779
28780  var allowReplay = true;
28781
28782  {
28783    // TODO: replaying capture phase events is currently broken
28784    // because we used to do it during top-level native bubble handlers
28785    // but now we use different bubble and capture handlers.
28786    // In eager mode, we attach capture listeners early, so we need
28787    // to filter them out until we fix the logic to handle them correctly.
28788    // This could've been outside the flag but I put it inside to reduce risk.
28789    allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0;
28790  }
28791
28792  if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) {
28793    // If we already have a queue of discrete events, and this is another discrete
28794    // event, then we can't dispatch it regardless of its target, since they
28795    // need to dispatch in order.
28796    queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
28797    domEventName, eventSystemFlags, targetContainer, nativeEvent);
28798    return;
28799  }
28800
28801  var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);
28802
28803  if (blockedOn === null) {
28804    // We successfully dispatched this event.
28805    if (allowReplay) {
28806      clearIfContinuousEvent(domEventName, nativeEvent);
28807    }
28808
28809    return;
28810  }
28811
28812  if (allowReplay) {
28813    if (isReplayableDiscreteEvent(domEventName)) {
28814      // This this to be replayed later once the target is available.
28815      queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
28816      return;
28817    }
28818
28819    if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {
28820      return;
28821    } // We need to clear only if we didn't queue because
28822    // queueing is accummulative.
28823
28824
28825    clearIfContinuousEvent(domEventName, nativeEvent);
28826  } // This is not replayable so we'll invoke it but without a target,
28827  // in case the event system needs to trace it.
28828
28829
28830  dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);
28831} // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
28832
28833function attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
28834  // TODO: Warn if _enabled is false.
28835  var nativeEventTarget = getEventTarget(nativeEvent);
28836  var targetInst = getClosestInstanceFromNode(nativeEventTarget);
28837
28838  if (targetInst !== null) {
28839    var nearestMounted = getNearestMountedFiber(targetInst);
28840
28841    if (nearestMounted === null) {
28842      // This tree has been unmounted already. Dispatch without a target.
28843      targetInst = null;
28844    } else {
28845      var tag = nearestMounted.tag;
28846
28847      if (tag === SuspenseComponent) {
28848        var instance = getSuspenseInstanceFromFiber(nearestMounted);
28849
28850        if (instance !== null) {
28851          // Queue the event to be replayed later. Abort dispatching since we
28852          // don't want this event dispatched twice through the event system.
28853          // TODO: If this is the first discrete event in the queue. Schedule an increased
28854          // priority for this boundary.
28855          return instance;
28856        } // This shouldn't happen, something went wrong but to avoid blocking
28857        // the whole system, dispatch the event without a target.
28858        // TODO: Warn.
28859
28860
28861        targetInst = null;
28862      } else if (tag === HostRoot) {
28863        var root = nearestMounted.stateNode;
28864
28865        if (root.hydrate) {
28866          // If this happens during a replay something went wrong and it might block
28867          // the whole system.
28868          return getContainerFromFiber(nearestMounted);
28869        }
28870
28871        targetInst = null;
28872      } else if (nearestMounted !== targetInst) {
28873        // If we get an event (ex: img onload) before committing that
28874        // component's mount, ignore it for now (that is, treat it as if it was an
28875        // event on a non-React tree). We might also consider queueing events and
28876        // dispatching them after the mount.
28877        targetInst = null;
28878      }
28879    }
28880  }
28881
28882  dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything.
28883
28884  return null;
28885}
28886
28887function addEventBubbleListener(target, eventType, listener) {
28888  target.addEventListener(eventType, listener, false);
28889  return listener;
28890}
28891function addEventCaptureListener(target, eventType, listener) {
28892  target.addEventListener(eventType, listener, true);
28893  return listener;
28894}
28895function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {
28896  target.addEventListener(eventType, listener, {
28897    capture: true,
28898    passive: passive
28899  });
28900  return listener;
28901}
28902function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {
28903  target.addEventListener(eventType, listener, {
28904    passive: passive
28905  });
28906  return listener;
28907}
28908
28909/**
28910 * These variables store information about text content of a target node,
28911 * allowing comparison of content before and after a given event.
28912 *
28913 * Identify the node where selection currently begins, then observe
28914 * both its text content and its current position in the DOM. Since the
28915 * browser may natively replace the target node during composition, we can
28916 * use its position to find its replacement.
28917 *
28918 *
28919 */
28920var root = null;
28921var startText = null;
28922var fallbackText = null;
28923function initialize(nativeEventTarget) {
28924  root = nativeEventTarget;
28925  startText = getText();
28926  return true;
28927}
28928function reset() {
28929  root = null;
28930  startText = null;
28931  fallbackText = null;
28932}
28933function getData() {
28934  if (fallbackText) {
28935    return fallbackText;
28936  }
28937
28938  var start;
28939  var startValue = startText;
28940  var startLength = startValue.length;
28941  var end;
28942  var endValue = getText();
28943  var endLength = endValue.length;
28944
28945  for (start = 0; start < startLength; start++) {
28946    if (startValue[start] !== endValue[start]) {
28947      break;
28948    }
28949  }
28950
28951  var minEnd = startLength - start;
28952
28953  for (end = 1; end <= minEnd; end++) {
28954    if (startValue[startLength - end] !== endValue[endLength - end]) {
28955      break;
28956    }
28957  }
28958
28959  var sliceTail = end > 1 ? 1 - end : undefined;
28960  fallbackText = endValue.slice(start, sliceTail);
28961  return fallbackText;
28962}
28963function getText() {
28964  if ('value' in root) {
28965    return root.value;
28966  }
28967
28968  return root.textContent;
28969}
28970
28971/**
28972 * `charCode` represents the actual "character code" and is safe to use with
28973 * `String.fromCharCode`. As such, only keys that correspond to printable
28974 * characters produce a valid `charCode`, the only exception to this is Enter.
28975 * The Tab-key is considered non-printable and does not have a `charCode`,
28976 * presumably because it does not produce a tab-character in browsers.
28977 *
28978 * @param {object} nativeEvent Native browser event.
28979 * @return {number} Normalized `charCode` property.
28980 */
28981function getEventCharCode(nativeEvent) {
28982  var charCode;
28983  var keyCode = nativeEvent.keyCode;
28984
28985  if ('charCode' in nativeEvent) {
28986    charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
28987
28988    if (charCode === 0 && keyCode === 13) {
28989      charCode = 13;
28990    }
28991  } else {
28992    // IE8 does not implement `charCode`, but `keyCode` has the correct value.
28993    charCode = keyCode;
28994  } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
28995  // report Enter as charCode 10 when ctrl is pressed.
28996
28997
28998  if (charCode === 10) {
28999    charCode = 13;
29000  } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
29001  // Must not discard the (non-)printable Enter-key.
29002
29003
29004  if (charCode >= 32 || charCode === 13) {
29005    return charCode;
29006  }
29007
29008  return 0;
29009}
29010
29011function functionThatReturnsTrue() {
29012  return true;
29013}
29014
29015function functionThatReturnsFalse() {
29016  return false;
29017} // This is intentionally a factory so that we have different returned constructors.
29018// If we had a single constructor, it would be megamorphic and engines would deopt.
29019
29020
29021function createSyntheticEvent(Interface) {
29022  /**
29023   * Synthetic events are dispatched by event plugins, typically in response to a
29024   * top-level event delegation handler.
29025   *
29026   * These systems should generally use pooling to reduce the frequency of garbage
29027   * collection. The system should check `isPersistent` to determine whether the
29028   * event should be released into the pool after being dispatched. Users that
29029   * need a persisted event should invoke `persist`.
29030   *
29031   * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
29032   * normalizing browser quirks. Subclasses do not necessarily have to implement a
29033   * DOM interface; custom application-specific events can also subclass this.
29034   */
29035  function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
29036    this._reactName = reactName;
29037    this._targetInst = targetInst;
29038    this.type = reactEventType;
29039    this.nativeEvent = nativeEvent;
29040    this.target = nativeEventTarget;
29041    this.currentTarget = null;
29042
29043    for (var _propName in Interface) {
29044      if (!Interface.hasOwnProperty(_propName)) {
29045        continue;
29046      }
29047
29048      var normalize = Interface[_propName];
29049
29050      if (normalize) {
29051        this[_propName] = normalize(nativeEvent);
29052      } else {
29053        this[_propName] = nativeEvent[_propName];
29054      }
29055    }
29056
29057    var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
29058
29059    if (defaultPrevented) {
29060      this.isDefaultPrevented = functionThatReturnsTrue;
29061    } else {
29062      this.isDefaultPrevented = functionThatReturnsFalse;
29063    }
29064
29065    this.isPropagationStopped = functionThatReturnsFalse;
29066    return this;
29067  }
29068
29069  _assign(SyntheticBaseEvent.prototype, {
29070    preventDefault: function () {
29071      this.defaultPrevented = true;
29072      var event = this.nativeEvent;
29073
29074      if (!event) {
29075        return;
29076      }
29077
29078      if (event.preventDefault) {
29079        event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
29080      } else if (typeof event.returnValue !== 'unknown') {
29081        event.returnValue = false;
29082      }
29083
29084      this.isDefaultPrevented = functionThatReturnsTrue;
29085    },
29086    stopPropagation: function () {
29087      var event = this.nativeEvent;
29088
29089      if (!event) {
29090        return;
29091      }
29092
29093      if (event.stopPropagation) {
29094        event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
29095      } else if (typeof event.cancelBubble !== 'unknown') {
29096        // The ChangeEventPlugin registers a "propertychange" event for
29097        // IE. This event does not support bubbling or cancelling, and
29098        // any references to cancelBubble throw "Member not found".  A
29099        // typeof check of "unknown" circumvents this issue (and is also
29100        // IE specific).
29101        event.cancelBubble = true;
29102      }
29103
29104      this.isPropagationStopped = functionThatReturnsTrue;
29105    },
29106
29107    /**
29108     * We release all dispatched `SyntheticEvent`s after each event loop, adding
29109     * them back into the pool. This allows a way to hold onto a reference that
29110     * won't be added back into the pool.
29111     */
29112    persist: function () {// Modern event system doesn't use pooling.
29113    },
29114
29115    /**
29116     * Checks if this event should be released back into the pool.
29117     *
29118     * @return {boolean} True if this should not be released, false otherwise.
29119     */
29120    isPersistent: functionThatReturnsTrue
29121  });
29122
29123  return SyntheticBaseEvent;
29124}
29125/**
29126 * @interface Event
29127 * @see http://www.w3.org/TR/DOM-Level-3-Events/
29128 */
29129
29130
29131var EventInterface = {
29132  eventPhase: 0,
29133  bubbles: 0,
29134  cancelable: 0,
29135  timeStamp: function (event) {
29136    return event.timeStamp || Date.now();
29137  },
29138  defaultPrevented: 0,
29139  isTrusted: 0
29140};
29141var SyntheticEvent = createSyntheticEvent(EventInterface);
29142
29143var UIEventInterface = _assign({}, EventInterface, {
29144  view: 0,
29145  detail: 0
29146});
29147
29148var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
29149var lastMovementX;
29150var lastMovementY;
29151var lastMouseEvent;
29152
29153function updateMouseMovementPolyfillState(event) {
29154  if (event !== lastMouseEvent) {
29155    if (lastMouseEvent && event.type === 'mousemove') {
29156      lastMovementX = event.screenX - lastMouseEvent.screenX;
29157      lastMovementY = event.screenY - lastMouseEvent.screenY;
29158    } else {
29159      lastMovementX = 0;
29160      lastMovementY = 0;
29161    }
29162
29163    lastMouseEvent = event;
29164  }
29165}
29166/**
29167 * @interface MouseEvent
29168 * @see http://www.w3.org/TR/DOM-Level-3-Events/
29169 */
29170
29171
29172var MouseEventInterface = _assign({}, UIEventInterface, {
29173  screenX: 0,
29174  screenY: 0,
29175  clientX: 0,
29176  clientY: 0,
29177  pageX: 0,
29178  pageY: 0,
29179  ctrlKey: 0,
29180  shiftKey: 0,
29181  altKey: 0,
29182  metaKey: 0,
29183  getModifierState: getEventModifierState,
29184  button: 0,
29185  buttons: 0,
29186  relatedTarget: function (event) {
29187    if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
29188    return event.relatedTarget;
29189  },
29190  movementX: function (event) {
29191    if ('movementX' in event) {
29192      return event.movementX;
29193    }
29194
29195    updateMouseMovementPolyfillState(event);
29196    return lastMovementX;
29197  },
29198  movementY: function (event) {
29199    if ('movementY' in event) {
29200      return event.movementY;
29201    } // Don't need to call updateMouseMovementPolyfillState() here
29202    // because it's guaranteed to have already run when movementX
29203    // was copied.
29204
29205
29206    return lastMovementY;
29207  }
29208});
29209
29210var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
29211/**
29212 * @interface DragEvent
29213 * @see http://www.w3.org/TR/DOM-Level-3-Events/
29214 */
29215
29216var DragEventInterface = _assign({}, MouseEventInterface, {
29217  dataTransfer: 0
29218});
29219
29220var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
29221/**
29222 * @interface FocusEvent
29223 * @see http://www.w3.org/TR/DOM-Level-3-Events/
29224 */
29225
29226var FocusEventInterface = _assign({}, UIEventInterface, {
29227  relatedTarget: 0
29228});
29229
29230var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
29231/**
29232 * @interface Event
29233 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
29234 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
29235 */
29236
29237var AnimationEventInterface = _assign({}, EventInterface, {
29238  animationName: 0,
29239  elapsedTime: 0,
29240  pseudoElement: 0
29241});
29242
29243var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
29244/**
29245 * @interface Event
29246 * @see http://www.w3.org/TR/clipboard-apis/
29247 */
29248
29249var ClipboardEventInterface = _assign({}, EventInterface, {
29250  clipboardData: function (event) {
29251    return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
29252  }
29253});
29254
29255var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
29256/**
29257 * @interface Event
29258 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
29259 */
29260
29261var CompositionEventInterface = _assign({}, EventInterface, {
29262  data: 0
29263});
29264
29265var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
29266/**
29267 * @interface Event
29268 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
29269 *      /#events-inputevents
29270 */
29271// Happens to share the same list for now.
29272
29273var SyntheticInputEvent = SyntheticCompositionEvent;
29274/**
29275 * Normalization of deprecated HTML5 `key` values
29276 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
29277 */
29278
29279var normalizeKey = {
29280  Esc: 'Escape',
29281  Spacebar: ' ',
29282  Left: 'ArrowLeft',
29283  Up: 'ArrowUp',
29284  Right: 'ArrowRight',
29285  Down: 'ArrowDown',
29286  Del: 'Delete',
29287  Win: 'OS',
29288  Menu: 'ContextMenu',
29289  Apps: 'ContextMenu',
29290  Scroll: 'ScrollLock',
29291  MozPrintableKey: 'Unidentified'
29292};
29293/**
29294 * Translation from legacy `keyCode` to HTML5 `key`
29295 * Only special keys supported, all others depend on keyboard layout or browser
29296 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
29297 */
29298
29299var translateToKey = {
29300  '8': 'Backspace',
29301  '9': 'Tab',
29302  '12': 'Clear',
29303  '13': 'Enter',
29304  '16': 'Shift',
29305  '17': 'Control',
29306  '18': 'Alt',
29307  '19': 'Pause',
29308  '20': 'CapsLock',
29309  '27': 'Escape',
29310  '32': ' ',
29311  '33': 'PageUp',
29312  '34': 'PageDown',
29313  '35': 'End',
29314  '36': 'Home',
29315  '37': 'ArrowLeft',
29316  '38': 'ArrowUp',
29317  '39': 'ArrowRight',
29318  '40': 'ArrowDown',
29319  '45': 'Insert',
29320  '46': 'Delete',
29321  '112': 'F1',
29322  '113': 'F2',
29323  '114': 'F3',
29324  '115': 'F4',
29325  '116': 'F5',
29326  '117': 'F6',
29327  '118': 'F7',
29328  '119': 'F8',
29329  '120': 'F9',
29330  '121': 'F10',
29331  '122': 'F11',
29332  '123': 'F12',
29333  '144': 'NumLock',
29334  '145': 'ScrollLock',
29335  '224': 'Meta'
29336};
29337/**
29338 * @param {object} nativeEvent Native browser event.
29339 * @return {string} Normalized `key` property.
29340 */
29341
29342function getEventKey(nativeEvent) {
29343  if (nativeEvent.key) {
29344    // Normalize inconsistent values reported by browsers due to
29345    // implementations of a working draft specification.
29346    // FireFox implements `key` but returns `MozPrintableKey` for all
29347    // printable characters (normalized to `Unidentified`), ignore it.
29348    var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
29349
29350    if (key !== 'Unidentified') {
29351      return key;
29352    }
29353  } // Browser does not implement `key`, polyfill as much of it as we can.
29354
29355
29356  if (nativeEvent.type === 'keypress') {
29357    var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
29358    // thus be captured by `keypress`, no other non-printable key should.
29359
29360    return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
29361  }
29362
29363  if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
29364    // While user keyboard layout determines the actual meaning of each
29365    // `keyCode` value, almost all function keys have a universal value.
29366    return translateToKey[nativeEvent.keyCode] || 'Unidentified';
29367  }
29368
29369  return '';
29370}
29371/**
29372 * Translation from modifier key to the associated property in the event.
29373 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
29374 */
29375
29376
29377var modifierKeyToProp = {
29378  Alt: 'altKey',
29379  Control: 'ctrlKey',
29380  Meta: 'metaKey',
29381  Shift: 'shiftKey'
29382}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
29383// getModifierState. If getModifierState is not supported, we map it to a set of
29384// modifier keys exposed by the event. In this case, Lock-keys are not supported.
29385
29386function modifierStateGetter(keyArg) {
29387  var syntheticEvent = this;
29388  var nativeEvent = syntheticEvent.nativeEvent;
29389
29390  if (nativeEvent.getModifierState) {
29391    return nativeEvent.getModifierState(keyArg);
29392  }
29393
29394  var keyProp = modifierKeyToProp[keyArg];
29395  return keyProp ? !!nativeEvent[keyProp] : false;
29396}
29397
29398function getEventModifierState(nativeEvent) {
29399  return modifierStateGetter;
29400}
29401/**
29402 * @interface KeyboardEvent
29403 * @see http://www.w3.org/TR/DOM-Level-3-Events/
29404 */
29405
29406
29407var KeyboardEventInterface = _assign({}, UIEventInterface, {
29408  key: getEventKey,
29409  code: 0,
29410  location: 0,
29411  ctrlKey: 0,
29412  shiftKey: 0,
29413  altKey: 0,
29414  metaKey: 0,
29415  repeat: 0,
29416  locale: 0,
29417  getModifierState: getEventModifierState,
29418  // Legacy Interface
29419  charCode: function (event) {
29420    // `charCode` is the result of a KeyPress event and represents the value of
29421    // the actual printable character.
29422    // KeyPress is deprecated, but its replacement is not yet final and not
29423    // implemented in any major browser. Only KeyPress has charCode.
29424    if (event.type === 'keypress') {
29425      return getEventCharCode(event);
29426    }
29427
29428    return 0;
29429  },
29430  keyCode: function (event) {
29431    // `keyCode` is the result of a KeyDown/Up event and represents the value of
29432    // physical keyboard key.
29433    // The actual meaning of the value depends on the users' keyboard layout
29434    // which cannot be detected. Assuming that it is a US keyboard layout
29435    // provides a surprisingly accurate mapping for US and European users.
29436    // Due to this, it is left to the user to implement at this time.
29437    if (event.type === 'keydown' || event.type === 'keyup') {
29438      return event.keyCode;
29439    }
29440
29441    return 0;
29442  },
29443  which: function (event) {
29444    // `which` is an alias for either `keyCode` or `charCode` depending on the
29445    // type of the event.
29446    if (event.type === 'keypress') {
29447      return getEventCharCode(event);
29448    }
29449
29450    if (event.type === 'keydown' || event.type === 'keyup') {
29451      return event.keyCode;
29452    }
29453
29454    return 0;
29455  }
29456});
29457
29458var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
29459/**
29460 * @interface PointerEvent
29461 * @see http://www.w3.org/TR/pointerevents/
29462 */
29463
29464var PointerEventInterface = _assign({}, MouseEventInterface, {
29465  pointerId: 0,
29466  width: 0,
29467  height: 0,
29468  pressure: 0,
29469  tangentialPressure: 0,
29470  tiltX: 0,
29471  tiltY: 0,
29472  twist: 0,
29473  pointerType: 0,
29474  isPrimary: 0
29475});
29476
29477var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
29478/**
29479 * @interface TouchEvent
29480 * @see http://www.w3.org/TR/touch-events/
29481 */
29482
29483var TouchEventInterface = _assign({}, UIEventInterface, {
29484  touches: 0,
29485  targetTouches: 0,
29486  changedTouches: 0,
29487  altKey: 0,
29488  metaKey: 0,
29489  ctrlKey: 0,
29490  shiftKey: 0,
29491  getModifierState: getEventModifierState
29492});
29493
29494var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
29495/**
29496 * @interface Event
29497 * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
29498 * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
29499 */
29500
29501var TransitionEventInterface = _assign({}, EventInterface, {
29502  propertyName: 0,
29503  elapsedTime: 0,
29504  pseudoElement: 0
29505});
29506
29507var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
29508/**
29509 * @interface WheelEvent
29510 * @see http://www.w3.org/TR/DOM-Level-3-Events/
29511 */
29512
29513var WheelEventInterface = _assign({}, MouseEventInterface, {
29514  deltaX: function (event) {
29515    return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
29516    'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
29517  },
29518  deltaY: function (event) {
29519    return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
29520    'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
29521    'wheelDelta' in event ? -event.wheelDelta : 0;
29522  },
29523  deltaZ: 0,
29524  // Browsers without "deltaMode" is reporting in raw wheel delta where one
29525  // notch on the scroll is always +/- 120, roughly equivalent to pixels.
29526  // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
29527  // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
29528  deltaMode: 0
29529});
29530
29531var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
29532
29533var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
29534
29535var START_KEYCODE = 229;
29536var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
29537var documentMode = null;
29538
29539if (canUseDOM && 'documentMode' in document) {
29540  documentMode = document.documentMode;
29541} // Webkit offers a very useful `textInput` event that can be used to
29542// directly represent `beforeInput`. The IE `textinput` event is not as
29543// useful, so we don't use it.
29544
29545
29546var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
29547// by the native compositionend event may be incorrect. Japanese ideographic
29548// spaces, for instance (\u3000) are not recorded correctly.
29549
29550var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
29551var SPACEBAR_CODE = 32;
29552var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
29553
29554function registerEvents() {
29555  registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);
29556  registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
29557  registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
29558  registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
29559} // Track whether we've ever handled a keypress on the space key.
29560
29561
29562var hasSpaceKeypress = false;
29563/**
29564 * Return whether a native keypress event is assumed to be a command.
29565 * This is required because Firefox fires `keypress` events for key commands
29566 * (cut, copy, select-all, etc.) even though no character is inserted.
29567 */
29568
29569function isKeypressCommand(nativeEvent) {
29570  return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
29571  !(nativeEvent.ctrlKey && nativeEvent.altKey);
29572}
29573/**
29574 * Translate native top level events into event types.
29575 */
29576
29577
29578function getCompositionEventType(domEventName) {
29579  switch (domEventName) {
29580    case 'compositionstart':
29581      return 'onCompositionStart';
29582
29583    case 'compositionend':
29584      return 'onCompositionEnd';
29585
29586    case 'compositionupdate':
29587      return 'onCompositionUpdate';
29588  }
29589}
29590/**
29591 * Does our fallback best-guess model think this event signifies that
29592 * composition has begun?
29593 */
29594
29595
29596function isFallbackCompositionStart(domEventName, nativeEvent) {
29597  return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;
29598}
29599/**
29600 * Does our fallback mode think that this event is the end of composition?
29601 */
29602
29603
29604function isFallbackCompositionEnd(domEventName, nativeEvent) {
29605  switch (domEventName) {
29606    case 'keyup':
29607      // Command keys insert or clear IME input.
29608      return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
29609
29610    case 'keydown':
29611      // Expect IME keyCode on each keydown. If we get any other
29612      // code we must have exited earlier.
29613      return nativeEvent.keyCode !== START_KEYCODE;
29614
29615    case 'keypress':
29616    case 'mousedown':
29617    case 'focusout':
29618      // Events are not possible without cancelling IME.
29619      return true;
29620
29621    default:
29622      return false;
29623  }
29624}
29625/**
29626 * Google Input Tools provides composition data via a CustomEvent,
29627 * with the `data` property populated in the `detail` object. If this
29628 * is available on the event object, use it. If not, this is a plain
29629 * composition event and we have nothing special to extract.
29630 *
29631 * @param {object} nativeEvent
29632 * @return {?string}
29633 */
29634
29635
29636function getDataFromCustomEvent(nativeEvent) {
29637  var detail = nativeEvent.detail;
29638
29639  if (typeof detail === 'object' && 'data' in detail) {
29640    return detail.data;
29641  }
29642
29643  return null;
29644}
29645/**
29646 * Check if a composition event was triggered by Korean IME.
29647 * Our fallback mode does not work well with IE's Korean IME,
29648 * so just use native composition events when Korean IME is used.
29649 * Although CompositionEvent.locale property is deprecated,
29650 * it is available in IE, where our fallback mode is enabled.
29651 *
29652 * @param {object} nativeEvent
29653 * @return {boolean}
29654 */
29655
29656
29657function isUsingKoreanIME(nativeEvent) {
29658  return nativeEvent.locale === 'ko';
29659} // Track the current IME composition status, if any.
29660
29661
29662var isComposing = false;
29663/**
29664 * @return {?object} A SyntheticCompositionEvent.
29665 */
29666
29667function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
29668  var eventType;
29669  var fallbackData;
29670
29671  if (canUseCompositionEvent) {
29672    eventType = getCompositionEventType(domEventName);
29673  } else if (!isComposing) {
29674    if (isFallbackCompositionStart(domEventName, nativeEvent)) {
29675      eventType = 'onCompositionStart';
29676    }
29677  } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {
29678    eventType = 'onCompositionEnd';
29679  }
29680
29681  if (!eventType) {
29682    return null;
29683  }
29684
29685  if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
29686    // The current composition is stored statically and must not be
29687    // overwritten while composition continues.
29688    if (!isComposing && eventType === 'onCompositionStart') {
29689      isComposing = initialize(nativeEventTarget);
29690    } else if (eventType === 'onCompositionEnd') {
29691      if (isComposing) {
29692        fallbackData = getData();
29693      }
29694    }
29695  }
29696
29697  var listeners = accumulateTwoPhaseListeners(targetInst, eventType);
29698
29699  if (listeners.length > 0) {
29700    var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);
29701    dispatchQueue.push({
29702      event: event,
29703      listeners: listeners
29704    });
29705
29706    if (fallbackData) {
29707      // Inject data generated from fallback path into the synthetic event.
29708      // This matches the property of native CompositionEventInterface.
29709      event.data = fallbackData;
29710    } else {
29711      var customData = getDataFromCustomEvent(nativeEvent);
29712
29713      if (customData !== null) {
29714        event.data = customData;
29715      }
29716    }
29717  }
29718}
29719
29720function getNativeBeforeInputChars(domEventName, nativeEvent) {
29721  switch (domEventName) {
29722    case 'compositionend':
29723      return getDataFromCustomEvent(nativeEvent);
29724
29725    case 'keypress':
29726      /**
29727       * If native `textInput` events are available, our goal is to make
29728       * use of them. However, there is a special case: the spacebar key.
29729       * In Webkit, preventing default on a spacebar `textInput` event
29730       * cancels character insertion, but it *also* causes the browser
29731       * to fall back to its default spacebar behavior of scrolling the
29732       * page.
29733       *
29734       * Tracking at:
29735       * https://code.google.com/p/chromium/issues/detail?id=355103
29736       *
29737       * To avoid this issue, use the keypress event as if no `textInput`
29738       * event is available.
29739       */
29740      var which = nativeEvent.which;
29741
29742      if (which !== SPACEBAR_CODE) {
29743        return null;
29744      }
29745
29746      hasSpaceKeypress = true;
29747      return SPACEBAR_CHAR;
29748
29749    case 'textInput':
29750      // Record the characters to be added to the DOM.
29751      var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
29752      // it at the keypress level and bail immediately. Android Chrome
29753      // doesn't give us keycodes, so we need to ignore it.
29754
29755      if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
29756        return null;
29757      }
29758
29759      return chars;
29760
29761    default:
29762      // For other native event types, do nothing.
29763      return null;
29764  }
29765}
29766/**
29767 * For browsers that do not provide the `textInput` event, extract the
29768 * appropriate string to use for SyntheticInputEvent.
29769 */
29770
29771
29772function getFallbackBeforeInputChars(domEventName, nativeEvent) {
29773  // If we are currently composing (IME) and using a fallback to do so,
29774  // try to extract the composed characters from the fallback object.
29775  // If composition event is available, we extract a string only at
29776  // compositionevent, otherwise extract it at fallback events.
29777  if (isComposing) {
29778    if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {
29779      var chars = getData();
29780      reset();
29781      isComposing = false;
29782      return chars;
29783    }
29784
29785    return null;
29786  }
29787
29788  switch (domEventName) {
29789    case 'paste':
29790      // If a paste event occurs after a keypress, throw out the input
29791      // chars. Paste events should not lead to BeforeInput events.
29792      return null;
29793
29794    case 'keypress':
29795      /**
29796       * As of v27, Firefox may fire keypress events even when no character
29797       * will be inserted. A few possibilities:
29798       *
29799       * - `which` is `0`. Arrow keys, Esc key, etc.
29800       *
29801       * - `which` is the pressed key code, but no char is available.
29802       *   Ex: 'AltGr + d` in Polish. There is no modified character for
29803       *   this key combination and no character is inserted into the
29804       *   document, but FF fires the keypress for char code `100` anyway.
29805       *   No `input` event will occur.
29806       *
29807       * - `which` is the pressed key code, but a command combination is
29808       *   being used. Ex: `Cmd+C`. No character is inserted, and no
29809       *   `input` event will occur.
29810       */
29811      if (!isKeypressCommand(nativeEvent)) {
29812        // IE fires the `keypress` event when a user types an emoji via
29813        // Touch keyboard of Windows.  In such a case, the `char` property
29814        // holds an emoji character like `\uD83D\uDE0A`.  Because its length
29815        // is 2, the property `which` does not represent an emoji correctly.
29816        // In such a case, we directly return the `char` property instead of
29817        // using `which`.
29818        if (nativeEvent.char && nativeEvent.char.length > 1) {
29819          return nativeEvent.char;
29820        } else if (nativeEvent.which) {
29821          return String.fromCharCode(nativeEvent.which);
29822        }
29823      }
29824
29825      return null;
29826
29827    case 'compositionend':
29828      return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
29829
29830    default:
29831      return null;
29832  }
29833}
29834/**
29835 * Extract a SyntheticInputEvent for `beforeInput`, based on either native
29836 * `textInput` or fallback behavior.
29837 *
29838 * @return {?object} A SyntheticInputEvent.
29839 */
29840
29841
29842function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
29843  var chars;
29844
29845  if (canUseTextInputEvent) {
29846    chars = getNativeBeforeInputChars(domEventName, nativeEvent);
29847  } else {
29848    chars = getFallbackBeforeInputChars(domEventName, nativeEvent);
29849  } // If no characters are being inserted, no BeforeInput event should
29850  // be fired.
29851
29852
29853  if (!chars) {
29854    return null;
29855  }
29856
29857  var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');
29858
29859  if (listeners.length > 0) {
29860    var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);
29861    dispatchQueue.push({
29862      event: event,
29863      listeners: listeners
29864    });
29865    event.data = chars;
29866  }
29867}
29868/**
29869 * Create an `onBeforeInput` event to match
29870 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
29871 *
29872 * This event plugin is based on the native `textInput` event
29873 * available in Chrome, Safari, Opera, and IE. This event fires after
29874 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
29875 *
29876 * `beforeInput` is spec'd but not implemented in any browsers, and
29877 * the `input` event does not provide any useful information about what has
29878 * actually been added, contrary to the spec. Thus, `textInput` is the best
29879 * available event to identify the characters that have actually been inserted
29880 * into the target node.
29881 *
29882 * This plugin is also responsible for emitting `composition` events, thus
29883 * allowing us to share composition fallback code for both `beforeInput` and
29884 * `composition` event types.
29885 */
29886
29887
29888function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
29889  extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
29890  extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
29891}
29892
29893/**
29894 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
29895 */
29896var supportedInputTypes = {
29897  color: true,
29898  date: true,
29899  datetime: true,
29900  'datetime-local': true,
29901  email: true,
29902  month: true,
29903  number: true,
29904  password: true,
29905  range: true,
29906  search: true,
29907  tel: true,
29908  text: true,
29909  time: true,
29910  url: true,
29911  week: true
29912};
29913
29914function isTextInputElement(elem) {
29915  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
29916
29917  if (nodeName === 'input') {
29918    return !!supportedInputTypes[elem.type];
29919  }
29920
29921  if (nodeName === 'textarea') {
29922    return true;
29923  }
29924
29925  return false;
29926}
29927
29928/**
29929 * Checks if an event is supported in the current execution environment.
29930 *
29931 * NOTE: This will not work correctly for non-generic events such as `change`,
29932 * `reset`, `load`, `error`, and `select`.
29933 *
29934 * Borrows from Modernizr.
29935 *
29936 * @param {string} eventNameSuffix Event name, e.g. "click".
29937 * @return {boolean} True if the event is supported.
29938 * @internal
29939 * @license Modernizr 3.0.0pre (Custom Build) | MIT
29940 */
29941
29942function isEventSupported(eventNameSuffix) {
29943  if (!canUseDOM) {
29944    return false;
29945  }
29946
29947  var eventName = 'on' + eventNameSuffix;
29948  var isSupported = (eventName in document);
29949
29950  if (!isSupported) {
29951    var element = document.createElement('div');
29952    element.setAttribute(eventName, 'return;');
29953    isSupported = typeof element[eventName] === 'function';
29954  }
29955
29956  return isSupported;
29957}
29958
29959function registerEvents$1() {
29960  registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);
29961}
29962
29963function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
29964  // Flag this event loop as needing state restore.
29965  enqueueStateRestore(target);
29966  var listeners = accumulateTwoPhaseListeners(inst, 'onChange');
29967
29968  if (listeners.length > 0) {
29969    var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);
29970    dispatchQueue.push({
29971      event: event,
29972      listeners: listeners
29973    });
29974  }
29975}
29976/**
29977 * For IE shims
29978 */
29979
29980
29981var activeElement = null;
29982var activeElementInst = null;
29983/**
29984 * SECTION: handle `change` event
29985 */
29986
29987function shouldUseChangeEvent(elem) {
29988  var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
29989  return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
29990}
29991
29992function manualDispatchChangeEvent(nativeEvent) {
29993  var dispatchQueue = [];
29994  createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
29995  // other events and have it go through ReactBrowserEventEmitter. Since it
29996  // doesn't, we manually listen for the events and so we have to enqueue and
29997  // process the abstract event manually.
29998  //
29999  // Batching is necessary here in order to ensure that all event handlers run
30000  // before the next rerender (including event handlers attached to ancestor
30001  // elements instead of directly on the input). Without this, controlled
30002  // components don't work properly in conjunction with event bubbling because
30003  // the component is rerendered and the value reverted before all the event
30004  // handlers can run. See https://github.com/facebook/react/issues/708.
30005
30006  batchedUpdates(runEventInBatch, dispatchQueue);
30007}
30008
30009function runEventInBatch(dispatchQueue) {
30010  processDispatchQueue(dispatchQueue, 0);
30011}
30012
30013function getInstIfValueChanged(targetInst) {
30014  var targetNode = getNodeFromInstance(targetInst);
30015
30016  if (updateValueIfChanged(targetNode)) {
30017    return targetInst;
30018  }
30019}
30020
30021function getTargetInstForChangeEvent(domEventName, targetInst) {
30022  if (domEventName === 'change') {
30023    return targetInst;
30024  }
30025}
30026/**
30027 * SECTION: handle `input` event
30028 */
30029
30030
30031var isInputEventSupported = false;
30032
30033if (canUseDOM) {
30034  // IE9 claims to support the input event but fails to trigger it when
30035  // deleting text, so we ignore its input events.
30036  isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
30037}
30038/**
30039 * (For IE <=9) Starts tracking propertychange events on the passed-in element
30040 * and override the value property so that we can distinguish user events from
30041 * value changes in JS.
30042 */
30043
30044
30045function startWatchingForValueChange(target, targetInst) {
30046  activeElement = target;
30047  activeElementInst = targetInst;
30048  activeElement.attachEvent('onpropertychange', handlePropertyChange);
30049}
30050/**
30051 * (For IE <=9) Removes the event listeners from the currently-tracked element,
30052 * if any exists.
30053 */
30054
30055
30056function stopWatchingForValueChange() {
30057  if (!activeElement) {
30058    return;
30059  }
30060
30061  activeElement.detachEvent('onpropertychange', handlePropertyChange);
30062  activeElement = null;
30063  activeElementInst = null;
30064}
30065/**
30066 * (For IE <=9) Handles a propertychange event, sending a `change` event if
30067 * the value of the active element has changed.
30068 */
30069
30070
30071function handlePropertyChange(nativeEvent) {
30072  if (nativeEvent.propertyName !== 'value') {
30073    return;
30074  }
30075
30076  if (getInstIfValueChanged(activeElementInst)) {
30077    manualDispatchChangeEvent(nativeEvent);
30078  }
30079}
30080
30081function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
30082  if (domEventName === 'focusin') {
30083    // In IE9, propertychange fires for most input events but is buggy and
30084    // doesn't fire when text is deleted, but conveniently, selectionchange
30085    // appears to fire in all of the remaining cases so we catch those and
30086    // forward the event if the value has changed
30087    // In either case, we don't want to call the event handler if the value
30088    // is changed from JS so we redefine a setter for `.value` that updates
30089    // our activeElementValue variable, allowing us to ignore those changes
30090    //
30091    // stopWatching() should be a noop here but we call it just in case we
30092    // missed a blur event somehow.
30093    stopWatchingForValueChange();
30094    startWatchingForValueChange(target, targetInst);
30095  } else if (domEventName === 'focusout') {
30096    stopWatchingForValueChange();
30097  }
30098} // For IE8 and IE9.
30099
30100
30101function getTargetInstForInputEventPolyfill(domEventName, targetInst) {
30102  if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {
30103    // On the selectionchange event, the target is just document which isn't
30104    // helpful for us so just check activeElement instead.
30105    //
30106    // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
30107    // propertychange on the first input event after setting `value` from a
30108    // script and fires only keydown, keypress, keyup. Catching keyup usually
30109    // gets it and catching keydown lets us fire an event for the first
30110    // keystroke if user does a key repeat (it'll be a little delayed: right
30111    // before the second keystroke). Other input methods (e.g., paste) seem to
30112    // fire selectionchange normally.
30113    return getInstIfValueChanged(activeElementInst);
30114  }
30115}
30116/**
30117 * SECTION: handle `click` event
30118 */
30119
30120
30121function shouldUseClickEvent(elem) {
30122  // Use the `click` event to detect changes to checkbox and radio inputs.
30123  // This approach works across all browsers, whereas `change` does not fire
30124  // until `blur` in IE8.
30125  var nodeName = elem.nodeName;
30126  return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
30127}
30128
30129function getTargetInstForClickEvent(domEventName, targetInst) {
30130  if (domEventName === 'click') {
30131    return getInstIfValueChanged(targetInst);
30132  }
30133}
30134
30135function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
30136  if (domEventName === 'input' || domEventName === 'change') {
30137    return getInstIfValueChanged(targetInst);
30138  }
30139}
30140
30141function handleControlledInputBlur(node) {
30142  var state = node._wrapperState;
30143
30144  if (!state || !state.controlled || node.type !== 'number') {
30145    return;
30146  }
30147
30148  {
30149    // If controlled, assign the value attribute to the current value on blur
30150    setDefaultValue(node, 'number', node.value);
30151  }
30152}
30153/**
30154 * This plugin creates an `onChange` event that normalizes change events
30155 * across form elements. This event fires at a time when it's possible to
30156 * change the element's value without seeing a flicker.
30157 *
30158 * Supported elements are:
30159 * - input (see `isTextInputElement`)
30160 * - textarea
30161 * - select
30162 */
30163
30164
30165function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
30166  var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
30167  var getTargetInstFunc, handleEventFunc;
30168
30169  if (shouldUseChangeEvent(targetNode)) {
30170    getTargetInstFunc = getTargetInstForChangeEvent;
30171  } else if (isTextInputElement(targetNode)) {
30172    if (isInputEventSupported) {
30173      getTargetInstFunc = getTargetInstForInputOrChangeEvent;
30174    } else {
30175      getTargetInstFunc = getTargetInstForInputEventPolyfill;
30176      handleEventFunc = handleEventsForInputEventPolyfill;
30177    }
30178  } else if (shouldUseClickEvent(targetNode)) {
30179    getTargetInstFunc = getTargetInstForClickEvent;
30180  }
30181
30182  if (getTargetInstFunc) {
30183    var inst = getTargetInstFunc(domEventName, targetInst);
30184
30185    if (inst) {
30186      createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);
30187      return;
30188    }
30189  }
30190
30191  if (handleEventFunc) {
30192    handleEventFunc(domEventName, targetNode, targetInst);
30193  } // When blurring, set the value attribute for number inputs
30194
30195
30196  if (domEventName === 'focusout') {
30197    handleControlledInputBlur(targetNode);
30198  }
30199}
30200
30201function registerEvents$2() {
30202  registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);
30203  registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);
30204  registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);
30205  registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);
30206}
30207/**
30208 * For almost every interaction we care about, there will be both a top-level
30209 * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
30210 * we do not extract duplicate events. However, moving the mouse into the
30211 * browser from outside will not fire a `mouseout` event. In this case, we use
30212 * the `mouseover` top-level event.
30213 */
30214
30215
30216function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
30217  var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';
30218  var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';
30219
30220  if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) {
30221    // If this is an over event with a target, we might have already dispatched
30222    // the event in the out event of the other target. If this is replayed,
30223    // then it's because we couldn't dispatch against this target previously
30224    // so we have to do it now instead.
30225    var related = nativeEvent.relatedTarget || nativeEvent.fromElement;
30226
30227    if (related) {
30228      // If the related node is managed by React, we can assume that we have
30229      // already dispatched the corresponding events during its mouseout.
30230      if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {
30231        return;
30232      }
30233    }
30234  }
30235
30236  if (!isOutEvent && !isOverEvent) {
30237    // Must not be a mouse or pointer in or out - ignoring.
30238    return;
30239  }
30240
30241  var win; // TODO: why is this nullable in the types but we read from it?
30242
30243  if (nativeEventTarget.window === nativeEventTarget) {
30244    // `nativeEventTarget` is probably a window object.
30245    win = nativeEventTarget;
30246  } else {
30247    // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
30248    var doc = nativeEventTarget.ownerDocument;
30249
30250    if (doc) {
30251      win = doc.defaultView || doc.parentWindow;
30252    } else {
30253      win = window;
30254    }
30255  }
30256
30257  var from;
30258  var to;
30259
30260  if (isOutEvent) {
30261    var _related = nativeEvent.relatedTarget || nativeEvent.toElement;
30262
30263    from = targetInst;
30264    to = _related ? getClosestInstanceFromNode(_related) : null;
30265
30266    if (to !== null) {
30267      var nearestMounted = getNearestMountedFiber(to);
30268
30269      if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
30270        to = null;
30271      }
30272    }
30273  } else {
30274    // Moving to a node from outside the window.
30275    from = null;
30276    to = targetInst;
30277  }
30278
30279  if (from === to) {
30280    // Nothing pertains to our managed components.
30281    return;
30282  }
30283
30284  var SyntheticEventCtor = SyntheticMouseEvent;
30285  var leaveEventType = 'onMouseLeave';
30286  var enterEventType = 'onMouseEnter';
30287  var eventTypePrefix = 'mouse';
30288
30289  if (domEventName === 'pointerout' || domEventName === 'pointerover') {
30290    SyntheticEventCtor = SyntheticPointerEvent;
30291    leaveEventType = 'onPointerLeave';
30292    enterEventType = 'onPointerEnter';
30293    eventTypePrefix = 'pointer';
30294  }
30295
30296  var fromNode = from == null ? win : getNodeFromInstance(from);
30297  var toNode = to == null ? win : getNodeFromInstance(to);
30298  var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);
30299  leave.target = fromNode;
30300  leave.relatedTarget = toNode;
30301  var enter = null; // We should only process this nativeEvent if we are processing
30302  // the first ancestor. Next time, we will ignore the event.
30303
30304  var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);
30305
30306  if (nativeTargetInst === targetInst) {
30307    var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);
30308    enterEvent.target = toNode;
30309    enterEvent.relatedTarget = fromNode;
30310    enter = enterEvent;
30311  }
30312
30313  accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);
30314}
30315
30316/**
30317 * inlined Object.is polyfill to avoid requiring consumers ship their own
30318 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
30319 */
30320function is(x, y) {
30321  return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
30322  ;
30323}
30324
30325var objectIs = typeof Object.is === 'function' ? Object.is : is;
30326
30327var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
30328/**
30329 * Performs equality by iterating through keys on an object and returning false
30330 * when any key has values which are not strictly equal between the arguments.
30331 * Returns true when the values of all keys are strictly equal.
30332 */
30333
30334function shallowEqual(objA, objB) {
30335  if (objectIs(objA, objB)) {
30336    return true;
30337  }
30338
30339  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
30340    return false;
30341  }
30342
30343  var keysA = Object.keys(objA);
30344  var keysB = Object.keys(objB);
30345
30346  if (keysA.length !== keysB.length) {
30347    return false;
30348  } // Test for A's keys different from B.
30349
30350
30351  for (var i = 0; i < keysA.length; i++) {
30352    if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
30353      return false;
30354    }
30355  }
30356
30357  return true;
30358}
30359
30360/**
30361 * Given any node return the first leaf node without children.
30362 *
30363 * @param {DOMElement|DOMTextNode} node
30364 * @return {DOMElement|DOMTextNode}
30365 */
30366
30367function getLeafNode(node) {
30368  while (node && node.firstChild) {
30369    node = node.firstChild;
30370  }
30371
30372  return node;
30373}
30374/**
30375 * Get the next sibling within a container. This will walk up the
30376 * DOM if a node's siblings have been exhausted.
30377 *
30378 * @param {DOMElement|DOMTextNode} node
30379 * @return {?DOMElement|DOMTextNode}
30380 */
30381
30382
30383function getSiblingNode(node) {
30384  while (node) {
30385    if (node.nextSibling) {
30386      return node.nextSibling;
30387    }
30388
30389    node = node.parentNode;
30390  }
30391}
30392/**
30393 * Get object describing the nodes which contain characters at offset.
30394 *
30395 * @param {DOMElement|DOMTextNode} root
30396 * @param {number} offset
30397 * @return {?object}
30398 */
30399
30400
30401function getNodeForCharacterOffset(root, offset) {
30402  var node = getLeafNode(root);
30403  var nodeStart = 0;
30404  var nodeEnd = 0;
30405
30406  while (node) {
30407    if (node.nodeType === TEXT_NODE) {
30408      nodeEnd = nodeStart + node.textContent.length;
30409
30410      if (nodeStart <= offset && nodeEnd >= offset) {
30411        return {
30412          node: node,
30413          offset: offset - nodeStart
30414        };
30415      }
30416
30417      nodeStart = nodeEnd;
30418    }
30419
30420    node = getLeafNode(getSiblingNode(node));
30421  }
30422}
30423
30424/**
30425 * @param {DOMElement} outerNode
30426 * @return {?object}
30427 */
30428
30429function getOffsets(outerNode) {
30430  var ownerDocument = outerNode.ownerDocument;
30431  var win = ownerDocument && ownerDocument.defaultView || window;
30432  var selection = win.getSelection && win.getSelection();
30433
30434  if (!selection || selection.rangeCount === 0) {
30435    return null;
30436  }
30437
30438  var anchorNode = selection.anchorNode,
30439      anchorOffset = selection.anchorOffset,
30440      focusNode = selection.focusNode,
30441      focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
30442  // up/down buttons on an <input type="number">. Anonymous divs do not seem to
30443  // expose properties, triggering a "Permission denied error" if any of its
30444  // properties are accessed. The only seemingly possible way to avoid erroring
30445  // is to access a property that typically works for non-anonymous divs and
30446  // catch any error that may otherwise arise. See
30447  // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
30448
30449  try {
30450    /* eslint-disable no-unused-expressions */
30451    anchorNode.nodeType;
30452    focusNode.nodeType;
30453    /* eslint-enable no-unused-expressions */
30454  } catch (e) {
30455    return null;
30456  }
30457
30458  return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
30459}
30460/**
30461 * Returns {start, end} where `start` is the character/codepoint index of
30462 * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
30463 * `end` is the index of (focusNode, focusOffset).
30464 *
30465 * Returns null if you pass in garbage input but we should probably just crash.
30466 *
30467 * Exported only for testing.
30468 */
30469
30470function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
30471  var length = 0;
30472  var start = -1;
30473  var end = -1;
30474  var indexWithinAnchor = 0;
30475  var indexWithinFocus = 0;
30476  var node = outerNode;
30477  var parentNode = null;
30478
30479  outer: while (true) {
30480    var next = null;
30481
30482    while (true) {
30483      if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
30484        start = length + anchorOffset;
30485      }
30486
30487      if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
30488        end = length + focusOffset;
30489      }
30490
30491      if (node.nodeType === TEXT_NODE) {
30492        length += node.nodeValue.length;
30493      }
30494
30495      if ((next = node.firstChild) === null) {
30496        break;
30497      } // Moving from `node` to its first child `next`.
30498
30499
30500      parentNode = node;
30501      node = next;
30502    }
30503
30504    while (true) {
30505      if (node === outerNode) {
30506        // If `outerNode` has children, this is always the second time visiting
30507        // it. If it has no children, this is still the first loop, and the only
30508        // valid selection is anchorNode and focusNode both equal to this node
30509        // and both offsets 0, in which case we will have handled above.
30510        break outer;
30511      }
30512
30513      if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
30514        start = length;
30515      }
30516
30517      if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
30518        end = length;
30519      }
30520
30521      if ((next = node.nextSibling) !== null) {
30522        break;
30523      }
30524
30525      node = parentNode;
30526      parentNode = node.parentNode;
30527    } // Moving from `node` to its next sibling `next`.
30528
30529
30530    node = next;
30531  }
30532
30533  if (start === -1 || end === -1) {
30534    // This should never happen. (Would happen if the anchor/focus nodes aren't
30535    // actually inside the passed-in node.)
30536    return null;
30537  }
30538
30539  return {
30540    start: start,
30541    end: end
30542  };
30543}
30544/**
30545 * In modern non-IE browsers, we can support both forward and backward
30546 * selections.
30547 *
30548 * Note: IE10+ supports the Selection object, but it does not support
30549 * the `extend` method, which means that even in modern IE, it's not possible
30550 * to programmatically create a backward selection. Thus, for all IE
30551 * versions, we use the old IE API to create our selections.
30552 *
30553 * @param {DOMElement|DOMTextNode} node
30554 * @param {object} offsets
30555 */
30556
30557function setOffsets(node, offsets) {
30558  var doc = node.ownerDocument || document;
30559  var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
30560  // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
30561  // fails when pasting 100+ items)
30562
30563  if (!win.getSelection) {
30564    return;
30565  }
30566
30567  var selection = win.getSelection();
30568  var length = node.textContent.length;
30569  var start = Math.min(offsets.start, length);
30570  var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
30571  // Flip backward selections, so we can set with a single range.
30572
30573  if (!selection.extend && start > end) {
30574    var temp = end;
30575    end = start;
30576    start = temp;
30577  }
30578
30579  var startMarker = getNodeForCharacterOffset(node, start);
30580  var endMarker = getNodeForCharacterOffset(node, end);
30581
30582  if (startMarker && endMarker) {
30583    if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
30584      return;
30585    }
30586
30587    var range = doc.createRange();
30588    range.setStart(startMarker.node, startMarker.offset);
30589    selection.removeAllRanges();
30590
30591    if (start > end) {
30592      selection.addRange(range);
30593      selection.extend(endMarker.node, endMarker.offset);
30594    } else {
30595      range.setEnd(endMarker.node, endMarker.offset);
30596      selection.addRange(range);
30597    }
30598  }
30599}
30600
30601function isTextNode(node) {
30602  return node && node.nodeType === TEXT_NODE;
30603}
30604
30605function containsNode(outerNode, innerNode) {
30606  if (!outerNode || !innerNode) {
30607    return false;
30608  } else if (outerNode === innerNode) {
30609    return true;
30610  } else if (isTextNode(outerNode)) {
30611    return false;
30612  } else if (isTextNode(innerNode)) {
30613    return containsNode(outerNode, innerNode.parentNode);
30614  } else if ('contains' in outerNode) {
30615    return outerNode.contains(innerNode);
30616  } else if (outerNode.compareDocumentPosition) {
30617    return !!(outerNode.compareDocumentPosition(innerNode) & 16);
30618  } else {
30619    return false;
30620  }
30621}
30622
30623function isInDocument(node) {
30624  return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
30625}
30626
30627function isSameOriginFrame(iframe) {
30628  try {
30629    // Accessing the contentDocument of a HTMLIframeElement can cause the browser
30630    // to throw, e.g. if it has a cross-origin src attribute.
30631    // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
30632    // iframe.contentDocument.defaultView;
30633    // A safety way is to access one of the cross origin properties: Window or Location
30634    // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
30635    // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
30636    return typeof iframe.contentWindow.location.href === 'string';
30637  } catch (err) {
30638    return false;
30639  }
30640}
30641
30642function getActiveElementDeep() {
30643  var win = window;
30644  var element = getActiveElement();
30645
30646  while (element instanceof win.HTMLIFrameElement) {
30647    if (isSameOriginFrame(element)) {
30648      win = element.contentWindow;
30649    } else {
30650      return element;
30651    }
30652
30653    element = getActiveElement(win.document);
30654  }
30655
30656  return element;
30657}
30658/**
30659 * @ReactInputSelection: React input selection module. Based on Selection.js,
30660 * but modified to be suitable for react and has a couple of bug fixes (doesn't
30661 * assume buttons have range selections allowed).
30662 * Input selection module for React.
30663 */
30664
30665/**
30666 * @hasSelectionCapabilities: we get the element types that support selection
30667 * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
30668 * and `selectionEnd` rows.
30669 */
30670
30671
30672function hasSelectionCapabilities(elem) {
30673  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
30674  return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
30675}
30676function getSelectionInformation() {
30677  var focusedElem = getActiveElementDeep();
30678  return {
30679    focusedElem: focusedElem,
30680    selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
30681  };
30682}
30683/**
30684 * @restoreSelection: If any selection information was potentially lost,
30685 * restore it. This is useful when performing operations that could remove dom
30686 * nodes and place them back in, resulting in focus being lost.
30687 */
30688
30689function restoreSelection(priorSelectionInformation) {
30690  var curFocusedElem = getActiveElementDeep();
30691  var priorFocusedElem = priorSelectionInformation.focusedElem;
30692  var priorSelectionRange = priorSelectionInformation.selectionRange;
30693
30694  if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
30695    if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
30696      setSelection(priorFocusedElem, priorSelectionRange);
30697    } // Focusing a node can change the scroll position, which is undesirable
30698
30699
30700    var ancestors = [];
30701    var ancestor = priorFocusedElem;
30702
30703    while (ancestor = ancestor.parentNode) {
30704      if (ancestor.nodeType === ELEMENT_NODE) {
30705        ancestors.push({
30706          element: ancestor,
30707          left: ancestor.scrollLeft,
30708          top: ancestor.scrollTop
30709        });
30710      }
30711    }
30712
30713    if (typeof priorFocusedElem.focus === 'function') {
30714      priorFocusedElem.focus();
30715    }
30716
30717    for (var i = 0; i < ancestors.length; i++) {
30718      var info = ancestors[i];
30719      info.element.scrollLeft = info.left;
30720      info.element.scrollTop = info.top;
30721    }
30722  }
30723}
30724/**
30725 * @getSelection: Gets the selection bounds of a focused textarea, input or
30726 * contentEditable node.
30727 * -@input: Look up selection bounds of this input
30728 * -@return {start: selectionStart, end: selectionEnd}
30729 */
30730
30731function getSelection(input) {
30732  var selection;
30733
30734  if ('selectionStart' in input) {
30735    // Modern browser with input or textarea.
30736    selection = {
30737      start: input.selectionStart,
30738      end: input.selectionEnd
30739    };
30740  } else {
30741    // Content editable or old IE textarea.
30742    selection = getOffsets(input);
30743  }
30744
30745  return selection || {
30746    start: 0,
30747    end: 0
30748  };
30749}
30750/**
30751 * @setSelection: Sets the selection bounds of a textarea or input and focuses
30752 * the input.
30753 * -@input     Set selection bounds of this input or textarea
30754 * -@offsets   Object of same form that is returned from get*
30755 */
30756
30757function setSelection(input, offsets) {
30758  var start = offsets.start;
30759  var end = offsets.end;
30760
30761  if (end === undefined) {
30762    end = start;
30763  }
30764
30765  if ('selectionStart' in input) {
30766    input.selectionStart = start;
30767    input.selectionEnd = Math.min(end, input.value.length);
30768  } else {
30769    setOffsets(input, offsets);
30770  }
30771}
30772
30773var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
30774
30775function registerEvents$3() {
30776  registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);
30777}
30778
30779var activeElement$1 = null;
30780var activeElementInst$1 = null;
30781var lastSelection = null;
30782var mouseDown = false;
30783/**
30784 * Get an object which is a unique representation of the current selection.
30785 *
30786 * The return value will not be consistent across nodes or browsers, but
30787 * two identical selections on the same node will return identical objects.
30788 */
30789
30790function getSelection$1(node) {
30791  if ('selectionStart' in node && hasSelectionCapabilities(node)) {
30792    return {
30793      start: node.selectionStart,
30794      end: node.selectionEnd
30795    };
30796  } else {
30797    var win = node.ownerDocument && node.ownerDocument.defaultView || window;
30798    var selection = win.getSelection();
30799    return {
30800      anchorNode: selection.anchorNode,
30801      anchorOffset: selection.anchorOffset,
30802      focusNode: selection.focusNode,
30803      focusOffset: selection.focusOffset
30804    };
30805  }
30806}
30807/**
30808 * Get document associated with the event target.
30809 */
30810
30811
30812function getEventTargetDocument(eventTarget) {
30813  return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
30814}
30815/**
30816 * Poll selection to see whether it's changed.
30817 *
30818 * @param {object} nativeEvent
30819 * @param {object} nativeEventTarget
30820 * @return {?SyntheticEvent}
30821 */
30822
30823
30824function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
30825  // Ensure we have the right element, and that the user is not dragging a
30826  // selection (this matches native `select` event behavior). In HTML5, select
30827  // fires only on input and textarea thus if there's no focused element we
30828  // won't dispatch.
30829  var doc = getEventTargetDocument(nativeEventTarget);
30830
30831  if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
30832    return;
30833  } // Only fire when selection has actually changed.
30834
30835
30836  var currentSelection = getSelection$1(activeElement$1);
30837
30838  if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
30839    lastSelection = currentSelection;
30840    var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');
30841
30842    if (listeners.length > 0) {
30843      var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);
30844      dispatchQueue.push({
30845        event: event,
30846        listeners: listeners
30847      });
30848      event.target = activeElement$1;
30849    }
30850  }
30851}
30852/**
30853 * This plugin creates an `onSelect` event that normalizes select events
30854 * across form elements.
30855 *
30856 * Supported elements are:
30857 * - input (see `isTextInputElement`)
30858 * - textarea
30859 * - contentEditable
30860 *
30861 * This differs from native browser implementations in the following ways:
30862 * - Fires on contentEditable fields as well as inputs.
30863 * - Fires for collapsed selection.
30864 * - Fires after user input.
30865 */
30866
30867
30868function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
30869
30870  var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
30871
30872  switch (domEventName) {
30873    // Track the input node that has focus.
30874    case 'focusin':
30875      if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
30876        activeElement$1 = targetNode;
30877        activeElementInst$1 = targetInst;
30878        lastSelection = null;
30879      }
30880
30881      break;
30882
30883    case 'focusout':
30884      activeElement$1 = null;
30885      activeElementInst$1 = null;
30886      lastSelection = null;
30887      break;
30888    // Don't fire the event while the user is dragging. This matches the
30889    // semantics of the native select event.
30890
30891    case 'mousedown':
30892      mouseDown = true;
30893      break;
30894
30895    case 'contextmenu':
30896    case 'mouseup':
30897    case 'dragend':
30898      mouseDown = false;
30899      constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
30900      break;
30901    // Chrome and IE fire non-standard event when selection is changed (and
30902    // sometimes when it hasn't). IE's event fires out of order with respect
30903    // to key and input events on deletion, so we discard it.
30904    //
30905    // Firefox doesn't support selectionchange, so check selection status
30906    // after each key entry. The selection changes after keydown and before
30907    // keyup, but we check on keydown as well in the case of holding down a
30908    // key, when multiple keydown events are fired but only one keyup is.
30909    // This is also our approach for IE handling, for the reason above.
30910
30911    case 'selectionchange':
30912      if (skipSelectionChangeEvent) {
30913        break;
30914      }
30915
30916    // falls through
30917
30918    case 'keydown':
30919    case 'keyup':
30920      constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
30921  }
30922}
30923
30924function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
30925  var reactName = topLevelEventsToReactNames.get(domEventName);
30926
30927  if (reactName === undefined) {
30928    return;
30929  }
30930
30931  var SyntheticEventCtor = SyntheticEvent;
30932  var reactEventType = domEventName;
30933
30934  switch (domEventName) {
30935    case 'keypress':
30936      // Firefox creates a keypress event for function keys too. This removes
30937      // the unwanted keypress events. Enter is however both printable and
30938      // non-printable. One would expect Tab to be as well (but it isn't).
30939      if (getEventCharCode(nativeEvent) === 0) {
30940        return;
30941      }
30942
30943    /* falls through */
30944
30945    case 'keydown':
30946    case 'keyup':
30947      SyntheticEventCtor = SyntheticKeyboardEvent;
30948      break;
30949
30950    case 'focusin':
30951      reactEventType = 'focus';
30952      SyntheticEventCtor = SyntheticFocusEvent;
30953      break;
30954
30955    case 'focusout':
30956      reactEventType = 'blur';
30957      SyntheticEventCtor = SyntheticFocusEvent;
30958      break;
30959
30960    case 'beforeblur':
30961    case 'afterblur':
30962      SyntheticEventCtor = SyntheticFocusEvent;
30963      break;
30964
30965    case 'click':
30966      // Firefox creates a click event on right mouse clicks. This removes the
30967      // unwanted click events.
30968      if (nativeEvent.button === 2) {
30969        return;
30970      }
30971
30972    /* falls through */
30973
30974    case 'auxclick':
30975    case 'dblclick':
30976    case 'mousedown':
30977    case 'mousemove':
30978    case 'mouseup': // TODO: Disabled elements should not respond to mouse events
30979
30980    /* falls through */
30981
30982    case 'mouseout':
30983    case 'mouseover':
30984    case 'contextmenu':
30985      SyntheticEventCtor = SyntheticMouseEvent;
30986      break;
30987
30988    case 'drag':
30989    case 'dragend':
30990    case 'dragenter':
30991    case 'dragexit':
30992    case 'dragleave':
30993    case 'dragover':
30994    case 'dragstart':
30995    case 'drop':
30996      SyntheticEventCtor = SyntheticDragEvent;
30997      break;
30998
30999    case 'touchcancel':
31000    case 'touchend':
31001    case 'touchmove':
31002    case 'touchstart':
31003      SyntheticEventCtor = SyntheticTouchEvent;
31004      break;
31005
31006    case ANIMATION_END:
31007    case ANIMATION_ITERATION:
31008    case ANIMATION_START:
31009      SyntheticEventCtor = SyntheticAnimationEvent;
31010      break;
31011
31012    case TRANSITION_END:
31013      SyntheticEventCtor = SyntheticTransitionEvent;
31014      break;
31015
31016    case 'scroll':
31017      SyntheticEventCtor = SyntheticUIEvent;
31018      break;
31019
31020    case 'wheel':
31021      SyntheticEventCtor = SyntheticWheelEvent;
31022      break;
31023
31024    case 'copy':
31025    case 'cut':
31026    case 'paste':
31027      SyntheticEventCtor = SyntheticClipboardEvent;
31028      break;
31029
31030    case 'gotpointercapture':
31031    case 'lostpointercapture':
31032    case 'pointercancel':
31033    case 'pointerdown':
31034    case 'pointermove':
31035    case 'pointerout':
31036    case 'pointerover':
31037    case 'pointerup':
31038      SyntheticEventCtor = SyntheticPointerEvent;
31039      break;
31040  }
31041
31042  var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
31043
31044  {
31045    // Some events don't bubble in the browser.
31046    // In the past, React has always bubbled them, but this can be surprising.
31047    // We're going to try aligning closer to the browser behavior by not bubbling
31048    // them in React either. We'll start by not bubbling onScroll, and then expand.
31049    var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from
31050    // nonDelegatedEvents list in DOMPluginEventSystem.
31051    // Then we can remove this special list.
31052    // This is a breaking change that can wait until React 18.
31053    domEventName === 'scroll';
31054
31055    var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);
31056
31057    if (_listeners.length > 0) {
31058      // Intentionally create event lazily.
31059      var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);
31060
31061      dispatchQueue.push({
31062        event: _event,
31063        listeners: _listeners
31064      });
31065    }
31066  }
31067}
31068
31069// TODO: remove top-level side effect.
31070registerSimpleEvents();
31071registerEvents$2();
31072registerEvents$1();
31073registerEvents$3();
31074registerEvents();
31075
31076function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
31077  // TODO: we should remove the concept of a "SimpleEventPlugin".
31078  // This is the basic functionality of the event system. All
31079  // the other plugins are essentially polyfills. So the plugin
31080  // should probably be inlined somewhere and have its logic
31081  // be core the to event system. This would potentially allow
31082  // us to ship builds of React without the polyfilled plugins below.
31083  extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
31084  var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the
31085  // event's native "bubble" phase, which means that we're
31086  // not in the capture phase. That's because we emulate
31087  // the capture phase here still. This is a trade-off,
31088  // because in an ideal world we would not emulate and use
31089  // the phases properly, like we do with the SimpleEvent
31090  // plugin. However, the plugins below either expect
31091  // emulation (EnterLeave) or use state localized to that
31092  // plugin (BeforeInput, Change, Select). The state in
31093  // these modules complicates things, as you'll essentially
31094  // get the case where the capture phase event might change
31095  // state, only for the following bubble event to come in
31096  // later and not trigger anything as the state now
31097  // invalidates the heuristics of the event plugin. We
31098  // could alter all these plugins to work in such ways, but
31099  // that might cause other unknown side-effects that we
31100  // can't forsee right now.
31101
31102  if (shouldProcessPolyfillPlugins) {
31103    extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
31104    extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
31105    extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
31106    extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
31107  }
31108} // List of events that need to be individually attached to media elements.
31109
31110
31111var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather
31112// set them on the actual target element itself. This is primarily
31113// because these events do not consistently bubble in the DOM.
31114
31115var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));
31116
31117function executeDispatch(event, listener, currentTarget) {
31118  var type = event.type || 'unknown-event';
31119  event.currentTarget = currentTarget;
31120  invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
31121  event.currentTarget = null;
31122}
31123
31124function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {
31125  var previousInstance;
31126
31127  if (inCapturePhase) {
31128    for (var i = dispatchListeners.length - 1; i >= 0; i--) {
31129      var _dispatchListeners$i = dispatchListeners[i],
31130          instance = _dispatchListeners$i.instance,
31131          currentTarget = _dispatchListeners$i.currentTarget,
31132          listener = _dispatchListeners$i.listener;
31133
31134      if (instance !== previousInstance && event.isPropagationStopped()) {
31135        return;
31136      }
31137
31138      executeDispatch(event, listener, currentTarget);
31139      previousInstance = instance;
31140    }
31141  } else {
31142    for (var _i = 0; _i < dispatchListeners.length; _i++) {
31143      var _dispatchListeners$_i = dispatchListeners[_i],
31144          _instance = _dispatchListeners$_i.instance,
31145          _currentTarget = _dispatchListeners$_i.currentTarget,
31146          _listener = _dispatchListeners$_i.listener;
31147
31148      if (_instance !== previousInstance && event.isPropagationStopped()) {
31149        return;
31150      }
31151
31152      executeDispatch(event, _listener, _currentTarget);
31153      previousInstance = _instance;
31154    }
31155  }
31156}
31157
31158function processDispatchQueue(dispatchQueue, eventSystemFlags) {
31159  var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
31160
31161  for (var i = 0; i < dispatchQueue.length; i++) {
31162    var _dispatchQueue$i = dispatchQueue[i],
31163        event = _dispatchQueue$i.event,
31164        listeners = _dispatchQueue$i.listeners;
31165    processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); //  event system doesn't use pooling.
31166  } // This would be a good time to rethrow if any of the event handlers threw.
31167
31168
31169  rethrowCaughtError();
31170}
31171
31172function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
31173  var nativeEventTarget = getEventTarget(nativeEvent);
31174  var dispatchQueue = [];
31175  extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
31176  processDispatchQueue(dispatchQueue, eventSystemFlags);
31177}
31178
31179function listenToNonDelegatedEvent(domEventName, targetElement) {
31180  var isCapturePhaseListener = false;
31181  var listenerSet = getEventListenerSet(targetElement);
31182  var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);
31183
31184  if (!listenerSet.has(listenerSetKey)) {
31185    addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
31186    listenerSet.add(listenerSetKey);
31187  }
31188}
31189var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);
31190function listenToAllSupportedEvents(rootContainerElement) {
31191  {
31192    if (rootContainerElement[listeningMarker]) {
31193      // Performance optimization: don't iterate through events
31194      // for the same portal container or root node more than once.
31195      // TODO: once we remove the flag, we may be able to also
31196      // remove some of the bookkeeping maps used for laziness.
31197      return;
31198    }
31199
31200    rootContainerElement[listeningMarker] = true;
31201    allNativeEvents.forEach(function (domEventName) {
31202      if (!nonDelegatedEvents.has(domEventName)) {
31203        listenToNativeEvent(domEventName, false, rootContainerElement, null);
31204      }
31205
31206      listenToNativeEvent(domEventName, true, rootContainerElement, null);
31207    });
31208  }
31209}
31210function listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) {
31211  var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
31212  var target = rootContainerElement; // selectionchange needs to be attached to the document
31213  // otherwise it won't capture incoming events that are only
31214  // triggered on the document directly.
31215
31216  if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) {
31217    target = rootContainerElement.ownerDocument;
31218  } // If the event can be delegated (or is capture phase), we can
31219  // register it to the root container. Otherwise, we should
31220  // register the event to the target element and mark it as
31221  // a non-delegated event.
31222
31223
31224  if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) {
31225    // For all non-delegated events, apart from scroll, we attach
31226    // their event listeners to the respective elements that their
31227    // events fire on. That means we can skip this step, as event
31228    // listener has already been added previously. However, we
31229    // special case the scroll event because the reality is that any
31230    // element can scroll.
31231    // TODO: ideally, we'd eventually apply the same logic to all
31232    // events from the nonDelegatedEvents list. Then we can remove
31233    // this special case and use the same logic for all events.
31234    if (domEventName !== 'scroll') {
31235      return;
31236    }
31237
31238    eventSystemFlags |= IS_NON_DELEGATED;
31239    target = targetElement;
31240  }
31241
31242  var listenerSet = getEventListenerSet(target);
31243  var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then
31244  // we need to trap an event listener onto the target.
31245
31246  if (!listenerSet.has(listenerSetKey)) {
31247    if (isCapturePhaseListener) {
31248      eventSystemFlags |= IS_CAPTURE_PHASE;
31249    }
31250
31251    addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);
31252    listenerSet.add(listenerSetKey);
31253  }
31254}
31255
31256function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {
31257  var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be
31258  // active and not passive.
31259
31260  var isPassiveListener = undefined;
31261
31262  if (passiveBrowserEventsSupported) {
31263    // Browsers introduced an intervention, making these events
31264    // passive by default on document. React doesn't bind them
31265    // to document anymore, but changing this now would undo
31266    // the performance wins from the change. So we emulate
31267    // the existing behavior manually on the roots now.
31268    // https://github.com/facebook/react/issues/19651
31269    if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {
31270      isPassiveListener = true;
31271    }
31272  }
31273
31274  targetContainer =  targetContainer;
31275  var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we
31276
31277
31278  if (isCapturePhaseListener) {
31279    if (isPassiveListener !== undefined) {
31280      unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
31281    } else {
31282      unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);
31283    }
31284  } else {
31285    if (isPassiveListener !== undefined) {
31286      unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
31287    } else {
31288      unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);
31289    }
31290  }
31291}
31292
31293function isMatchingRootContainer(grandContainer, targetContainer) {
31294  return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;
31295}
31296
31297function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
31298  var ancestorInst = targetInst;
31299
31300  if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {
31301    var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we
31302
31303    if (targetInst !== null) {
31304      // The below logic attempts to work out if we need to change
31305      // the target fiber to a different ancestor. We had similar logic
31306      // in the legacy event system, except the big difference between
31307      // systems is that the modern event system now has an event listener
31308      // attached to each React Root and React Portal Root. Together,
31309      // the DOM nodes representing these roots are the "rootContainer".
31310      // To figure out which ancestor instance we should use, we traverse
31311      // up the fiber tree from the target instance and attempt to find
31312      // root boundaries that match that of our current "rootContainer".
31313      // If we find that "rootContainer", we find the parent fiber
31314      // sub-tree for that root and make that our ancestor instance.
31315      var node = targetInst;
31316
31317      mainLoop: while (true) {
31318        if (node === null) {
31319          return;
31320        }
31321
31322        var nodeTag = node.tag;
31323
31324        if (nodeTag === HostRoot || nodeTag === HostPortal) {
31325          var container = node.stateNode.containerInfo;
31326
31327          if (isMatchingRootContainer(container, targetContainerNode)) {
31328            break;
31329          }
31330
31331          if (nodeTag === HostPortal) {
31332            // The target is a portal, but it's not the rootContainer we're looking for.
31333            // Normally portals handle their own events all the way down to the root.
31334            // So we should be able to stop now. However, we don't know if this portal
31335            // was part of *our* root.
31336            var grandNode = node.return;
31337
31338            while (grandNode !== null) {
31339              var grandTag = grandNode.tag;
31340
31341              if (grandTag === HostRoot || grandTag === HostPortal) {
31342                var grandContainer = grandNode.stateNode.containerInfo;
31343
31344                if (isMatchingRootContainer(grandContainer, targetContainerNode)) {
31345                  // This is the rootContainer we're looking for and we found it as
31346                  // a parent of the Portal. That means we can ignore it because the
31347                  // Portal will bubble through to us.
31348                  return;
31349                }
31350              }
31351
31352              grandNode = grandNode.return;
31353            }
31354          } // Now we need to find it's corresponding host fiber in the other
31355          // tree. To do this we can use getClosestInstanceFromNode, but we
31356          // need to validate that the fiber is a host instance, otherwise
31357          // we need to traverse up through the DOM till we find the correct
31358          // node that is from the other tree.
31359
31360
31361          while (container !== null) {
31362            var parentNode = getClosestInstanceFromNode(container);
31363
31364            if (parentNode === null) {
31365              return;
31366            }
31367
31368            var parentTag = parentNode.tag;
31369
31370            if (parentTag === HostComponent || parentTag === HostText) {
31371              node = ancestorInst = parentNode;
31372              continue mainLoop;
31373            }
31374
31375            container = container.parentNode;
31376          }
31377        }
31378
31379        node = node.return;
31380      }
31381    }
31382  }
31383
31384  batchedEventUpdates(function () {
31385    return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);
31386  });
31387}
31388
31389function createDispatchListener(instance, listener, currentTarget) {
31390  return {
31391    instance: instance,
31392    listener: listener,
31393    currentTarget: currentTarget
31394  };
31395}
31396
31397function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {
31398  var captureName = reactName !== null ? reactName + 'Capture' : null;
31399  var reactEventName = inCapturePhase ? captureName : reactName;
31400  var listeners = [];
31401  var instance = targetFiber;
31402  var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.
31403
31404  while (instance !== null) {
31405    var _instance2 = instance,
31406        stateNode = _instance2.stateNode,
31407        tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)
31408
31409    if (tag === HostComponent && stateNode !== null) {
31410      lastHostComponent = stateNode; // createEventHandle listeners
31411
31412
31413      if (reactEventName !== null) {
31414        var listener = getListener(instance, reactEventName);
31415
31416        if (listener != null) {
31417          listeners.push(createDispatchListener(instance, listener, lastHostComponent));
31418        }
31419      }
31420    } // If we are only accumulating events for the target, then we don't
31421    // continue to propagate through the React fiber tree to find other
31422    // listeners.
31423
31424
31425    if (accumulateTargetOnly) {
31426      break;
31427    }
31428
31429    instance = instance.return;
31430  }
31431
31432  return listeners;
31433} // We should only use this function for:
31434// - BeforeInputEventPlugin
31435// - ChangeEventPlugin
31436// - SelectEventPlugin
31437// This is because we only process these plugins
31438// in the bubble phase, so we need to accumulate two
31439// phase event listeners (via emulation).
31440
31441function accumulateTwoPhaseListeners(targetFiber, reactName) {
31442  var captureName = reactName + 'Capture';
31443  var listeners = [];
31444  var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.
31445
31446  while (instance !== null) {
31447    var _instance3 = instance,
31448        stateNode = _instance3.stateNode,
31449        tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)
31450
31451    if (tag === HostComponent && stateNode !== null) {
31452      var currentTarget = stateNode;
31453      var captureListener = getListener(instance, captureName);
31454
31455      if (captureListener != null) {
31456        listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
31457      }
31458
31459      var bubbleListener = getListener(instance, reactName);
31460
31461      if (bubbleListener != null) {
31462        listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
31463      }
31464    }
31465
31466    instance = instance.return;
31467  }
31468
31469  return listeners;
31470}
31471
31472function getParent(inst) {
31473  if (inst === null) {
31474    return null;
31475  }
31476
31477  do {
31478    inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
31479    // That is depending on if we want nested subtrees (layers) to bubble
31480    // events to their parent. We could also go through parentNode on the
31481    // host node but that wouldn't work for React Native and doesn't let us
31482    // do the portal feature.
31483  } while (inst && inst.tag !== HostComponent);
31484
31485  if (inst) {
31486    return inst;
31487  }
31488
31489  return null;
31490}
31491/**
31492 * Return the lowest common ancestor of A and B, or null if they are in
31493 * different trees.
31494 */
31495
31496
31497function getLowestCommonAncestor(instA, instB) {
31498  var nodeA = instA;
31499  var nodeB = instB;
31500  var depthA = 0;
31501
31502  for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {
31503    depthA++;
31504  }
31505
31506  var depthB = 0;
31507
31508  for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {
31509    depthB++;
31510  } // If A is deeper, crawl up.
31511
31512
31513  while (depthA - depthB > 0) {
31514    nodeA = getParent(nodeA);
31515    depthA--;
31516  } // If B is deeper, crawl up.
31517
31518
31519  while (depthB - depthA > 0) {
31520    nodeB = getParent(nodeB);
31521    depthB--;
31522  } // Walk in lockstep until we find a match.
31523
31524
31525  var depth = depthA;
31526
31527  while (depth--) {
31528    if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {
31529      return nodeA;
31530    }
31531
31532    nodeA = getParent(nodeA);
31533    nodeB = getParent(nodeB);
31534  }
31535
31536  return null;
31537}
31538
31539function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
31540  var registrationName = event._reactName;
31541  var listeners = [];
31542  var instance = target;
31543
31544  while (instance !== null) {
31545    if (instance === common) {
31546      break;
31547    }
31548
31549    var _instance4 = instance,
31550        alternate = _instance4.alternate,
31551        stateNode = _instance4.stateNode,
31552        tag = _instance4.tag;
31553
31554    if (alternate !== null && alternate === common) {
31555      break;
31556    }
31557
31558    if (tag === HostComponent && stateNode !== null) {
31559      var currentTarget = stateNode;
31560
31561      if (inCapturePhase) {
31562        var captureListener = getListener(instance, registrationName);
31563
31564        if (captureListener != null) {
31565          listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
31566        }
31567      } else if (!inCapturePhase) {
31568        var bubbleListener = getListener(instance, registrationName);
31569
31570        if (bubbleListener != null) {
31571          listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
31572        }
31573      }
31574    }
31575
31576    instance = instance.return;
31577  }
31578
31579  if (listeners.length !== 0) {
31580    dispatchQueue.push({
31581      event: event,
31582      listeners: listeners
31583    });
31584  }
31585} // We should only use this function for:
31586// - EnterLeaveEventPlugin
31587// This is because we only process this plugin
31588// in the bubble phase, so we need to accumulate two
31589// phase event listeners.
31590
31591
31592function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {
31593  var common = from && to ? getLowestCommonAncestor(from, to) : null;
31594
31595  if (from !== null) {
31596    accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);
31597  }
31598
31599  if (to !== null && enterEvent !== null) {
31600    accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);
31601  }
31602}
31603function getListenerSetKey(domEventName, capture) {
31604  return domEventName + "__" + (capture ? 'capture' : 'bubble');
31605}
31606
31607var didWarnInvalidHydration = false;
31608var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
31609var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
31610var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
31611var AUTOFOCUS = 'autoFocus';
31612var CHILDREN = 'children';
31613var STYLE = 'style';
31614var HTML$1 = '__html';
31615var HTML_NAMESPACE$1 = Namespaces.html;
31616var warnedUnknownTags;
31617var suppressHydrationWarning;
31618var validatePropertiesInDevelopment;
31619var warnForTextDifference;
31620var warnForPropDifference;
31621var warnForExtraAttributes;
31622var warnForInvalidEventListener;
31623var canDiffStyleForHydrationWarning;
31624var normalizeMarkupForTextOrAttribute;
31625var normalizeHTML;
31626
31627{
31628  warnedUnknownTags = {
31629    // There are working polyfills for <dialog>. Let people use it.
31630    dialog: true,
31631    // Electron ships a custom <webview> tag to display external web content in
31632    // an isolated frame and process.
31633    // This tag is not present in non Electron environments such as JSDom which
31634    // is often used for testing purposes.
31635    // @see https://electronjs.org/docs/api/webview-tag
31636    webview: true
31637  };
31638
31639  validatePropertiesInDevelopment = function (type, props) {
31640    validateProperties(type, props);
31641    validateProperties$1(type, props);
31642    validateProperties$2(type, props, {
31643      registrationNameDependencies: registrationNameDependencies,
31644      possibleRegistrationNames: possibleRegistrationNames
31645    });
31646  }; // IE 11 parses & normalizes the style attribute as opposed to other
31647  // browsers. It adds spaces and sorts the properties in some
31648  // non-alphabetical order. Handling that would require sorting CSS
31649  // properties in the client & server versions or applying
31650  // `expectedStyle` to a temporary DOM node to read its `style` attribute
31651  // normalized. Since it only affects IE, we're skipping style warnings
31652  // in that browser completely in favor of doing all that work.
31653  // See https://github.com/facebook/react/issues/11807
31654
31655
31656  canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.
31657  // It also can turn \u0000 into \uFFFD inside attributes.
31658  // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
31659  // If we have a mismatch, it might be caused by that.
31660  // We will still patch up in this case but not fire the warning.
31661
31662  var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
31663  var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
31664
31665  normalizeMarkupForTextOrAttribute = function (markup) {
31666    var markupString = typeof markup === 'string' ? markup : '' + markup;
31667    return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
31668  };
31669
31670  warnForTextDifference = function (serverText, clientText) {
31671    if (didWarnInvalidHydration) {
31672      return;
31673    }
31674
31675    var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
31676    var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
31677
31678    if (normalizedServerText === normalizedClientText) {
31679      return;
31680    }
31681
31682    didWarnInvalidHydration = true;
31683
31684    error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
31685  };
31686
31687  warnForPropDifference = function (propName, serverValue, clientValue) {
31688    if (didWarnInvalidHydration) {
31689      return;
31690    }
31691
31692    var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
31693    var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
31694
31695    if (normalizedServerValue === normalizedClientValue) {
31696      return;
31697    }
31698
31699    didWarnInvalidHydration = true;
31700
31701    error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
31702  };
31703
31704  warnForExtraAttributes = function (attributeNames) {
31705    if (didWarnInvalidHydration) {
31706      return;
31707    }
31708
31709    didWarnInvalidHydration = true;
31710    var names = [];
31711    attributeNames.forEach(function (name) {
31712      names.push(name);
31713    });
31714
31715    error('Extra attributes from the server: %s', names);
31716  };
31717
31718  warnForInvalidEventListener = function (registrationName, listener) {
31719    if (listener === false) {
31720      error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
31721    } else {
31722      error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
31723    }
31724  }; // Parse the HTML and read it back to normalize the HTML string so that it
31725  // can be used for comparison.
31726
31727
31728  normalizeHTML = function (parent, html) {
31729    // We could have created a separate document here to avoid
31730    // re-initializing custom elements if they exist. But this breaks
31731    // how <noscript> is being handled. So we use the same document.
31732    // See the discussion in https://github.com/facebook/react/pull/11157.
31733    var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
31734    testElement.innerHTML = html;
31735    return testElement.innerHTML;
31736  };
31737}
31738
31739function getOwnerDocumentFromRootContainer(rootContainerElement) {
31740  return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
31741}
31742
31743function noop() {}
31744
31745function trapClickOnNonInteractiveElement(node) {
31746  // Mobile Safari does not fire properly bubble click events on
31747  // non-interactive elements, which means delegated click listeners do not
31748  // fire. The workaround for this bug involves attaching an empty click
31749  // listener on the target node.
31750  // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
31751  // Just set it using the onclick property so that we don't have to manage any
31752  // bookkeeping for it. Not sure if we need to clear it when the listener is
31753  // removed.
31754  // TODO: Only do this for the relevant Safaris maybe?
31755  node.onclick = noop;
31756}
31757
31758function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
31759  for (var propKey in nextProps) {
31760    if (!nextProps.hasOwnProperty(propKey)) {
31761      continue;
31762    }
31763
31764    var nextProp = nextProps[propKey];
31765
31766    if (propKey === STYLE) {
31767      {
31768        if (nextProp) {
31769          // Freeze the next style object so that we can assume it won't be
31770          // mutated. We have already warned for this in the past.
31771          Object.freeze(nextProp);
31772        }
31773      } // Relies on `updateStylesByID` not mutating `styleUpdates`.
31774
31775
31776      setValueForStyles(domElement, nextProp);
31777    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
31778      var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
31779
31780      if (nextHtml != null) {
31781        setInnerHTML(domElement, nextHtml);
31782      }
31783    } else if (propKey === CHILDREN) {
31784      if (typeof nextProp === 'string') {
31785        // Avoid setting initial textContent when the text is empty. In IE11 setting
31786        // textContent on a <textarea> will cause the placeholder to not
31787        // show within the <textarea> until it has been focused and blurred again.
31788        // https://github.com/facebook/react/issues/6731#issuecomment-254874553
31789        var canSetTextContent = tag !== 'textarea' || nextProp !== '';
31790
31791        if (canSetTextContent) {
31792          setTextContent(domElement, nextProp);
31793        }
31794      } else if (typeof nextProp === 'number') {
31795        setTextContent(domElement, '' + nextProp);
31796      }
31797    } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
31798      if (nextProp != null) {
31799        if ( typeof nextProp !== 'function') {
31800          warnForInvalidEventListener(propKey, nextProp);
31801        }
31802
31803        if (propKey === 'onScroll') {
31804          listenToNonDelegatedEvent('scroll', domElement);
31805        }
31806      }
31807    } else if (nextProp != null) {
31808      setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
31809    }
31810  }
31811}
31812
31813function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
31814  // TODO: Handle wasCustomComponentTag
31815  for (var i = 0; i < updatePayload.length; i += 2) {
31816    var propKey = updatePayload[i];
31817    var propValue = updatePayload[i + 1];
31818
31819    if (propKey === STYLE) {
31820      setValueForStyles(domElement, propValue);
31821    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
31822      setInnerHTML(domElement, propValue);
31823    } else if (propKey === CHILDREN) {
31824      setTextContent(domElement, propValue);
31825    } else {
31826      setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
31827    }
31828  }
31829}
31830
31831function createElement(type, props, rootContainerElement, parentNamespace) {
31832  var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML
31833  // tags get no namespace.
31834
31835  var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
31836  var domElement;
31837  var namespaceURI = parentNamespace;
31838
31839  if (namespaceURI === HTML_NAMESPACE$1) {
31840    namespaceURI = getIntrinsicNamespace(type);
31841  }
31842
31843  if (namespaceURI === HTML_NAMESPACE$1) {
31844    {
31845      isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to
31846      // allow <SVG> or <mATH>.
31847
31848      if (!isCustomComponentTag && type !== type.toLowerCase()) {
31849        error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
31850      }
31851    }
31852
31853    if (type === 'script') {
31854      // Create the script via .innerHTML so its "parser-inserted" flag is
31855      // set to true and it does not execute
31856      var div = ownerDocument.createElement('div');
31857
31858      div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
31859      // This is guaranteed to yield a script element.
31860
31861      var firstChild = div.firstChild;
31862      domElement = div.removeChild(firstChild);
31863    } else if (typeof props.is === 'string') {
31864      // $FlowIssue `createElement` should be updated for Web Components
31865      domElement = ownerDocument.createElement(type, {
31866        is: props.is
31867      });
31868    } else {
31869      // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
31870      // See discussion in https://github.com/facebook/react/pull/6896
31871      // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
31872      domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
31873      // attributes on `select`s needs to be added before `option`s are inserted.
31874      // This prevents:
31875      // - a bug where the `select` does not scroll to the correct option because singular
31876      //  `select` elements automatically pick the first item #13222
31877      // - a bug where the `select` set the first item as selected despite the `size` attribute #14239
31878      // See https://github.com/facebook/react/issues/13222
31879      // and https://github.com/facebook/react/issues/14239
31880
31881      if (type === 'select') {
31882        var node = domElement;
31883
31884        if (props.multiple) {
31885          node.multiple = true;
31886        } else if (props.size) {
31887          // Setting a size greater than 1 causes a select to behave like `multiple=true`, where
31888          // it is possible that no option is selected.
31889          //
31890          // This is only necessary when a select in "single selection mode".
31891          node.size = props.size;
31892        }
31893      }
31894    }
31895  } else {
31896    domElement = ownerDocument.createElementNS(namespaceURI, type);
31897  }
31898
31899  {
31900    if (namespaceURI === HTML_NAMESPACE$1) {
31901      if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
31902        warnedUnknownTags[type] = true;
31903
31904        error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
31905      }
31906    }
31907  }
31908
31909  return domElement;
31910}
31911function createTextNode(text, rootContainerElement) {
31912  return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
31913}
31914function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
31915  var isCustomComponentTag = isCustomComponent(tag, rawProps);
31916
31917  {
31918    validatePropertiesInDevelopment(tag, rawProps);
31919  } // TODO: Make sure that we check isMounted before firing any of these events.
31920
31921
31922  var props;
31923
31924  switch (tag) {
31925    case 'dialog':
31926      listenToNonDelegatedEvent('cancel', domElement);
31927      listenToNonDelegatedEvent('close', domElement);
31928      props = rawProps;
31929      break;
31930
31931    case 'iframe':
31932    case 'object':
31933    case 'embed':
31934      // We listen to this event in case to ensure emulated bubble
31935      // listeners still fire for the load event.
31936      listenToNonDelegatedEvent('load', domElement);
31937      props = rawProps;
31938      break;
31939
31940    case 'video':
31941    case 'audio':
31942      // We listen to these events in case to ensure emulated bubble
31943      // listeners still fire for all the media events.
31944      for (var i = 0; i < mediaEventTypes.length; i++) {
31945        listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
31946      }
31947
31948      props = rawProps;
31949      break;
31950
31951    case 'source':
31952      // We listen to this event in case to ensure emulated bubble
31953      // listeners still fire for the error event.
31954      listenToNonDelegatedEvent('error', domElement);
31955      props = rawProps;
31956      break;
31957
31958    case 'img':
31959    case 'image':
31960    case 'link':
31961      // We listen to these events in case to ensure emulated bubble
31962      // listeners still fire for error and load events.
31963      listenToNonDelegatedEvent('error', domElement);
31964      listenToNonDelegatedEvent('load', domElement);
31965      props = rawProps;
31966      break;
31967
31968    case 'details':
31969      // We listen to this event in case to ensure emulated bubble
31970      // listeners still fire for the toggle event.
31971      listenToNonDelegatedEvent('toggle', domElement);
31972      props = rawProps;
31973      break;
31974
31975    case 'input':
31976      initWrapperState(domElement, rawProps);
31977      props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
31978      // listeners still fire for the invalid event.
31979
31980      listenToNonDelegatedEvent('invalid', domElement);
31981
31982      break;
31983
31984    case 'option':
31985      validateProps(domElement, rawProps);
31986      props = getHostProps$1(domElement, rawProps);
31987      break;
31988
31989    case 'select':
31990      initWrapperState$1(domElement, rawProps);
31991      props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
31992      // listeners still fire for the invalid event.
31993
31994      listenToNonDelegatedEvent('invalid', domElement);
31995
31996      break;
31997
31998    case 'textarea':
31999      initWrapperState$2(domElement, rawProps);
32000      props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
32001      // listeners still fire for the invalid event.
32002
32003      listenToNonDelegatedEvent('invalid', domElement);
32004
32005      break;
32006
32007    default:
32008      props = rawProps;
32009  }
32010
32011  assertValidProps(tag, props);
32012  setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);
32013
32014  switch (tag) {
32015    case 'input':
32016      // TODO: Make sure we check if this is still unmounted or do any clean
32017      // up necessary since we never stop tracking anymore.
32018      track(domElement);
32019      postMountWrapper(domElement, rawProps, false);
32020      break;
32021
32022    case 'textarea':
32023      // TODO: Make sure we check if this is still unmounted or do any clean
32024      // up necessary since we never stop tracking anymore.
32025      track(domElement);
32026      postMountWrapper$3(domElement);
32027      break;
32028
32029    case 'option':
32030      postMountWrapper$1(domElement, rawProps);
32031      break;
32032
32033    case 'select':
32034      postMountWrapper$2(domElement, rawProps);
32035      break;
32036
32037    default:
32038      if (typeof props.onClick === 'function') {
32039        // TODO: This cast may not be sound for SVG, MathML or custom elements.
32040        trapClickOnNonInteractiveElement(domElement);
32041      }
32042
32043      break;
32044  }
32045} // Calculate the diff between the two objects.
32046
32047function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
32048  {
32049    validatePropertiesInDevelopment(tag, nextRawProps);
32050  }
32051
32052  var updatePayload = null;
32053  var lastProps;
32054  var nextProps;
32055
32056  switch (tag) {
32057    case 'input':
32058      lastProps = getHostProps(domElement, lastRawProps);
32059      nextProps = getHostProps(domElement, nextRawProps);
32060      updatePayload = [];
32061      break;
32062
32063    case 'option':
32064      lastProps = getHostProps$1(domElement, lastRawProps);
32065      nextProps = getHostProps$1(domElement, nextRawProps);
32066      updatePayload = [];
32067      break;
32068
32069    case 'select':
32070      lastProps = getHostProps$2(domElement, lastRawProps);
32071      nextProps = getHostProps$2(domElement, nextRawProps);
32072      updatePayload = [];
32073      break;
32074
32075    case 'textarea':
32076      lastProps = getHostProps$3(domElement, lastRawProps);
32077      nextProps = getHostProps$3(domElement, nextRawProps);
32078      updatePayload = [];
32079      break;
32080
32081    default:
32082      lastProps = lastRawProps;
32083      nextProps = nextRawProps;
32084
32085      if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
32086        // TODO: This cast may not be sound for SVG, MathML or custom elements.
32087        trapClickOnNonInteractiveElement(domElement);
32088      }
32089
32090      break;
32091  }
32092
32093  assertValidProps(tag, nextProps);
32094  var propKey;
32095  var styleName;
32096  var styleUpdates = null;
32097
32098  for (propKey in lastProps) {
32099    if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
32100      continue;
32101    }
32102
32103    if (propKey === STYLE) {
32104      var lastStyle = lastProps[propKey];
32105
32106      for (styleName in lastStyle) {
32107        if (lastStyle.hasOwnProperty(styleName)) {
32108          if (!styleUpdates) {
32109            styleUpdates = {};
32110          }
32111
32112          styleUpdates[styleName] = '';
32113        }
32114      }
32115    } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
32116      // This is a special case. If any listener updates we need to ensure
32117      // that the "current" fiber pointer gets updated so we need a commit
32118      // to update this element.
32119      if (!updatePayload) {
32120        updatePayload = [];
32121      }
32122    } else {
32123      // For all other deleted properties we add it to the queue. We use
32124      // the allowed property list in the commit phase instead.
32125      (updatePayload = updatePayload || []).push(propKey, null);
32126    }
32127  }
32128
32129  for (propKey in nextProps) {
32130    var nextProp = nextProps[propKey];
32131    var lastProp = lastProps != null ? lastProps[propKey] : undefined;
32132
32133    if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
32134      continue;
32135    }
32136
32137    if (propKey === STYLE) {
32138      {
32139        if (nextProp) {
32140          // Freeze the next style object so that we can assume it won't be
32141          // mutated. We have already warned for this in the past.
32142          Object.freeze(nextProp);
32143        }
32144      }
32145
32146      if (lastProp) {
32147        // Unset styles on `lastProp` but not on `nextProp`.
32148        for (styleName in lastProp) {
32149          if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
32150            if (!styleUpdates) {
32151              styleUpdates = {};
32152            }
32153
32154            styleUpdates[styleName] = '';
32155          }
32156        } // Update styles that changed since `lastProp`.
32157
32158
32159        for (styleName in nextProp) {
32160          if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
32161            if (!styleUpdates) {
32162              styleUpdates = {};
32163            }
32164
32165            styleUpdates[styleName] = nextProp[styleName];
32166          }
32167        }
32168      } else {
32169        // Relies on `updateStylesByID` not mutating `styleUpdates`.
32170        if (!styleUpdates) {
32171          if (!updatePayload) {
32172            updatePayload = [];
32173          }
32174
32175          updatePayload.push(propKey, styleUpdates);
32176        }
32177
32178        styleUpdates = nextProp;
32179      }
32180    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
32181      var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
32182      var lastHtml = lastProp ? lastProp[HTML$1] : undefined;
32183
32184      if (nextHtml != null) {
32185        if (lastHtml !== nextHtml) {
32186          (updatePayload = updatePayload || []).push(propKey, nextHtml);
32187        }
32188      }
32189    } else if (propKey === CHILDREN) {
32190      if (typeof nextProp === 'string' || typeof nextProp === 'number') {
32191        (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
32192      }
32193    } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
32194      if (nextProp != null) {
32195        // We eagerly listen to this even though we haven't committed yet.
32196        if ( typeof nextProp !== 'function') {
32197          warnForInvalidEventListener(propKey, nextProp);
32198        }
32199
32200        if (propKey === 'onScroll') {
32201          listenToNonDelegatedEvent('scroll', domElement);
32202        }
32203      }
32204
32205      if (!updatePayload && lastProp !== nextProp) {
32206        // This is a special case. If any listener updates we need to ensure
32207        // that the "current" props pointer gets updated so we need a commit
32208        // to update this element.
32209        updatePayload = [];
32210      }
32211    } else if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) {
32212      // If we encounter useOpaqueReference's opaque object, this means we are hydrating.
32213      // In this case, call the opaque object's toString function which generates a new client
32214      // ID so client and server IDs match and throws to rerender.
32215      nextProp.toString();
32216    } else {
32217      // For any other property we always add it to the queue and then we
32218      // filter it out using the allowed property list during the commit.
32219      (updatePayload = updatePayload || []).push(propKey, nextProp);
32220    }
32221  }
32222
32223  if (styleUpdates) {
32224    {
32225      validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
32226    }
32227
32228    (updatePayload = updatePayload || []).push(STYLE, styleUpdates);
32229  }
32230
32231  return updatePayload;
32232} // Apply the diff.
32233
32234function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
32235  // Update checked *before* name.
32236  // In the middle of an update, it is possible to have multiple checked.
32237  // When a checked radio tries to change name, browser makes another radio's checked false.
32238  if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
32239    updateChecked(domElement, nextRawProps);
32240  }
32241
32242  var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
32243  var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.
32244
32245  updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
32246  // changed.
32247
32248  switch (tag) {
32249    case 'input':
32250      // Update the wrapper around inputs *after* updating props. This has to
32251      // happen after `updateDOMProperties`. Otherwise HTML5 input validations
32252      // raise warnings and prevent the new value from being assigned.
32253      updateWrapper(domElement, nextRawProps);
32254      break;
32255
32256    case 'textarea':
32257      updateWrapper$1(domElement, nextRawProps);
32258      break;
32259
32260    case 'select':
32261      // <select> value update needs to occur after <option> children
32262      // reconciliation
32263      postUpdateWrapper(domElement, nextRawProps);
32264      break;
32265  }
32266}
32267
32268function getPossibleStandardName(propName) {
32269  {
32270    var lowerCasedName = propName.toLowerCase();
32271
32272    if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
32273      return null;
32274    }
32275
32276    return possibleStandardNames[lowerCasedName] || null;
32277  }
32278}
32279
32280function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
32281  var isCustomComponentTag;
32282  var extraAttributeNames;
32283
32284  {
32285    suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;
32286    isCustomComponentTag = isCustomComponent(tag, rawProps);
32287    validatePropertiesInDevelopment(tag, rawProps);
32288  } // TODO: Make sure that we check isMounted before firing any of these events.
32289
32290
32291  switch (tag) {
32292    case 'dialog':
32293      listenToNonDelegatedEvent('cancel', domElement);
32294      listenToNonDelegatedEvent('close', domElement);
32295      break;
32296
32297    case 'iframe':
32298    case 'object':
32299    case 'embed':
32300      // We listen to this event in case to ensure emulated bubble
32301      // listeners still fire for the load event.
32302      listenToNonDelegatedEvent('load', domElement);
32303      break;
32304
32305    case 'video':
32306    case 'audio':
32307      // We listen to these events in case to ensure emulated bubble
32308      // listeners still fire for all the media events.
32309      for (var i = 0; i < mediaEventTypes.length; i++) {
32310        listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
32311      }
32312
32313      break;
32314
32315    case 'source':
32316      // We listen to this event in case to ensure emulated bubble
32317      // listeners still fire for the error event.
32318      listenToNonDelegatedEvent('error', domElement);
32319      break;
32320
32321    case 'img':
32322    case 'image':
32323    case 'link':
32324      // We listen to these events in case to ensure emulated bubble
32325      // listeners still fire for error and load events.
32326      listenToNonDelegatedEvent('error', domElement);
32327      listenToNonDelegatedEvent('load', domElement);
32328      break;
32329
32330    case 'details':
32331      // We listen to this event in case to ensure emulated bubble
32332      // listeners still fire for the toggle event.
32333      listenToNonDelegatedEvent('toggle', domElement);
32334      break;
32335
32336    case 'input':
32337      initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
32338      // listeners still fire for the invalid event.
32339
32340      listenToNonDelegatedEvent('invalid', domElement);
32341
32342      break;
32343
32344    case 'option':
32345      validateProps(domElement, rawProps);
32346      break;
32347
32348    case 'select':
32349      initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
32350      // listeners still fire for the invalid event.
32351
32352      listenToNonDelegatedEvent('invalid', domElement);
32353
32354      break;
32355
32356    case 'textarea':
32357      initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
32358      // listeners still fire for the invalid event.
32359
32360      listenToNonDelegatedEvent('invalid', domElement);
32361
32362      break;
32363  }
32364
32365  assertValidProps(tag, rawProps);
32366
32367  {
32368    extraAttributeNames = new Set();
32369    var attributes = domElement.attributes;
32370
32371    for (var _i = 0; _i < attributes.length; _i++) {
32372      var name = attributes[_i].name.toLowerCase();
32373
32374      switch (name) {
32375        // Built-in SSR attribute is allowed
32376        case 'data-reactroot':
32377          break;
32378        // Controlled attributes are not validated
32379        // TODO: Only ignore them on controlled tags.
32380
32381        case 'value':
32382          break;
32383
32384        case 'checked':
32385          break;
32386
32387        case 'selected':
32388          break;
32389
32390        default:
32391          // Intentionally use the original name.
32392          // See discussion in https://github.com/facebook/react/pull/10676.
32393          extraAttributeNames.add(attributes[_i].name);
32394      }
32395    }
32396  }
32397
32398  var updatePayload = null;
32399
32400  for (var propKey in rawProps) {
32401    if (!rawProps.hasOwnProperty(propKey)) {
32402      continue;
32403    }
32404
32405    var nextProp = rawProps[propKey];
32406
32407    if (propKey === CHILDREN) {
32408      // For text content children we compare against textContent. This
32409      // might match additional HTML that is hidden when we read it using
32410      // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
32411      // satisfies our requirement. Our requirement is not to produce perfect
32412      // HTML and attributes. Ideally we should preserve structure but it's
32413      // ok not to if the visible content is still enough to indicate what
32414      // even listeners these nodes might be wired up to.
32415      // TODO: Warn if there is more than a single textNode as a child.
32416      // TODO: Should we use domElement.firstChild.nodeValue to compare?
32417      if (typeof nextProp === 'string') {
32418        if (domElement.textContent !== nextProp) {
32419          if ( !suppressHydrationWarning) {
32420            warnForTextDifference(domElement.textContent, nextProp);
32421          }
32422
32423          updatePayload = [CHILDREN, nextProp];
32424        }
32425      } else if (typeof nextProp === 'number') {
32426        if (domElement.textContent !== '' + nextProp) {
32427          if ( !suppressHydrationWarning) {
32428            warnForTextDifference(domElement.textContent, nextProp);
32429          }
32430
32431          updatePayload = [CHILDREN, '' + nextProp];
32432        }
32433      }
32434    } else if (registrationNameDependencies.hasOwnProperty(propKey)) {
32435      if (nextProp != null) {
32436        if ( typeof nextProp !== 'function') {
32437          warnForInvalidEventListener(propKey, nextProp);
32438        }
32439
32440        if (propKey === 'onScroll') {
32441          listenToNonDelegatedEvent('scroll', domElement);
32442        }
32443      }
32444    } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)
32445    typeof isCustomComponentTag === 'boolean') {
32446      // Validate that the properties correspond to their expected values.
32447      var serverValue = void 0;
32448      var propertyInfo = getPropertyInfo(propKey);
32449
32450      if (suppressHydrationWarning) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
32451      // TODO: Only ignore them on controlled tags.
32452      propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
32453        var serverHTML = domElement.innerHTML;
32454        var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
32455
32456        if (nextHtml != null) {
32457          var expectedHTML = normalizeHTML(domElement, nextHtml);
32458
32459          if (expectedHTML !== serverHTML) {
32460            warnForPropDifference(propKey, serverHTML, expectedHTML);
32461          }
32462        }
32463      } else if (propKey === STYLE) {
32464        // $FlowFixMe - Should be inferred as not undefined.
32465        extraAttributeNames.delete(propKey);
32466
32467        if (canDiffStyleForHydrationWarning) {
32468          var expectedStyle = createDangerousStringForStyles(nextProp);
32469          serverValue = domElement.getAttribute('style');
32470
32471          if (expectedStyle !== serverValue) {
32472            warnForPropDifference(propKey, serverValue, expectedStyle);
32473          }
32474        }
32475      } else if (isCustomComponentTag) {
32476        // $FlowFixMe - Should be inferred as not undefined.
32477        extraAttributeNames.delete(propKey.toLowerCase());
32478        serverValue = getValueForAttribute(domElement, propKey, nextProp);
32479
32480        if (nextProp !== serverValue) {
32481          warnForPropDifference(propKey, serverValue, nextProp);
32482        }
32483      } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
32484        var isMismatchDueToBadCasing = false;
32485
32486        if (propertyInfo !== null) {
32487          // $FlowFixMe - Should be inferred as not undefined.
32488          extraAttributeNames.delete(propertyInfo.attributeName);
32489          serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
32490        } else {
32491          var ownNamespace = parentNamespace;
32492
32493          if (ownNamespace === HTML_NAMESPACE$1) {
32494            ownNamespace = getIntrinsicNamespace(tag);
32495          }
32496
32497          if (ownNamespace === HTML_NAMESPACE$1) {
32498            // $FlowFixMe - Should be inferred as not undefined.
32499            extraAttributeNames.delete(propKey.toLowerCase());
32500          } else {
32501            var standardName = getPossibleStandardName(propKey);
32502
32503            if (standardName !== null && standardName !== propKey) {
32504              // If an SVG prop is supplied with bad casing, it will
32505              // be successfully parsed from HTML, but will produce a mismatch
32506              // (and would be incorrectly rendered on the client).
32507              // However, we already warn about bad casing elsewhere.
32508              // So we'll skip the misleading extra mismatch warning in this case.
32509              isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.
32510
32511              extraAttributeNames.delete(standardName);
32512            } // $FlowFixMe - Should be inferred as not undefined.
32513
32514
32515            extraAttributeNames.delete(propKey);
32516          }
32517
32518          serverValue = getValueForAttribute(domElement, propKey, nextProp);
32519        }
32520
32521        if (nextProp !== serverValue && !isMismatchDueToBadCasing) {
32522          warnForPropDifference(propKey, serverValue, nextProp);
32523        }
32524      }
32525    }
32526  }
32527
32528  {
32529    // $FlowFixMe - Should be inferred as not undefined.
32530    if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
32531      // $FlowFixMe - Should be inferred as not undefined.
32532      warnForExtraAttributes(extraAttributeNames);
32533    }
32534  }
32535
32536  switch (tag) {
32537    case 'input':
32538      // TODO: Make sure we check if this is still unmounted or do any clean
32539      // up necessary since we never stop tracking anymore.
32540      track(domElement);
32541      postMountWrapper(domElement, rawProps, true);
32542      break;
32543
32544    case 'textarea':
32545      // TODO: Make sure we check if this is still unmounted or do any clean
32546      // up necessary since we never stop tracking anymore.
32547      track(domElement);
32548      postMountWrapper$3(domElement);
32549      break;
32550
32551    case 'select':
32552    case 'option':
32553      // For input and textarea we current always set the value property at
32554      // post mount to force it to diverge from attributes. However, for
32555      // option and select we don't quite do the same thing and select
32556      // is not resilient to the DOM state changing so we don't do that here.
32557      // TODO: Consider not doing this for input and textarea.
32558      break;
32559
32560    default:
32561      if (typeof rawProps.onClick === 'function') {
32562        // TODO: This cast may not be sound for SVG, MathML or custom elements.
32563        trapClickOnNonInteractiveElement(domElement);
32564      }
32565
32566      break;
32567  }
32568
32569  return updatePayload;
32570}
32571function diffHydratedText(textNode, text) {
32572  var isDifferent = textNode.nodeValue !== text;
32573  return isDifferent;
32574}
32575function warnForUnmatchedText(textNode, text) {
32576  {
32577    warnForTextDifference(textNode.nodeValue, text);
32578  }
32579}
32580function warnForDeletedHydratableElement(parentNode, child) {
32581  {
32582    if (didWarnInvalidHydration) {
32583      return;
32584    }
32585
32586    didWarnInvalidHydration = true;
32587
32588    error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
32589  }
32590}
32591function warnForDeletedHydratableText(parentNode, child) {
32592  {
32593    if (didWarnInvalidHydration) {
32594      return;
32595    }
32596
32597    didWarnInvalidHydration = true;
32598
32599    error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
32600  }
32601}
32602function warnForInsertedHydratedElement(parentNode, tag, props) {
32603  {
32604    if (didWarnInvalidHydration) {
32605      return;
32606    }
32607
32608    didWarnInvalidHydration = true;
32609
32610    error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
32611  }
32612}
32613function warnForInsertedHydratedText(parentNode, text) {
32614  {
32615    if (text === '') {
32616      // We expect to insert empty text nodes since they're not represented in
32617      // the HTML.
32618      // TODO: Remove this special case if we can just avoid inserting empty
32619      // text nodes.
32620      return;
32621    }
32622
32623    if (didWarnInvalidHydration) {
32624      return;
32625    }
32626
32627    didWarnInvalidHydration = true;
32628
32629    error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
32630  }
32631}
32632function restoreControlledState$3(domElement, tag, props) {
32633  switch (tag) {
32634    case 'input':
32635      restoreControlledState(domElement, props);
32636      return;
32637
32638    case 'textarea':
32639      restoreControlledState$2(domElement, props);
32640      return;
32641
32642    case 'select':
32643      restoreControlledState$1(domElement, props);
32644      return;
32645  }
32646}
32647
32648var validateDOMNesting = function () {};
32649
32650var updatedAncestorInfo = function () {};
32651
32652{
32653  // This validation code was written based on the HTML5 parsing spec:
32654  // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
32655  //
32656  // Note: this does not catch all invalid nesting, nor does it try to (as it's
32657  // not clear what practical benefit doing so provides); instead, we warn only
32658  // for cases where the parser will give a parse tree differing from what React
32659  // intended. For example, <b><div></div></b> is invalid but we don't warn
32660  // because it still parses correctly; we do warn for other cases like nested
32661  // <p> tags where the beginning of the second element implicitly closes the
32662  // first, causing a confusing mess.
32663  // https://html.spec.whatwg.org/multipage/syntax.html#special
32664  var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
32665
32666  var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
32667  // TODO: Distinguish by namespace here -- for <title>, including it here
32668  // errs on the side of fewer warnings
32669  'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
32670
32671  var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
32672
32673  var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
32674  var emptyAncestorInfo = {
32675    current: null,
32676    formTag: null,
32677    aTagInScope: null,
32678    buttonTagInScope: null,
32679    nobrTagInScope: null,
32680    pTagInButtonScope: null,
32681    listItemTagAutoclosing: null,
32682    dlItemTagAutoclosing: null
32683  };
32684
32685  updatedAncestorInfo = function (oldInfo, tag) {
32686    var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
32687
32688    var info = {
32689      tag: tag
32690    };
32691
32692    if (inScopeTags.indexOf(tag) !== -1) {
32693      ancestorInfo.aTagInScope = null;
32694      ancestorInfo.buttonTagInScope = null;
32695      ancestorInfo.nobrTagInScope = null;
32696    }
32697
32698    if (buttonScopeTags.indexOf(tag) !== -1) {
32699      ancestorInfo.pTagInButtonScope = null;
32700    } // See rules for 'li', 'dd', 'dt' start tags in
32701    // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
32702
32703
32704    if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
32705      ancestorInfo.listItemTagAutoclosing = null;
32706      ancestorInfo.dlItemTagAutoclosing = null;
32707    }
32708
32709    ancestorInfo.current = info;
32710
32711    if (tag === 'form') {
32712      ancestorInfo.formTag = info;
32713    }
32714
32715    if (tag === 'a') {
32716      ancestorInfo.aTagInScope = info;
32717    }
32718
32719    if (tag === 'button') {
32720      ancestorInfo.buttonTagInScope = info;
32721    }
32722
32723    if (tag === 'nobr') {
32724      ancestorInfo.nobrTagInScope = info;
32725    }
32726
32727    if (tag === 'p') {
32728      ancestorInfo.pTagInButtonScope = info;
32729    }
32730
32731    if (tag === 'li') {
32732      ancestorInfo.listItemTagAutoclosing = info;
32733    }
32734
32735    if (tag === 'dd' || tag === 'dt') {
32736      ancestorInfo.dlItemTagAutoclosing = info;
32737    }
32738
32739    return ancestorInfo;
32740  };
32741  /**
32742   * Returns whether
32743   */
32744
32745
32746  var isTagValidWithParent = function (tag, parentTag) {
32747    // First, let's check if we're in an unusual parsing mode...
32748    switch (parentTag) {
32749      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
32750      case 'select':
32751        return tag === 'option' || tag === 'optgroup' || tag === '#text';
32752
32753      case 'optgroup':
32754        return tag === 'option' || tag === '#text';
32755      // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
32756      // but
32757
32758      case 'option':
32759        return tag === '#text';
32760      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
32761      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
32762      // No special behavior since these rules fall back to "in body" mode for
32763      // all except special table nodes which cause bad parsing behavior anyway.
32764      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
32765
32766      case 'tr':
32767        return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
32768      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
32769
32770      case 'tbody':
32771      case 'thead':
32772      case 'tfoot':
32773        return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
32774      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
32775
32776      case 'colgroup':
32777        return tag === 'col' || tag === 'template';
32778      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
32779
32780      case 'table':
32781        return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
32782      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
32783
32784      case 'head':
32785        return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
32786      // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
32787
32788      case 'html':
32789        return tag === 'head' || tag === 'body' || tag === 'frameset';
32790
32791      case 'frameset':
32792        return tag === 'frame';
32793
32794      case '#document':
32795        return tag === 'html';
32796    } // Probably in the "in body" parsing mode, so we outlaw only tag combos
32797    // where the parsing rules cause implicit opens or closes to be added.
32798    // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
32799
32800
32801    switch (tag) {
32802      case 'h1':
32803      case 'h2':
32804      case 'h3':
32805      case 'h4':
32806      case 'h5':
32807      case 'h6':
32808        return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
32809
32810      case 'rp':
32811      case 'rt':
32812        return impliedEndTags.indexOf(parentTag) === -1;
32813
32814      case 'body':
32815      case 'caption':
32816      case 'col':
32817      case 'colgroup':
32818      case 'frameset':
32819      case 'frame':
32820      case 'head':
32821      case 'html':
32822      case 'tbody':
32823      case 'td':
32824      case 'tfoot':
32825      case 'th':
32826      case 'thead':
32827      case 'tr':
32828        // These tags are only valid with a few parents that have special child
32829        // parsing rules -- if we're down here, then none of those matched and
32830        // so we allow it only if we don't know what the parent is, as all other
32831        // cases are invalid.
32832        return parentTag == null;
32833    }
32834
32835    return true;
32836  };
32837  /**
32838   * Returns whether
32839   */
32840
32841
32842  var findInvalidAncestorForTag = function (tag, ancestorInfo) {
32843    switch (tag) {
32844      case 'address':
32845      case 'article':
32846      case 'aside':
32847      case 'blockquote':
32848      case 'center':
32849      case 'details':
32850      case 'dialog':
32851      case 'dir':
32852      case 'div':
32853      case 'dl':
32854      case 'fieldset':
32855      case 'figcaption':
32856      case 'figure':
32857      case 'footer':
32858      case 'header':
32859      case 'hgroup':
32860      case 'main':
32861      case 'menu':
32862      case 'nav':
32863      case 'ol':
32864      case 'p':
32865      case 'section':
32866      case 'summary':
32867      case 'ul':
32868      case 'pre':
32869      case 'listing':
32870      case 'table':
32871      case 'hr':
32872      case 'xmp':
32873      case 'h1':
32874      case 'h2':
32875      case 'h3':
32876      case 'h4':
32877      case 'h5':
32878      case 'h6':
32879        return ancestorInfo.pTagInButtonScope;
32880
32881      case 'form':
32882        return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
32883
32884      case 'li':
32885        return ancestorInfo.listItemTagAutoclosing;
32886
32887      case 'dd':
32888      case 'dt':
32889        return ancestorInfo.dlItemTagAutoclosing;
32890
32891      case 'button':
32892        return ancestorInfo.buttonTagInScope;
32893
32894      case 'a':
32895        // Spec says something about storing a list of markers, but it sounds
32896        // equivalent to this check.
32897        return ancestorInfo.aTagInScope;
32898
32899      case 'nobr':
32900        return ancestorInfo.nobrTagInScope;
32901    }
32902
32903    return null;
32904  };
32905
32906  var didWarn$1 = {};
32907
32908  validateDOMNesting = function (childTag, childText, ancestorInfo) {
32909    ancestorInfo = ancestorInfo || emptyAncestorInfo;
32910    var parentInfo = ancestorInfo.current;
32911    var parentTag = parentInfo && parentInfo.tag;
32912
32913    if (childText != null) {
32914      if (childTag != null) {
32915        error('validateDOMNesting: when childText is passed, childTag should be null');
32916      }
32917
32918      childTag = '#text';
32919    }
32920
32921    var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
32922    var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
32923    var invalidParentOrAncestor = invalidParent || invalidAncestor;
32924
32925    if (!invalidParentOrAncestor) {
32926      return;
32927    }
32928
32929    var ancestorTag = invalidParentOrAncestor.tag;
32930    var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;
32931
32932    if (didWarn$1[warnKey]) {
32933      return;
32934    }
32935
32936    didWarn$1[warnKey] = true;
32937    var tagDisplayName = childTag;
32938    var whitespaceInfo = '';
32939
32940    if (childTag === '#text') {
32941      if (/\S/.test(childText)) {
32942        tagDisplayName = 'Text nodes';
32943      } else {
32944        tagDisplayName = 'Whitespace text nodes';
32945        whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
32946      }
32947    } else {
32948      tagDisplayName = '<' + childTag + '>';
32949    }
32950
32951    if (invalidParent) {
32952      var info = '';
32953
32954      if (ancestorTag === 'table' && childTag === 'tr') {
32955        info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';
32956      }
32957
32958      error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);
32959    } else {
32960      error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);
32961    }
32962  };
32963}
32964
32965var SUPPRESS_HYDRATION_WARNING$1;
32966
32967{
32968  SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
32969}
32970
32971var SUSPENSE_START_DATA = '$';
32972var SUSPENSE_END_DATA = '/$';
32973var SUSPENSE_PENDING_START_DATA = '$?';
32974var SUSPENSE_FALLBACK_START_DATA = '$!';
32975var STYLE$1 = 'style';
32976var eventsEnabled = null;
32977var selectionInformation = null;
32978
32979function shouldAutoFocusHostComponent(type, props) {
32980  switch (type) {
32981    case 'button':
32982    case 'input':
32983    case 'select':
32984    case 'textarea':
32985      return !!props.autoFocus;
32986  }
32987
32988  return false;
32989}
32990function getRootHostContext(rootContainerInstance) {
32991  var type;
32992  var namespace;
32993  var nodeType = rootContainerInstance.nodeType;
32994
32995  switch (nodeType) {
32996    case DOCUMENT_NODE:
32997    case DOCUMENT_FRAGMENT_NODE:
32998      {
32999        type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
33000        var root = rootContainerInstance.documentElement;
33001        namespace = root ? root.namespaceURI : getChildNamespace(null, '');
33002        break;
33003      }
33004
33005    default:
33006      {
33007        var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
33008        var ownNamespace = container.namespaceURI || null;
33009        type = container.tagName;
33010        namespace = getChildNamespace(ownNamespace, type);
33011        break;
33012      }
33013  }
33014
33015  {
33016    var validatedTag = type.toLowerCase();
33017    var ancestorInfo = updatedAncestorInfo(null, validatedTag);
33018    return {
33019      namespace: namespace,
33020      ancestorInfo: ancestorInfo
33021    };
33022  }
33023}
33024function getChildHostContext(parentHostContext, type, rootContainerInstance) {
33025  {
33026    var parentHostContextDev = parentHostContext;
33027    var namespace = getChildNamespace(parentHostContextDev.namespace, type);
33028    var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
33029    return {
33030      namespace: namespace,
33031      ancestorInfo: ancestorInfo
33032    };
33033  }
33034}
33035function getPublicInstance(instance) {
33036  return instance;
33037}
33038function prepareForCommit(containerInfo) {
33039  eventsEnabled = isEnabled();
33040  selectionInformation = getSelectionInformation();
33041  var activeInstance = null;
33042
33043  setEnabled(false);
33044  return activeInstance;
33045}
33046function resetAfterCommit(containerInfo) {
33047  restoreSelection(selectionInformation);
33048  setEnabled(eventsEnabled);
33049  eventsEnabled = null;
33050  selectionInformation = null;
33051}
33052function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
33053  var parentNamespace;
33054
33055  {
33056    // TODO: take namespace into account when validating.
33057    var hostContextDev = hostContext;
33058    validateDOMNesting(type, null, hostContextDev.ancestorInfo);
33059
33060    if (typeof props.children === 'string' || typeof props.children === 'number') {
33061      var string = '' + props.children;
33062      var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
33063      validateDOMNesting(null, string, ownAncestorInfo);
33064    }
33065
33066    parentNamespace = hostContextDev.namespace;
33067  }
33068
33069  var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
33070  precacheFiberNode(internalInstanceHandle, domElement);
33071  updateFiberProps(domElement, props);
33072  return domElement;
33073}
33074function appendInitialChild(parentInstance, child) {
33075  parentInstance.appendChild(child);
33076}
33077function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
33078  setInitialProperties(domElement, type, props, rootContainerInstance);
33079  return shouldAutoFocusHostComponent(type, props);
33080}
33081function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
33082  {
33083    var hostContextDev = hostContext;
33084
33085    if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
33086      var string = '' + newProps.children;
33087      var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
33088      validateDOMNesting(null, string, ownAncestorInfo);
33089    }
33090  }
33091
33092  return diffProperties(domElement, type, oldProps, newProps);
33093}
33094function shouldSetTextContent(type, props) {
33095  return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
33096}
33097function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
33098  {
33099    var hostContextDev = hostContext;
33100    validateDOMNesting(null, text, hostContextDev.ancestorInfo);
33101  }
33102
33103  var textNode = createTextNode(text, rootContainerInstance);
33104  precacheFiberNode(internalInstanceHandle, textNode);
33105  return textNode;
33106}
33107// if a component just imports ReactDOM (e.g. for findDOMNode).
33108// Some environments might not have setTimeout or clearTimeout.
33109
33110var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
33111var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
33112var noTimeout = -1; // -------------------
33113function commitMount(domElement, type, newProps, internalInstanceHandle) {
33114  // Despite the naming that might imply otherwise, this method only
33115  // fires if there is an `Update` effect scheduled during mounting.
33116  // This happens if `finalizeInitialChildren` returns `true` (which it
33117  // does to implement the `autoFocus` attribute on the client). But
33118  // there are also other cases when this might happen (such as patching
33119  // up text content during hydration mismatch). So we'll check this again.
33120  if (shouldAutoFocusHostComponent(type, newProps)) {
33121    domElement.focus();
33122  }
33123}
33124function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
33125  // Update the props handle so that we know which props are the ones with
33126  // with current event handlers.
33127  updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.
33128
33129  updateProperties(domElement, updatePayload, type, oldProps, newProps);
33130}
33131function resetTextContent(domElement) {
33132  setTextContent(domElement, '');
33133}
33134function commitTextUpdate(textInstance, oldText, newText) {
33135  textInstance.nodeValue = newText;
33136}
33137function appendChild(parentInstance, child) {
33138  parentInstance.appendChild(child);
33139}
33140function appendChildToContainer(container, child) {
33141  var parentNode;
33142
33143  if (container.nodeType === COMMENT_NODE) {
33144    parentNode = container.parentNode;
33145    parentNode.insertBefore(child, container);
33146  } else {
33147    parentNode = container;
33148    parentNode.appendChild(child);
33149  } // This container might be used for a portal.
33150  // If something inside a portal is clicked, that click should bubble
33151  // through the React tree. However, on Mobile Safari the click would
33152  // never bubble through the *DOM* tree unless an ancestor with onclick
33153  // event exists. So we wouldn't see it and dispatch it.
33154  // This is why we ensure that non React root containers have inline onclick
33155  // defined.
33156  // https://github.com/facebook/react/issues/11918
33157
33158
33159  var reactRootContainer = container._reactRootContainer;
33160
33161  if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
33162    // TODO: This cast may not be sound for SVG, MathML or custom elements.
33163    trapClickOnNonInteractiveElement(parentNode);
33164  }
33165}
33166function insertBefore(parentInstance, child, beforeChild) {
33167  parentInstance.insertBefore(child, beforeChild);
33168}
33169function insertInContainerBefore(container, child, beforeChild) {
33170  if (container.nodeType === COMMENT_NODE) {
33171    container.parentNode.insertBefore(child, beforeChild);
33172  } else {
33173    container.insertBefore(child, beforeChild);
33174  }
33175}
33176
33177function removeChild(parentInstance, child) {
33178  parentInstance.removeChild(child);
33179}
33180function removeChildFromContainer(container, child) {
33181  if (container.nodeType === COMMENT_NODE) {
33182    container.parentNode.removeChild(child);
33183  } else {
33184    container.removeChild(child);
33185  }
33186}
33187function hideInstance(instance) {
33188  // TODO: Does this work for all element types? What about MathML? Should we
33189  // pass host context to this method?
33190  instance = instance;
33191  var style = instance.style;
33192
33193  if (typeof style.setProperty === 'function') {
33194    style.setProperty('display', 'none', 'important');
33195  } else {
33196    style.display = 'none';
33197  }
33198}
33199function hideTextInstance(textInstance) {
33200  textInstance.nodeValue = '';
33201}
33202function unhideInstance(instance, props) {
33203  instance = instance;
33204  var styleProp = props[STYLE$1];
33205  var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
33206  instance.style.display = dangerousStyleValue('display', display);
33207}
33208function unhideTextInstance(textInstance, text) {
33209  textInstance.nodeValue = text;
33210}
33211function clearContainer(container) {
33212  if (container.nodeType === ELEMENT_NODE) {
33213    container.textContent = '';
33214  } else if (container.nodeType === DOCUMENT_NODE) {
33215    var body = container.body;
33216
33217    if (body != null) {
33218      body.textContent = '';
33219    }
33220  }
33221} // -------------------
33222function canHydrateInstance(instance, type, props) {
33223  if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
33224    return null;
33225  } // This has now been refined to an element node.
33226
33227
33228  return instance;
33229}
33230function canHydrateTextInstance(instance, text) {
33231  if (text === '' || instance.nodeType !== TEXT_NODE) {
33232    // Empty strings are not parsed by HTML so there won't be a correct match here.
33233    return null;
33234  } // This has now been refined to a text node.
33235
33236
33237  return instance;
33238}
33239function isSuspenseInstancePending(instance) {
33240  return instance.data === SUSPENSE_PENDING_START_DATA;
33241}
33242function isSuspenseInstanceFallback(instance) {
33243  return instance.data === SUSPENSE_FALLBACK_START_DATA;
33244}
33245
33246function getNextHydratable(node) {
33247  // Skip non-hydratable nodes.
33248  for (; node != null; node = node.nextSibling) {
33249    var nodeType = node.nodeType;
33250
33251    if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
33252      break;
33253    }
33254  }
33255
33256  return node;
33257}
33258
33259function getNextHydratableSibling(instance) {
33260  return getNextHydratable(instance.nextSibling);
33261}
33262function getFirstHydratableChild(parentInstance) {
33263  return getNextHydratable(parentInstance.firstChild);
33264}
33265function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
33266  precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events
33267  // get attached.
33268
33269  updateFiberProps(instance, props);
33270  var parentNamespace;
33271
33272  {
33273    var hostContextDev = hostContext;
33274    parentNamespace = hostContextDev.namespace;
33275  }
33276
33277  return diffHydratedProperties(instance, type, props, parentNamespace);
33278}
33279function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
33280  precacheFiberNode(internalInstanceHandle, textInstance);
33281  return diffHydratedText(textInstance, text);
33282}
33283function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
33284  var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.
33285  // There might be nested nodes so we need to keep track of how
33286  // deep we are and only break out when we're back on top.
33287
33288  var depth = 0;
33289
33290  while (node) {
33291    if (node.nodeType === COMMENT_NODE) {
33292      var data = node.data;
33293
33294      if (data === SUSPENSE_END_DATA) {
33295        if (depth === 0) {
33296          return getNextHydratableSibling(node);
33297        } else {
33298          depth--;
33299        }
33300      } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
33301        depth++;
33302      }
33303    }
33304
33305    node = node.nextSibling;
33306  } // TODO: Warn, we didn't find the end comment boundary.
33307
33308
33309  return null;
33310} // Returns the SuspenseInstance if this node is a direct child of a
33311// SuspenseInstance. I.e. if its previous sibling is a Comment with
33312// SUSPENSE_x_START_DATA. Otherwise, null.
33313
33314function getParentSuspenseInstance(targetInstance) {
33315  var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.
33316  // There might be nested nodes so we need to keep track of how
33317  // deep we are and only break out when we're back on top.
33318
33319  var depth = 0;
33320
33321  while (node) {
33322    if (node.nodeType === COMMENT_NODE) {
33323      var data = node.data;
33324
33325      if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
33326        if (depth === 0) {
33327          return node;
33328        } else {
33329          depth--;
33330        }
33331      } else if (data === SUSPENSE_END_DATA) {
33332        depth++;
33333      }
33334    }
33335
33336    node = node.previousSibling;
33337  }
33338
33339  return null;
33340}
33341function commitHydratedContainer(container) {
33342  // Retry if any event replaying was blocked on this.
33343  retryIfBlockedOn(container);
33344}
33345function commitHydratedSuspenseInstance(suspenseInstance) {
33346  // Retry if any event replaying was blocked on this.
33347  retryIfBlockedOn(suspenseInstance);
33348}
33349function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {
33350  {
33351    warnForUnmatchedText(textInstance, text);
33352  }
33353}
33354function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {
33355  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
33356    warnForUnmatchedText(textInstance, text);
33357  }
33358}
33359function didNotHydrateContainerInstance(parentContainer, instance) {
33360  {
33361    if (instance.nodeType === ELEMENT_NODE) {
33362      warnForDeletedHydratableElement(parentContainer, instance);
33363    } else if (instance.nodeType === COMMENT_NODE) ; else {
33364      warnForDeletedHydratableText(parentContainer, instance);
33365    }
33366  }
33367}
33368function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {
33369  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
33370    if (instance.nodeType === ELEMENT_NODE) {
33371      warnForDeletedHydratableElement(parentInstance, instance);
33372    } else if (instance.nodeType === COMMENT_NODE) ; else {
33373      warnForDeletedHydratableText(parentInstance, instance);
33374    }
33375  }
33376}
33377function didNotFindHydratableContainerInstance(parentContainer, type, props) {
33378  {
33379    warnForInsertedHydratedElement(parentContainer, type);
33380  }
33381}
33382function didNotFindHydratableContainerTextInstance(parentContainer, text) {
33383  {
33384    warnForInsertedHydratedText(parentContainer, text);
33385  }
33386}
33387function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {
33388  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
33389    warnForInsertedHydratedElement(parentInstance, type);
33390  }
33391}
33392function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {
33393  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
33394    warnForInsertedHydratedText(parentInstance, text);
33395  }
33396}
33397function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
33398  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;
33399}
33400var clientId = 0;
33401function makeClientIdInDEV(warnOnAccessInDEV) {
33402  var id = 'r:' + (clientId++).toString(36);
33403  return {
33404    toString: function () {
33405      warnOnAccessInDEV();
33406      return id;
33407    },
33408    valueOf: function () {
33409      warnOnAccessInDEV();
33410      return id;
33411    }
33412  };
33413}
33414function isOpaqueHydratingObject(value) {
33415  return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE;
33416}
33417function makeOpaqueHydratingObject(attemptToReadValue) {
33418  return {
33419    $$typeof: REACT_OPAQUE_ID_TYPE,
33420    toString: attemptToReadValue,
33421    valueOf: attemptToReadValue
33422  };
33423}
33424function preparePortalMount(portalInstance) {
33425  {
33426    listenToAllSupportedEvents(portalInstance);
33427  }
33428}
33429
33430var randomKey = Math.random().toString(36).slice(2);
33431var internalInstanceKey = '__reactFiber$' + randomKey;
33432var internalPropsKey = '__reactProps$' + randomKey;
33433var internalContainerInstanceKey = '__reactContainer$' + randomKey;
33434var internalEventHandlersKey = '__reactEvents$' + randomKey;
33435function precacheFiberNode(hostInst, node) {
33436  node[internalInstanceKey] = hostInst;
33437}
33438function markContainerAsRoot(hostRoot, node) {
33439  node[internalContainerInstanceKey] = hostRoot;
33440}
33441function unmarkContainerAsRoot(node) {
33442  node[internalContainerInstanceKey] = null;
33443}
33444function isContainerMarkedAsRoot(node) {
33445  return !!node[internalContainerInstanceKey];
33446} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
33447// If the target node is part of a hydrated or not yet rendered subtree, then
33448// this may also return a SuspenseComponent or HostRoot to indicate that.
33449// Conceptually the HostRoot fiber is a child of the Container node. So if you
33450// pass the Container node as the targetNode, you will not actually get the
33451// HostRoot back. To get to the HostRoot, you need to pass a child of it.
33452// The same thing applies to Suspense boundaries.
33453
33454function getClosestInstanceFromNode(targetNode) {
33455  var targetInst = targetNode[internalInstanceKey];
33456
33457  if (targetInst) {
33458    // Don't return HostRoot or SuspenseComponent here.
33459    return targetInst;
33460  } // If the direct event target isn't a React owned DOM node, we need to look
33461  // to see if one of its parents is a React owned DOM node.
33462
33463
33464  var parentNode = targetNode.parentNode;
33465
33466  while (parentNode) {
33467    // We'll check if this is a container root that could include
33468    // React nodes in the future. We need to check this first because
33469    // if we're a child of a dehydrated container, we need to first
33470    // find that inner container before moving on to finding the parent
33471    // instance. Note that we don't check this field on  the targetNode
33472    // itself because the fibers are conceptually between the container
33473    // node and the first child. It isn't surrounding the container node.
33474    // If it's not a container, we check if it's an instance.
33475    targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];
33476
33477    if (targetInst) {
33478      // Since this wasn't the direct target of the event, we might have
33479      // stepped past dehydrated DOM nodes to get here. However they could
33480      // also have been non-React nodes. We need to answer which one.
33481      // If we the instance doesn't have any children, then there can't be
33482      // a nested suspense boundary within it. So we can use this as a fast
33483      // bailout. Most of the time, when people add non-React children to
33484      // the tree, it is using a ref to a child-less DOM node.
33485      // Normally we'd only need to check one of the fibers because if it
33486      // has ever gone from having children to deleting them or vice versa
33487      // it would have deleted the dehydrated boundary nested inside already.
33488      // However, since the HostRoot starts out with an alternate it might
33489      // have one on the alternate so we need to check in case this was a
33490      // root.
33491      var alternate = targetInst.alternate;
33492
33493      if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
33494        // Next we need to figure out if the node that skipped past is
33495        // nested within a dehydrated boundary and if so, which one.
33496        var suspenseInstance = getParentSuspenseInstance(targetNode);
33497
33498        while (suspenseInstance !== null) {
33499          // We found a suspense instance. That means that we haven't
33500          // hydrated it yet. Even though we leave the comments in the
33501          // DOM after hydrating, and there are boundaries in the DOM
33502          // that could already be hydrated, we wouldn't have found them
33503          // through this pass since if the target is hydrated it would
33504          // have had an internalInstanceKey on it.
33505          // Let's get the fiber associated with the SuspenseComponent
33506          // as the deepest instance.
33507          var targetSuspenseInst = suspenseInstance[internalInstanceKey];
33508
33509          if (targetSuspenseInst) {
33510            return targetSuspenseInst;
33511          } // If we don't find a Fiber on the comment, it might be because
33512          // we haven't gotten to hydrate it yet. There might still be a
33513          // parent boundary that hasn't above this one so we need to find
33514          // the outer most that is known.
33515
33516
33517          suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent
33518          // host component also hasn't hydrated yet. We can return it
33519          // below since it will bail out on the isMounted check later.
33520        }
33521      }
33522
33523      return targetInst;
33524    }
33525
33526    targetNode = parentNode;
33527    parentNode = targetNode.parentNode;
33528  }
33529
33530  return null;
33531}
33532/**
33533 * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
33534 * instance, or null if the node was not rendered by this React.
33535 */
33536
33537function getInstanceFromNode(node) {
33538  var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];
33539
33540  if (inst) {
33541    if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
33542      return inst;
33543    } else {
33544      return null;
33545    }
33546  }
33547
33548  return null;
33549}
33550/**
33551 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
33552 * DOM node.
33553 */
33554
33555function getNodeFromInstance(inst) {
33556  if (inst.tag === HostComponent || inst.tag === HostText) {
33557    // In Fiber this, is just the state node right now. We assume it will be
33558    // a host component or host text.
33559    return inst.stateNode;
33560  } // Without this first invariant, passing a non-DOM-component triggers the next
33561  // invariant for a missing parent, which is super confusing.
33562
33563
33564  {
33565    {
33566      throw Error( "getNodeFromInstance: Invalid argument." );
33567    }
33568  }
33569}
33570function getFiberCurrentPropsFromNode(node) {
33571  return node[internalPropsKey] || null;
33572}
33573function updateFiberProps(node, props) {
33574  node[internalPropsKey] = props;
33575}
33576function getEventListenerSet(node) {
33577  var elementListenerSet = node[internalEventHandlersKey];
33578
33579  if (elementListenerSet === undefined) {
33580    elementListenerSet = node[internalEventHandlersKey] = new Set();
33581  }
33582
33583  return elementListenerSet;
33584}
33585
33586var loggedTypeFailures = {};
33587var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
33588
33589function setCurrentlyValidatingElement(element) {
33590  {
33591    if (element) {
33592      var owner = element._owner;
33593      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
33594      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
33595    } else {
33596      ReactDebugCurrentFrame$1.setExtraStackFrame(null);
33597    }
33598  }
33599}
33600
33601function checkPropTypes(typeSpecs, values, location, componentName, element) {
33602  {
33603    // $FlowFixMe This is okay but Flow doesn't know it.
33604    var has = Function.call.bind(Object.prototype.hasOwnProperty);
33605
33606    for (var typeSpecName in typeSpecs) {
33607      if (has(typeSpecs, typeSpecName)) {
33608        var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
33609        // fail the render phase where it didn't fail before. So we log it.
33610        // After these have been cleaned up, we'll let them throw.
33611
33612        try {
33613          // This is intentionally an invariant that gets caught. It's the same
33614          // behavior as without this statement except with a better message.
33615          if (typeof typeSpecs[typeSpecName] !== 'function') {
33616            var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
33617            err.name = 'Invariant Violation';
33618            throw err;
33619          }
33620
33621          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
33622        } catch (ex) {
33623          error$1 = ex;
33624        }
33625
33626        if (error$1 && !(error$1 instanceof Error)) {
33627          setCurrentlyValidatingElement(element);
33628
33629          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
33630
33631          setCurrentlyValidatingElement(null);
33632        }
33633
33634        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
33635          // Only monitor this failure once because there tends to be a lot of the
33636          // same error.
33637          loggedTypeFailures[error$1.message] = true;
33638          setCurrentlyValidatingElement(element);
33639
33640          error('Failed %s type: %s', location, error$1.message);
33641
33642          setCurrentlyValidatingElement(null);
33643        }
33644      }
33645    }
33646  }
33647}
33648
33649var valueStack = [];
33650var fiberStack;
33651
33652{
33653  fiberStack = [];
33654}
33655
33656var index = -1;
33657
33658function createCursor(defaultValue) {
33659  return {
33660    current: defaultValue
33661  };
33662}
33663
33664function pop(cursor, fiber) {
33665  if (index < 0) {
33666    {
33667      error('Unexpected pop.');
33668    }
33669
33670    return;
33671  }
33672
33673  {
33674    if (fiber !== fiberStack[index]) {
33675      error('Unexpected Fiber popped.');
33676    }
33677  }
33678
33679  cursor.current = valueStack[index];
33680  valueStack[index] = null;
33681
33682  {
33683    fiberStack[index] = null;
33684  }
33685
33686  index--;
33687}
33688
33689function push(cursor, value, fiber) {
33690  index++;
33691  valueStack[index] = cursor.current;
33692
33693  {
33694    fiberStack[index] = fiber;
33695  }
33696
33697  cursor.current = value;
33698}
33699
33700var warnedAboutMissingGetChildContext;
33701
33702{
33703  warnedAboutMissingGetChildContext = {};
33704}
33705
33706var emptyContextObject = {};
33707
33708{
33709  Object.freeze(emptyContextObject);
33710} // A cursor to the current merged context object on the stack.
33711
33712
33713var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.
33714
33715var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.
33716// We use this to get access to the parent context after we have already
33717// pushed the next context provider, and now need to merge their contexts.
33718
33719var previousContext = emptyContextObject;
33720
33721function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
33722  {
33723    if (didPushOwnContextIfProvider && isContextProvider(Component)) {
33724      // If the fiber is a context provider itself, when we read its context
33725      // we may have already pushed its own child context on the stack. A context
33726      // provider should not "see" its own child context. Therefore we read the
33727      // previous (parent) context instead for a context provider.
33728      return previousContext;
33729    }
33730
33731    return contextStackCursor.current;
33732  }
33733}
33734
33735function cacheContext(workInProgress, unmaskedContext, maskedContext) {
33736  {
33737    var instance = workInProgress.stateNode;
33738    instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
33739    instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
33740  }
33741}
33742
33743function getMaskedContext(workInProgress, unmaskedContext) {
33744  {
33745    var type = workInProgress.type;
33746    var contextTypes = type.contextTypes;
33747
33748    if (!contextTypes) {
33749      return emptyContextObject;
33750    } // Avoid recreating masked context unless unmasked context has changed.
33751    // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
33752    // This may trigger infinite loops if componentWillReceiveProps calls setState.
33753
33754
33755    var instance = workInProgress.stateNode;
33756
33757    if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
33758      return instance.__reactInternalMemoizedMaskedChildContext;
33759    }
33760
33761    var context = {};
33762
33763    for (var key in contextTypes) {
33764      context[key] = unmaskedContext[key];
33765    }
33766
33767    {
33768      var name = getComponentName(type) || 'Unknown';
33769      checkPropTypes(contextTypes, context, 'context', name);
33770    } // Cache unmasked context so we can avoid recreating masked context unless necessary.
33771    // Context is created before the class component is instantiated so check for instance.
33772
33773
33774    if (instance) {
33775      cacheContext(workInProgress, unmaskedContext, context);
33776    }
33777
33778    return context;
33779  }
33780}
33781
33782function hasContextChanged() {
33783  {
33784    return didPerformWorkStackCursor.current;
33785  }
33786}
33787
33788function isContextProvider(type) {
33789  {
33790    var childContextTypes = type.childContextTypes;
33791    return childContextTypes !== null && childContextTypes !== undefined;
33792  }
33793}
33794
33795function popContext(fiber) {
33796  {
33797    pop(didPerformWorkStackCursor, fiber);
33798    pop(contextStackCursor, fiber);
33799  }
33800}
33801
33802function popTopLevelContextObject(fiber) {
33803  {
33804    pop(didPerformWorkStackCursor, fiber);
33805    pop(contextStackCursor, fiber);
33806  }
33807}
33808
33809function pushTopLevelContextObject(fiber, context, didChange) {
33810  {
33811    if (!(contextStackCursor.current === emptyContextObject)) {
33812      {
33813        throw Error( "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue." );
33814      }
33815    }
33816
33817    push(contextStackCursor, context, fiber);
33818    push(didPerformWorkStackCursor, didChange, fiber);
33819  }
33820}
33821
33822function processChildContext(fiber, type, parentContext) {
33823  {
33824    var instance = fiber.stateNode;
33825    var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.
33826    // It has only been added in Fiber to match the (unintentional) behavior in Stack.
33827
33828    if (typeof instance.getChildContext !== 'function') {
33829      {
33830        var componentName = getComponentName(type) || 'Unknown';
33831
33832        if (!warnedAboutMissingGetChildContext[componentName]) {
33833          warnedAboutMissingGetChildContext[componentName] = true;
33834
33835          error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
33836        }
33837      }
33838
33839      return parentContext;
33840    }
33841
33842    var childContext = instance.getChildContext();
33843
33844    for (var contextKey in childContext) {
33845      if (!(contextKey in childContextTypes)) {
33846        {
33847          throw Error( (getComponentName(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
33848        }
33849      }
33850    }
33851
33852    {
33853      var name = getComponentName(type) || 'Unknown';
33854      checkPropTypes(childContextTypes, childContext, 'child context', name);
33855    }
33856
33857    return _assign({}, parentContext, childContext);
33858  }
33859}
33860
33861function pushContextProvider(workInProgress) {
33862  {
33863    var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
33864    // If the instance does not exist yet, we will push null at first,
33865    // and replace it on the stack later when invalidating the context.
33866
33867    var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.
33868    // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
33869
33870    previousContext = contextStackCursor.current;
33871    push(contextStackCursor, memoizedMergedChildContext, workInProgress);
33872    push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
33873    return true;
33874  }
33875}
33876
33877function invalidateContextProvider(workInProgress, type, didChange) {
33878  {
33879    var instance = workInProgress.stateNode;
33880
33881    if (!instance) {
33882      {
33883        throw Error( "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue." );
33884      }
33885    }
33886
33887    if (didChange) {
33888      // Merge parent and own context.
33889      // Skip this if we're not updating due to sCU.
33890      // This avoids unnecessarily recomputing memoized values.
33891      var mergedContext = processChildContext(workInProgress, type, previousContext);
33892      instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.
33893      // It is important to unwind the context in the reverse order.
33894
33895      pop(didPerformWorkStackCursor, workInProgress);
33896      pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.
33897
33898      push(contextStackCursor, mergedContext, workInProgress);
33899      push(didPerformWorkStackCursor, didChange, workInProgress);
33900    } else {
33901      pop(didPerformWorkStackCursor, workInProgress);
33902      push(didPerformWorkStackCursor, didChange, workInProgress);
33903    }
33904  }
33905}
33906
33907function findCurrentUnmaskedContext(fiber) {
33908  {
33909    // Currently this is only used with renderSubtreeIntoContainer; not sure if it
33910    // makes sense elsewhere
33911    if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {
33912      {
33913        throw Error( "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue." );
33914      }
33915    }
33916
33917    var node = fiber;
33918
33919    do {
33920      switch (node.tag) {
33921        case HostRoot:
33922          return node.stateNode.context;
33923
33924        case ClassComponent:
33925          {
33926            var Component = node.type;
33927
33928            if (isContextProvider(Component)) {
33929              return node.stateNode.__reactInternalMemoizedMergedChildContext;
33930            }
33931
33932            break;
33933          }
33934      }
33935
33936      node = node.return;
33937    } while (node !== null);
33938
33939    {
33940      {
33941        throw Error( "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue." );
33942      }
33943    }
33944  }
33945}
33946
33947var LegacyRoot = 0;
33948var BlockingRoot = 1;
33949var ConcurrentRoot = 2;
33950
33951var rendererID = null;
33952var injectedHook = null;
33953var hasLoggedError = false;
33954var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
33955function injectInternals(internals) {
33956  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
33957    // No DevTools
33958    return false;
33959  }
33960
33961  var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
33962
33963  if (hook.isDisabled) {
33964    // This isn't a real property on the hook, but it can be set to opt out
33965    // of DevTools integration and associated warnings and logs.
33966    // https://github.com/facebook/react/issues/3877
33967    return true;
33968  }
33969
33970  if (!hook.supportsFiber) {
33971    {
33972      error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');
33973    } // DevTools exists, even though it doesn't support Fiber.
33974
33975
33976    return true;
33977  }
33978
33979  try {
33980    rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
33981
33982    injectedHook = hook;
33983  } catch (err) {
33984    // Catch all errors because it is unsafe to throw during initialization.
33985    {
33986      error('React instrumentation encountered an error: %s.', err);
33987    }
33988  } // DevTools exists
33989
33990
33991  return true;
33992}
33993function onScheduleRoot(root, children) {
33994  {
33995    if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {
33996      try {
33997        injectedHook.onScheduleFiberRoot(rendererID, root, children);
33998      } catch (err) {
33999        if ( !hasLoggedError) {
34000          hasLoggedError = true;
34001
34002          error('React instrumentation encountered an error: %s', err);
34003        }
34004      }
34005    }
34006  }
34007}
34008function onCommitRoot(root, priorityLevel) {
34009  if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {
34010    try {
34011      var didError = (root.current.flags & DidCapture) === DidCapture;
34012
34013      if (enableProfilerTimer) {
34014        injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
34015      } else {
34016        injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
34017      }
34018    } catch (err) {
34019      {
34020        if (!hasLoggedError) {
34021          hasLoggedError = true;
34022
34023          error('React instrumentation encountered an error: %s', err);
34024        }
34025      }
34026    }
34027  }
34028}
34029function onCommitUnmount(fiber) {
34030  if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {
34031    try {
34032      injectedHook.onCommitFiberUnmount(rendererID, fiber);
34033    } catch (err) {
34034      {
34035        if (!hasLoggedError) {
34036          hasLoggedError = true;
34037
34038          error('React instrumentation encountered an error: %s', err);
34039        }
34040      }
34041    }
34042  }
34043}
34044
34045var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
34046    Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
34047    Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
34048    Scheduler_shouldYield = Scheduler.unstable_shouldYield,
34049    Scheduler_requestPaint = Scheduler.unstable_requestPaint,
34050    Scheduler_now$1 = Scheduler.unstable_now,
34051    Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
34052    Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
34053    Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
34054    Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
34055    Scheduler_LowPriority = Scheduler.unstable_LowPriority,
34056    Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;
34057
34058{
34059  // Provide explicit error message when production+profiling bundle of e.g.
34060  // react-dom is used with production (non-profiling) bundle of
34061  // scheduler/tracing
34062  if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
34063    {
34064      throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
34065    }
34066  }
34067}
34068
34069var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use
34070// ascending numbers so we can compare them like numbers. They start at 90 to
34071// avoid clashing with Scheduler's priorities.
34072
34073var ImmediatePriority$1 = 99;
34074var UserBlockingPriority$2 = 98;
34075var NormalPriority$1 = 97;
34076var LowPriority$1 = 96;
34077var IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only.
34078
34079var NoPriority$1 = 90;
34080var shouldYield = Scheduler_shouldYield;
34081var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.
34082Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};
34083var syncQueue = null;
34084var immediateQueueCallbackNode = null;
34085var isFlushingSyncQueue = false;
34086var initialTimeMs$1 = Scheduler_now$1(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
34087// This will be the case for modern browsers that support `performance.now`. In
34088// older browsers, Scheduler falls back to `Date.now`, which returns a Unix
34089// timestamp. In that case, subtract the module initialization time to simulate
34090// the behavior of performance.now and keep our times small enough to fit
34091// within 32 bits.
34092// TODO: Consider lifting this into Scheduler.
34093
34094var now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function () {
34095  return Scheduler_now$1() - initialTimeMs$1;
34096};
34097function getCurrentPriorityLevel() {
34098  switch (Scheduler_getCurrentPriorityLevel()) {
34099    case Scheduler_ImmediatePriority:
34100      return ImmediatePriority$1;
34101
34102    case Scheduler_UserBlockingPriority:
34103      return UserBlockingPriority$2;
34104
34105    case Scheduler_NormalPriority:
34106      return NormalPriority$1;
34107
34108    case Scheduler_LowPriority:
34109      return LowPriority$1;
34110
34111    case Scheduler_IdlePriority:
34112      return IdlePriority$1;
34113
34114    default:
34115      {
34116        {
34117          throw Error( "Unknown priority level." );
34118        }
34119      }
34120
34121  }
34122}
34123
34124function reactPriorityToSchedulerPriority(reactPriorityLevel) {
34125  switch (reactPriorityLevel) {
34126    case ImmediatePriority$1:
34127      return Scheduler_ImmediatePriority;
34128
34129    case UserBlockingPriority$2:
34130      return Scheduler_UserBlockingPriority;
34131
34132    case NormalPriority$1:
34133      return Scheduler_NormalPriority;
34134
34135    case LowPriority$1:
34136      return Scheduler_LowPriority;
34137
34138    case IdlePriority$1:
34139      return Scheduler_IdlePriority;
34140
34141    default:
34142      {
34143        {
34144          throw Error( "Unknown priority level." );
34145        }
34146      }
34147
34148  }
34149}
34150
34151function runWithPriority$1(reactPriorityLevel, fn) {
34152  var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
34153  return Scheduler_runWithPriority(priorityLevel, fn);
34154}
34155function scheduleCallback(reactPriorityLevel, callback, options) {
34156  var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
34157  return Scheduler_scheduleCallback(priorityLevel, callback, options);
34158}
34159function scheduleSyncCallback(callback) {
34160  // Push this callback into an internal queue. We'll flush these either in
34161  // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
34162  if (syncQueue === null) {
34163    syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.
34164
34165    immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);
34166  } else {
34167    // Push onto existing queue. Don't need to schedule a callback because
34168    // we already scheduled one when we created the queue.
34169    syncQueue.push(callback);
34170  }
34171
34172  return fakeCallbackNode;
34173}
34174function cancelCallback(callbackNode) {
34175  if (callbackNode !== fakeCallbackNode) {
34176    Scheduler_cancelCallback(callbackNode);
34177  }
34178}
34179function flushSyncCallbackQueue() {
34180  if (immediateQueueCallbackNode !== null) {
34181    var node = immediateQueueCallbackNode;
34182    immediateQueueCallbackNode = null;
34183    Scheduler_cancelCallback(node);
34184  }
34185
34186  flushSyncCallbackQueueImpl();
34187}
34188
34189function flushSyncCallbackQueueImpl() {
34190  if (!isFlushingSyncQueue && syncQueue !== null) {
34191    // Prevent re-entrancy.
34192    isFlushingSyncQueue = true;
34193    var i = 0;
34194
34195    {
34196      try {
34197        var _isSync2 = true;
34198        var _queue = syncQueue;
34199        runWithPriority$1(ImmediatePriority$1, function () {
34200          for (; i < _queue.length; i++) {
34201            var callback = _queue[i];
34202
34203            do {
34204              callback = callback(_isSync2);
34205            } while (callback !== null);
34206          }
34207        });
34208        syncQueue = null;
34209      } catch (error) {
34210        // If something throws, leave the remaining callbacks on the queue.
34211        if (syncQueue !== null) {
34212          syncQueue = syncQueue.slice(i + 1);
34213        } // Resume flushing in the next tick
34214
34215
34216        Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
34217        throw error;
34218      } finally {
34219        isFlushingSyncQueue = false;
34220      }
34221    }
34222  }
34223}
34224
34225// TODO: this is special because it gets imported during build.
34226var ReactVersion = '17.0.2';
34227
34228var NoMode = 0;
34229var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
34230// tag instead
34231
34232var BlockingMode = 2;
34233var ConcurrentMode = 4;
34234var ProfileMode = 8;
34235var DebugTracingMode = 16;
34236
34237var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
34238var NoTransition = 0;
34239function requestCurrentTransition() {
34240  return ReactCurrentBatchConfig.transition;
34241}
34242
34243var ReactStrictModeWarnings = {
34244  recordUnsafeLifecycleWarnings: function (fiber, instance) {},
34245  flushPendingUnsafeLifecycleWarnings: function () {},
34246  recordLegacyContextWarning: function (fiber, instance) {},
34247  flushLegacyContextWarning: function () {},
34248  discardPendingWarnings: function () {}
34249};
34250
34251{
34252  var findStrictRoot = function (fiber) {
34253    var maybeStrictRoot = null;
34254    var node = fiber;
34255
34256    while (node !== null) {
34257      if (node.mode & StrictMode) {
34258        maybeStrictRoot = node;
34259      }
34260
34261      node = node.return;
34262    }
34263
34264    return maybeStrictRoot;
34265  };
34266
34267  var setToSortedString = function (set) {
34268    var array = [];
34269    set.forEach(function (value) {
34270      array.push(value);
34271    });
34272    return array.sort().join(', ');
34273  };
34274
34275  var pendingComponentWillMountWarnings = [];
34276  var pendingUNSAFE_ComponentWillMountWarnings = [];
34277  var pendingComponentWillReceivePropsWarnings = [];
34278  var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
34279  var pendingComponentWillUpdateWarnings = [];
34280  var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.
34281
34282  var didWarnAboutUnsafeLifecycles = new Set();
34283
34284  ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
34285    // Dedup strategy: Warn once per component.
34286    if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
34287      return;
34288    }
34289
34290    if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.
34291    instance.componentWillMount.__suppressDeprecationWarning !== true) {
34292      pendingComponentWillMountWarnings.push(fiber);
34293    }
34294
34295    if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {
34296      pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
34297    }
34298
34299    if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
34300      pendingComponentWillReceivePropsWarnings.push(fiber);
34301    }
34302
34303    if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
34304      pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
34305    }
34306
34307    if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
34308      pendingComponentWillUpdateWarnings.push(fiber);
34309    }
34310
34311    if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {
34312      pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
34313    }
34314  };
34315
34316  ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
34317    // We do an initial pass to gather component names
34318    var componentWillMountUniqueNames = new Set();
34319
34320    if (pendingComponentWillMountWarnings.length > 0) {
34321      pendingComponentWillMountWarnings.forEach(function (fiber) {
34322        componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
34323        didWarnAboutUnsafeLifecycles.add(fiber.type);
34324      });
34325      pendingComponentWillMountWarnings = [];
34326    }
34327
34328    var UNSAFE_componentWillMountUniqueNames = new Set();
34329
34330    if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
34331      pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
34332        UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
34333        didWarnAboutUnsafeLifecycles.add(fiber.type);
34334      });
34335      pendingUNSAFE_ComponentWillMountWarnings = [];
34336    }
34337
34338    var componentWillReceivePropsUniqueNames = new Set();
34339
34340    if (pendingComponentWillReceivePropsWarnings.length > 0) {
34341      pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
34342        componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
34343        didWarnAboutUnsafeLifecycles.add(fiber.type);
34344      });
34345      pendingComponentWillReceivePropsWarnings = [];
34346    }
34347
34348    var UNSAFE_componentWillReceivePropsUniqueNames = new Set();
34349
34350    if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
34351      pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {
34352        UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
34353        didWarnAboutUnsafeLifecycles.add(fiber.type);
34354      });
34355      pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
34356    }
34357
34358    var componentWillUpdateUniqueNames = new Set();
34359
34360    if (pendingComponentWillUpdateWarnings.length > 0) {
34361      pendingComponentWillUpdateWarnings.forEach(function (fiber) {
34362        componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
34363        didWarnAboutUnsafeLifecycles.add(fiber.type);
34364      });
34365      pendingComponentWillUpdateWarnings = [];
34366    }
34367
34368    var UNSAFE_componentWillUpdateUniqueNames = new Set();
34369
34370    if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
34371      pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
34372        UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
34373        didWarnAboutUnsafeLifecycles.add(fiber.type);
34374      });
34375      pendingUNSAFE_ComponentWillUpdateWarnings = [];
34376    } // Finally, we flush all the warnings
34377    // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
34378
34379
34380    if (UNSAFE_componentWillMountUniqueNames.size > 0) {
34381      var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
34382
34383      error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
34384    }
34385
34386    if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
34387      var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
34388
34389      error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
34390    }
34391
34392    if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
34393      var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
34394
34395      error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
34396    }
34397
34398    if (componentWillMountUniqueNames.size > 0) {
34399      var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
34400
34401      warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
34402    }
34403
34404    if (componentWillReceivePropsUniqueNames.size > 0) {
34405      var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
34406
34407      warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
34408    }
34409
34410    if (componentWillUpdateUniqueNames.size > 0) {
34411      var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
34412
34413      warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
34414    }
34415  };
34416
34417  var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.
34418
34419  var didWarnAboutLegacyContext = new Set();
34420
34421  ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
34422    var strictRoot = findStrictRoot(fiber);
34423
34424    if (strictRoot === null) {
34425      error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
34426
34427      return;
34428    } // Dedup strategy: Warn once per component.
34429
34430
34431    if (didWarnAboutLegacyContext.has(fiber.type)) {
34432      return;
34433    }
34434
34435    var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
34436
34437    if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
34438      if (warningsForRoot === undefined) {
34439        warningsForRoot = [];
34440        pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
34441      }
34442
34443      warningsForRoot.push(fiber);
34444    }
34445  };
34446
34447  ReactStrictModeWarnings.flushLegacyContextWarning = function () {
34448    pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
34449      if (fiberArray.length === 0) {
34450        return;
34451      }
34452
34453      var firstFiber = fiberArray[0];
34454      var uniqueNames = new Set();
34455      fiberArray.forEach(function (fiber) {
34456        uniqueNames.add(getComponentName(fiber.type) || 'Component');
34457        didWarnAboutLegacyContext.add(fiber.type);
34458      });
34459      var sortedNames = setToSortedString(uniqueNames);
34460
34461      try {
34462        setCurrentFiber(firstFiber);
34463
34464        error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);
34465      } finally {
34466        resetCurrentFiber();
34467      }
34468    });
34469  };
34470
34471  ReactStrictModeWarnings.discardPendingWarnings = function () {
34472    pendingComponentWillMountWarnings = [];
34473    pendingUNSAFE_ComponentWillMountWarnings = [];
34474    pendingComponentWillReceivePropsWarnings = [];
34475    pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
34476    pendingComponentWillUpdateWarnings = [];
34477    pendingUNSAFE_ComponentWillUpdateWarnings = [];
34478    pendingLegacyContextWarning = new Map();
34479  };
34480}
34481
34482function resolveDefaultProps(Component, baseProps) {
34483  if (Component && Component.defaultProps) {
34484    // Resolve default props. Taken from ReactElement
34485    var props = _assign({}, baseProps);
34486
34487    var defaultProps = Component.defaultProps;
34488
34489    for (var propName in defaultProps) {
34490      if (props[propName] === undefined) {
34491        props[propName] = defaultProps[propName];
34492      }
34493    }
34494
34495    return props;
34496  }
34497
34498  return baseProps;
34499}
34500
34501// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
34502// Math.pow(2, 30) - 1
34503// 0b111111111111111111111111111111
34504var MAX_SIGNED_31_BIT_INT = 1073741823;
34505
34506var valueCursor = createCursor(null);
34507var rendererSigil;
34508
34509{
34510  // Use this to detect multiple renderers using the same context
34511  rendererSigil = {};
34512}
34513
34514var currentlyRenderingFiber = null;
34515var lastContextDependency = null;
34516var lastContextWithAllBitsObserved = null;
34517var isDisallowedContextReadInDEV = false;
34518function resetContextDependencies() {
34519  // This is called right before React yields execution, to ensure `readContext`
34520  // cannot be called outside the render phase.
34521  currentlyRenderingFiber = null;
34522  lastContextDependency = null;
34523  lastContextWithAllBitsObserved = null;
34524
34525  {
34526    isDisallowedContextReadInDEV = false;
34527  }
34528}
34529function enterDisallowedContextReadInDEV() {
34530  {
34531    isDisallowedContextReadInDEV = true;
34532  }
34533}
34534function exitDisallowedContextReadInDEV() {
34535  {
34536    isDisallowedContextReadInDEV = false;
34537  }
34538}
34539function pushProvider(providerFiber, nextValue) {
34540  var context = providerFiber.type._context;
34541
34542  {
34543    push(valueCursor, context._currentValue, providerFiber);
34544    context._currentValue = nextValue;
34545
34546    {
34547      if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
34548        error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
34549      }
34550
34551      context._currentRenderer = rendererSigil;
34552    }
34553  }
34554}
34555function popProvider(providerFiber) {
34556  var currentValue = valueCursor.current;
34557  pop(valueCursor, providerFiber);
34558  var context = providerFiber.type._context;
34559
34560  {
34561    context._currentValue = currentValue;
34562  }
34563}
34564function calculateChangedBits(context, newValue, oldValue) {
34565  if (objectIs(oldValue, newValue)) {
34566    // No change
34567    return 0;
34568  } else {
34569    var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
34570
34571    {
34572      if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {
34573        error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
34574      }
34575    }
34576
34577    return changedBits | 0;
34578  }
34579}
34580function scheduleWorkOnParentPath(parent, renderLanes) {
34581  // Update the child lanes of all the ancestors, including the alternates.
34582  var node = parent;
34583
34584  while (node !== null) {
34585    var alternate = node.alternate;
34586
34587    if (!isSubsetOfLanes(node.childLanes, renderLanes)) {
34588      node.childLanes = mergeLanes(node.childLanes, renderLanes);
34589
34590      if (alternate !== null) {
34591        alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
34592      }
34593    } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {
34594      alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
34595    } else {
34596      // Neither alternate was updated, which means the rest of the
34597      // ancestor path already has sufficient priority.
34598      break;
34599    }
34600
34601    node = node.return;
34602  }
34603}
34604function propagateContextChange(workInProgress, context, changedBits, renderLanes) {
34605  var fiber = workInProgress.child;
34606
34607  if (fiber !== null) {
34608    // Set the return pointer of the child to the work-in-progress fiber.
34609    fiber.return = workInProgress;
34610  }
34611
34612  while (fiber !== null) {
34613    var nextFiber = void 0; // Visit this fiber.
34614
34615    var list = fiber.dependencies;
34616
34617    if (list !== null) {
34618      nextFiber = fiber.child;
34619      var dependency = list.firstContext;
34620
34621      while (dependency !== null) {
34622        // Check if the context matches.
34623        if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
34624          // Match! Schedule an update on this fiber.
34625          if (fiber.tag === ClassComponent) {
34626            // Schedule a force update on the work-in-progress.
34627            var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes));
34628            update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
34629            // update to the current fiber, too, which means it will persist even if
34630            // this render is thrown away. Since it's a race condition, not sure it's
34631            // worth fixing.
34632
34633            enqueueUpdate(fiber, update);
34634          }
34635
34636          fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
34637          var alternate = fiber.alternate;
34638
34639          if (alternate !== null) {
34640            alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
34641          }
34642
34643          scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.
34644
34645          list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the
34646          // dependency list.
34647
34648          break;
34649        }
34650
34651        dependency = dependency.next;
34652      }
34653    } else if (fiber.tag === ContextProvider) {
34654      // Don't scan deeper if this is a matching provider
34655      nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
34656    } else {
34657      // Traverse down.
34658      nextFiber = fiber.child;
34659    }
34660
34661    if (nextFiber !== null) {
34662      // Set the return pointer of the child to the work-in-progress fiber.
34663      nextFiber.return = fiber;
34664    } else {
34665      // No child. Traverse to next sibling.
34666      nextFiber = fiber;
34667
34668      while (nextFiber !== null) {
34669        if (nextFiber === workInProgress) {
34670          // We're back to the root of this subtree. Exit.
34671          nextFiber = null;
34672          break;
34673        }
34674
34675        var sibling = nextFiber.sibling;
34676
34677        if (sibling !== null) {
34678          // Set the return pointer of the sibling to the work-in-progress fiber.
34679          sibling.return = nextFiber.return;
34680          nextFiber = sibling;
34681          break;
34682        } // No more siblings. Traverse up.
34683
34684
34685        nextFiber = nextFiber.return;
34686      }
34687    }
34688
34689    fiber = nextFiber;
34690  }
34691}
34692function prepareToReadContext(workInProgress, renderLanes) {
34693  currentlyRenderingFiber = workInProgress;
34694  lastContextDependency = null;
34695  lastContextWithAllBitsObserved = null;
34696  var dependencies = workInProgress.dependencies;
34697
34698  if (dependencies !== null) {
34699    var firstContext = dependencies.firstContext;
34700
34701    if (firstContext !== null) {
34702      if (includesSomeLane(dependencies.lanes, renderLanes)) {
34703        // Context list has a pending update. Mark that this fiber performed work.
34704        markWorkInProgressReceivedUpdate();
34705      } // Reset the work-in-progress list
34706
34707
34708      dependencies.firstContext = null;
34709    }
34710  }
34711}
34712function readContext(context, observedBits) {
34713  {
34714    // This warning would fire if you read context inside a Hook like useMemo.
34715    // Unlike the class check below, it's not enforced in production for perf.
34716    if (isDisallowedContextReadInDEV) {
34717      error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
34718    }
34719  }
34720
34721  if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {
34722    var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.
34723
34724    if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {
34725      // Observe all updates.
34726      lastContextWithAllBitsObserved = context;
34727      resolvedObservedBits = MAX_SIGNED_31_BIT_INT;
34728    } else {
34729      resolvedObservedBits = observedBits;
34730    }
34731
34732    var contextItem = {
34733      context: context,
34734      observedBits: resolvedObservedBits,
34735      next: null
34736    };
34737
34738    if (lastContextDependency === null) {
34739      if (!(currentlyRenderingFiber !== null)) {
34740        {
34741          throw Error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." );
34742        }
34743      } // This is the first dependency for this component. Create a new list.
34744
34745
34746      lastContextDependency = contextItem;
34747      currentlyRenderingFiber.dependencies = {
34748        lanes: NoLanes,
34749        firstContext: contextItem,
34750        responders: null
34751      };
34752    } else {
34753      // Append a new context item.
34754      lastContextDependency = lastContextDependency.next = contextItem;
34755    }
34756  }
34757
34758  return  context._currentValue ;
34759}
34760
34761var UpdateState = 0;
34762var ReplaceState = 1;
34763var ForceUpdate = 2;
34764var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.
34765// It should only be read right after calling `processUpdateQueue`, via
34766// `checkHasForceUpdateAfterProcessing`.
34767
34768var hasForceUpdate = false;
34769var didWarnUpdateInsideUpdate;
34770var currentlyProcessingQueue;
34771
34772{
34773  didWarnUpdateInsideUpdate = false;
34774  currentlyProcessingQueue = null;
34775}
34776
34777function initializeUpdateQueue(fiber) {
34778  var queue = {
34779    baseState: fiber.memoizedState,
34780    firstBaseUpdate: null,
34781    lastBaseUpdate: null,
34782    shared: {
34783      pending: null
34784    },
34785    effects: null
34786  };
34787  fiber.updateQueue = queue;
34788}
34789function cloneUpdateQueue(current, workInProgress) {
34790  // Clone the update queue from current. Unless it's already a clone.
34791  var queue = workInProgress.updateQueue;
34792  var currentQueue = current.updateQueue;
34793
34794  if (queue === currentQueue) {
34795    var clone = {
34796      baseState: currentQueue.baseState,
34797      firstBaseUpdate: currentQueue.firstBaseUpdate,
34798      lastBaseUpdate: currentQueue.lastBaseUpdate,
34799      shared: currentQueue.shared,
34800      effects: currentQueue.effects
34801    };
34802    workInProgress.updateQueue = clone;
34803  }
34804}
34805function createUpdate(eventTime, lane) {
34806  var update = {
34807    eventTime: eventTime,
34808    lane: lane,
34809    tag: UpdateState,
34810    payload: null,
34811    callback: null,
34812    next: null
34813  };
34814  return update;
34815}
34816function enqueueUpdate(fiber, update) {
34817  var updateQueue = fiber.updateQueue;
34818
34819  if (updateQueue === null) {
34820    // Only occurs if the fiber has been unmounted.
34821    return;
34822  }
34823
34824  var sharedQueue = updateQueue.shared;
34825  var pending = sharedQueue.pending;
34826
34827  if (pending === null) {
34828    // This is the first update. Create a circular list.
34829    update.next = update;
34830  } else {
34831    update.next = pending.next;
34832    pending.next = update;
34833  }
34834
34835  sharedQueue.pending = update;
34836
34837  {
34838    if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
34839      error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
34840
34841      didWarnUpdateInsideUpdate = true;
34842    }
34843  }
34844}
34845function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
34846  // Captured updates are updates that are thrown by a child during the render
34847  // phase. They should be discarded if the render is aborted. Therefore,
34848  // we should only put them on the work-in-progress queue, not the current one.
34849  var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.
34850
34851  var current = workInProgress.alternate;
34852
34853  if (current !== null) {
34854    var currentQueue = current.updateQueue;
34855
34856    if (queue === currentQueue) {
34857      // The work-in-progress queue is the same as current. This happens when
34858      // we bail out on a parent fiber that then captures an error thrown by
34859      // a child. Since we want to append the update only to the work-in
34860      // -progress queue, we need to clone the updates. We usually clone during
34861      // processUpdateQueue, but that didn't happen in this case because we
34862      // skipped over the parent when we bailed out.
34863      var newFirst = null;
34864      var newLast = null;
34865      var firstBaseUpdate = queue.firstBaseUpdate;
34866
34867      if (firstBaseUpdate !== null) {
34868        // Loop through the updates and clone them.
34869        var update = firstBaseUpdate;
34870
34871        do {
34872          var clone = {
34873            eventTime: update.eventTime,
34874            lane: update.lane,
34875            tag: update.tag,
34876            payload: update.payload,
34877            callback: update.callback,
34878            next: null
34879          };
34880
34881          if (newLast === null) {
34882            newFirst = newLast = clone;
34883          } else {
34884            newLast.next = clone;
34885            newLast = clone;
34886          }
34887
34888          update = update.next;
34889        } while (update !== null); // Append the captured update the end of the cloned list.
34890
34891
34892        if (newLast === null) {
34893          newFirst = newLast = capturedUpdate;
34894        } else {
34895          newLast.next = capturedUpdate;
34896          newLast = capturedUpdate;
34897        }
34898      } else {
34899        // There are no base updates.
34900        newFirst = newLast = capturedUpdate;
34901      }
34902
34903      queue = {
34904        baseState: currentQueue.baseState,
34905        firstBaseUpdate: newFirst,
34906        lastBaseUpdate: newLast,
34907        shared: currentQueue.shared,
34908        effects: currentQueue.effects
34909      };
34910      workInProgress.updateQueue = queue;
34911      return;
34912    }
34913  } // Append the update to the end of the list.
34914
34915
34916  var lastBaseUpdate = queue.lastBaseUpdate;
34917
34918  if (lastBaseUpdate === null) {
34919    queue.firstBaseUpdate = capturedUpdate;
34920  } else {
34921    lastBaseUpdate.next = capturedUpdate;
34922  }
34923
34924  queue.lastBaseUpdate = capturedUpdate;
34925}
34926
34927function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
34928  switch (update.tag) {
34929    case ReplaceState:
34930      {
34931        var payload = update.payload;
34932
34933        if (typeof payload === 'function') {
34934          // Updater function
34935          {
34936            enterDisallowedContextReadInDEV();
34937          }
34938
34939          var nextState = payload.call(instance, prevState, nextProps);
34940
34941          {
34942            if ( workInProgress.mode & StrictMode) {
34943              disableLogs();
34944
34945              try {
34946                payload.call(instance, prevState, nextProps);
34947              } finally {
34948                reenableLogs();
34949              }
34950            }
34951
34952            exitDisallowedContextReadInDEV();
34953          }
34954
34955          return nextState;
34956        } // State object
34957
34958
34959        return payload;
34960      }
34961
34962    case CaptureUpdate:
34963      {
34964        workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;
34965      }
34966    // Intentional fallthrough
34967
34968    case UpdateState:
34969      {
34970        var _payload = update.payload;
34971        var partialState;
34972
34973        if (typeof _payload === 'function') {
34974          // Updater function
34975          {
34976            enterDisallowedContextReadInDEV();
34977          }
34978
34979          partialState = _payload.call(instance, prevState, nextProps);
34980
34981          {
34982            if ( workInProgress.mode & StrictMode) {
34983              disableLogs();
34984
34985              try {
34986                _payload.call(instance, prevState, nextProps);
34987              } finally {
34988                reenableLogs();
34989              }
34990            }
34991
34992            exitDisallowedContextReadInDEV();
34993          }
34994        } else {
34995          // Partial state object
34996          partialState = _payload;
34997        }
34998
34999        if (partialState === null || partialState === undefined) {
35000          // Null and undefined are treated as no-ops.
35001          return prevState;
35002        } // Merge the partial state and the previous state.
35003
35004
35005        return _assign({}, prevState, partialState);
35006      }
35007
35008    case ForceUpdate:
35009      {
35010        hasForceUpdate = true;
35011        return prevState;
35012      }
35013  }
35014
35015  return prevState;
35016}
35017
35018function processUpdateQueue(workInProgress, props, instance, renderLanes) {
35019  // This is always non-null on a ClassComponent or HostRoot
35020  var queue = workInProgress.updateQueue;
35021  hasForceUpdate = false;
35022
35023  {
35024    currentlyProcessingQueue = queue.shared;
35025  }
35026
35027  var firstBaseUpdate = queue.firstBaseUpdate;
35028  var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.
35029
35030  var pendingQueue = queue.shared.pending;
35031
35032  if (pendingQueue !== null) {
35033    queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first
35034    // and last so that it's non-circular.
35035
35036    var lastPendingUpdate = pendingQueue;
35037    var firstPendingUpdate = lastPendingUpdate.next;
35038    lastPendingUpdate.next = null; // Append pending updates to base queue
35039
35040    if (lastBaseUpdate === null) {
35041      firstBaseUpdate = firstPendingUpdate;
35042    } else {
35043      lastBaseUpdate.next = firstPendingUpdate;
35044    }
35045
35046    lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then
35047    // we need to transfer the updates to that queue, too. Because the base
35048    // queue is a singly-linked list with no cycles, we can append to both
35049    // lists and take advantage of structural sharing.
35050    // TODO: Pass `current` as argument
35051
35052    var current = workInProgress.alternate;
35053
35054    if (current !== null) {
35055      // This is always non-null on a ClassComponent or HostRoot
35056      var currentQueue = current.updateQueue;
35057      var currentLastBaseUpdate = currentQueue.lastBaseUpdate;
35058
35059      if (currentLastBaseUpdate !== lastBaseUpdate) {
35060        if (currentLastBaseUpdate === null) {
35061          currentQueue.firstBaseUpdate = firstPendingUpdate;
35062        } else {
35063          currentLastBaseUpdate.next = firstPendingUpdate;
35064        }
35065
35066        currentQueue.lastBaseUpdate = lastPendingUpdate;
35067      }
35068    }
35069  } // These values may change as we process the queue.
35070
35071
35072  if (firstBaseUpdate !== null) {
35073    // Iterate through the list of updates to compute the result.
35074    var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes
35075    // from the original lanes.
35076
35077    var newLanes = NoLanes;
35078    var newBaseState = null;
35079    var newFirstBaseUpdate = null;
35080    var newLastBaseUpdate = null;
35081    var update = firstBaseUpdate;
35082
35083    do {
35084      var updateLane = update.lane;
35085      var updateEventTime = update.eventTime;
35086
35087      if (!isSubsetOfLanes(renderLanes, updateLane)) {
35088        // Priority is insufficient. Skip this update. If this is the first
35089        // skipped update, the previous update/state is the new base
35090        // update/state.
35091        var clone = {
35092          eventTime: updateEventTime,
35093          lane: updateLane,
35094          tag: update.tag,
35095          payload: update.payload,
35096          callback: update.callback,
35097          next: null
35098        };
35099
35100        if (newLastBaseUpdate === null) {
35101          newFirstBaseUpdate = newLastBaseUpdate = clone;
35102          newBaseState = newState;
35103        } else {
35104          newLastBaseUpdate = newLastBaseUpdate.next = clone;
35105        } // Update the remaining priority in the queue.
35106
35107
35108        newLanes = mergeLanes(newLanes, updateLane);
35109      } else {
35110        // This update does have sufficient priority.
35111        if (newLastBaseUpdate !== null) {
35112          var _clone = {
35113            eventTime: updateEventTime,
35114            // This update is going to be committed so we never want uncommit
35115            // it. Using NoLane works because 0 is a subset of all bitmasks, so
35116            // this will never be skipped by the check above.
35117            lane: NoLane,
35118            tag: update.tag,
35119            payload: update.payload,
35120            callback: update.callback,
35121            next: null
35122          };
35123          newLastBaseUpdate = newLastBaseUpdate.next = _clone;
35124        } // Process this update.
35125
35126
35127        newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
35128        var callback = update.callback;
35129
35130        if (callback !== null) {
35131          workInProgress.flags |= Callback;
35132          var effects = queue.effects;
35133
35134          if (effects === null) {
35135            queue.effects = [update];
35136          } else {
35137            effects.push(update);
35138          }
35139        }
35140      }
35141
35142      update = update.next;
35143
35144      if (update === null) {
35145        pendingQueue = queue.shared.pending;
35146
35147        if (pendingQueue === null) {
35148          break;
35149        } else {
35150          // An update was scheduled from inside a reducer. Add the new
35151          // pending updates to the end of the list and keep processing.
35152          var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we
35153          // unravel them when transferring them to the base queue.
35154
35155          var _firstPendingUpdate = _lastPendingUpdate.next;
35156          _lastPendingUpdate.next = null;
35157          update = _firstPendingUpdate;
35158          queue.lastBaseUpdate = _lastPendingUpdate;
35159          queue.shared.pending = null;
35160        }
35161      }
35162    } while (true);
35163
35164    if (newLastBaseUpdate === null) {
35165      newBaseState = newState;
35166    }
35167
35168    queue.baseState = newBaseState;
35169    queue.firstBaseUpdate = newFirstBaseUpdate;
35170    queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue.
35171    // This should be fine because the only two other things that contribute to
35172    // expiration time are props and context. We're already in the middle of the
35173    // begin phase by the time we start processing the queue, so we've already
35174    // dealt with the props. Context in components that specify
35175    // shouldComponentUpdate is tricky; but we'll have to account for
35176    // that regardless.
35177
35178    markSkippedUpdateLanes(newLanes);
35179    workInProgress.lanes = newLanes;
35180    workInProgress.memoizedState = newState;
35181  }
35182
35183  {
35184    currentlyProcessingQueue = null;
35185  }
35186}
35187
35188function callCallback(callback, context) {
35189  if (!(typeof callback === 'function')) {
35190    {
35191      throw Error( "Invalid argument passed as callback. Expected a function. Instead received: " + callback );
35192    }
35193  }
35194
35195  callback.call(context);
35196}
35197
35198function resetHasForceUpdateBeforeProcessing() {
35199  hasForceUpdate = false;
35200}
35201function checkHasForceUpdateAfterProcessing() {
35202  return hasForceUpdate;
35203}
35204function commitUpdateQueue(finishedWork, finishedQueue, instance) {
35205  // Commit the effects
35206  var effects = finishedQueue.effects;
35207  finishedQueue.effects = null;
35208
35209  if (effects !== null) {
35210    for (var i = 0; i < effects.length; i++) {
35211      var effect = effects[i];
35212      var callback = effect.callback;
35213
35214      if (callback !== null) {
35215        effect.callback = null;
35216        callCallback(callback, instance);
35217      }
35218    }
35219  }
35220}
35221
35222var fakeInternalInstance = {};
35223var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
35224// We'll use it to determine whether we need to initialize legacy refs.
35225
35226var emptyRefsObject = new React.Component().refs;
35227var didWarnAboutStateAssignmentForComponent;
35228var didWarnAboutUninitializedState;
35229var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
35230var didWarnAboutLegacyLifecyclesAndDerivedState;
35231var didWarnAboutUndefinedDerivedState;
35232var warnOnUndefinedDerivedState;
35233var warnOnInvalidCallback;
35234var didWarnAboutDirectlyAssigningPropsToState;
35235var didWarnAboutContextTypeAndContextTypes;
35236var didWarnAboutInvalidateContextType;
35237
35238{
35239  didWarnAboutStateAssignmentForComponent = new Set();
35240  didWarnAboutUninitializedState = new Set();
35241  didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
35242  didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
35243  didWarnAboutDirectlyAssigningPropsToState = new Set();
35244  didWarnAboutUndefinedDerivedState = new Set();
35245  didWarnAboutContextTypeAndContextTypes = new Set();
35246  didWarnAboutInvalidateContextType = new Set();
35247  var didWarnOnInvalidCallback = new Set();
35248
35249  warnOnInvalidCallback = function (callback, callerName) {
35250    if (callback === null || typeof callback === 'function') {
35251      return;
35252    }
35253
35254    var key = callerName + '_' + callback;
35255
35256    if (!didWarnOnInvalidCallback.has(key)) {
35257      didWarnOnInvalidCallback.add(key);
35258
35259      error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
35260    }
35261  };
35262
35263  warnOnUndefinedDerivedState = function (type, partialState) {
35264    if (partialState === undefined) {
35265      var componentName = getComponentName(type) || 'Component';
35266
35267      if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
35268        didWarnAboutUndefinedDerivedState.add(componentName);
35269
35270        error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
35271      }
35272    }
35273  }; // This is so gross but it's at least non-critical and can be removed if
35274  // it causes problems. This is meant to give a nicer error message for
35275  // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
35276  // ...)) which otherwise throws a "_processChildContext is not a function"
35277  // exception.
35278
35279
35280  Object.defineProperty(fakeInternalInstance, '_processChildContext', {
35281    enumerable: false,
35282    value: function () {
35283      {
35284        {
35285          throw Error( "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)." );
35286        }
35287      }
35288    }
35289  });
35290  Object.freeze(fakeInternalInstance);
35291}
35292
35293function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
35294  var prevState = workInProgress.memoizedState;
35295
35296  {
35297    if ( workInProgress.mode & StrictMode) {
35298      disableLogs();
35299
35300      try {
35301        // Invoke the function an extra time to help detect side-effects.
35302        getDerivedStateFromProps(nextProps, prevState);
35303      } finally {
35304        reenableLogs();
35305      }
35306    }
35307  }
35308
35309  var partialState = getDerivedStateFromProps(nextProps, prevState);
35310
35311  {
35312    warnOnUndefinedDerivedState(ctor, partialState);
35313  } // Merge the partial state and the previous state.
35314
35315
35316  var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
35317  workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
35318  // base state.
35319
35320  if (workInProgress.lanes === NoLanes) {
35321    // Queue is always non-null for classes
35322    var updateQueue = workInProgress.updateQueue;
35323    updateQueue.baseState = memoizedState;
35324  }
35325}
35326var classComponentUpdater = {
35327  isMounted: isMounted,
35328  enqueueSetState: function (inst, payload, callback) {
35329    var fiber = get(inst);
35330    var eventTime = requestEventTime();
35331    var lane = requestUpdateLane(fiber);
35332    var update = createUpdate(eventTime, lane);
35333    update.payload = payload;
35334
35335    if (callback !== undefined && callback !== null) {
35336      {
35337        warnOnInvalidCallback(callback, 'setState');
35338      }
35339
35340      update.callback = callback;
35341    }
35342
35343    enqueueUpdate(fiber, update);
35344    scheduleUpdateOnFiber(fiber, lane, eventTime);
35345  },
35346  enqueueReplaceState: function (inst, payload, callback) {
35347    var fiber = get(inst);
35348    var eventTime = requestEventTime();
35349    var lane = requestUpdateLane(fiber);
35350    var update = createUpdate(eventTime, lane);
35351    update.tag = ReplaceState;
35352    update.payload = payload;
35353
35354    if (callback !== undefined && callback !== null) {
35355      {
35356        warnOnInvalidCallback(callback, 'replaceState');
35357      }
35358
35359      update.callback = callback;
35360    }
35361
35362    enqueueUpdate(fiber, update);
35363    scheduleUpdateOnFiber(fiber, lane, eventTime);
35364  },
35365  enqueueForceUpdate: function (inst, callback) {
35366    var fiber = get(inst);
35367    var eventTime = requestEventTime();
35368    var lane = requestUpdateLane(fiber);
35369    var update = createUpdate(eventTime, lane);
35370    update.tag = ForceUpdate;
35371
35372    if (callback !== undefined && callback !== null) {
35373      {
35374        warnOnInvalidCallback(callback, 'forceUpdate');
35375      }
35376
35377      update.callback = callback;
35378    }
35379
35380    enqueueUpdate(fiber, update);
35381    scheduleUpdateOnFiber(fiber, lane, eventTime);
35382  }
35383};
35384
35385function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
35386  var instance = workInProgress.stateNode;
35387
35388  if (typeof instance.shouldComponentUpdate === 'function') {
35389    {
35390      if ( workInProgress.mode & StrictMode) {
35391        disableLogs();
35392
35393        try {
35394          // Invoke the function an extra time to help detect side-effects.
35395          instance.shouldComponentUpdate(newProps, newState, nextContext);
35396        } finally {
35397          reenableLogs();
35398        }
35399      }
35400    }
35401
35402    var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
35403
35404    {
35405      if (shouldUpdate === undefined) {
35406        error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');
35407      }
35408    }
35409
35410    return shouldUpdate;
35411  }
35412
35413  if (ctor.prototype && ctor.prototype.isPureReactComponent) {
35414    return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
35415  }
35416
35417  return true;
35418}
35419
35420function checkClassInstance(workInProgress, ctor, newProps) {
35421  var instance = workInProgress.stateNode;
35422
35423  {
35424    var name = getComponentName(ctor) || 'Component';
35425    var renderPresent = instance.render;
35426
35427    if (!renderPresent) {
35428      if (ctor.prototype && typeof ctor.prototype.render === 'function') {
35429        error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
35430      } else {
35431        error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
35432      }
35433    }
35434
35435    if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
35436      error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);
35437    }
35438
35439    if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
35440      error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);
35441    }
35442
35443    if (instance.propTypes) {
35444      error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
35445    }
35446
35447    if (instance.contextType) {
35448      error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
35449    }
35450
35451    {
35452      if (instance.contextTypes) {
35453        error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
35454      }
35455
35456      if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
35457        didWarnAboutContextTypeAndContextTypes.add(ctor);
35458
35459        error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
35460      }
35461    }
35462
35463    if (typeof instance.componentShouldUpdate === 'function') {
35464      error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);
35465    }
35466
35467    if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
35468      error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
35469    }
35470
35471    if (typeof instance.componentDidUnmount === 'function') {
35472      error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
35473    }
35474
35475    if (typeof instance.componentDidReceiveProps === 'function') {
35476      error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);
35477    }
35478
35479    if (typeof instance.componentWillRecieveProps === 'function') {
35480      error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
35481    }
35482
35483    if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
35484      error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
35485    }
35486
35487    var hasMutatedProps = instance.props !== newProps;
35488
35489    if (instance.props !== undefined && hasMutatedProps) {
35490      error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
35491    }
35492
35493    if (instance.defaultProps) {
35494      error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
35495    }
35496
35497    if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
35498      didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
35499
35500      error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
35501    }
35502
35503    if (typeof instance.getDerivedStateFromProps === 'function') {
35504      error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
35505    }
35506
35507    if (typeof instance.getDerivedStateFromError === 'function') {
35508      error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
35509    }
35510
35511    if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
35512      error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
35513    }
35514
35515    var _state = instance.state;
35516
35517    if (_state && (typeof _state !== 'object' || isArray(_state))) {
35518      error('%s.state: must be set to an object or null', name);
35519    }
35520
35521    if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
35522      error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
35523    }
35524  }
35525}
35526
35527function adoptClassInstance(workInProgress, instance) {
35528  instance.updater = classComponentUpdater;
35529  workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
35530
35531  set(instance, workInProgress);
35532
35533  {
35534    instance._reactInternalInstance = fakeInternalInstance;
35535  }
35536}
35537
35538function constructClassInstance(workInProgress, ctor, props) {
35539  var isLegacyContextConsumer = false;
35540  var unmaskedContext = emptyContextObject;
35541  var context = emptyContextObject;
35542  var contextType = ctor.contextType;
35543
35544  {
35545    if ('contextType' in ctor) {
35546      var isValid = // Allow null for conditional declaration
35547      contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
35548
35549      if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
35550        didWarnAboutInvalidateContextType.add(ctor);
35551        var addendum = '';
35552
35553        if (contextType === undefined) {
35554          addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
35555        } else if (typeof contextType !== 'object') {
35556          addendum = ' However, it is set to a ' + typeof contextType + '.';
35557        } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
35558          addendum = ' Did you accidentally pass the Context.Provider instead?';
35559        } else if (contextType._context !== undefined) {
35560          // <Context.Consumer>
35561          addendum = ' Did you accidentally pass the Context.Consumer instead?';
35562        } else {
35563          addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
35564        }
35565
35566        error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);
35567      }
35568    }
35569  }
35570
35571  if (typeof contextType === 'object' && contextType !== null) {
35572    context = readContext(contextType);
35573  } else {
35574    unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
35575    var contextTypes = ctor.contextTypes;
35576    isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
35577    context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
35578  } // Instantiate twice to help detect side-effects.
35579
35580
35581  {
35582    if ( workInProgress.mode & StrictMode) {
35583      disableLogs();
35584
35585      try {
35586        new ctor(props, context); // eslint-disable-line no-new
35587      } finally {
35588        reenableLogs();
35589      }
35590    }
35591  }
35592
35593  var instance = new ctor(props, context);
35594  var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
35595  adoptClassInstance(workInProgress, instance);
35596
35597  {
35598    if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
35599      var componentName = getComponentName(ctor) || 'Component';
35600
35601      if (!didWarnAboutUninitializedState.has(componentName)) {
35602        didWarnAboutUninitializedState.add(componentName);
35603
35604        error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
35605      }
35606    } // If new component APIs are defined, "unsafe" lifecycles won't be called.
35607    // Warn about these lifecycles if they are present.
35608    // Don't warn about react-lifecycles-compat polyfilled methods though.
35609
35610
35611    if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
35612      var foundWillMountName = null;
35613      var foundWillReceivePropsName = null;
35614      var foundWillUpdateName = null;
35615
35616      if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
35617        foundWillMountName = 'componentWillMount';
35618      } else if (typeof instance.UNSAFE_componentWillMount === 'function') {
35619        foundWillMountName = 'UNSAFE_componentWillMount';
35620      }
35621
35622      if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
35623        foundWillReceivePropsName = 'componentWillReceiveProps';
35624      } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
35625        foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
35626      }
35627
35628      if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
35629        foundWillUpdateName = 'componentWillUpdate';
35630      } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
35631        foundWillUpdateName = 'UNSAFE_componentWillUpdate';
35632      }
35633
35634      if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
35635        var _componentName = getComponentName(ctor) || 'Component';
35636
35637        var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
35638
35639        if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
35640          didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
35641
35642          error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n  " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n  " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n  " + foundWillUpdateName : '');
35643        }
35644      }
35645    }
35646  } // Cache unmasked context so we can avoid recreating masked context unless necessary.
35647  // ReactFiberContext usually updates this cache but can't for newly-created instances.
35648
35649
35650  if (isLegacyContextConsumer) {
35651    cacheContext(workInProgress, unmaskedContext, context);
35652  }
35653
35654  return instance;
35655}
35656
35657function callComponentWillMount(workInProgress, instance) {
35658  var oldState = instance.state;
35659
35660  if (typeof instance.componentWillMount === 'function') {
35661    instance.componentWillMount();
35662  }
35663
35664  if (typeof instance.UNSAFE_componentWillMount === 'function') {
35665    instance.UNSAFE_componentWillMount();
35666  }
35667
35668  if (oldState !== instance.state) {
35669    {
35670      error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
35671    }
35672
35673    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
35674  }
35675}
35676
35677function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
35678  var oldState = instance.state;
35679
35680  if (typeof instance.componentWillReceiveProps === 'function') {
35681    instance.componentWillReceiveProps(newProps, nextContext);
35682  }
35683
35684  if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
35685    instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
35686  }
35687
35688  if (instance.state !== oldState) {
35689    {
35690      var componentName = getComponentName(workInProgress.type) || 'Component';
35691
35692      if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
35693        didWarnAboutStateAssignmentForComponent.add(componentName);
35694
35695        error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
35696      }
35697    }
35698
35699    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
35700  }
35701} // Invokes the mount life-cycles on a previously never rendered instance.
35702
35703
35704function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
35705  {
35706    checkClassInstance(workInProgress, ctor, newProps);
35707  }
35708
35709  var instance = workInProgress.stateNode;
35710  instance.props = newProps;
35711  instance.state = workInProgress.memoizedState;
35712  instance.refs = emptyRefsObject;
35713  initializeUpdateQueue(workInProgress);
35714  var contextType = ctor.contextType;
35715
35716  if (typeof contextType === 'object' && contextType !== null) {
35717    instance.context = readContext(contextType);
35718  } else {
35719    var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
35720    instance.context = getMaskedContext(workInProgress, unmaskedContext);
35721  }
35722
35723  {
35724    if (instance.state === newProps) {
35725      var componentName = getComponentName(ctor) || 'Component';
35726
35727      if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
35728        didWarnAboutDirectlyAssigningPropsToState.add(componentName);
35729
35730        error('%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName);
35731      }
35732    }
35733
35734    if (workInProgress.mode & StrictMode) {
35735      ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
35736    }
35737
35738    {
35739      ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
35740    }
35741  }
35742
35743  processUpdateQueue(workInProgress, newProps, instance, renderLanes);
35744  instance.state = workInProgress.memoizedState;
35745  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
35746
35747  if (typeof getDerivedStateFromProps === 'function') {
35748    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
35749    instance.state = workInProgress.memoizedState;
35750  } // In order to support react-lifecycles-compat polyfilled components,
35751  // Unsafe lifecycles should not be invoked for components using the new APIs.
35752
35753
35754  if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
35755    callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
35756    // process them now.
35757
35758    processUpdateQueue(workInProgress, newProps, instance, renderLanes);
35759    instance.state = workInProgress.memoizedState;
35760  }
35761
35762  if (typeof instance.componentDidMount === 'function') {
35763    workInProgress.flags |= Update;
35764  }
35765}
35766
35767function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
35768  var instance = workInProgress.stateNode;
35769  var oldProps = workInProgress.memoizedProps;
35770  instance.props = oldProps;
35771  var oldContext = instance.context;
35772  var contextType = ctor.contextType;
35773  var nextContext = emptyContextObject;
35774
35775  if (typeof contextType === 'object' && contextType !== null) {
35776    nextContext = readContext(contextType);
35777  } else {
35778    var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
35779    nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
35780  }
35781
35782  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
35783  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
35784  // ever the previously attempted to render - not the "current". However,
35785  // during componentDidUpdate we pass the "current" props.
35786  // In order to support react-lifecycles-compat polyfilled components,
35787  // Unsafe lifecycles should not be invoked for components using the new APIs.
35788
35789  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
35790    if (oldProps !== newProps || oldContext !== nextContext) {
35791      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
35792    }
35793  }
35794
35795  resetHasForceUpdateBeforeProcessing();
35796  var oldState = workInProgress.memoizedState;
35797  var newState = instance.state = oldState;
35798  processUpdateQueue(workInProgress, newProps, instance, renderLanes);
35799  newState = workInProgress.memoizedState;
35800
35801  if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
35802    // If an update was already in progress, we should schedule an Update
35803    // effect even though we're bailing out, so that cWU/cDU are called.
35804    if (typeof instance.componentDidMount === 'function') {
35805      workInProgress.flags |= Update;
35806    }
35807
35808    return false;
35809  }
35810
35811  if (typeof getDerivedStateFromProps === 'function') {
35812    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
35813    newState = workInProgress.memoizedState;
35814  }
35815
35816  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
35817
35818  if (shouldUpdate) {
35819    // In order to support react-lifecycles-compat polyfilled components,
35820    // Unsafe lifecycles should not be invoked for components using the new APIs.
35821    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
35822      if (typeof instance.componentWillMount === 'function') {
35823        instance.componentWillMount();
35824      }
35825
35826      if (typeof instance.UNSAFE_componentWillMount === 'function') {
35827        instance.UNSAFE_componentWillMount();
35828      }
35829    }
35830
35831    if (typeof instance.componentDidMount === 'function') {
35832      workInProgress.flags |= Update;
35833    }
35834  } else {
35835    // If an update was already in progress, we should schedule an Update
35836    // effect even though we're bailing out, so that cWU/cDU are called.
35837    if (typeof instance.componentDidMount === 'function') {
35838      workInProgress.flags |= Update;
35839    } // If shouldComponentUpdate returned false, we should still update the
35840    // memoized state to indicate that this work can be reused.
35841
35842
35843    workInProgress.memoizedProps = newProps;
35844    workInProgress.memoizedState = newState;
35845  } // Update the existing instance's state, props, and context pointers even
35846  // if shouldComponentUpdate returns false.
35847
35848
35849  instance.props = newProps;
35850  instance.state = newState;
35851  instance.context = nextContext;
35852  return shouldUpdate;
35853} // Invokes the update life-cycles and returns false if it shouldn't rerender.
35854
35855
35856function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {
35857  var instance = workInProgress.stateNode;
35858  cloneUpdateQueue(current, workInProgress);
35859  var unresolvedOldProps = workInProgress.memoizedProps;
35860  var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);
35861  instance.props = oldProps;
35862  var unresolvedNewProps = workInProgress.pendingProps;
35863  var oldContext = instance.context;
35864  var contextType = ctor.contextType;
35865  var nextContext = emptyContextObject;
35866
35867  if (typeof contextType === 'object' && contextType !== null) {
35868    nextContext = readContext(contextType);
35869  } else {
35870    var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
35871    nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
35872  }
35873
35874  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
35875  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
35876  // ever the previously attempted to render - not the "current". However,
35877  // during componentDidUpdate we pass the "current" props.
35878  // In order to support react-lifecycles-compat polyfilled components,
35879  // Unsafe lifecycles should not be invoked for components using the new APIs.
35880
35881  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
35882    if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {
35883      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
35884    }
35885  }
35886
35887  resetHasForceUpdateBeforeProcessing();
35888  var oldState = workInProgress.memoizedState;
35889  var newState = instance.state = oldState;
35890  processUpdateQueue(workInProgress, newProps, instance, renderLanes);
35891  newState = workInProgress.memoizedState;
35892
35893  if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
35894    // If an update was already in progress, we should schedule an Update
35895    // effect even though we're bailing out, so that cWU/cDU are called.
35896    if (typeof instance.componentDidUpdate === 'function') {
35897      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
35898        workInProgress.flags |= Update;
35899      }
35900    }
35901
35902    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
35903      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
35904        workInProgress.flags |= Snapshot;
35905      }
35906    }
35907
35908    return false;
35909  }
35910
35911  if (typeof getDerivedStateFromProps === 'function') {
35912    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
35913    newState = workInProgress.memoizedState;
35914  }
35915
35916  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
35917
35918  if (shouldUpdate) {
35919    // In order to support react-lifecycles-compat polyfilled components,
35920    // Unsafe lifecycles should not be invoked for components using the new APIs.
35921    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
35922      if (typeof instance.componentWillUpdate === 'function') {
35923        instance.componentWillUpdate(newProps, newState, nextContext);
35924      }
35925
35926      if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
35927        instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
35928      }
35929    }
35930
35931    if (typeof instance.componentDidUpdate === 'function') {
35932      workInProgress.flags |= Update;
35933    }
35934
35935    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
35936      workInProgress.flags |= Snapshot;
35937    }
35938  } else {
35939    // If an update was already in progress, we should schedule an Update
35940    // effect even though we're bailing out, so that cWU/cDU are called.
35941    if (typeof instance.componentDidUpdate === 'function') {
35942      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
35943        workInProgress.flags |= Update;
35944      }
35945    }
35946
35947    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
35948      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
35949        workInProgress.flags |= Snapshot;
35950      }
35951    } // If shouldComponentUpdate returned false, we should still update the
35952    // memoized props/state to indicate that this work can be reused.
35953
35954
35955    workInProgress.memoizedProps = newProps;
35956    workInProgress.memoizedState = newState;
35957  } // Update the existing instance's state, props, and context pointers even
35958  // if shouldComponentUpdate returns false.
35959
35960
35961  instance.props = newProps;
35962  instance.state = newState;
35963  instance.context = nextContext;
35964  return shouldUpdate;
35965}
35966
35967var didWarnAboutMaps;
35968var didWarnAboutGenerators;
35969var didWarnAboutStringRefs;
35970var ownerHasKeyUseWarning;
35971var ownerHasFunctionTypeWarning;
35972
35973var warnForMissingKey = function (child, returnFiber) {};
35974
35975{
35976  didWarnAboutMaps = false;
35977  didWarnAboutGenerators = false;
35978  didWarnAboutStringRefs = {};
35979  /**
35980   * Warn if there's no key explicitly set on dynamic arrays of children or
35981   * object keys are not valid. This allows us to keep track of children between
35982   * updates.
35983   */
35984
35985  ownerHasKeyUseWarning = {};
35986  ownerHasFunctionTypeWarning = {};
35987
35988  warnForMissingKey = function (child, returnFiber) {
35989    if (child === null || typeof child !== 'object') {
35990      return;
35991    }
35992
35993    if (!child._store || child._store.validated || child.key != null) {
35994      return;
35995    }
35996
35997    if (!(typeof child._store === 'object')) {
35998      {
35999        throw Error( "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue." );
36000      }
36001    }
36002
36003    child._store.validated = true;
36004    var componentName = getComponentName(returnFiber.type) || 'Component';
36005
36006    if (ownerHasKeyUseWarning[componentName]) {
36007      return;
36008    }
36009
36010    ownerHasKeyUseWarning[componentName] = true;
36011
36012    error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');
36013  };
36014}
36015
36016var isArray$1 = Array.isArray;
36017
36018function coerceRef(returnFiber, current, element) {
36019  var mixedRef = element.ref;
36020
36021  if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
36022    {
36023      // TODO: Clean this up once we turn on the string ref warning for
36024      // everyone, because the strict mode case will no longer be relevant
36025      if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
36026      // because these cannot be automatically converted to an arrow function
36027      // using a codemod. Therefore, we don't have to warn about string refs again.
36028      !(element._owner && element._self && element._owner.stateNode !== element._self)) {
36029        var componentName = getComponentName(returnFiber.type) || 'Component';
36030
36031        if (!didWarnAboutStringRefs[componentName]) {
36032          {
36033            error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef);
36034          }
36035
36036          didWarnAboutStringRefs[componentName] = true;
36037        }
36038      }
36039    }
36040
36041    if (element._owner) {
36042      var owner = element._owner;
36043      var inst;
36044
36045      if (owner) {
36046        var ownerFiber = owner;
36047
36048        if (!(ownerFiber.tag === ClassComponent)) {
36049          {
36050            throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref" );
36051          }
36052        }
36053
36054        inst = ownerFiber.stateNode;
36055      }
36056
36057      if (!inst) {
36058        {
36059          throw Error( "Missing owner for string ref " + mixedRef + ". This error is likely caused by a bug in React. Please file an issue." );
36060        }
36061      }
36062
36063      var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref
36064
36065      if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
36066        return current.ref;
36067      }
36068
36069      var ref = function (value) {
36070        var refs = inst.refs;
36071
36072        if (refs === emptyRefsObject) {
36073          // This is a lazy pooled frozen object, so we need to initialize.
36074          refs = inst.refs = {};
36075        }
36076
36077        if (value === null) {
36078          delete refs[stringRef];
36079        } else {
36080          refs[stringRef] = value;
36081        }
36082      };
36083
36084      ref._stringRef = stringRef;
36085      return ref;
36086    } else {
36087      if (!(typeof mixedRef === 'string')) {
36088        {
36089          throw Error( "Expected ref to be a function, a string, an object returned by React.createRef(), or null." );
36090        }
36091      }
36092
36093      if (!element._owner) {
36094        {
36095          throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." );
36096        }
36097      }
36098    }
36099  }
36100
36101  return mixedRef;
36102}
36103
36104function throwOnInvalidObjectType(returnFiber, newChild) {
36105  if (returnFiber.type !== 'textarea') {
36106    {
36107      {
36108        throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + "). If you meant to render a collection of children, use an array instead." );
36109      }
36110    }
36111  }
36112}
36113
36114function warnOnFunctionType(returnFiber) {
36115  {
36116    var componentName = getComponentName(returnFiber.type) || 'Component';
36117
36118    if (ownerHasFunctionTypeWarning[componentName]) {
36119      return;
36120    }
36121
36122    ownerHasFunctionTypeWarning[componentName] = true;
36123
36124    error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
36125  }
36126} // We avoid inlining this to avoid potential deopts from using try/catch.
36127// to be able to optimize each path individually by branching early. This needs
36128// a compiler or we can do it manually. Helpers that don't need this branching
36129// live outside of this function.
36130
36131
36132function ChildReconciler(shouldTrackSideEffects) {
36133  function deleteChild(returnFiber, childToDelete) {
36134    if (!shouldTrackSideEffects) {
36135      // Noop.
36136      return;
36137    } // Deletions are added in reversed order so we add it to the front.
36138    // At this point, the return fiber's effect list is empty except for
36139    // deletions, so we can just append the deletion to the list. The remaining
36140    // effects aren't added until the complete phase. Once we implement
36141    // resuming, this may not be true.
36142
36143
36144    var last = returnFiber.lastEffect;
36145
36146    if (last !== null) {
36147      last.nextEffect = childToDelete;
36148      returnFiber.lastEffect = childToDelete;
36149    } else {
36150      returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
36151    }
36152
36153    childToDelete.nextEffect = null;
36154    childToDelete.flags = Deletion;
36155  }
36156
36157  function deleteRemainingChildren(returnFiber, currentFirstChild) {
36158    if (!shouldTrackSideEffects) {
36159      // Noop.
36160      return null;
36161    } // TODO: For the shouldClone case, this could be micro-optimized a bit by
36162    // assuming that after the first child we've already added everything.
36163
36164
36165    var childToDelete = currentFirstChild;
36166
36167    while (childToDelete !== null) {
36168      deleteChild(returnFiber, childToDelete);
36169      childToDelete = childToDelete.sibling;
36170    }
36171
36172    return null;
36173  }
36174
36175  function mapRemainingChildren(returnFiber, currentFirstChild) {
36176    // Add the remaining children to a temporary map so that we can find them by
36177    // keys quickly. Implicit (null) keys get added to this set with their index
36178    // instead.
36179    var existingChildren = new Map();
36180    var existingChild = currentFirstChild;
36181
36182    while (existingChild !== null) {
36183      if (existingChild.key !== null) {
36184        existingChildren.set(existingChild.key, existingChild);
36185      } else {
36186        existingChildren.set(existingChild.index, existingChild);
36187      }
36188
36189      existingChild = existingChild.sibling;
36190    }
36191
36192    return existingChildren;
36193  }
36194
36195  function useFiber(fiber, pendingProps) {
36196    // We currently set sibling to null and index to 0 here because it is easy
36197    // to forget to do before returning it. E.g. for the single child case.
36198    var clone = createWorkInProgress(fiber, pendingProps);
36199    clone.index = 0;
36200    clone.sibling = null;
36201    return clone;
36202  }
36203
36204  function placeChild(newFiber, lastPlacedIndex, newIndex) {
36205    newFiber.index = newIndex;
36206
36207    if (!shouldTrackSideEffects) {
36208      // Noop.
36209      return lastPlacedIndex;
36210    }
36211
36212    var current = newFiber.alternate;
36213
36214    if (current !== null) {
36215      var oldIndex = current.index;
36216
36217      if (oldIndex < lastPlacedIndex) {
36218        // This is a move.
36219        newFiber.flags = Placement;
36220        return lastPlacedIndex;
36221      } else {
36222        // This item can stay in place.
36223        return oldIndex;
36224      }
36225    } else {
36226      // This is an insertion.
36227      newFiber.flags = Placement;
36228      return lastPlacedIndex;
36229    }
36230  }
36231
36232  function placeSingleChild(newFiber) {
36233    // This is simpler for the single child case. We only need to do a
36234    // placement for inserting new children.
36235    if (shouldTrackSideEffects && newFiber.alternate === null) {
36236      newFiber.flags = Placement;
36237    }
36238
36239    return newFiber;
36240  }
36241
36242  function updateTextNode(returnFiber, current, textContent, lanes) {
36243    if (current === null || current.tag !== HostText) {
36244      // Insert
36245      var created = createFiberFromText(textContent, returnFiber.mode, lanes);
36246      created.return = returnFiber;
36247      return created;
36248    } else {
36249      // Update
36250      var existing = useFiber(current, textContent);
36251      existing.return = returnFiber;
36252      return existing;
36253    }
36254  }
36255
36256  function updateElement(returnFiber, current, element, lanes) {
36257    if (current !== null) {
36258      if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
36259       isCompatibleFamilyForHotReloading(current, element) )) {
36260        // Move based on index
36261        var existing = useFiber(current, element.props);
36262        existing.ref = coerceRef(returnFiber, current, element);
36263        existing.return = returnFiber;
36264
36265        {
36266          existing._debugSource = element._source;
36267          existing._debugOwner = element._owner;
36268        }
36269
36270        return existing;
36271      }
36272    } // Insert
36273
36274
36275    var created = createFiberFromElement(element, returnFiber.mode, lanes);
36276    created.ref = coerceRef(returnFiber, current, element);
36277    created.return = returnFiber;
36278    return created;
36279  }
36280
36281  function updatePortal(returnFiber, current, portal, lanes) {
36282    if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
36283      // Insert
36284      var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
36285      created.return = returnFiber;
36286      return created;
36287    } else {
36288      // Update
36289      var existing = useFiber(current, portal.children || []);
36290      existing.return = returnFiber;
36291      return existing;
36292    }
36293  }
36294
36295  function updateFragment(returnFiber, current, fragment, lanes, key) {
36296    if (current === null || current.tag !== Fragment) {
36297      // Insert
36298      var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
36299      created.return = returnFiber;
36300      return created;
36301    } else {
36302      // Update
36303      var existing = useFiber(current, fragment);
36304      existing.return = returnFiber;
36305      return existing;
36306    }
36307  }
36308
36309  function createChild(returnFiber, newChild, lanes) {
36310    if (typeof newChild === 'string' || typeof newChild === 'number') {
36311      // Text nodes don't have keys. If the previous node is implicitly keyed
36312      // we can continue to replace it without aborting even if it is not a text
36313      // node.
36314      var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);
36315      created.return = returnFiber;
36316      return created;
36317    }
36318
36319    if (typeof newChild === 'object' && newChild !== null) {
36320      switch (newChild.$$typeof) {
36321        case REACT_ELEMENT_TYPE:
36322          {
36323            var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);
36324
36325            _created.ref = coerceRef(returnFiber, null, newChild);
36326            _created.return = returnFiber;
36327            return _created;
36328          }
36329
36330        case REACT_PORTAL_TYPE:
36331          {
36332            var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);
36333
36334            _created2.return = returnFiber;
36335            return _created2;
36336          }
36337      }
36338
36339      if (isArray$1(newChild) || getIteratorFn(newChild)) {
36340        var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);
36341
36342        _created3.return = returnFiber;
36343        return _created3;
36344      }
36345
36346      throwOnInvalidObjectType(returnFiber, newChild);
36347    }
36348
36349    {
36350      if (typeof newChild === 'function') {
36351        warnOnFunctionType(returnFiber);
36352      }
36353    }
36354
36355    return null;
36356  }
36357
36358  function updateSlot(returnFiber, oldFiber, newChild, lanes) {
36359    // Update the fiber if the keys match, otherwise return null.
36360    var key = oldFiber !== null ? oldFiber.key : null;
36361
36362    if (typeof newChild === 'string' || typeof newChild === 'number') {
36363      // Text nodes don't have keys. If the previous node is implicitly keyed
36364      // we can continue to replace it without aborting even if it is not a text
36365      // node.
36366      if (key !== null) {
36367        return null;
36368      }
36369
36370      return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);
36371    }
36372
36373    if (typeof newChild === 'object' && newChild !== null) {
36374      switch (newChild.$$typeof) {
36375        case REACT_ELEMENT_TYPE:
36376          {
36377            if (newChild.key === key) {
36378              if (newChild.type === REACT_FRAGMENT_TYPE) {
36379                return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);
36380              }
36381
36382              return updateElement(returnFiber, oldFiber, newChild, lanes);
36383            } else {
36384              return null;
36385            }
36386          }
36387
36388        case REACT_PORTAL_TYPE:
36389          {
36390            if (newChild.key === key) {
36391              return updatePortal(returnFiber, oldFiber, newChild, lanes);
36392            } else {
36393              return null;
36394            }
36395          }
36396      }
36397
36398      if (isArray$1(newChild) || getIteratorFn(newChild)) {
36399        if (key !== null) {
36400          return null;
36401        }
36402
36403        return updateFragment(returnFiber, oldFiber, newChild, lanes, null);
36404      }
36405
36406      throwOnInvalidObjectType(returnFiber, newChild);
36407    }
36408
36409    {
36410      if (typeof newChild === 'function') {
36411        warnOnFunctionType(returnFiber);
36412      }
36413    }
36414
36415    return null;
36416  }
36417
36418  function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
36419    if (typeof newChild === 'string' || typeof newChild === 'number') {
36420      // Text nodes don't have keys, so we neither have to check the old nor
36421      // new node for the key. If both are text nodes, they match.
36422      var matchedFiber = existingChildren.get(newIdx) || null;
36423      return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);
36424    }
36425
36426    if (typeof newChild === 'object' && newChild !== null) {
36427      switch (newChild.$$typeof) {
36428        case REACT_ELEMENT_TYPE:
36429          {
36430            var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
36431
36432            if (newChild.type === REACT_FRAGMENT_TYPE) {
36433              return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);
36434            }
36435
36436            return updateElement(returnFiber, _matchedFiber, newChild, lanes);
36437          }
36438
36439        case REACT_PORTAL_TYPE:
36440          {
36441            var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
36442
36443            return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);
36444          }
36445
36446      }
36447
36448      if (isArray$1(newChild) || getIteratorFn(newChild)) {
36449        var _matchedFiber3 = existingChildren.get(newIdx) || null;
36450
36451        return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);
36452      }
36453
36454      throwOnInvalidObjectType(returnFiber, newChild);
36455    }
36456
36457    {
36458      if (typeof newChild === 'function') {
36459        warnOnFunctionType(returnFiber);
36460      }
36461    }
36462
36463    return null;
36464  }
36465  /**
36466   * Warns if there is a duplicate or missing key
36467   */
36468
36469
36470  function warnOnInvalidKey(child, knownKeys, returnFiber) {
36471    {
36472      if (typeof child !== 'object' || child === null) {
36473        return knownKeys;
36474      }
36475
36476      switch (child.$$typeof) {
36477        case REACT_ELEMENT_TYPE:
36478        case REACT_PORTAL_TYPE:
36479          warnForMissingKey(child, returnFiber);
36480          var key = child.key;
36481
36482          if (typeof key !== 'string') {
36483            break;
36484          }
36485
36486          if (knownKeys === null) {
36487            knownKeys = new Set();
36488            knownKeys.add(key);
36489            break;
36490          }
36491
36492          if (!knownKeys.has(key)) {
36493            knownKeys.add(key);
36494            break;
36495          }
36496
36497          error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
36498
36499          break;
36500      }
36501    }
36502
36503    return knownKeys;
36504  }
36505
36506  function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
36507    // This algorithm can't optimize by searching from both ends since we
36508    // don't have backpointers on fibers. I'm trying to see how far we can get
36509    // with that model. If it ends up not being worth the tradeoffs, we can
36510    // add it later.
36511    // Even with a two ended optimization, we'd want to optimize for the case
36512    // where there are few changes and brute force the comparison instead of
36513    // going for the Map. It'd like to explore hitting that path first in
36514    // forward-only mode and only go for the Map once we notice that we need
36515    // lots of look ahead. This doesn't handle reversal as well as two ended
36516    // search but that's unusual. Besides, for the two ended optimization to
36517    // work on Iterables, we'd need to copy the whole set.
36518    // In this first iteration, we'll just live with hitting the bad case
36519    // (adding everything to a Map) in for every insert/move.
36520    // If you change this code, also update reconcileChildrenIterator() which
36521    // uses the same algorithm.
36522    {
36523      // First, validate keys.
36524      var knownKeys = null;
36525
36526      for (var i = 0; i < newChildren.length; i++) {
36527        var child = newChildren[i];
36528        knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
36529      }
36530    }
36531
36532    var resultingFirstChild = null;
36533    var previousNewFiber = null;
36534    var oldFiber = currentFirstChild;
36535    var lastPlacedIndex = 0;
36536    var newIdx = 0;
36537    var nextOldFiber = null;
36538
36539    for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
36540      if (oldFiber.index > newIdx) {
36541        nextOldFiber = oldFiber;
36542        oldFiber = null;
36543      } else {
36544        nextOldFiber = oldFiber.sibling;
36545      }
36546
36547      var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);
36548
36549      if (newFiber === null) {
36550        // TODO: This breaks on empty slots like null children. That's
36551        // unfortunate because it triggers the slow path all the time. We need
36552        // a better way to communicate whether this was a miss or null,
36553        // boolean, undefined, etc.
36554        if (oldFiber === null) {
36555          oldFiber = nextOldFiber;
36556        }
36557
36558        break;
36559      }
36560
36561      if (shouldTrackSideEffects) {
36562        if (oldFiber && newFiber.alternate === null) {
36563          // We matched the slot, but we didn't reuse the existing fiber, so we
36564          // need to delete the existing child.
36565          deleteChild(returnFiber, oldFiber);
36566        }
36567      }
36568
36569      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
36570
36571      if (previousNewFiber === null) {
36572        // TODO: Move out of the loop. This only happens for the first run.
36573        resultingFirstChild = newFiber;
36574      } else {
36575        // TODO: Defer siblings if we're not at the right index for this slot.
36576        // I.e. if we had null values before, then we want to defer this
36577        // for each null value. However, we also don't want to call updateSlot
36578        // with the previous one.
36579        previousNewFiber.sibling = newFiber;
36580      }
36581
36582      previousNewFiber = newFiber;
36583      oldFiber = nextOldFiber;
36584    }
36585
36586    if (newIdx === newChildren.length) {
36587      // We've reached the end of the new children. We can delete the rest.
36588      deleteRemainingChildren(returnFiber, oldFiber);
36589      return resultingFirstChild;
36590    }
36591
36592    if (oldFiber === null) {
36593      // If we don't have any more existing children we can choose a fast path
36594      // since the rest will all be insertions.
36595      for (; newIdx < newChildren.length; newIdx++) {
36596        var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);
36597
36598        if (_newFiber === null) {
36599          continue;
36600        }
36601
36602        lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
36603
36604        if (previousNewFiber === null) {
36605          // TODO: Move out of the loop. This only happens for the first run.
36606          resultingFirstChild = _newFiber;
36607        } else {
36608          previousNewFiber.sibling = _newFiber;
36609        }
36610
36611        previousNewFiber = _newFiber;
36612      }
36613
36614      return resultingFirstChild;
36615    } // Add all children to a key map for quick lookups.
36616
36617
36618    var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
36619
36620    for (; newIdx < newChildren.length; newIdx++) {
36621      var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);
36622
36623      if (_newFiber2 !== null) {
36624        if (shouldTrackSideEffects) {
36625          if (_newFiber2.alternate !== null) {
36626            // The new fiber is a work in progress, but if there exists a
36627            // current, that means that we reused the fiber. We need to delete
36628            // it from the child list so that we don't add it to the deletion
36629            // list.
36630            existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
36631          }
36632        }
36633
36634        lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
36635
36636        if (previousNewFiber === null) {
36637          resultingFirstChild = _newFiber2;
36638        } else {
36639          previousNewFiber.sibling = _newFiber2;
36640        }
36641
36642        previousNewFiber = _newFiber2;
36643      }
36644    }
36645
36646    if (shouldTrackSideEffects) {
36647      // Any existing children that weren't consumed above were deleted. We need
36648      // to add them to the deletion list.
36649      existingChildren.forEach(function (child) {
36650        return deleteChild(returnFiber, child);
36651      });
36652    }
36653
36654    return resultingFirstChild;
36655  }
36656
36657  function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {
36658    // This is the same implementation as reconcileChildrenArray(),
36659    // but using the iterator instead.
36660    var iteratorFn = getIteratorFn(newChildrenIterable);
36661
36662    if (!(typeof iteratorFn === 'function')) {
36663      {
36664        throw Error( "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." );
36665      }
36666    }
36667
36668    {
36669      // We don't support rendering Generators because it's a mutation.
36670      // See https://github.com/facebook/react/issues/12995
36671      if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag
36672      newChildrenIterable[Symbol.toStringTag] === 'Generator') {
36673        if (!didWarnAboutGenerators) {
36674          error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');
36675        }
36676
36677        didWarnAboutGenerators = true;
36678      } // Warn about using Maps as children
36679
36680
36681      if (newChildrenIterable.entries === iteratorFn) {
36682        if (!didWarnAboutMaps) {
36683          error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
36684        }
36685
36686        didWarnAboutMaps = true;
36687      } // First, validate keys.
36688      // We'll get a different iterator later for the main pass.
36689
36690
36691      var _newChildren = iteratorFn.call(newChildrenIterable);
36692
36693      if (_newChildren) {
36694        var knownKeys = null;
36695
36696        var _step = _newChildren.next();
36697
36698        for (; !_step.done; _step = _newChildren.next()) {
36699          var child = _step.value;
36700          knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
36701        }
36702      }
36703    }
36704
36705    var newChildren = iteratorFn.call(newChildrenIterable);
36706
36707    if (!(newChildren != null)) {
36708      {
36709        throw Error( "An iterable object provided no iterator." );
36710      }
36711    }
36712
36713    var resultingFirstChild = null;
36714    var previousNewFiber = null;
36715    var oldFiber = currentFirstChild;
36716    var lastPlacedIndex = 0;
36717    var newIdx = 0;
36718    var nextOldFiber = null;
36719    var step = newChildren.next();
36720
36721    for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
36722      if (oldFiber.index > newIdx) {
36723        nextOldFiber = oldFiber;
36724        oldFiber = null;
36725      } else {
36726        nextOldFiber = oldFiber.sibling;
36727      }
36728
36729      var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
36730
36731      if (newFiber === null) {
36732        // TODO: This breaks on empty slots like null children. That's
36733        // unfortunate because it triggers the slow path all the time. We need
36734        // a better way to communicate whether this was a miss or null,
36735        // boolean, undefined, etc.
36736        if (oldFiber === null) {
36737          oldFiber = nextOldFiber;
36738        }
36739
36740        break;
36741      }
36742
36743      if (shouldTrackSideEffects) {
36744        if (oldFiber && newFiber.alternate === null) {
36745          // We matched the slot, but we didn't reuse the existing fiber, so we
36746          // need to delete the existing child.
36747          deleteChild(returnFiber, oldFiber);
36748        }
36749      }
36750
36751      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
36752
36753      if (previousNewFiber === null) {
36754        // TODO: Move out of the loop. This only happens for the first run.
36755        resultingFirstChild = newFiber;
36756      } else {
36757        // TODO: Defer siblings if we're not at the right index for this slot.
36758        // I.e. if we had null values before, then we want to defer this
36759        // for each null value. However, we also don't want to call updateSlot
36760        // with the previous one.
36761        previousNewFiber.sibling = newFiber;
36762      }
36763
36764      previousNewFiber = newFiber;
36765      oldFiber = nextOldFiber;
36766    }
36767
36768    if (step.done) {
36769      // We've reached the end of the new children. We can delete the rest.
36770      deleteRemainingChildren(returnFiber, oldFiber);
36771      return resultingFirstChild;
36772    }
36773
36774    if (oldFiber === null) {
36775      // If we don't have any more existing children we can choose a fast path
36776      // since the rest will all be insertions.
36777      for (; !step.done; newIdx++, step = newChildren.next()) {
36778        var _newFiber3 = createChild(returnFiber, step.value, lanes);
36779
36780        if (_newFiber3 === null) {
36781          continue;
36782        }
36783
36784        lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
36785
36786        if (previousNewFiber === null) {
36787          // TODO: Move out of the loop. This only happens for the first run.
36788          resultingFirstChild = _newFiber3;
36789        } else {
36790          previousNewFiber.sibling = _newFiber3;
36791        }
36792
36793        previousNewFiber = _newFiber3;
36794      }
36795
36796      return resultingFirstChild;
36797    } // Add all children to a key map for quick lookups.
36798
36799
36800    var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
36801
36802    for (; !step.done; newIdx++, step = newChildren.next()) {
36803      var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);
36804
36805      if (_newFiber4 !== null) {
36806        if (shouldTrackSideEffects) {
36807          if (_newFiber4.alternate !== null) {
36808            // The new fiber is a work in progress, but if there exists a
36809            // current, that means that we reused the fiber. We need to delete
36810            // it from the child list so that we don't add it to the deletion
36811            // list.
36812            existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
36813          }
36814        }
36815
36816        lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
36817
36818        if (previousNewFiber === null) {
36819          resultingFirstChild = _newFiber4;
36820        } else {
36821          previousNewFiber.sibling = _newFiber4;
36822        }
36823
36824        previousNewFiber = _newFiber4;
36825      }
36826    }
36827
36828    if (shouldTrackSideEffects) {
36829      // Any existing children that weren't consumed above were deleted. We need
36830      // to add them to the deletion list.
36831      existingChildren.forEach(function (child) {
36832        return deleteChild(returnFiber, child);
36833      });
36834    }
36835
36836    return resultingFirstChild;
36837  }
36838
36839  function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
36840    // There's no need to check for keys on text nodes since we don't have a
36841    // way to define them.
36842    if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
36843      // We already have an existing node so let's just update it and delete
36844      // the rest.
36845      deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
36846      var existing = useFiber(currentFirstChild, textContent);
36847      existing.return = returnFiber;
36848      return existing;
36849    } // The existing first child is not a text node so we need to create one
36850    // and delete the existing ones.
36851
36852
36853    deleteRemainingChildren(returnFiber, currentFirstChild);
36854    var created = createFiberFromText(textContent, returnFiber.mode, lanes);
36855    created.return = returnFiber;
36856    return created;
36857  }
36858
36859  function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
36860    var key = element.key;
36861    var child = currentFirstChild;
36862
36863    while (child !== null) {
36864      // TODO: If key === null and child.key === null, then this only applies to
36865      // the first item in the list.
36866      if (child.key === key) {
36867        switch (child.tag) {
36868          case Fragment:
36869            {
36870              if (element.type === REACT_FRAGMENT_TYPE) {
36871                deleteRemainingChildren(returnFiber, child.sibling);
36872                var existing = useFiber(child, element.props.children);
36873                existing.return = returnFiber;
36874
36875                {
36876                  existing._debugSource = element._source;
36877                  existing._debugOwner = element._owner;
36878                }
36879
36880                return existing;
36881              }
36882
36883              break;
36884            }
36885
36886          case Block:
36887
36888          // We intentionally fallthrough here if enableBlocksAPI is not on.
36889          // eslint-disable-next-lined no-fallthrough
36890
36891          default:
36892            {
36893              if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
36894               isCompatibleFamilyForHotReloading(child, element) )) {
36895                deleteRemainingChildren(returnFiber, child.sibling);
36896
36897                var _existing3 = useFiber(child, element.props);
36898
36899                _existing3.ref = coerceRef(returnFiber, child, element);
36900                _existing3.return = returnFiber;
36901
36902                {
36903                  _existing3._debugSource = element._source;
36904                  _existing3._debugOwner = element._owner;
36905                }
36906
36907                return _existing3;
36908              }
36909
36910              break;
36911            }
36912        } // Didn't match.
36913
36914
36915        deleteRemainingChildren(returnFiber, child);
36916        break;
36917      } else {
36918        deleteChild(returnFiber, child);
36919      }
36920
36921      child = child.sibling;
36922    }
36923
36924    if (element.type === REACT_FRAGMENT_TYPE) {
36925      var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);
36926      created.return = returnFiber;
36927      return created;
36928    } else {
36929      var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);
36930
36931      _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
36932      _created4.return = returnFiber;
36933      return _created4;
36934    }
36935  }
36936
36937  function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
36938    var key = portal.key;
36939    var child = currentFirstChild;
36940
36941    while (child !== null) {
36942      // TODO: If key === null and child.key === null, then this only applies to
36943      // the first item in the list.
36944      if (child.key === key) {
36945        if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
36946          deleteRemainingChildren(returnFiber, child.sibling);
36947          var existing = useFiber(child, portal.children || []);
36948          existing.return = returnFiber;
36949          return existing;
36950        } else {
36951          deleteRemainingChildren(returnFiber, child);
36952          break;
36953        }
36954      } else {
36955        deleteChild(returnFiber, child);
36956      }
36957
36958      child = child.sibling;
36959    }
36960
36961    var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
36962    created.return = returnFiber;
36963    return created;
36964  } // This API will tag the children with the side-effect of the reconciliation
36965  // itself. They will be added to the side-effect list as we pass through the
36966  // children and the parent.
36967
36968
36969  function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {
36970    // This function is not recursive.
36971    // If the top level item is an array, we treat it as a set of children,
36972    // not as a fragment. Nested arrays on the other hand will be treated as
36973    // fragment nodes. Recursion happens at the normal flow.
36974    // Handle top level unkeyed fragments as if they were arrays.
36975    // This leads to an ambiguity between <>{[...]}</> and <>...</>.
36976    // We treat the ambiguous cases above the same.
36977    var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
36978
36979    if (isUnkeyedTopLevelFragment) {
36980      newChild = newChild.props.children;
36981    } // Handle object types
36982
36983
36984    var isObject = typeof newChild === 'object' && newChild !== null;
36985
36986    if (isObject) {
36987      switch (newChild.$$typeof) {
36988        case REACT_ELEMENT_TYPE:
36989          return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));
36990
36991        case REACT_PORTAL_TYPE:
36992          return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));
36993
36994      }
36995    }
36996
36997    if (typeof newChild === 'string' || typeof newChild === 'number') {
36998      return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));
36999    }
37000
37001    if (isArray$1(newChild)) {
37002      return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
37003    }
37004
37005    if (getIteratorFn(newChild)) {
37006      return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);
37007    }
37008
37009    if (isObject) {
37010      throwOnInvalidObjectType(returnFiber, newChild);
37011    }
37012
37013    {
37014      if (typeof newChild === 'function') {
37015        warnOnFunctionType(returnFiber);
37016      }
37017    }
37018
37019    if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
37020      // If the new child is undefined, and the return fiber is a composite
37021      // component, throw an error. If Fiber return types are disabled,
37022      // we already threw above.
37023      switch (returnFiber.tag) {
37024        case ClassComponent:
37025          {
37026            {
37027              var instance = returnFiber.stateNode;
37028
37029              if (instance.render._isMockFunction) {
37030                // We allow auto-mocks to proceed as if they're returning null.
37031                break;
37032              }
37033            }
37034          }
37035        // Intentionally fall through to the next case, which handles both
37036        // functions and classes
37037        // eslint-disable-next-lined no-fallthrough
37038
37039        case Block:
37040        case FunctionComponent:
37041        case ForwardRef:
37042        case SimpleMemoComponent:
37043          {
37044            {
37045              {
37046                throw Error( (getComponentName(returnFiber.type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
37047              }
37048            }
37049          }
37050      }
37051    } // Remaining cases are all treated as empty.
37052
37053
37054    return deleteRemainingChildren(returnFiber, currentFirstChild);
37055  }
37056
37057  return reconcileChildFibers;
37058}
37059
37060var reconcileChildFibers = ChildReconciler(true);
37061var mountChildFibers = ChildReconciler(false);
37062function cloneChildFibers(current, workInProgress) {
37063  if (!(current === null || workInProgress.child === current.child)) {
37064    {
37065      throw Error( "Resuming work not yet implemented." );
37066    }
37067  }
37068
37069  if (workInProgress.child === null) {
37070    return;
37071  }
37072
37073  var currentChild = workInProgress.child;
37074  var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
37075  workInProgress.child = newChild;
37076  newChild.return = workInProgress;
37077
37078  while (currentChild.sibling !== null) {
37079    currentChild = currentChild.sibling;
37080    newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);
37081    newChild.return = workInProgress;
37082  }
37083
37084  newChild.sibling = null;
37085} // Reset a workInProgress child set to prepare it for a second pass.
37086
37087function resetChildFibers(workInProgress, lanes) {
37088  var child = workInProgress.child;
37089
37090  while (child !== null) {
37091    resetWorkInProgress(child, lanes);
37092    child = child.sibling;
37093  }
37094}
37095
37096var NO_CONTEXT = {};
37097var contextStackCursor$1 = createCursor(NO_CONTEXT);
37098var contextFiberStackCursor = createCursor(NO_CONTEXT);
37099var rootInstanceStackCursor = createCursor(NO_CONTEXT);
37100
37101function requiredContext(c) {
37102  if (!(c !== NO_CONTEXT)) {
37103    {
37104      throw Error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." );
37105    }
37106  }
37107
37108  return c;
37109}
37110
37111function getRootHostContainer() {
37112  var rootInstance = requiredContext(rootInstanceStackCursor.current);
37113  return rootInstance;
37114}
37115
37116function pushHostContainer(fiber, nextRootInstance) {
37117  // Push current root instance onto the stack;
37118  // This allows us to reset root when portals are popped.
37119  push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.
37120  // This enables us to pop only Fibers that provide unique contexts.
37121
37122  push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.
37123  // However, we can't just call getRootHostContext() and push it because
37124  // we'd have a different number of entries on the stack depending on
37125  // whether getRootHostContext() throws somewhere in renderer code or not.
37126  // So we push an empty value first. This lets us safely unwind on errors.
37127
37128  push(contextStackCursor$1, NO_CONTEXT, fiber);
37129  var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.
37130
37131  pop(contextStackCursor$1, fiber);
37132  push(contextStackCursor$1, nextRootContext, fiber);
37133}
37134
37135function popHostContainer(fiber) {
37136  pop(contextStackCursor$1, fiber);
37137  pop(contextFiberStackCursor, fiber);
37138  pop(rootInstanceStackCursor, fiber);
37139}
37140
37141function getHostContext() {
37142  var context = requiredContext(contextStackCursor$1.current);
37143  return context;
37144}
37145
37146function pushHostContext(fiber) {
37147  var rootInstance = requiredContext(rootInstanceStackCursor.current);
37148  var context = requiredContext(contextStackCursor$1.current);
37149  var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
37150
37151  if (context === nextContext) {
37152    return;
37153  } // Track the context and the Fiber that provided it.
37154  // This enables us to pop only Fibers that provide unique contexts.
37155
37156
37157  push(contextFiberStackCursor, fiber, fiber);
37158  push(contextStackCursor$1, nextContext, fiber);
37159}
37160
37161function popHostContext(fiber) {
37162  // Do not pop unless this Fiber provided the current context.
37163  // pushHostContext() only pushes Fibers that provide unique contexts.
37164  if (contextFiberStackCursor.current !== fiber) {
37165    return;
37166  }
37167
37168  pop(contextStackCursor$1, fiber);
37169  pop(contextFiberStackCursor, fiber);
37170}
37171
37172var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is
37173// inherited deeply down the subtree. The upper bits only affect
37174// this immediate suspense boundary and gets reset each new
37175// boundary or suspense list.
37176
37177var SubtreeSuspenseContextMask = 1; // Subtree Flags:
37178// InvisibleParentSuspenseContext indicates that one of our parent Suspense
37179// boundaries is not currently showing visible main content.
37180// Either because it is already showing a fallback or is not mounted at all.
37181// We can use this to determine if it is desirable to trigger a fallback at
37182// the parent. If not, then we might need to trigger undesirable boundaries
37183// and/or suspend the commit to avoid hiding the parent content.
37184
37185var InvisibleParentSuspenseContext = 1; // Shallow Flags:
37186// ForceSuspenseFallback can be used by SuspenseList to force newly added
37187// items into their fallback state during one of the render passes.
37188
37189var ForceSuspenseFallback = 2;
37190var suspenseStackCursor = createCursor(DefaultSuspenseContext);
37191function hasSuspenseContext(parentContext, flag) {
37192  return (parentContext & flag) !== 0;
37193}
37194function setDefaultShallowSuspenseContext(parentContext) {
37195  return parentContext & SubtreeSuspenseContextMask;
37196}
37197function setShallowSuspenseContext(parentContext, shallowContext) {
37198  return parentContext & SubtreeSuspenseContextMask | shallowContext;
37199}
37200function addSubtreeSuspenseContext(parentContext, subtreeContext) {
37201  return parentContext | subtreeContext;
37202}
37203function pushSuspenseContext(fiber, newContext) {
37204  push(suspenseStackCursor, newContext, fiber);
37205}
37206function popSuspenseContext(fiber) {
37207  pop(suspenseStackCursor, fiber);
37208}
37209
37210function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
37211  // If it was the primary children that just suspended, capture and render the
37212  // fallback. Otherwise, don't capture and bubble to the next boundary.
37213  var nextState = workInProgress.memoizedState;
37214
37215  if (nextState !== null) {
37216    if (nextState.dehydrated !== null) {
37217      // A dehydrated boundary always captures.
37218      return true;
37219    }
37220
37221    return false;
37222  }
37223
37224  var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.
37225
37226  if (props.fallback === undefined) {
37227    return false;
37228  } // Regular boundaries always capture.
37229
37230
37231  if (props.unstable_avoidThisFallback !== true) {
37232    return true;
37233  } // If it's a boundary we should avoid, then we prefer to bubble up to the
37234  // parent boundary if it is currently invisible.
37235
37236
37237  if (hasInvisibleParent) {
37238    return false;
37239  } // If the parent is not able to handle it, we must handle it.
37240
37241
37242  return true;
37243}
37244function findFirstSuspended(row) {
37245  var node = row;
37246
37247  while (node !== null) {
37248    if (node.tag === SuspenseComponent) {
37249      var state = node.memoizedState;
37250
37251      if (state !== null) {
37252        var dehydrated = state.dehydrated;
37253
37254        if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {
37255          return node;
37256        }
37257      }
37258    } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
37259    // keep track of whether it suspended or not.
37260    node.memoizedProps.revealOrder !== undefined) {
37261      var didSuspend = (node.flags & DidCapture) !== NoFlags;
37262
37263      if (didSuspend) {
37264        return node;
37265      }
37266    } else if (node.child !== null) {
37267      node.child.return = node;
37268      node = node.child;
37269      continue;
37270    }
37271
37272    if (node === row) {
37273      return null;
37274    }
37275
37276    while (node.sibling === null) {
37277      if (node.return === null || node.return === row) {
37278        return null;
37279      }
37280
37281      node = node.return;
37282    }
37283
37284    node.sibling.return = node.return;
37285    node = node.sibling;
37286  }
37287
37288  return null;
37289}
37290
37291var NoFlags$1 =
37292/*  */
372930; // Represents whether effect should fire.
37294
37295var HasEffect =
37296/* */
372971; // Represents the phase in which the effect (not the clean-up) fires.
37298
37299var Layout =
37300/*    */
373012;
37302var Passive$1 =
37303/*   */
373044;
37305
37306// This may have been an insertion or a hydration.
37307
37308var hydrationParentFiber = null;
37309var nextHydratableInstance = null;
37310var isHydrating = false;
37311
37312function enterHydrationState(fiber) {
37313
37314  var parentInstance = fiber.stateNode.containerInfo;
37315  nextHydratableInstance = getFirstHydratableChild(parentInstance);
37316  hydrationParentFiber = fiber;
37317  isHydrating = true;
37318  return true;
37319}
37320
37321function deleteHydratableInstance(returnFiber, instance) {
37322  {
37323    switch (returnFiber.tag) {
37324      case HostRoot:
37325        didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
37326        break;
37327
37328      case HostComponent:
37329        didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
37330        break;
37331    }
37332  }
37333
37334  var childToDelete = createFiberFromHostInstanceForDeletion();
37335  childToDelete.stateNode = instance;
37336  childToDelete.return = returnFiber;
37337  childToDelete.flags = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,
37338  // these children are not part of the reconciliation list of children.
37339  // Even if we abort and rereconcile the children, that will try to hydrate
37340  // again and the nodes are still in the host tree so these will be
37341  // recreated.
37342
37343  if (returnFiber.lastEffect !== null) {
37344    returnFiber.lastEffect.nextEffect = childToDelete;
37345    returnFiber.lastEffect = childToDelete;
37346  } else {
37347    returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
37348  }
37349}
37350
37351function insertNonHydratedInstance(returnFiber, fiber) {
37352  fiber.flags = fiber.flags & ~Hydrating | Placement;
37353
37354  {
37355    switch (returnFiber.tag) {
37356      case HostRoot:
37357        {
37358          var parentContainer = returnFiber.stateNode.containerInfo;
37359
37360          switch (fiber.tag) {
37361            case HostComponent:
37362              var type = fiber.type;
37363              var props = fiber.pendingProps;
37364              didNotFindHydratableContainerInstance(parentContainer, type);
37365              break;
37366
37367            case HostText:
37368              var text = fiber.pendingProps;
37369              didNotFindHydratableContainerTextInstance(parentContainer, text);
37370              break;
37371          }
37372
37373          break;
37374        }
37375
37376      case HostComponent:
37377        {
37378          var parentType = returnFiber.type;
37379          var parentProps = returnFiber.memoizedProps;
37380          var parentInstance = returnFiber.stateNode;
37381
37382          switch (fiber.tag) {
37383            case HostComponent:
37384              var _type = fiber.type;
37385              var _props = fiber.pendingProps;
37386              didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
37387              break;
37388
37389            case HostText:
37390              var _text = fiber.pendingProps;
37391              didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
37392              break;
37393
37394            case SuspenseComponent:
37395              didNotFindHydratableSuspenseInstance(parentType, parentProps);
37396              break;
37397          }
37398
37399          break;
37400        }
37401
37402      default:
37403        return;
37404    }
37405  }
37406}
37407
37408function tryHydrate(fiber, nextInstance) {
37409  switch (fiber.tag) {
37410    case HostComponent:
37411      {
37412        var type = fiber.type;
37413        var props = fiber.pendingProps;
37414        var instance = canHydrateInstance(nextInstance, type);
37415
37416        if (instance !== null) {
37417          fiber.stateNode = instance;
37418          return true;
37419        }
37420
37421        return false;
37422      }
37423
37424    case HostText:
37425      {
37426        var text = fiber.pendingProps;
37427        var textInstance = canHydrateTextInstance(nextInstance, text);
37428
37429        if (textInstance !== null) {
37430          fiber.stateNode = textInstance;
37431          return true;
37432        }
37433
37434        return false;
37435      }
37436
37437    case SuspenseComponent:
37438      {
37439
37440        return false;
37441      }
37442
37443    default:
37444      return false;
37445  }
37446}
37447
37448function tryToClaimNextHydratableInstance(fiber) {
37449  if (!isHydrating) {
37450    return;
37451  }
37452
37453  var nextInstance = nextHydratableInstance;
37454
37455  if (!nextInstance) {
37456    // Nothing to hydrate. Make it an insertion.
37457    insertNonHydratedInstance(hydrationParentFiber, fiber);
37458    isHydrating = false;
37459    hydrationParentFiber = fiber;
37460    return;
37461  }
37462
37463  var firstAttemptedInstance = nextInstance;
37464
37465  if (!tryHydrate(fiber, nextInstance)) {
37466    // If we can't hydrate this instance let's try the next one.
37467    // We use this as a heuristic. It's based on intuition and not data so it
37468    // might be flawed or unnecessary.
37469    nextInstance = getNextHydratableSibling(firstAttemptedInstance);
37470
37471    if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
37472      // Nothing to hydrate. Make it an insertion.
37473      insertNonHydratedInstance(hydrationParentFiber, fiber);
37474      isHydrating = false;
37475      hydrationParentFiber = fiber;
37476      return;
37477    } // We matched the next one, we'll now assume that the first one was
37478    // superfluous and we'll delete it. Since we can't eagerly delete it
37479    // we'll have to schedule a deletion. To do that, this node needs a dummy
37480    // fiber associated with it.
37481
37482
37483    deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
37484  }
37485
37486  hydrationParentFiber = fiber;
37487  nextHydratableInstance = getFirstHydratableChild(nextInstance);
37488}
37489
37490function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
37491
37492  var instance = fiber.stateNode;
37493  var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.
37494
37495  fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
37496  // is a new ref we mark this as an update.
37497
37498  if (updatePayload !== null) {
37499    return true;
37500  }
37501
37502  return false;
37503}
37504
37505function prepareToHydrateHostTextInstance(fiber) {
37506
37507  var textInstance = fiber.stateNode;
37508  var textContent = fiber.memoizedProps;
37509  var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
37510
37511  {
37512    if (shouldUpdate) {
37513      // We assume that prepareToHydrateHostTextInstance is called in a context where the
37514      // hydration parent is the parent host component of this host text.
37515      var returnFiber = hydrationParentFiber;
37516
37517      if (returnFiber !== null) {
37518        switch (returnFiber.tag) {
37519          case HostRoot:
37520            {
37521              var parentContainer = returnFiber.stateNode.containerInfo;
37522              didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
37523              break;
37524            }
37525
37526          case HostComponent:
37527            {
37528              var parentType = returnFiber.type;
37529              var parentProps = returnFiber.memoizedProps;
37530              var parentInstance = returnFiber.stateNode;
37531              didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
37532              break;
37533            }
37534        }
37535      }
37536    }
37537  }
37538
37539  return shouldUpdate;
37540}
37541
37542function skipPastDehydratedSuspenseInstance(fiber) {
37543
37544  var suspenseState = fiber.memoizedState;
37545  var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
37546
37547  if (!suspenseInstance) {
37548    {
37549      throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
37550    }
37551  }
37552
37553  return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
37554}
37555
37556function popToNextHostParent(fiber) {
37557  var parent = fiber.return;
37558
37559  while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
37560    parent = parent.return;
37561  }
37562
37563  hydrationParentFiber = parent;
37564}
37565
37566function popHydrationState(fiber) {
37567
37568  if (fiber !== hydrationParentFiber) {
37569    // We're deeper than the current hydration context, inside an inserted
37570    // tree.
37571    return false;
37572  }
37573
37574  if (!isHydrating) {
37575    // If we're not currently hydrating but we're in a hydration context, then
37576    // we were an insertion and now need to pop up reenter hydration of our
37577    // siblings.
37578    popToNextHostParent(fiber);
37579    isHydrating = true;
37580    return false;
37581  }
37582
37583  var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.
37584  // We only do this deeper than head and body since they tend to have random
37585  // other nodes in them. We also ignore components with pure text content in
37586  // side of them.
37587  // TODO: Better heuristic.
37588
37589  if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
37590    var nextInstance = nextHydratableInstance;
37591
37592    while (nextInstance) {
37593      deleteHydratableInstance(fiber, nextInstance);
37594      nextInstance = getNextHydratableSibling(nextInstance);
37595    }
37596  }
37597
37598  popToNextHostParent(fiber);
37599
37600  if (fiber.tag === SuspenseComponent) {
37601    nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
37602  } else {
37603    nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
37604  }
37605
37606  return true;
37607}
37608
37609function resetHydrationState() {
37610
37611  hydrationParentFiber = null;
37612  nextHydratableInstance = null;
37613  isHydrating = false;
37614}
37615
37616function getIsHydrating() {
37617  return isHydrating;
37618}
37619
37620// and should be reset before starting a new render.
37621// This tracks which mutable sources need to be reset after a render.
37622
37623var workInProgressSources = [];
37624var rendererSigil$1;
37625
37626{
37627  // Used to detect multiple renderers using the same mutable source.
37628  rendererSigil$1 = {};
37629}
37630
37631function markSourceAsDirty(mutableSource) {
37632  workInProgressSources.push(mutableSource);
37633}
37634function resetWorkInProgressVersions() {
37635  for (var i = 0; i < workInProgressSources.length; i++) {
37636    var mutableSource = workInProgressSources[i];
37637
37638    {
37639      mutableSource._workInProgressVersionPrimary = null;
37640    }
37641  }
37642
37643  workInProgressSources.length = 0;
37644}
37645function getWorkInProgressVersion(mutableSource) {
37646  {
37647    return mutableSource._workInProgressVersionPrimary;
37648  }
37649}
37650function setWorkInProgressVersion(mutableSource, version) {
37651  {
37652    mutableSource._workInProgressVersionPrimary = version;
37653  }
37654
37655  workInProgressSources.push(mutableSource);
37656}
37657function warnAboutMultipleRenderersDEV(mutableSource) {
37658  {
37659    {
37660      if (mutableSource._currentPrimaryRenderer == null) {
37661        mutableSource._currentPrimaryRenderer = rendererSigil$1;
37662      } else if (mutableSource._currentPrimaryRenderer !== rendererSigil$1) {
37663        error('Detected multiple renderers concurrently rendering the ' + 'same mutable source. This is currently unsupported.');
37664      }
37665    }
37666  }
37667} // Eager reads the version of a mutable source and stores it on the root.
37668
37669var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
37670    ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
37671var didWarnAboutMismatchedHooksForComponent;
37672var didWarnAboutUseOpaqueIdentifier;
37673
37674{
37675  didWarnAboutUseOpaqueIdentifier = {};
37676  didWarnAboutMismatchedHooksForComponent = new Set();
37677}
37678
37679// These are set right before calling the component.
37680var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
37681// the work-in-progress hook.
37682
37683var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The
37684// current hook list is the list that belongs to the current fiber. The
37685// work-in-progress hook list is a new list that will be added to the
37686// work-in-progress fiber.
37687
37688var currentHook = null;
37689var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This
37690// does not get reset if we do another render pass; only when we're completely
37691// finished evaluating this component. This is an optimization so we know
37692// whether we need to clear render phase updates after a throw.
37693
37694var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This
37695// gets reset after each attempt.
37696// TODO: Maybe there's some way to consolidate this with
37697// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.
37698
37699var didScheduleRenderPhaseUpdateDuringThisPass = false;
37700var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook
37701
37702var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.
37703// The list stores the order of hooks used during the initial render (mount).
37704// Subsequent renders (updates) reference this list.
37705
37706var hookTypesDev = null;
37707var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore
37708// the dependencies for Hooks that need them (e.g. useEffect or useMemo).
37709// When true, such Hooks will always be "remounted". Only used during hot reload.
37710
37711var ignorePreviousDependencies = false;
37712
37713function mountHookTypesDev() {
37714  {
37715    var hookName = currentHookNameInDev;
37716
37717    if (hookTypesDev === null) {
37718      hookTypesDev = [hookName];
37719    } else {
37720      hookTypesDev.push(hookName);
37721    }
37722  }
37723}
37724
37725function updateHookTypesDev() {
37726  {
37727    var hookName = currentHookNameInDev;
37728
37729    if (hookTypesDev !== null) {
37730      hookTypesUpdateIndexDev++;
37731
37732      if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
37733        warnOnHookMismatchInDev(hookName);
37734      }
37735    }
37736  }
37737}
37738
37739function checkDepsAreArrayDev(deps) {
37740  {
37741    if (deps !== undefined && deps !== null && !Array.isArray(deps)) {
37742      // Verify deps, but only on mount to avoid extra checks.
37743      // It's unlikely their type would change as usually you define them inline.
37744      error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);
37745    }
37746  }
37747}
37748
37749function warnOnHookMismatchInDev(currentHookName) {
37750  {
37751    var componentName = getComponentName(currentlyRenderingFiber$1.type);
37752
37753    if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
37754      didWarnAboutMismatchedHooksForComponent.add(componentName);
37755
37756      if (hookTypesDev !== null) {
37757        var table = '';
37758        var secondColumnStart = 30;
37759
37760        for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
37761          var oldHookName = hookTypesDev[i];
37762          var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;
37763          var row = i + 1 + ". " + oldHookName; // Extra space so second column lines up
37764          // lol @ IE not supporting String#repeat
37765
37766          while (row.length < secondColumnStart) {
37767            row += ' ';
37768          }
37769
37770          row += newHookName + '\n';
37771          table += row;
37772        }
37773
37774        error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + '   Previous render            Next render\n' + '   ------------------------------------------------------\n' + '%s' + '   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
37775      }
37776    }
37777  }
37778}
37779
37780function throwInvalidHookError() {
37781  {
37782    {
37783      throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
37784    }
37785  }
37786}
37787
37788function areHookInputsEqual(nextDeps, prevDeps) {
37789  {
37790    if (ignorePreviousDependencies) {
37791      // Only true when this component is being hot reloaded.
37792      return false;
37793    }
37794  }
37795
37796  if (prevDeps === null) {
37797    {
37798      error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
37799    }
37800
37801    return false;
37802  }
37803
37804  {
37805    // Don't bother comparing lengths in prod because these arrays should be
37806    // passed inline.
37807    if (nextDeps.length !== prevDeps.length) {
37808      error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + prevDeps.join(', ') + "]", "[" + nextDeps.join(', ') + "]");
37809    }
37810  }
37811
37812  for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
37813    if (objectIs(nextDeps[i], prevDeps[i])) {
37814      continue;
37815    }
37816
37817    return false;
37818  }
37819
37820  return true;
37821}
37822
37823function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {
37824  renderLanes = nextRenderLanes;
37825  currentlyRenderingFiber$1 = workInProgress;
37826
37827  {
37828    hookTypesDev = current !== null ? current._debugHookTypes : null;
37829    hookTypesUpdateIndexDev = -1; // Used for hot reloading:
37830
37831    ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;
37832  }
37833
37834  workInProgress.memoizedState = null;
37835  workInProgress.updateQueue = null;
37836  workInProgress.lanes = NoLanes; // The following should have already been reset
37837  // currentHook = null;
37838  // workInProgressHook = null;
37839  // didScheduleRenderPhaseUpdate = false;
37840  // TODO Warn if no hooks are used at all during mount, then some are used during update.
37841  // Currently we will identify the update render as a mount because memoizedState === null.
37842  // This is tricky because it's valid for certain types of components (e.g. React.lazy)
37843  // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.
37844  // Non-stateful hooks (e.g. context) don't get added to memoizedState,
37845  // so memoizedState would be null during updates and mounts.
37846
37847  {
37848    if (current !== null && current.memoizedState !== null) {
37849      ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;
37850    } else if (hookTypesDev !== null) {
37851      // This dispatcher handles an edge case where a component is updating,
37852      // but no stateful hooks have been used.
37853      // We want to match the production code behavior (which will use HooksDispatcherOnMount),
37854      // but with the extra DEV validation to ensure hooks ordering hasn't changed.
37855      // This dispatcher does that.
37856      ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;
37857    } else {
37858      ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
37859    }
37860  }
37861
37862  var children = Component(props, secondArg); // Check if there was a render phase update
37863
37864  if (didScheduleRenderPhaseUpdateDuringThisPass) {
37865    // Keep rendering in a loop for as long as render phase updates continue to
37866    // be scheduled. Use a counter to prevent infinite loops.
37867    var numberOfReRenders = 0;
37868
37869    do {
37870      didScheduleRenderPhaseUpdateDuringThisPass = false;
37871
37872      if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
37873        {
37874          throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
37875        }
37876      }
37877
37878      numberOfReRenders += 1;
37879
37880      {
37881        // Even when hot reloading, allow dependencies to stabilize
37882        // after first render to prevent infinite render phase updates.
37883        ignorePreviousDependencies = false;
37884      } // Start over from the beginning of the list
37885
37886
37887      currentHook = null;
37888      workInProgressHook = null;
37889      workInProgress.updateQueue = null;
37890
37891      {
37892        // Also validate hook order for cascading updates.
37893        hookTypesUpdateIndexDev = -1;
37894      }
37895
37896      ReactCurrentDispatcher$1.current =  HooksDispatcherOnRerenderInDEV ;
37897      children = Component(props, secondArg);
37898    } while (didScheduleRenderPhaseUpdateDuringThisPass);
37899  } // We can assume the previous dispatcher is always this one, since we set it
37900  // at the beginning of the render phase and there's no re-entrancy.
37901
37902
37903  ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
37904
37905  {
37906    workInProgress._debugHookTypes = hookTypesDev;
37907  } // This check uses currentHook so that it works the same in DEV and prod bundles.
37908  // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.
37909
37910
37911  var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
37912  renderLanes = NoLanes;
37913  currentlyRenderingFiber$1 = null;
37914  currentHook = null;
37915  workInProgressHook = null;
37916
37917  {
37918    currentHookNameInDev = null;
37919    hookTypesDev = null;
37920    hookTypesUpdateIndexDev = -1;
37921  }
37922
37923  didScheduleRenderPhaseUpdate = false;
37924
37925  if (!!didRenderTooFewHooks) {
37926    {
37927      throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." );
37928    }
37929  }
37930
37931  return children;
37932}
37933function bailoutHooks(current, workInProgress, lanes) {
37934  workInProgress.updateQueue = current.updateQueue;
37935  workInProgress.flags &= ~(Passive | Update);
37936  current.lanes = removeLanes(current.lanes, lanes);
37937}
37938function resetHooksAfterThrow() {
37939  // We can assume the previous dispatcher is always this one, since we set it
37940  // at the beginning of the render phase and there's no re-entrancy.
37941  ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
37942
37943  if (didScheduleRenderPhaseUpdate) {
37944    // There were render phase updates. These are only valid for this render
37945    // phase, which we are now aborting. Remove the updates from the queues so
37946    // they do not persist to the next render. Do not remove updates from hooks
37947    // that weren't processed.
37948    //
37949    // Only reset the updates from the queue if it has a clone. If it does
37950    // not have a clone, that means it wasn't processed, and the updates were
37951    // scheduled before we entered the render phase.
37952    var hook = currentlyRenderingFiber$1.memoizedState;
37953
37954    while (hook !== null) {
37955      var queue = hook.queue;
37956
37957      if (queue !== null) {
37958        queue.pending = null;
37959      }
37960
37961      hook = hook.next;
37962    }
37963
37964    didScheduleRenderPhaseUpdate = false;
37965  }
37966
37967  renderLanes = NoLanes;
37968  currentlyRenderingFiber$1 = null;
37969  currentHook = null;
37970  workInProgressHook = null;
37971
37972  {
37973    hookTypesDev = null;
37974    hookTypesUpdateIndexDev = -1;
37975    currentHookNameInDev = null;
37976    isUpdatingOpaqueValueInRenderPhase = false;
37977  }
37978
37979  didScheduleRenderPhaseUpdateDuringThisPass = false;
37980}
37981
37982function mountWorkInProgressHook() {
37983  var hook = {
37984    memoizedState: null,
37985    baseState: null,
37986    baseQueue: null,
37987    queue: null,
37988    next: null
37989  };
37990
37991  if (workInProgressHook === null) {
37992    // This is the first hook in the list
37993    currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;
37994  } else {
37995    // Append to the end of the list
37996    workInProgressHook = workInProgressHook.next = hook;
37997  }
37998
37999  return workInProgressHook;
38000}
38001
38002function updateWorkInProgressHook() {
38003  // This function is used both for updates and for re-renders triggered by a
38004  // render phase update. It assumes there is either a current hook we can
38005  // clone, or a work-in-progress hook from a previous render pass that we can
38006  // use as a base. When we reach the end of the base list, we must switch to
38007  // the dispatcher used for mounts.
38008  var nextCurrentHook;
38009
38010  if (currentHook === null) {
38011    var current = currentlyRenderingFiber$1.alternate;
38012
38013    if (current !== null) {
38014      nextCurrentHook = current.memoizedState;
38015    } else {
38016      nextCurrentHook = null;
38017    }
38018  } else {
38019    nextCurrentHook = currentHook.next;
38020  }
38021
38022  var nextWorkInProgressHook;
38023
38024  if (workInProgressHook === null) {
38025    nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;
38026  } else {
38027    nextWorkInProgressHook = workInProgressHook.next;
38028  }
38029
38030  if (nextWorkInProgressHook !== null) {
38031    // There's already a work-in-progress. Reuse it.
38032    workInProgressHook = nextWorkInProgressHook;
38033    nextWorkInProgressHook = workInProgressHook.next;
38034    currentHook = nextCurrentHook;
38035  } else {
38036    // Clone from the current hook.
38037    if (!(nextCurrentHook !== null)) {
38038      {
38039        throw Error( "Rendered more hooks than during the previous render." );
38040      }
38041    }
38042
38043    currentHook = nextCurrentHook;
38044    var newHook = {
38045      memoizedState: currentHook.memoizedState,
38046      baseState: currentHook.baseState,
38047      baseQueue: currentHook.baseQueue,
38048      queue: currentHook.queue,
38049      next: null
38050    };
38051
38052    if (workInProgressHook === null) {
38053      // This is the first hook in the list.
38054      currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;
38055    } else {
38056      // Append to the end of the list.
38057      workInProgressHook = workInProgressHook.next = newHook;
38058    }
38059  }
38060
38061  return workInProgressHook;
38062}
38063
38064function createFunctionComponentUpdateQueue() {
38065  return {
38066    lastEffect: null
38067  };
38068}
38069
38070function basicStateReducer(state, action) {
38071  // $FlowFixMe: Flow doesn't like mixed types
38072  return typeof action === 'function' ? action(state) : action;
38073}
38074
38075function mountReducer(reducer, initialArg, init) {
38076  var hook = mountWorkInProgressHook();
38077  var initialState;
38078
38079  if (init !== undefined) {
38080    initialState = init(initialArg);
38081  } else {
38082    initialState = initialArg;
38083  }
38084
38085  hook.memoizedState = hook.baseState = initialState;
38086  var queue = hook.queue = {
38087    pending: null,
38088    dispatch: null,
38089    lastRenderedReducer: reducer,
38090    lastRenderedState: initialState
38091  };
38092  var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
38093  return [hook.memoizedState, dispatch];
38094}
38095
38096function updateReducer(reducer, initialArg, init) {
38097  var hook = updateWorkInProgressHook();
38098  var queue = hook.queue;
38099
38100  if (!(queue !== null)) {
38101    {
38102      throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
38103    }
38104  }
38105
38106  queue.lastRenderedReducer = reducer;
38107  var current = currentHook; // The last rebase update that is NOT part of the base state.
38108
38109  var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.
38110
38111  var pendingQueue = queue.pending;
38112
38113  if (pendingQueue !== null) {
38114    // We have new updates that haven't been processed yet.
38115    // We'll add them to the base queue.
38116    if (baseQueue !== null) {
38117      // Merge the pending queue and the base queue.
38118      var baseFirst = baseQueue.next;
38119      var pendingFirst = pendingQueue.next;
38120      baseQueue.next = pendingFirst;
38121      pendingQueue.next = baseFirst;
38122    }
38123
38124    {
38125      if (current.baseQueue !== baseQueue) {
38126        // Internal invariant that should never happen, but feasibly could in
38127        // the future if we implement resuming, or some form of that.
38128        error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');
38129      }
38130    }
38131
38132    current.baseQueue = baseQueue = pendingQueue;
38133    queue.pending = null;
38134  }
38135
38136  if (baseQueue !== null) {
38137    // We have a queue to process.
38138    var first = baseQueue.next;
38139    var newState = current.baseState;
38140    var newBaseState = null;
38141    var newBaseQueueFirst = null;
38142    var newBaseQueueLast = null;
38143    var update = first;
38144
38145    do {
38146      var updateLane = update.lane;
38147
38148      if (!isSubsetOfLanes(renderLanes, updateLane)) {
38149        // Priority is insufficient. Skip this update. If this is the first
38150        // skipped update, the previous update/state is the new base
38151        // update/state.
38152        var clone = {
38153          lane: updateLane,
38154          action: update.action,
38155          eagerReducer: update.eagerReducer,
38156          eagerState: update.eagerState,
38157          next: null
38158        };
38159
38160        if (newBaseQueueLast === null) {
38161          newBaseQueueFirst = newBaseQueueLast = clone;
38162          newBaseState = newState;
38163        } else {
38164          newBaseQueueLast = newBaseQueueLast.next = clone;
38165        } // Update the remaining priority in the queue.
38166        // TODO: Don't need to accumulate this. Instead, we can remove
38167        // renderLanes from the original lanes.
38168
38169
38170        currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);
38171        markSkippedUpdateLanes(updateLane);
38172      } else {
38173        // This update does have sufficient priority.
38174        if (newBaseQueueLast !== null) {
38175          var _clone = {
38176            // This update is going to be committed so we never want uncommit
38177            // it. Using NoLane works because 0 is a subset of all bitmasks, so
38178            // this will never be skipped by the check above.
38179            lane: NoLane,
38180            action: update.action,
38181            eagerReducer: update.eagerReducer,
38182            eagerState: update.eagerState,
38183            next: null
38184          };
38185          newBaseQueueLast = newBaseQueueLast.next = _clone;
38186        } // Process this update.
38187
38188
38189        if (update.eagerReducer === reducer) {
38190          // If this update was processed eagerly, and its reducer matches the
38191          // current reducer, we can use the eagerly computed state.
38192          newState = update.eagerState;
38193        } else {
38194          var action = update.action;
38195          newState = reducer(newState, action);
38196        }
38197      }
38198
38199      update = update.next;
38200    } while (update !== null && update !== first);
38201
38202    if (newBaseQueueLast === null) {
38203      newBaseState = newState;
38204    } else {
38205      newBaseQueueLast.next = newBaseQueueFirst;
38206    } // Mark that the fiber performed work, but only if the new state is
38207    // different from the current state.
38208
38209
38210    if (!objectIs(newState, hook.memoizedState)) {
38211      markWorkInProgressReceivedUpdate();
38212    }
38213
38214    hook.memoizedState = newState;
38215    hook.baseState = newBaseState;
38216    hook.baseQueue = newBaseQueueLast;
38217    queue.lastRenderedState = newState;
38218  }
38219
38220  var dispatch = queue.dispatch;
38221  return [hook.memoizedState, dispatch];
38222}
38223
38224function rerenderReducer(reducer, initialArg, init) {
38225  var hook = updateWorkInProgressHook();
38226  var queue = hook.queue;
38227
38228  if (!(queue !== null)) {
38229    {
38230      throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
38231    }
38232  }
38233
38234  queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
38235  // work-in-progress hook.
38236
38237  var dispatch = queue.dispatch;
38238  var lastRenderPhaseUpdate = queue.pending;
38239  var newState = hook.memoizedState;
38240
38241  if (lastRenderPhaseUpdate !== null) {
38242    // The queue doesn't persist past this render pass.
38243    queue.pending = null;
38244    var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;
38245    var update = firstRenderPhaseUpdate;
38246
38247    do {
38248      // Process this render phase update. We don't have to check the
38249      // priority because it will always be the same as the current
38250      // render's.
38251      var action = update.action;
38252      newState = reducer(newState, action);
38253      update = update.next;
38254    } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is
38255    // different from the current state.
38256
38257
38258    if (!objectIs(newState, hook.memoizedState)) {
38259      markWorkInProgressReceivedUpdate();
38260    }
38261
38262    hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to
38263    // the base state unless the queue is empty.
38264    // TODO: Not sure if this is the desired semantics, but it's what we
38265    // do for gDSFP. I can't remember why.
38266
38267    if (hook.baseQueue === null) {
38268      hook.baseState = newState;
38269    }
38270
38271    queue.lastRenderedState = newState;
38272  }
38273
38274  return [newState, dispatch];
38275}
38276
38277function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
38278  {
38279    warnAboutMultipleRenderersDEV(source);
38280  }
38281
38282  var getVersion = source._getVersion;
38283  var version = getVersion(source._source); // Is it safe for this component to read from this source during the current render?
38284
38285  var isSafeToReadFromSource = false; // Check the version first.
38286  // If this render has already been started with a specific version,
38287  // we can use it alone to determine if we can safely read from the source.
38288
38289  var currentRenderVersion = getWorkInProgressVersion(source);
38290
38291  if (currentRenderVersion !== null) {
38292    // It's safe to read if the store hasn't been mutated since the last time
38293    // we read something.
38294    isSafeToReadFromSource = currentRenderVersion === version;
38295  } else {
38296    // If there's no version, then this is the first time we've read from the
38297    // source during the current render pass, so we need to do a bit more work.
38298    // What we need to determine is if there are any hooks that already
38299    // subscribed to the source, and if so, whether there are any pending
38300    // mutations that haven't been synchronized yet.
38301    //
38302    // If there are no pending mutations, then `root.mutableReadLanes` will be
38303    // empty, and we know we can safely read.
38304    //
38305    // If there *are* pending mutations, we may still be able to safely read
38306    // if the currently rendering lanes are inclusive of the pending mutation
38307    // lanes, since that guarantees that the value we're about to read from
38308    // the source is consistent with the values that we read during the most
38309    // recent mutation.
38310    isSafeToReadFromSource = isSubsetOfLanes(renderLanes, root.mutableReadLanes);
38311
38312    if (isSafeToReadFromSource) {
38313      // If it's safe to read from this source during the current render,
38314      // store the version in case other components read from it.
38315      // A changed version number will let those components know to throw and restart the render.
38316      setWorkInProgressVersion(source, version);
38317    }
38318  }
38319
38320  if (isSafeToReadFromSource) {
38321    var snapshot = getSnapshot(source._source);
38322
38323    {
38324      if (typeof snapshot === 'function') {
38325        error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
38326      }
38327    }
38328
38329    return snapshot;
38330  } else {
38331    // This handles the special case of a mutable source being shared between renderers.
38332    // In that case, if the source is mutated between the first and second renderer,
38333    // The second renderer don't know that it needs to reset the WIP version during unwind,
38334    // (because the hook only marks sources as dirty if it's written to their WIP version).
38335    // That would cause this tear check to throw again and eventually be visible to the user.
38336    // We can avoid this infinite loop by explicitly marking the source as dirty.
38337    //
38338    // This can lead to tearing in the first renderer when it resumes,
38339    // but there's nothing we can do about that (short of throwing here and refusing to continue the render).
38340    markSourceAsDirty(source);
38341
38342    {
38343      {
38344        throw Error( "Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue." );
38345      }
38346    }
38347  }
38348}
38349
38350function useMutableSource(hook, source, getSnapshot, subscribe) {
38351  var root = getWorkInProgressRoot();
38352
38353  if (!(root !== null)) {
38354    {
38355      throw Error( "Expected a work-in-progress root. This is a bug in React. Please file an issue." );
38356    }
38357  }
38358
38359  var getVersion = source._getVersion;
38360  var version = getVersion(source._source);
38361  var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const
38362
38363  var _dispatcher$useState = dispatcher.useState(function () {
38364    return readFromUnsubcribedMutableSource(root, source, getSnapshot);
38365  }),
38366      currentSnapshot = _dispatcher$useState[0],
38367      setSnapshot = _dispatcher$useState[1];
38368
38369  var snapshot = currentSnapshot; // Grab a handle to the state hook as well.
38370  // We use it to clear the pending update queue if we have a new source.
38371
38372  var stateHook = workInProgressHook;
38373  var memoizedState = hook.memoizedState;
38374  var refs = memoizedState.refs;
38375  var prevGetSnapshot = refs.getSnapshot;
38376  var prevSource = memoizedState.source;
38377  var prevSubscribe = memoizedState.subscribe;
38378  var fiber = currentlyRenderingFiber$1;
38379  hook.memoizedState = {
38380    refs: refs,
38381    source: source,
38382    subscribe: subscribe
38383  }; // Sync the values needed by our subscription handler after each commit.
38384
38385  dispatcher.useEffect(function () {
38386    refs.getSnapshot = getSnapshot; // Normally the dispatch function for a state hook never changes,
38387    // but this hook recreates the queue in certain cases  to avoid updates from stale sources.
38388    // handleChange() below needs to reference the dispatch function without re-subscribing,
38389    // so we use a ref to ensure that it always has the latest version.
38390
38391    refs.setSnapshot = setSnapshot; // Check for a possible change between when we last rendered now.
38392
38393    var maybeNewVersion = getVersion(source._source);
38394
38395    if (!objectIs(version, maybeNewVersion)) {
38396      var maybeNewSnapshot = getSnapshot(source._source);
38397
38398      {
38399        if (typeof maybeNewSnapshot === 'function') {
38400          error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
38401        }
38402      }
38403
38404      if (!objectIs(snapshot, maybeNewSnapshot)) {
38405        setSnapshot(maybeNewSnapshot);
38406        var lane = requestUpdateLane(fiber);
38407        markRootMutableRead(root, lane);
38408      } // If the source mutated between render and now,
38409      // there may be state updates already scheduled from the old source.
38410      // Entangle the updates so that they render in the same batch.
38411
38412
38413      markRootEntangled(root, root.mutableReadLanes);
38414    }
38415  }, [getSnapshot, source, subscribe]); // If we got a new source or subscribe function, re-subscribe in a passive effect.
38416
38417  dispatcher.useEffect(function () {
38418    var handleChange = function () {
38419      var latestGetSnapshot = refs.getSnapshot;
38420      var latestSetSnapshot = refs.setSnapshot;
38421
38422      try {
38423        latestSetSnapshot(latestGetSnapshot(source._source)); // Record a pending mutable source update with the same expiration time.
38424
38425        var lane = requestUpdateLane(fiber);
38426        markRootMutableRead(root, lane);
38427      } catch (error) {
38428        // A selector might throw after a source mutation.
38429        // e.g. it might try to read from a part of the store that no longer exists.
38430        // In this case we should still schedule an update with React.
38431        // Worst case the selector will throw again and then an error boundary will handle it.
38432        latestSetSnapshot(function () {
38433          throw error;
38434        });
38435      }
38436    };
38437
38438    var unsubscribe = subscribe(source._source, handleChange);
38439
38440    {
38441      if (typeof unsubscribe !== 'function') {
38442        error('Mutable source subscribe function must return an unsubscribe function.');
38443      }
38444    }
38445
38446    return unsubscribe;
38447  }, [source, subscribe]); // If any of the inputs to useMutableSource change, reading is potentially unsafe.
38448  //
38449  // If either the source or the subscription have changed we can't can't trust the update queue.
38450  // Maybe the source changed in a way that the old subscription ignored but the new one depends on.
38451  //
38452  // If the getSnapshot function changed, we also shouldn't rely on the update queue.
38453  // It's possible that the underlying source was mutated between the when the last "change" event fired,
38454  // and when the current render (with the new getSnapshot function) is processed.
38455  //
38456  // In both cases, we need to throw away pending updates (since they are no longer relevant)
38457  // and treat reading from the source as we do in the mount case.
38458
38459  if (!objectIs(prevGetSnapshot, getSnapshot) || !objectIs(prevSource, source) || !objectIs(prevSubscribe, subscribe)) {
38460    // Create a new queue and setState method,
38461    // So if there are interleaved updates, they get pushed to the older queue.
38462    // When this becomes current, the previous queue and dispatch method will be discarded,
38463    // including any interleaving updates that occur.
38464    var newQueue = {
38465      pending: null,
38466      dispatch: null,
38467      lastRenderedReducer: basicStateReducer,
38468      lastRenderedState: snapshot
38469    };
38470    newQueue.dispatch = setSnapshot = dispatchAction.bind(null, currentlyRenderingFiber$1, newQueue);
38471    stateHook.queue = newQueue;
38472    stateHook.baseQueue = null;
38473    snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);
38474    stateHook.memoizedState = stateHook.baseState = snapshot;
38475  }
38476
38477  return snapshot;
38478}
38479
38480function mountMutableSource(source, getSnapshot, subscribe) {
38481  var hook = mountWorkInProgressHook();
38482  hook.memoizedState = {
38483    refs: {
38484      getSnapshot: getSnapshot,
38485      setSnapshot: null
38486    },
38487    source: source,
38488    subscribe: subscribe
38489  };
38490  return useMutableSource(hook, source, getSnapshot, subscribe);
38491}
38492
38493function updateMutableSource(source, getSnapshot, subscribe) {
38494  var hook = updateWorkInProgressHook();
38495  return useMutableSource(hook, source, getSnapshot, subscribe);
38496}
38497
38498function mountState(initialState) {
38499  var hook = mountWorkInProgressHook();
38500
38501  if (typeof initialState === 'function') {
38502    // $FlowFixMe: Flow doesn't like mixed types
38503    initialState = initialState();
38504  }
38505
38506  hook.memoizedState = hook.baseState = initialState;
38507  var queue = hook.queue = {
38508    pending: null,
38509    dispatch: null,
38510    lastRenderedReducer: basicStateReducer,
38511    lastRenderedState: initialState
38512  };
38513  var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
38514  return [hook.memoizedState, dispatch];
38515}
38516
38517function updateState(initialState) {
38518  return updateReducer(basicStateReducer);
38519}
38520
38521function rerenderState(initialState) {
38522  return rerenderReducer(basicStateReducer);
38523}
38524
38525function pushEffect(tag, create, destroy, deps) {
38526  var effect = {
38527    tag: tag,
38528    create: create,
38529    destroy: destroy,
38530    deps: deps,
38531    // Circular
38532    next: null
38533  };
38534  var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;
38535
38536  if (componentUpdateQueue === null) {
38537    componentUpdateQueue = createFunctionComponentUpdateQueue();
38538    currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
38539    componentUpdateQueue.lastEffect = effect.next = effect;
38540  } else {
38541    var lastEffect = componentUpdateQueue.lastEffect;
38542
38543    if (lastEffect === null) {
38544      componentUpdateQueue.lastEffect = effect.next = effect;
38545    } else {
38546      var firstEffect = lastEffect.next;
38547      lastEffect.next = effect;
38548      effect.next = firstEffect;
38549      componentUpdateQueue.lastEffect = effect;
38550    }
38551  }
38552
38553  return effect;
38554}
38555
38556function mountRef(initialValue) {
38557  var hook = mountWorkInProgressHook();
38558  var ref = {
38559    current: initialValue
38560  };
38561
38562  {
38563    Object.seal(ref);
38564  }
38565
38566  hook.memoizedState = ref;
38567  return ref;
38568}
38569
38570function updateRef(initialValue) {
38571  var hook = updateWorkInProgressHook();
38572  return hook.memoizedState;
38573}
38574
38575function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
38576  var hook = mountWorkInProgressHook();
38577  var nextDeps = deps === undefined ? null : deps;
38578  currentlyRenderingFiber$1.flags |= fiberFlags;
38579  hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);
38580}
38581
38582function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
38583  var hook = updateWorkInProgressHook();
38584  var nextDeps = deps === undefined ? null : deps;
38585  var destroy = undefined;
38586
38587  if (currentHook !== null) {
38588    var prevEffect = currentHook.memoizedState;
38589    destroy = prevEffect.destroy;
38590
38591    if (nextDeps !== null) {
38592      var prevDeps = prevEffect.deps;
38593
38594      if (areHookInputsEqual(nextDeps, prevDeps)) {
38595        pushEffect(hookFlags, create, destroy, nextDeps);
38596        return;
38597      }
38598    }
38599  }
38600
38601  currentlyRenderingFiber$1.flags |= fiberFlags;
38602  hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);
38603}
38604
38605function mountEffect(create, deps) {
38606  {
38607    // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
38608    if ('undefined' !== typeof jest) {
38609      warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
38610    }
38611  }
38612
38613  return mountEffectImpl(Update | Passive, Passive$1, create, deps);
38614}
38615
38616function updateEffect(create, deps) {
38617  {
38618    // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
38619    if ('undefined' !== typeof jest) {
38620      warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
38621    }
38622  }
38623
38624  return updateEffectImpl(Update | Passive, Passive$1, create, deps);
38625}
38626
38627function mountLayoutEffect(create, deps) {
38628  return mountEffectImpl(Update, Layout, create, deps);
38629}
38630
38631function updateLayoutEffect(create, deps) {
38632  return updateEffectImpl(Update, Layout, create, deps);
38633}
38634
38635function imperativeHandleEffect(create, ref) {
38636  if (typeof ref === 'function') {
38637    var refCallback = ref;
38638
38639    var _inst = create();
38640
38641    refCallback(_inst);
38642    return function () {
38643      refCallback(null);
38644    };
38645  } else if (ref !== null && ref !== undefined) {
38646    var refObject = ref;
38647
38648    {
38649      if (!refObject.hasOwnProperty('current')) {
38650        error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');
38651      }
38652    }
38653
38654    var _inst2 = create();
38655
38656    refObject.current = _inst2;
38657    return function () {
38658      refObject.current = null;
38659    };
38660  }
38661}
38662
38663function mountImperativeHandle(ref, create, deps) {
38664  {
38665    if (typeof create !== 'function') {
38666      error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
38667    }
38668  } // TODO: If deps are provided, should we skip comparing the ref itself?
38669
38670
38671  var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
38672  return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
38673}
38674
38675function updateImperativeHandle(ref, create, deps) {
38676  {
38677    if (typeof create !== 'function') {
38678      error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
38679    }
38680  } // TODO: If deps are provided, should we skip comparing the ref itself?
38681
38682
38683  var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
38684  return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
38685}
38686
38687function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.
38688  // The react-debug-hooks package injects its own implementation
38689  // so that e.g. DevTools can display custom hook values.
38690}
38691
38692var updateDebugValue = mountDebugValue;
38693
38694function mountCallback(callback, deps) {
38695  var hook = mountWorkInProgressHook();
38696  var nextDeps = deps === undefined ? null : deps;
38697  hook.memoizedState = [callback, nextDeps];
38698  return callback;
38699}
38700
38701function updateCallback(callback, deps) {
38702  var hook = updateWorkInProgressHook();
38703  var nextDeps = deps === undefined ? null : deps;
38704  var prevState = hook.memoizedState;
38705
38706  if (prevState !== null) {
38707    if (nextDeps !== null) {
38708      var prevDeps = prevState[1];
38709
38710      if (areHookInputsEqual(nextDeps, prevDeps)) {
38711        return prevState[0];
38712      }
38713    }
38714  }
38715
38716  hook.memoizedState = [callback, nextDeps];
38717  return callback;
38718}
38719
38720function mountMemo(nextCreate, deps) {
38721  var hook = mountWorkInProgressHook();
38722  var nextDeps = deps === undefined ? null : deps;
38723  var nextValue = nextCreate();
38724  hook.memoizedState = [nextValue, nextDeps];
38725  return nextValue;
38726}
38727
38728function updateMemo(nextCreate, deps) {
38729  var hook = updateWorkInProgressHook();
38730  var nextDeps = deps === undefined ? null : deps;
38731  var prevState = hook.memoizedState;
38732
38733  if (prevState !== null) {
38734    // Assume these are defined. If they're not, areHookInputsEqual will warn.
38735    if (nextDeps !== null) {
38736      var prevDeps = prevState[1];
38737
38738      if (areHookInputsEqual(nextDeps, prevDeps)) {
38739        return prevState[0];
38740      }
38741    }
38742  }
38743
38744  var nextValue = nextCreate();
38745  hook.memoizedState = [nextValue, nextDeps];
38746  return nextValue;
38747}
38748
38749function mountDeferredValue(value) {
38750  var _mountState = mountState(value),
38751      prevValue = _mountState[0],
38752      setValue = _mountState[1];
38753
38754  mountEffect(function () {
38755    var prevTransition = ReactCurrentBatchConfig$1.transition;
38756    ReactCurrentBatchConfig$1.transition = 1;
38757
38758    try {
38759      setValue(value);
38760    } finally {
38761      ReactCurrentBatchConfig$1.transition = prevTransition;
38762    }
38763  }, [value]);
38764  return prevValue;
38765}
38766
38767function updateDeferredValue(value) {
38768  var _updateState = updateState(),
38769      prevValue = _updateState[0],
38770      setValue = _updateState[1];
38771
38772  updateEffect(function () {
38773    var prevTransition = ReactCurrentBatchConfig$1.transition;
38774    ReactCurrentBatchConfig$1.transition = 1;
38775
38776    try {
38777      setValue(value);
38778    } finally {
38779      ReactCurrentBatchConfig$1.transition = prevTransition;
38780    }
38781  }, [value]);
38782  return prevValue;
38783}
38784
38785function rerenderDeferredValue(value) {
38786  var _rerenderState = rerenderState(),
38787      prevValue = _rerenderState[0],
38788      setValue = _rerenderState[1];
38789
38790  updateEffect(function () {
38791    var prevTransition = ReactCurrentBatchConfig$1.transition;
38792    ReactCurrentBatchConfig$1.transition = 1;
38793
38794    try {
38795      setValue(value);
38796    } finally {
38797      ReactCurrentBatchConfig$1.transition = prevTransition;
38798    }
38799  }, [value]);
38800  return prevValue;
38801}
38802
38803function startTransition(setPending, callback) {
38804  var priorityLevel = getCurrentPriorityLevel();
38805
38806  {
38807    runWithPriority$1(priorityLevel < UserBlockingPriority$2 ? UserBlockingPriority$2 : priorityLevel, function () {
38808      setPending(true);
38809    });
38810    runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () {
38811      var prevTransition = ReactCurrentBatchConfig$1.transition;
38812      ReactCurrentBatchConfig$1.transition = 1;
38813
38814      try {
38815        setPending(false);
38816        callback();
38817      } finally {
38818        ReactCurrentBatchConfig$1.transition = prevTransition;
38819      }
38820    });
38821  }
38822}
38823
38824function mountTransition() {
38825  var _mountState2 = mountState(false),
38826      isPending = _mountState2[0],
38827      setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending`
38828  // never changes.
38829
38830
38831  var start = startTransition.bind(null, setPending);
38832  mountRef(start);
38833  return [start, isPending];
38834}
38835
38836function updateTransition() {
38837  var _updateState2 = updateState(),
38838      isPending = _updateState2[0];
38839
38840  var startRef = updateRef();
38841  var start = startRef.current;
38842  return [start, isPending];
38843}
38844
38845function rerenderTransition() {
38846  var _rerenderState2 = rerenderState(),
38847      isPending = _rerenderState2[0];
38848
38849  var startRef = updateRef();
38850  var start = startRef.current;
38851  return [start, isPending];
38852}
38853
38854var isUpdatingOpaqueValueInRenderPhase = false;
38855function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {
38856  {
38857    return isUpdatingOpaqueValueInRenderPhase;
38858  }
38859}
38860
38861function warnOnOpaqueIdentifierAccessInDEV(fiber) {
38862  {
38863    // TODO: Should warn in effects and callbacks, too
38864    var name = getComponentName(fiber.type) || 'Unknown';
38865
38866    if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) {
38867      error('The object passed back from useOpaqueIdentifier is meant to be ' + 'passed through to attributes only. Do not read the ' + 'value directly.');
38868
38869      didWarnAboutUseOpaqueIdentifier[name] = true;
38870    }
38871  }
38872}
38873
38874function mountOpaqueIdentifier() {
38875  var makeId =  makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1)) ;
38876
38877  if (getIsHydrating()) {
38878    var didUpgrade = false;
38879    var fiber = currentlyRenderingFiber$1;
38880
38881    var readValue = function () {
38882      if (!didUpgrade) {
38883        // Only upgrade once. This works even inside the render phase because
38884        // the update is added to a shared queue, which outlasts the
38885        // in-progress render.
38886        didUpgrade = true;
38887
38888        {
38889          isUpdatingOpaqueValueInRenderPhase = true;
38890          setId(makeId());
38891          isUpdatingOpaqueValueInRenderPhase = false;
38892          warnOnOpaqueIdentifierAccessInDEV(fiber);
38893        }
38894      }
38895
38896      {
38897        {
38898          throw Error( "The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly." );
38899        }
38900      }
38901    };
38902
38903    var id = makeOpaqueHydratingObject(readValue);
38904    var setId = mountState(id)[1];
38905
38906    if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) {
38907      currentlyRenderingFiber$1.flags |= Update | Passive;
38908      pushEffect(HasEffect | Passive$1, function () {
38909        setId(makeId());
38910      }, undefined, null);
38911    }
38912
38913    return id;
38914  } else {
38915    var _id = makeId();
38916
38917    mountState(_id);
38918    return _id;
38919  }
38920}
38921
38922function updateOpaqueIdentifier() {
38923  var id = updateState()[0];
38924  return id;
38925}
38926
38927function rerenderOpaqueIdentifier() {
38928  var id = rerenderState()[0];
38929  return id;
38930}
38931
38932function dispatchAction(fiber, queue, action) {
38933  {
38934    if (typeof arguments[3] === 'function') {
38935      error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
38936    }
38937  }
38938
38939  var eventTime = requestEventTime();
38940  var lane = requestUpdateLane(fiber);
38941  var update = {
38942    lane: lane,
38943    action: action,
38944    eagerReducer: null,
38945    eagerState: null,
38946    next: null
38947  }; // Append the update to the end of the list.
38948
38949  var pending = queue.pending;
38950
38951  if (pending === null) {
38952    // This is the first update. Create a circular list.
38953    update.next = update;
38954  } else {
38955    update.next = pending.next;
38956    pending.next = update;
38957  }
38958
38959  queue.pending = update;
38960  var alternate = fiber.alternate;
38961
38962  if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {
38963    // This is a render phase update. Stash it in a lazily-created map of
38964    // queue -> linked list of updates. After this render pass, we'll restart
38965    // and apply the stashed updates on top of the work-in-progress hook.
38966    didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
38967  } else {
38968    if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {
38969      // The queue is currently empty, which means we can eagerly compute the
38970      // next state before entering the render phase. If the new state is the
38971      // same as the current state, we may be able to bail out entirely.
38972      var lastRenderedReducer = queue.lastRenderedReducer;
38973
38974      if (lastRenderedReducer !== null) {
38975        var prevDispatcher;
38976
38977        {
38978          prevDispatcher = ReactCurrentDispatcher$1.current;
38979          ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
38980        }
38981
38982        try {
38983          var currentState = queue.lastRenderedState;
38984          var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute
38985          // it, on the update object. If the reducer hasn't changed by the
38986          // time we enter the render phase, then the eager state can be used
38987          // without calling the reducer again.
38988
38989          update.eagerReducer = lastRenderedReducer;
38990          update.eagerState = eagerState;
38991
38992          if (objectIs(eagerState, currentState)) {
38993            // Fast path. We can bail out without scheduling React to re-render.
38994            // It's still possible that we'll need to rebase this update later,
38995            // if the component re-renders for a different reason and by that
38996            // time the reducer has changed.
38997            return;
38998          }
38999        } catch (error) {// Suppress the error. It will throw again in the render phase.
39000        } finally {
39001          {
39002            ReactCurrentDispatcher$1.current = prevDispatcher;
39003          }
39004        }
39005      }
39006    }
39007
39008    {
39009      // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
39010      if ('undefined' !== typeof jest) {
39011        warnIfNotScopedWithMatchingAct(fiber);
39012        warnIfNotCurrentlyActingUpdatesInDev(fiber);
39013      }
39014    }
39015
39016    scheduleUpdateOnFiber(fiber, lane, eventTime);
39017  }
39018}
39019
39020var ContextOnlyDispatcher = {
39021  readContext: readContext,
39022  useCallback: throwInvalidHookError,
39023  useContext: throwInvalidHookError,
39024  useEffect: throwInvalidHookError,
39025  useImperativeHandle: throwInvalidHookError,
39026  useLayoutEffect: throwInvalidHookError,
39027  useMemo: throwInvalidHookError,
39028  useReducer: throwInvalidHookError,
39029  useRef: throwInvalidHookError,
39030  useState: throwInvalidHookError,
39031  useDebugValue: throwInvalidHookError,
39032  useDeferredValue: throwInvalidHookError,
39033  useTransition: throwInvalidHookError,
39034  useMutableSource: throwInvalidHookError,
39035  useOpaqueIdentifier: throwInvalidHookError,
39036  unstable_isNewReconciler: enableNewReconciler
39037};
39038var HooksDispatcherOnMountInDEV = null;
39039var HooksDispatcherOnMountWithHookTypesInDEV = null;
39040var HooksDispatcherOnUpdateInDEV = null;
39041var HooksDispatcherOnRerenderInDEV = null;
39042var InvalidNestedHooksDispatcherOnMountInDEV = null;
39043var InvalidNestedHooksDispatcherOnUpdateInDEV = null;
39044var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
39045
39046{
39047  var warnInvalidContextAccess = function () {
39048    error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
39049  };
39050
39051  var warnInvalidHookAccess = function () {
39052    error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
39053  };
39054
39055  HooksDispatcherOnMountInDEV = {
39056    readContext: function (context, observedBits) {
39057      return readContext(context, observedBits);
39058    },
39059    useCallback: function (callback, deps) {
39060      currentHookNameInDev = 'useCallback';
39061      mountHookTypesDev();
39062      checkDepsAreArrayDev(deps);
39063      return mountCallback(callback, deps);
39064    },
39065    useContext: function (context, observedBits) {
39066      currentHookNameInDev = 'useContext';
39067      mountHookTypesDev();
39068      return readContext(context, observedBits);
39069    },
39070    useEffect: function (create, deps) {
39071      currentHookNameInDev = 'useEffect';
39072      mountHookTypesDev();
39073      checkDepsAreArrayDev(deps);
39074      return mountEffect(create, deps);
39075    },
39076    useImperativeHandle: function (ref, create, deps) {
39077      currentHookNameInDev = 'useImperativeHandle';
39078      mountHookTypesDev();
39079      checkDepsAreArrayDev(deps);
39080      return mountImperativeHandle(ref, create, deps);
39081    },
39082    useLayoutEffect: function (create, deps) {
39083      currentHookNameInDev = 'useLayoutEffect';
39084      mountHookTypesDev();
39085      checkDepsAreArrayDev(deps);
39086      return mountLayoutEffect(create, deps);
39087    },
39088    useMemo: function (create, deps) {
39089      currentHookNameInDev = 'useMemo';
39090      mountHookTypesDev();
39091      checkDepsAreArrayDev(deps);
39092      var prevDispatcher = ReactCurrentDispatcher$1.current;
39093      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
39094
39095      try {
39096        return mountMemo(create, deps);
39097      } finally {
39098        ReactCurrentDispatcher$1.current = prevDispatcher;
39099      }
39100    },
39101    useReducer: function (reducer, initialArg, init) {
39102      currentHookNameInDev = 'useReducer';
39103      mountHookTypesDev();
39104      var prevDispatcher = ReactCurrentDispatcher$1.current;
39105      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
39106
39107      try {
39108        return mountReducer(reducer, initialArg, init);
39109      } finally {
39110        ReactCurrentDispatcher$1.current = prevDispatcher;
39111      }
39112    },
39113    useRef: function (initialValue) {
39114      currentHookNameInDev = 'useRef';
39115      mountHookTypesDev();
39116      return mountRef(initialValue);
39117    },
39118    useState: function (initialState) {
39119      currentHookNameInDev = 'useState';
39120      mountHookTypesDev();
39121      var prevDispatcher = ReactCurrentDispatcher$1.current;
39122      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
39123
39124      try {
39125        return mountState(initialState);
39126      } finally {
39127        ReactCurrentDispatcher$1.current = prevDispatcher;
39128      }
39129    },
39130    useDebugValue: function (value, formatterFn) {
39131      currentHookNameInDev = 'useDebugValue';
39132      mountHookTypesDev();
39133      return mountDebugValue();
39134    },
39135    useDeferredValue: function (value) {
39136      currentHookNameInDev = 'useDeferredValue';
39137      mountHookTypesDev();
39138      return mountDeferredValue(value);
39139    },
39140    useTransition: function () {
39141      currentHookNameInDev = 'useTransition';
39142      mountHookTypesDev();
39143      return mountTransition();
39144    },
39145    useMutableSource: function (source, getSnapshot, subscribe) {
39146      currentHookNameInDev = 'useMutableSource';
39147      mountHookTypesDev();
39148      return mountMutableSource(source, getSnapshot, subscribe);
39149    },
39150    useOpaqueIdentifier: function () {
39151      currentHookNameInDev = 'useOpaqueIdentifier';
39152      mountHookTypesDev();
39153      return mountOpaqueIdentifier();
39154    },
39155    unstable_isNewReconciler: enableNewReconciler
39156  };
39157  HooksDispatcherOnMountWithHookTypesInDEV = {
39158    readContext: function (context, observedBits) {
39159      return readContext(context, observedBits);
39160    },
39161    useCallback: function (callback, deps) {
39162      currentHookNameInDev = 'useCallback';
39163      updateHookTypesDev();
39164      return mountCallback(callback, deps);
39165    },
39166    useContext: function (context, observedBits) {
39167      currentHookNameInDev = 'useContext';
39168      updateHookTypesDev();
39169      return readContext(context, observedBits);
39170    },
39171    useEffect: function (create, deps) {
39172      currentHookNameInDev = 'useEffect';
39173      updateHookTypesDev();
39174      return mountEffect(create, deps);
39175    },
39176    useImperativeHandle: function (ref, create, deps) {
39177      currentHookNameInDev = 'useImperativeHandle';
39178      updateHookTypesDev();
39179      return mountImperativeHandle(ref, create, deps);
39180    },
39181    useLayoutEffect: function (create, deps) {
39182      currentHookNameInDev = 'useLayoutEffect';
39183      updateHookTypesDev();
39184      return mountLayoutEffect(create, deps);
39185    },
39186    useMemo: function (create, deps) {
39187      currentHookNameInDev = 'useMemo';
39188      updateHookTypesDev();
39189      var prevDispatcher = ReactCurrentDispatcher$1.current;
39190      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
39191
39192      try {
39193        return mountMemo(create, deps);
39194      } finally {
39195        ReactCurrentDispatcher$1.current = prevDispatcher;
39196      }
39197    },
39198    useReducer: function (reducer, initialArg, init) {
39199      currentHookNameInDev = 'useReducer';
39200      updateHookTypesDev();
39201      var prevDispatcher = ReactCurrentDispatcher$1.current;
39202      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
39203
39204      try {
39205        return mountReducer(reducer, initialArg, init);
39206      } finally {
39207        ReactCurrentDispatcher$1.current = prevDispatcher;
39208      }
39209    },
39210    useRef: function (initialValue) {
39211      currentHookNameInDev = 'useRef';
39212      updateHookTypesDev();
39213      return mountRef(initialValue);
39214    },
39215    useState: function (initialState) {
39216      currentHookNameInDev = 'useState';
39217      updateHookTypesDev();
39218      var prevDispatcher = ReactCurrentDispatcher$1.current;
39219      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
39220
39221      try {
39222        return mountState(initialState);
39223      } finally {
39224        ReactCurrentDispatcher$1.current = prevDispatcher;
39225      }
39226    },
39227    useDebugValue: function (value, formatterFn) {
39228      currentHookNameInDev = 'useDebugValue';
39229      updateHookTypesDev();
39230      return mountDebugValue();
39231    },
39232    useDeferredValue: function (value) {
39233      currentHookNameInDev = 'useDeferredValue';
39234      updateHookTypesDev();
39235      return mountDeferredValue(value);
39236    },
39237    useTransition: function () {
39238      currentHookNameInDev = 'useTransition';
39239      updateHookTypesDev();
39240      return mountTransition();
39241    },
39242    useMutableSource: function (source, getSnapshot, subscribe) {
39243      currentHookNameInDev = 'useMutableSource';
39244      updateHookTypesDev();
39245      return mountMutableSource(source, getSnapshot, subscribe);
39246    },
39247    useOpaqueIdentifier: function () {
39248      currentHookNameInDev = 'useOpaqueIdentifier';
39249      updateHookTypesDev();
39250      return mountOpaqueIdentifier();
39251    },
39252    unstable_isNewReconciler: enableNewReconciler
39253  };
39254  HooksDispatcherOnUpdateInDEV = {
39255    readContext: function (context, observedBits) {
39256      return readContext(context, observedBits);
39257    },
39258    useCallback: function (callback, deps) {
39259      currentHookNameInDev = 'useCallback';
39260      updateHookTypesDev();
39261      return updateCallback(callback, deps);
39262    },
39263    useContext: function (context, observedBits) {
39264      currentHookNameInDev = 'useContext';
39265      updateHookTypesDev();
39266      return readContext(context, observedBits);
39267    },
39268    useEffect: function (create, deps) {
39269      currentHookNameInDev = 'useEffect';
39270      updateHookTypesDev();
39271      return updateEffect(create, deps);
39272    },
39273    useImperativeHandle: function (ref, create, deps) {
39274      currentHookNameInDev = 'useImperativeHandle';
39275      updateHookTypesDev();
39276      return updateImperativeHandle(ref, create, deps);
39277    },
39278    useLayoutEffect: function (create, deps) {
39279      currentHookNameInDev = 'useLayoutEffect';
39280      updateHookTypesDev();
39281      return updateLayoutEffect(create, deps);
39282    },
39283    useMemo: function (create, deps) {
39284      currentHookNameInDev = 'useMemo';
39285      updateHookTypesDev();
39286      var prevDispatcher = ReactCurrentDispatcher$1.current;
39287      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
39288
39289      try {
39290        return updateMemo(create, deps);
39291      } finally {
39292        ReactCurrentDispatcher$1.current = prevDispatcher;
39293      }
39294    },
39295    useReducer: function (reducer, initialArg, init) {
39296      currentHookNameInDev = 'useReducer';
39297      updateHookTypesDev();
39298      var prevDispatcher = ReactCurrentDispatcher$1.current;
39299      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
39300
39301      try {
39302        return updateReducer(reducer, initialArg, init);
39303      } finally {
39304        ReactCurrentDispatcher$1.current = prevDispatcher;
39305      }
39306    },
39307    useRef: function (initialValue) {
39308      currentHookNameInDev = 'useRef';
39309      updateHookTypesDev();
39310      return updateRef();
39311    },
39312    useState: function (initialState) {
39313      currentHookNameInDev = 'useState';
39314      updateHookTypesDev();
39315      var prevDispatcher = ReactCurrentDispatcher$1.current;
39316      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
39317
39318      try {
39319        return updateState(initialState);
39320      } finally {
39321        ReactCurrentDispatcher$1.current = prevDispatcher;
39322      }
39323    },
39324    useDebugValue: function (value, formatterFn) {
39325      currentHookNameInDev = 'useDebugValue';
39326      updateHookTypesDev();
39327      return updateDebugValue();
39328    },
39329    useDeferredValue: function (value) {
39330      currentHookNameInDev = 'useDeferredValue';
39331      updateHookTypesDev();
39332      return updateDeferredValue(value);
39333    },
39334    useTransition: function () {
39335      currentHookNameInDev = 'useTransition';
39336      updateHookTypesDev();
39337      return updateTransition();
39338    },
39339    useMutableSource: function (source, getSnapshot, subscribe) {
39340      currentHookNameInDev = 'useMutableSource';
39341      updateHookTypesDev();
39342      return updateMutableSource(source, getSnapshot, subscribe);
39343    },
39344    useOpaqueIdentifier: function () {
39345      currentHookNameInDev = 'useOpaqueIdentifier';
39346      updateHookTypesDev();
39347      return updateOpaqueIdentifier();
39348    },
39349    unstable_isNewReconciler: enableNewReconciler
39350  };
39351  HooksDispatcherOnRerenderInDEV = {
39352    readContext: function (context, observedBits) {
39353      return readContext(context, observedBits);
39354    },
39355    useCallback: function (callback, deps) {
39356      currentHookNameInDev = 'useCallback';
39357      updateHookTypesDev();
39358      return updateCallback(callback, deps);
39359    },
39360    useContext: function (context, observedBits) {
39361      currentHookNameInDev = 'useContext';
39362      updateHookTypesDev();
39363      return readContext(context, observedBits);
39364    },
39365    useEffect: function (create, deps) {
39366      currentHookNameInDev = 'useEffect';
39367      updateHookTypesDev();
39368      return updateEffect(create, deps);
39369    },
39370    useImperativeHandle: function (ref, create, deps) {
39371      currentHookNameInDev = 'useImperativeHandle';
39372      updateHookTypesDev();
39373      return updateImperativeHandle(ref, create, deps);
39374    },
39375    useLayoutEffect: function (create, deps) {
39376      currentHookNameInDev = 'useLayoutEffect';
39377      updateHookTypesDev();
39378      return updateLayoutEffect(create, deps);
39379    },
39380    useMemo: function (create, deps) {
39381      currentHookNameInDev = 'useMemo';
39382      updateHookTypesDev();
39383      var prevDispatcher = ReactCurrentDispatcher$1.current;
39384      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
39385
39386      try {
39387        return updateMemo(create, deps);
39388      } finally {
39389        ReactCurrentDispatcher$1.current = prevDispatcher;
39390      }
39391    },
39392    useReducer: function (reducer, initialArg, init) {
39393      currentHookNameInDev = 'useReducer';
39394      updateHookTypesDev();
39395      var prevDispatcher = ReactCurrentDispatcher$1.current;
39396      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
39397
39398      try {
39399        return rerenderReducer(reducer, initialArg, init);
39400      } finally {
39401        ReactCurrentDispatcher$1.current = prevDispatcher;
39402      }
39403    },
39404    useRef: function (initialValue) {
39405      currentHookNameInDev = 'useRef';
39406      updateHookTypesDev();
39407      return updateRef();
39408    },
39409    useState: function (initialState) {
39410      currentHookNameInDev = 'useState';
39411      updateHookTypesDev();
39412      var prevDispatcher = ReactCurrentDispatcher$1.current;
39413      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
39414
39415      try {
39416        return rerenderState(initialState);
39417      } finally {
39418        ReactCurrentDispatcher$1.current = prevDispatcher;
39419      }
39420    },
39421    useDebugValue: function (value, formatterFn) {
39422      currentHookNameInDev = 'useDebugValue';
39423      updateHookTypesDev();
39424      return updateDebugValue();
39425    },
39426    useDeferredValue: function (value) {
39427      currentHookNameInDev = 'useDeferredValue';
39428      updateHookTypesDev();
39429      return rerenderDeferredValue(value);
39430    },
39431    useTransition: function () {
39432      currentHookNameInDev = 'useTransition';
39433      updateHookTypesDev();
39434      return rerenderTransition();
39435    },
39436    useMutableSource: function (source, getSnapshot, subscribe) {
39437      currentHookNameInDev = 'useMutableSource';
39438      updateHookTypesDev();
39439      return updateMutableSource(source, getSnapshot, subscribe);
39440    },
39441    useOpaqueIdentifier: function () {
39442      currentHookNameInDev = 'useOpaqueIdentifier';
39443      updateHookTypesDev();
39444      return rerenderOpaqueIdentifier();
39445    },
39446    unstable_isNewReconciler: enableNewReconciler
39447  };
39448  InvalidNestedHooksDispatcherOnMountInDEV = {
39449    readContext: function (context, observedBits) {
39450      warnInvalidContextAccess();
39451      return readContext(context, observedBits);
39452    },
39453    useCallback: function (callback, deps) {
39454      currentHookNameInDev = 'useCallback';
39455      warnInvalidHookAccess();
39456      mountHookTypesDev();
39457      return mountCallback(callback, deps);
39458    },
39459    useContext: function (context, observedBits) {
39460      currentHookNameInDev = 'useContext';
39461      warnInvalidHookAccess();
39462      mountHookTypesDev();
39463      return readContext(context, observedBits);
39464    },
39465    useEffect: function (create, deps) {
39466      currentHookNameInDev = 'useEffect';
39467      warnInvalidHookAccess();
39468      mountHookTypesDev();
39469      return mountEffect(create, deps);
39470    },
39471    useImperativeHandle: function (ref, create, deps) {
39472      currentHookNameInDev = 'useImperativeHandle';
39473      warnInvalidHookAccess();
39474      mountHookTypesDev();
39475      return mountImperativeHandle(ref, create, deps);
39476    },
39477    useLayoutEffect: function (create, deps) {
39478      currentHookNameInDev = 'useLayoutEffect';
39479      warnInvalidHookAccess();
39480      mountHookTypesDev();
39481      return mountLayoutEffect(create, deps);
39482    },
39483    useMemo: function (create, deps) {
39484      currentHookNameInDev = 'useMemo';
39485      warnInvalidHookAccess();
39486      mountHookTypesDev();
39487      var prevDispatcher = ReactCurrentDispatcher$1.current;
39488      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
39489
39490      try {
39491        return mountMemo(create, deps);
39492      } finally {
39493        ReactCurrentDispatcher$1.current = prevDispatcher;
39494      }
39495    },
39496    useReducer: function (reducer, initialArg, init) {
39497      currentHookNameInDev = 'useReducer';
39498      warnInvalidHookAccess();
39499      mountHookTypesDev();
39500      var prevDispatcher = ReactCurrentDispatcher$1.current;
39501      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
39502
39503      try {
39504        return mountReducer(reducer, initialArg, init);
39505      } finally {
39506        ReactCurrentDispatcher$1.current = prevDispatcher;
39507      }
39508    },
39509    useRef: function (initialValue) {
39510      currentHookNameInDev = 'useRef';
39511      warnInvalidHookAccess();
39512      mountHookTypesDev();
39513      return mountRef(initialValue);
39514    },
39515    useState: function (initialState) {
39516      currentHookNameInDev = 'useState';
39517      warnInvalidHookAccess();
39518      mountHookTypesDev();
39519      var prevDispatcher = ReactCurrentDispatcher$1.current;
39520      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
39521
39522      try {
39523        return mountState(initialState);
39524      } finally {
39525        ReactCurrentDispatcher$1.current = prevDispatcher;
39526      }
39527    },
39528    useDebugValue: function (value, formatterFn) {
39529      currentHookNameInDev = 'useDebugValue';
39530      warnInvalidHookAccess();
39531      mountHookTypesDev();
39532      return mountDebugValue();
39533    },
39534    useDeferredValue: function (value) {
39535      currentHookNameInDev = 'useDeferredValue';
39536      warnInvalidHookAccess();
39537      mountHookTypesDev();
39538      return mountDeferredValue(value);
39539    },
39540    useTransition: function () {
39541      currentHookNameInDev = 'useTransition';
39542      warnInvalidHookAccess();
39543      mountHookTypesDev();
39544      return mountTransition();
39545    },
39546    useMutableSource: function (source, getSnapshot, subscribe) {
39547      currentHookNameInDev = 'useMutableSource';
39548      warnInvalidHookAccess();
39549      mountHookTypesDev();
39550      return mountMutableSource(source, getSnapshot, subscribe);
39551    },
39552    useOpaqueIdentifier: function () {
39553      currentHookNameInDev = 'useOpaqueIdentifier';
39554      warnInvalidHookAccess();
39555      mountHookTypesDev();
39556      return mountOpaqueIdentifier();
39557    },
39558    unstable_isNewReconciler: enableNewReconciler
39559  };
39560  InvalidNestedHooksDispatcherOnUpdateInDEV = {
39561    readContext: function (context, observedBits) {
39562      warnInvalidContextAccess();
39563      return readContext(context, observedBits);
39564    },
39565    useCallback: function (callback, deps) {
39566      currentHookNameInDev = 'useCallback';
39567      warnInvalidHookAccess();
39568      updateHookTypesDev();
39569      return updateCallback(callback, deps);
39570    },
39571    useContext: function (context, observedBits) {
39572      currentHookNameInDev = 'useContext';
39573      warnInvalidHookAccess();
39574      updateHookTypesDev();
39575      return readContext(context, observedBits);
39576    },
39577    useEffect: function (create, deps) {
39578      currentHookNameInDev = 'useEffect';
39579      warnInvalidHookAccess();
39580      updateHookTypesDev();
39581      return updateEffect(create, deps);
39582    },
39583    useImperativeHandle: function (ref, create, deps) {
39584      currentHookNameInDev = 'useImperativeHandle';
39585      warnInvalidHookAccess();
39586      updateHookTypesDev();
39587      return updateImperativeHandle(ref, create, deps);
39588    },
39589    useLayoutEffect: function (create, deps) {
39590      currentHookNameInDev = 'useLayoutEffect';
39591      warnInvalidHookAccess();
39592      updateHookTypesDev();
39593      return updateLayoutEffect(create, deps);
39594    },
39595    useMemo: function (create, deps) {
39596      currentHookNameInDev = 'useMemo';
39597      warnInvalidHookAccess();
39598      updateHookTypesDev();
39599      var prevDispatcher = ReactCurrentDispatcher$1.current;
39600      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
39601
39602      try {
39603        return updateMemo(create, deps);
39604      } finally {
39605        ReactCurrentDispatcher$1.current = prevDispatcher;
39606      }
39607    },
39608    useReducer: function (reducer, initialArg, init) {
39609      currentHookNameInDev = 'useReducer';
39610      warnInvalidHookAccess();
39611      updateHookTypesDev();
39612      var prevDispatcher = ReactCurrentDispatcher$1.current;
39613      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
39614
39615      try {
39616        return updateReducer(reducer, initialArg, init);
39617      } finally {
39618        ReactCurrentDispatcher$1.current = prevDispatcher;
39619      }
39620    },
39621    useRef: function (initialValue) {
39622      currentHookNameInDev = 'useRef';
39623      warnInvalidHookAccess();
39624      updateHookTypesDev();
39625      return updateRef();
39626    },
39627    useState: function (initialState) {
39628      currentHookNameInDev = 'useState';
39629      warnInvalidHookAccess();
39630      updateHookTypesDev();
39631      var prevDispatcher = ReactCurrentDispatcher$1.current;
39632      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
39633
39634      try {
39635        return updateState(initialState);
39636      } finally {
39637        ReactCurrentDispatcher$1.current = prevDispatcher;
39638      }
39639    },
39640    useDebugValue: function (value, formatterFn) {
39641      currentHookNameInDev = 'useDebugValue';
39642      warnInvalidHookAccess();
39643      updateHookTypesDev();
39644      return updateDebugValue();
39645    },
39646    useDeferredValue: function (value) {
39647      currentHookNameInDev = 'useDeferredValue';
39648      warnInvalidHookAccess();
39649      updateHookTypesDev();
39650      return updateDeferredValue(value);
39651    },
39652    useTransition: function () {
39653      currentHookNameInDev = 'useTransition';
39654      warnInvalidHookAccess();
39655      updateHookTypesDev();
39656      return updateTransition();
39657    },
39658    useMutableSource: function (source, getSnapshot, subscribe) {
39659      currentHookNameInDev = 'useMutableSource';
39660      warnInvalidHookAccess();
39661      updateHookTypesDev();
39662      return updateMutableSource(source, getSnapshot, subscribe);
39663    },
39664    useOpaqueIdentifier: function () {
39665      currentHookNameInDev = 'useOpaqueIdentifier';
39666      warnInvalidHookAccess();
39667      updateHookTypesDev();
39668      return updateOpaqueIdentifier();
39669    },
39670    unstable_isNewReconciler: enableNewReconciler
39671  };
39672  InvalidNestedHooksDispatcherOnRerenderInDEV = {
39673    readContext: function (context, observedBits) {
39674      warnInvalidContextAccess();
39675      return readContext(context, observedBits);
39676    },
39677    useCallback: function (callback, deps) {
39678      currentHookNameInDev = 'useCallback';
39679      warnInvalidHookAccess();
39680      updateHookTypesDev();
39681      return updateCallback(callback, deps);
39682    },
39683    useContext: function (context, observedBits) {
39684      currentHookNameInDev = 'useContext';
39685      warnInvalidHookAccess();
39686      updateHookTypesDev();
39687      return readContext(context, observedBits);
39688    },
39689    useEffect: function (create, deps) {
39690      currentHookNameInDev = 'useEffect';
39691      warnInvalidHookAccess();
39692      updateHookTypesDev();
39693      return updateEffect(create, deps);
39694    },
39695    useImperativeHandle: function (ref, create, deps) {
39696      currentHookNameInDev = 'useImperativeHandle';
39697      warnInvalidHookAccess();
39698      updateHookTypesDev();
39699      return updateImperativeHandle(ref, create, deps);
39700    },
39701    useLayoutEffect: function (create, deps) {
39702      currentHookNameInDev = 'useLayoutEffect';
39703      warnInvalidHookAccess();
39704      updateHookTypesDev();
39705      return updateLayoutEffect(create, deps);
39706    },
39707    useMemo: function (create, deps) {
39708      currentHookNameInDev = 'useMemo';
39709      warnInvalidHookAccess();
39710      updateHookTypesDev();
39711      var prevDispatcher = ReactCurrentDispatcher$1.current;
39712      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
39713
39714      try {
39715        return updateMemo(create, deps);
39716      } finally {
39717        ReactCurrentDispatcher$1.current = prevDispatcher;
39718      }
39719    },
39720    useReducer: function (reducer, initialArg, init) {
39721      currentHookNameInDev = 'useReducer';
39722      warnInvalidHookAccess();
39723      updateHookTypesDev();
39724      var prevDispatcher = ReactCurrentDispatcher$1.current;
39725      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
39726
39727      try {
39728        return rerenderReducer(reducer, initialArg, init);
39729      } finally {
39730        ReactCurrentDispatcher$1.current = prevDispatcher;
39731      }
39732    },
39733    useRef: function (initialValue) {
39734      currentHookNameInDev = 'useRef';
39735      warnInvalidHookAccess();
39736      updateHookTypesDev();
39737      return updateRef();
39738    },
39739    useState: function (initialState) {
39740      currentHookNameInDev = 'useState';
39741      warnInvalidHookAccess();
39742      updateHookTypesDev();
39743      var prevDispatcher = ReactCurrentDispatcher$1.current;
39744      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
39745
39746      try {
39747        return rerenderState(initialState);
39748      } finally {
39749        ReactCurrentDispatcher$1.current = prevDispatcher;
39750      }
39751    },
39752    useDebugValue: function (value, formatterFn) {
39753      currentHookNameInDev = 'useDebugValue';
39754      warnInvalidHookAccess();
39755      updateHookTypesDev();
39756      return updateDebugValue();
39757    },
39758    useDeferredValue: function (value) {
39759      currentHookNameInDev = 'useDeferredValue';
39760      warnInvalidHookAccess();
39761      updateHookTypesDev();
39762      return rerenderDeferredValue(value);
39763    },
39764    useTransition: function () {
39765      currentHookNameInDev = 'useTransition';
39766      warnInvalidHookAccess();
39767      updateHookTypesDev();
39768      return rerenderTransition();
39769    },
39770    useMutableSource: function (source, getSnapshot, subscribe) {
39771      currentHookNameInDev = 'useMutableSource';
39772      warnInvalidHookAccess();
39773      updateHookTypesDev();
39774      return updateMutableSource(source, getSnapshot, subscribe);
39775    },
39776    useOpaqueIdentifier: function () {
39777      currentHookNameInDev = 'useOpaqueIdentifier';
39778      warnInvalidHookAccess();
39779      updateHookTypesDev();
39780      return rerenderOpaqueIdentifier();
39781    },
39782    unstable_isNewReconciler: enableNewReconciler
39783  };
39784}
39785
39786var now$1 = Scheduler.unstable_now;
39787var commitTime = 0;
39788var profilerStartTime = -1;
39789
39790function getCommitTime() {
39791  return commitTime;
39792}
39793
39794function recordCommitTime() {
39795
39796  commitTime = now$1();
39797}
39798
39799function startProfilerTimer(fiber) {
39800
39801  profilerStartTime = now$1();
39802
39803  if (fiber.actualStartTime < 0) {
39804    fiber.actualStartTime = now$1();
39805  }
39806}
39807
39808function stopProfilerTimerIfRunning(fiber) {
39809
39810  profilerStartTime = -1;
39811}
39812
39813function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
39814
39815  if (profilerStartTime >= 0) {
39816    var elapsedTime = now$1() - profilerStartTime;
39817    fiber.actualDuration += elapsedTime;
39818
39819    if (overrideBaseTime) {
39820      fiber.selfBaseDuration = elapsedTime;
39821    }
39822
39823    profilerStartTime = -1;
39824  }
39825}
39826
39827function transferActualDuration(fiber) {
39828  // Transfer time spent rendering these children so we don't lose it
39829  // after we rerender. This is used as a helper in special cases
39830  // where we should count the work of multiple passes.
39831  var child = fiber.child;
39832
39833  while (child) {
39834    fiber.actualDuration += child.actualDuration;
39835    child = child.sibling;
39836  }
39837}
39838
39839var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
39840var didReceiveUpdate = false;
39841var didWarnAboutBadClass;
39842var didWarnAboutModulePatternComponent;
39843var didWarnAboutContextTypeOnFunctionComponent;
39844var didWarnAboutGetDerivedStateOnFunctionComponent;
39845var didWarnAboutFunctionRefs;
39846var didWarnAboutReassigningProps;
39847var didWarnAboutRevealOrder;
39848var didWarnAboutTailOptions;
39849
39850{
39851  didWarnAboutBadClass = {};
39852  didWarnAboutModulePatternComponent = {};
39853  didWarnAboutContextTypeOnFunctionComponent = {};
39854  didWarnAboutGetDerivedStateOnFunctionComponent = {};
39855  didWarnAboutFunctionRefs = {};
39856  didWarnAboutReassigningProps = false;
39857  didWarnAboutRevealOrder = {};
39858  didWarnAboutTailOptions = {};
39859}
39860
39861function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
39862  if (current === null) {
39863    // If this is a fresh new component that hasn't been rendered yet, we
39864    // won't update its child set by applying minimal side-effects. Instead,
39865    // we will add them all to the child before it gets rendered. That means
39866    // we can optimize this reconciliation pass by not tracking side-effects.
39867    workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
39868  } else {
39869    // If the current child is the same as the work in progress, it means that
39870    // we haven't yet started any work on these children. Therefore, we use
39871    // the clone algorithm to create a copy of all the current children.
39872    // If we had any progressed work already, that is invalid at this point so
39873    // let's throw it out.
39874    workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);
39875  }
39876}
39877
39878function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {
39879  // This function is fork of reconcileChildren. It's used in cases where we
39880  // want to reconcile without matching against the existing set. This has the
39881  // effect of all current children being unmounted; even if the type and key
39882  // are the same, the old child is unmounted and a new child is created.
39883  //
39884  // To do this, we're going to go through the reconcile algorithm twice. In
39885  // the first pass, we schedule a deletion for all the current children by
39886  // passing null.
39887  workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we
39888  // pass null in place of where we usually pass the current child set. This has
39889  // the effect of remounting all children regardless of whether their
39890  // identities match.
39891
39892  workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
39893}
39894
39895function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {
39896  // TODO: current can be non-null here even if the component
39897  // hasn't yet mounted. This happens after the first render suspends.
39898  // We'll need to figure out if this is fine or can cause issues.
39899  {
39900    if (workInProgress.type !== workInProgress.elementType) {
39901      // Lazy component props can't be validated in createElement
39902      // because they're only guaranteed to be resolved here.
39903      var innerPropTypes = Component.propTypes;
39904
39905      if (innerPropTypes) {
39906        checkPropTypes(innerPropTypes, nextProps, // Resolved props
39907        'prop', getComponentName(Component));
39908      }
39909    }
39910  }
39911
39912  var render = Component.render;
39913  var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent
39914
39915  var nextChildren;
39916  prepareToReadContext(workInProgress, renderLanes);
39917
39918  {
39919    ReactCurrentOwner$1.current = workInProgress;
39920    setIsRendering(true);
39921    nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
39922
39923    if ( workInProgress.mode & StrictMode) {
39924      disableLogs();
39925
39926      try {
39927        nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
39928      } finally {
39929        reenableLogs();
39930      }
39931    }
39932
39933    setIsRendering(false);
39934  }
39935
39936  if (current !== null && !didReceiveUpdate) {
39937    bailoutHooks(current, workInProgress, renderLanes);
39938    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
39939  } // React DevTools reads this flag.
39940
39941
39942  workInProgress.flags |= PerformedWork;
39943  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
39944  return workInProgress.child;
39945}
39946
39947function updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
39948  if (current === null) {
39949    var type = Component.type;
39950
39951    if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
39952    Component.defaultProps === undefined) {
39953      var resolvedType = type;
39954
39955      {
39956        resolvedType = resolveFunctionForHotReloading(type);
39957      } // If this is a plain function component without default props,
39958      // and with only the default shallow comparison, we upgrade it
39959      // to a SimpleMemoComponent to allow fast path updates.
39960
39961
39962      workInProgress.tag = SimpleMemoComponent;
39963      workInProgress.type = resolvedType;
39964
39965      {
39966        validateFunctionComponentInDev(workInProgress, type);
39967      }
39968
39969      return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateLanes, renderLanes);
39970    }
39971
39972    {
39973      var innerPropTypes = type.propTypes;
39974
39975      if (innerPropTypes) {
39976        // Inner memo component props aren't currently validated in createElement.
39977        // We could move it there, but we'd still need this for lazy code path.
39978        checkPropTypes(innerPropTypes, nextProps, // Resolved props
39979        'prop', getComponentName(type));
39980      }
39981    }
39982
39983    var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);
39984    child.ref = workInProgress.ref;
39985    child.return = workInProgress;
39986    workInProgress.child = child;
39987    return child;
39988  }
39989
39990  {
39991    var _type = Component.type;
39992    var _innerPropTypes = _type.propTypes;
39993
39994    if (_innerPropTypes) {
39995      // Inner memo component props aren't currently validated in createElement.
39996      // We could move it there, but we'd still need this for lazy code path.
39997      checkPropTypes(_innerPropTypes, nextProps, // Resolved props
39998      'prop', getComponentName(_type));
39999    }
40000  }
40001
40002  var currentChild = current.child; // This is always exactly one child
40003
40004  if (!includesSomeLane(updateLanes, renderLanes)) {
40005    // This will be the props with resolved defaultProps,
40006    // unlike current.memoizedProps which will be the unresolved ones.
40007    var prevProps = currentChild.memoizedProps; // Default to shallow comparison
40008
40009    var compare = Component.compare;
40010    compare = compare !== null ? compare : shallowEqual;
40011
40012    if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
40013      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
40014    }
40015  } // React DevTools reads this flag.
40016
40017
40018  workInProgress.flags |= PerformedWork;
40019  var newChild = createWorkInProgress(currentChild, nextProps);
40020  newChild.ref = workInProgress.ref;
40021  newChild.return = workInProgress;
40022  workInProgress.child = newChild;
40023  return newChild;
40024}
40025
40026function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
40027  // TODO: current can be non-null here even if the component
40028  // hasn't yet mounted. This happens when the inner render suspends.
40029  // We'll need to figure out if this is fine or can cause issues.
40030  {
40031    if (workInProgress.type !== workInProgress.elementType) {
40032      // Lazy component props can't be validated in createElement
40033      // because they're only guaranteed to be resolved here.
40034      var outerMemoType = workInProgress.elementType;
40035
40036      if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
40037        // We warn when you define propTypes on lazy()
40038        // so let's just skip over it to find memo() outer wrapper.
40039        // Inner props for memo are validated later.
40040        var lazyComponent = outerMemoType;
40041        var payload = lazyComponent._payload;
40042        var init = lazyComponent._init;
40043
40044        try {
40045          outerMemoType = init(payload);
40046        } catch (x) {
40047          outerMemoType = null;
40048        } // Inner propTypes will be validated in the function component path.
40049
40050
40051        var outerPropTypes = outerMemoType && outerMemoType.propTypes;
40052
40053        if (outerPropTypes) {
40054          checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
40055          'prop', getComponentName(outerMemoType));
40056        }
40057      }
40058    }
40059  }
40060
40061  if (current !== null) {
40062    var prevProps = current.memoizedProps;
40063
40064    if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.
40065     workInProgress.type === current.type )) {
40066      didReceiveUpdate = false;
40067
40068      if (!includesSomeLane(renderLanes, updateLanes)) {
40069        // The pending lanes were cleared at the beginning of beginWork. We're
40070        // about to bail out, but there might be other lanes that weren't
40071        // included in the current render. Usually, the priority level of the
40072        // remaining updates is accumlated during the evaluation of the
40073        // component (i.e. when processing the update queue). But since since
40074        // we're bailing out early *without* evaluating the component, we need
40075        // to account for it here, too. Reset to the value of the current fiber.
40076        // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,
40077        // because a MemoComponent fiber does not have hooks or an update queue;
40078        // rather, it wraps around an inner component, which may or may not
40079        // contains hooks.
40080        // TODO: Move the reset at in beginWork out of the common path so that
40081        // this is no longer necessary.
40082        workInProgress.lanes = current.lanes;
40083        return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
40084      } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
40085        // This is a special case that only exists for legacy mode.
40086        // See https://github.com/facebook/react/pull/19216.
40087        didReceiveUpdate = true;
40088      }
40089    }
40090  }
40091
40092  return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);
40093}
40094
40095function updateOffscreenComponent(current, workInProgress, renderLanes) {
40096  var nextProps = workInProgress.pendingProps;
40097  var nextChildren = nextProps.children;
40098  var prevState = current !== null ? current.memoizedState : null;
40099
40100  if (nextProps.mode === 'hidden' || nextProps.mode === 'unstable-defer-without-hiding') {
40101    if ((workInProgress.mode & ConcurrentMode) === NoMode) {
40102      // In legacy sync mode, don't defer the subtree. Render it now.
40103      // TODO: Figure out what we should do in Blocking mode.
40104      var nextState = {
40105        baseLanes: NoLanes
40106      };
40107      workInProgress.memoizedState = nextState;
40108      pushRenderLanes(workInProgress, renderLanes);
40109    } else if (!includesSomeLane(renderLanes, OffscreenLane)) {
40110      var nextBaseLanes;
40111
40112      if (prevState !== null) {
40113        var prevBaseLanes = prevState.baseLanes;
40114        nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);
40115      } else {
40116        nextBaseLanes = renderLanes;
40117      } // Schedule this fiber to re-render at offscreen priority. Then bailout.
40118
40119
40120      {
40121        markSpawnedWork(OffscreenLane);
40122      }
40123
40124      workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);
40125      var _nextState = {
40126        baseLanes: nextBaseLanes
40127      };
40128      workInProgress.memoizedState = _nextState; // We're about to bail out, but we need to push this to the stack anyway
40129      // to avoid a push/pop misalignment.
40130
40131      pushRenderLanes(workInProgress, nextBaseLanes);
40132      return null;
40133    } else {
40134      // Rendering at offscreen, so we can clear the base lanes.
40135      var _nextState2 = {
40136        baseLanes: NoLanes
40137      };
40138      workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.
40139
40140      var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;
40141      pushRenderLanes(workInProgress, subtreeRenderLanes);
40142    }
40143  } else {
40144    var _subtreeRenderLanes;
40145
40146    if (prevState !== null) {
40147      _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we're not hidden anymore, reset the state
40148
40149      workInProgress.memoizedState = null;
40150    } else {
40151      // We weren't previously hidden, and we still aren't, so there's nothing
40152      // special to do. Need to push to the stack regardless, though, to avoid
40153      // a push/pop misalignment.
40154      _subtreeRenderLanes = renderLanes;
40155    }
40156
40157    pushRenderLanes(workInProgress, _subtreeRenderLanes);
40158  }
40159
40160  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
40161  return workInProgress.child;
40162} // Note: These happen to have identical begin phases, for now. We shouldn't hold
40163// ourselves to this constraint, though. If the behavior diverges, we should
40164// fork the function.
40165
40166
40167var updateLegacyHiddenComponent = updateOffscreenComponent;
40168
40169function updateFragment(current, workInProgress, renderLanes) {
40170  var nextChildren = workInProgress.pendingProps;
40171  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
40172  return workInProgress.child;
40173}
40174
40175function updateMode(current, workInProgress, renderLanes) {
40176  var nextChildren = workInProgress.pendingProps.children;
40177  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
40178  return workInProgress.child;
40179}
40180
40181function updateProfiler(current, workInProgress, renderLanes) {
40182  {
40183    workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase.
40184    // These are reset during render to allow the DevTools commit hook a chance to read them,
40185
40186    var stateNode = workInProgress.stateNode;
40187    stateNode.effectDuration = 0;
40188    stateNode.passiveEffectDuration = 0;
40189  }
40190
40191  var nextProps = workInProgress.pendingProps;
40192  var nextChildren = nextProps.children;
40193  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
40194  return workInProgress.child;
40195}
40196
40197function markRef(current, workInProgress) {
40198  var ref = workInProgress.ref;
40199
40200  if (current === null && ref !== null || current !== null && current.ref !== ref) {
40201    // Schedule a Ref effect
40202    workInProgress.flags |= Ref;
40203  }
40204}
40205
40206function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {
40207  {
40208    if (workInProgress.type !== workInProgress.elementType) {
40209      // Lazy component props can't be validated in createElement
40210      // because they're only guaranteed to be resolved here.
40211      var innerPropTypes = Component.propTypes;
40212
40213      if (innerPropTypes) {
40214        checkPropTypes(innerPropTypes, nextProps, // Resolved props
40215        'prop', getComponentName(Component));
40216      }
40217    }
40218  }
40219
40220  var context;
40221
40222  {
40223    var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
40224    context = getMaskedContext(workInProgress, unmaskedContext);
40225  }
40226
40227  var nextChildren;
40228  prepareToReadContext(workInProgress, renderLanes);
40229
40230  {
40231    ReactCurrentOwner$1.current = workInProgress;
40232    setIsRendering(true);
40233    nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
40234
40235    if ( workInProgress.mode & StrictMode) {
40236      disableLogs();
40237
40238      try {
40239        nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
40240      } finally {
40241        reenableLogs();
40242      }
40243    }
40244
40245    setIsRendering(false);
40246  }
40247
40248  if (current !== null && !didReceiveUpdate) {
40249    bailoutHooks(current, workInProgress, renderLanes);
40250    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
40251  } // React DevTools reads this flag.
40252
40253
40254  workInProgress.flags |= PerformedWork;
40255  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
40256  return workInProgress.child;
40257}
40258
40259function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {
40260  {
40261    if (workInProgress.type !== workInProgress.elementType) {
40262      // Lazy component props can't be validated in createElement
40263      // because they're only guaranteed to be resolved here.
40264      var innerPropTypes = Component.propTypes;
40265
40266      if (innerPropTypes) {
40267        checkPropTypes(innerPropTypes, nextProps, // Resolved props
40268        'prop', getComponentName(Component));
40269      }
40270    }
40271  } // Push context providers early to prevent context stack mismatches.
40272  // During mounting we don't know the child context yet as the instance doesn't exist.
40273  // We will invalidate the child context in finishClassComponent() right after rendering.
40274
40275
40276  var hasContext;
40277
40278  if (isContextProvider(Component)) {
40279    hasContext = true;
40280    pushContextProvider(workInProgress);
40281  } else {
40282    hasContext = false;
40283  }
40284
40285  prepareToReadContext(workInProgress, renderLanes);
40286  var instance = workInProgress.stateNode;
40287  var shouldUpdate;
40288
40289  if (instance === null) {
40290    if (current !== null) {
40291      // A class component without an instance only mounts if it suspended
40292      // inside a non-concurrent tree, in an inconsistent state. We want to
40293      // treat it like a new mount, even though an empty version of it already
40294      // committed. Disconnect the alternate pointers.
40295      current.alternate = null;
40296      workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
40297
40298      workInProgress.flags |= Placement;
40299    } // In the initial pass we might need to construct the instance.
40300
40301
40302    constructClassInstance(workInProgress, Component, nextProps);
40303    mountClassInstance(workInProgress, Component, nextProps, renderLanes);
40304    shouldUpdate = true;
40305  } else if (current === null) {
40306    // In a resume, we'll already have an instance we can reuse.
40307    shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);
40308  } else {
40309    shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);
40310  }
40311
40312  var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);
40313
40314  {
40315    var inst = workInProgress.stateNode;
40316
40317    if (shouldUpdate && inst.props !== nextProps) {
40318      if (!didWarnAboutReassigningProps) {
40319        error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');
40320      }
40321
40322      didWarnAboutReassigningProps = true;
40323    }
40324  }
40325
40326  return nextUnitOfWork;
40327}
40328
40329function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {
40330  // Refs should update even if shouldComponentUpdate returns false
40331  markRef(current, workInProgress);
40332  var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;
40333
40334  if (!shouldUpdate && !didCaptureError) {
40335    // Context providers should defer to sCU for rendering
40336    if (hasContext) {
40337      invalidateContextProvider(workInProgress, Component, false);
40338    }
40339
40340    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
40341  }
40342
40343  var instance = workInProgress.stateNode; // Rerender
40344
40345  ReactCurrentOwner$1.current = workInProgress;
40346  var nextChildren;
40347
40348  if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
40349    // If we captured an error, but getDerivedStateFromError is not defined,
40350    // unmount all the children. componentDidCatch will schedule an update to
40351    // re-render a fallback. This is temporary until we migrate everyone to
40352    // the new API.
40353    // TODO: Warn in a future release.
40354    nextChildren = null;
40355
40356    {
40357      stopProfilerTimerIfRunning();
40358    }
40359  } else {
40360    {
40361      setIsRendering(true);
40362      nextChildren = instance.render();
40363
40364      if ( workInProgress.mode & StrictMode) {
40365        disableLogs();
40366
40367        try {
40368          instance.render();
40369        } finally {
40370          reenableLogs();
40371        }
40372      }
40373
40374      setIsRendering(false);
40375    }
40376  } // React DevTools reads this flag.
40377
40378
40379  workInProgress.flags |= PerformedWork;
40380
40381  if (current !== null && didCaptureError) {
40382    // If we're recovering from an error, reconcile without reusing any of
40383    // the existing children. Conceptually, the normal children and the children
40384    // that are shown on error are two different sets, so we shouldn't reuse
40385    // normal children even if their identities match.
40386    forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);
40387  } else {
40388    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
40389  } // Memoize state using the values we just used to render.
40390  // TODO: Restructure so we never read values from the instance.
40391
40392
40393  workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.
40394
40395  if (hasContext) {
40396    invalidateContextProvider(workInProgress, Component, true);
40397  }
40398
40399  return workInProgress.child;
40400}
40401
40402function pushHostRootContext(workInProgress) {
40403  var root = workInProgress.stateNode;
40404
40405  if (root.pendingContext) {
40406    pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
40407  } else if (root.context) {
40408    // Should always be set
40409    pushTopLevelContextObject(workInProgress, root.context, false);
40410  }
40411
40412  pushHostContainer(workInProgress, root.containerInfo);
40413}
40414
40415function updateHostRoot(current, workInProgress, renderLanes) {
40416  pushHostRootContext(workInProgress);
40417  var updateQueue = workInProgress.updateQueue;
40418
40419  if (!(current !== null && updateQueue !== null)) {
40420    {
40421      throw Error( "If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue." );
40422    }
40423  }
40424
40425  var nextProps = workInProgress.pendingProps;
40426  var prevState = workInProgress.memoizedState;
40427  var prevChildren = prevState !== null ? prevState.element : null;
40428  cloneUpdateQueue(current, workInProgress);
40429  processUpdateQueue(workInProgress, nextProps, null, renderLanes);
40430  var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property
40431  // being called "element".
40432
40433  var nextChildren = nextState.element;
40434
40435  if (nextChildren === prevChildren) {
40436    resetHydrationState();
40437    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
40438  }
40439
40440  var root = workInProgress.stateNode;
40441
40442  if (root.hydrate && enterHydrationState(workInProgress)) {
40443    // If we don't have any current children this might be the first pass.
40444    // We always try to hydrate. If this isn't a hydration pass there won't
40445    // be any children to hydrate which is effectively the same thing as
40446    // not hydrating.
40447    {
40448      var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData;
40449
40450      if (mutableSourceEagerHydrationData != null) {
40451        for (var i = 0; i < mutableSourceEagerHydrationData.length; i += 2) {
40452          var mutableSource = mutableSourceEagerHydrationData[i];
40453          var version = mutableSourceEagerHydrationData[i + 1];
40454          setWorkInProgressVersion(mutableSource, version);
40455        }
40456      }
40457    }
40458
40459    var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
40460    workInProgress.child = child;
40461    var node = child;
40462
40463    while (node) {
40464      // Mark each child as hydrating. This is a fast path to know whether this
40465      // tree is part of a hydrating tree. This is used to determine if a child
40466      // node has fully mounted yet, and for scheduling event replaying.
40467      // Conceptually this is similar to Placement in that a new subtree is
40468      // inserted into the React tree here. It just happens to not need DOM
40469      // mutations because it already exists.
40470      node.flags = node.flags & ~Placement | Hydrating;
40471      node = node.sibling;
40472    }
40473  } else {
40474    // Otherwise reset hydration state in case we aborted and resumed another
40475    // root.
40476    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
40477    resetHydrationState();
40478  }
40479
40480  return workInProgress.child;
40481}
40482
40483function updateHostComponent(current, workInProgress, renderLanes) {
40484  pushHostContext(workInProgress);
40485
40486  if (current === null) {
40487    tryToClaimNextHydratableInstance(workInProgress);
40488  }
40489
40490  var type = workInProgress.type;
40491  var nextProps = workInProgress.pendingProps;
40492  var prevProps = current !== null ? current.memoizedProps : null;
40493  var nextChildren = nextProps.children;
40494  var isDirectTextChild = shouldSetTextContent(type, nextProps);
40495
40496  if (isDirectTextChild) {
40497    // We special case a direct text child of a host node. This is a common
40498    // case. We won't handle it as a reified child. We will instead handle
40499    // this in the host environment that also has access to this prop. That
40500    // avoids allocating another HostText fiber and traversing it.
40501    nextChildren = null;
40502  } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
40503    // If we're switching from a direct text child to a normal child, or to
40504    // empty, we need to schedule the text content to be reset.
40505    workInProgress.flags |= ContentReset;
40506  }
40507
40508  markRef(current, workInProgress);
40509  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
40510  return workInProgress.child;
40511}
40512
40513function updateHostText(current, workInProgress) {
40514  if (current === null) {
40515    tryToClaimNextHydratableInstance(workInProgress);
40516  } // Nothing to do here. This is terminal. We'll do the completion step
40517  // immediately after.
40518
40519
40520  return null;
40521}
40522
40523function mountLazyComponent(_current, workInProgress, elementType, updateLanes, renderLanes) {
40524  if (_current !== null) {
40525    // A lazy component only mounts if it suspended inside a non-
40526    // concurrent tree, in an inconsistent state. We want to treat it like
40527    // a new mount, even though an empty version of it already committed.
40528    // Disconnect the alternate pointers.
40529    _current.alternate = null;
40530    workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
40531
40532    workInProgress.flags |= Placement;
40533  }
40534
40535  var props = workInProgress.pendingProps;
40536  var lazyComponent = elementType;
40537  var payload = lazyComponent._payload;
40538  var init = lazyComponent._init;
40539  var Component = init(payload); // Store the unwrapped component in the type.
40540
40541  workInProgress.type = Component;
40542  var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
40543  var resolvedProps = resolveDefaultProps(Component, props);
40544  var child;
40545
40546  switch (resolvedTag) {
40547    case FunctionComponent:
40548      {
40549        {
40550          validateFunctionComponentInDev(workInProgress, Component);
40551          workInProgress.type = Component = resolveFunctionForHotReloading(Component);
40552        }
40553
40554        child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);
40555        return child;
40556      }
40557
40558    case ClassComponent:
40559      {
40560        {
40561          workInProgress.type = Component = resolveClassForHotReloading(Component);
40562        }
40563
40564        child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);
40565        return child;
40566      }
40567
40568    case ForwardRef:
40569      {
40570        {
40571          workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
40572        }
40573
40574        child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);
40575        return child;
40576      }
40577
40578    case MemoComponent:
40579      {
40580        {
40581          if (workInProgress.type !== workInProgress.elementType) {
40582            var outerPropTypes = Component.propTypes;
40583
40584            if (outerPropTypes) {
40585              checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
40586              'prop', getComponentName(Component));
40587            }
40588          }
40589        }
40590
40591        child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
40592        updateLanes, renderLanes);
40593        return child;
40594      }
40595  }
40596
40597  var hint = '';
40598
40599  {
40600    if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
40601      hint = ' Did you wrap a component in React.lazy() more than once?';
40602    }
40603  } // This message intentionally doesn't mention ForwardRef or MemoComponent
40604  // because the fact that it's a separate type of work is an
40605  // implementation detail.
40606
40607
40608  {
40609    {
40610      throw Error( "Element type is invalid. Received a promise that resolves to: " + Component + ". Lazy element type must resolve to a class or function." + hint );
40611    }
40612  }
40613}
40614
40615function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {
40616  if (_current !== null) {
40617    // An incomplete component only mounts if it suspended inside a non-
40618    // concurrent tree, in an inconsistent state. We want to treat it like
40619    // a new mount, even though an empty version of it already committed.
40620    // Disconnect the alternate pointers.
40621    _current.alternate = null;
40622    workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
40623
40624    workInProgress.flags |= Placement;
40625  } // Promote the fiber to a class and try rendering again.
40626
40627
40628  workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`
40629  // Push context providers early to prevent context stack mismatches.
40630  // During mounting we don't know the child context yet as the instance doesn't exist.
40631  // We will invalidate the child context in finishClassComponent() right after rendering.
40632
40633  var hasContext;
40634
40635  if (isContextProvider(Component)) {
40636    hasContext = true;
40637    pushContextProvider(workInProgress);
40638  } else {
40639    hasContext = false;
40640  }
40641
40642  prepareToReadContext(workInProgress, renderLanes);
40643  constructClassInstance(workInProgress, Component, nextProps);
40644  mountClassInstance(workInProgress, Component, nextProps, renderLanes);
40645  return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
40646}
40647
40648function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {
40649  if (_current !== null) {
40650    // An indeterminate component only mounts if it suspended inside a non-
40651    // concurrent tree, in an inconsistent state. We want to treat it like
40652    // a new mount, even though an empty version of it already committed.
40653    // Disconnect the alternate pointers.
40654    _current.alternate = null;
40655    workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
40656
40657    workInProgress.flags |= Placement;
40658  }
40659
40660  var props = workInProgress.pendingProps;
40661  var context;
40662
40663  {
40664    var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
40665    context = getMaskedContext(workInProgress, unmaskedContext);
40666  }
40667
40668  prepareToReadContext(workInProgress, renderLanes);
40669  var value;
40670
40671  {
40672    if (Component.prototype && typeof Component.prototype.render === 'function') {
40673      var componentName = getComponentName(Component) || 'Unknown';
40674
40675      if (!didWarnAboutBadClass[componentName]) {
40676        error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);
40677
40678        didWarnAboutBadClass[componentName] = true;
40679      }
40680    }
40681
40682    if (workInProgress.mode & StrictMode) {
40683      ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
40684    }
40685
40686    setIsRendering(true);
40687    ReactCurrentOwner$1.current = workInProgress;
40688    value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
40689    setIsRendering(false);
40690  } // React DevTools reads this flag.
40691
40692
40693  workInProgress.flags |= PerformedWork;
40694
40695  {
40696    // Support for module components is deprecated and is removed behind a flag.
40697    // Whether or not it would crash later, we want to show a good message in DEV first.
40698    if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
40699      var _componentName = getComponentName(Component) || 'Unknown';
40700
40701      if (!didWarnAboutModulePatternComponent[_componentName]) {
40702        error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);
40703
40704        didWarnAboutModulePatternComponent[_componentName] = true;
40705      }
40706    }
40707  }
40708
40709  if ( // Run these checks in production only if the flag is off.
40710  // Eventually we'll delete this branch altogether.
40711   typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
40712    {
40713      var _componentName2 = getComponentName(Component) || 'Unknown';
40714
40715      if (!didWarnAboutModulePatternComponent[_componentName2]) {
40716        error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);
40717
40718        didWarnAboutModulePatternComponent[_componentName2] = true;
40719      }
40720    } // Proceed under the assumption that this is a class instance
40721
40722
40723    workInProgress.tag = ClassComponent; // Throw out any hooks that were used.
40724
40725    workInProgress.memoizedState = null;
40726    workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.
40727    // During mounting we don't know the child context yet as the instance doesn't exist.
40728    // We will invalidate the child context in finishClassComponent() right after rendering.
40729
40730    var hasContext = false;
40731
40732    if (isContextProvider(Component)) {
40733      hasContext = true;
40734      pushContextProvider(workInProgress);
40735    } else {
40736      hasContext = false;
40737    }
40738
40739    workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;
40740    initializeUpdateQueue(workInProgress);
40741    var getDerivedStateFromProps = Component.getDerivedStateFromProps;
40742
40743    if (typeof getDerivedStateFromProps === 'function') {
40744      applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
40745    }
40746
40747    adoptClassInstance(workInProgress, value);
40748    mountClassInstance(workInProgress, Component, props, renderLanes);
40749    return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
40750  } else {
40751    // Proceed under the assumption that this is a function component
40752    workInProgress.tag = FunctionComponent;
40753
40754    {
40755
40756      if ( workInProgress.mode & StrictMode) {
40757        disableLogs();
40758
40759        try {
40760          value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
40761        } finally {
40762          reenableLogs();
40763        }
40764      }
40765    }
40766
40767    reconcileChildren(null, workInProgress, value, renderLanes);
40768
40769    {
40770      validateFunctionComponentInDev(workInProgress, Component);
40771    }
40772
40773    return workInProgress.child;
40774  }
40775}
40776
40777function validateFunctionComponentInDev(workInProgress, Component) {
40778  {
40779    if (Component) {
40780      if (Component.childContextTypes) {
40781        error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');
40782      }
40783    }
40784
40785    if (workInProgress.ref !== null) {
40786      var info = '';
40787      var ownerName = getCurrentFiberOwnerNameInDevOrNull();
40788
40789      if (ownerName) {
40790        info += '\n\nCheck the render method of `' + ownerName + '`.';
40791      }
40792
40793      var warningKey = ownerName || workInProgress._debugID || '';
40794      var debugSource = workInProgress._debugSource;
40795
40796      if (debugSource) {
40797        warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
40798      }
40799
40800      if (!didWarnAboutFunctionRefs[warningKey]) {
40801        didWarnAboutFunctionRefs[warningKey] = true;
40802
40803        error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
40804      }
40805    }
40806
40807    if (typeof Component.getDerivedStateFromProps === 'function') {
40808      var _componentName3 = getComponentName(Component) || 'Unknown';
40809
40810      if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
40811        error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);
40812
40813        didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
40814      }
40815    }
40816
40817    if (typeof Component.contextType === 'object' && Component.contextType !== null) {
40818      var _componentName4 = getComponentName(Component) || 'Unknown';
40819
40820      if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
40821        error('%s: Function components do not support contextType.', _componentName4);
40822
40823        didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
40824      }
40825    }
40826  }
40827}
40828
40829var SUSPENDED_MARKER = {
40830  dehydrated: null,
40831  retryLane: NoLane
40832};
40833
40834function mountSuspenseOffscreenState(renderLanes) {
40835  return {
40836    baseLanes: renderLanes
40837  };
40838}
40839
40840function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {
40841  return {
40842    baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes)
40843  };
40844} // TODO: Probably should inline this back
40845
40846
40847function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {
40848  // If we're already showing a fallback, there are cases where we need to
40849  // remain on that fallback regardless of whether the content has resolved.
40850  // For example, SuspenseList coordinates when nested content appears.
40851  if (current !== null) {
40852    var suspenseState = current.memoizedState;
40853
40854    if (suspenseState === null) {
40855      // Currently showing content. Don't hide it, even if ForceSuspenseFallack
40856      // is true. More precise name might be "ForceRemainSuspenseFallback".
40857      // Note: This is a factoring smell. Can't remain on a fallback if there's
40858      // no fallback to remain on.
40859      return false;
40860    }
40861  } // Not currently showing content. Consult the Suspense context.
40862
40863
40864  return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
40865}
40866
40867function getRemainingWorkInPrimaryTree(current, renderLanes) {
40868  // TODO: Should not remove render lanes that were pinged during this render
40869  return removeLanes(current.childLanes, renderLanes);
40870}
40871
40872function updateSuspenseComponent(current, workInProgress, renderLanes) {
40873  var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.
40874
40875  {
40876    if (shouldSuspend(workInProgress)) {
40877      workInProgress.flags |= DidCapture;
40878    }
40879  }
40880
40881  var suspenseContext = suspenseStackCursor.current;
40882  var showFallback = false;
40883  var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;
40884
40885  if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
40886    // Something in this boundary's subtree already suspended. Switch to
40887    // rendering the fallback children.
40888    showFallback = true;
40889    workInProgress.flags &= ~DidCapture;
40890  } else {
40891    // Attempting the main content
40892    if (current === null || current.memoizedState !== null) {
40893      // This is a new mount or this boundary is already showing a fallback state.
40894      // Mark this subtree context as having at least one invisible parent that could
40895      // handle the fallback state.
40896      // Boundaries without fallbacks or should be avoided are not considered since
40897      // they cannot handle preferred fallback states.
40898      if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {
40899        suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);
40900      }
40901    }
40902  }
40903
40904  suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
40905  pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
40906  // boundary's children. This involves some custom reconcilation logic. Two
40907  // main reasons this is so complicated.
40908  //
40909  // First, Legacy Mode has different semantics for backwards compatibility. The
40910  // primary tree will commit in an inconsistent state, so when we do the
40911  // second pass to render the fallback, we do some exceedingly, uh, clever
40912  // hacks to make that not totally break. Like transferring effects and
40913  // deletions from hidden tree. In Concurrent Mode, it's much simpler,
40914  // because we bailout on the primary tree completely and leave it in its old
40915  // state, no effects. Same as what we do for Offscreen (except that
40916  // Offscreen doesn't have the first render pass).
40917  //
40918  // Second is hydration. During hydration, the Suspense fiber has a slightly
40919  // different layout, where the child points to a dehydrated fragment, which
40920  // contains the DOM rendered by the server.
40921  //
40922  // Third, even if you set all that aside, Suspense is like error boundaries in
40923  // that we first we try to render one tree, and if that fails, we render again
40924  // and switch to a different tree. Like a try/catch block. So we have to track
40925  // which branch we're currently rendering. Ideally we would model this using
40926  // a stack.
40927
40928  if (current === null) {
40929    // Initial mount
40930    // If we're currently hydrating, try to hydrate this boundary.
40931    // But only if this has a fallback.
40932    if (nextProps.fallback !== undefined) {
40933      tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.
40934    }
40935
40936    var nextPrimaryChildren = nextProps.children;
40937    var nextFallbackChildren = nextProps.fallback;
40938
40939    if (showFallback) {
40940      var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
40941      var primaryChildFragment = workInProgress.child;
40942      primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
40943      workInProgress.memoizedState = SUSPENDED_MARKER;
40944      return fallbackFragment;
40945    } else if (typeof nextProps.unstable_expectedLoadTime === 'number') {
40946      // This is a CPU-bound tree. Skip this tree and show a placeholder to
40947      // unblock the surrounding content. Then immediately retry after the
40948      // initial commit.
40949      var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
40950
40951      var _primaryChildFragment = workInProgress.child;
40952      _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
40953      workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this to
40954      // get it started back up to attempt the next item. While in terms of
40955      // priority this work has the same priority as this current render, it's
40956      // not part of the same transition once the transition has committed. If
40957      // it's sync, we still want to yield so that it can be painted.
40958      // Conceptually, this is really the same as pinging. We can use any
40959      // RetryLane even if it's the one currently rendering since we're leaving
40960      // it behind on this node.
40961
40962      workInProgress.lanes = SomeRetryLane;
40963
40964      {
40965        markSpawnedWork(SomeRetryLane);
40966      }
40967
40968      return _fallbackFragment;
40969    } else {
40970      return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes);
40971    }
40972  } else {
40973    // This is an update.
40974    // If the current fiber has a SuspenseState, that means it's already showing
40975    // a fallback.
40976    var prevState = current.memoizedState;
40977
40978    if (prevState !== null) {
40979
40980      if (showFallback) {
40981        var _nextFallbackChildren2 = nextProps.fallback;
40982        var _nextPrimaryChildren2 = nextProps.children;
40983
40984        var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);
40985
40986        var _primaryChildFragment3 = workInProgress.child;
40987        var prevOffscreenState = current.child.memoizedState;
40988        _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);
40989        _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);
40990        workInProgress.memoizedState = SUSPENDED_MARKER;
40991        return _fallbackChildFragment;
40992      } else {
40993        var _nextPrimaryChildren3 = nextProps.children;
40994
40995        var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);
40996
40997        workInProgress.memoizedState = null;
40998        return _primaryChildFragment4;
40999      }
41000    } else {
41001      // The current tree is not already showing a fallback.
41002      if (showFallback) {
41003        // Timed out.
41004        var _nextFallbackChildren3 = nextProps.fallback;
41005        var _nextPrimaryChildren4 = nextProps.children;
41006
41007        var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);
41008
41009        var _primaryChildFragment5 = workInProgress.child;
41010        var _prevOffscreenState = current.child.memoizedState;
41011        _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);
41012        _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on the
41013        // fallback children.
41014
41015        workInProgress.memoizedState = SUSPENDED_MARKER;
41016        return _fallbackChildFragment2;
41017      } else {
41018        // Still haven't timed out. Continue rendering the children, like we
41019        // normally do.
41020        var _nextPrimaryChildren5 = nextProps.children;
41021
41022        var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);
41023
41024        workInProgress.memoizedState = null;
41025        return _primaryChildFragment6;
41026      }
41027    }
41028  }
41029}
41030
41031function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {
41032  var mode = workInProgress.mode;
41033  var primaryChildProps = {
41034    mode: 'visible',
41035    children: primaryChildren
41036  };
41037  var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null);
41038  primaryChildFragment.return = workInProgress;
41039  workInProgress.child = primaryChildFragment;
41040  return primaryChildFragment;
41041}
41042
41043function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {
41044  var mode = workInProgress.mode;
41045  var progressedPrimaryFragment = workInProgress.child;
41046  var primaryChildProps = {
41047    mode: 'hidden',
41048    children: primaryChildren
41049  };
41050  var primaryChildFragment;
41051  var fallbackChildFragment;
41052
41053  if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) {
41054    // In legacy mode, we commit the primary tree as if it successfully
41055    // completed, even though it's in an inconsistent state.
41056    primaryChildFragment = progressedPrimaryFragment;
41057    primaryChildFragment.childLanes = NoLanes;
41058    primaryChildFragment.pendingProps = primaryChildProps;
41059
41060    if ( workInProgress.mode & ProfileMode) {
41061      // Reset the durations from the first pass so they aren't included in the
41062      // final amounts. This seems counterintuitive, since we're intentionally
41063      // not measuring part of the render phase, but this makes it match what we
41064      // do in Concurrent Mode.
41065      primaryChildFragment.actualDuration = 0;
41066      primaryChildFragment.actualStartTime = -1;
41067      primaryChildFragment.selfBaseDuration = 0;
41068      primaryChildFragment.treeBaseDuration = 0;
41069    }
41070
41071    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
41072  } else {
41073    primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null);
41074    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
41075  }
41076
41077  primaryChildFragment.return = workInProgress;
41078  fallbackChildFragment.return = workInProgress;
41079  primaryChildFragment.sibling = fallbackChildFragment;
41080  workInProgress.child = primaryChildFragment;
41081  return fallbackChildFragment;
41082}
41083
41084function createWorkInProgressOffscreenFiber(current, offscreenProps) {
41085  // The props argument to `createWorkInProgress` is `any` typed, so we use this
41086  // wrapper function to constrain it.
41087  return createWorkInProgress(current, offscreenProps);
41088}
41089
41090function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {
41091  var currentPrimaryChildFragment = current.child;
41092  var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
41093  var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {
41094    mode: 'visible',
41095    children: primaryChildren
41096  });
41097
41098  if ((workInProgress.mode & BlockingMode) === NoMode) {
41099    primaryChildFragment.lanes = renderLanes;
41100  }
41101
41102  primaryChildFragment.return = workInProgress;
41103  primaryChildFragment.sibling = null;
41104
41105  if (currentFallbackChildFragment !== null) {
41106    // Delete the fallback child fragment
41107    currentFallbackChildFragment.nextEffect = null;
41108    currentFallbackChildFragment.flags = Deletion;
41109    workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;
41110  }
41111
41112  workInProgress.child = primaryChildFragment;
41113  return primaryChildFragment;
41114}
41115
41116function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {
41117  var mode = workInProgress.mode;
41118  var currentPrimaryChildFragment = current.child;
41119  var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
41120  var primaryChildProps = {
41121    mode: 'hidden',
41122    children: primaryChildren
41123  };
41124  var primaryChildFragment;
41125
41126  if ( // In legacy mode, we commit the primary tree as if it successfully
41127  // completed, even though it's in an inconsistent state.
41128  (mode & BlockingMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was
41129  // already cloned. In legacy mode, the only case where this isn't true is
41130  // when DevTools forces us to display a fallback; we skip the first render
41131  // pass entirely and go straight to rendering the fallback. (In Concurrent
41132  // Mode, SuspenseList can also trigger this scenario, but this is a legacy-
41133  // only codepath.)
41134  workInProgress.child !== currentPrimaryChildFragment) {
41135    var progressedPrimaryFragment = workInProgress.child;
41136    primaryChildFragment = progressedPrimaryFragment;
41137    primaryChildFragment.childLanes = NoLanes;
41138    primaryChildFragment.pendingProps = primaryChildProps;
41139
41140    if ( workInProgress.mode & ProfileMode) {
41141      // Reset the durations from the first pass so they aren't included in the
41142      // final amounts. This seems counterintuitive, since we're intentionally
41143      // not measuring part of the render phase, but this makes it match what we
41144      // do in Concurrent Mode.
41145      primaryChildFragment.actualDuration = 0;
41146      primaryChildFragment.actualStartTime = -1;
41147      primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;
41148      primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;
41149    } // The fallback fiber was added as a deletion effect during the first pass.
41150    // However, since we're going to remain on the fallback, we no longer want
41151    // to delete it. So we need to remove it from the list. Deletions are stored
41152    // on the same list as effects. We want to keep the effects from the primary
41153    // tree. So we copy the primary child fragment's effect list, which does not
41154    // include the fallback deletion effect.
41155
41156
41157    var progressedLastEffect = primaryChildFragment.lastEffect;
41158
41159    if (progressedLastEffect !== null) {
41160      workInProgress.firstEffect = primaryChildFragment.firstEffect;
41161      workInProgress.lastEffect = progressedLastEffect;
41162      progressedLastEffect.nextEffect = null;
41163    } else {
41164      // TODO: Reset this somewhere else? Lol legacy mode is so weird.
41165      workInProgress.firstEffect = workInProgress.lastEffect = null;
41166    }
41167  } else {
41168    primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);
41169  }
41170
41171  var fallbackChildFragment;
41172
41173  if (currentFallbackChildFragment !== null) {
41174    fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);
41175  } else {
41176    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already
41177    // mounted but this is a new fiber.
41178
41179    fallbackChildFragment.flags |= Placement;
41180  }
41181
41182  fallbackChildFragment.return = workInProgress;
41183  primaryChildFragment.return = workInProgress;
41184  primaryChildFragment.sibling = fallbackChildFragment;
41185  workInProgress.child = primaryChildFragment;
41186  return fallbackChildFragment;
41187}
41188
41189function scheduleWorkOnFiber(fiber, renderLanes) {
41190  fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
41191  var alternate = fiber.alternate;
41192
41193  if (alternate !== null) {
41194    alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
41195  }
41196
41197  scheduleWorkOnParentPath(fiber.return, renderLanes);
41198}
41199
41200function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {
41201  // Mark any Suspense boundaries with fallbacks as having work to do.
41202  // If they were previously forced into fallbacks, they may now be able
41203  // to unblock.
41204  var node = firstChild;
41205
41206  while (node !== null) {
41207    if (node.tag === SuspenseComponent) {
41208      var state = node.memoizedState;
41209
41210      if (state !== null) {
41211        scheduleWorkOnFiber(node, renderLanes);
41212      }
41213    } else if (node.tag === SuspenseListComponent) {
41214      // If the tail is hidden there might not be an Suspense boundaries
41215      // to schedule work on. In this case we have to schedule it on the
41216      // list itself.
41217      // We don't have to traverse to the children of the list since
41218      // the list will propagate the change when it rerenders.
41219      scheduleWorkOnFiber(node, renderLanes);
41220    } else if (node.child !== null) {
41221      node.child.return = node;
41222      node = node.child;
41223      continue;
41224    }
41225
41226    if (node === workInProgress) {
41227      return;
41228    }
41229
41230    while (node.sibling === null) {
41231      if (node.return === null || node.return === workInProgress) {
41232        return;
41233      }
41234
41235      node = node.return;
41236    }
41237
41238    node.sibling.return = node.return;
41239    node = node.sibling;
41240  }
41241}
41242
41243function findLastContentRow(firstChild) {
41244  // This is going to find the last row among these children that is already
41245  // showing content on the screen, as opposed to being in fallback state or
41246  // new. If a row has multiple Suspense boundaries, any of them being in the
41247  // fallback state, counts as the whole row being in a fallback state.
41248  // Note that the "rows" will be workInProgress, but any nested children
41249  // will still be current since we haven't rendered them yet. The mounted
41250  // order may not be the same as the new order. We use the new order.
41251  var row = firstChild;
41252  var lastContentRow = null;
41253
41254  while (row !== null) {
41255    var currentRow = row.alternate; // New rows can't be content rows.
41256
41257    if (currentRow !== null && findFirstSuspended(currentRow) === null) {
41258      lastContentRow = row;
41259    }
41260
41261    row = row.sibling;
41262  }
41263
41264  return lastContentRow;
41265}
41266
41267function validateRevealOrder(revealOrder) {
41268  {
41269    if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {
41270      didWarnAboutRevealOrder[revealOrder] = true;
41271
41272      if (typeof revealOrder === 'string') {
41273        switch (revealOrder.toLowerCase()) {
41274          case 'together':
41275          case 'forwards':
41276          case 'backwards':
41277            {
41278              error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());
41279
41280              break;
41281            }
41282
41283          case 'forward':
41284          case 'backward':
41285            {
41286              error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase());
41287
41288              break;
41289            }
41290
41291          default:
41292            error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
41293
41294            break;
41295        }
41296      } else {
41297        error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
41298      }
41299    }
41300  }
41301}
41302
41303function validateTailOptions(tailMode, revealOrder) {
41304  {
41305    if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {
41306      if (tailMode !== 'collapsed' && tailMode !== 'hidden') {
41307        didWarnAboutTailOptions[tailMode] = true;
41308
41309        error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode);
41310      } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {
41311        didWarnAboutTailOptions[tailMode] = true;
41312
41313        error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode);
41314      }
41315    }
41316  }
41317}
41318
41319function validateSuspenseListNestedChild(childSlot, index) {
41320  {
41321    var isArray = Array.isArray(childSlot);
41322    var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';
41323
41324    if (isArray || isIterable) {
41325      var type = isArray ? 'array' : 'iterable';
41326
41327      error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);
41328
41329      return false;
41330    }
41331  }
41332
41333  return true;
41334}
41335
41336function validateSuspenseListChildren(children, revealOrder) {
41337  {
41338    if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {
41339      if (Array.isArray(children)) {
41340        for (var i = 0; i < children.length; i++) {
41341          if (!validateSuspenseListNestedChild(children[i], i)) {
41342            return;
41343          }
41344        }
41345      } else {
41346        var iteratorFn = getIteratorFn(children);
41347
41348        if (typeof iteratorFn === 'function') {
41349          var childrenIterator = iteratorFn.call(children);
41350
41351          if (childrenIterator) {
41352            var step = childrenIterator.next();
41353            var _i = 0;
41354
41355            for (; !step.done; step = childrenIterator.next()) {
41356              if (!validateSuspenseListNestedChild(step.value, _i)) {
41357                return;
41358              }
41359
41360              _i++;
41361            }
41362          }
41363        } else {
41364          error('A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);
41365        }
41366      }
41367    }
41368  }
41369}
41370
41371function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {
41372  var renderState = workInProgress.memoizedState;
41373
41374  if (renderState === null) {
41375    workInProgress.memoizedState = {
41376      isBackwards: isBackwards,
41377      rendering: null,
41378      renderingStartTime: 0,
41379      last: lastContentRow,
41380      tail: tail,
41381      tailMode: tailMode,
41382      lastEffect: lastEffectBeforeRendering
41383    };
41384  } else {
41385    // We can reuse the existing object from previous renders.
41386    renderState.isBackwards = isBackwards;
41387    renderState.rendering = null;
41388    renderState.renderingStartTime = 0;
41389    renderState.last = lastContentRow;
41390    renderState.tail = tail;
41391    renderState.tailMode = tailMode;
41392    renderState.lastEffect = lastEffectBeforeRendering;
41393  }
41394} // This can end up rendering this component multiple passes.
41395// The first pass splits the children fibers into two sets. A head and tail.
41396// We first render the head. If anything is in fallback state, we do another
41397// pass through beginWork to rerender all children (including the tail) with
41398// the force suspend context. If the first render didn't have anything in
41399// in fallback state. Then we render each row in the tail one-by-one.
41400// That happens in the completeWork phase without going back to beginWork.
41401
41402
41403function updateSuspenseListComponent(current, workInProgress, renderLanes) {
41404  var nextProps = workInProgress.pendingProps;
41405  var revealOrder = nextProps.revealOrder;
41406  var tailMode = nextProps.tail;
41407  var newChildren = nextProps.children;
41408  validateRevealOrder(revealOrder);
41409  validateTailOptions(tailMode, revealOrder);
41410  validateSuspenseListChildren(newChildren, revealOrder);
41411  reconcileChildren(current, workInProgress, newChildren, renderLanes);
41412  var suspenseContext = suspenseStackCursor.current;
41413  var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
41414
41415  if (shouldForceFallback) {
41416    suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
41417    workInProgress.flags |= DidCapture;
41418  } else {
41419    var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;
41420
41421    if (didSuspendBefore) {
41422      // If we previously forced a fallback, we need to schedule work
41423      // on any nested boundaries to let them know to try to render
41424      // again. This is the same as context updating.
41425      propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);
41426    }
41427
41428    suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
41429  }
41430
41431  pushSuspenseContext(workInProgress, suspenseContext);
41432
41433  if ((workInProgress.mode & BlockingMode) === NoMode) {
41434    // In legacy mode, SuspenseList doesn't work so we just
41435    // use make it a noop by treating it as the default revealOrder.
41436    workInProgress.memoizedState = null;
41437  } else {
41438    switch (revealOrder) {
41439      case 'forwards':
41440        {
41441          var lastContentRow = findLastContentRow(workInProgress.child);
41442          var tail;
41443
41444          if (lastContentRow === null) {
41445            // The whole list is part of the tail.
41446            // TODO: We could fast path by just rendering the tail now.
41447            tail = workInProgress.child;
41448            workInProgress.child = null;
41449          } else {
41450            // Disconnect the tail rows after the content row.
41451            // We're going to render them separately later.
41452            tail = lastContentRow.sibling;
41453            lastContentRow.sibling = null;
41454          }
41455
41456          initSuspenseListRenderState(workInProgress, false, // isBackwards
41457          tail, lastContentRow, tailMode, workInProgress.lastEffect);
41458          break;
41459        }
41460
41461      case 'backwards':
41462        {
41463          // We're going to find the first row that has existing content.
41464          // At the same time we're going to reverse the list of everything
41465          // we pass in the meantime. That's going to be our tail in reverse
41466          // order.
41467          var _tail = null;
41468          var row = workInProgress.child;
41469          workInProgress.child = null;
41470
41471          while (row !== null) {
41472            var currentRow = row.alternate; // New rows can't be content rows.
41473
41474            if (currentRow !== null && findFirstSuspended(currentRow) === null) {
41475              // This is the beginning of the main content.
41476              workInProgress.child = row;
41477              break;
41478            }
41479
41480            var nextRow = row.sibling;
41481            row.sibling = _tail;
41482            _tail = row;
41483            row = nextRow;
41484          } // TODO: If workInProgress.child is null, we can continue on the tail immediately.
41485
41486
41487          initSuspenseListRenderState(workInProgress, true, // isBackwards
41488          _tail, null, // last
41489          tailMode, workInProgress.lastEffect);
41490          break;
41491        }
41492
41493      case 'together':
41494        {
41495          initSuspenseListRenderState(workInProgress, false, // isBackwards
41496          null, // tail
41497          null, // last
41498          undefined, workInProgress.lastEffect);
41499          break;
41500        }
41501
41502      default:
41503        {
41504          // The default reveal order is the same as not having
41505          // a boundary.
41506          workInProgress.memoizedState = null;
41507        }
41508    }
41509  }
41510
41511  return workInProgress.child;
41512}
41513
41514function updatePortalComponent(current, workInProgress, renderLanes) {
41515  pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
41516  var nextChildren = workInProgress.pendingProps;
41517
41518  if (current === null) {
41519    // Portals are special because we don't append the children during mount
41520    // but at commit. Therefore we need to track insertions which the normal
41521    // flow doesn't do during mount. This doesn't happen at the root because
41522    // the root always starts with a "current" with a null child.
41523    // TODO: Consider unifying this with how the root works.
41524    workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
41525  } else {
41526    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
41527  }
41528
41529  return workInProgress.child;
41530}
41531
41532var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
41533
41534function updateContextProvider(current, workInProgress, renderLanes) {
41535  var providerType = workInProgress.type;
41536  var context = providerType._context;
41537  var newProps = workInProgress.pendingProps;
41538  var oldProps = workInProgress.memoizedProps;
41539  var newValue = newProps.value;
41540
41541  {
41542    if (!('value' in newProps)) {
41543      if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {
41544        hasWarnedAboutUsingNoValuePropOnContextProvider = true;
41545
41546        error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');
41547      }
41548    }
41549
41550    var providerPropTypes = workInProgress.type.propTypes;
41551
41552    if (providerPropTypes) {
41553      checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');
41554    }
41555  }
41556
41557  pushProvider(workInProgress, newValue);
41558
41559  if (oldProps !== null) {
41560    var oldValue = oldProps.value;
41561    var changedBits = calculateChangedBits(context, newValue, oldValue);
41562
41563    if (changedBits === 0) {
41564      // No change. Bailout early if children are the same.
41565      if (oldProps.children === newProps.children && !hasContextChanged()) {
41566        return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
41567      }
41568    } else {
41569      // The context value changed. Search for matching consumers and schedule
41570      // them to update.
41571      propagateContextChange(workInProgress, context, changedBits, renderLanes);
41572    }
41573  }
41574
41575  var newChildren = newProps.children;
41576  reconcileChildren(current, workInProgress, newChildren, renderLanes);
41577  return workInProgress.child;
41578}
41579
41580var hasWarnedAboutUsingContextAsConsumer = false;
41581
41582function updateContextConsumer(current, workInProgress, renderLanes) {
41583  var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
41584  // DEV mode, we create a separate object for Context.Consumer that acts
41585  // like a proxy to Context. This proxy object adds unnecessary code in PROD
41586  // so we use the old behaviour (Context.Consumer references Context) to
41587  // reduce size and overhead. The separate object references context via
41588  // a property called "_context", which also gives us the ability to check
41589  // in DEV mode if this property exists or not and warn if it does not.
41590
41591  {
41592    if (context._context === undefined) {
41593      // This may be because it's a Context (rather than a Consumer).
41594      // Or it may be because it's older React where they're the same thing.
41595      // We only want to warn if we're sure it's a new React.
41596      if (context !== context.Consumer) {
41597        if (!hasWarnedAboutUsingContextAsConsumer) {
41598          hasWarnedAboutUsingContextAsConsumer = true;
41599
41600          error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
41601        }
41602      }
41603    } else {
41604      context = context._context;
41605    }
41606  }
41607
41608  var newProps = workInProgress.pendingProps;
41609  var render = newProps.children;
41610
41611  {
41612    if (typeof render !== 'function') {
41613      error('A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');
41614    }
41615  }
41616
41617  prepareToReadContext(workInProgress, renderLanes);
41618  var newValue = readContext(context, newProps.unstable_observedBits);
41619  var newChildren;
41620
41621  {
41622    ReactCurrentOwner$1.current = workInProgress;
41623    setIsRendering(true);
41624    newChildren = render(newValue);
41625    setIsRendering(false);
41626  } // React DevTools reads this flag.
41627
41628
41629  workInProgress.flags |= PerformedWork;
41630  reconcileChildren(current, workInProgress, newChildren, renderLanes);
41631  return workInProgress.child;
41632}
41633
41634function markWorkInProgressReceivedUpdate() {
41635  didReceiveUpdate = true;
41636}
41637
41638function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
41639  if (current !== null) {
41640    // Reuse previous dependencies
41641    workInProgress.dependencies = current.dependencies;
41642  }
41643
41644  {
41645    // Don't update "base" render times for bailouts.
41646    stopProfilerTimerIfRunning();
41647  }
41648
41649  markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.
41650
41651  if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {
41652    // The children don't have any work either. We can skip them.
41653    // TODO: Once we add back resuming, we should check if the children are
41654    // a work-in-progress set. If so, we need to transfer their effects.
41655    return null;
41656  } else {
41657    // This fiber doesn't have work, but its subtree does. Clone the child
41658    // fibers and continue.
41659    cloneChildFibers(current, workInProgress);
41660    return workInProgress.child;
41661  }
41662}
41663
41664function remountFiber(current, oldWorkInProgress, newWorkInProgress) {
41665  {
41666    var returnFiber = oldWorkInProgress.return;
41667
41668    if (returnFiber === null) {
41669      throw new Error('Cannot swap the root fiber.');
41670    } // Disconnect from the old current.
41671    // It will get deleted.
41672
41673
41674    current.alternate = null;
41675    oldWorkInProgress.alternate = null; // Connect to the new tree.
41676
41677    newWorkInProgress.index = oldWorkInProgress.index;
41678    newWorkInProgress.sibling = oldWorkInProgress.sibling;
41679    newWorkInProgress.return = oldWorkInProgress.return;
41680    newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.
41681
41682    if (oldWorkInProgress === returnFiber.child) {
41683      returnFiber.child = newWorkInProgress;
41684    } else {
41685      var prevSibling = returnFiber.child;
41686
41687      if (prevSibling === null) {
41688        throw new Error('Expected parent to have a child.');
41689      }
41690
41691      while (prevSibling.sibling !== oldWorkInProgress) {
41692        prevSibling = prevSibling.sibling;
41693
41694        if (prevSibling === null) {
41695          throw new Error('Expected to find the previous sibling.');
41696        }
41697      }
41698
41699      prevSibling.sibling = newWorkInProgress;
41700    } // Delete the old fiber and place the new one.
41701    // Since the old fiber is disconnected, we have to schedule it manually.
41702
41703
41704    var last = returnFiber.lastEffect;
41705
41706    if (last !== null) {
41707      last.nextEffect = current;
41708      returnFiber.lastEffect = current;
41709    } else {
41710      returnFiber.firstEffect = returnFiber.lastEffect = current;
41711    }
41712
41713    current.nextEffect = null;
41714    current.flags = Deletion;
41715    newWorkInProgress.flags |= Placement; // Restart work from the new fiber.
41716
41717    return newWorkInProgress;
41718  }
41719}
41720
41721function beginWork(current, workInProgress, renderLanes) {
41722  var updateLanes = workInProgress.lanes;
41723
41724  {
41725    if (workInProgress._debugNeedsRemount && current !== null) {
41726      // This will restart the begin phase with a new fiber.
41727      return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));
41728    }
41729  }
41730
41731  if (current !== null) {
41732    var oldProps = current.memoizedProps;
41733    var newProps = workInProgress.pendingProps;
41734
41735    if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:
41736     workInProgress.type !== current.type )) {
41737      // If props or context changed, mark the fiber as having performed work.
41738      // This may be unset if the props are determined to be equal later (memo).
41739      didReceiveUpdate = true;
41740    } else if (!includesSomeLane(renderLanes, updateLanes)) {
41741      didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering
41742      // the begin phase. There's still some bookkeeping we that needs to be done
41743      // in this optimized path, mostly pushing stuff onto the stack.
41744
41745      switch (workInProgress.tag) {
41746        case HostRoot:
41747          pushHostRootContext(workInProgress);
41748          resetHydrationState();
41749          break;
41750
41751        case HostComponent:
41752          pushHostContext(workInProgress);
41753          break;
41754
41755        case ClassComponent:
41756          {
41757            var Component = workInProgress.type;
41758
41759            if (isContextProvider(Component)) {
41760              pushContextProvider(workInProgress);
41761            }
41762
41763            break;
41764          }
41765
41766        case HostPortal:
41767          pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
41768          break;
41769
41770        case ContextProvider:
41771          {
41772            var newValue = workInProgress.memoizedProps.value;
41773            pushProvider(workInProgress, newValue);
41774            break;
41775          }
41776
41777        case Profiler:
41778          {
41779            // Profiler should only call onRender when one of its descendants actually rendered.
41780            var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
41781
41782            if (hasChildWork) {
41783              workInProgress.flags |= Update;
41784            } // Reset effect durations for the next eventual effect phase.
41785            // These are reset during render to allow the DevTools commit hook a chance to read them,
41786
41787
41788            var stateNode = workInProgress.stateNode;
41789            stateNode.effectDuration = 0;
41790            stateNode.passiveEffectDuration = 0;
41791          }
41792
41793          break;
41794
41795        case SuspenseComponent:
41796          {
41797            var state = workInProgress.memoizedState;
41798
41799            if (state !== null) {
41800              // whether to retry the primary children, or to skip over it and
41801              // go straight to the fallback. Check the priority of the primary
41802              // child fragment.
41803
41804
41805              var primaryChildFragment = workInProgress.child;
41806              var primaryChildLanes = primaryChildFragment.childLanes;
41807
41808              if (includesSomeLane(renderLanes, primaryChildLanes)) {
41809                // The primary children have pending work. Use the normal path
41810                // to attempt to render the primary children again.
41811                return updateSuspenseComponent(current, workInProgress, renderLanes);
41812              } else {
41813                // The primary child fragment does not have pending work marked
41814                // on it
41815                pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
41816                // priority. Bailout.
41817
41818                var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
41819
41820                if (child !== null) {
41821                  // The fallback children have pending work. Skip over the
41822                  // primary children and work on the fallback.
41823                  return child.sibling;
41824                } else {
41825                  return null;
41826                }
41827              }
41828            } else {
41829              pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
41830            }
41831
41832            break;
41833          }
41834
41835        case SuspenseListComponent:
41836          {
41837            var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;
41838
41839            var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
41840
41841            if (didSuspendBefore) {
41842              if (_hasChildWork) {
41843                // If something was in fallback state last time, and we have all the
41844                // same children then we're still in progressive loading state.
41845                // Something might get unblocked by state updates or retries in the
41846                // tree which will affect the tail. So we need to use the normal
41847                // path to compute the correct tail.
41848                return updateSuspenseListComponent(current, workInProgress, renderLanes);
41849              } // If none of the children had any work, that means that none of
41850              // them got retried so they'll still be blocked in the same way
41851              // as before. We can fast bail out.
41852
41853
41854              workInProgress.flags |= DidCapture;
41855            } // If nothing suspended before and we're rendering the same children,
41856            // then the tail doesn't matter. Anything new that suspends will work
41857            // in the "together" mode, so we can continue from the state we had.
41858
41859
41860            var renderState = workInProgress.memoizedState;
41861
41862            if (renderState !== null) {
41863              // Reset to the "together" mode in case we've started a different
41864              // update in the past but didn't complete it.
41865              renderState.rendering = null;
41866              renderState.tail = null;
41867              renderState.lastEffect = null;
41868            }
41869
41870            pushSuspenseContext(workInProgress, suspenseStackCursor.current);
41871
41872            if (_hasChildWork) {
41873              break;
41874            } else {
41875              // If none of the children had any work, that means that none of
41876              // them got retried so they'll still be blocked in the same way
41877              // as before. We can fast bail out.
41878              return null;
41879            }
41880          }
41881
41882        case OffscreenComponent:
41883        case LegacyHiddenComponent:
41884          {
41885            // Need to check if the tree still needs to be deferred. This is
41886            // almost identical to the logic used in the normal update path,
41887            // so we'll just enter that. The only difference is we'll bail out
41888            // at the next level instead of this one, because the child props
41889            // have not changed. Which is fine.
41890            // TODO: Probably should refactor `beginWork` to split the bailout
41891            // path from the normal path. I'm tempted to do a labeled break here
41892            // but I won't :)
41893            workInProgress.lanes = NoLanes;
41894            return updateOffscreenComponent(current, workInProgress, renderLanes);
41895          }
41896      }
41897
41898      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
41899    } else {
41900      if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
41901        // This is a special case that only exists for legacy mode.
41902        // See https://github.com/facebook/react/pull/19216.
41903        didReceiveUpdate = true;
41904      } else {
41905        // An update was scheduled on this fiber, but there are no new props
41906        // nor legacy context. Set this to false. If an update queue or context
41907        // consumer produces a changed value, it will set this to true. Otherwise,
41908        // the component will assume the children have not changed and bail out.
41909        didReceiveUpdate = false;
41910      }
41911    }
41912  } else {
41913    didReceiveUpdate = false;
41914  } // Before entering the begin phase, clear pending update priority.
41915  // TODO: This assumes that we're about to evaluate the component and process
41916  // the update queue. However, there's an exception: SimpleMemoComponent
41917  // sometimes bails out later in the begin phase. This indicates that we should
41918  // move this assignment out of the common path and into each branch.
41919
41920
41921  workInProgress.lanes = NoLanes;
41922
41923  switch (workInProgress.tag) {
41924    case IndeterminateComponent:
41925      {
41926        return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);
41927      }
41928
41929    case LazyComponent:
41930      {
41931        var elementType = workInProgress.elementType;
41932        return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes);
41933      }
41934
41935    case FunctionComponent:
41936      {
41937        var _Component = workInProgress.type;
41938        var unresolvedProps = workInProgress.pendingProps;
41939        var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
41940        return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes);
41941      }
41942
41943    case ClassComponent:
41944      {
41945        var _Component2 = workInProgress.type;
41946        var _unresolvedProps = workInProgress.pendingProps;
41947
41948        var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
41949
41950        return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes);
41951      }
41952
41953    case HostRoot:
41954      return updateHostRoot(current, workInProgress, renderLanes);
41955
41956    case HostComponent:
41957      return updateHostComponent(current, workInProgress, renderLanes);
41958
41959    case HostText:
41960      return updateHostText(current, workInProgress);
41961
41962    case SuspenseComponent:
41963      return updateSuspenseComponent(current, workInProgress, renderLanes);
41964
41965    case HostPortal:
41966      return updatePortalComponent(current, workInProgress, renderLanes);
41967
41968    case ForwardRef:
41969      {
41970        var type = workInProgress.type;
41971        var _unresolvedProps2 = workInProgress.pendingProps;
41972
41973        var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
41974
41975        return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);
41976      }
41977
41978    case Fragment:
41979      return updateFragment(current, workInProgress, renderLanes);
41980
41981    case Mode:
41982      return updateMode(current, workInProgress, renderLanes);
41983
41984    case Profiler:
41985      return updateProfiler(current, workInProgress, renderLanes);
41986
41987    case ContextProvider:
41988      return updateContextProvider(current, workInProgress, renderLanes);
41989
41990    case ContextConsumer:
41991      return updateContextConsumer(current, workInProgress, renderLanes);
41992
41993    case MemoComponent:
41994      {
41995        var _type2 = workInProgress.type;
41996        var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.
41997
41998        var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
41999
42000        {
42001          if (workInProgress.type !== workInProgress.elementType) {
42002            var outerPropTypes = _type2.propTypes;
42003
42004            if (outerPropTypes) {
42005              checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
42006              'prop', getComponentName(_type2));
42007            }
42008          }
42009        }
42010
42011        _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
42012        return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes);
42013      }
42014
42015    case SimpleMemoComponent:
42016      {
42017        return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);
42018      }
42019
42020    case IncompleteClassComponent:
42021      {
42022        var _Component3 = workInProgress.type;
42023        var _unresolvedProps4 = workInProgress.pendingProps;
42024
42025        var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
42026
42027        return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes);
42028      }
42029
42030    case SuspenseListComponent:
42031      {
42032        return updateSuspenseListComponent(current, workInProgress, renderLanes);
42033      }
42034
42035    case FundamentalComponent:
42036      {
42037
42038        break;
42039      }
42040
42041    case ScopeComponent:
42042      {
42043
42044        break;
42045      }
42046
42047    case Block:
42048      {
42049
42050        break;
42051      }
42052
42053    case OffscreenComponent:
42054      {
42055        return updateOffscreenComponent(current, workInProgress, renderLanes);
42056      }
42057
42058    case LegacyHiddenComponent:
42059      {
42060        return updateLegacyHiddenComponent(current, workInProgress, renderLanes);
42061      }
42062  }
42063
42064  {
42065    {
42066      throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
42067    }
42068  }
42069}
42070
42071function markUpdate(workInProgress) {
42072  // Tag the fiber with an update effect. This turns a Placement into
42073  // a PlacementAndUpdate.
42074  workInProgress.flags |= Update;
42075}
42076
42077function markRef$1(workInProgress) {
42078  workInProgress.flags |= Ref;
42079}
42080
42081var appendAllChildren;
42082var updateHostContainer;
42083var updateHostComponent$1;
42084var updateHostText$1;
42085
42086{
42087  // Mutation mode
42088  appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
42089    // We only have the top Fiber that was created but we need recurse down its
42090    // children to find all the terminal nodes.
42091    var node = workInProgress.child;
42092
42093    while (node !== null) {
42094      if (node.tag === HostComponent || node.tag === HostText) {
42095        appendInitialChild(parent, node.stateNode);
42096      } else if (node.tag === HostPortal) ; else if (node.child !== null) {
42097        node.child.return = node;
42098        node = node.child;
42099        continue;
42100      }
42101
42102      if (node === workInProgress) {
42103        return;
42104      }
42105
42106      while (node.sibling === null) {
42107        if (node.return === null || node.return === workInProgress) {
42108          return;
42109        }
42110
42111        node = node.return;
42112      }
42113
42114      node.sibling.return = node.return;
42115      node = node.sibling;
42116    }
42117  };
42118
42119  updateHostContainer = function (workInProgress) {// Noop
42120  };
42121
42122  updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
42123    // If we have an alternate, that means this is an update and we need to
42124    // schedule a side-effect to do the updates.
42125    var oldProps = current.memoizedProps;
42126
42127    if (oldProps === newProps) {
42128      // In mutation mode, this is sufficient for a bailout because
42129      // we won't touch this node even if children changed.
42130      return;
42131    } // If we get updated because one of our children updated, we don't
42132    // have newProps so we'll have to reuse them.
42133    // TODO: Split the update API as separate for the props vs. children.
42134    // Even better would be if children weren't special cased at all tho.
42135
42136
42137    var instance = workInProgress.stateNode;
42138    var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host
42139    // component is hitting the resume path. Figure out why. Possibly
42140    // related to `hidden`.
42141
42142    var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.
42143
42144    workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
42145    // is a new ref we mark this as an update. All the work is done in commitWork.
42146
42147    if (updatePayload) {
42148      markUpdate(workInProgress);
42149    }
42150  };
42151
42152  updateHostText$1 = function (current, workInProgress, oldText, newText) {
42153    // If the text differs, mark it as an update. All the work in done in commitWork.
42154    if (oldText !== newText) {
42155      markUpdate(workInProgress);
42156    }
42157  };
42158}
42159
42160function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
42161  if (getIsHydrating()) {
42162    // If we're hydrating, we should consume as many items as we can
42163    // so we don't leave any behind.
42164    return;
42165  }
42166
42167  switch (renderState.tailMode) {
42168    case 'hidden':
42169      {
42170        // Any insertions at the end of the tail list after this point
42171        // should be invisible. If there are already mounted boundaries
42172        // anything before them are not considered for collapsing.
42173        // Therefore we need to go through the whole tail to find if
42174        // there are any.
42175        var tailNode = renderState.tail;
42176        var lastTailNode = null;
42177
42178        while (tailNode !== null) {
42179          if (tailNode.alternate !== null) {
42180            lastTailNode = tailNode;
42181          }
42182
42183          tailNode = tailNode.sibling;
42184        } // Next we're simply going to delete all insertions after the
42185        // last rendered item.
42186
42187
42188        if (lastTailNode === null) {
42189          // All remaining items in the tail are insertions.
42190          renderState.tail = null;
42191        } else {
42192          // Detach the insertion after the last node that was already
42193          // inserted.
42194          lastTailNode.sibling = null;
42195        }
42196
42197        break;
42198      }
42199
42200    case 'collapsed':
42201      {
42202        // Any insertions at the end of the tail list after this point
42203        // should be invisible. If there are already mounted boundaries
42204        // anything before them are not considered for collapsing.
42205        // Therefore we need to go through the whole tail to find if
42206        // there are any.
42207        var _tailNode = renderState.tail;
42208        var _lastTailNode = null;
42209
42210        while (_tailNode !== null) {
42211          if (_tailNode.alternate !== null) {
42212            _lastTailNode = _tailNode;
42213          }
42214
42215          _tailNode = _tailNode.sibling;
42216        } // Next we're simply going to delete all insertions after the
42217        // last rendered item.
42218
42219
42220        if (_lastTailNode === null) {
42221          // All remaining items in the tail are insertions.
42222          if (!hasRenderedATailFallback && renderState.tail !== null) {
42223            // We suspended during the head. We want to show at least one
42224            // row at the tail. So we'll keep on and cut off the rest.
42225            renderState.tail.sibling = null;
42226          } else {
42227            renderState.tail = null;
42228          }
42229        } else {
42230          // Detach the insertion after the last node that was already
42231          // inserted.
42232          _lastTailNode.sibling = null;
42233        }
42234
42235        break;
42236      }
42237  }
42238}
42239
42240function completeWork(current, workInProgress, renderLanes) {
42241  var newProps = workInProgress.pendingProps;
42242
42243  switch (workInProgress.tag) {
42244    case IndeterminateComponent:
42245    case LazyComponent:
42246    case SimpleMemoComponent:
42247    case FunctionComponent:
42248    case ForwardRef:
42249    case Fragment:
42250    case Mode:
42251    case Profiler:
42252    case ContextConsumer:
42253    case MemoComponent:
42254      return null;
42255
42256    case ClassComponent:
42257      {
42258        var Component = workInProgress.type;
42259
42260        if (isContextProvider(Component)) {
42261          popContext(workInProgress);
42262        }
42263
42264        return null;
42265      }
42266
42267    case HostRoot:
42268      {
42269        popHostContainer(workInProgress);
42270        popTopLevelContextObject(workInProgress);
42271        resetWorkInProgressVersions();
42272        var fiberRoot = workInProgress.stateNode;
42273
42274        if (fiberRoot.pendingContext) {
42275          fiberRoot.context = fiberRoot.pendingContext;
42276          fiberRoot.pendingContext = null;
42277        }
42278
42279        if (current === null || current.child === null) {
42280          // If we hydrated, pop so that we can delete any remaining children
42281          // that weren't hydrated.
42282          var wasHydrated = popHydrationState(workInProgress);
42283
42284          if (wasHydrated) {
42285            // If we hydrated, then we'll need to schedule an update for
42286            // the commit side-effects on the root.
42287            markUpdate(workInProgress);
42288          } else if (!fiberRoot.hydrate) {
42289            // Schedule an effect to clear this container at the start of the next commit.
42290            // This handles the case of React rendering into a container with previous children.
42291            // It's also safe to do for updates too, because current.child would only be null
42292            // if the previous render was null (so the the container would already be empty).
42293            workInProgress.flags |= Snapshot;
42294          }
42295        }
42296
42297        updateHostContainer(workInProgress);
42298        return null;
42299      }
42300
42301    case HostComponent:
42302      {
42303        popHostContext(workInProgress);
42304        var rootContainerInstance = getRootHostContainer();
42305        var type = workInProgress.type;
42306
42307        if (current !== null && workInProgress.stateNode != null) {
42308          updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);
42309
42310          if (current.ref !== workInProgress.ref) {
42311            markRef$1(workInProgress);
42312          }
42313        } else {
42314          if (!newProps) {
42315            if (!(workInProgress.stateNode !== null)) {
42316              {
42317                throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
42318              }
42319            } // This can happen when we abort work.
42320
42321
42322            return null;
42323          }
42324
42325          var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
42326          // "stack" as the parent. Then append children as we go in beginWork
42327          // or completeWork depending on whether we want to add them top->down or
42328          // bottom->up. Top->down is faster in IE11.
42329
42330          var _wasHydrated = popHydrationState(workInProgress);
42331
42332          if (_wasHydrated) {
42333            // TODO: Move this and createInstance step into the beginPhase
42334            // to consolidate.
42335            if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
42336              // If changes to the hydrated node need to be applied at the
42337              // commit-phase we mark this as such.
42338              markUpdate(workInProgress);
42339            }
42340          } else {
42341            var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
42342            appendAllChildren(instance, workInProgress, false, false);
42343            workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
42344            // (eg DOM renderer supports auto-focus for certain elements).
42345            // Make sure such renderers get scheduled for later work.
42346
42347            if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
42348              markUpdate(workInProgress);
42349            }
42350          }
42351
42352          if (workInProgress.ref !== null) {
42353            // If there is a ref on a host node we need to schedule a callback
42354            markRef$1(workInProgress);
42355          }
42356        }
42357
42358        return null;
42359      }
42360
42361    case HostText:
42362      {
42363        var newText = newProps;
42364
42365        if (current && workInProgress.stateNode != null) {
42366          var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need
42367          // to schedule a side-effect to do the updates.
42368
42369          updateHostText$1(current, workInProgress, oldText, newText);
42370        } else {
42371          if (typeof newText !== 'string') {
42372            if (!(workInProgress.stateNode !== null)) {
42373              {
42374                throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
42375              }
42376            } // This can happen when we abort work.
42377
42378          }
42379
42380          var _rootContainerInstance = getRootHostContainer();
42381
42382          var _currentHostContext = getHostContext();
42383
42384          var _wasHydrated2 = popHydrationState(workInProgress);
42385
42386          if (_wasHydrated2) {
42387            if (prepareToHydrateHostTextInstance(workInProgress)) {
42388              markUpdate(workInProgress);
42389            }
42390          } else {
42391            workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
42392          }
42393        }
42394
42395        return null;
42396      }
42397
42398    case SuspenseComponent:
42399      {
42400        popSuspenseContext(workInProgress);
42401        var nextState = workInProgress.memoizedState;
42402
42403        if ((workInProgress.flags & DidCapture) !== NoFlags) {
42404          // Something suspended. Re-render with the fallback children.
42405          workInProgress.lanes = renderLanes; // Do not reset the effect list.
42406
42407          if ( (workInProgress.mode & ProfileMode) !== NoMode) {
42408            transferActualDuration(workInProgress);
42409          }
42410
42411          return workInProgress;
42412        }
42413
42414        var nextDidTimeout = nextState !== null;
42415        var prevDidTimeout = false;
42416
42417        if (current === null) {
42418          if (workInProgress.memoizedProps.fallback !== undefined) {
42419            popHydrationState(workInProgress);
42420          }
42421        } else {
42422          var prevState = current.memoizedState;
42423          prevDidTimeout = prevState !== null;
42424        }
42425
42426        if (nextDidTimeout && !prevDidTimeout) {
42427          // If this subtreee is running in blocking mode we can suspend,
42428          // otherwise we won't suspend.
42429          // TODO: This will still suspend a synchronous tree if anything
42430          // in the concurrent tree already suspended during this render.
42431          // This is a known bug.
42432          if ((workInProgress.mode & BlockingMode) !== NoMode) {
42433            // TODO: Move this back to throwException because this is too late
42434            // if this is a large tree which is common for initial loads. We
42435            // don't know if we should restart a render or not until we get
42436            // this marker, and this is too late.
42437            // If this render already had a ping or lower pri updates,
42438            // and this is the first time we know we're going to suspend we
42439            // should be able to immediately restart from within throwException.
42440            var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;
42441
42442            if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
42443              // If this was in an invisible tree or a new render, then showing
42444              // this boundary is ok.
42445              renderDidSuspend();
42446            } else {
42447              // Otherwise, we're going to have to hide content so we should
42448              // suspend for longer if possible.
42449              renderDidSuspendDelayIfPossible();
42450            }
42451          }
42452        }
42453
42454        {
42455          // TODO: Only schedule updates if these values are non equal, i.e. it changed.
42456          if (nextDidTimeout || prevDidTimeout) {
42457            // If this boundary just timed out, schedule an effect to attach a
42458            // retry listener to the promise. This flag is also used to hide the
42459            // primary children. In mutation mode, we also need the flag to
42460            // *unhide* children that were previously hidden, so check if this
42461            // is currently timed out, too.
42462            workInProgress.flags |= Update;
42463          }
42464        }
42465
42466        return null;
42467      }
42468
42469    case HostPortal:
42470      popHostContainer(workInProgress);
42471      updateHostContainer(workInProgress);
42472
42473      if (current === null) {
42474        preparePortalMount(workInProgress.stateNode.containerInfo);
42475      }
42476
42477      return null;
42478
42479    case ContextProvider:
42480      // Pop provider fiber
42481      popProvider(workInProgress);
42482      return null;
42483
42484    case IncompleteClassComponent:
42485      {
42486        // Same as class component case. I put it down here so that the tags are
42487        // sequential to ensure this switch is compiled to a jump table.
42488        var _Component = workInProgress.type;
42489
42490        if (isContextProvider(_Component)) {
42491          popContext(workInProgress);
42492        }
42493
42494        return null;
42495      }
42496
42497    case SuspenseListComponent:
42498      {
42499        popSuspenseContext(workInProgress);
42500        var renderState = workInProgress.memoizedState;
42501
42502        if (renderState === null) {
42503          // We're running in the default, "independent" mode.
42504          // We don't do anything in this mode.
42505          return null;
42506        }
42507
42508        var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;
42509        var renderedTail = renderState.rendering;
42510
42511        if (renderedTail === null) {
42512          // We just rendered the head.
42513          if (!didSuspendAlready) {
42514            // This is the first pass. We need to figure out if anything is still
42515            // suspended in the rendered set.
42516            // If new content unsuspended, but there's still some content that
42517            // didn't. Then we need to do a second pass that forces everything
42518            // to keep showing their fallbacks.
42519            // We might be suspended if something in this render pass suspended, or
42520            // something in the previous committed pass suspended. Otherwise,
42521            // there's no chance so we can skip the expensive call to
42522            // findFirstSuspended.
42523            var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);
42524
42525            if (!cannotBeSuspended) {
42526              var row = workInProgress.child;
42527
42528              while (row !== null) {
42529                var suspended = findFirstSuspended(row);
42530
42531                if (suspended !== null) {
42532                  didSuspendAlready = true;
42533                  workInProgress.flags |= DidCapture;
42534                  cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
42535                  // part of the second pass. In that case nothing will subscribe to
42536                  // its thennables. Instead, we'll transfer its thennables to the
42537                  // SuspenseList so that it can retry if they resolve.
42538                  // There might be multiple of these in the list but since we're
42539                  // going to wait for all of them anyway, it doesn't really matter
42540                  // which ones gets to ping. In theory we could get clever and keep
42541                  // track of how many dependencies remain but it gets tricky because
42542                  // in the meantime, we can add/remove/change items and dependencies.
42543                  // We might bail out of the loop before finding any but that
42544                  // doesn't matter since that means that the other boundaries that
42545                  // we did find already has their listeners attached.
42546
42547                  var newThennables = suspended.updateQueue;
42548
42549                  if (newThennables !== null) {
42550                    workInProgress.updateQueue = newThennables;
42551                    workInProgress.flags |= Update;
42552                  } // Rerender the whole list, but this time, we'll force fallbacks
42553                  // to stay in place.
42554                  // Reset the effect list before doing the second pass since that's now invalid.
42555
42556
42557                  if (renderState.lastEffect === null) {
42558                    workInProgress.firstEffect = null;
42559                  }
42560
42561                  workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.
42562
42563                  resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately
42564                  // rerender the children.
42565
42566                  pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
42567                  return workInProgress.child;
42568                }
42569
42570                row = row.sibling;
42571              }
42572            }
42573
42574            if (renderState.tail !== null && now() > getRenderTargetTime()) {
42575              // We have already passed our CPU deadline but we still have rows
42576              // left in the tail. We'll just give up further attempts to render
42577              // the main content and only render fallbacks.
42578              workInProgress.flags |= DidCapture;
42579              didSuspendAlready = true;
42580              cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
42581              // to get it started back up to attempt the next item. While in terms
42582              // of priority this work has the same priority as this current render,
42583              // it's not part of the same transition once the transition has
42584              // committed. If it's sync, we still want to yield so that it can be
42585              // painted. Conceptually, this is really the same as pinging.
42586              // We can use any RetryLane even if it's the one currently rendering
42587              // since we're leaving it behind on this node.
42588
42589              workInProgress.lanes = SomeRetryLane;
42590
42591              {
42592                markSpawnedWork(SomeRetryLane);
42593              }
42594            }
42595          } else {
42596            cutOffTailIfNeeded(renderState, false);
42597          } // Next we're going to render the tail.
42598
42599        } else {
42600          // Append the rendered row to the child list.
42601          if (!didSuspendAlready) {
42602            var _suspended = findFirstSuspended(renderedTail);
42603
42604            if (_suspended !== null) {
42605              workInProgress.flags |= DidCapture;
42606              didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
42607              // get lost if this row ends up dropped during a second pass.
42608
42609              var _newThennables = _suspended.updateQueue;
42610
42611              if (_newThennables !== null) {
42612                workInProgress.updateQueue = _newThennables;
42613                workInProgress.flags |= Update;
42614              }
42615
42616              cutOffTailIfNeeded(renderState, true); // This might have been modified.
42617
42618              if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.
42619              ) {
42620                  // We need to delete the row we just rendered.
42621                  // Reset the effect list to what it was before we rendered this
42622                  // child. The nested children have already appended themselves.
42623                  var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
42624
42625                  if (lastEffect !== null) {
42626                    lastEffect.nextEffect = null;
42627                  } // We're done.
42628
42629
42630                  return null;
42631                }
42632            } else if ( // The time it took to render last row is greater than the remaining
42633            // time we have to render. So rendering one more row would likely
42634            // exceed it.
42635            now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {
42636              // We have now passed our CPU deadline and we'll just give up further
42637              // attempts to render the main content and only render fallbacks.
42638              // The assumption is that this is usually faster.
42639              workInProgress.flags |= DidCapture;
42640              didSuspendAlready = true;
42641              cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
42642              // to get it started back up to attempt the next item. While in terms
42643              // of priority this work has the same priority as this current render,
42644              // it's not part of the same transition once the transition has
42645              // committed. If it's sync, we still want to yield so that it can be
42646              // painted. Conceptually, this is really the same as pinging.
42647              // We can use any RetryLane even if it's the one currently rendering
42648              // since we're leaving it behind on this node.
42649
42650              workInProgress.lanes = SomeRetryLane;
42651
42652              {
42653                markSpawnedWork(SomeRetryLane);
42654              }
42655            }
42656          }
42657
42658          if (renderState.isBackwards) {
42659            // The effect list of the backwards tail will have been added
42660            // to the end. This breaks the guarantee that life-cycles fire in
42661            // sibling order but that isn't a strong guarantee promised by React.
42662            // Especially since these might also just pop in during future commits.
42663            // Append to the beginning of the list.
42664            renderedTail.sibling = workInProgress.child;
42665            workInProgress.child = renderedTail;
42666          } else {
42667            var previousSibling = renderState.last;
42668
42669            if (previousSibling !== null) {
42670              previousSibling.sibling = renderedTail;
42671            } else {
42672              workInProgress.child = renderedTail;
42673            }
42674
42675            renderState.last = renderedTail;
42676          }
42677        }
42678
42679        if (renderState.tail !== null) {
42680          // We still have tail rows to render.
42681          // Pop a row.
42682          var next = renderState.tail;
42683          renderState.rendering = next;
42684          renderState.tail = next.sibling;
42685          renderState.lastEffect = workInProgress.lastEffect;
42686          renderState.renderingStartTime = now();
42687          next.sibling = null; // Restore the context.
42688          // TODO: We can probably just avoid popping it instead and only
42689          // setting it the first time we go from not suspended to suspended.
42690
42691          var suspenseContext = suspenseStackCursor.current;
42692
42693          if (didSuspendAlready) {
42694            suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
42695          } else {
42696            suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
42697          }
42698
42699          pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.
42700
42701          return next;
42702        }
42703
42704        return null;
42705      }
42706
42707    case FundamentalComponent:
42708      {
42709
42710        break;
42711      }
42712
42713    case ScopeComponent:
42714      {
42715
42716        break;
42717      }
42718
42719    case Block:
42720
42721      break;
42722
42723    case OffscreenComponent:
42724    case LegacyHiddenComponent:
42725      {
42726        popRenderLanes(workInProgress);
42727
42728        if (current !== null) {
42729          var _nextState = workInProgress.memoizedState;
42730          var _prevState = current.memoizedState;
42731          var prevIsHidden = _prevState !== null;
42732          var nextIsHidden = _nextState !== null;
42733
42734          if (prevIsHidden !== nextIsHidden && newProps.mode !== 'unstable-defer-without-hiding') {
42735            workInProgress.flags |= Update;
42736          }
42737        }
42738
42739        return null;
42740      }
42741  }
42742
42743  {
42744    {
42745      throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
42746    }
42747  }
42748}
42749
42750function unwindWork(workInProgress, renderLanes) {
42751  switch (workInProgress.tag) {
42752    case ClassComponent:
42753      {
42754        var Component = workInProgress.type;
42755
42756        if (isContextProvider(Component)) {
42757          popContext(workInProgress);
42758        }
42759
42760        var flags = workInProgress.flags;
42761
42762        if (flags & ShouldCapture) {
42763          workInProgress.flags = flags & ~ShouldCapture | DidCapture;
42764
42765          if ( (workInProgress.mode & ProfileMode) !== NoMode) {
42766            transferActualDuration(workInProgress);
42767          }
42768
42769          return workInProgress;
42770        }
42771
42772        return null;
42773      }
42774
42775    case HostRoot:
42776      {
42777        popHostContainer(workInProgress);
42778        popTopLevelContextObject(workInProgress);
42779        resetWorkInProgressVersions();
42780        var _flags = workInProgress.flags;
42781
42782        if (!((_flags & DidCapture) === NoFlags)) {
42783          {
42784            throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." );
42785          }
42786        }
42787
42788        workInProgress.flags = _flags & ~ShouldCapture | DidCapture;
42789        return workInProgress;
42790      }
42791
42792    case HostComponent:
42793      {
42794        // TODO: popHydrationState
42795        popHostContext(workInProgress);
42796        return null;
42797      }
42798
42799    case SuspenseComponent:
42800      {
42801        popSuspenseContext(workInProgress);
42802
42803        var _flags2 = workInProgress.flags;
42804
42805        if (_flags2 & ShouldCapture) {
42806          workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
42807
42808          if ( (workInProgress.mode & ProfileMode) !== NoMode) {
42809            transferActualDuration(workInProgress);
42810          }
42811
42812          return workInProgress;
42813        }
42814
42815        return null;
42816      }
42817
42818    case SuspenseListComponent:
42819      {
42820        popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been
42821        // caught by a nested boundary. If not, it should bubble through.
42822
42823        return null;
42824      }
42825
42826    case HostPortal:
42827      popHostContainer(workInProgress);
42828      return null;
42829
42830    case ContextProvider:
42831      popProvider(workInProgress);
42832      return null;
42833
42834    case OffscreenComponent:
42835    case LegacyHiddenComponent:
42836      popRenderLanes(workInProgress);
42837      return null;
42838
42839    default:
42840      return null;
42841  }
42842}
42843
42844function unwindInterruptedWork(interruptedWork) {
42845  switch (interruptedWork.tag) {
42846    case ClassComponent:
42847      {
42848        var childContextTypes = interruptedWork.type.childContextTypes;
42849
42850        if (childContextTypes !== null && childContextTypes !== undefined) {
42851          popContext(interruptedWork);
42852        }
42853
42854        break;
42855      }
42856
42857    case HostRoot:
42858      {
42859        popHostContainer(interruptedWork);
42860        popTopLevelContextObject(interruptedWork);
42861        resetWorkInProgressVersions();
42862        break;
42863      }
42864
42865    case HostComponent:
42866      {
42867        popHostContext(interruptedWork);
42868        break;
42869      }
42870
42871    case HostPortal:
42872      popHostContainer(interruptedWork);
42873      break;
42874
42875    case SuspenseComponent:
42876      popSuspenseContext(interruptedWork);
42877      break;
42878
42879    case SuspenseListComponent:
42880      popSuspenseContext(interruptedWork);
42881      break;
42882
42883    case ContextProvider:
42884      popProvider(interruptedWork);
42885      break;
42886
42887    case OffscreenComponent:
42888    case LegacyHiddenComponent:
42889      popRenderLanes(interruptedWork);
42890      break;
42891  }
42892}
42893
42894function createCapturedValue(value, source) {
42895  // If the value is an error, call this function immediately after it is thrown
42896  // so the stack is accurate.
42897  return {
42898    value: value,
42899    source: source,
42900    stack: getStackByFiberInDevAndProd(source)
42901  };
42902}
42903
42904// This module is forked in different environments.
42905// By default, return `true` to log errors to the console.
42906// Forks can return `false` if this isn't desirable.
42907function showErrorDialog(boundary, errorInfo) {
42908  return true;
42909}
42910
42911function logCapturedError(boundary, errorInfo) {
42912  try {
42913    var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.
42914    // This enables renderers like ReactNative to better manage redbox behavior.
42915
42916    if (logError === false) {
42917      return;
42918    }
42919
42920    var error = errorInfo.value;
42921
42922    if (true) {
42923      var source = errorInfo.source;
42924      var stack = errorInfo.stack;
42925      var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling
42926      // `preventDefault()` in window `error` handler.
42927      // We record this information as an expando on the error.
42928
42929      if (error != null && error._suppressLogging) {
42930        if (boundary.tag === ClassComponent) {
42931          // The error is recoverable and was silenced.
42932          // Ignore it and don't print the stack addendum.
42933          // This is handy for testing error boundaries without noise.
42934          return;
42935        } // The error is fatal. Since the silencing might have
42936        // been accidental, we'll surface it anyway.
42937        // However, the browser would have silenced the original error
42938        // so we'll print it first, and then print the stack addendum.
42939
42940
42941        console['error'](error); // Don't transform to our wrapper
42942        // For a more detailed description of this block, see:
42943        // https://github.com/facebook/react/pull/13384
42944      }
42945
42946      var componentName = source ? getComponentName(source.type) : null;
42947      var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
42948      var errorBoundaryMessage;
42949      var errorBoundaryName = getComponentName(boundary.type);
42950
42951      if (errorBoundaryName) {
42952        errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
42953      } else {
42954        errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';
42955      }
42956
42957      var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
42958      // We don't include the original error message and JS stack because the browser
42959      // has already printed it. Even if the application swallows the error, it is still
42960      // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
42961
42962      console['error'](combinedMessage); // Don't transform to our wrapper
42963    } else {}
42964  } catch (e) {
42965    // This method must not throw, or React internal state will get messed up.
42966    // If console.error is overridden, or logCapturedError() shows a dialog that throws,
42967    // we want to report this error outside of the normal stack as a last resort.
42968    // https://github.com/facebook/react/issues/13188
42969    setTimeout(function () {
42970      throw e;
42971    });
42972  }
42973}
42974
42975var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
42976
42977function createRootErrorUpdate(fiber, errorInfo, lane) {
42978  var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.
42979
42980  update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
42981  // being called "element".
42982
42983  update.payload = {
42984    element: null
42985  };
42986  var error = errorInfo.value;
42987
42988  update.callback = function () {
42989    onUncaughtError(error);
42990    logCapturedError(fiber, errorInfo);
42991  };
42992
42993  return update;
42994}
42995
42996function createClassErrorUpdate(fiber, errorInfo, lane) {
42997  var update = createUpdate(NoTimestamp, lane);
42998  update.tag = CaptureUpdate;
42999  var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
43000
43001  if (typeof getDerivedStateFromError === 'function') {
43002    var error$1 = errorInfo.value;
43003
43004    update.payload = function () {
43005      logCapturedError(fiber, errorInfo);
43006      return getDerivedStateFromError(error$1);
43007    };
43008  }
43009
43010  var inst = fiber.stateNode;
43011
43012  if (inst !== null && typeof inst.componentDidCatch === 'function') {
43013    update.callback = function callback() {
43014      {
43015        markFailedErrorBoundaryForHotReloading(fiber);
43016      }
43017
43018      if (typeof getDerivedStateFromError !== 'function') {
43019        // To preserve the preexisting retry behavior of error boundaries,
43020        // we keep track of which ones already failed during this batch.
43021        // This gets reset before we yield back to the browser.
43022        // TODO: Warn in strict mode if getDerivedStateFromError is
43023        // not defined.
43024        markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined
43025
43026        logCapturedError(fiber, errorInfo);
43027      }
43028
43029      var error$1 = errorInfo.value;
43030      var stack = errorInfo.stack;
43031      this.componentDidCatch(error$1, {
43032        componentStack: stack !== null ? stack : ''
43033      });
43034
43035      {
43036        if (typeof getDerivedStateFromError !== 'function') {
43037          // If componentDidCatch is the only error boundary method defined,
43038          // then it needs to call setState to recover from errors.
43039          // If no state update is scheduled then the boundary will swallow the error.
43040          if (!includesSomeLane(fiber.lanes, SyncLane)) {
43041            error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
43042          }
43043        }
43044      }
43045    };
43046  } else {
43047    update.callback = function () {
43048      markFailedErrorBoundaryForHotReloading(fiber);
43049    };
43050  }
43051
43052  return update;
43053}
43054
43055function attachPingListener(root, wakeable, lanes) {
43056  // Attach a listener to the promise to "ping" the root and retry. But only if
43057  // one does not already exist for the lanes we're currently rendering (which
43058  // acts like a "thread ID" here).
43059  var pingCache = root.pingCache;
43060  var threadIDs;
43061
43062  if (pingCache === null) {
43063    pingCache = root.pingCache = new PossiblyWeakMap$1();
43064    threadIDs = new Set();
43065    pingCache.set(wakeable, threadIDs);
43066  } else {
43067    threadIDs = pingCache.get(wakeable);
43068
43069    if (threadIDs === undefined) {
43070      threadIDs = new Set();
43071      pingCache.set(wakeable, threadIDs);
43072    }
43073  }
43074
43075  if (!threadIDs.has(lanes)) {
43076    // Memoize using the thread ID to prevent redundant listeners.
43077    threadIDs.add(lanes);
43078    var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);
43079    wakeable.then(ping, ping);
43080  }
43081}
43082
43083function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {
43084  // The source fiber did not complete.
43085  sourceFiber.flags |= Incomplete; // Its effect list is no longer valid.
43086
43087  sourceFiber.firstEffect = sourceFiber.lastEffect = null;
43088
43089  if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
43090    // This is a wakeable.
43091    var wakeable = value;
43092
43093    if ((sourceFiber.mode & BlockingMode) === NoMode) {
43094      // Reset the memoizedState to what it was before we attempted
43095      // to render it.
43096      var currentSource = sourceFiber.alternate;
43097
43098      if (currentSource) {
43099        sourceFiber.updateQueue = currentSource.updateQueue;
43100        sourceFiber.memoizedState = currentSource.memoizedState;
43101        sourceFiber.lanes = currentSource.lanes;
43102      } else {
43103        sourceFiber.updateQueue = null;
43104        sourceFiber.memoizedState = null;
43105      }
43106    }
43107
43108    var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.
43109
43110    var _workInProgress = returnFiber;
43111
43112    do {
43113      if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
43114        // Found the nearest boundary.
43115        // Stash the promise on the boundary fiber. If the boundary times out, we'll
43116        // attach another listener to flip the boundary back to its normal state.
43117        var wakeables = _workInProgress.updateQueue;
43118
43119        if (wakeables === null) {
43120          var updateQueue = new Set();
43121          updateQueue.add(wakeable);
43122          _workInProgress.updateQueue = updateQueue;
43123        } else {
43124          wakeables.add(wakeable);
43125        } // If the boundary is outside of blocking mode, we should *not*
43126        // suspend the commit. Pretend as if the suspended component rendered
43127        // null and keep rendering. In the commit phase, we'll schedule a
43128        // subsequent synchronous update to re-render the Suspense.
43129        //
43130        // Note: It doesn't matter whether the component that suspended was
43131        // inside a blocking mode tree. If the Suspense is outside of it, we
43132        // should *not* suspend the commit.
43133
43134
43135        if ((_workInProgress.mode & BlockingMode) === NoMode) {
43136          _workInProgress.flags |= DidCapture;
43137          sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.
43138          // But we shouldn't call any lifecycle methods or callbacks. Remove
43139          // all lifecycle effect tags.
43140
43141          sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);
43142
43143          if (sourceFiber.tag === ClassComponent) {
43144            var currentSourceFiber = sourceFiber.alternate;
43145
43146            if (currentSourceFiber === null) {
43147              // This is a new mount. Change the tag so it's not mistaken for a
43148              // completed class component. For example, we should not call
43149              // componentWillUnmount if it is deleted.
43150              sourceFiber.tag = IncompleteClassComponent;
43151            } else {
43152              // When we try rendering again, we should not reuse the current fiber,
43153              // since it's known to be in an inconsistent state. Use a force update to
43154              // prevent a bail out.
43155              var update = createUpdate(NoTimestamp, SyncLane);
43156              update.tag = ForceUpdate;
43157              enqueueUpdate(sourceFiber, update);
43158            }
43159          } // The source fiber did not complete. Mark it with Sync priority to
43160          // indicate that it still has pending work.
43161
43162
43163          sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // Exit without suspending.
43164
43165          return;
43166        } // Confirmed that the boundary is in a concurrent mode tree. Continue
43167        // with the normal suspend path.
43168        //
43169        // After this we'll use a set of heuristics to determine whether this
43170        // render pass will run to completion or restart or "suspend" the commit.
43171        // The actual logic for this is spread out in different places.
43172        //
43173        // This first principle is that if we're going to suspend when we complete
43174        // a root, then we should also restart if we get an update or ping that
43175        // might unsuspend it, and vice versa. The only reason to suspend is
43176        // because you think you might want to restart before committing. However,
43177        // it doesn't make sense to restart only while in the period we're suspended.
43178        //
43179        // Restarting too aggressively is also not good because it starves out any
43180        // intermediate loading state. So we use heuristics to determine when.
43181        // Suspense Heuristics
43182        //
43183        // If nothing threw a Promise or all the same fallbacks are already showing,
43184        // then don't suspend/restart.
43185        //
43186        // If this is an initial render of a new tree of Suspense boundaries and
43187        // those trigger a fallback, then don't suspend/restart. We want to ensure
43188        // that we can show the initial loading state as quickly as possible.
43189        //
43190        // If we hit a "Delayed" case, such as when we'd switch from content back into
43191        // a fallback, then we should always suspend/restart. Transitions apply
43192        // to this case. If none is defined, JND is used instead.
43193        //
43194        // If we're already showing a fallback and it gets "retried", allowing us to show
43195        // another level, but there's still an inner boundary that would show a fallback,
43196        // then we suspend/restart for 500ms since the last time we showed a fallback
43197        // anywhere in the tree. This effectively throttles progressive loading into a
43198        // consistent train of commits. This also gives us an opportunity to restart to
43199        // get to the completed state slightly earlier.
43200        //
43201        // If there's ambiguity due to batching it's resolved in preference of:
43202        // 1) "delayed", 2) "initial render", 3) "retry".
43203        //
43204        // We want to ensure that a "busy" state doesn't get force committed. We want to
43205        // ensure that new initial loading states can commit as soon as possible.
43206
43207
43208        attachPingListener(root, wakeable, rootRenderLanes);
43209        _workInProgress.flags |= ShouldCapture;
43210        _workInProgress.lanes = rootRenderLanes;
43211        return;
43212      } // This boundary already captured during this render. Continue to the next
43213      // boundary.
43214
43215
43216      _workInProgress = _workInProgress.return;
43217    } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
43218    // TODO: Use invariant so the message is stripped in prod?
43219
43220
43221    value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.');
43222  } // We didn't find a boundary that could handle this type of exception. Start
43223  // over and traverse parent path again, this time treating the exception
43224  // as an error.
43225
43226
43227  renderDidError();
43228  value = createCapturedValue(value, sourceFiber);
43229  var workInProgress = returnFiber;
43230
43231  do {
43232    switch (workInProgress.tag) {
43233      case HostRoot:
43234        {
43235          var _errorInfo = value;
43236          workInProgress.flags |= ShouldCapture;
43237          var lane = pickArbitraryLane(rootRenderLanes);
43238          workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);
43239
43240          var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);
43241
43242          enqueueCapturedUpdate(workInProgress, _update);
43243          return;
43244        }
43245
43246      case ClassComponent:
43247        // Capture and retry
43248        var errorInfo = value;
43249        var ctor = workInProgress.type;
43250        var instance = workInProgress.stateNode;
43251
43252        if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
43253          workInProgress.flags |= ShouldCapture;
43254
43255          var _lane = pickArbitraryLane(rootRenderLanes);
43256
43257          workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state
43258
43259          var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);
43260
43261          enqueueCapturedUpdate(workInProgress, _update2);
43262          return;
43263        }
43264
43265        break;
43266    }
43267
43268    workInProgress = workInProgress.return;
43269  } while (workInProgress !== null);
43270}
43271
43272var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
43273
43274{
43275  didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
43276}
43277
43278var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
43279
43280var callComponentWillUnmountWithTimer = function (current, instance) {
43281  instance.props = current.memoizedProps;
43282  instance.state = current.memoizedState;
43283
43284  {
43285    instance.componentWillUnmount();
43286  }
43287}; // Capture errors so they don't interrupt unmounting.
43288
43289
43290function safelyCallComponentWillUnmount(current, instance) {
43291  {
43292    invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);
43293
43294    if (hasCaughtError()) {
43295      var unmountError = clearCaughtError();
43296      captureCommitPhaseError(current, unmountError);
43297    }
43298  }
43299}
43300
43301function safelyDetachRef(current) {
43302  var ref = current.ref;
43303
43304  if (ref !== null) {
43305    if (typeof ref === 'function') {
43306      {
43307        invokeGuardedCallback(null, ref, null, null);
43308
43309        if (hasCaughtError()) {
43310          var refError = clearCaughtError();
43311          captureCommitPhaseError(current, refError);
43312        }
43313      }
43314    } else {
43315      ref.current = null;
43316    }
43317  }
43318}
43319
43320function safelyCallDestroy(current, destroy) {
43321  {
43322    invokeGuardedCallback(null, destroy, null);
43323
43324    if (hasCaughtError()) {
43325      var error = clearCaughtError();
43326      captureCommitPhaseError(current, error);
43327    }
43328  }
43329}
43330
43331function commitBeforeMutationLifeCycles(current, finishedWork) {
43332  switch (finishedWork.tag) {
43333    case FunctionComponent:
43334    case ForwardRef:
43335    case SimpleMemoComponent:
43336    case Block:
43337      {
43338        return;
43339      }
43340
43341    case ClassComponent:
43342      {
43343        if (finishedWork.flags & Snapshot) {
43344          if (current !== null) {
43345            var prevProps = current.memoizedProps;
43346            var prevState = current.memoizedState;
43347            var instance = finishedWork.stateNode; // We could update instance props and state here,
43348            // but instead we rely on them being set during last render.
43349            // TODO: revisit this when we implement resuming.
43350
43351            {
43352              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
43353                if (instance.props !== finishedWork.memoizedProps) {
43354                  error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
43355                }
43356
43357                if (instance.state !== finishedWork.memoizedState) {
43358                  error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
43359                }
43360              }
43361            }
43362
43363            var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
43364
43365            {
43366              var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
43367
43368              if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
43369                didWarnSet.add(finishedWork.type);
43370
43371                error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
43372              }
43373            }
43374
43375            instance.__reactInternalSnapshotBeforeUpdate = snapshot;
43376          }
43377        }
43378
43379        return;
43380      }
43381
43382    case HostRoot:
43383      {
43384        {
43385          if (finishedWork.flags & Snapshot) {
43386            var root = finishedWork.stateNode;
43387            clearContainer(root.containerInfo);
43388          }
43389        }
43390
43391        return;
43392      }
43393
43394    case HostComponent:
43395    case HostText:
43396    case HostPortal:
43397    case IncompleteClassComponent:
43398      // Nothing to do for these component types
43399      return;
43400  }
43401
43402  {
43403    {
43404      throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
43405    }
43406  }
43407}
43408
43409function commitHookEffectListUnmount(tag, finishedWork) {
43410  var updateQueue = finishedWork.updateQueue;
43411  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
43412
43413  if (lastEffect !== null) {
43414    var firstEffect = lastEffect.next;
43415    var effect = firstEffect;
43416
43417    do {
43418      if ((effect.tag & tag) === tag) {
43419        // Unmount
43420        var destroy = effect.destroy;
43421        effect.destroy = undefined;
43422
43423        if (destroy !== undefined) {
43424          destroy();
43425        }
43426      }
43427
43428      effect = effect.next;
43429    } while (effect !== firstEffect);
43430  }
43431}
43432
43433function commitHookEffectListMount(tag, finishedWork) {
43434  var updateQueue = finishedWork.updateQueue;
43435  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
43436
43437  if (lastEffect !== null) {
43438    var firstEffect = lastEffect.next;
43439    var effect = firstEffect;
43440
43441    do {
43442      if ((effect.tag & tag) === tag) {
43443        // Mount
43444        var create = effect.create;
43445        effect.destroy = create();
43446
43447        {
43448          var destroy = effect.destroy;
43449
43450          if (destroy !== undefined && typeof destroy !== 'function') {
43451            var addendum = void 0;
43452
43453            if (destroy === null) {
43454              addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
43455            } else if (typeof destroy.then === 'function') {
43456              addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + '  async function fetchData() {\n' + '    // You can await here\n' + '    const response = await MyAPI.getData(someId);\n' + '    // ...\n' + '  }\n' + '  fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';
43457            } else {
43458              addendum = ' You returned: ' + destroy;
43459            }
43460
43461            error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s', addendum);
43462          }
43463        }
43464      }
43465
43466      effect = effect.next;
43467    } while (effect !== firstEffect);
43468  }
43469}
43470
43471function schedulePassiveEffects(finishedWork) {
43472  var updateQueue = finishedWork.updateQueue;
43473  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
43474
43475  if (lastEffect !== null) {
43476    var firstEffect = lastEffect.next;
43477    var effect = firstEffect;
43478
43479    do {
43480      var _effect = effect,
43481          next = _effect.next,
43482          tag = _effect.tag;
43483
43484      if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) {
43485        enqueuePendingPassiveHookEffectUnmount(finishedWork, effect);
43486        enqueuePendingPassiveHookEffectMount(finishedWork, effect);
43487      }
43488
43489      effect = next;
43490    } while (effect !== firstEffect);
43491  }
43492}
43493
43494function commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) {
43495  switch (finishedWork.tag) {
43496    case FunctionComponent:
43497    case ForwardRef:
43498    case SimpleMemoComponent:
43499    case Block:
43500      {
43501        // At this point layout effects have already been destroyed (during mutation phase).
43502        // This is done to prevent sibling component effects from interfering with each other,
43503        // e.g. a destroy function in one component should never override a ref set
43504        // by a create function in another component during the same commit.
43505        {
43506          commitHookEffectListMount(Layout | HasEffect, finishedWork);
43507        }
43508
43509        schedulePassiveEffects(finishedWork);
43510        return;
43511      }
43512
43513    case ClassComponent:
43514      {
43515        var instance = finishedWork.stateNode;
43516
43517        if (finishedWork.flags & Update) {
43518          if (current === null) {
43519            // We could update instance props and state here,
43520            // but instead we rely on them being set during last render.
43521            // TODO: revisit this when we implement resuming.
43522            {
43523              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
43524                if (instance.props !== finishedWork.memoizedProps) {
43525                  error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
43526                }
43527
43528                if (instance.state !== finishedWork.memoizedState) {
43529                  error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
43530                }
43531              }
43532            }
43533
43534            {
43535              instance.componentDidMount();
43536            }
43537          } else {
43538            var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
43539            var prevState = current.memoizedState; // We could update instance props and state here,
43540            // but instead we rely on them being set during last render.
43541            // TODO: revisit this when we implement resuming.
43542
43543            {
43544              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
43545                if (instance.props !== finishedWork.memoizedProps) {
43546                  error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
43547                }
43548
43549                if (instance.state !== finishedWork.memoizedState) {
43550                  error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
43551                }
43552              }
43553            }
43554
43555            {
43556              instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
43557            }
43558          }
43559        } // TODO: I think this is now always non-null by the time it reaches the
43560        // commit phase. Consider removing the type check.
43561
43562
43563        var updateQueue = finishedWork.updateQueue;
43564
43565        if (updateQueue !== null) {
43566          {
43567            if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
43568              if (instance.props !== finishedWork.memoizedProps) {
43569                error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
43570              }
43571
43572              if (instance.state !== finishedWork.memoizedState) {
43573                error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
43574              }
43575            }
43576          } // We could update instance props and state here,
43577          // but instead we rely on them being set during last render.
43578          // TODO: revisit this when we implement resuming.
43579
43580
43581          commitUpdateQueue(finishedWork, updateQueue, instance);
43582        }
43583
43584        return;
43585      }
43586
43587    case HostRoot:
43588      {
43589        // TODO: I think this is now always non-null by the time it reaches the
43590        // commit phase. Consider removing the type check.
43591        var _updateQueue = finishedWork.updateQueue;
43592
43593        if (_updateQueue !== null) {
43594          var _instance = null;
43595
43596          if (finishedWork.child !== null) {
43597            switch (finishedWork.child.tag) {
43598              case HostComponent:
43599                _instance = getPublicInstance(finishedWork.child.stateNode);
43600                break;
43601
43602              case ClassComponent:
43603                _instance = finishedWork.child.stateNode;
43604                break;
43605            }
43606          }
43607
43608          commitUpdateQueue(finishedWork, _updateQueue, _instance);
43609        }
43610
43611        return;
43612      }
43613
43614    case HostComponent:
43615      {
43616        var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted
43617        // (eg DOM renderer may schedule auto-focus for inputs and form controls).
43618        // These effects should only be committed when components are first mounted,
43619        // aka when there is no current/alternate.
43620
43621        if (current === null && finishedWork.flags & Update) {
43622          var type = finishedWork.type;
43623          var props = finishedWork.memoizedProps;
43624          commitMount(_instance2, type, props);
43625        }
43626
43627        return;
43628      }
43629
43630    case HostText:
43631      {
43632        // We have no life-cycles associated with text.
43633        return;
43634      }
43635
43636    case HostPortal:
43637      {
43638        // We have no life-cycles associated with portals.
43639        return;
43640      }
43641
43642    case Profiler:
43643      {
43644        {
43645          var _finishedWork$memoize2 = finishedWork.memoizedProps,
43646              onCommit = _finishedWork$memoize2.onCommit,
43647              onRender = _finishedWork$memoize2.onRender;
43648          var effectDuration = finishedWork.stateNode.effectDuration;
43649          var commitTime = getCommitTime();
43650
43651          if (typeof onRender === 'function') {
43652            {
43653              onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions);
43654            }
43655          }
43656        }
43657
43658        return;
43659      }
43660
43661    case SuspenseComponent:
43662      {
43663        commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
43664        return;
43665      }
43666
43667    case SuspenseListComponent:
43668    case IncompleteClassComponent:
43669    case FundamentalComponent:
43670    case ScopeComponent:
43671    case OffscreenComponent:
43672    case LegacyHiddenComponent:
43673      return;
43674  }
43675
43676  {
43677    {
43678      throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
43679    }
43680  }
43681}
43682
43683function hideOrUnhideAllChildren(finishedWork, isHidden) {
43684  {
43685    // We only have the top Fiber that was inserted but we need to recurse down its
43686    // children to find all the terminal nodes.
43687    var node = finishedWork;
43688
43689    while (true) {
43690      if (node.tag === HostComponent) {
43691        var instance = node.stateNode;
43692
43693        if (isHidden) {
43694          hideInstance(instance);
43695        } else {
43696          unhideInstance(node.stateNode, node.memoizedProps);
43697        }
43698      } else if (node.tag === HostText) {
43699        var _instance3 = node.stateNode;
43700
43701        if (isHidden) {
43702          hideTextInstance(_instance3);
43703        } else {
43704          unhideTextInstance(_instance3, node.memoizedProps);
43705        }
43706      } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {
43707        node.child.return = node;
43708        node = node.child;
43709        continue;
43710      }
43711
43712      if (node === finishedWork) {
43713        return;
43714      }
43715
43716      while (node.sibling === null) {
43717        if (node.return === null || node.return === finishedWork) {
43718          return;
43719        }
43720
43721        node = node.return;
43722      }
43723
43724      node.sibling.return = node.return;
43725      node = node.sibling;
43726    }
43727  }
43728}
43729
43730function commitAttachRef(finishedWork) {
43731  var ref = finishedWork.ref;
43732
43733  if (ref !== null) {
43734    var instance = finishedWork.stateNode;
43735    var instanceToUse;
43736
43737    switch (finishedWork.tag) {
43738      case HostComponent:
43739        instanceToUse = getPublicInstance(instance);
43740        break;
43741
43742      default:
43743        instanceToUse = instance;
43744    } // Moved outside to ensure DCE works with this flag
43745
43746    if (typeof ref === 'function') {
43747      ref(instanceToUse);
43748    } else {
43749      {
43750        if (!ref.hasOwnProperty('current')) {
43751          error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentName(finishedWork.type));
43752        }
43753      }
43754
43755      ref.current = instanceToUse;
43756    }
43757  }
43758}
43759
43760function commitDetachRef(current) {
43761  var currentRef = current.ref;
43762
43763  if (currentRef !== null) {
43764    if (typeof currentRef === 'function') {
43765      currentRef(null);
43766    } else {
43767      currentRef.current = null;
43768    }
43769  }
43770} // User-originating errors (lifecycles and refs) should not interrupt
43771// deletion, so don't let them throw. Host-originating errors should
43772// interrupt deletion, so it's okay
43773
43774
43775function commitUnmount(finishedRoot, current, renderPriorityLevel) {
43776  onCommitUnmount(current);
43777
43778  switch (current.tag) {
43779    case FunctionComponent:
43780    case ForwardRef:
43781    case MemoComponent:
43782    case SimpleMemoComponent:
43783    case Block:
43784      {
43785        var updateQueue = current.updateQueue;
43786
43787        if (updateQueue !== null) {
43788          var lastEffect = updateQueue.lastEffect;
43789
43790          if (lastEffect !== null) {
43791            var firstEffect = lastEffect.next;
43792            var effect = firstEffect;
43793
43794            do {
43795              var _effect2 = effect,
43796                  destroy = _effect2.destroy,
43797                  tag = _effect2.tag;
43798
43799              if (destroy !== undefined) {
43800                if ((tag & Passive$1) !== NoFlags$1) {
43801                  enqueuePendingPassiveHookEffectUnmount(current, effect);
43802                } else {
43803                  {
43804                    safelyCallDestroy(current, destroy);
43805                  }
43806                }
43807              }
43808
43809              effect = effect.next;
43810            } while (effect !== firstEffect);
43811          }
43812        }
43813
43814        return;
43815      }
43816
43817    case ClassComponent:
43818      {
43819        safelyDetachRef(current);
43820        var instance = current.stateNode;
43821
43822        if (typeof instance.componentWillUnmount === 'function') {
43823          safelyCallComponentWillUnmount(current, instance);
43824        }
43825
43826        return;
43827      }
43828
43829    case HostComponent:
43830      {
43831        safelyDetachRef(current);
43832        return;
43833      }
43834
43835    case HostPortal:
43836      {
43837        // TODO: this is recursive.
43838        // We are also not using this parent because
43839        // the portal will get pushed immediately.
43840        {
43841          unmountHostComponents(finishedRoot, current);
43842        }
43843
43844        return;
43845      }
43846
43847    case FundamentalComponent:
43848      {
43849
43850        return;
43851      }
43852
43853    case DehydratedFragment:
43854      {
43855
43856        return;
43857      }
43858
43859    case ScopeComponent:
43860      {
43861
43862        return;
43863      }
43864  }
43865}
43866
43867function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {
43868  // While we're inside a removed host node we don't want to call
43869  // removeChild on the inner nodes because they're removed by the top
43870  // call anyway. We also want to call componentWillUnmount on all
43871  // composites before this host node is removed from the tree. Therefore
43872  // we do an inner loop while we're still inside the host node.
43873  var node = root;
43874
43875  while (true) {
43876    commitUnmount(finishedRoot, node); // Visit children because they may contain more composite or host nodes.
43877    // Skip portals because commitUnmount() currently visits them recursively.
43878
43879    if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.
43880    // If we don't use mutation we drill down into portals here instead.
43881     node.tag !== HostPortal)) {
43882      node.child.return = node;
43883      node = node.child;
43884      continue;
43885    }
43886
43887    if (node === root) {
43888      return;
43889    }
43890
43891    while (node.sibling === null) {
43892      if (node.return === null || node.return === root) {
43893        return;
43894      }
43895
43896      node = node.return;
43897    }
43898
43899    node.sibling.return = node.return;
43900    node = node.sibling;
43901  }
43902}
43903
43904function detachFiberMutation(fiber) {
43905  // Cut off the return pointers to disconnect it from the tree. Ideally, we
43906  // should clear the child pointer of the parent alternate to let this
43907  // get GC:ed but we don't know which for sure which parent is the current
43908  // one so we'll settle for GC:ing the subtree of this child. This child
43909  // itself will be GC:ed when the parent updates the next time.
43910  // Note: we cannot null out sibling here, otherwise it can cause issues
43911  // with findDOMNode and how it requires the sibling field to carry out
43912  // traversal in a later effect. See PR #16820. We now clear the sibling
43913  // field after effects, see: detachFiberAfterEffects.
43914  //
43915  // Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects.
43916  // It may be required if the current component is an error boundary,
43917  // and one of its descendants throws while unmounting a passive effect.
43918  fiber.alternate = null;
43919  fiber.child = null;
43920  fiber.dependencies = null;
43921  fiber.firstEffect = null;
43922  fiber.lastEffect = null;
43923  fiber.memoizedProps = null;
43924  fiber.memoizedState = null;
43925  fiber.pendingProps = null;
43926  fiber.return = null;
43927  fiber.updateQueue = null;
43928
43929  {
43930    fiber._debugOwner = null;
43931  }
43932}
43933
43934function getHostParentFiber(fiber) {
43935  var parent = fiber.return;
43936
43937  while (parent !== null) {
43938    if (isHostParent(parent)) {
43939      return parent;
43940    }
43941
43942    parent = parent.return;
43943  }
43944
43945  {
43946    {
43947      throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
43948    }
43949  }
43950}
43951
43952function isHostParent(fiber) {
43953  return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
43954}
43955
43956function getHostSibling(fiber) {
43957  // We're going to search forward into the tree until we find a sibling host
43958  // node. Unfortunately, if multiple insertions are done in a row we have to
43959  // search past them. This leads to exponential search for the next sibling.
43960  // TODO: Find a more efficient way to do this.
43961  var node = fiber;
43962
43963  siblings: while (true) {
43964    // If we didn't find anything, let's try the next sibling.
43965    while (node.sibling === null) {
43966      if (node.return === null || isHostParent(node.return)) {
43967        // If we pop out of the root or hit the parent the fiber we are the
43968        // last sibling.
43969        return null;
43970      }
43971
43972      node = node.return;
43973    }
43974
43975    node.sibling.return = node.return;
43976    node = node.sibling;
43977
43978    while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
43979      // If it is not host node and, we might have a host node inside it.
43980      // Try to search down until we find one.
43981      if (node.flags & Placement) {
43982        // If we don't have a child, try the siblings instead.
43983        continue siblings;
43984      } // If we don't have a child, try the siblings instead.
43985      // We also skip portals because they are not part of this host tree.
43986
43987
43988      if (node.child === null || node.tag === HostPortal) {
43989        continue siblings;
43990      } else {
43991        node.child.return = node;
43992        node = node.child;
43993      }
43994    } // Check if this host node is stable or about to be placed.
43995
43996
43997    if (!(node.flags & Placement)) {
43998      // Found it!
43999      return node.stateNode;
44000    }
44001  }
44002}
44003
44004function commitPlacement(finishedWork) {
44005
44006
44007  var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.
44008
44009  var parent;
44010  var isContainer;
44011  var parentStateNode = parentFiber.stateNode;
44012
44013  switch (parentFiber.tag) {
44014    case HostComponent:
44015      parent = parentStateNode;
44016      isContainer = false;
44017      break;
44018
44019    case HostRoot:
44020      parent = parentStateNode.containerInfo;
44021      isContainer = true;
44022      break;
44023
44024    case HostPortal:
44025      parent = parentStateNode.containerInfo;
44026      isContainer = true;
44027      break;
44028
44029    case FundamentalComponent:
44030
44031    // eslint-disable-next-line-no-fallthrough
44032
44033    default:
44034      {
44035        {
44036          throw Error( "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue." );
44037        }
44038      }
44039
44040  }
44041
44042  if (parentFiber.flags & ContentReset) {
44043    // Reset the text content of the parent before doing any insertions
44044    resetTextContent(parent); // Clear ContentReset from the effect tag
44045
44046    parentFiber.flags &= ~ContentReset;
44047  }
44048
44049  var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
44050  // children to find all the terminal nodes.
44051
44052  if (isContainer) {
44053    insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);
44054  } else {
44055    insertOrAppendPlacementNode(finishedWork, before, parent);
44056  }
44057}
44058
44059function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
44060  var tag = node.tag;
44061  var isHost = tag === HostComponent || tag === HostText;
44062
44063  if (isHost || enableFundamentalAPI ) {
44064    var stateNode = isHost ? node.stateNode : node.stateNode.instance;
44065
44066    if (before) {
44067      insertInContainerBefore(parent, stateNode, before);
44068    } else {
44069      appendChildToContainer(parent, stateNode);
44070    }
44071  } else if (tag === HostPortal) ; else {
44072    var child = node.child;
44073
44074    if (child !== null) {
44075      insertOrAppendPlacementNodeIntoContainer(child, before, parent);
44076      var sibling = child.sibling;
44077
44078      while (sibling !== null) {
44079        insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
44080        sibling = sibling.sibling;
44081      }
44082    }
44083  }
44084}
44085
44086function insertOrAppendPlacementNode(node, before, parent) {
44087  var tag = node.tag;
44088  var isHost = tag === HostComponent || tag === HostText;
44089
44090  if (isHost || enableFundamentalAPI ) {
44091    var stateNode = isHost ? node.stateNode : node.stateNode.instance;
44092
44093    if (before) {
44094      insertBefore(parent, stateNode, before);
44095    } else {
44096      appendChild(parent, stateNode);
44097    }
44098  } else if (tag === HostPortal) ; else {
44099    var child = node.child;
44100
44101    if (child !== null) {
44102      insertOrAppendPlacementNode(child, before, parent);
44103      var sibling = child.sibling;
44104
44105      while (sibling !== null) {
44106        insertOrAppendPlacementNode(sibling, before, parent);
44107        sibling = sibling.sibling;
44108      }
44109    }
44110  }
44111}
44112
44113function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {
44114  // We only have the top Fiber that was deleted but we need to recurse down its
44115  // children to find all the terminal nodes.
44116  var node = current; // Each iteration, currentParent is populated with node's host parent if not
44117  // currentParentIsValid.
44118
44119  var currentParentIsValid = false; // Note: these two variables *must* always be updated together.
44120
44121  var currentParent;
44122  var currentParentIsContainer;
44123
44124  while (true) {
44125    if (!currentParentIsValid) {
44126      var parent = node.return;
44127
44128      findParent: while (true) {
44129        if (!(parent !== null)) {
44130          {
44131            throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
44132          }
44133        }
44134
44135        var parentStateNode = parent.stateNode;
44136
44137        switch (parent.tag) {
44138          case HostComponent:
44139            currentParent = parentStateNode;
44140            currentParentIsContainer = false;
44141            break findParent;
44142
44143          case HostRoot:
44144            currentParent = parentStateNode.containerInfo;
44145            currentParentIsContainer = true;
44146            break findParent;
44147
44148          case HostPortal:
44149            currentParent = parentStateNode.containerInfo;
44150            currentParentIsContainer = true;
44151            break findParent;
44152
44153        }
44154
44155        parent = parent.return;
44156      }
44157
44158      currentParentIsValid = true;
44159    }
44160
44161    if (node.tag === HostComponent || node.tag === HostText) {
44162      commitNestedUnmounts(finishedRoot, node); // After all the children have unmounted, it is now safe to remove the
44163      // node from the tree.
44164
44165      if (currentParentIsContainer) {
44166        removeChildFromContainer(currentParent, node.stateNode);
44167      } else {
44168        removeChild(currentParent, node.stateNode);
44169      } // Don't visit children because we already visited them.
44170
44171    } else if (node.tag === HostPortal) {
44172      if (node.child !== null) {
44173        // When we go into a portal, it becomes the parent to remove from.
44174        // We will reassign it back when we pop the portal on the way up.
44175        currentParent = node.stateNode.containerInfo;
44176        currentParentIsContainer = true; // Visit children because portals might contain host components.
44177
44178        node.child.return = node;
44179        node = node.child;
44180        continue;
44181      }
44182    } else {
44183      commitUnmount(finishedRoot, node); // Visit children because we may find more host components below.
44184
44185      if (node.child !== null) {
44186        node.child.return = node;
44187        node = node.child;
44188        continue;
44189      }
44190    }
44191
44192    if (node === current) {
44193      return;
44194    }
44195
44196    while (node.sibling === null) {
44197      if (node.return === null || node.return === current) {
44198        return;
44199      }
44200
44201      node = node.return;
44202
44203      if (node.tag === HostPortal) {
44204        // When we go out of the portal, we need to restore the parent.
44205        // Since we don't keep a stack of them, we will search for it.
44206        currentParentIsValid = false;
44207      }
44208    }
44209
44210    node.sibling.return = node.return;
44211    node = node.sibling;
44212  }
44213}
44214
44215function commitDeletion(finishedRoot, current, renderPriorityLevel) {
44216  {
44217    // Recursively delete all host nodes from the parent.
44218    // Detach refs and call componentWillUnmount() on the whole subtree.
44219    unmountHostComponents(finishedRoot, current);
44220  }
44221
44222  var alternate = current.alternate;
44223  detachFiberMutation(current);
44224
44225  if (alternate !== null) {
44226    detachFiberMutation(alternate);
44227  }
44228}
44229
44230function commitWork(current, finishedWork) {
44231
44232  switch (finishedWork.tag) {
44233    case FunctionComponent:
44234    case ForwardRef:
44235    case MemoComponent:
44236    case SimpleMemoComponent:
44237    case Block:
44238      {
44239        // Layout effects are destroyed during the mutation phase so that all
44240        // destroy functions for all fibers are called before any create functions.
44241        // This prevents sibling component effects from interfering with each other,
44242        // e.g. a destroy function in one component should never override a ref set
44243        // by a create function in another component during the same commit.
44244        {
44245          commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
44246        }
44247
44248        return;
44249      }
44250
44251    case ClassComponent:
44252      {
44253        return;
44254      }
44255
44256    case HostComponent:
44257      {
44258        var instance = finishedWork.stateNode;
44259
44260        if (instance != null) {
44261          // Commit the work prepared earlier.
44262          var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
44263          // as the newProps. The updatePayload will contain the real change in
44264          // this case.
44265
44266          var oldProps = current !== null ? current.memoizedProps : newProps;
44267          var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.
44268
44269          var updatePayload = finishedWork.updateQueue;
44270          finishedWork.updateQueue = null;
44271
44272          if (updatePayload !== null) {
44273            commitUpdate(instance, updatePayload, type, oldProps, newProps);
44274          }
44275        }
44276
44277        return;
44278      }
44279
44280    case HostText:
44281      {
44282        if (!(finishedWork.stateNode !== null)) {
44283          {
44284            throw Error( "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue." );
44285          }
44286        }
44287
44288        var textInstance = finishedWork.stateNode;
44289        var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
44290        // as the newProps. The updatePayload will contain the real change in
44291        // this case.
44292
44293        var oldText = current !== null ? current.memoizedProps : newText;
44294        commitTextUpdate(textInstance, oldText, newText);
44295        return;
44296      }
44297
44298    case HostRoot:
44299      {
44300        {
44301          var _root = finishedWork.stateNode;
44302
44303          if (_root.hydrate) {
44304            // We've just hydrated. No need to hydrate again.
44305            _root.hydrate = false;
44306            commitHydratedContainer(_root.containerInfo);
44307          }
44308        }
44309
44310        return;
44311      }
44312
44313    case Profiler:
44314      {
44315        return;
44316      }
44317
44318    case SuspenseComponent:
44319      {
44320        commitSuspenseComponent(finishedWork);
44321        attachSuspenseRetryListeners(finishedWork);
44322        return;
44323      }
44324
44325    case SuspenseListComponent:
44326      {
44327        attachSuspenseRetryListeners(finishedWork);
44328        return;
44329      }
44330
44331    case IncompleteClassComponent:
44332      {
44333        return;
44334      }
44335
44336    case FundamentalComponent:
44337      {
44338
44339        break;
44340      }
44341
44342    case ScopeComponent:
44343      {
44344
44345        break;
44346      }
44347
44348    case OffscreenComponent:
44349    case LegacyHiddenComponent:
44350      {
44351        var newState = finishedWork.memoizedState;
44352        var isHidden = newState !== null;
44353        hideOrUnhideAllChildren(finishedWork, isHidden);
44354        return;
44355      }
44356  }
44357
44358  {
44359    {
44360      throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
44361    }
44362  }
44363}
44364
44365function commitSuspenseComponent(finishedWork) {
44366  var newState = finishedWork.memoizedState;
44367
44368  if (newState !== null) {
44369    markCommitTimeOfFallback();
44370
44371    {
44372      // Hide the Offscreen component that contains the primary children. TODO:
44373      // Ideally, this effect would have been scheduled on the Offscreen fiber
44374      // itself. That's how unhiding works: the Offscreen component schedules an
44375      // effect on itself. However, in this case, the component didn't complete,
44376      // so the fiber was never added to the effect list in the normal path. We
44377      // could have appended it to the effect list in the Suspense component's
44378      // second pass, but doing it this way is less complicated. This would be
44379      // simpler if we got rid of the effect list and traversed the tree, like
44380      // we're planning to do.
44381      var primaryChildParent = finishedWork.child;
44382      hideOrUnhideAllChildren(primaryChildParent, true);
44383    }
44384  }
44385}
44386
44387function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
44388
44389  var newState = finishedWork.memoizedState;
44390
44391  if (newState === null) {
44392    var current = finishedWork.alternate;
44393
44394    if (current !== null) {
44395      var prevState = current.memoizedState;
44396
44397      if (prevState !== null) {
44398        var suspenseInstance = prevState.dehydrated;
44399
44400        if (suspenseInstance !== null) {
44401          commitHydratedSuspenseInstance(suspenseInstance);
44402        }
44403      }
44404    }
44405  }
44406}
44407
44408function attachSuspenseRetryListeners(finishedWork) {
44409  // If this boundary just timed out, then it will have a set of wakeables.
44410  // For each wakeable, attach a listener so that when it resolves, React
44411  // attempts to re-render the boundary in the primary (pre-timeout) state.
44412  var wakeables = finishedWork.updateQueue;
44413
44414  if (wakeables !== null) {
44415    finishedWork.updateQueue = null;
44416    var retryCache = finishedWork.stateNode;
44417
44418    if (retryCache === null) {
44419      retryCache = finishedWork.stateNode = new PossiblyWeakSet();
44420    }
44421
44422    wakeables.forEach(function (wakeable) {
44423      // Memoize using the boundary fiber to prevent redundant listeners.
44424      var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
44425
44426      if (!retryCache.has(wakeable)) {
44427        {
44428          if (wakeable.__reactDoNotTraceInteractions !== true) {
44429            retry = tracing.unstable_wrap(retry);
44430          }
44431        }
44432
44433        retryCache.add(wakeable);
44434        wakeable.then(retry, retry);
44435      }
44436    });
44437  }
44438} // This function detects when a Suspense boundary goes from visible to hidden.
44439// It returns false if the boundary is already hidden.
44440// TODO: Use an effect tag.
44441
44442
44443function isSuspenseBoundaryBeingHidden(current, finishedWork) {
44444  if (current !== null) {
44445    var oldState = current.memoizedState;
44446
44447    if (oldState === null || oldState.dehydrated !== null) {
44448      var newState = finishedWork.memoizedState;
44449      return newState !== null && newState.dehydrated === null;
44450    }
44451  }
44452
44453  return false;
44454}
44455
44456function commitResetTextContent(current) {
44457
44458  resetTextContent(current.stateNode);
44459}
44460
44461var COMPONENT_TYPE = 0;
44462var HAS_PSEUDO_CLASS_TYPE = 1;
44463var ROLE_TYPE = 2;
44464var TEST_NAME_TYPE = 3;
44465var TEXT_TYPE = 4;
44466
44467if (typeof Symbol === 'function' && Symbol.for) {
44468  var symbolFor$1 = Symbol.for;
44469  COMPONENT_TYPE = symbolFor$1('selector.component');
44470  HAS_PSEUDO_CLASS_TYPE = symbolFor$1('selector.has_pseudo_class');
44471  ROLE_TYPE = symbolFor$1('selector.role');
44472  TEST_NAME_TYPE = symbolFor$1('selector.test_id');
44473  TEXT_TYPE = symbolFor$1('selector.text');
44474}
44475var commitHooks = [];
44476function onCommitRoot$1() {
44477  {
44478    commitHooks.forEach(function (commitHook) {
44479      return commitHook();
44480    });
44481  }
44482}
44483
44484var ceil = Math.ceil;
44485var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
44486    ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
44487    IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
44488var NoContext =
44489/*             */
444900;
44491var BatchedContext =
44492/*               */
444931;
44494var EventContext =
44495/*                 */
444962;
44497var DiscreteEventContext =
44498/*         */
444994;
44500var LegacyUnbatchedContext =
44501/*       */
445028;
44503var RenderContext =
44504/*                */
4450516;
44506var CommitContext =
44507/*                */
4450832;
44509var RetryAfterError =
44510/*       */
4451164;
44512var RootIncomplete = 0;
44513var RootFatalErrored = 1;
44514var RootErrored = 2;
44515var RootSuspended = 3;
44516var RootSuspendedWithDelay = 4;
44517var RootCompleted = 5; // Describes where we are in the React execution stack
44518
44519var executionContext = NoContext; // The root we're working on
44520
44521var workInProgressRoot = null; // The fiber we're working on
44522
44523var workInProgress = null; // The lanes we're rendering
44524
44525var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree
44526// This is a superset of the lanes we started working on at the root. The only
44527// case where it's different from `workInProgressRootRenderLanes` is when we
44528// enter a subtree that is hidden and needs to be unhidden: Suspense and
44529// Offscreen component.
44530//
44531// Most things in the work loop should deal with workInProgressRootRenderLanes.
44532// Most things in begin/complete phases should deal with subtreeRenderLanes.
44533
44534var subtreeRenderLanes = NoLanes;
44535var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.
44536
44537var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown
44538
44539var workInProgressRootFatalError = null; // "Included" lanes refer to lanes that were worked on during this render. It's
44540// slightly different than `renderLanes` because `renderLanes` can change as you
44541// enter and exit an Offscreen tree. This value is the combination of all render
44542// lanes for the entire render phase.
44543
44544var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only
44545// includes unprocessed updates, not work in bailed out children.
44546
44547var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.
44548
44549var workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render.
44550
44551var workInProgressRootPingedLanes = NoLanes;
44552var mostRecentlyUpdatedRoot = null; // The most recent time we committed a fallback. This lets us ensure a train
44553// model where we don't commit new loading states in too quick succession.
44554
44555var globalMostRecentFallbackTime = 0;
44556var FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering
44557// more and prefer CPU suspense heuristics instead.
44558
44559var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU
44560// suspense heuristics and opt out of rendering more content.
44561
44562var RENDER_TIMEOUT_MS = 500;
44563
44564function resetRenderTimer() {
44565  workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;
44566}
44567
44568function getRenderTargetTime() {
44569  return workInProgressRootRenderTargetTime;
44570}
44571var nextEffect = null;
44572var hasUncaughtError = false;
44573var firstUncaughtError = null;
44574var legacyErrorBoundariesThatAlreadyFailed = null;
44575var rootDoesHavePassiveEffects = false;
44576var rootWithPendingPassiveEffects = null;
44577var pendingPassiveEffectsRenderPriority = NoPriority$1;
44578var pendingPassiveEffectsLanes = NoLanes;
44579var pendingPassiveHookEffectsMount = [];
44580var pendingPassiveHookEffectsUnmount = [];
44581var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates
44582
44583var NESTED_UPDATE_LIMIT = 50;
44584var nestedUpdateCount = 0;
44585var rootWithNestedUpdates = null;
44586var NESTED_PASSIVE_UPDATE_LIMIT = 50;
44587var nestedPassiveUpdateCount = 0; // Marks the need to reschedule pending interactions at these lanes
44588// during the commit phase. This enables them to be traced across components
44589// that spawn new work during render. E.g. hidden boundaries, suspended SSR
44590// hydration or SuspenseList.
44591// TODO: Can use a bitmask instead of an array
44592
44593var spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat their
44594// event times as simultaneous, even if the actual clock time has advanced
44595// between the first and second call.
44596
44597var currentEventTime = NoTimestamp;
44598var currentEventWipLanes = NoLanes;
44599var currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.
44600// We warn about state updates for unmounted components differently in this case.
44601
44602var isFlushingPassiveEffects = false;
44603var focusedInstanceHandle = null;
44604var shouldFireAfterActiveInstanceBlur = false;
44605function getWorkInProgressRoot() {
44606  return workInProgressRoot;
44607}
44608function requestEventTime() {
44609  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
44610    // We're inside React, so it's fine to read the actual time.
44611    return now();
44612  } // We're not inside React, so we may be in the middle of a browser event.
44613
44614
44615  if (currentEventTime !== NoTimestamp) {
44616    // Use the same start time for all updates until we enter React again.
44617    return currentEventTime;
44618  } // This is the first update since React yielded. Compute a new start time.
44619
44620
44621  currentEventTime = now();
44622  return currentEventTime;
44623}
44624function requestUpdateLane(fiber) {
44625  // Special cases
44626  var mode = fiber.mode;
44627
44628  if ((mode & BlockingMode) === NoMode) {
44629    return SyncLane;
44630  } else if ((mode & ConcurrentMode) === NoMode) {
44631    return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
44632  } // The algorithm for assigning an update to a lane should be stable for all
44633  // updates at the same priority within the same event. To do this, the inputs
44634  // to the algorithm must be the same. For example, we use the `renderLanes`
44635  // to avoid choosing a lane that is already in the middle of rendering.
44636  //
44637  // However, the "included" lanes could be mutated in between updates in the
44638  // same event, like if you perform an update inside `flushSync`. Or any other
44639  // code path that might call `prepareFreshStack`.
44640  //
44641  // The trick we use is to cache the first of each of these inputs within an
44642  // event. Then reset the cached values once we can be sure the event is over.
44643  // Our heuristic for that is whenever we enter a concurrent work loop.
44644  //
44645  // We'll do the same for `currentEventPendingLanes` below.
44646
44647
44648  if (currentEventWipLanes === NoLanes) {
44649    currentEventWipLanes = workInProgressRootIncludedLanes;
44650  }
44651
44652  var isTransition = requestCurrentTransition() !== NoTransition;
44653
44654  if (isTransition) {
44655    if (currentEventPendingLanes !== NoLanes) {
44656      currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes;
44657    }
44658
44659    return findTransitionLane(currentEventWipLanes, currentEventPendingLanes);
44660  } // TODO: Remove this dependency on the Scheduler priority.
44661  // To do that, we're replacing it with an update lane priority.
44662
44663
44664  var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler.
44665  // This couples React to the Scheduler internals, so we're replacing it
44666  // with the currentUpdateLanePriority above. As an example of how this
44667  // could be problematic, if we're not inside `Scheduler.runWithPriority`,
44668  // then we'll get the priority of the current running Scheduler task,
44669  // which is probably not what we want.
44670
44671  var lane;
44672
44673  if ( // TODO: Temporary. We're removing the concept of discrete updates.
44674  (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) {
44675    lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);
44676  } else {
44677    var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority);
44678
44679    lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);
44680  }
44681
44682  return lane;
44683}
44684
44685function requestRetryLane(fiber) {
44686  // This is a fork of `requestUpdateLane` designed specifically for Suspense
44687  // "retries" — a special update that attempts to flip a Suspense boundary
44688  // from its placeholder state to its primary/resolved state.
44689  // Special cases
44690  var mode = fiber.mode;
44691
44692  if ((mode & BlockingMode) === NoMode) {
44693    return SyncLane;
44694  } else if ((mode & ConcurrentMode) === NoMode) {
44695    return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
44696  } // See `requestUpdateLane` for explanation of `currentEventWipLanes`
44697
44698
44699  if (currentEventWipLanes === NoLanes) {
44700    currentEventWipLanes = workInProgressRootIncludedLanes;
44701  }
44702
44703  return findRetryLane(currentEventWipLanes);
44704}
44705
44706function scheduleUpdateOnFiber(fiber, lane, eventTime) {
44707  checkForNestedUpdates();
44708  warnAboutRenderPhaseUpdatesInDEV(fiber);
44709  var root = markUpdateLaneFromFiberToRoot(fiber, lane);
44710
44711  if (root === null) {
44712    warnAboutUpdateOnUnmountedFiberInDEV(fiber);
44713    return null;
44714  } // Mark that the root has a pending update.
44715
44716
44717  markRootUpdated(root, lane, eventTime);
44718
44719  if (root === workInProgressRoot) {
44720    // Received an update to a tree that's in the middle of rendering. Mark
44721    // that there was an interleaved update work on this root. Unless the
44722    // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
44723    // phase update. In that case, we don't treat render phase updates as if
44724    // they were interleaved, for backwards compat reasons.
44725    {
44726      workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane);
44727    }
44728
44729    if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
44730      // The root already suspended with a delay, which means this render
44731      // definitely won't finish. Since we have a new update, let's mark it as
44732      // suspended now, right before marking the incoming update. This has the
44733      // effect of interrupting the current render and switching to the update.
44734      // TODO: Make sure this doesn't override pings that happen while we've
44735      // already started rendering.
44736      markRootSuspended$1(root, workInProgressRootRenderLanes);
44737    }
44738  } // TODO: requestUpdateLanePriority also reads the priority. Pass the
44739  // priority as an argument to that function and this one.
44740
44741
44742  var priorityLevel = getCurrentPriorityLevel();
44743
44744  if (lane === SyncLane) {
44745    if ( // Check if we're inside unbatchedUpdates
44746    (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering
44747    (executionContext & (RenderContext | CommitContext)) === NoContext) {
44748      // Register pending interactions on the root to avoid losing traced interaction data.
44749      schedulePendingInteractions(root, lane); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
44750      // root inside of batchedUpdates should be synchronous, but layout updates
44751      // should be deferred until the end of the batch.
44752
44753      performSyncWorkOnRoot(root);
44754    } else {
44755      ensureRootIsScheduled(root, eventTime);
44756      schedulePendingInteractions(root, lane);
44757
44758      if (executionContext === NoContext) {
44759        // Flush the synchronous work now, unless we're already working or inside
44760        // a batch. This is intentionally inside scheduleUpdateOnFiber instead of
44761        // scheduleCallbackForFiber to preserve the ability to schedule a callback
44762        // without immediately flushing it. We only do this for user-initiated
44763        // updates, to preserve historical behavior of legacy mode.
44764        resetRenderTimer();
44765        flushSyncCallbackQueue();
44766      }
44767    }
44768  } else {
44769    // Schedule a discrete update but only if it's not Sync.
44770    if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
44771    // discrete, even inside a discrete event.
44772    priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority$1)) {
44773      // This is the result of a discrete event. Track the lowest priority
44774      // discrete update per root so we can flush them early, if needed.
44775      if (rootsWithPendingDiscreteUpdates === null) {
44776        rootsWithPendingDiscreteUpdates = new Set([root]);
44777      } else {
44778        rootsWithPendingDiscreteUpdates.add(root);
44779      }
44780    } // Schedule other updates after in case the callback is sync.
44781
44782
44783    ensureRootIsScheduled(root, eventTime);
44784    schedulePendingInteractions(root, lane);
44785  } // We use this when assigning a lane for a transition inside
44786  // `requestUpdateLane`. We assume it's the same as the root being updated,
44787  // since in the common case of a single root app it probably is. If it's not
44788  // the same root, then it's not a huge deal, we just might batch more stuff
44789  // together more than necessary.
44790
44791
44792  mostRecentlyUpdatedRoot = root;
44793} // This is split into a separate function so we can mark a fiber with pending
44794// work without treating it as a typical update that originates from an event;
44795// e.g. retrying a Suspense boundary isn't an update, but it does schedule work
44796// on a fiber.
44797
44798function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
44799  // Update the source fiber's lanes
44800  sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
44801  var alternate = sourceFiber.alternate;
44802
44803  if (alternate !== null) {
44804    alternate.lanes = mergeLanes(alternate.lanes, lane);
44805  }
44806
44807  {
44808    if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {
44809      warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
44810    }
44811  } // Walk the parent path to the root and update the child expiration time.
44812
44813
44814  var node = sourceFiber;
44815  var parent = sourceFiber.return;
44816
44817  while (parent !== null) {
44818    parent.childLanes = mergeLanes(parent.childLanes, lane);
44819    alternate = parent.alternate;
44820
44821    if (alternate !== null) {
44822      alternate.childLanes = mergeLanes(alternate.childLanes, lane);
44823    } else {
44824      {
44825        if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
44826          warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
44827        }
44828      }
44829    }
44830
44831    node = parent;
44832    parent = parent.return;
44833  }
44834
44835  if (node.tag === HostRoot) {
44836    var root = node.stateNode;
44837    return root;
44838  } else {
44839    return null;
44840  }
44841} // Use this function to schedule a task for a root. There's only one task per
44842// root; if a task was already scheduled, we'll check to make sure the priority
44843// of the existing task is the same as the priority of the next level that the
44844// root has work on. This function is called on every update, and right before
44845// exiting a task.
44846
44847
44848function ensureRootIsScheduled(root, currentTime) {
44849  var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as
44850  // expired so we know to work on those next.
44851
44852  markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.
44853
44854  var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.
44855
44856  var newCallbackPriority = returnNextLanesPriority();
44857
44858  if (nextLanes === NoLanes) {
44859    // Special case: There's nothing to work on.
44860    if (existingCallbackNode !== null) {
44861      cancelCallback(existingCallbackNode);
44862      root.callbackNode = null;
44863      root.callbackPriority = NoLanePriority;
44864    }
44865
44866    return;
44867  } // Check if there's an existing task. We may be able to reuse it.
44868
44869
44870  if (existingCallbackNode !== null) {
44871    var existingCallbackPriority = root.callbackPriority;
44872
44873    if (existingCallbackPriority === newCallbackPriority) {
44874      // The priority hasn't changed. We can reuse the existing task. Exit.
44875      return;
44876    } // The priority changed. Cancel the existing callback. We'll schedule a new
44877    // one below.
44878
44879
44880    cancelCallback(existingCallbackNode);
44881  } // Schedule a new callback.
44882
44883
44884  var newCallbackNode;
44885
44886  if (newCallbackPriority === SyncLanePriority) {
44887    // Special case: Sync React callbacks are scheduled on a special
44888    // internal queue
44889    newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
44890  } else if (newCallbackPriority === SyncBatchedLanePriority) {
44891    newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));
44892  } else {
44893    var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);
44894    newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));
44895  }
44896
44897  root.callbackPriority = newCallbackPriority;
44898  root.callbackNode = newCallbackNode;
44899} // This is the entry point for every concurrent task, i.e. anything that
44900// goes through Scheduler.
44901
44902
44903function performConcurrentWorkOnRoot(root) {
44904  // Since we know we're in a React event, we can clear the current
44905  // event time. The next update will compute a new event time.
44906  currentEventTime = NoTimestamp;
44907  currentEventWipLanes = NoLanes;
44908  currentEventPendingLanes = NoLanes;
44909
44910  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
44911    {
44912      throw Error( "Should not already be working." );
44913    }
44914  } // Flush any pending passive effects before deciding which lanes to work on,
44915  // in case they schedule additional work.
44916
44917
44918  var originalCallbackNode = root.callbackNode;
44919  var didFlushPassiveEffects = flushPassiveEffects();
44920
44921  if (didFlushPassiveEffects) {
44922    // Something in the passive effect phase may have canceled the current task.
44923    // Check if the task node for this root was changed.
44924    if (root.callbackNode !== originalCallbackNode) {
44925      // The current task was canceled. Exit. We don't need to call
44926      // `ensureRootIsScheduled` because the check above implies either that
44927      // there's a new task, or that there's no remaining work on this root.
44928      return null;
44929    }
44930  } // Determine the next expiration time to work on, using the fields stored
44931  // on the root.
44932
44933
44934  var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);
44935
44936  if (lanes === NoLanes) {
44937    // Defensive coding. This is never expected to happen.
44938    return null;
44939  }
44940
44941  var exitStatus = renderRootConcurrent(root, lanes);
44942
44943  if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
44944    // The render included lanes that were updated during the render phase.
44945    // For example, when unhiding a hidden tree, we include all the lanes
44946    // that were previously skipped when the tree was hidden. That set of
44947    // lanes is a superset of the lanes we started rendering with.
44948    //
44949    // So we'll throw out the current work and restart.
44950    prepareFreshStack(root, NoLanes);
44951  } else if (exitStatus !== RootIncomplete) {
44952    if (exitStatus === RootErrored) {
44953      executionContext |= RetryAfterError; // If an error occurred during hydration,
44954      // discard server response and fall back to client side render.
44955
44956      if (root.hydrate) {
44957        root.hydrate = false;
44958        clearContainer(root.containerInfo);
44959      } // If something threw an error, try rendering one more time. We'll render
44960      // synchronously to block concurrent data mutations, and we'll includes
44961      // all pending updates are included. If it still fails after the second
44962      // attempt, we'll give up and commit the resulting tree.
44963
44964
44965      lanes = getLanesToRetrySynchronouslyOnError(root);
44966
44967      if (lanes !== NoLanes) {
44968        exitStatus = renderRootSync(root, lanes);
44969      }
44970    }
44971
44972    if (exitStatus === RootFatalErrored) {
44973      var fatalError = workInProgressRootFatalError;
44974      prepareFreshStack(root, NoLanes);
44975      markRootSuspended$1(root, lanes);
44976      ensureRootIsScheduled(root, now());
44977      throw fatalError;
44978    } // We now have a consistent tree. The next step is either to commit it,
44979    // or, if something suspended, wait to commit it after a timeout.
44980
44981
44982    var finishedWork = root.current.alternate;
44983    root.finishedWork = finishedWork;
44984    root.finishedLanes = lanes;
44985    finishConcurrentRender(root, exitStatus, lanes);
44986  }
44987
44988  ensureRootIsScheduled(root, now());
44989
44990  if (root.callbackNode === originalCallbackNode) {
44991    // The task node scheduled for this root is the same one that's
44992    // currently executed. Need to return a continuation.
44993    return performConcurrentWorkOnRoot.bind(null, root);
44994  }
44995
44996  return null;
44997}
44998
44999function finishConcurrentRender(root, exitStatus, lanes) {
45000  switch (exitStatus) {
45001    case RootIncomplete:
45002    case RootFatalErrored:
45003      {
45004        {
45005          {
45006            throw Error( "Root did not complete. This is a bug in React." );
45007          }
45008        }
45009      }
45010    // Flow knows about invariant, so it complains if I add a break
45011    // statement, but eslint doesn't know about invariant, so it complains
45012    // if I do. eslint-disable-next-line no-fallthrough
45013
45014    case RootErrored:
45015      {
45016        // We should have already attempted to retry this tree. If we reached
45017        // this point, it errored again. Commit it.
45018        commitRoot(root);
45019        break;
45020      }
45021
45022    case RootSuspended:
45023      {
45024        markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we
45025        // should immediately commit it or wait a bit.
45026
45027        if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope
45028        !shouldForceFlushFallbacksInDEV()) {
45029          // This render only included retries, no updates. Throttle committing
45030          // retries so that we don't show too many loading states too quickly.
45031          var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.
45032
45033          if (msUntilTimeout > 10) {
45034            var nextLanes = getNextLanes(root, NoLanes);
45035
45036            if (nextLanes !== NoLanes) {
45037              // There's additional work on this root.
45038              break;
45039            }
45040
45041            var suspendedLanes = root.suspendedLanes;
45042
45043            if (!isSubsetOfLanes(suspendedLanes, lanes)) {
45044              // We should prefer to render the fallback of at the last
45045              // suspended level. Ping the last suspended level to try
45046              // rendering it again.
45047              // FIXME: What if the suspended lanes are Idle? Should not restart.
45048              var eventTime = requestEventTime();
45049              markRootPinged(root, suspendedLanes);
45050              break;
45051            } // The render is suspended, it hasn't timed out, and there's no
45052            // lower priority work to do. Instead of committing the fallback
45053            // immediately, wait for more data to arrive.
45054
45055
45056            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);
45057            break;
45058          }
45059        } // The work expired. Commit immediately.
45060
45061
45062        commitRoot(root);
45063        break;
45064      }
45065
45066    case RootSuspendedWithDelay:
45067      {
45068        markRootSuspended$1(root, lanes);
45069
45070        if (includesOnlyTransitions(lanes)) {
45071          // This is a transition, so we should exit without committing a
45072          // placeholder and without scheduling a timeout. Delay indefinitely
45073          // until we receive more data.
45074          break;
45075        }
45076
45077        if (!shouldForceFlushFallbacksInDEV()) {
45078          // This is not a transition, but we did trigger an avoided state.
45079          // Schedule a placeholder to display after a short delay, using the Just
45080          // Noticeable Difference.
45081          // TODO: Is the JND optimization worth the added complexity? If this is
45082          // the only reason we track the event time, then probably not.
45083          // Consider removing.
45084          var mostRecentEventTime = getMostRecentEventTime(root, lanes);
45085          var eventTimeMs = mostRecentEventTime;
45086          var timeElapsedMs = now() - eventTimeMs;
45087
45088          var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.
45089
45090
45091          if (_msUntilTimeout > 10) {
45092            // Instead of committing the fallback immediately, wait for more data
45093            // to arrive.
45094            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
45095            break;
45096          }
45097        } // Commit the placeholder.
45098
45099
45100        commitRoot(root);
45101        break;
45102      }
45103
45104    case RootCompleted:
45105      {
45106        // The work completed. Ready to commit.
45107        commitRoot(root);
45108        break;
45109      }
45110
45111    default:
45112      {
45113        {
45114          {
45115            throw Error( "Unknown root exit status." );
45116          }
45117        }
45118      }
45119  }
45120}
45121
45122function markRootSuspended$1(root, suspendedLanes) {
45123  // When suspending, we should always exclude lanes that were pinged or (more
45124  // rarely, since we try to avoid it) updated during the render phase.
45125  // TODO: Lol maybe there's a better way to factor this besides this
45126  // obnoxiously named function :)
45127  suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);
45128  suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes);
45129  markRootSuspended(root, suspendedLanes);
45130} // This is the entry point for synchronous tasks that don't go
45131// through Scheduler
45132
45133
45134function performSyncWorkOnRoot(root) {
45135  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
45136    {
45137      throw Error( "Should not already be working." );
45138    }
45139  }
45140
45141  flushPassiveEffects();
45142  var lanes;
45143  var exitStatus;
45144
45145  if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {
45146    // There's a partial tree, and at least one of its lanes has expired. Finish
45147    // rendering it before rendering the rest of the expired work.
45148    lanes = workInProgressRootRenderLanes;
45149    exitStatus = renderRootSync(root, lanes);
45150
45151    if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
45152      // The render included lanes that were updated during the render phase.
45153      // For example, when unhiding a hidden tree, we include all the lanes
45154      // that were previously skipped when the tree was hidden. That set of
45155      // lanes is a superset of the lanes we started rendering with.
45156      //
45157      // Note that this only happens when part of the tree is rendered
45158      // concurrently. If the whole tree is rendered synchronously, then there
45159      // are no interleaved events.
45160      lanes = getNextLanes(root, lanes);
45161      exitStatus = renderRootSync(root, lanes);
45162    }
45163  } else {
45164    lanes = getNextLanes(root, NoLanes);
45165    exitStatus = renderRootSync(root, lanes);
45166  }
45167
45168  if (root.tag !== LegacyRoot && exitStatus === RootErrored) {
45169    executionContext |= RetryAfterError; // If an error occurred during hydration,
45170    // discard server response and fall back to client side render.
45171
45172    if (root.hydrate) {
45173      root.hydrate = false;
45174      clearContainer(root.containerInfo);
45175    } // If something threw an error, try rendering one more time. We'll render
45176    // synchronously to block concurrent data mutations, and we'll includes
45177    // all pending updates are included. If it still fails after the second
45178    // attempt, we'll give up and commit the resulting tree.
45179
45180
45181    lanes = getLanesToRetrySynchronouslyOnError(root);
45182
45183    if (lanes !== NoLanes) {
45184      exitStatus = renderRootSync(root, lanes);
45185    }
45186  }
45187
45188  if (exitStatus === RootFatalErrored) {
45189    var fatalError = workInProgressRootFatalError;
45190    prepareFreshStack(root, NoLanes);
45191    markRootSuspended$1(root, lanes);
45192    ensureRootIsScheduled(root, now());
45193    throw fatalError;
45194  } // We now have a consistent tree. Because this is a sync render, we
45195  // will commit it even if something suspended.
45196
45197
45198  var finishedWork = root.current.alternate;
45199  root.finishedWork = finishedWork;
45200  root.finishedLanes = lanes;
45201  commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next
45202  // pending level.
45203
45204  ensureRootIsScheduled(root, now());
45205  return null;
45206}
45207function flushDiscreteUpdates() {
45208  // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
45209  // However, `act` uses `batchedUpdates`, so there's no way to distinguish
45210  // those two cases. Need to fix this before exposing flushDiscreteUpdates
45211  // as a public API.
45212  if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {
45213    {
45214      if ((executionContext & RenderContext) !== NoContext) {
45215        error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');
45216      }
45217    } // We're already rendering, so we can't synchronously flush pending work.
45218    // This is probably a nested event dispatch triggered by a lifecycle/effect,
45219    // like `el.focus()`. Exit.
45220
45221
45222    return;
45223  }
45224
45225  flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that
45226  // they fire before the next serial event.
45227
45228  flushPassiveEffects();
45229}
45230
45231function flushPendingDiscreteUpdates() {
45232  if (rootsWithPendingDiscreteUpdates !== null) {
45233    // For each root with pending discrete updates, schedule a callback to
45234    // immediately flush them.
45235    var roots = rootsWithPendingDiscreteUpdates;
45236    rootsWithPendingDiscreteUpdates = null;
45237    roots.forEach(function (root) {
45238      markDiscreteUpdatesExpired(root);
45239      ensureRootIsScheduled(root, now());
45240    });
45241  } // Now flush the immediate queue.
45242
45243
45244  flushSyncCallbackQueue();
45245}
45246
45247function batchedUpdates$1(fn, a) {
45248  var prevExecutionContext = executionContext;
45249  executionContext |= BatchedContext;
45250
45251  try {
45252    return fn(a);
45253  } finally {
45254    executionContext = prevExecutionContext;
45255
45256    if (executionContext === NoContext) {
45257      // Flush the immediate callbacks that were scheduled during this batch
45258      resetRenderTimer();
45259      flushSyncCallbackQueue();
45260    }
45261  }
45262}
45263function batchedEventUpdates$1(fn, a) {
45264  var prevExecutionContext = executionContext;
45265  executionContext |= EventContext;
45266
45267  try {
45268    return fn(a);
45269  } finally {
45270    executionContext = prevExecutionContext;
45271
45272    if (executionContext === NoContext) {
45273      // Flush the immediate callbacks that were scheduled during this batch
45274      resetRenderTimer();
45275      flushSyncCallbackQueue();
45276    }
45277  }
45278}
45279function discreteUpdates$1(fn, a, b, c, d) {
45280  var prevExecutionContext = executionContext;
45281  executionContext |= DiscreteEventContext;
45282
45283  {
45284    try {
45285      return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d));
45286    } finally {
45287      executionContext = prevExecutionContext;
45288
45289      if (executionContext === NoContext) {
45290        // Flush the immediate callbacks that were scheduled during this batch
45291        resetRenderTimer();
45292        flushSyncCallbackQueue();
45293      }
45294    }
45295  }
45296}
45297function unbatchedUpdates(fn, a) {
45298  var prevExecutionContext = executionContext;
45299  executionContext &= ~BatchedContext;
45300  executionContext |= LegacyUnbatchedContext;
45301
45302  try {
45303    return fn(a);
45304  } finally {
45305    executionContext = prevExecutionContext;
45306
45307    if (executionContext === NoContext) {
45308      // Flush the immediate callbacks that were scheduled during this batch
45309      resetRenderTimer();
45310      flushSyncCallbackQueue();
45311    }
45312  }
45313}
45314function flushSync(fn, a) {
45315  var prevExecutionContext = executionContext;
45316
45317  if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) {
45318    {
45319      error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');
45320    }
45321
45322    return fn(a);
45323  }
45324
45325  executionContext |= BatchedContext;
45326
45327  {
45328    try {
45329      if (fn) {
45330        return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a));
45331      } else {
45332        return undefined;
45333      }
45334    } finally {
45335      executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
45336      // Note that this will happen even if batchedUpdates is higher up
45337      // the stack.
45338
45339      flushSyncCallbackQueue();
45340    }
45341  }
45342}
45343function pushRenderLanes(fiber, lanes) {
45344  push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);
45345  subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);
45346  workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);
45347}
45348function popRenderLanes(fiber) {
45349  subtreeRenderLanes = subtreeRenderLanesCursor.current;
45350  pop(subtreeRenderLanesCursor, fiber);
45351}
45352
45353function prepareFreshStack(root, lanes) {
45354  root.finishedWork = null;
45355  root.finishedLanes = NoLanes;
45356  var timeoutHandle = root.timeoutHandle;
45357
45358  if (timeoutHandle !== noTimeout) {
45359    // The root previous suspended and scheduled a timeout to commit a fallback
45360    // state. Now that we have additional work, cancel the timeout.
45361    root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
45362
45363    cancelTimeout(timeoutHandle);
45364  }
45365
45366  if (workInProgress !== null) {
45367    var interruptedWork = workInProgress.return;
45368
45369    while (interruptedWork !== null) {
45370      unwindInterruptedWork(interruptedWork);
45371      interruptedWork = interruptedWork.return;
45372    }
45373  }
45374
45375  workInProgressRoot = root;
45376  workInProgress = createWorkInProgress(root.current, null);
45377  workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;
45378  workInProgressRootExitStatus = RootIncomplete;
45379  workInProgressRootFatalError = null;
45380  workInProgressRootSkippedLanes = NoLanes;
45381  workInProgressRootUpdatedLanes = NoLanes;
45382  workInProgressRootPingedLanes = NoLanes;
45383
45384  {
45385    spawnedWorkDuringRender = null;
45386  }
45387
45388  {
45389    ReactStrictModeWarnings.discardPendingWarnings();
45390  }
45391}
45392
45393function handleError(root, thrownValue) {
45394  do {
45395    var erroredWork = workInProgress;
45396
45397    try {
45398      // Reset module-level state that was set during the render phase.
45399      resetContextDependencies();
45400      resetHooksAfterThrow();
45401      resetCurrentFiber(); // TODO: I found and added this missing line while investigating a
45402      // separate issue. Write a regression test using string refs.
45403
45404      ReactCurrentOwner$2.current = null;
45405
45406      if (erroredWork === null || erroredWork.return === null) {
45407        // Expected to be working on a non-root fiber. This is a fatal error
45408        // because there's no ancestor that can handle it; the root is
45409        // supposed to capture all errors that weren't caught by an error
45410        // boundary.
45411        workInProgressRootExitStatus = RootFatalErrored;
45412        workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
45413        // sibling, or the parent if there are no siblings. But since the root
45414        // has no siblings nor a parent, we set it to null. Usually this is
45415        // handled by `completeUnitOfWork` or `unwindWork`, but since we're
45416        // intentionally not calling those, we need set it here.
45417        // TODO: Consider calling `unwindWork` to pop the contexts.
45418
45419        workInProgress = null;
45420        return;
45421      }
45422
45423      if (enableProfilerTimer && erroredWork.mode & ProfileMode) {
45424        // Record the time spent rendering before an error was thrown. This
45425        // avoids inaccurate Profiler durations in the case of a
45426        // suspended render.
45427        stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);
45428      }
45429
45430      throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);
45431      completeUnitOfWork(erroredWork);
45432    } catch (yetAnotherThrownValue) {
45433      // Something in the return path also threw.
45434      thrownValue = yetAnotherThrownValue;
45435
45436      if (workInProgress === erroredWork && erroredWork !== null) {
45437        // If this boundary has already errored, then we had trouble processing
45438        // the error. Bubble it to the next boundary.
45439        erroredWork = erroredWork.return;
45440        workInProgress = erroredWork;
45441      } else {
45442        erroredWork = workInProgress;
45443      }
45444
45445      continue;
45446    } // Return to the normal work loop.
45447
45448
45449    return;
45450  } while (true);
45451}
45452
45453function pushDispatcher() {
45454  var prevDispatcher = ReactCurrentDispatcher$2.current;
45455  ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;
45456
45457  if (prevDispatcher === null) {
45458    // The React isomorphic package does not include a default dispatcher.
45459    // Instead the first renderer will lazily attach one, in order to give
45460    // nicer error messages.
45461    return ContextOnlyDispatcher;
45462  } else {
45463    return prevDispatcher;
45464  }
45465}
45466
45467function popDispatcher(prevDispatcher) {
45468  ReactCurrentDispatcher$2.current = prevDispatcher;
45469}
45470
45471function pushInteractions(root) {
45472  {
45473    var prevInteractions = tracing.__interactionsRef.current;
45474    tracing.__interactionsRef.current = root.memoizedInteractions;
45475    return prevInteractions;
45476  }
45477}
45478
45479function popInteractions(prevInteractions) {
45480  {
45481    tracing.__interactionsRef.current = prevInteractions;
45482  }
45483}
45484
45485function markCommitTimeOfFallback() {
45486  globalMostRecentFallbackTime = now();
45487}
45488function markSkippedUpdateLanes(lane) {
45489  workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);
45490}
45491function renderDidSuspend() {
45492  if (workInProgressRootExitStatus === RootIncomplete) {
45493    workInProgressRootExitStatus = RootSuspended;
45494  }
45495}
45496function renderDidSuspendDelayIfPossible() {
45497  if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
45498    workInProgressRootExitStatus = RootSuspendedWithDelay;
45499  } // Check if there are updates that we skipped tree that might have unblocked
45500  // this render.
45501
45502
45503  if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) {
45504    // Mark the current render as suspended so that we switch to working on
45505    // the updates that were skipped. Usually we only suspend at the end of
45506    // the render phase.
45507    // TODO: We should probably always mark the root as suspended immediately
45508    // (inside this function), since by suspending at the end of the render
45509    // phase introduces a potential mistake where we suspend lanes that were
45510    // pinged or updated while we were rendering.
45511    markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);
45512  }
45513}
45514function renderDidError() {
45515  if (workInProgressRootExitStatus !== RootCompleted) {
45516    workInProgressRootExitStatus = RootErrored;
45517  }
45518} // Called during render to determine if anything has suspended.
45519// Returns false if we're not sure.
45520
45521function renderHasNotSuspendedYet() {
45522  // If something errored or completed, we can't really be sure,
45523  // so those are false.
45524  return workInProgressRootExitStatus === RootIncomplete;
45525}
45526
45527function renderRootSync(root, lanes) {
45528  var prevExecutionContext = executionContext;
45529  executionContext |= RenderContext;
45530  var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
45531  // and prepare a fresh one. Otherwise we'll continue where we left off.
45532
45533  if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
45534    prepareFreshStack(root, lanes);
45535    startWorkOnPendingInteractions(root, lanes);
45536  }
45537
45538  var prevInteractions = pushInteractions(root);
45539
45540  do {
45541    try {
45542      workLoopSync();
45543      break;
45544    } catch (thrownValue) {
45545      handleError(root, thrownValue);
45546    }
45547  } while (true);
45548
45549  resetContextDependencies();
45550
45551  {
45552    popInteractions(prevInteractions);
45553  }
45554
45555  executionContext = prevExecutionContext;
45556  popDispatcher(prevDispatcher);
45557
45558  if (workInProgress !== null) {
45559    // This is a sync render, so we should have finished the whole tree.
45560    {
45561      {
45562        throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
45563      }
45564    }
45565  }
45566
45567
45568  workInProgressRoot = null;
45569  workInProgressRootRenderLanes = NoLanes;
45570  return workInProgressRootExitStatus;
45571} // The work loop is an extremely hot path. Tell Closure not to inline it.
45572
45573/** @noinline */
45574
45575
45576function workLoopSync() {
45577  // Already timed out, so perform work without checking if we need to yield.
45578  while (workInProgress !== null) {
45579    performUnitOfWork(workInProgress);
45580  }
45581}
45582
45583function renderRootConcurrent(root, lanes) {
45584  var prevExecutionContext = executionContext;
45585  executionContext |= RenderContext;
45586  var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
45587  // and prepare a fresh one. Otherwise we'll continue where we left off.
45588
45589  if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
45590    resetRenderTimer();
45591    prepareFreshStack(root, lanes);
45592    startWorkOnPendingInteractions(root, lanes);
45593  }
45594
45595  var prevInteractions = pushInteractions(root);
45596
45597  do {
45598    try {
45599      workLoopConcurrent();
45600      break;
45601    } catch (thrownValue) {
45602      handleError(root, thrownValue);
45603    }
45604  } while (true);
45605
45606  resetContextDependencies();
45607
45608  {
45609    popInteractions(prevInteractions);
45610  }
45611
45612  popDispatcher(prevDispatcher);
45613  executionContext = prevExecutionContext;
45614
45615
45616  if (workInProgress !== null) {
45617
45618    return RootIncomplete;
45619  } else {
45620
45621
45622    workInProgressRoot = null;
45623    workInProgressRootRenderLanes = NoLanes; // Return the final exit status.
45624
45625    return workInProgressRootExitStatus;
45626  }
45627}
45628/** @noinline */
45629
45630
45631function workLoopConcurrent() {
45632  // Perform work until Scheduler asks us to yield
45633  while (workInProgress !== null && !shouldYield()) {
45634    performUnitOfWork(workInProgress);
45635  }
45636}
45637
45638function performUnitOfWork(unitOfWork) {
45639  // The current, flushed, state of this fiber is the alternate. Ideally
45640  // nothing should rely on this, but relying on it here means that we don't
45641  // need an additional field on the work in progress.
45642  var current = unitOfWork.alternate;
45643  setCurrentFiber(unitOfWork);
45644  var next;
45645
45646  if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
45647    startProfilerTimer(unitOfWork);
45648    next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
45649    stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
45650  } else {
45651    next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
45652  }
45653
45654  resetCurrentFiber();
45655  unitOfWork.memoizedProps = unitOfWork.pendingProps;
45656
45657  if (next === null) {
45658    // If this doesn't spawn new work, complete the current work.
45659    completeUnitOfWork(unitOfWork);
45660  } else {
45661    workInProgress = next;
45662  }
45663
45664  ReactCurrentOwner$2.current = null;
45665}
45666
45667function completeUnitOfWork(unitOfWork) {
45668  // Attempt to complete the current unit of work, then move to the next
45669  // sibling. If there are no more siblings, return to the parent fiber.
45670  var completedWork = unitOfWork;
45671
45672  do {
45673    // The current, flushed, state of this fiber is the alternate. Ideally
45674    // nothing should rely on this, but relying on it here means that we don't
45675    // need an additional field on the work in progress.
45676    var current = completedWork.alternate;
45677    var returnFiber = completedWork.return; // Check if the work completed or if something threw.
45678
45679    if ((completedWork.flags & Incomplete) === NoFlags) {
45680      setCurrentFiber(completedWork);
45681      var next = void 0;
45682
45683      if ( (completedWork.mode & ProfileMode) === NoMode) {
45684        next = completeWork(current, completedWork, subtreeRenderLanes);
45685      } else {
45686        startProfilerTimer(completedWork);
45687        next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.
45688
45689        stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);
45690      }
45691
45692      resetCurrentFiber();
45693
45694      if (next !== null) {
45695        // Completing this fiber spawned new work. Work on that next.
45696        workInProgress = next;
45697        return;
45698      }
45699
45700      resetChildLanes(completedWork);
45701
45702      if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete
45703      (returnFiber.flags & Incomplete) === NoFlags) {
45704        // Append all the effects of the subtree and this fiber onto the effect
45705        // list of the parent. The completion order of the children affects the
45706        // side-effect order.
45707        if (returnFiber.firstEffect === null) {
45708          returnFiber.firstEffect = completedWork.firstEffect;
45709        }
45710
45711        if (completedWork.lastEffect !== null) {
45712          if (returnFiber.lastEffect !== null) {
45713            returnFiber.lastEffect.nextEffect = completedWork.firstEffect;
45714          }
45715
45716          returnFiber.lastEffect = completedWork.lastEffect;
45717        } // If this fiber had side-effects, we append it AFTER the children's
45718        // side-effects. We can perform certain side-effects earlier if needed,
45719        // by doing multiple passes over the effect list. We don't want to
45720        // schedule our own side-effect on our own list because if end up
45721        // reusing children we'll schedule this effect onto itself since we're
45722        // at the end.
45723
45724
45725        var flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effect
45726        // list. PerformedWork effect is read by React DevTools but shouldn't be
45727        // committed.
45728
45729        if (flags > PerformedWork) {
45730          if (returnFiber.lastEffect !== null) {
45731            returnFiber.lastEffect.nextEffect = completedWork;
45732          } else {
45733            returnFiber.firstEffect = completedWork;
45734          }
45735
45736          returnFiber.lastEffect = completedWork;
45737        }
45738      }
45739    } else {
45740      // This fiber did not complete because something threw. Pop values off
45741      // the stack without entering the complete phase. If this is a boundary,
45742      // capture values if possible.
45743      var _next = unwindWork(completedWork); // Because this fiber did not complete, don't reset its expiration time.
45744
45745
45746      if (_next !== null) {
45747        // If completing this work spawned new work, do that next. We'll come
45748        // back here again.
45749        // Since we're restarting, remove anything that is not a host effect
45750        // from the effect tag.
45751        _next.flags &= HostEffectMask;
45752        workInProgress = _next;
45753        return;
45754      }
45755
45756      if ( (completedWork.mode & ProfileMode) !== NoMode) {
45757        // Record the render duration for the fiber that errored.
45758        stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.
45759
45760        var actualDuration = completedWork.actualDuration;
45761        var child = completedWork.child;
45762
45763        while (child !== null) {
45764          actualDuration += child.actualDuration;
45765          child = child.sibling;
45766        }
45767
45768        completedWork.actualDuration = actualDuration;
45769      }
45770
45771      if (returnFiber !== null) {
45772        // Mark the parent fiber as incomplete and clear its effect list.
45773        returnFiber.firstEffect = returnFiber.lastEffect = null;
45774        returnFiber.flags |= Incomplete;
45775      }
45776    }
45777
45778    var siblingFiber = completedWork.sibling;
45779
45780    if (siblingFiber !== null) {
45781      // If there is more work to do in this returnFiber, do that next.
45782      workInProgress = siblingFiber;
45783      return;
45784    } // Otherwise, return to the parent
45785
45786
45787    completedWork = returnFiber; // Update the next thing we're working on in case something throws.
45788
45789    workInProgress = completedWork;
45790  } while (completedWork !== null); // We've reached the root.
45791
45792
45793  if (workInProgressRootExitStatus === RootIncomplete) {
45794    workInProgressRootExitStatus = RootCompleted;
45795  }
45796}
45797
45798function resetChildLanes(completedWork) {
45799  if ( // TODO: Move this check out of the hot path by moving `resetChildLanes`
45800  // to switch statement in `completeWork`.
45801  (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) {
45802    // The children of this component are hidden. Don't bubble their
45803    // expiration times.
45804    return;
45805  }
45806
45807  var newChildLanes = NoLanes; // Bubble up the earliest expiration time.
45808
45809  if ( (completedWork.mode & ProfileMode) !== NoMode) {
45810    // In profiling mode, resetChildExpirationTime is also used to reset
45811    // profiler durations.
45812    var actualDuration = completedWork.actualDuration;
45813    var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will
45814    // only be updated if work is done on the fiber (i.e. it doesn't bailout).
45815    // When work is done, it should bubble to the parent's actualDuration. If
45816    // the fiber has not been cloned though, (meaning no work was done), then
45817    // this value will reflect the amount of time spent working on a previous
45818    // render. In that case it should not bubble. We determine whether it was
45819    // cloned by comparing the child pointer.
45820
45821    var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;
45822    var child = completedWork.child;
45823
45824    while (child !== null) {
45825      newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));
45826
45827      if (shouldBubbleActualDurations) {
45828        actualDuration += child.actualDuration;
45829      }
45830
45831      treeBaseDuration += child.treeBaseDuration;
45832      child = child.sibling;
45833    }
45834
45835    var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null;
45836
45837    if (isTimedOutSuspense) {
45838      // Don't count time spent in a timed out Suspense subtree as part of the base duration.
45839      var primaryChildFragment = completedWork.child;
45840
45841      if (primaryChildFragment !== null) {
45842        treeBaseDuration -= primaryChildFragment.treeBaseDuration;
45843      }
45844    }
45845
45846    completedWork.actualDuration = actualDuration;
45847    completedWork.treeBaseDuration = treeBaseDuration;
45848  } else {
45849    var _child = completedWork.child;
45850
45851    while (_child !== null) {
45852      newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));
45853      _child = _child.sibling;
45854    }
45855  }
45856
45857  completedWork.childLanes = newChildLanes;
45858}
45859
45860function commitRoot(root) {
45861  var renderPriorityLevel = getCurrentPriorityLevel();
45862  runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel));
45863  return null;
45864}
45865
45866function commitRootImpl(root, renderPriorityLevel) {
45867  do {
45868    // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
45869    // means `flushPassiveEffects` will sometimes result in additional
45870    // passive effects. So we need to keep flushing in a loop until there are
45871    // no more pending effects.
45872    // TODO: Might be better if `flushPassiveEffects` did not automatically
45873    // flush synchronous work at the end, to avoid factoring hazards like this.
45874    flushPassiveEffects();
45875  } while (rootWithPendingPassiveEffects !== null);
45876
45877  flushRenderPhaseStrictModeWarningsInDEV();
45878
45879  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
45880    {
45881      throw Error( "Should not already be working." );
45882    }
45883  }
45884
45885  var finishedWork = root.finishedWork;
45886  var lanes = root.finishedLanes;
45887
45888  if (finishedWork === null) {
45889
45890    return null;
45891  }
45892
45893  root.finishedWork = null;
45894  root.finishedLanes = NoLanes;
45895
45896  if (!(finishedWork !== root.current)) {
45897    {
45898      throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." );
45899    }
45900  } // commitRoot never returns a continuation; it always finishes synchronously.
45901  // So we can clear these now to allow a new callback to be scheduled.
45902
45903
45904  root.callbackNode = null; // Update the first and last pending times on this root. The new first
45905  // pending time is whatever is left on the root fiber.
45906
45907  var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);
45908  markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call of
45909  // `flushDiscreteUpdates` starts a useless render pass which may cancels
45910  // a scheduled timeout.
45911
45912  if (rootsWithPendingDiscreteUpdates !== null) {
45913    if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) {
45914      rootsWithPendingDiscreteUpdates.delete(root);
45915    }
45916  }
45917
45918  if (root === workInProgressRoot) {
45919    // We can reset these now that they are finished.
45920    workInProgressRoot = null;
45921    workInProgress = null;
45922    workInProgressRootRenderLanes = NoLanes;
45923  } // Get the list of effects.
45924
45925
45926  var firstEffect;
45927
45928  if (finishedWork.flags > PerformedWork) {
45929    // A fiber's effect list consists only of its children, not itself. So if
45930    // the root has an effect, we need to add it to the end of the list. The
45931    // resulting list is the set that would belong to the root's parent, if it
45932    // had one; that is, all the effects in the tree including the root.
45933    if (finishedWork.lastEffect !== null) {
45934      finishedWork.lastEffect.nextEffect = finishedWork;
45935      firstEffect = finishedWork.firstEffect;
45936    } else {
45937      firstEffect = finishedWork;
45938    }
45939  } else {
45940    // There is no effect on the root.
45941    firstEffect = finishedWork.firstEffect;
45942  }
45943
45944  if (firstEffect !== null) {
45945
45946    var prevExecutionContext = executionContext;
45947    executionContext |= CommitContext;
45948    var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles
45949
45950    ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass
45951    // of the effect list for each phase: all mutation effects come before all
45952    // layout effects, and so on.
45953    // The first phase a "before mutation" phase. We use this phase to read the
45954    // state of the host tree right before we mutate it. This is where
45955    // getSnapshotBeforeUpdate is called.
45956
45957    focusedInstanceHandle = prepareForCommit(root.containerInfo);
45958    shouldFireAfterActiveInstanceBlur = false;
45959    nextEffect = firstEffect;
45960
45961    do {
45962      {
45963        invokeGuardedCallback(null, commitBeforeMutationEffects, null);
45964
45965        if (hasCaughtError()) {
45966          if (!(nextEffect !== null)) {
45967            {
45968              throw Error( "Should be working on an effect." );
45969            }
45970          }
45971
45972          var error = clearCaughtError();
45973          captureCommitPhaseError(nextEffect, error);
45974          nextEffect = nextEffect.nextEffect;
45975        }
45976      }
45977    } while (nextEffect !== null); // We no longer need to track the active instance fiber
45978
45979
45980    focusedInstanceHandle = null;
45981
45982    {
45983      // Mark the current commit time to be shared by all Profilers in this
45984      // batch. This enables them to be grouped later.
45985      recordCommitTime();
45986    } // The next phase is the mutation phase, where we mutate the host tree.
45987
45988
45989    nextEffect = firstEffect;
45990
45991    do {
45992      {
45993        invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);
45994
45995        if (hasCaughtError()) {
45996          if (!(nextEffect !== null)) {
45997            {
45998              throw Error( "Should be working on an effect." );
45999            }
46000          }
46001
46002          var _error = clearCaughtError();
46003
46004          captureCommitPhaseError(nextEffect, _error);
46005          nextEffect = nextEffect.nextEffect;
46006        }
46007      }
46008    } while (nextEffect !== null);
46009
46010    resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after
46011    // the mutation phase, so that the previous tree is still current during
46012    // componentWillUnmount, but before the layout phase, so that the finished
46013    // work is current during componentDidMount/Update.
46014
46015    root.current = finishedWork; // The next phase is the layout phase, where we call effects that read
46016    // the host tree after it's been mutated. The idiomatic use case for this is
46017    // layout, but class component lifecycles also fire here for legacy reasons.
46018
46019    nextEffect = firstEffect;
46020
46021    do {
46022      {
46023        invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes);
46024
46025        if (hasCaughtError()) {
46026          if (!(nextEffect !== null)) {
46027            {
46028              throw Error( "Should be working on an effect." );
46029            }
46030          }
46031
46032          var _error2 = clearCaughtError();
46033
46034          captureCommitPhaseError(nextEffect, _error2);
46035          nextEffect = nextEffect.nextEffect;
46036        }
46037      }
46038    } while (nextEffect !== null);
46039
46040    nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an
46041    // opportunity to paint.
46042
46043    requestPaint();
46044
46045    {
46046      popInteractions(prevInteractions);
46047    }
46048
46049    executionContext = prevExecutionContext;
46050  } else {
46051    // No effects.
46052    root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were
46053    // no effects.
46054    // TODO: Maybe there's a better way to report this.
46055
46056    {
46057      recordCommitTime();
46058    }
46059  }
46060
46061  var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;
46062
46063  if (rootDoesHavePassiveEffects) {
46064    // This commit has passive effects. Stash a reference to them. But don't
46065    // schedule a callback until after flushing layout work.
46066    rootDoesHavePassiveEffects = false;
46067    rootWithPendingPassiveEffects = root;
46068    pendingPassiveEffectsLanes = lanes;
46069    pendingPassiveEffectsRenderPriority = renderPriorityLevel;
46070  } else {
46071    // We are done with the effect chain at this point so let's clear the
46072    // nextEffect pointers to assist with GC. If we have passive effects, we'll
46073    // clear this in flushPassiveEffects.
46074    nextEffect = firstEffect;
46075
46076    while (nextEffect !== null) {
46077      var nextNextEffect = nextEffect.nextEffect;
46078      nextEffect.nextEffect = null;
46079
46080      if (nextEffect.flags & Deletion) {
46081        detachFiberAfterEffects(nextEffect);
46082      }
46083
46084      nextEffect = nextNextEffect;
46085    }
46086  } // Read this again, since an effect might have updated it
46087
46088
46089  remainingLanes = root.pendingLanes; // Check if there's remaining work on this root
46090
46091  if (remainingLanes !== NoLanes) {
46092    {
46093      if (spawnedWorkDuringRender !== null) {
46094        var expirationTimes = spawnedWorkDuringRender;
46095        spawnedWorkDuringRender = null;
46096
46097        for (var i = 0; i < expirationTimes.length; i++) {
46098          scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);
46099        }
46100      }
46101
46102      schedulePendingInteractions(root, remainingLanes);
46103    }
46104  } else {
46105    // If there's no remaining work, we can clear the set of already failed
46106    // error boundaries.
46107    legacyErrorBoundariesThatAlreadyFailed = null;
46108  }
46109
46110  {
46111    if (!rootDidHavePassiveEffects) {
46112      // If there are no passive effects, then we can complete the pending interactions.
46113      // Otherwise, we'll wait until after the passive effects are flushed.
46114      // Wait to do this until after remaining work has been scheduled,
46115      // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.
46116      finishPendingInteractions(root, lanes);
46117    }
46118  }
46119
46120  if (remainingLanes === SyncLane) {
46121    // Count the number of times the root synchronously re-renders without
46122    // finishing. If there are too many, it indicates an infinite update loop.
46123    if (root === rootWithNestedUpdates) {
46124      nestedUpdateCount++;
46125    } else {
46126      nestedUpdateCount = 0;
46127      rootWithNestedUpdates = root;
46128    }
46129  } else {
46130    nestedUpdateCount = 0;
46131  }
46132
46133  onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
46134
46135  {
46136    onCommitRoot$1();
46137  } // Always call this before exiting `commitRoot`, to ensure that any
46138  // additional work on this root is scheduled.
46139
46140
46141  ensureRootIsScheduled(root, now());
46142
46143  if (hasUncaughtError) {
46144    hasUncaughtError = false;
46145    var _error3 = firstUncaughtError;
46146    firstUncaughtError = null;
46147    throw _error3;
46148  }
46149
46150  if ((executionContext & LegacyUnbatchedContext) !== NoContext) {
46151    // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired
46152    // synchronously, but layout updates should be deferred until the end
46153    // of the batch.
46154
46155
46156    return null;
46157  } // If layout work was scheduled, flush it now.
46158
46159
46160  flushSyncCallbackQueue();
46161
46162  return null;
46163}
46164
46165function commitBeforeMutationEffects() {
46166  while (nextEffect !== null) {
46167    var current = nextEffect.alternate;
46168
46169    if (!shouldFireAfterActiveInstanceBlur && focusedInstanceHandle !== null) {
46170      if ((nextEffect.flags & Deletion) !== NoFlags) {
46171        if (doesFiberContain(nextEffect, focusedInstanceHandle)) {
46172          shouldFireAfterActiveInstanceBlur = true;
46173        }
46174      } else {
46175        // TODO: Move this out of the hot path using a dedicated effect tag.
46176        if (nextEffect.tag === SuspenseComponent && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle)) {
46177          shouldFireAfterActiveInstanceBlur = true;
46178        }
46179      }
46180    }
46181
46182    var flags = nextEffect.flags;
46183
46184    if ((flags & Snapshot) !== NoFlags) {
46185      setCurrentFiber(nextEffect);
46186      commitBeforeMutationLifeCycles(current, nextEffect);
46187      resetCurrentFiber();
46188    }
46189
46190    if ((flags & Passive) !== NoFlags) {
46191      // If there are passive effects, schedule a callback to flush at
46192      // the earliest opportunity.
46193      if (!rootDoesHavePassiveEffects) {
46194        rootDoesHavePassiveEffects = true;
46195        scheduleCallback(NormalPriority$1, function () {
46196          flushPassiveEffects();
46197          return null;
46198        });
46199      }
46200    }
46201
46202    nextEffect = nextEffect.nextEffect;
46203  }
46204}
46205
46206function commitMutationEffects(root, renderPriorityLevel) {
46207  // TODO: Should probably move the bulk of this function to commitWork.
46208  while (nextEffect !== null) {
46209    setCurrentFiber(nextEffect);
46210    var flags = nextEffect.flags;
46211
46212    if (flags & ContentReset) {
46213      commitResetTextContent(nextEffect);
46214    }
46215
46216    if (flags & Ref) {
46217      var current = nextEffect.alternate;
46218
46219      if (current !== null) {
46220        commitDetachRef(current);
46221      }
46222    } // The following switch statement is only concerned about placement,
46223    // updates, and deletions. To avoid needing to add a case for every possible
46224    // bitmap value, we remove the secondary effects from the effect tag and
46225    // switch on that value.
46226
46227
46228    var primaryFlags = flags & (Placement | Update | Deletion | Hydrating);
46229
46230    switch (primaryFlags) {
46231      case Placement:
46232        {
46233          commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
46234          // inserted, before any life-cycles like componentDidMount gets called.
46235          // TODO: findDOMNode doesn't rely on this any more but isMounted does
46236          // and isMounted is deprecated anyway so we should be able to kill this.
46237
46238          nextEffect.flags &= ~Placement;
46239          break;
46240        }
46241
46242      case PlacementAndUpdate:
46243        {
46244          // Placement
46245          commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
46246          // inserted, before any life-cycles like componentDidMount gets called.
46247
46248          nextEffect.flags &= ~Placement; // Update
46249
46250          var _current = nextEffect.alternate;
46251          commitWork(_current, nextEffect);
46252          break;
46253        }
46254
46255      case Hydrating:
46256        {
46257          nextEffect.flags &= ~Hydrating;
46258          break;
46259        }
46260
46261      case HydratingAndUpdate:
46262        {
46263          nextEffect.flags &= ~Hydrating; // Update
46264
46265          var _current2 = nextEffect.alternate;
46266          commitWork(_current2, nextEffect);
46267          break;
46268        }
46269
46270      case Update:
46271        {
46272          var _current3 = nextEffect.alternate;
46273          commitWork(_current3, nextEffect);
46274          break;
46275        }
46276
46277      case Deletion:
46278        {
46279          commitDeletion(root, nextEffect);
46280          break;
46281        }
46282    }
46283
46284    resetCurrentFiber();
46285    nextEffect = nextEffect.nextEffect;
46286  }
46287}
46288
46289function commitLayoutEffects(root, committedLanes) {
46290
46291
46292  while (nextEffect !== null) {
46293    setCurrentFiber(nextEffect);
46294    var flags = nextEffect.flags;
46295
46296    if (flags & (Update | Callback)) {
46297      var current = nextEffect.alternate;
46298      commitLifeCycles(root, current, nextEffect);
46299    }
46300
46301    {
46302      if (flags & Ref) {
46303        commitAttachRef(nextEffect);
46304      }
46305    }
46306
46307    resetCurrentFiber();
46308    nextEffect = nextEffect.nextEffect;
46309  }
46310}
46311
46312function flushPassiveEffects() {
46313  // Returns whether passive effects were flushed.
46314  if (pendingPassiveEffectsRenderPriority !== NoPriority$1) {
46315    var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;
46316    pendingPassiveEffectsRenderPriority = NoPriority$1;
46317
46318    {
46319      return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
46320    }
46321  }
46322
46323  return false;
46324}
46325function enqueuePendingPassiveHookEffectMount(fiber, effect) {
46326  pendingPassiveHookEffectsMount.push(effect, fiber);
46327
46328  if (!rootDoesHavePassiveEffects) {
46329    rootDoesHavePassiveEffects = true;
46330    scheduleCallback(NormalPriority$1, function () {
46331      flushPassiveEffects();
46332      return null;
46333    });
46334  }
46335}
46336function enqueuePendingPassiveHookEffectUnmount(fiber, effect) {
46337  pendingPassiveHookEffectsUnmount.push(effect, fiber);
46338
46339  {
46340    fiber.flags |= PassiveUnmountPendingDev;
46341    var alternate = fiber.alternate;
46342
46343    if (alternate !== null) {
46344      alternate.flags |= PassiveUnmountPendingDev;
46345    }
46346  }
46347
46348  if (!rootDoesHavePassiveEffects) {
46349    rootDoesHavePassiveEffects = true;
46350    scheduleCallback(NormalPriority$1, function () {
46351      flushPassiveEffects();
46352      return null;
46353    });
46354  }
46355}
46356
46357function invokePassiveEffectCreate(effect) {
46358  var create = effect.create;
46359  effect.destroy = create();
46360}
46361
46362function flushPassiveEffectsImpl() {
46363  if (rootWithPendingPassiveEffects === null) {
46364    return false;
46365  }
46366
46367  var root = rootWithPendingPassiveEffects;
46368  var lanes = pendingPassiveEffectsLanes;
46369  rootWithPendingPassiveEffects = null;
46370  pendingPassiveEffectsLanes = NoLanes;
46371
46372  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
46373    {
46374      throw Error( "Cannot flush passive effects while already rendering." );
46375    }
46376  }
46377
46378  {
46379    isFlushingPassiveEffects = true;
46380  }
46381
46382  var prevExecutionContext = executionContext;
46383  executionContext |= CommitContext;
46384  var prevInteractions = pushInteractions(root); // It's important that ALL pending passive effect destroy functions are called
46385  // before ANY passive effect create functions are called.
46386  // Otherwise effects in sibling components might interfere with each other.
46387  // e.g. a destroy function in one component may unintentionally override a ref
46388  // value set by a create function in another component.
46389  // Layout effects have the same constraint.
46390  // First pass: Destroy stale passive effects.
46391
46392  var unmountEffects = pendingPassiveHookEffectsUnmount;
46393  pendingPassiveHookEffectsUnmount = [];
46394
46395  for (var i = 0; i < unmountEffects.length; i += 2) {
46396    var _effect = unmountEffects[i];
46397    var fiber = unmountEffects[i + 1];
46398    var destroy = _effect.destroy;
46399    _effect.destroy = undefined;
46400
46401    {
46402      fiber.flags &= ~PassiveUnmountPendingDev;
46403      var alternate = fiber.alternate;
46404
46405      if (alternate !== null) {
46406        alternate.flags &= ~PassiveUnmountPendingDev;
46407      }
46408    }
46409
46410    if (typeof destroy === 'function') {
46411      {
46412        setCurrentFiber(fiber);
46413
46414        {
46415          invokeGuardedCallback(null, destroy, null);
46416        }
46417
46418        if (hasCaughtError()) {
46419          if (!(fiber !== null)) {
46420            {
46421              throw Error( "Should be working on an effect." );
46422            }
46423          }
46424
46425          var error = clearCaughtError();
46426          captureCommitPhaseError(fiber, error);
46427        }
46428
46429        resetCurrentFiber();
46430      }
46431    }
46432  } // Second pass: Create new passive effects.
46433
46434
46435  var mountEffects = pendingPassiveHookEffectsMount;
46436  pendingPassiveHookEffectsMount = [];
46437
46438  for (var _i = 0; _i < mountEffects.length; _i += 2) {
46439    var _effect2 = mountEffects[_i];
46440    var _fiber = mountEffects[_i + 1];
46441
46442    {
46443      setCurrentFiber(_fiber);
46444
46445      {
46446        invokeGuardedCallback(null, invokePassiveEffectCreate, null, _effect2);
46447      }
46448
46449      if (hasCaughtError()) {
46450        if (!(_fiber !== null)) {
46451          {
46452            throw Error( "Should be working on an effect." );
46453          }
46454        }
46455
46456        var _error4 = clearCaughtError();
46457
46458        captureCommitPhaseError(_fiber, _error4);
46459      }
46460
46461      resetCurrentFiber();
46462    }
46463  } // Note: This currently assumes there are no passive effects on the root fiber
46464  // because the root is not part of its own effect list.
46465  // This could change in the future.
46466
46467
46468  var effect = root.current.firstEffect;
46469
46470  while (effect !== null) {
46471    var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC
46472
46473    effect.nextEffect = null;
46474
46475    if (effect.flags & Deletion) {
46476      detachFiberAfterEffects(effect);
46477    }
46478
46479    effect = nextNextEffect;
46480  }
46481
46482  {
46483    popInteractions(prevInteractions);
46484    finishPendingInteractions(root, lanes);
46485  }
46486
46487  {
46488    isFlushingPassiveEffects = false;
46489  }
46490
46491  executionContext = prevExecutionContext;
46492  flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this
46493  // exceeds the limit, we'll fire a warning.
46494
46495  nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;
46496  return true;
46497}
46498
46499function isAlreadyFailedLegacyErrorBoundary(instance) {
46500  return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
46501}
46502function markLegacyErrorBoundaryAsFailed(instance) {
46503  if (legacyErrorBoundariesThatAlreadyFailed === null) {
46504    legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
46505  } else {
46506    legacyErrorBoundariesThatAlreadyFailed.add(instance);
46507  }
46508}
46509
46510function prepareToThrowUncaughtError(error) {
46511  if (!hasUncaughtError) {
46512    hasUncaughtError = true;
46513    firstUncaughtError = error;
46514  }
46515}
46516
46517var onUncaughtError = prepareToThrowUncaughtError;
46518
46519function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
46520  var errorInfo = createCapturedValue(error, sourceFiber);
46521  var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);
46522  enqueueUpdate(rootFiber, update);
46523  var eventTime = requestEventTime();
46524  var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);
46525
46526  if (root !== null) {
46527    markRootUpdated(root, SyncLane, eventTime);
46528    ensureRootIsScheduled(root, eventTime);
46529    schedulePendingInteractions(root, SyncLane);
46530  }
46531}
46532
46533function captureCommitPhaseError(sourceFiber, error) {
46534  if (sourceFiber.tag === HostRoot) {
46535    // Error was thrown at the root. There is no parent, so the root
46536    // itself should capture it.
46537    captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
46538    return;
46539  }
46540
46541  var fiber = sourceFiber.return;
46542
46543  while (fiber !== null) {
46544    if (fiber.tag === HostRoot) {
46545      captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
46546      return;
46547    } else if (fiber.tag === ClassComponent) {
46548      var ctor = fiber.type;
46549      var instance = fiber.stateNode;
46550
46551      if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
46552        var errorInfo = createCapturedValue(error, sourceFiber);
46553        var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
46554        enqueueUpdate(fiber, update);
46555        var eventTime = requestEventTime();
46556        var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);
46557
46558        if (root !== null) {
46559          markRootUpdated(root, SyncLane, eventTime);
46560          ensureRootIsScheduled(root, eventTime);
46561          schedulePendingInteractions(root, SyncLane);
46562        } else {
46563          // This component has already been unmounted.
46564          // We can't schedule any follow up work for the root because the fiber is already unmounted,
46565          // but we can still call the log-only boundary so the error isn't swallowed.
46566          //
46567          // TODO This is only a temporary bandaid for the old reconciler fork.
46568          // We can delete this special case once the new fork is merged.
46569          if (typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
46570            try {
46571              instance.componentDidCatch(error, errorInfo);
46572            } catch (errorToIgnore) {// TODO Ignore this error? Rethrow it?
46573              // This is kind of an edge case.
46574            }
46575          }
46576        }
46577
46578        return;
46579      }
46580    }
46581
46582    fiber = fiber.return;
46583  }
46584}
46585function pingSuspendedRoot(root, wakeable, pingedLanes) {
46586  var pingCache = root.pingCache;
46587
46588  if (pingCache !== null) {
46589    // The wakeable resolved, so we no longer need to memoize, because it will
46590    // never be thrown again.
46591    pingCache.delete(wakeable);
46592  }
46593
46594  var eventTime = requestEventTime();
46595  markRootPinged(root, pingedLanes);
46596
46597  if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {
46598    // Received a ping at the same priority level at which we're currently
46599    // rendering. We might want to restart this render. This should mirror
46600    // the logic of whether or not a root suspends once it completes.
46601    // TODO: If we're rendering sync either due to Sync, Batched or expired,
46602    // we should probably never restart.
46603    // If we're suspended with delay, or if it's a retry, we'll always suspend
46604    // so we can always restart.
46605    if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
46606      // Restart from the root.
46607      prepareFreshStack(root, NoLanes);
46608    } else {
46609      // Even though we can't restart right now, we might get an
46610      // opportunity later. So we mark this render as having a ping.
46611      workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);
46612    }
46613  }
46614
46615  ensureRootIsScheduled(root, eventTime);
46616  schedulePendingInteractions(root, pingedLanes);
46617}
46618
46619function retryTimedOutBoundary(boundaryFiber, retryLane) {
46620  // The boundary fiber (a Suspense component or SuspenseList component)
46621  // previously was rendered in its fallback state. One of the promises that
46622  // suspended it has resolved, which means at least part of the tree was
46623  // likely unblocked. Try rendering again, at a new expiration time.
46624  if (retryLane === NoLane) {
46625    retryLane = requestRetryLane(boundaryFiber);
46626  } // TODO: Special case idle priority?
46627
46628
46629  var eventTime = requestEventTime();
46630  var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);
46631
46632  if (root !== null) {
46633    markRootUpdated(root, retryLane, eventTime);
46634    ensureRootIsScheduled(root, eventTime);
46635    schedulePendingInteractions(root, retryLane);
46636  }
46637}
46638function resolveRetryWakeable(boundaryFiber, wakeable) {
46639  var retryLane = NoLane; // Default
46640
46641  var retryCache;
46642
46643  {
46644    retryCache = boundaryFiber.stateNode;
46645  }
46646
46647  if (retryCache !== null) {
46648    // The wakeable resolved, so we no longer need to memoize, because it will
46649    // never be thrown again.
46650    retryCache.delete(wakeable);
46651  }
46652
46653  retryTimedOutBoundary(boundaryFiber, retryLane);
46654} // Computes the next Just Noticeable Difference (JND) boundary.
46655// The theory is that a person can't tell the difference between small differences in time.
46656// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
46657// difference in the experience. However, waiting for longer might mean that we can avoid
46658// showing an intermediate loading state. The longer we have already waited, the harder it
46659// is to tell small differences in time. Therefore, the longer we've already waited,
46660// the longer we can wait additionally. At some point we have to give up though.
46661// We pick a train model where the next boundary commits at a consistent schedule.
46662// These particular numbers are vague estimates. We expect to adjust them based on research.
46663
46664function jnd(timeElapsed) {
46665  return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
46666}
46667
46668function checkForNestedUpdates() {
46669  if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
46670    nestedUpdateCount = 0;
46671    rootWithNestedUpdates = null;
46672
46673    {
46674      {
46675        throw Error( "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." );
46676      }
46677    }
46678  }
46679
46680  {
46681    if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {
46682      nestedPassiveUpdateCount = 0;
46683
46684      error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');
46685    }
46686  }
46687}
46688
46689function flushRenderPhaseStrictModeWarningsInDEV() {
46690  {
46691    ReactStrictModeWarnings.flushLegacyContextWarning();
46692
46693    {
46694      ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
46695    }
46696  }
46697}
46698
46699var didWarnStateUpdateForNotYetMountedComponent = null;
46700
46701function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
46702  {
46703    if ((executionContext & RenderContext) !== NoContext) {
46704      // We let the other warning about render phase updates deal with this one.
46705      return;
46706    }
46707
46708    if (!(fiber.mode & (BlockingMode | ConcurrentMode))) {
46709      return;
46710    }
46711
46712    var tag = fiber.tag;
46713
46714    if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
46715      // Only warn for user-defined components, not internal ones like Suspense.
46716      return;
46717    } // We show the whole stack but dedupe on the top component's name because
46718    // the problematic code almost always lies inside that component.
46719
46720
46721    var componentName = getComponentName(fiber.type) || 'ReactComponent';
46722
46723    if (didWarnStateUpdateForNotYetMountedComponent !== null) {
46724      if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {
46725        return;
46726      }
46727
46728      didWarnStateUpdateForNotYetMountedComponent.add(componentName);
46729    } else {
46730      didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);
46731    }
46732
46733    var previousFiber = current;
46734
46735    try {
46736      setCurrentFiber(fiber);
46737
46738      error("Can't perform a React state update on a component that hasn't mounted yet. " + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');
46739    } finally {
46740      if (previousFiber) {
46741        setCurrentFiber(fiber);
46742      } else {
46743        resetCurrentFiber();
46744      }
46745    }
46746  }
46747}
46748
46749var didWarnStateUpdateForUnmountedComponent = null;
46750
46751function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
46752  {
46753    var tag = fiber.tag;
46754
46755    if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
46756      // Only warn for user-defined components, not internal ones like Suspense.
46757      return;
46758    } // If there are pending passive effects unmounts for this Fiber,
46759    // we can assume that they would have prevented this update.
46760
46761
46762    if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) {
46763      return;
46764    } // We show the whole stack but dedupe on the top component's name because
46765    // the problematic code almost always lies inside that component.
46766
46767
46768    var componentName = getComponentName(fiber.type) || 'ReactComponent';
46769
46770    if (didWarnStateUpdateForUnmountedComponent !== null) {
46771      if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {
46772        return;
46773      }
46774
46775      didWarnStateUpdateForUnmountedComponent.add(componentName);
46776    } else {
46777      didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
46778    }
46779
46780    if (isFlushingPassiveEffects) ; else {
46781      var previousFiber = current;
46782
46783      try {
46784        setCurrentFiber(fiber);
46785
46786        error("Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function');
46787      } finally {
46788        if (previousFiber) {
46789          setCurrentFiber(fiber);
46790        } else {
46791          resetCurrentFiber();
46792        }
46793      }
46794    }
46795  }
46796}
46797
46798var beginWork$1;
46799
46800{
46801  var dummyFiber = null;
46802
46803  beginWork$1 = function (current, unitOfWork, lanes) {
46804    // If a component throws an error, we replay it again in a synchronously
46805    // dispatched event, so that the debugger will treat it as an uncaught
46806    // error See ReactErrorUtils for more information.
46807    // Before entering the begin phase, copy the work-in-progress onto a dummy
46808    // fiber. If beginWork throws, we'll use this to reset the state.
46809    var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);
46810
46811    try {
46812      return beginWork(current, unitOfWork, lanes);
46813    } catch (originalError) {
46814      if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
46815        // Don't replay promises. Treat everything else like an error.
46816        throw originalError;
46817      } // Keep this code in sync with handleError; any changes here must have
46818      // corresponding changes there.
46819
46820
46821      resetContextDependencies();
46822      resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the
46823      // same fiber again.
46824      // Unwind the failed stack frame
46825
46826      unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.
46827
46828      assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);
46829
46830      if ( unitOfWork.mode & ProfileMode) {
46831        // Reset the profiler timer.
46832        startProfilerTimer(unitOfWork);
46833      } // Run beginWork again.
46834
46835
46836      invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);
46837
46838      if (hasCaughtError()) {
46839        var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
46840        // Rethrow this error instead of the original one.
46841
46842        throw replayError;
46843      } else {
46844        // This branch is reachable if the render phase is impure.
46845        throw originalError;
46846      }
46847    }
46848  };
46849}
46850
46851var didWarnAboutUpdateInRender = false;
46852var didWarnAboutUpdateInRenderForAnotherComponent;
46853
46854{
46855  didWarnAboutUpdateInRenderForAnotherComponent = new Set();
46856}
46857
46858function warnAboutRenderPhaseUpdatesInDEV(fiber) {
46859  {
46860    if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {
46861      switch (fiber.tag) {
46862        case FunctionComponent:
46863        case ForwardRef:
46864        case SimpleMemoComponent:
46865          {
46866            var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.
46867
46868            var dedupeKey = renderingComponentName;
46869
46870            if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
46871              didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
46872              var setStateComponentName = getComponentName(fiber.type) || 'Unknown';
46873
46874              error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
46875            }
46876
46877            break;
46878          }
46879
46880        case ClassComponent:
46881          {
46882            if (!didWarnAboutUpdateInRender) {
46883              error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');
46884
46885              didWarnAboutUpdateInRender = true;
46886            }
46887
46888            break;
46889          }
46890      }
46891    }
46892  }
46893} // a 'shared' variable that changes when act() opens/closes in tests.
46894
46895
46896var IsThisRendererActing = {
46897  current: false
46898};
46899function warnIfNotScopedWithMatchingAct(fiber) {
46900  {
46901    if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {
46902      var previousFiber = current;
46903
46904      try {
46905        setCurrentFiber(fiber);
46906
46907        error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
46908        'import {act} fr' + "om 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
46909        'import TestRenderer fr' + "om react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);');
46910      } finally {
46911        if (previousFiber) {
46912          setCurrentFiber(fiber);
46913        } else {
46914          resetCurrentFiber();
46915        }
46916      }
46917    }
46918  }
46919}
46920function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
46921  {
46922    if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
46923      error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + '  /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
46924    }
46925  }
46926}
46927
46928function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {
46929  {
46930    if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
46931      var previousFiber = current;
46932
46933      try {
46934        setCurrentFiber(fiber);
46935
46936        error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + '  /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
46937      } finally {
46938        if (previousFiber) {
46939          setCurrentFiber(fiber);
46940        } else {
46941          resetCurrentFiber();
46942        }
46943      }
46944    }
46945  }
46946}
46947
46948var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.
46949
46950var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked
46951// scheduler is the actual recommendation. The alternative could be a testing build,
46952// a new lib, or whatever; we dunno just yet. This message is for early adopters
46953// to get their tests right.
46954
46955function warnIfUnmockedScheduler(fiber) {
46956  {
46957    if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {
46958      if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
46959        didWarnAboutUnmockedScheduler = true;
46960
46961        error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + // Break up requires to avoid accidentally parsing them as dependencies.
46962        "jest.mock('scheduler', () => require" + "('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://reactjs.org/link/mock-scheduler');
46963      }
46964    }
46965  }
46966}
46967
46968function computeThreadID(root, lane) {
46969  // Interaction threads are unique per root and expiration time.
46970  // NOTE: Intentionally unsound cast. All that matters is that it's a number
46971  // and it represents a batch of work. Could make a helper function instead,
46972  // but meh this is fine for now.
46973  return lane * 1000 + root.interactionThreadID;
46974}
46975
46976function markSpawnedWork(lane) {
46977
46978  if (spawnedWorkDuringRender === null) {
46979    spawnedWorkDuringRender = [lane];
46980  } else {
46981    spawnedWorkDuringRender.push(lane);
46982  }
46983}
46984
46985function scheduleInteractions(root, lane, interactions) {
46986
46987  if (interactions.size > 0) {
46988    var pendingInteractionMap = root.pendingInteractionMap;
46989    var pendingInteractions = pendingInteractionMap.get(lane);
46990
46991    if (pendingInteractions != null) {
46992      interactions.forEach(function (interaction) {
46993        if (!pendingInteractions.has(interaction)) {
46994          // Update the pending async work count for previously unscheduled interaction.
46995          interaction.__count++;
46996        }
46997
46998        pendingInteractions.add(interaction);
46999      });
47000    } else {
47001      pendingInteractionMap.set(lane, new Set(interactions)); // Update the pending async work count for the current interactions.
47002
47003      interactions.forEach(function (interaction) {
47004        interaction.__count++;
47005      });
47006    }
47007
47008    var subscriber = tracing.__subscriberRef.current;
47009
47010    if (subscriber !== null) {
47011      var threadID = computeThreadID(root, lane);
47012      subscriber.onWorkScheduled(interactions, threadID);
47013    }
47014  }
47015}
47016
47017function schedulePendingInteractions(root, lane) {
47018
47019  scheduleInteractions(root, lane, tracing.__interactionsRef.current);
47020}
47021
47022function startWorkOnPendingInteractions(root, lanes) {
47023  // we can accurately attribute time spent working on it, And so that cascading
47024  // work triggered during the render phase will be associated with it.
47025
47026
47027  var interactions = new Set();
47028  root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledLane) {
47029    if (includesSomeLane(lanes, scheduledLane)) {
47030      scheduledInteractions.forEach(function (interaction) {
47031        return interactions.add(interaction);
47032      });
47033    }
47034  }); // Store the current set of interactions on the FiberRoot for a few reasons:
47035  // We can re-use it in hot functions like performConcurrentWorkOnRoot()
47036  // without having to recalculate it. We will also use it in commitWork() to
47037  // pass to any Profiler onRender() hooks. This also provides DevTools with a
47038  // way to access it when the onCommitRoot() hook is called.
47039
47040  root.memoizedInteractions = interactions;
47041
47042  if (interactions.size > 0) {
47043    var subscriber = tracing.__subscriberRef.current;
47044
47045    if (subscriber !== null) {
47046      var threadID = computeThreadID(root, lanes);
47047
47048      try {
47049        subscriber.onWorkStarted(interactions, threadID);
47050      } catch (error) {
47051        // If the subscriber throws, rethrow it in a separate task
47052        scheduleCallback(ImmediatePriority$1, function () {
47053          throw error;
47054        });
47055      }
47056    }
47057  }
47058}
47059
47060function finishPendingInteractions(root, committedLanes) {
47061
47062  var remainingLanesAfterCommit = root.pendingLanes;
47063  var subscriber;
47064
47065  try {
47066    subscriber = tracing.__subscriberRef.current;
47067
47068    if (subscriber !== null && root.memoizedInteractions.size > 0) {
47069      // FIXME: More than one lane can finish in a single commit.
47070      var threadID = computeThreadID(root, committedLanes);
47071      subscriber.onWorkStopped(root.memoizedInteractions, threadID);
47072    }
47073  } catch (error) {
47074    // If the subscriber throws, rethrow it in a separate task
47075    scheduleCallback(ImmediatePriority$1, function () {
47076      throw error;
47077    });
47078  } finally {
47079    // Clear completed interactions from the pending Map.
47080    // Unless the render was suspended or cascading work was scheduled,
47081    // In which case– leave pending interactions until the subsequent render.
47082    var pendingInteractionMap = root.pendingInteractionMap;
47083    pendingInteractionMap.forEach(function (scheduledInteractions, lane) {
47084      // Only decrement the pending interaction count if we're done.
47085      // If there's still work at the current priority,
47086      // That indicates that we are waiting for suspense data.
47087      if (!includesSomeLane(remainingLanesAfterCommit, lane)) {
47088        pendingInteractionMap.delete(lane);
47089        scheduledInteractions.forEach(function (interaction) {
47090          interaction.__count--;
47091
47092          if (subscriber !== null && interaction.__count === 0) {
47093            try {
47094              subscriber.onInteractionScheduledWorkCompleted(interaction);
47095            } catch (error) {
47096              // If the subscriber throws, rethrow it in a separate task
47097              scheduleCallback(ImmediatePriority$1, function () {
47098                throw error;
47099              });
47100            }
47101          }
47102        });
47103      }
47104    });
47105  }
47106} // `act` testing API
47107
47108function shouldForceFlushFallbacksInDEV() {
47109  // Never force flush in production. This function should get stripped out.
47110  return  actingUpdatesScopeDepth > 0;
47111}
47112// so we can tell if any async act() calls try to run in parallel.
47113
47114
47115var actingUpdatesScopeDepth = 0;
47116
47117function detachFiberAfterEffects(fiber) {
47118  fiber.sibling = null;
47119  fiber.stateNode = null;
47120}
47121
47122var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.
47123
47124var failedBoundaries = null;
47125var setRefreshHandler = function (handler) {
47126  {
47127    resolveFamily = handler;
47128  }
47129};
47130function resolveFunctionForHotReloading(type) {
47131  {
47132    if (resolveFamily === null) {
47133      // Hot reloading is disabled.
47134      return type;
47135    }
47136
47137    var family = resolveFamily(type);
47138
47139    if (family === undefined) {
47140      return type;
47141    } // Use the latest known implementation.
47142
47143
47144    return family.current;
47145  }
47146}
47147function resolveClassForHotReloading(type) {
47148  // No implementation differences.
47149  return resolveFunctionForHotReloading(type);
47150}
47151function resolveForwardRefForHotReloading(type) {
47152  {
47153    if (resolveFamily === null) {
47154      // Hot reloading is disabled.
47155      return type;
47156    }
47157
47158    var family = resolveFamily(type);
47159
47160    if (family === undefined) {
47161      // Check if we're dealing with a real forwardRef. Don't want to crash early.
47162      if (type !== null && type !== undefined && typeof type.render === 'function') {
47163        // ForwardRef is special because its resolved .type is an object,
47164        // but it's possible that we only have its inner render function in the map.
47165        // If that inner render function is different, we'll build a new forwardRef type.
47166        var currentRender = resolveFunctionForHotReloading(type.render);
47167
47168        if (type.render !== currentRender) {
47169          var syntheticType = {
47170            $$typeof: REACT_FORWARD_REF_TYPE,
47171            render: currentRender
47172          };
47173
47174          if (type.displayName !== undefined) {
47175            syntheticType.displayName = type.displayName;
47176          }
47177
47178          return syntheticType;
47179        }
47180      }
47181
47182      return type;
47183    } // Use the latest known implementation.
47184
47185
47186    return family.current;
47187  }
47188}
47189function isCompatibleFamilyForHotReloading(fiber, element) {
47190  {
47191    if (resolveFamily === null) {
47192      // Hot reloading is disabled.
47193      return false;
47194    }
47195
47196    var prevType = fiber.elementType;
47197    var nextType = element.type; // If we got here, we know types aren't === equal.
47198
47199    var needsCompareFamilies = false;
47200    var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;
47201
47202    switch (fiber.tag) {
47203      case ClassComponent:
47204        {
47205          if (typeof nextType === 'function') {
47206            needsCompareFamilies = true;
47207          }
47208
47209          break;
47210        }
47211
47212      case FunctionComponent:
47213        {
47214          if (typeof nextType === 'function') {
47215            needsCompareFamilies = true;
47216          } else if ($$typeofNextType === REACT_LAZY_TYPE) {
47217            // We don't know the inner type yet.
47218            // We're going to assume that the lazy inner type is stable,
47219            // and so it is sufficient to avoid reconciling it away.
47220            // We're not going to unwrap or actually use the new lazy type.
47221            needsCompareFamilies = true;
47222          }
47223
47224          break;
47225        }
47226
47227      case ForwardRef:
47228        {
47229          if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
47230            needsCompareFamilies = true;
47231          } else if ($$typeofNextType === REACT_LAZY_TYPE) {
47232            needsCompareFamilies = true;
47233          }
47234
47235          break;
47236        }
47237
47238      case MemoComponent:
47239      case SimpleMemoComponent:
47240        {
47241          if ($$typeofNextType === REACT_MEMO_TYPE) {
47242            // TODO: if it was but can no longer be simple,
47243            // we shouldn't set this.
47244            needsCompareFamilies = true;
47245          } else if ($$typeofNextType === REACT_LAZY_TYPE) {
47246            needsCompareFamilies = true;
47247          }
47248
47249          break;
47250        }
47251
47252      default:
47253        return false;
47254    } // Check if both types have a family and it's the same one.
47255
47256
47257    if (needsCompareFamilies) {
47258      // Note: memo() and forwardRef() we'll compare outer rather than inner type.
47259      // This means both of them need to be registered to preserve state.
47260      // If we unwrapped and compared the inner types for wrappers instead,
47261      // then we would risk falsely saying two separate memo(Foo)
47262      // calls are equivalent because they wrap the same Foo function.
47263      var prevFamily = resolveFamily(prevType);
47264
47265      if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
47266        return true;
47267      }
47268    }
47269
47270    return false;
47271  }
47272}
47273function markFailedErrorBoundaryForHotReloading(fiber) {
47274  {
47275    if (resolveFamily === null) {
47276      // Hot reloading is disabled.
47277      return;
47278    }
47279
47280    if (typeof WeakSet !== 'function') {
47281      return;
47282    }
47283
47284    if (failedBoundaries === null) {
47285      failedBoundaries = new WeakSet();
47286    }
47287
47288    failedBoundaries.add(fiber);
47289  }
47290}
47291var scheduleRefresh = function (root, update) {
47292  {
47293    if (resolveFamily === null) {
47294      // Hot reloading is disabled.
47295      return;
47296    }
47297
47298    var staleFamilies = update.staleFamilies,
47299        updatedFamilies = update.updatedFamilies;
47300    flushPassiveEffects();
47301    flushSync(function () {
47302      scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
47303    });
47304  }
47305};
47306var scheduleRoot = function (root, element) {
47307  {
47308    if (root.context !== emptyContextObject) {
47309      // Super edge case: root has a legacy _renderSubtree context
47310      // but we don't know the parentComponent so we can't pass it.
47311      // Just ignore. We'll delete this with _renderSubtree code path later.
47312      return;
47313    }
47314
47315    flushPassiveEffects();
47316    flushSync(function () {
47317      updateContainer(element, root, null, null);
47318    });
47319  }
47320};
47321
47322function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
47323  {
47324    var alternate = fiber.alternate,
47325        child = fiber.child,
47326        sibling = fiber.sibling,
47327        tag = fiber.tag,
47328        type = fiber.type;
47329    var candidateType = null;
47330
47331    switch (tag) {
47332      case FunctionComponent:
47333      case SimpleMemoComponent:
47334      case ClassComponent:
47335        candidateType = type;
47336        break;
47337
47338      case ForwardRef:
47339        candidateType = type.render;
47340        break;
47341    }
47342
47343    if (resolveFamily === null) {
47344      throw new Error('Expected resolveFamily to be set during hot reload.');
47345    }
47346
47347    var needsRender = false;
47348    var needsRemount = false;
47349
47350    if (candidateType !== null) {
47351      var family = resolveFamily(candidateType);
47352
47353      if (family !== undefined) {
47354        if (staleFamilies.has(family)) {
47355          needsRemount = true;
47356        } else if (updatedFamilies.has(family)) {
47357          if (tag === ClassComponent) {
47358            needsRemount = true;
47359          } else {
47360            needsRender = true;
47361          }
47362        }
47363      }
47364    }
47365
47366    if (failedBoundaries !== null) {
47367      if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
47368        needsRemount = true;
47369      }
47370    }
47371
47372    if (needsRemount) {
47373      fiber._debugNeedsRemount = true;
47374    }
47375
47376    if (needsRemount || needsRender) {
47377      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
47378    }
47379
47380    if (child !== null && !needsRemount) {
47381      scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
47382    }
47383
47384    if (sibling !== null) {
47385      scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
47386    }
47387  }
47388}
47389
47390var findHostInstancesForRefresh = function (root, families) {
47391  {
47392    var hostInstances = new Set();
47393    var types = new Set(families.map(function (family) {
47394      return family.current;
47395    }));
47396    findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
47397    return hostInstances;
47398  }
47399};
47400
47401function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
47402  {
47403    var child = fiber.child,
47404        sibling = fiber.sibling,
47405        tag = fiber.tag,
47406        type = fiber.type;
47407    var candidateType = null;
47408
47409    switch (tag) {
47410      case FunctionComponent:
47411      case SimpleMemoComponent:
47412      case ClassComponent:
47413        candidateType = type;
47414        break;
47415
47416      case ForwardRef:
47417        candidateType = type.render;
47418        break;
47419    }
47420
47421    var didMatch = false;
47422
47423    if (candidateType !== null) {
47424      if (types.has(candidateType)) {
47425        didMatch = true;
47426      }
47427    }
47428
47429    if (didMatch) {
47430      // We have a match. This only drills down to the closest host components.
47431      // There's no need to search deeper because for the purpose of giving
47432      // visual feedback, "flashing" outermost parent rectangles is sufficient.
47433      findHostInstancesForFiberShallowly(fiber, hostInstances);
47434    } else {
47435      // If there's no match, maybe there will be one further down in the child tree.
47436      if (child !== null) {
47437        findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
47438      }
47439    }
47440
47441    if (sibling !== null) {
47442      findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
47443    }
47444  }
47445}
47446
47447function findHostInstancesForFiberShallowly(fiber, hostInstances) {
47448  {
47449    var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
47450
47451    if (foundHostInstances) {
47452      return;
47453    } // If we didn't find any host children, fallback to closest host parent.
47454
47455
47456    var node = fiber;
47457
47458    while (true) {
47459      switch (node.tag) {
47460        case HostComponent:
47461          hostInstances.add(node.stateNode);
47462          return;
47463
47464        case HostPortal:
47465          hostInstances.add(node.stateNode.containerInfo);
47466          return;
47467
47468        case HostRoot:
47469          hostInstances.add(node.stateNode.containerInfo);
47470          return;
47471      }
47472
47473      if (node.return === null) {
47474        throw new Error('Expected to reach root first.');
47475      }
47476
47477      node = node.return;
47478    }
47479  }
47480}
47481
47482function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
47483  {
47484    var node = fiber;
47485    var foundHostInstances = false;
47486
47487    while (true) {
47488      if (node.tag === HostComponent) {
47489        // We got a match.
47490        foundHostInstances = true;
47491        hostInstances.add(node.stateNode); // There may still be more, so keep searching.
47492      } else if (node.child !== null) {
47493        node.child.return = node;
47494        node = node.child;
47495        continue;
47496      }
47497
47498      if (node === fiber) {
47499        return foundHostInstances;
47500      }
47501
47502      while (node.sibling === null) {
47503        if (node.return === null || node.return === fiber) {
47504          return foundHostInstances;
47505        }
47506
47507        node = node.return;
47508      }
47509
47510      node.sibling.return = node.return;
47511      node = node.sibling;
47512    }
47513  }
47514
47515  return false;
47516}
47517
47518var hasBadMapPolyfill;
47519
47520{
47521  hasBadMapPolyfill = false;
47522
47523  try {
47524    var nonExtensibleObject = Object.preventExtensions({});
47525    /* eslint-disable no-new */
47526
47527    new Map([[nonExtensibleObject, null]]);
47528    new Set([nonExtensibleObject]);
47529    /* eslint-enable no-new */
47530  } catch (e) {
47531    // TODO: Consider warning about bad polyfills
47532    hasBadMapPolyfill = true;
47533  }
47534}
47535
47536var debugCounter = 1;
47537
47538function FiberNode(tag, pendingProps, key, mode) {
47539  // Instance
47540  this.tag = tag;
47541  this.key = key;
47542  this.elementType = null;
47543  this.type = null;
47544  this.stateNode = null; // Fiber
47545
47546  this.return = null;
47547  this.child = null;
47548  this.sibling = null;
47549  this.index = 0;
47550  this.ref = null;
47551  this.pendingProps = pendingProps;
47552  this.memoizedProps = null;
47553  this.updateQueue = null;
47554  this.memoizedState = null;
47555  this.dependencies = null;
47556  this.mode = mode; // Effects
47557
47558  this.flags = NoFlags;
47559  this.nextEffect = null;
47560  this.firstEffect = null;
47561  this.lastEffect = null;
47562  this.lanes = NoLanes;
47563  this.childLanes = NoLanes;
47564  this.alternate = null;
47565
47566  {
47567    // Note: The following is done to avoid a v8 performance cliff.
47568    //
47569    // Initializing the fields below to smis and later updating them with
47570    // double values will cause Fibers to end up having separate shapes.
47571    // This behavior/bug has something to do with Object.preventExtension().
47572    // Fortunately this only impacts DEV builds.
47573    // Unfortunately it makes React unusably slow for some applications.
47574    // To work around this, initialize the fields below with doubles.
47575    //
47576    // Learn more about this here:
47577    // https://github.com/facebook/react/issues/14365
47578    // https://bugs.chromium.org/p/v8/issues/detail?id=8538
47579    this.actualDuration = Number.NaN;
47580    this.actualStartTime = Number.NaN;
47581    this.selfBaseDuration = Number.NaN;
47582    this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.
47583    // This won't trigger the performance cliff mentioned above,
47584    // and it simplifies other profiler code (including DevTools).
47585
47586    this.actualDuration = 0;
47587    this.actualStartTime = -1;
47588    this.selfBaseDuration = 0;
47589    this.treeBaseDuration = 0;
47590  }
47591
47592  {
47593    // This isn't directly used but is handy for debugging internals:
47594    this._debugID = debugCounter++;
47595    this._debugSource = null;
47596    this._debugOwner = null;
47597    this._debugNeedsRemount = false;
47598    this._debugHookTypes = null;
47599
47600    if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
47601      Object.preventExtensions(this);
47602    }
47603  }
47604} // This is a constructor function, rather than a POJO constructor, still
47605// please ensure we do the following:
47606// 1) Nobody should add any instance methods on this. Instance methods can be
47607//    more difficult to predict when they get optimized and they are almost
47608//    never inlined properly in static compilers.
47609// 2) Nobody should rely on `instanceof Fiber` for type testing. We should
47610//    always know when it is a fiber.
47611// 3) We might want to experiment with using numeric keys since they are easier
47612//    to optimize in a non-JIT environment.
47613// 4) We can easily go from a constructor to a createFiber object literal if that
47614//    is faster.
47615// 5) It should be easy to port this to a C struct and keep a C implementation
47616//    compatible.
47617
47618
47619var createFiber = function (tag, pendingProps, key, mode) {
47620  // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
47621  return new FiberNode(tag, pendingProps, key, mode);
47622};
47623
47624function shouldConstruct$1(Component) {
47625  var prototype = Component.prototype;
47626  return !!(prototype && prototype.isReactComponent);
47627}
47628
47629function isSimpleFunctionComponent(type) {
47630  return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;
47631}
47632function resolveLazyComponentTag(Component) {
47633  if (typeof Component === 'function') {
47634    return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;
47635  } else if (Component !== undefined && Component !== null) {
47636    var $$typeof = Component.$$typeof;
47637
47638    if ($$typeof === REACT_FORWARD_REF_TYPE) {
47639      return ForwardRef;
47640    }
47641
47642    if ($$typeof === REACT_MEMO_TYPE) {
47643      return MemoComponent;
47644    }
47645  }
47646
47647  return IndeterminateComponent;
47648} // This is used to create an alternate fiber to do work on.
47649
47650function createWorkInProgress(current, pendingProps) {
47651  var workInProgress = current.alternate;
47652
47653  if (workInProgress === null) {
47654    // We use a double buffering pooling technique because we know that we'll
47655    // only ever need at most two versions of a tree. We pool the "other" unused
47656    // node that we're free to reuse. This is lazily created to avoid allocating
47657    // extra objects for things that are never updated. It also allow us to
47658    // reclaim the extra memory if needed.
47659    workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
47660    workInProgress.elementType = current.elementType;
47661    workInProgress.type = current.type;
47662    workInProgress.stateNode = current.stateNode;
47663
47664    {
47665      // DEV-only fields
47666      workInProgress._debugID = current._debugID;
47667      workInProgress._debugSource = current._debugSource;
47668      workInProgress._debugOwner = current._debugOwner;
47669      workInProgress._debugHookTypes = current._debugHookTypes;
47670    }
47671
47672    workInProgress.alternate = current;
47673    current.alternate = workInProgress;
47674  } else {
47675    workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.
47676
47677    workInProgress.type = current.type; // We already have an alternate.
47678    // Reset the effect tag.
47679
47680    workInProgress.flags = NoFlags; // The effect list is no longer valid.
47681
47682    workInProgress.nextEffect = null;
47683    workInProgress.firstEffect = null;
47684    workInProgress.lastEffect = null;
47685
47686    {
47687      // We intentionally reset, rather than copy, actualDuration & actualStartTime.
47688      // This prevents time from endlessly accumulating in new commits.
47689      // This has the downside of resetting values for different priority renders,
47690      // But works for yielding (the common case) and should support resuming.
47691      workInProgress.actualDuration = 0;
47692      workInProgress.actualStartTime = -1;
47693    }
47694  }
47695
47696  workInProgress.childLanes = current.childLanes;
47697  workInProgress.lanes = current.lanes;
47698  workInProgress.child = current.child;
47699  workInProgress.memoizedProps = current.memoizedProps;
47700  workInProgress.memoizedState = current.memoizedState;
47701  workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
47702  // it cannot be shared with the current fiber.
47703
47704  var currentDependencies = current.dependencies;
47705  workInProgress.dependencies = currentDependencies === null ? null : {
47706    lanes: currentDependencies.lanes,
47707    firstContext: currentDependencies.firstContext
47708  }; // These will be overridden during the parent's reconciliation
47709
47710  workInProgress.sibling = current.sibling;
47711  workInProgress.index = current.index;
47712  workInProgress.ref = current.ref;
47713
47714  {
47715    workInProgress.selfBaseDuration = current.selfBaseDuration;
47716    workInProgress.treeBaseDuration = current.treeBaseDuration;
47717  }
47718
47719  {
47720    workInProgress._debugNeedsRemount = current._debugNeedsRemount;
47721
47722    switch (workInProgress.tag) {
47723      case IndeterminateComponent:
47724      case FunctionComponent:
47725      case SimpleMemoComponent:
47726        workInProgress.type = resolveFunctionForHotReloading(current.type);
47727        break;
47728
47729      case ClassComponent:
47730        workInProgress.type = resolveClassForHotReloading(current.type);
47731        break;
47732
47733      case ForwardRef:
47734        workInProgress.type = resolveForwardRefForHotReloading(current.type);
47735        break;
47736    }
47737  }
47738
47739  return workInProgress;
47740} // Used to reuse a Fiber for a second pass.
47741
47742function resetWorkInProgress(workInProgress, renderLanes) {
47743  // This resets the Fiber to what createFiber or createWorkInProgress would
47744  // have set the values to before during the first pass. Ideally this wouldn't
47745  // be necessary but unfortunately many code paths reads from the workInProgress
47746  // when they should be reading from current and writing to workInProgress.
47747  // We assume pendingProps, index, key, ref, return are still untouched to
47748  // avoid doing another reconciliation.
47749  // Reset the effect tag but keep any Placement tags, since that's something
47750  // that child fiber is setting, not the reconciliation.
47751  workInProgress.flags &= Placement; // The effect list is no longer valid.
47752
47753  workInProgress.nextEffect = null;
47754  workInProgress.firstEffect = null;
47755  workInProgress.lastEffect = null;
47756  var current = workInProgress.alternate;
47757
47758  if (current === null) {
47759    // Reset to createFiber's initial values.
47760    workInProgress.childLanes = NoLanes;
47761    workInProgress.lanes = renderLanes;
47762    workInProgress.child = null;
47763    workInProgress.memoizedProps = null;
47764    workInProgress.memoizedState = null;
47765    workInProgress.updateQueue = null;
47766    workInProgress.dependencies = null;
47767    workInProgress.stateNode = null;
47768
47769    {
47770      // Note: We don't reset the actualTime counts. It's useful to accumulate
47771      // actual time across multiple render passes.
47772      workInProgress.selfBaseDuration = 0;
47773      workInProgress.treeBaseDuration = 0;
47774    }
47775  } else {
47776    // Reset to the cloned values that createWorkInProgress would've.
47777    workInProgress.childLanes = current.childLanes;
47778    workInProgress.lanes = current.lanes;
47779    workInProgress.child = current.child;
47780    workInProgress.memoizedProps = current.memoizedProps;
47781    workInProgress.memoizedState = current.memoizedState;
47782    workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.
47783
47784    workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so
47785    // it cannot be shared with the current fiber.
47786
47787    var currentDependencies = current.dependencies;
47788    workInProgress.dependencies = currentDependencies === null ? null : {
47789      lanes: currentDependencies.lanes,
47790      firstContext: currentDependencies.firstContext
47791    };
47792
47793    {
47794      // Note: We don't reset the actualTime counts. It's useful to accumulate
47795      // actual time across multiple render passes.
47796      workInProgress.selfBaseDuration = current.selfBaseDuration;
47797      workInProgress.treeBaseDuration = current.treeBaseDuration;
47798    }
47799  }
47800
47801  return workInProgress;
47802}
47803function createHostRootFiber(tag) {
47804  var mode;
47805
47806  if (tag === ConcurrentRoot) {
47807    mode = ConcurrentMode | BlockingMode | StrictMode;
47808  } else if (tag === BlockingRoot) {
47809    mode = BlockingMode | StrictMode;
47810  } else {
47811    mode = NoMode;
47812  }
47813
47814  if ( isDevToolsPresent) {
47815    // Always collect profile timings when DevTools are present.
47816    // This enables DevTools to start capturing timing at any point–
47817    // Without some nodes in the tree having empty base times.
47818    mode |= ProfileMode;
47819  }
47820
47821  return createFiber(HostRoot, null, null, mode);
47822}
47823function createFiberFromTypeAndProps(type, // React$ElementType
47824key, pendingProps, owner, mode, lanes) {
47825  var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
47826
47827  var resolvedType = type;
47828
47829  if (typeof type === 'function') {
47830    if (shouldConstruct$1(type)) {
47831      fiberTag = ClassComponent;
47832
47833      {
47834        resolvedType = resolveClassForHotReloading(resolvedType);
47835      }
47836    } else {
47837      {
47838        resolvedType = resolveFunctionForHotReloading(resolvedType);
47839      }
47840    }
47841  } else if (typeof type === 'string') {
47842    fiberTag = HostComponent;
47843  } else {
47844    getTag: switch (type) {
47845      case REACT_FRAGMENT_TYPE:
47846        return createFiberFromFragment(pendingProps.children, mode, lanes, key);
47847
47848      case REACT_DEBUG_TRACING_MODE_TYPE:
47849        fiberTag = Mode;
47850        mode |= DebugTracingMode;
47851        break;
47852
47853      case REACT_STRICT_MODE_TYPE:
47854        fiberTag = Mode;
47855        mode |= StrictMode;
47856        break;
47857
47858      case REACT_PROFILER_TYPE:
47859        return createFiberFromProfiler(pendingProps, mode, lanes, key);
47860
47861      case REACT_SUSPENSE_TYPE:
47862        return createFiberFromSuspense(pendingProps, mode, lanes, key);
47863
47864      case REACT_SUSPENSE_LIST_TYPE:
47865        return createFiberFromSuspenseList(pendingProps, mode, lanes, key);
47866
47867      case REACT_OFFSCREEN_TYPE:
47868        return createFiberFromOffscreen(pendingProps, mode, lanes, key);
47869
47870      case REACT_LEGACY_HIDDEN_TYPE:
47871        return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);
47872
47873      case REACT_SCOPE_TYPE:
47874
47875      // eslint-disable-next-line no-fallthrough
47876
47877      default:
47878        {
47879          if (typeof type === 'object' && type !== null) {
47880            switch (type.$$typeof) {
47881              case REACT_PROVIDER_TYPE:
47882                fiberTag = ContextProvider;
47883                break getTag;
47884
47885              case REACT_CONTEXT_TYPE:
47886                // This is a consumer
47887                fiberTag = ContextConsumer;
47888                break getTag;
47889
47890              case REACT_FORWARD_REF_TYPE:
47891                fiberTag = ForwardRef;
47892
47893                {
47894                  resolvedType = resolveForwardRefForHotReloading(resolvedType);
47895                }
47896
47897                break getTag;
47898
47899              case REACT_MEMO_TYPE:
47900                fiberTag = MemoComponent;
47901                break getTag;
47902
47903              case REACT_LAZY_TYPE:
47904                fiberTag = LazyComponent;
47905                resolvedType = null;
47906                break getTag;
47907
47908              case REACT_BLOCK_TYPE:
47909                fiberTag = Block;
47910                break getTag;
47911            }
47912          }
47913
47914          var info = '';
47915
47916          {
47917            if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
47918              info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
47919            }
47920
47921            var ownerName = owner ? getComponentName(owner.type) : null;
47922
47923            if (ownerName) {
47924              info += '\n\nCheck the render method of `' + ownerName + '`.';
47925            }
47926          }
47927
47928          {
47929            {
47930              throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (type == null ? type : typeof type) + "." + info );
47931            }
47932          }
47933        }
47934    }
47935  }
47936
47937  var fiber = createFiber(fiberTag, pendingProps, key, mode);
47938  fiber.elementType = type;
47939  fiber.type = resolvedType;
47940  fiber.lanes = lanes;
47941
47942  {
47943    fiber._debugOwner = owner;
47944  }
47945
47946  return fiber;
47947}
47948function createFiberFromElement(element, mode, lanes) {
47949  var owner = null;
47950
47951  {
47952    owner = element._owner;
47953  }
47954
47955  var type = element.type;
47956  var key = element.key;
47957  var pendingProps = element.props;
47958  var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);
47959
47960  {
47961    fiber._debugSource = element._source;
47962    fiber._debugOwner = element._owner;
47963  }
47964
47965  return fiber;
47966}
47967function createFiberFromFragment(elements, mode, lanes, key) {
47968  var fiber = createFiber(Fragment, elements, key, mode);
47969  fiber.lanes = lanes;
47970  return fiber;
47971}
47972
47973function createFiberFromProfiler(pendingProps, mode, lanes, key) {
47974  {
47975    if (typeof pendingProps.id !== 'string') {
47976      error('Profiler must specify an "id" as a prop');
47977    }
47978  }
47979
47980  var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.
47981
47982  fiber.elementType = REACT_PROFILER_TYPE;
47983  fiber.type = REACT_PROFILER_TYPE;
47984  fiber.lanes = lanes;
47985
47986  {
47987    fiber.stateNode = {
47988      effectDuration: 0,
47989      passiveEffectDuration: 0
47990    };
47991  }
47992
47993  return fiber;
47994}
47995
47996function createFiberFromSuspense(pendingProps, mode, lanes, key) {
47997  var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
47998  // This needs to be fixed in getComponentName so that it relies on the tag
47999  // instead.
48000
48001  fiber.type = REACT_SUSPENSE_TYPE;
48002  fiber.elementType = REACT_SUSPENSE_TYPE;
48003  fiber.lanes = lanes;
48004  return fiber;
48005}
48006function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {
48007  var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
48008
48009  {
48010    // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.
48011    // This needs to be fixed in getComponentName so that it relies on the tag
48012    // instead.
48013    fiber.type = REACT_SUSPENSE_LIST_TYPE;
48014  }
48015
48016  fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
48017  fiber.lanes = lanes;
48018  return fiber;
48019}
48020function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
48021  var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent fiber shouldn't have a type. It has a tag.
48022  // This needs to be fixed in getComponentName so that it relies on the tag
48023  // instead.
48024
48025  {
48026    fiber.type = REACT_OFFSCREEN_TYPE;
48027  }
48028
48029  fiber.elementType = REACT_OFFSCREEN_TYPE;
48030  fiber.lanes = lanes;
48031  return fiber;
48032}
48033function createFiberFromLegacyHidden(pendingProps, mode, lanes, key) {
48034  var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden fiber shouldn't have a type. It has a tag.
48035  // This needs to be fixed in getComponentName so that it relies on the tag
48036  // instead.
48037
48038  {
48039    fiber.type = REACT_LEGACY_HIDDEN_TYPE;
48040  }
48041
48042  fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;
48043  fiber.lanes = lanes;
48044  return fiber;
48045}
48046function createFiberFromText(content, mode, lanes) {
48047  var fiber = createFiber(HostText, content, null, mode);
48048  fiber.lanes = lanes;
48049  return fiber;
48050}
48051function createFiberFromHostInstanceForDeletion() {
48052  var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.
48053
48054  fiber.elementType = 'DELETED';
48055  fiber.type = 'DELETED';
48056  return fiber;
48057}
48058function createFiberFromPortal(portal, mode, lanes) {
48059  var pendingProps = portal.children !== null ? portal.children : [];
48060  var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
48061  fiber.lanes = lanes;
48062  fiber.stateNode = {
48063    containerInfo: portal.containerInfo,
48064    pendingChildren: null,
48065    // Used by persistent updates
48066    implementation: portal.implementation
48067  };
48068  return fiber;
48069} // Used for stashing WIP properties to replay failed work in DEV.
48070
48071function assignFiberPropertiesInDEV(target, source) {
48072  if (target === null) {
48073    // This Fiber's initial properties will always be overwritten.
48074    // We only use a Fiber to ensure the same hidden class so DEV isn't slow.
48075    target = createFiber(IndeterminateComponent, null, null, NoMode);
48076  } // This is intentionally written as a list of all properties.
48077  // We tried to use Object.assign() instead but this is called in
48078  // the hottest path, and Object.assign() was too slow:
48079  // https://github.com/facebook/react/issues/12502
48080  // This code is DEV-only so size is not a concern.
48081
48082
48083  target.tag = source.tag;
48084  target.key = source.key;
48085  target.elementType = source.elementType;
48086  target.type = source.type;
48087  target.stateNode = source.stateNode;
48088  target.return = source.return;
48089  target.child = source.child;
48090  target.sibling = source.sibling;
48091  target.index = source.index;
48092  target.ref = source.ref;
48093  target.pendingProps = source.pendingProps;
48094  target.memoizedProps = source.memoizedProps;
48095  target.updateQueue = source.updateQueue;
48096  target.memoizedState = source.memoizedState;
48097  target.dependencies = source.dependencies;
48098  target.mode = source.mode;
48099  target.flags = source.flags;
48100  target.nextEffect = source.nextEffect;
48101  target.firstEffect = source.firstEffect;
48102  target.lastEffect = source.lastEffect;
48103  target.lanes = source.lanes;
48104  target.childLanes = source.childLanes;
48105  target.alternate = source.alternate;
48106
48107  {
48108    target.actualDuration = source.actualDuration;
48109    target.actualStartTime = source.actualStartTime;
48110    target.selfBaseDuration = source.selfBaseDuration;
48111    target.treeBaseDuration = source.treeBaseDuration;
48112  }
48113
48114  target._debugID = source._debugID;
48115  target._debugSource = source._debugSource;
48116  target._debugOwner = source._debugOwner;
48117  target._debugNeedsRemount = source._debugNeedsRemount;
48118  target._debugHookTypes = source._debugHookTypes;
48119  return target;
48120}
48121
48122function FiberRootNode(containerInfo, tag, hydrate) {
48123  this.tag = tag;
48124  this.containerInfo = containerInfo;
48125  this.pendingChildren = null;
48126  this.current = null;
48127  this.pingCache = null;
48128  this.finishedWork = null;
48129  this.timeoutHandle = noTimeout;
48130  this.context = null;
48131  this.pendingContext = null;
48132  this.hydrate = hydrate;
48133  this.callbackNode = null;
48134  this.callbackPriority = NoLanePriority;
48135  this.eventTimes = createLaneMap(NoLanes);
48136  this.expirationTimes = createLaneMap(NoTimestamp);
48137  this.pendingLanes = NoLanes;
48138  this.suspendedLanes = NoLanes;
48139  this.pingedLanes = NoLanes;
48140  this.expiredLanes = NoLanes;
48141  this.mutableReadLanes = NoLanes;
48142  this.finishedLanes = NoLanes;
48143  this.entangledLanes = NoLanes;
48144  this.entanglements = createLaneMap(NoLanes);
48145
48146  {
48147    this.mutableSourceEagerHydrationData = null;
48148  }
48149
48150  {
48151    this.interactionThreadID = tracing.unstable_getThreadID();
48152    this.memoizedInteractions = new Set();
48153    this.pendingInteractionMap = new Map();
48154  }
48155
48156  {
48157    switch (tag) {
48158      case BlockingRoot:
48159        this._debugRootType = 'createBlockingRoot()';
48160        break;
48161
48162      case ConcurrentRoot:
48163        this._debugRootType = 'createRoot()';
48164        break;
48165
48166      case LegacyRoot:
48167        this._debugRootType = 'createLegacyRoot()';
48168        break;
48169    }
48170  }
48171}
48172
48173function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {
48174  var root = new FiberRootNode(containerInfo, tag, hydrate);
48175  // stateNode is any.
48176
48177
48178  var uninitializedFiber = createHostRootFiber(tag);
48179  root.current = uninitializedFiber;
48180  uninitializedFiber.stateNode = root;
48181  initializeUpdateQueue(uninitializedFiber);
48182  return root;
48183}
48184
48185// This ensures that the version used for server rendering matches the one
48186// that is eventually read during hydration.
48187// If they don't match there's a potential tear and a full deopt render is required.
48188
48189function registerMutableSourceForHydration(root, mutableSource) {
48190  var getVersion = mutableSource._getVersion;
48191  var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.
48192  // Retaining it forever may interfere with GC.
48193
48194  if (root.mutableSourceEagerHydrationData == null) {
48195    root.mutableSourceEagerHydrationData = [mutableSource, version];
48196  } else {
48197    root.mutableSourceEagerHydrationData.push(mutableSource, version);
48198  }
48199}
48200
48201function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
48202implementation) {
48203  var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
48204  return {
48205    // This tag allow us to uniquely identify this as a React Portal
48206    $$typeof: REACT_PORTAL_TYPE,
48207    key: key == null ? null : '' + key,
48208    children: children,
48209    containerInfo: containerInfo,
48210    implementation: implementation
48211  };
48212}
48213
48214var didWarnAboutNestedUpdates;
48215var didWarnAboutFindNodeInStrictMode;
48216
48217{
48218  didWarnAboutNestedUpdates = false;
48219  didWarnAboutFindNodeInStrictMode = {};
48220}
48221
48222function getContextForSubtree(parentComponent) {
48223  if (!parentComponent) {
48224    return emptyContextObject;
48225  }
48226
48227  var fiber = get(parentComponent);
48228  var parentContext = findCurrentUnmaskedContext(fiber);
48229
48230  if (fiber.tag === ClassComponent) {
48231    var Component = fiber.type;
48232
48233    if (isContextProvider(Component)) {
48234      return processChildContext(fiber, Component, parentContext);
48235    }
48236  }
48237
48238  return parentContext;
48239}
48240
48241function findHostInstanceWithWarning(component, methodName) {
48242  {
48243    var fiber = get(component);
48244
48245    if (fiber === undefined) {
48246      if (typeof component.render === 'function') {
48247        {
48248          {
48249            throw Error( "Unable to find node on an unmounted component." );
48250          }
48251        }
48252      } else {
48253        {
48254          {
48255            throw Error( "Argument appears to not be a ReactComponent. Keys: " + Object.keys(component) );
48256          }
48257        }
48258      }
48259    }
48260
48261    var hostFiber = findCurrentHostFiber(fiber);
48262
48263    if (hostFiber === null) {
48264      return null;
48265    }
48266
48267    if (hostFiber.mode & StrictMode) {
48268      var componentName = getComponentName(fiber.type) || 'Component';
48269
48270      if (!didWarnAboutFindNodeInStrictMode[componentName]) {
48271        didWarnAboutFindNodeInStrictMode[componentName] = true;
48272        var previousFiber = current;
48273
48274        try {
48275          setCurrentFiber(hostFiber);
48276
48277          if (fiber.mode & StrictMode) {
48278            error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
48279          } else {
48280            error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
48281          }
48282        } finally {
48283          // Ideally this should reset to previous but this shouldn't be called in
48284          // render and there's another warning for that anyway.
48285          if (previousFiber) {
48286            setCurrentFiber(previousFiber);
48287          } else {
48288            resetCurrentFiber();
48289          }
48290        }
48291      }
48292    }
48293
48294    return hostFiber.stateNode;
48295  }
48296}
48297
48298function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {
48299  return createFiberRoot(containerInfo, tag, hydrate);
48300}
48301function updateContainer(element, container, parentComponent, callback) {
48302  {
48303    onScheduleRoot(container, element);
48304  }
48305
48306  var current$1 = container.current;
48307  var eventTime = requestEventTime();
48308
48309  {
48310    // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
48311    if ('undefined' !== typeof jest) {
48312      warnIfUnmockedScheduler(current$1);
48313      warnIfNotScopedWithMatchingAct(current$1);
48314    }
48315  }
48316
48317  var lane = requestUpdateLane(current$1);
48318
48319  var context = getContextForSubtree(parentComponent);
48320
48321  if (container.context === null) {
48322    container.context = context;
48323  } else {
48324    container.pendingContext = context;
48325  }
48326
48327  {
48328    if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
48329      didWarnAboutNestedUpdates = true;
48330
48331      error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
48332    }
48333  }
48334
48335  var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property
48336  // being called "element".
48337
48338  update.payload = {
48339    element: element
48340  };
48341  callback = callback === undefined ? null : callback;
48342
48343  if (callback !== null) {
48344    {
48345      if (typeof callback !== 'function') {
48346        error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
48347      }
48348    }
48349
48350    update.callback = callback;
48351  }
48352
48353  enqueueUpdate(current$1, update);
48354  scheduleUpdateOnFiber(current$1, lane, eventTime);
48355  return lane;
48356}
48357function getPublicRootInstance(container) {
48358  var containerFiber = container.current;
48359
48360  if (!containerFiber.child) {
48361    return null;
48362  }
48363
48364  switch (containerFiber.child.tag) {
48365    case HostComponent:
48366      return getPublicInstance(containerFiber.child.stateNode);
48367
48368    default:
48369      return containerFiber.child.stateNode;
48370  }
48371}
48372
48373function markRetryLaneImpl(fiber, retryLane) {
48374  var suspenseState = fiber.memoizedState;
48375
48376  if (suspenseState !== null && suspenseState.dehydrated !== null) {
48377    suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);
48378  }
48379} // Increases the priority of thennables when they resolve within this boundary.
48380
48381
48382function markRetryLaneIfNotHydrated(fiber, retryLane) {
48383  markRetryLaneImpl(fiber, retryLane);
48384  var alternate = fiber.alternate;
48385
48386  if (alternate) {
48387    markRetryLaneImpl(alternate, retryLane);
48388  }
48389}
48390
48391function attemptUserBlockingHydration$1(fiber) {
48392  if (fiber.tag !== SuspenseComponent) {
48393    // We ignore HostRoots here because we can't increase
48394    // their priority and they should not suspend on I/O,
48395    // since you have to wrap anything that might suspend in
48396    // Suspense.
48397    return;
48398  }
48399
48400  var eventTime = requestEventTime();
48401  var lane = InputDiscreteHydrationLane;
48402  scheduleUpdateOnFiber(fiber, lane, eventTime);
48403  markRetryLaneIfNotHydrated(fiber, lane);
48404}
48405function attemptContinuousHydration$1(fiber) {
48406  if (fiber.tag !== SuspenseComponent) {
48407    // We ignore HostRoots here because we can't increase
48408    // their priority and they should not suspend on I/O,
48409    // since you have to wrap anything that might suspend in
48410    // Suspense.
48411    return;
48412  }
48413
48414  var eventTime = requestEventTime();
48415  var lane = SelectiveHydrationLane;
48416  scheduleUpdateOnFiber(fiber, lane, eventTime);
48417  markRetryLaneIfNotHydrated(fiber, lane);
48418}
48419function attemptHydrationAtCurrentPriority$1(fiber) {
48420  if (fiber.tag !== SuspenseComponent) {
48421    // We ignore HostRoots here because we can't increase
48422    // their priority other than synchronously flush it.
48423    return;
48424  }
48425
48426  var eventTime = requestEventTime();
48427  var lane = requestUpdateLane(fiber);
48428  scheduleUpdateOnFiber(fiber, lane, eventTime);
48429  markRetryLaneIfNotHydrated(fiber, lane);
48430}
48431function runWithPriority$2(priority, fn) {
48432
48433  try {
48434    setCurrentUpdateLanePriority(priority);
48435    return fn();
48436  } finally {
48437  }
48438}
48439function findHostInstanceWithNoPortals(fiber) {
48440  var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
48441
48442  if (hostFiber === null) {
48443    return null;
48444  }
48445
48446  if (hostFiber.tag === FundamentalComponent) {
48447    return hostFiber.stateNode.instance;
48448  }
48449
48450  return hostFiber.stateNode;
48451}
48452
48453var shouldSuspendImpl = function (fiber) {
48454  return false;
48455};
48456
48457function shouldSuspend(fiber) {
48458  return shouldSuspendImpl(fiber);
48459}
48460var overrideHookState = null;
48461var overrideHookStateDeletePath = null;
48462var overrideHookStateRenamePath = null;
48463var overrideProps = null;
48464var overridePropsDeletePath = null;
48465var overridePropsRenamePath = null;
48466var scheduleUpdate = null;
48467var setSuspenseHandler = null;
48468
48469{
48470  var copyWithDeleteImpl = function (obj, path, index) {
48471    var key = path[index];
48472    var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
48473
48474    if (index + 1 === path.length) {
48475      if (Array.isArray(updated)) {
48476        updated.splice(key, 1);
48477      } else {
48478        delete updated[key];
48479      }
48480
48481      return updated;
48482    } // $FlowFixMe number or string is fine here
48483
48484
48485    updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
48486    return updated;
48487  };
48488
48489  var copyWithDelete = function (obj, path) {
48490    return copyWithDeleteImpl(obj, path, 0);
48491  };
48492
48493  var copyWithRenameImpl = function (obj, oldPath, newPath, index) {
48494    var oldKey = oldPath[index];
48495    var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
48496
48497    if (index + 1 === oldPath.length) {
48498      var newKey = newPath[index]; // $FlowFixMe number or string is fine here
48499
48500      updated[newKey] = updated[oldKey];
48501
48502      if (Array.isArray(updated)) {
48503        updated.splice(oldKey, 1);
48504      } else {
48505        delete updated[oldKey];
48506      }
48507    } else {
48508      // $FlowFixMe number or string is fine here
48509      updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here
48510      obj[oldKey], oldPath, newPath, index + 1);
48511    }
48512
48513    return updated;
48514  };
48515
48516  var copyWithRename = function (obj, oldPath, newPath) {
48517    if (oldPath.length !== newPath.length) {
48518      warn('copyWithRename() expects paths of the same length');
48519
48520      return;
48521    } else {
48522      for (var i = 0; i < newPath.length - 1; i++) {
48523        if (oldPath[i] !== newPath[i]) {
48524          warn('copyWithRename() expects paths to be the same except for the deepest key');
48525
48526          return;
48527        }
48528      }
48529    }
48530
48531    return copyWithRenameImpl(obj, oldPath, newPath, 0);
48532  };
48533
48534  var copyWithSetImpl = function (obj, path, index, value) {
48535    if (index >= path.length) {
48536      return value;
48537    }
48538
48539    var key = path[index];
48540    var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here
48541
48542    updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
48543    return updated;
48544  };
48545
48546  var copyWithSet = function (obj, path, value) {
48547    return copyWithSetImpl(obj, path, 0, value);
48548  };
48549
48550  var findHook = function (fiber, id) {
48551    // For now, the "id" of stateful hooks is just the stateful hook index.
48552    // This may change in the future with e.g. nested hooks.
48553    var currentHook = fiber.memoizedState;
48554
48555    while (currentHook !== null && id > 0) {
48556      currentHook = currentHook.next;
48557      id--;
48558    }
48559
48560    return currentHook;
48561  }; // Support DevTools editable values for useState and useReducer.
48562
48563
48564  overrideHookState = function (fiber, id, path, value) {
48565    var hook = findHook(fiber, id);
48566
48567    if (hook !== null) {
48568      var newState = copyWithSet(hook.memoizedState, path, value);
48569      hook.memoizedState = newState;
48570      hook.baseState = newState; // We aren't actually adding an update to the queue,
48571      // because there is no update we can add for useReducer hooks that won't trigger an error.
48572      // (There's no appropriate action type for DevTools overrides.)
48573      // As a result though, React will see the scheduled update as a noop and bailout.
48574      // Shallow cloning props works as a workaround for now to bypass the bailout check.
48575
48576      fiber.memoizedProps = _assign({}, fiber.memoizedProps);
48577      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
48578    }
48579  };
48580
48581  overrideHookStateDeletePath = function (fiber, id, path) {
48582    var hook = findHook(fiber, id);
48583
48584    if (hook !== null) {
48585      var newState = copyWithDelete(hook.memoizedState, path);
48586      hook.memoizedState = newState;
48587      hook.baseState = newState; // We aren't actually adding an update to the queue,
48588      // because there is no update we can add for useReducer hooks that won't trigger an error.
48589      // (There's no appropriate action type for DevTools overrides.)
48590      // As a result though, React will see the scheduled update as a noop and bailout.
48591      // Shallow cloning props works as a workaround for now to bypass the bailout check.
48592
48593      fiber.memoizedProps = _assign({}, fiber.memoizedProps);
48594      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
48595    }
48596  };
48597
48598  overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {
48599    var hook = findHook(fiber, id);
48600
48601    if (hook !== null) {
48602      var newState = copyWithRename(hook.memoizedState, oldPath, newPath);
48603      hook.memoizedState = newState;
48604      hook.baseState = newState; // We aren't actually adding an update to the queue,
48605      // because there is no update we can add for useReducer hooks that won't trigger an error.
48606      // (There's no appropriate action type for DevTools overrides.)
48607      // As a result though, React will see the scheduled update as a noop and bailout.
48608      // Shallow cloning props works as a workaround for now to bypass the bailout check.
48609
48610      fiber.memoizedProps = _assign({}, fiber.memoizedProps);
48611      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
48612    }
48613  }; // Support DevTools props for function components, forwardRef, memo, host components, etc.
48614
48615
48616  overrideProps = function (fiber, path, value) {
48617    fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);
48618
48619    if (fiber.alternate) {
48620      fiber.alternate.pendingProps = fiber.pendingProps;
48621    }
48622
48623    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
48624  };
48625
48626  overridePropsDeletePath = function (fiber, path) {
48627    fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);
48628
48629    if (fiber.alternate) {
48630      fiber.alternate.pendingProps = fiber.pendingProps;
48631    }
48632
48633    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
48634  };
48635
48636  overridePropsRenamePath = function (fiber, oldPath, newPath) {
48637    fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);
48638
48639    if (fiber.alternate) {
48640      fiber.alternate.pendingProps = fiber.pendingProps;
48641    }
48642
48643    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
48644  };
48645
48646  scheduleUpdate = function (fiber) {
48647    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
48648  };
48649
48650  setSuspenseHandler = function (newShouldSuspendImpl) {
48651    shouldSuspendImpl = newShouldSuspendImpl;
48652  };
48653}
48654
48655function findHostInstanceByFiber(fiber) {
48656  var hostFiber = findCurrentHostFiber(fiber);
48657
48658  if (hostFiber === null) {
48659    return null;
48660  }
48661
48662  return hostFiber.stateNode;
48663}
48664
48665function emptyFindFiberByHostInstance(instance) {
48666  return null;
48667}
48668
48669function getCurrentFiberForDevTools() {
48670  return current;
48671}
48672
48673function injectIntoDevTools(devToolsConfig) {
48674  var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
48675  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
48676  return injectInternals({
48677    bundleType: devToolsConfig.bundleType,
48678    version: devToolsConfig.version,
48679    rendererPackageName: devToolsConfig.rendererPackageName,
48680    rendererConfig: devToolsConfig.rendererConfig,
48681    overrideHookState: overrideHookState,
48682    overrideHookStateDeletePath: overrideHookStateDeletePath,
48683    overrideHookStateRenamePath: overrideHookStateRenamePath,
48684    overrideProps: overrideProps,
48685    overridePropsDeletePath: overridePropsDeletePath,
48686    overridePropsRenamePath: overridePropsRenamePath,
48687    setSuspenseHandler: setSuspenseHandler,
48688    scheduleUpdate: scheduleUpdate,
48689    currentDispatcherRef: ReactCurrentDispatcher,
48690    findHostInstanceByFiber: findHostInstanceByFiber,
48691    findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
48692    // React Refresh
48693    findHostInstancesForRefresh:  findHostInstancesForRefresh ,
48694    scheduleRefresh:  scheduleRefresh ,
48695    scheduleRoot:  scheduleRoot ,
48696    setRefreshHandler:  setRefreshHandler ,
48697    // Enables DevTools to append owner stacks to error messages in DEV mode.
48698    getCurrentFiber:  getCurrentFiberForDevTools 
48699  });
48700}
48701
48702function ReactDOMRoot(container, options) {
48703  this._internalRoot = createRootImpl(container, ConcurrentRoot, options);
48704}
48705
48706function ReactDOMBlockingRoot(container, tag, options) {
48707  this._internalRoot = createRootImpl(container, tag, options);
48708}
48709
48710ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {
48711  var root = this._internalRoot;
48712
48713  {
48714    if (typeof arguments[1] === 'function') {
48715      error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
48716    }
48717
48718    var container = root.containerInfo;
48719
48720    if (container.nodeType !== COMMENT_NODE) {
48721      var hostInstance = findHostInstanceWithNoPortals(root.current);
48722
48723      if (hostInstance) {
48724        if (hostInstance.parentNode !== container) {
48725          error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container.");
48726        }
48727      }
48728    }
48729  }
48730
48731  updateContainer(children, root, null, null);
48732};
48733
48734ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {
48735  {
48736    if (typeof arguments[0] === 'function') {
48737      error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
48738    }
48739  }
48740
48741  var root = this._internalRoot;
48742  var container = root.containerInfo;
48743  updateContainer(null, root, null, function () {
48744    unmarkContainerAsRoot(container);
48745  });
48746};
48747
48748function createRootImpl(container, tag, options) {
48749  // Tag is either LegacyRoot or Concurrent Root
48750  var hydrate = options != null && options.hydrate === true;
48751  var hydrationCallbacks = options != null && options.hydrationOptions || null;
48752  var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null;
48753  var root = createContainer(container, tag, hydrate);
48754  markContainerAsRoot(root.current, container);
48755  var containerNodeType = container.nodeType;
48756
48757  {
48758    var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
48759    listenToAllSupportedEvents(rootContainerElement);
48760  }
48761
48762  if (mutableSources) {
48763    for (var i = 0; i < mutableSources.length; i++) {
48764      var mutableSource = mutableSources[i];
48765      registerMutableSourceForHydration(root, mutableSource);
48766    }
48767  }
48768
48769  return root;
48770}
48771function createLegacyRoot(container, options) {
48772  return new ReactDOMBlockingRoot(container, LegacyRoot, options);
48773}
48774function isValidContainer(node) {
48775  return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
48776}
48777
48778var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
48779var topLevelUpdateWarnings;
48780var warnedAboutHydrateAPI = false;
48781
48782{
48783  topLevelUpdateWarnings = function (container) {
48784    if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
48785      var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);
48786
48787      if (hostInstance) {
48788        if (hostInstance.parentNode !== container) {
48789          error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');
48790        }
48791      }
48792    }
48793
48794    var isRootRenderedBySomeReact = !!container._reactRootContainer;
48795    var rootEl = getReactRootElementInContainer(container);
48796    var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));
48797
48798    if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
48799      error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');
48800    }
48801
48802    if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
48803      error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');
48804    }
48805  };
48806}
48807
48808function getReactRootElementInContainer(container) {
48809  if (!container) {
48810    return null;
48811  }
48812
48813  if (container.nodeType === DOCUMENT_NODE) {
48814    return container.documentElement;
48815  } else {
48816    return container.firstChild;
48817  }
48818}
48819
48820function shouldHydrateDueToLegacyHeuristic(container) {
48821  var rootElement = getReactRootElementInContainer(container);
48822  return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));
48823}
48824
48825function legacyCreateRootFromDOMContainer(container, forceHydrate) {
48826  var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.
48827
48828  if (!shouldHydrate) {
48829    var warned = false;
48830    var rootSibling;
48831
48832    while (rootSibling = container.lastChild) {
48833      {
48834        if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {
48835          warned = true;
48836
48837          error('render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');
48838        }
48839      }
48840
48841      container.removeChild(rootSibling);
48842    }
48843  }
48844
48845  {
48846    if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
48847      warnedAboutHydrateAPI = true;
48848
48849      warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v18. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
48850    }
48851  }
48852
48853  return createLegacyRoot(container, shouldHydrate ? {
48854    hydrate: true
48855  } : undefined);
48856}
48857
48858function warnOnInvalidCallback$1(callback, callerName) {
48859  {
48860    if (callback !== null && typeof callback !== 'function') {
48861      error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
48862    }
48863  }
48864}
48865
48866function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
48867  {
48868    topLevelUpdateWarnings(container);
48869    warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');
48870  } // TODO: Without `any` type, Flow says "Property cannot be accessed on any
48871  // member of intersection type." Whyyyyyy.
48872
48873
48874  var root = container._reactRootContainer;
48875  var fiberRoot;
48876
48877  if (!root) {
48878    // Initial mount
48879    root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);
48880    fiberRoot = root._internalRoot;
48881
48882    if (typeof callback === 'function') {
48883      var originalCallback = callback;
48884
48885      callback = function () {
48886        var instance = getPublicRootInstance(fiberRoot);
48887        originalCallback.call(instance);
48888      };
48889    } // Initial mount should not be batched.
48890
48891
48892    unbatchedUpdates(function () {
48893      updateContainer(children, fiberRoot, parentComponent, callback);
48894    });
48895  } else {
48896    fiberRoot = root._internalRoot;
48897
48898    if (typeof callback === 'function') {
48899      var _originalCallback = callback;
48900
48901      callback = function () {
48902        var instance = getPublicRootInstance(fiberRoot);
48903
48904        _originalCallback.call(instance);
48905      };
48906    } // Update
48907
48908
48909    updateContainer(children, fiberRoot, parentComponent, callback);
48910  }
48911
48912  return getPublicRootInstance(fiberRoot);
48913}
48914
48915function findDOMNode(componentOrElement) {
48916  {
48917    var owner = ReactCurrentOwner$3.current;
48918
48919    if (owner !== null && owner.stateNode !== null) {
48920      var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
48921
48922      if (!warnedAboutRefsInRender) {
48923        error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component');
48924      }
48925
48926      owner.stateNode._warnedAboutRefsInRender = true;
48927    }
48928  }
48929
48930  if (componentOrElement == null) {
48931    return null;
48932  }
48933
48934  if (componentOrElement.nodeType === ELEMENT_NODE) {
48935    return componentOrElement;
48936  }
48937
48938  {
48939    return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
48940  }
48941}
48942function hydrate(element, container, callback) {
48943  if (!isValidContainer(container)) {
48944    {
48945      throw Error( "Target container is not a DOM element." );
48946    }
48947  }
48948
48949  {
48950    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
48951
48952    if (isModernRoot) {
48953      error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');
48954    }
48955  } // TODO: throw or warn if we couldn't hydrate?
48956
48957
48958  return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
48959}
48960function render(element, container, callback) {
48961  if (!isValidContainer(container)) {
48962    {
48963      throw Error( "Target container is not a DOM element." );
48964    }
48965  }
48966
48967  {
48968    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
48969
48970    if (isModernRoot) {
48971      error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');
48972    }
48973  }
48974
48975  return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
48976}
48977function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
48978  if (!isValidContainer(containerNode)) {
48979    {
48980      throw Error( "Target container is not a DOM element." );
48981    }
48982  }
48983
48984  if (!(parentComponent != null && has(parentComponent))) {
48985    {
48986      throw Error( "parentComponent must be a valid React Component" );
48987    }
48988  }
48989
48990  return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
48991}
48992function unmountComponentAtNode(container) {
48993  if (!isValidContainer(container)) {
48994    {
48995      throw Error( "unmountComponentAtNode(...): Target container is not a DOM element." );
48996    }
48997  }
48998
48999  {
49000    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
49001
49002    if (isModernRoot) {
49003      error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');
49004    }
49005  }
49006
49007  if (container._reactRootContainer) {
49008    {
49009      var rootEl = getReactRootElementInContainer(container);
49010      var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);
49011
49012      if (renderedByDifferentReact) {
49013        error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
49014      }
49015    } // Unmount should not be batched.
49016
49017
49018    unbatchedUpdates(function () {
49019      legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
49020        // $FlowFixMe This should probably use `delete container._reactRootContainer`
49021        container._reactRootContainer = null;
49022        unmarkContainerAsRoot(container);
49023      });
49024    }); // If you call unmountComponentAtNode twice in quick succession, you'll
49025    // get `true` twice. That's probably fine?
49026
49027    return true;
49028  } else {
49029    {
49030      var _rootEl = getReactRootElementInContainer(container);
49031
49032      var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.
49033
49034      var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
49035
49036      if (hasNonRootReactChild) {
49037        error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');
49038      }
49039    }
49040
49041    return false;
49042  }
49043}
49044
49045setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);
49046setAttemptContinuousHydration(attemptContinuousHydration$1);
49047setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
49048setAttemptHydrationAtPriority(runWithPriority$2);
49049var didWarnAboutUnstableCreatePortal = false;
49050
49051{
49052  if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype
49053  Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype
49054  Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
49055    error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
49056  }
49057}
49058
49059setRestoreImplementation(restoreControlledState$3);
49060setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);
49061
49062function createPortal$1(children, container) {
49063  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
49064
49065  if (!isValidContainer(container)) {
49066    {
49067      throw Error( "Target container is not a DOM element." );
49068    }
49069  } // TODO: pass ReactDOM portal implementation as third argument
49070  // $FlowFixMe The Flow type is opaque but there's no way to actually create it.
49071
49072
49073  return createPortal(children, container, null, key);
49074}
49075
49076function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
49077
49078  return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
49079}
49080
49081function unstable_createPortal(children, container) {
49082  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
49083
49084  {
49085    if (!didWarnAboutUnstableCreatePortal) {
49086      didWarnAboutUnstableCreatePortal = true;
49087
49088      warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 18+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
49089    }
49090  }
49091
49092  return createPortal$1(children, container, key);
49093}
49094
49095var Internals = {
49096  // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.
49097  // This is an array for better minification.
49098  Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key?
49099  IsThisRendererActing]
49100};
49101var foundDevTools = injectIntoDevTools({
49102  findFiberByHostInstance: getClosestInstanceFromNode,
49103  bundleType:  1 ,
49104  version: ReactVersion,
49105  rendererPackageName: 'react-dom'
49106});
49107
49108{
49109  if (!foundDevTools && canUseDOM && window.top === window.self) {
49110    // If we're in Chrome or Firefox, provide a download link if not installed.
49111    if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
49112      var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.
49113
49114      if (/^(https?|file):$/.test(protocol)) {
49115        // eslint-disable-next-line react-internal/no-production-logging
49116        console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');
49117      }
49118    }
49119  }
49120}
49121
49122exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
49123exports.createPortal = createPortal$1;
49124exports.findDOMNode = findDOMNode;
49125exports.flushSync = flushSync;
49126exports.hydrate = hydrate;
49127exports.render = render;
49128exports.unmountComponentAtNode = unmountComponentAtNode;
49129exports.unstable_batchedUpdates = batchedUpdates$1;
49130exports.unstable_createPortal = unstable_createPortal;
49131exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
49132exports.version = ReactVersion;
49133  })();
49134}
49135
49136
49137/***/ }),
49138
vendor: 1,428 bytes, lines 49139-49182
49139/***/ "./node_modules/react-dom/index.js":
49140/*!*****************************************!*\
49141  !*** ./node_modules/react-dom/index.js ***!
49142  \*****************************************/
49143/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
49144
49145"use strict";
49146
49147
49148function checkDCE() {
49149  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
49150  if (
49151    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
49152    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
49153  ) {
49154    return;
49155  }
49156  if (true) {
49157    // This branch is unreachable because this function is only called
49158    // in production, but the condition is true only in development.
49159    // Therefore if the branch is still here, dead code elimination wasn't
49160    // properly applied.
49161    // Don't change the message. React DevTools relies on it. Also make sure
49162    // this message doesn't occur elsewhere in this function, or it will cause
49163    // a false positive.
49164    throw new Error('^_^');
49165  }
49166  try {
49167    // Verify that the code above has been dead code eliminated (DCE'd).
49168    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
49169  } catch (err) {
49170    // DevTools shouldn't crash React, no matter what.
49171    // We should still report in case we break this code.
49172    console.error(err);
49173  }
49174}
49175
49176if (false) {} else {
49177  module.exports = __webpack_require__(/*! ./cjs/react-dom.development.js */ "./node_modules/react-dom/cjs/react-dom.development.js");
49178}
49179
49180
49181/***/ }),
49182
vendor: 7,264 bytes, lines 49183-49374
49183/***/ "./node_modules/react-is/cjs/react-is.development.js":
49184/*!***********************************************************!*\
49185  !*** ./node_modules/react-is/cjs/react-is.development.js ***!
49186  \***********************************************************/
49187/***/ ((__unused_webpack_module, exports) => {
49188
49189"use strict";
49190/** @license React v16.13.1
49191 * react-is.development.js
49192 *
49193 * Copyright (c) Facebook, Inc. and its affiliates.
49194 *
49195 * This source code is licensed under the MIT license found in the
49196 * LICENSE file in the root directory of this source tree.
49197 */
49198
49199
49200
49201
49202
49203if (true) {
49204  (function() {
49205'use strict';
49206
49207// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
49208// nor polyfill, then a plain number is used for performance.
49209var hasSymbol = typeof Symbol === 'function' && Symbol.for;
49210var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
49211var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
49212var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
49213var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
49214var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
49215var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
49216var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
49217// (unstable) APIs that have been removed. Can we remove the symbols?
49218
49219var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
49220var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
49221var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
49222var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
49223var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
49224var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
49225var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
49226var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
49227var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
49228var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
49229var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
49230
49231function isValidElementType(type) {
49232  return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
49233  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
49234}
49235
49236function typeOf(object) {
49237  if (typeof object === 'object' && object !== null) {
49238    var $$typeof = object.$$typeof;
49239
49240    switch ($$typeof) {
49241      case REACT_ELEMENT_TYPE:
49242        var type = object.type;
49243
49244        switch (type) {
49245          case REACT_ASYNC_MODE_TYPE:
49246          case REACT_CONCURRENT_MODE_TYPE:
49247          case REACT_FRAGMENT_TYPE:
49248          case REACT_PROFILER_TYPE:
49249          case REACT_STRICT_MODE_TYPE:
49250          case REACT_SUSPENSE_TYPE:
49251            return type;
49252
49253          default:
49254            var $$typeofType = type && type.$$typeof;
49255
49256            switch ($$typeofType) {
49257              case REACT_CONTEXT_TYPE:
49258              case REACT_FORWARD_REF_TYPE:
49259              case REACT_LAZY_TYPE:
49260              case REACT_MEMO_TYPE:
49261              case REACT_PROVIDER_TYPE:
49262                return $$typeofType;
49263
49264              default:
49265                return $$typeof;
49266            }
49267
49268        }
49269
49270      case REACT_PORTAL_TYPE:
49271        return $$typeof;
49272    }
49273  }
49274
49275  return undefined;
49276} // AsyncMode is deprecated along with isAsyncMode
49277
49278var AsyncMode = REACT_ASYNC_MODE_TYPE;
49279var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
49280var ContextConsumer = REACT_CONTEXT_TYPE;
49281var ContextProvider = REACT_PROVIDER_TYPE;
49282var Element = REACT_ELEMENT_TYPE;
49283var ForwardRef = REACT_FORWARD_REF_TYPE;
49284var Fragment = REACT_FRAGMENT_TYPE;
49285var Lazy = REACT_LAZY_TYPE;
49286var Memo = REACT_MEMO_TYPE;
49287var Portal = REACT_PORTAL_TYPE;
49288var Profiler = REACT_PROFILER_TYPE;
49289var StrictMode = REACT_STRICT_MODE_TYPE;
49290var Suspense = REACT_SUSPENSE_TYPE;
49291var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
49292
49293function isAsyncMode(object) {
49294  {
49295    if (!hasWarnedAboutDeprecatedIsAsyncMode) {
49296      hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
49297
49298      console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
49299    }
49300  }
49301
49302  return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
49303}
49304function isConcurrentMode(object) {
49305  return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
49306}
49307function isContextConsumer(object) {
49308  return typeOf(object) === REACT_CONTEXT_TYPE;
49309}
49310function isContextProvider(object) {
49311  return typeOf(object) === REACT_PROVIDER_TYPE;
49312}
49313function isElement(object) {
49314  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
49315}
49316function isForwardRef(object) {
49317  return typeOf(object) === REACT_FORWARD_REF_TYPE;
49318}
49319function isFragment(object) {
49320  return typeOf(object) === REACT_FRAGMENT_TYPE;
49321}
49322function isLazy(object) {
49323  return typeOf(object) === REACT_LAZY_TYPE;
49324}
49325function isMemo(object) {
49326  return typeOf(object) === REACT_MEMO_TYPE;
49327}
49328function isPortal(object) {
49329  return typeOf(object) === REACT_PORTAL_TYPE;
49330}
49331function isProfiler(object) {
49332  return typeOf(object) === REACT_PROFILER_TYPE;
49333}
49334function isStrictMode(object) {
49335  return typeOf(object) === REACT_STRICT_MODE_TYPE;
49336}
49337function isSuspense(object) {
49338  return typeOf(object) === REACT_SUSPENSE_TYPE;
49339}
49340
49341exports.AsyncMode = AsyncMode;
49342exports.ConcurrentMode = ConcurrentMode;
49343exports.ContextConsumer = ContextConsumer;
49344exports.ContextProvider = ContextProvider;
49345exports.Element = Element;
49346exports.ForwardRef = ForwardRef;
49347exports.Fragment = Fragment;
49348exports.Lazy = Lazy;
49349exports.Memo = Memo;
49350exports.Portal = Portal;
49351exports.Profiler = Profiler;
49352exports.StrictMode = StrictMode;
49353exports.Suspense = Suspense;
49354exports.isAsyncMode = isAsyncMode;
49355exports.isConcurrentMode = isConcurrentMode;
49356exports.isContextConsumer = isContextConsumer;
49357exports.isContextProvider = isContextProvider;
49358exports.isElement = isElement;
49359exports.isForwardRef = isForwardRef;
49360exports.isFragment = isFragment;
49361exports.isLazy = isLazy;
49362exports.isMemo = isMemo;
49363exports.isPortal = isPortal;
49364exports.isProfiler = isProfiler;
49365exports.isStrictMode = isStrictMode;
49366exports.isSuspense = isSuspense;
49367exports.isValidElementType = isValidElementType;
49368exports.typeOf = typeOf;
49369  })();
49370}
49371
49372
49373/***/ }),
49374
vendor: 432 bytes, lines 49375-49390
49375/***/ "./node_modules/react-is/index.js":
49376/*!****************************************!*\
49377  !*** ./node_modules/react-is/index.js ***!
49378  \****************************************/
49379/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
49380
49381"use strict";
49382
49383
49384if (false) {} else {
49385  module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
49386}
49387
49388
49389/***/ }),
49390
vendor: 6,660 bytes, lines 49391-49563
49391/***/ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js":
49392/*!****************************************************************************!*\
49393  !*** ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js ***!
49394  \****************************************************************************/
49395/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
49396
49397"use strict";
49398__webpack_require__.r(__webpack_exports__);
49399/* harmony export */ __webpack_require__.d(__webpack_exports__, {
49400/* harmony export */   "polyfill": () => (/* binding */ polyfill)
49401/* harmony export */ });
49402/**
49403 * Copyright (c) 2013-present, Facebook, Inc.
49404 *
49405 * This source code is licensed under the MIT license found in the
49406 * LICENSE file in the root directory of this source tree.
49407 */
49408
49409function componentWillMount() {
49410  // Call this.constructor.gDSFP to support sub-classes.
49411  var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
49412  if (state !== null && state !== undefined) {
49413    this.setState(state);
49414  }
49415}
49416
49417function componentWillReceiveProps(nextProps) {
49418  // Call this.constructor.gDSFP to support sub-classes.
49419  // Use the setState() updater to ensure state isn't stale in certain edge cases.
49420  function updater(prevState) {
49421    var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
49422    return state !== null && state !== undefined ? state : null;
49423  }
49424  // Binding "this" is important for shallow renderer support.
49425  this.setState(updater.bind(this));
49426}
49427
49428function componentWillUpdate(nextProps, nextState) {
49429  try {
49430    var prevProps = this.props;
49431    var prevState = this.state;
49432    this.props = nextProps;
49433    this.state = nextState;
49434    this.__reactInternalSnapshotFlag = true;
49435    this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
49436      prevProps,
49437      prevState
49438    );
49439  } finally {
49440    this.props = prevProps;
49441    this.state = prevState;
49442  }
49443}
49444
49445// React may warn about cWM/cWRP/cWU methods being deprecated.
49446// Add a flag to suppress these warnings for this special case.
49447componentWillMount.__suppressDeprecationWarning = true;
49448componentWillReceiveProps.__suppressDeprecationWarning = true;
49449componentWillUpdate.__suppressDeprecationWarning = true;
49450
49451function polyfill(Component) {
49452  var prototype = Component.prototype;
49453
49454  if (!prototype || !prototype.isReactComponent) {
49455    throw new Error('Can only polyfill class components');
49456  }
49457
49458  if (
49459    typeof Component.getDerivedStateFromProps !== 'function' &&
49460    typeof prototype.getSnapshotBeforeUpdate !== 'function'
49461  ) {
49462    return Component;
49463  }
49464
49465  // If new component APIs are defined, "unsafe" lifecycles won't be called.
49466  // Error if any of these lifecycles are present,
49467  // Because they would work differently between older and newer (16.3+) versions of React.
49468  var foundWillMountName = null;
49469  var foundWillReceivePropsName = null;
49470  var foundWillUpdateName = null;
49471  if (typeof prototype.componentWillMount === 'function') {
49472    foundWillMountName = 'componentWillMount';
49473  } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
49474    foundWillMountName = 'UNSAFE_componentWillMount';
49475  }
49476  if (typeof prototype.componentWillReceiveProps === 'function') {
49477    foundWillReceivePropsName = 'componentWillReceiveProps';
49478  } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
49479    foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
49480  }
49481  if (typeof prototype.componentWillUpdate === 'function') {
49482    foundWillUpdateName = 'componentWillUpdate';
49483  } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
49484    foundWillUpdateName = 'UNSAFE_componentWillUpdate';
49485  }
49486  if (
49487    foundWillMountName !== null ||
49488    foundWillReceivePropsName !== null ||
49489    foundWillUpdateName !== null
49490  ) {
49491    var componentName = Component.displayName || Component.name;
49492    var newApiName =
49493      typeof Component.getDerivedStateFromProps === 'function'
49494        ? 'getDerivedStateFromProps()'
49495        : 'getSnapshotBeforeUpdate()';
49496
49497    throw Error(
49498      'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
49499        componentName +
49500        ' uses ' +
49501        newApiName +
49502        ' but also contains the following legacy lifecycles:' +
49503        (foundWillMountName !== null ? '\n  ' + foundWillMountName : '') +
49504        (foundWillReceivePropsName !== null
49505          ? '\n  ' + foundWillReceivePropsName
49506          : '') +
49507        (foundWillUpdateName !== null ? '\n  ' + foundWillUpdateName : '') +
49508        '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' +
49509        'https://fb.me/react-async-component-lifecycle-hooks'
49510    );
49511  }
49512
49513  // React <= 16.2 does not support static getDerivedStateFromProps.
49514  // As a workaround, use cWM and cWRP to invoke the new static lifecycle.
49515  // Newer versions of React will ignore these lifecycles if gDSFP exists.
49516  if (typeof Component.getDerivedStateFromProps === 'function') {
49517    prototype.componentWillMount = componentWillMount;
49518    prototype.componentWillReceiveProps = componentWillReceiveProps;
49519  }
49520
49521  // React <= 16.2 does not support getSnapshotBeforeUpdate.
49522  // As a workaround, use cWU to invoke the new lifecycle.
49523  // Newer versions of React will ignore that lifecycle if gSBU exists.
49524  if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
49525    if (typeof prototype.componentDidUpdate !== 'function') {
49526      throw new Error(
49527        'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'
49528      );
49529    }
49530
49531    prototype.componentWillUpdate = componentWillUpdate;
49532
49533    var componentDidUpdate = prototype.componentDidUpdate;
49534
49535    prototype.componentDidUpdate = function componentDidUpdatePolyfill(
49536      prevProps,
49537      prevState,
49538      maybeSnapshot
49539    ) {
49540      // 16.3+ will not execute our will-update method;
49541      // It will pass a snapshot value to did-update though.
49542      // Older versions will require our polyfilled will-update value.
49543      // We need to handle both cases, but can't just check for the presence of "maybeSnapshot",
49544      // Because for <= 15.x versions this might be a "prevContext" object.
49545      // We also can't just check "__reactInternalSnapshot",
49546      // Because get-snapshot might return a falsy value.
49547      // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.
49548      var snapshot = this.__reactInternalSnapshotFlag
49549        ? this.__reactInternalSnapshot
49550        : maybeSnapshot;
49551
49552      componentDidUpdate.call(this, prevProps, prevState, snapshot);
49553    };
49554  }
49555
49556  return Component;
49557}
49558
49559
49560
49561
49562/***/ }),
49563
vendor: 6,186 bytes, lines 49564-49709
49564/***/ "./node_modules/react-overlays/lib/LegacyPortal.js":
49565/*!*********************************************************!*\
49566  !*** ./node_modules/react-overlays/lib/LegacyPortal.js ***!
49567  \*********************************************************/
49568/***/ ((module, exports, __webpack_require__) => {
49569
49570"use strict";
49571
49572
49573exports.__esModule = true;
49574
49575var _propTypes = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
49576
49577var _propTypes2 = _interopRequireDefault(_propTypes);
49578
49579var _componentOrElement = __webpack_require__(/*! prop-types-extra/lib/componentOrElement */ "./node_modules/prop-types-extra/lib/componentOrElement.js");
49580
49581var _componentOrElement2 = _interopRequireDefault(_componentOrElement);
49582
49583var _react = __webpack_require__(/*! react */ "./node_modules/react/index.js");
49584
49585var _react2 = _interopRequireDefault(_react);
49586
49587var _reactDom = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
49588
49589var _reactDom2 = _interopRequireDefault(_reactDom);
49590
49591var _getContainer = __webpack_require__(/*! ./utils/getContainer */ "./node_modules/react-overlays/lib/utils/getContainer.js");
49592
49593var _getContainer2 = _interopRequireDefault(_getContainer);
49594
49595var _ownerDocument = __webpack_require__(/*! ./utils/ownerDocument */ "./node_modules/react-overlays/lib/utils/ownerDocument.js");
49596
49597var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
49598
49599function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
49600
49601function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
49602
49603function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
49604
49605function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
49606
49607/**
49608 * The `<Portal/>` component renders its children into a new "subtree" outside of current component hierarchy.
49609 * You can think of it as a declarative `appendChild()`, or jQuery's `$.fn.appendTo()`.
49610 * The children of `<Portal/>` component will be appended to the `container` specified.
49611 */
49612var Portal = function (_React$Component) {
49613  _inherits(Portal, _React$Component);
49614
49615  function Portal() {
49616    var _temp, _this, _ret;
49617
49618    _classCallCheck(this, Portal);
49619
49620    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
49621      args[_key] = arguments[_key];
49622    }
49623
49624    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this._mountOverlayTarget = function () {
49625      if (!_this._overlayTarget) {
49626        _this._overlayTarget = document.createElement('div');
49627        _this._portalContainerNode = (0, _getContainer2.default)(_this.props.container, (0, _ownerDocument2.default)(_this).body);
49628        _this._portalContainerNode.appendChild(_this._overlayTarget);
49629      }
49630    }, _this._unmountOverlayTarget = function () {
49631      if (_this._overlayTarget) {
49632        _this._portalContainerNode.removeChild(_this._overlayTarget);
49633        _this._overlayTarget = null;
49634      }
49635      _this._portalContainerNode = null;
49636    }, _this._renderOverlay = function () {
49637      var overlay = !_this.props.children ? null : _react2.default.Children.only(_this.props.children);
49638
49639      // Save reference for future access.
49640      if (overlay !== null) {
49641        _this._mountOverlayTarget();
49642
49643        var initialRender = !_this._overlayInstance;
49644
49645        _this._overlayInstance = _reactDom2.default.unstable_renderSubtreeIntoContainer(_this, overlay, _this._overlayTarget, function () {
49646          if (initialRender && _this.props.onRendered) {
49647            _this.props.onRendered();
49648          }
49649        });
49650      } else {
49651        // Unrender if the component is null for transitions to null
49652        _this._unrenderOverlay();
49653        _this._unmountOverlayTarget();
49654      }
49655    }, _this._unrenderOverlay = function () {
49656      if (_this._overlayTarget) {
49657        _reactDom2.default.unmountComponentAtNode(_this._overlayTarget);
49658        _this._overlayInstance = null;
49659      }
49660    }, _this.getMountNode = function () {
49661      return _this._overlayTarget;
49662    }, _temp), _possibleConstructorReturn(_this, _ret);
49663  }
49664
49665  Portal.prototype.componentDidMount = function componentDidMount() {
49666    this._isMounted = true;
49667    this._renderOverlay();
49668  };
49669
49670  Portal.prototype.componentDidUpdate = function componentDidUpdate() {
49671    this._renderOverlay();
49672  };
49673
49674  Portal.prototype.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) {
49675    if (this._overlayTarget && nextProps.container !== this.props.container) {
49676      this._portalContainerNode.removeChild(this._overlayTarget);
49677      this._portalContainerNode = (0, _getContainer2.default)(nextProps.container, (0, _ownerDocument2.default)(this).body);
49678      this._portalContainerNode.appendChild(this._overlayTarget);
49679    }
49680  };
49681
49682  Portal.prototype.componentWillUnmount = function componentWillUnmount() {
49683    this._isMounted = false;
49684    this._unrenderOverlay();
49685    this._unmountOverlayTarget();
49686  };
49687
49688  Portal.prototype.render = function render() {
49689    return null;
49690  };
49691
49692  return Portal;
49693}(_react2.default.Component);
49694
49695Portal.displayName = 'Portal';
49696Portal.propTypes = {
49697  /**
49698   * A Node, Component instance, or function that returns either. The `container` will have the Portal children
49699   * appended to it.
49700   */
49701  container: _propTypes2.default.oneOfType([_componentOrElement2.default, _propTypes2.default.func]),
49702
49703  onRendered: _propTypes2.default.func
49704};
49705exports["default"] = Portal;
49706module.exports = exports['default'];
49707
49708/***/ }),
49709
vendor: 20,145 bytes, lines 49710-50338
49710/***/ "./node_modules/react-overlays/lib/Modal.js":
49711/*!**************************************************!*\
49712  !*** ./node_modules/react-overlays/lib/Modal.js ***!
49713  \**************************************************/
49714/***/ ((module, exports, __webpack_require__) => {
49715
49716"use strict";
49717
49718
49719exports.__esModule = true;
49720
49721var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
49722
49723var _activeElement = __webpack_require__(/*! dom-helpers/activeElement */ "./node_modules/dom-helpers/activeElement.js");
49724
49725var _activeElement2 = _interopRequireDefault(_activeElement);
49726
49727var _contains = __webpack_require__(/*! dom-helpers/query/contains */ "./node_modules/dom-helpers/query/contains.js");
49728
49729var _contains2 = _interopRequireDefault(_contains);
49730
49731var _inDOM = __webpack_require__(/*! dom-helpers/util/inDOM */ "./node_modules/dom-helpers/util/inDOM.js");
49732
49733var _inDOM2 = _interopRequireDefault(_inDOM);
49734
49735var _propTypes = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
49736
49737var _propTypes2 = _interopRequireDefault(_propTypes);
49738
49739var _componentOrElement = __webpack_require__(/*! prop-types-extra/lib/componentOrElement */ "./node_modules/prop-types-extra/lib/componentOrElement.js");
49740
49741var _componentOrElement2 = _interopRequireDefault(_componentOrElement);
49742
49743var _deprecated = __webpack_require__(/*! prop-types-extra/lib/deprecated */ "./node_modules/prop-types-extra/lib/deprecated.js");
49744
49745var _deprecated2 = _interopRequireDefault(_deprecated);
49746
49747var _elementType = __webpack_require__(/*! prop-types-extra/lib/elementType */ "./node_modules/prop-types-extra/lib/elementType.js");
49748
49749var _elementType2 = _interopRequireDefault(_elementType);
49750
49751var _react = __webpack_require__(/*! react */ "./node_modules/react/index.js");
49752
49753var _react2 = _interopRequireDefault(_react);
49754
49755var _reactDom = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
49756
49757var _reactDom2 = _interopRequireDefault(_reactDom);
49758
49759var _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js");
49760
49761var _warning2 = _interopRequireDefault(_warning);
49762
49763var _ModalManager = __webpack_require__(/*! ./ModalManager */ "./node_modules/react-overlays/lib/ModalManager.js");
49764
49765var _ModalManager2 = _interopRequireDefault(_ModalManager);
49766
49767var _Portal = __webpack_require__(/*! ./Portal */ "./node_modules/react-overlays/lib/Portal.js");
49768
49769var _Portal2 = _interopRequireDefault(_Portal);
49770
49771var _RefHolder = __webpack_require__(/*! ./RefHolder */ "./node_modules/react-overlays/lib/RefHolder.js");
49772
49773var _RefHolder2 = _interopRequireDefault(_RefHolder);
49774
49775var _addEventListener = __webpack_require__(/*! ./utils/addEventListener */ "./node_modules/react-overlays/lib/utils/addEventListener.js");
49776
49777var _addEventListener2 = _interopRequireDefault(_addEventListener);
49778
49779var _addFocusListener = __webpack_require__(/*! ./utils/addFocusListener */ "./node_modules/react-overlays/lib/utils/addFocusListener.js");
49780
49781var _addFocusListener2 = _interopRequireDefault(_addFocusListener);
49782
49783var _getContainer = __webpack_require__(/*! ./utils/getContainer */ "./node_modules/react-overlays/lib/utils/getContainer.js");
49784
49785var _getContainer2 = _interopRequireDefault(_getContainer);
49786
49787var _ownerDocument = __webpack_require__(/*! ./utils/ownerDocument */ "./node_modules/react-overlays/lib/utils/ownerDocument.js");
49788
49789var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
49790
49791function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
49792
49793function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
49794
49795function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
49796
49797function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable react/prop-types */
49798
49799var modalManager = new _ModalManager2.default();
49800
49801/**
49802 * Love them or hate them, `<Modal/>` provides a solid foundation for creating dialogs, lightboxes, or whatever else.
49803 * The Modal component renders its `children` node in front of a backdrop component.
49804 *
49805 * The Modal offers a few helpful features over using just a `<Portal/>` component and some styles:
49806 *
49807 * - Manages dialog stacking when one-at-a-time just isn't enough.
49808 * - Creates a backdrop, for disabling interaction below the modal.
49809 * - It properly manages focus; moving to the modal content, and keeping it there until the modal is closed.
49810 * - It disables scrolling of the page content while open.
49811 * - Adds the appropriate ARIA roles are automatically.
49812 * - Easily pluggable animations via a `<Transition/>` component.
49813 *
49814 * Note that, in the same way the backdrop element prevents users from clicking or interacting
49815 * with the page content underneath the Modal, Screen readers also need to be signaled to not to
49816 * interact with page content while the Modal is open. To do this, we use a common technique of applying
49817 * the `aria-hidden='true'` attribute to the non-Modal elements in the Modal `container`. This means that for
49818 * a Modal to be truly modal, it should have a `container` that is _outside_ your app's
49819 * React hierarchy (such as the default: document.body).
49820 */
49821
49822var Modal = function (_React$Component) {
49823  _inherits(Modal, _React$Component);
49824
49825  function Modal() {
49826    var _temp, _this, _ret;
49827
49828    _classCallCheck(this, Modal);
49829
49830    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
49831      args[_key] = arguments[_key];
49832    }
49833
49834    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _initialiseProps.call(_this), _temp), _possibleConstructorReturn(_this, _ret);
49835  }
49836
49837  Modal.prototype.omitProps = function omitProps(props, propTypes) {
49838
49839    var keys = Object.keys(props);
49840    var newProps = {};
49841    keys.map(function (prop) {
49842      if (!Object.prototype.hasOwnProperty.call(propTypes, prop)) {
49843        newProps[prop] = props[prop];
49844      }
49845    });
49846
49847    return newProps;
49848  };
49849
49850  Modal.prototype.render = function render() {
49851    var _props = this.props,
49852        show = _props.show,
49853        container = _props.container,
49854        children = _props.children,
49855        Transition = _props.transition,
49856        backdrop = _props.backdrop,
49857        className = _props.className,
49858        style = _props.style,
49859        onExit = _props.onExit,
49860        onExiting = _props.onExiting,
49861        onEnter = _props.onEnter,
49862        onEntering = _props.onEntering,
49863        onEntered = _props.onEntered;
49864
49865
49866    var dialog = _react2.default.Children.only(children);
49867    var filteredProps = this.omitProps(this.props, Modal.propTypes);
49868
49869    var mountModal = show || Transition && !this.state.exited;
49870    if (!mountModal) {
49871      return null;
49872    }
49873
49874    var _dialog$props = dialog.props,
49875        role = _dialog$props.role,
49876        tabIndex = _dialog$props.tabIndex;
49877
49878
49879    if (role === undefined || tabIndex === undefined) {
49880      dialog = (0, _react.cloneElement)(dialog, {
49881        role: role === undefined ? 'document' : role,
49882        tabIndex: tabIndex == null ? '-1' : tabIndex
49883      });
49884    }
49885
49886    if (Transition) {
49887      dialog = _react2.default.createElement(
49888        Transition,
49889        {
49890          appear: true,
49891          unmountOnExit: true,
49892          'in': show,
49893          onExit: onExit,
49894          onExiting: onExiting,
49895          onExited: this.handleHidden,
49896          onEnter: onEnter,
49897          onEntering: onEntering,
49898          onEntered: onEntered
49899        },
49900        dialog
49901      );
49902    }
49903
49904    return _react2.default.createElement(
49905      _Portal2.default,
49906      {
49907        ref: this.setMountNode,
49908        container: container,
49909        onRendered: this.onPortalRendered
49910      },
49911      _react2.default.createElement(
49912        'div',
49913        _extends({
49914          ref: this.setModalNodeRef,
49915          role: role || 'dialog'
49916        }, filteredProps, {
49917          style: style,
49918          className: className
49919        }),
49920        backdrop && this.renderBackdrop(),
49921        _react2.default.createElement(
49922          _RefHolder2.default,
49923          { ref: this.setDialogRef },
49924          dialog
49925        )
49926      )
49927    );
49928  };
49929
49930  Modal.prototype.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) {
49931    if (nextProps.show) {
49932      this.setState({ exited: false });
49933    } else if (!nextProps.transition) {
49934      // Otherwise let handleHidden take care of marking exited.
49935      this.setState({ exited: true });
49936    }
49937  };
49938
49939  Modal.prototype.UNSAFE_componentWillUpdate = function UNSAFE_componentWillUpdate(nextProps) {
49940    if (!this.props.show && nextProps.show) {
49941      this.checkForFocus();
49942    }
49943  };
49944
49945  Modal.prototype.componentDidMount = function componentDidMount() {
49946    this._isMounted = true;
49947    if (this.props.show) {
49948      this.onShow();
49949    }
49950  };
49951
49952  Modal.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
49953    var transition = this.props.transition;
49954
49955
49956    if (prevProps.show && !this.props.show && !transition) {
49957      // Otherwise handleHidden will call this.
49958      this.onHide();
49959    } else if (!prevProps.show && this.props.show) {
49960      this.onShow();
49961    }
49962  };
49963
49964  Modal.prototype.componentWillUnmount = function componentWillUnmount() {
49965    var _props2 = this.props,
49966        show = _props2.show,
49967        transition = _props2.transition;
49968
49969
49970    this._isMounted = false;
49971
49972    if (show || transition && !this.state.exited) {
49973      this.onHide();
49974    }
49975  };
49976
49977  Modal.prototype.autoFocus = function autoFocus() {
49978    if (!this.props.autoFocus) {
49979      return;
49980    }
49981
49982    var dialogElement = this.getDialogElement();
49983    var currentActiveElement = (0, _activeElement2.default)((0, _ownerDocument2.default)(this));
49984
49985    if (dialogElement && !(0, _contains2.default)(dialogElement, currentActiveElement)) {
49986      this.lastFocus = currentActiveElement;
49987
49988      if (!dialogElement.hasAttribute('tabIndex')) {
49989        (0, _warning2.default)(false, 'The modal content node does not accept focus. For the benefit of ' + 'assistive technologies, the tabIndex of the node is being set ' + 'to "-1".');
49990
49991        dialogElement.setAttribute('tabIndex', -1);
49992      }
49993
49994      dialogElement.focus();
49995    }
49996  };
49997
49998  Modal.prototype.restoreLastFocus = function restoreLastFocus() {
49999    // Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917)
50000    if (this.lastFocus && this.lastFocus.focus) {
50001      this.lastFocus.focus();
50002      this.lastFocus = null;
50003    }
50004  };
50005
50006  Modal.prototype.getDialogElement = function getDialogElement() {
50007    return _reactDom2.default.findDOMNode(this.dialog);
50008  };
50009
50010  Modal.prototype.isTopModal = function isTopModal() {
50011    return this.props.manager.isTopModal(this);
50012  };
50013
50014  return Modal;
50015}(_react2.default.Component);
50016
50017Modal.propTypes = _extends({}, _Portal2.default.propTypes, {
50018
50019  /**
50020   * Set the visibility of the Modal
50021   */
50022  show: _propTypes2.default.bool,
50023
50024  /**
50025   * A Node, Component instance, or function that returns either. The Modal is appended to it's container element.
50026   *
50027   * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the
50028   * page content can be placed behind a virtual backdrop as well as a visual one.
50029   */
50030  container: _propTypes2.default.oneOfType([_componentOrElement2.default, _propTypes2.default.func]),
50031
50032  /**
50033   * A callback fired when the Modal is opening.
50034   */
50035  onShow: _propTypes2.default.func,
50036
50037  /**
50038   * A callback fired when either the backdrop is clicked, or the escape key is pressed.
50039   *
50040   * The `onHide` callback only signals intent from the Modal,
50041   * you must actually set the `show` prop to `false` for the Modal to close.
50042   */
50043  onHide: _propTypes2.default.func,
50044
50045  /**
50046   * Include a backdrop component.
50047   */
50048  backdrop: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.oneOf(['static'])]),
50049
50050  /**
50051   * A function that returns a backdrop component. Useful for custom
50052   * backdrop rendering.
50053   *
50054   * ```js
50055   *  renderBackdrop={props => <MyBackdrop {...props} />}
50056   * ```
50057   */
50058  renderBackdrop: _propTypes2.default.func,
50059
50060  /**
50061   * A callback fired when the escape key, if specified in `keyboard`, is pressed.
50062   */
50063  onEscapeKeyDown: _propTypes2.default.func,
50064
50065  /**
50066   * Support for this function will be deprecated. Please use `onEscapeKeyDown` instead
50067   * A callback fired when the escape key, if specified in `keyboard`, is pressed.
50068   * @deprecated
50069   */
50070  onEscapeKeyUp: (0, _deprecated2.default)(_propTypes2.default.func, 'Please use onEscapeKeyDown instead for consistency'),
50071
50072  /**
50073   * A callback fired when the backdrop, if specified, is clicked.
50074   */
50075  onBackdropClick: _propTypes2.default.func,
50076
50077  /**
50078   * A style object for the backdrop component.
50079   */
50080  backdropStyle: _propTypes2.default.object,
50081
50082  /**
50083   * A css class or classes for the backdrop component.
50084   */
50085  backdropClassName: _propTypes2.default.string,
50086
50087  /**
50088   * A css class or set of classes applied to the modal container when the modal is open,
50089   * and removed when it is closed.
50090   */
50091  containerClassName: _propTypes2.default.string,
50092
50093  /**
50094   * Close the modal when escape key is pressed
50095   */
50096  keyboard: _propTypes2.default.bool,
50097
50098  /**
50099   * A `[email protected]` `<Transition/>` component used
50100   * to control animations for the dialog component.
50101   */
50102  transition: _elementType2.default,
50103
50104  /**
50105   * A `[email protected]` `<Transition/>` component used
50106   * to control animations for the backdrop components.
50107   */
50108  backdropTransition: _elementType2.default,
50109
50110  /**
50111   * When `true` The modal will automatically shift focus to itself when it opens, and
50112   * replace it to the last focused element when it closes. This also
50113   * works correctly with any Modal children that have the `autoFocus` prop.
50114   *
50115   * Generally this should never be set to `false` as it makes the Modal less
50116   * accessible to assistive technologies, like screen readers.
50117   */
50118  autoFocus: _propTypes2.default.bool,
50119
50120  /**
50121   * When `true` The modal will prevent focus from leaving the Modal while open.
50122   *
50123   * Generally this should never be set to `false` as it makes the Modal less
50124   * accessible to assistive technologies, like screen readers.
50125   */
50126  enforceFocus: _propTypes2.default.bool,
50127
50128  /**
50129   * When `true` The modal will restore focus to previously focused element once
50130   * modal is hidden
50131   */
50132  restoreFocus: _propTypes2.default.bool,
50133
50134  /**
50135   * Callback fired before the Modal transitions in
50136   */
50137  onEnter: _propTypes2.default.func,
50138
50139  /**
50140   * Callback fired as the Modal begins to transition in
50141   */
50142  onEntering: _propTypes2.default.func,
50143
50144  /**
50145   * Callback fired after the Modal finishes transitioning in
50146   */
50147  onEntered: _propTypes2.default.func,
50148
50149  /**
50150   * Callback fired right before the Modal transitions out
50151   */
50152  onExit: _propTypes2.default.func,
50153
50154  /**
50155   * Callback fired as the Modal begins to transition out
50156   */
50157  onExiting: _propTypes2.default.func,
50158
50159  /**
50160   * Callback fired after the Modal finishes transitioning out
50161   */
50162  onExited: _propTypes2.default.func,
50163
50164  /**
50165   * A ModalManager instance used to track and manage the state of open
50166   * Modals. Useful when customizing how modals interact within a container
50167   */
50168  manager: _propTypes2.default.object.isRequired
50169});
50170Modal.defaultProps = {
50171  show: false,
50172  backdrop: true,
50173  keyboard: true,
50174  autoFocus: true,
50175  enforceFocus: true,
50176  restoreFocus: true,
50177  onHide: function onHide() {},
50178  manager: modalManager,
50179  renderBackdrop: function renderBackdrop(props) {
50180    return _react2.default.createElement('div', props);
50181  }
50182};
50183
50184var _initialiseProps = function _initialiseProps() {
50185  var _this2 = this;
50186
50187  this.state = { exited: !this.props.show };
50188
50189  this.renderBackdrop = function () {
50190    var _props3 = _this2.props,
50191        backdropStyle = _props3.backdropStyle,
50192        backdropClassName = _props3.backdropClassName,
50193        renderBackdrop = _props3.renderBackdrop,
50194        Transition = _props3.backdropTransition;
50195
50196
50197    var backdropRef = function backdropRef(ref) {
50198      return _this2.backdrop = ref;
50199    };
50200
50201    var backdrop = renderBackdrop({
50202      ref: backdropRef,
50203      style: backdropStyle,
50204      className: backdropClassName,
50205      onClick: _this2.handleBackdropClick
50206    });
50207
50208    if (Transition) {
50209      backdrop = _react2.default.createElement(
50210        Transition,
50211        {
50212          appear: true,
50213          'in': _this2.props.show
50214        },
50215        backdrop
50216      );
50217    }
50218
50219    return backdrop;
50220  };
50221
50222  this.onPortalRendered = function () {
50223    _this2.autoFocus();
50224
50225    if (_this2.props.onShow) {
50226      _this2.props.onShow();
50227    }
50228  };
50229
50230  this.onShow = function () {
50231    var doc = (0, _ownerDocument2.default)(_this2);
50232    var container = (0, _getContainer2.default)(_this2.props.container, doc.body);
50233
50234    _this2.props.manager.add(_this2, container, _this2.props.containerClassName);
50235
50236    _this2._onDocumentKeydownListener = (0, _addEventListener2.default)(doc, 'keydown', _this2.handleDocumentKeyDown);
50237
50238    _this2._onDocumentKeyupListener = (0, _addEventListener2.default)(doc, 'keyup', _this2.handleDocumentKeyUp);
50239
50240    _this2._onFocusinListener = (0, _addFocusListener2.default)(_this2.enforceFocus);
50241  };
50242
50243  this.onHide = function () {
50244    _this2.props.manager.remove(_this2);
50245
50246    _this2._onDocumentKeydownListener.remove();
50247
50248    _this2._onDocumentKeyupListener.remove();
50249
50250    _this2._onFocusinListener.remove();
50251
50252    if (_this2.props.restoreFocus) {
50253      _this2.restoreLastFocus();
50254    }
50255  };
50256
50257  this.setMountNode = function (ref) {
50258    _this2.mountNode = ref ? ref.getMountNode() : ref;
50259  };
50260
50261  this.setModalNodeRef = function (ref) {
50262    _this2.modalNode = ref;
50263  };
50264
50265  this.setDialogRef = function (ref) {
50266    _this2.dialog = ref;
50267  };
50268
50269  this.handleHidden = function () {
50270    _this2.setState({ exited: true });
50271    _this2.onHide();
50272
50273    if (_this2.props.onExited) {
50274      var _props4;
50275
50276      (_props4 = _this2.props).onExited.apply(_props4, arguments);
50277    }
50278  };
50279
50280  this.handleBackdropClick = function (e) {
50281    if (e.target !== e.currentTarget) {
50282      return;
50283    }
50284
50285    if (_this2.props.onBackdropClick) {
50286      _this2.props.onBackdropClick(e);
50287    }
50288
50289    if (_this2.props.backdrop === true) {
50290      _this2.props.onHide();
50291    }
50292  };
50293
50294  this.handleDocumentKeyDown = function (e) {
50295    if (_this2.props.keyboard && e.keyCode === 27 && _this2.isTopModal()) {
50296      if (_this2.props.onEscapeKeyDown) {
50297        _this2.props.onEscapeKeyDown(e);
50298      }
50299
50300      _this2.props.onHide();
50301    }
50302  };
50303
50304  this.handleDocumentKeyUp = function (e) {
50305    if (_this2.props.keyboard && e.keyCode === 27 && _this2.isTopModal()) {
50306      if (_this2.props.onEscapeKeyUp) {
50307        _this2.props.onEscapeKeyUp(e);
50308      }
50309    }
50310  };
50311
50312  this.checkForFocus = function () {
50313    if (_inDOM2.default) {
50314      _this2.lastFocus = (0, _activeElement2.default)();
50315    }
50316  };
50317
50318  this.enforceFocus = function () {
50319    if (!_this2.props.enforceFocus || !_this2._isMounted || !_this2.isTopModal()) {
50320      return;
50321    }
50322
50323    var dialogElement = _this2.getDialogElement();
50324    var currentActiveElement = (0, _activeElement2.default)((0, _ownerDocument2.default)(_this2));
50325
50326    if (dialogElement && !(0, _contains2.default)(dialogElement, currentActiveElement)) {
50327      dialogElement.focus();
50328    }
50329  };
50330};
50331
50332Modal.Manager = _ModalManager2.default;
50333
50334exports["default"] = Modal;
50335module.exports = exports['default'];
50336
50337/***/ }),
50338
vendor: 5,639 bytes, lines 50339-50523
50339/***/ "./node_modules/react-overlays/lib/ModalManager.js":
50340/*!*********************************************************!*\
50341  !*** ./node_modules/react-overlays/lib/ModalManager.js ***!
50342  \*********************************************************/
50343/***/ ((module, exports, __webpack_require__) => {
50344
50345"use strict";
50346
50347
50348exports.__esModule = true;
50349
50350var _class = __webpack_require__(/*! dom-helpers/class */ "./node_modules/dom-helpers/class/index.js");
50351
50352var _class2 = _interopRequireDefault(_class);
50353
50354var _style = __webpack_require__(/*! dom-helpers/style */ "./node_modules/dom-helpers/style/index.js");
50355
50356var _style2 = _interopRequireDefault(_style);
50357
50358var _scrollbarSize = __webpack_require__(/*! dom-helpers/util/scrollbarSize */ "./node_modules/dom-helpers/util/scrollbarSize.js");
50359
50360var _scrollbarSize2 = _interopRequireDefault(_scrollbarSize);
50361
50362var _isOverflowing = __webpack_require__(/*! ./utils/isOverflowing */ "./node_modules/react-overlays/lib/utils/isOverflowing.js");
50363
50364var _isOverflowing2 = _interopRequireDefault(_isOverflowing);
50365
50366var _manageAriaHidden = __webpack_require__(/*! ./utils/manageAriaHidden */ "./node_modules/react-overlays/lib/utils/manageAriaHidden.js");
50367
50368function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50369
50370function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
50371
50372function findIndexOf(arr, cb) {
50373  var idx = -1;
50374  arr.some(function (d, i) {
50375    if (cb(d, i)) {
50376      idx = i;
50377      return true;
50378    }
50379  });
50380  return idx;
50381}
50382
50383function findContainer(data, modal) {
50384  return findIndexOf(data, function (d) {
50385    return d.modals.indexOf(modal) !== -1;
50386  });
50387}
50388
50389function setContainerStyle(state, container) {
50390  var style = { overflow: 'hidden' };
50391
50392  // we are only interested in the actual `style` here
50393  // becasue we will override it
50394  state.style = {
50395    overflow: container.style.overflow,
50396    paddingRight: container.style.paddingRight
50397  };
50398
50399  if (state.overflowing) {
50400    // use computed style, here to get the real padding
50401    // to add our scrollbar width
50402    style.paddingRight = parseInt((0, _style2.default)(container, 'paddingRight') || 0, 10) + (0, _scrollbarSize2.default)() + 'px';
50403  }
50404
50405  (0, _style2.default)(container, style);
50406}
50407
50408function removeContainerStyle(_ref, container) {
50409  var style = _ref.style;
50410
50411
50412  Object.keys(style).forEach(function (key) {
50413    return container.style[key] = style[key];
50414  });
50415}
50416/**
50417 * Proper state managment for containers and the modals in those containers.
50418 *
50419 * @internal Used by the Modal to ensure proper styling of containers.
50420 */
50421
50422var ModalManager = function ModalManager() {
50423  var _this = this;
50424
50425  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
50426      _ref2$hideSiblingNode = _ref2.hideSiblingNodes,
50427      hideSiblingNodes = _ref2$hideSiblingNode === undefined ? true : _ref2$hideSiblingNode,
50428      _ref2$handleContainer = _ref2.handleContainerOverflow,
50429      handleContainerOverflow = _ref2$handleContainer === undefined ? true : _ref2$handleContainer;
50430
50431  _classCallCheck(this, ModalManager);
50432
50433  this.add = function (modal, container, className) {
50434    var modalIdx = _this.modals.indexOf(modal);
50435    var containerIdx = _this.containers.indexOf(container);
50436
50437    if (modalIdx !== -1) {
50438      return modalIdx;
50439    }
50440
50441    modalIdx = _this.modals.length;
50442    _this.modals.push(modal);
50443
50444    if (_this.hideSiblingNodes) {
50445      (0, _manageAriaHidden.hideSiblings)(container, modal.modalNode);
50446    }
50447
50448    if (containerIdx !== -1) {
50449      _this.data[containerIdx].modals.push(modal);
50450      return modalIdx;
50451    }
50452
50453    var data = {
50454      modals: [modal],
50455      //right now only the first modal of a container will have its classes applied
50456      classes: className ? className.split(/\s+/) : [],
50457
50458      overflowing: (0, _isOverflowing2.default)(container)
50459    };
50460
50461    if (_this.handleContainerOverflow) {
50462      setContainerStyle(data, container);
50463    }
50464
50465    data.classes.forEach(_class2.default.addClass.bind(null, container));
50466
50467    _this.containers.push(container);
50468    _this.data.push(data);
50469
50470    return modalIdx;
50471  };
50472
50473  this.remove = function (modal) {
50474    var modalIdx = _this.modals.indexOf(modal);
50475
50476    if (modalIdx === -1) {
50477      return;
50478    }
50479
50480    var containerIdx = findContainer(_this.data, modal);
50481    var data = _this.data[containerIdx];
50482    var container = _this.containers[containerIdx];
50483
50484    data.modals.splice(data.modals.indexOf(modal), 1);
50485
50486    _this.modals.splice(modalIdx, 1);
50487
50488    // if that was the last modal in a container,
50489    // clean up the container
50490    if (data.modals.length === 0) {
50491      data.classes.forEach(_class2.default.removeClass.bind(null, container));
50492
50493      if (_this.handleContainerOverflow) {
50494        removeContainerStyle(data, container);
50495      }
50496
50497      if (_this.hideSiblingNodes) {
50498        (0, _manageAriaHidden.showSiblings)(container, modal.modalNode);
50499      }
50500      _this.containers.splice(containerIdx, 1);
50501      _this.data.splice(containerIdx, 1);
50502    } else if (_this.hideSiblingNodes) {
50503      //otherwise make sure the next top modal is visible to a SR
50504      (0, _manageAriaHidden.ariaHidden)(false, data.modals[data.modals.length - 1].modalNode);
50505    }
50506  };
50507
50508  this.isTopModal = function (modal) {
50509    return !!_this.modals.length && _this.modals[_this.modals.length - 1] === modal;
50510  };
50511
50512  this.hideSiblingNodes = hideSiblingNodes;
50513  this.handleContainerOverflow = handleContainerOverflow;
50514  this.modals = [];
50515  this.containers = [];
50516  this.data = [];
50517};
50518
50519exports["default"] = ModalManager;
50520module.exports = exports['default'];
50521
50522/***/ }),
50523
vendor: 5,615 bytes, lines 50524-50661
50524/***/ "./node_modules/react-overlays/lib/Portal.js":
50525/*!***************************************************!*\
50526  !*** ./node_modules/react-overlays/lib/Portal.js ***!
50527  \***************************************************/
50528/***/ ((module, exports, __webpack_require__) => {
50529
50530"use strict";
50531
50532
50533exports.__esModule = true;
50534
50535var _inDOM = __webpack_require__(/*! dom-helpers/util/inDOM */ "./node_modules/dom-helpers/util/inDOM.js");
50536
50537var _inDOM2 = _interopRequireDefault(_inDOM);
50538
50539var _propTypes = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
50540
50541var _propTypes2 = _interopRequireDefault(_propTypes);
50542
50543var _componentOrElement = __webpack_require__(/*! prop-types-extra/lib/componentOrElement */ "./node_modules/prop-types-extra/lib/componentOrElement.js");
50544
50545var _componentOrElement2 = _interopRequireDefault(_componentOrElement);
50546
50547var _react = __webpack_require__(/*! react */ "./node_modules/react/index.js");
50548
50549var _react2 = _interopRequireDefault(_react);
50550
50551var _reactDom = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
50552
50553var _reactDom2 = _interopRequireDefault(_reactDom);
50554
50555var _getContainer = __webpack_require__(/*! ./utils/getContainer */ "./node_modules/react-overlays/lib/utils/getContainer.js");
50556
50557var _getContainer2 = _interopRequireDefault(_getContainer);
50558
50559var _ownerDocument = __webpack_require__(/*! ./utils/ownerDocument */ "./node_modules/react-overlays/lib/utils/ownerDocument.js");
50560
50561var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
50562
50563var _LegacyPortal = __webpack_require__(/*! ./LegacyPortal */ "./node_modules/react-overlays/lib/LegacyPortal.js");
50564
50565var _LegacyPortal2 = _interopRequireDefault(_LegacyPortal);
50566
50567function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50568
50569function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
50570
50571function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
50572
50573function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
50574
50575/**
50576 * The `<Portal/>` component renders its children into a new "subtree" outside of current component hierarchy.
50577 * You can think of it as a declarative `appendChild()`, or jQuery's `$.fn.appendTo()`.
50578 * The children of `<Portal/>` component will be appended to the `container` specified.
50579 */
50580var Portal = function (_React$Component) {
50581  _inherits(Portal, _React$Component);
50582
50583  function Portal() {
50584    var _temp, _this, _ret;
50585
50586    _classCallCheck(this, Portal);
50587
50588    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
50589      args[_key] = arguments[_key];
50590    }
50591
50592    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.getMountNode = function () {
50593      return _this._portalContainerNode;
50594    }, _temp), _possibleConstructorReturn(_this, _ret);
50595  }
50596
50597  Portal.prototype.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {
50598    if (!_inDOM2.default) {
50599      return;
50600    }
50601
50602    var container = this.props.container;
50603
50604    if (typeof container === 'function') {
50605      container = container();
50606    }
50607
50608    if (container && !_reactDom2.default.findDOMNode(container)) {
50609      // The container is a React component that has not yet been rendered.
50610      // Don't set the container node yet.
50611      return;
50612    }
50613
50614    this.setContainer(container);
50615  };
50616
50617  Portal.prototype.componentDidMount = function componentDidMount() {
50618    if (!this._portalContainerNode) {
50619      this.setContainer(this.props.container);
50620      this.forceUpdate(this.props.onRendered);
50621    } else if (this.props.onRendered) {
50622      this.props.onRendered();
50623    }
50624  };
50625
50626  Portal.prototype.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) {
50627    if (nextProps.container !== this.props.container) {
50628      this.setContainer(nextProps.container);
50629    }
50630  };
50631
50632  Portal.prototype.componentWillUnmount = function componentWillUnmount() {
50633    this._portalContainerNode = null;
50634  };
50635
50636  Portal.prototype.setContainer = function setContainer(container) {
50637    this._portalContainerNode = (0, _getContainer2.default)(container, (0, _ownerDocument2.default)(this).body);
50638  };
50639
50640  Portal.prototype.render = function render() {
50641    return this.props.children && this._portalContainerNode ? _reactDom2.default.createPortal(this.props.children, this._portalContainerNode) : null;
50642  };
50643
50644  return Portal;
50645}(_react2.default.Component);
50646
50647Portal.displayName = 'Portal';
50648Portal.propTypes = {
50649  /**
50650   * A Node, Component instance, or function that returns either. The `container` will have the Portal children
50651   * appended to it.
50652   */
50653  container: _propTypes2.default.oneOfType([_componentOrElement2.default, _propTypes2.default.func]),
50654
50655  onRendered: _propTypes2.default.func
50656};
50657exports["default"] = _reactDom2.default.createPortal ? Portal : _LegacyPortal2.default;
50658module.exports = exports['default'];
50659
50660/***/ }),
50661
vendor: 2,284 bytes, lines 50662-50720
50662/***/ "./node_modules/react-overlays/lib/RefHolder.js":
50663/*!******************************************************!*\
50664  !*** ./node_modules/react-overlays/lib/RefHolder.js ***!
50665  \******************************************************/
50666/***/ ((module, exports, __webpack_require__) => {
50667
50668"use strict";
50669
50670
50671exports.__esModule = true;
50672
50673var _propTypes = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
50674
50675var _propTypes2 = _interopRequireDefault(_propTypes);
50676
50677var _react = __webpack_require__(/*! react */ "./node_modules/react/index.js");
50678
50679var _react2 = _interopRequireDefault(_react);
50680
50681function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50682
50683function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
50684
50685function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
50686
50687function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
50688
50689var propTypes = {
50690  children: _propTypes2.default.node
50691};
50692
50693/**
50694 * Internal helper component to allow attaching a non-conflicting ref to a
50695 * child element that may not accept refs.
50696 */
50697
50698var RefHolder = function (_React$Component) {
50699  _inherits(RefHolder, _React$Component);
50700
50701  function RefHolder() {
50702    _classCallCheck(this, RefHolder);
50703
50704    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
50705  }
50706
50707  RefHolder.prototype.render = function render() {
50708    return this.props.children;
50709  };
50710
50711  return RefHolder;
50712}(_react2.default.Component);
50713
50714RefHolder.propTypes = propTypes;
50715
50716exports["default"] = RefHolder;
50717module.exports = exports['default'];
50718
50719/***/ }),
50720
vendor: 1,056 bytes, lines 50721-50755
50721/***/ "./node_modules/react-overlays/lib/utils/addEventListener.js":
50722/*!*******************************************************************!*\
50723  !*** ./node_modules/react-overlays/lib/utils/addEventListener.js ***!
50724  \*******************************************************************/
50725/***/ ((module, exports, __webpack_require__) => {
50726
50727"use strict";
50728
50729
50730exports.__esModule = true;
50731
50732exports["default"] = function (node, event, handler, capture) {
50733  (0, _on2.default)(node, event, handler, capture);
50734
50735  return {
50736    remove: function remove() {
50737      (0, _off2.default)(node, event, handler, capture);
50738    }
50739  };
50740};
50741
50742var _on = __webpack_require__(/*! dom-helpers/events/on */ "./node_modules/dom-helpers/events/on.js");
50743
50744var _on2 = _interopRequireDefault(_on);
50745
50746var _off = __webpack_require__(/*! dom-helpers/events/off */ "./node_modules/dom-helpers/events/off.js");
50747
50748var _off2 = _interopRequireDefault(_off);
50749
50750function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50751
50752module.exports = exports['default'];
50753
50754/***/ }),
50755
vendor: 1,176 bytes, lines 50756-50794
50756/***/ "./node_modules/react-overlays/lib/utils/addFocusListener.js":
50757/*!*******************************************************************!*\
50758  !*** ./node_modules/react-overlays/lib/utils/addFocusListener.js ***!
50759  \*******************************************************************/
50760/***/ ((module, exports) => {
50761
50762"use strict";
50763
50764
50765exports.__esModule = true;
50766exports["default"] = addFocusListener;
50767/**
50768 * Firefox doesn't have a focusin event so using capture is easiest way to get bubbling
50769 * IE8 can't do addEventListener, but does have onfocusin, so we use that in ie8
50770 *
50771 * We only allow one Listener at a time to avoid stack overflows
50772 */
50773function addFocusListener(handler) {
50774  var useFocusin = !document.addEventListener;
50775  var remove = void 0;
50776
50777  if (useFocusin) {
50778    document.attachEvent('onfocusin', handler);
50779    remove = function remove() {
50780      return document.detachEvent('onfocusin', handler);
50781    };
50782  } else {
50783    document.addEventListener('focus', handler, true);
50784    remove = function remove() {
50785      return document.removeEventListener('focus', handler, true);
50786    };
50787  }
50788
50789  return { remove: remove };
50790}
50791module.exports = exports['default'];
50792
50793/***/ }),
50794
vendor: 893 bytes, lines 50795-50820
50795/***/ "./node_modules/react-overlays/lib/utils/getContainer.js":
50796/*!***************************************************************!*\
50797  !*** ./node_modules/react-overlays/lib/utils/getContainer.js ***!
50798  \***************************************************************/
50799/***/ ((module, exports, __webpack_require__) => {
50800
50801"use strict";
50802
50803
50804exports.__esModule = true;
50805exports["default"] = getContainer;
50806
50807var _reactDom = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
50808
50809var _reactDom2 = _interopRequireDefault(_reactDom);
50810
50811function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50812
50813function getContainer(container, defaultContainer) {
50814  container = typeof container === 'function' ? container() : container;
50815  return _reactDom2.default.findDOMNode(container) || defaultContainer;
50816}
50817module.exports = exports['default'];
50818
50819/***/ }),
50820
vendor: 1,617 bytes, lines 50821-50869
50821/***/ "./node_modules/react-overlays/lib/utils/isOverflowing.js":
50822/*!****************************************************************!*\
50823  !*** ./node_modules/react-overlays/lib/utils/isOverflowing.js ***!
50824  \****************************************************************/
50825/***/ ((module, exports, __webpack_require__) => {
50826
50827"use strict";
50828
50829
50830exports.__esModule = true;
50831exports["default"] = isOverflowing;
50832
50833var _isWindow = __webpack_require__(/*! dom-helpers/query/isWindow */ "./node_modules/dom-helpers/query/isWindow.js");
50834
50835var _isWindow2 = _interopRequireDefault(_isWindow);
50836
50837var _ownerDocument = __webpack_require__(/*! dom-helpers/ownerDocument */ "./node_modules/dom-helpers/ownerDocument.js");
50838
50839var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
50840
50841function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50842
50843function isBody(node) {
50844  return node && node.tagName.toLowerCase() === 'body';
50845}
50846
50847function bodyIsOverflowing(node) {
50848  var doc = (0, _ownerDocument2.default)(node);
50849  var win = (0, _isWindow2.default)(doc);
50850  var fullWidth = win.innerWidth;
50851
50852  // Support: ie8, no innerWidth
50853  if (!fullWidth) {
50854    var documentElementRect = doc.documentElement.getBoundingClientRect();
50855    fullWidth = documentElementRect.right - Math.abs(documentElementRect.left);
50856  }
50857
50858  return doc.body.clientWidth < fullWidth;
50859}
50860
50861function isOverflowing(container) {
50862  var win = (0, _isWindow2.default)(container);
50863
50864  return win || isBody(container) ? bodyIsOverflowing(container) : container.scrollHeight > container.clientHeight;
50865}
50866module.exports = exports['default'];
50867
50868/***/ }),
50869
vendor: 1,430 bytes, lines 50870-50926
50870/***/ "./node_modules/react-overlays/lib/utils/manageAriaHidden.js":
50871/*!*******************************************************************!*\
50872  !*** ./node_modules/react-overlays/lib/utils/manageAriaHidden.js ***!
50873  \*******************************************************************/
50874/***/ ((__unused_webpack_module, exports) => {
50875
50876"use strict";
50877
50878
50879exports.__esModule = true;
50880exports.ariaHidden = ariaHidden;
50881exports.hideSiblings = hideSiblings;
50882exports.showSiblings = showSiblings;
50883
50884var BLACKLIST = ['template', 'script', 'style'];
50885
50886var isHidable = function isHidable(_ref) {
50887  var nodeType = _ref.nodeType,
50888      tagName = _ref.tagName;
50889  return nodeType === 1 && BLACKLIST.indexOf(tagName.toLowerCase()) === -1;
50890};
50891
50892var siblings = function siblings(container, mount, cb) {
50893  mount = [].concat(mount);
50894
50895  [].forEach.call(container.children, function (node) {
50896    if (mount.indexOf(node) === -1 && isHidable(node)) {
50897      cb(node);
50898    }
50899  });
50900};
50901
50902function ariaHidden(show, node) {
50903  if (!node) {
50904    return;
50905  }
50906  if (show) {
50907    node.setAttribute('aria-hidden', 'true');
50908  } else {
50909    node.removeAttribute('aria-hidden');
50910  }
50911}
50912
50913function hideSiblings(container, mountNode) {
50914  siblings(container, mountNode, function (node) {
50915    return ariaHidden(true, node);
50916  });
50917}
50918
50919function showSiblings(container, mountNode) {
50920  siblings(container, mountNode, function (node) {
50921    return ariaHidden(false, node);
50922  });
50923}
50924
50925/***/ }),
50926
vendor: 996 bytes, lines 50927-50955
50927/***/ "./node_modules/react-overlays/lib/utils/ownerDocument.js":
50928/*!****************************************************************!*\
50929  !*** ./node_modules/react-overlays/lib/utils/ownerDocument.js ***!
50930  \****************************************************************/
50931/***/ ((module, exports, __webpack_require__) => {
50932
50933"use strict";
50934
50935
50936exports.__esModule = true;
50937
50938exports["default"] = function (componentOrElement) {
50939  return (0, _ownerDocument2.default)(_reactDom2.default.findDOMNode(componentOrElement));
50940};
50941
50942var _reactDom = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
50943
50944var _reactDom2 = _interopRequireDefault(_reactDom);
50945
50946var _ownerDocument = __webpack_require__(/*! dom-helpers/ownerDocument */ "./node_modules/dom-helpers/ownerDocument.js");
50947
50948var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
50949
50950function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50951
50952module.exports = exports['default'];
50953
50954/***/ }),
50955
vendor: 18,336 bytes, lines 50956-51574
50956/***/ "./node_modules/react-transition-group/Transition.js":
50957/*!***********************************************************!*\
50958  !*** ./node_modules/react-transition-group/Transition.js ***!
50959  \***********************************************************/
50960/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
50961
50962"use strict";
50963
50964
50965exports.__esModule = true;
50966exports["default"] = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0;
50967
50968var PropTypes = _interopRequireWildcard(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));
50969
50970var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
50971
50972var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js"));
50973
50974var _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js");
50975
50976var _PropTypes = __webpack_require__(/*! ./utils/PropTypes */ "./node_modules/react-transition-group/utils/PropTypes.js");
50977
50978function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50979
50980function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
50981
50982function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
50983
50984function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
50985
50986var UNMOUNTED = 'unmounted';
50987exports.UNMOUNTED = UNMOUNTED;
50988var EXITED = 'exited';
50989exports.EXITED = EXITED;
50990var ENTERING = 'entering';
50991exports.ENTERING = ENTERING;
50992var ENTERED = 'entered';
50993exports.ENTERED = ENTERED;
50994var EXITING = 'exiting';
50995/**
50996 * The Transition component lets you describe a transition from one component
50997 * state to another _over time_ with a simple declarative API. Most commonly
50998 * it's used to animate the mounting and unmounting of a component, but can also
50999 * be used to describe in-place transition states as well.
51000 *
51001 * ---
51002 *
51003 * **Note**: `Transition` is a platform-agnostic base component. If you're using
51004 * transitions in CSS, you'll probably want to use
51005 * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
51006 * instead. It inherits all the features of `Transition`, but contains
51007 * additional features necessary to play nice with CSS transitions (hence the
51008 * name of the component).
51009 *
51010 * ---
51011 *
51012 * By default the `Transition` component does not alter the behavior of the
51013 * component it renders, it only tracks "enter" and "exit" states for the
51014 * components. It's up to you to give meaning and effect to those states. For
51015 * example we can add styles to a component when it enters or exits:
51016 *
51017 * ```jsx
51018 * import { Transition } from 'react-transition-group';
51019 *
51020 * const duration = 300;
51021 *
51022 * const defaultStyle = {
51023 *   transition: `opacity ${duration}ms ease-in-out`,
51024 *   opacity: 0,
51025 * }
51026 *
51027 * const transitionStyles = {
51028 *   entering: { opacity: 0 },
51029 *   entered:  { opacity: 1 },
51030 * };
51031 *
51032 * const Fade = ({ in: inProp }) => (
51033 *   <Transition in={inProp} timeout={duration}>
51034 *     {state => (
51035 *       <div style={{
51036 *         ...defaultStyle,
51037 *         ...transitionStyles[state]
51038 *       }}>
51039 *         I'm a fade Transition!
51040 *       </div>
51041 *     )}
51042 *   </Transition>
51043 * );
51044 * ```
51045 *
51046 * There are 4 main states a Transition can be in:
51047 *  - `'entering'`
51048 *  - `'entered'`
51049 *  - `'exiting'`
51050 *  - `'exited'`
51051 *
51052 * Transition state is toggled via the `in` prop. When `true` the component
51053 * begins the "Enter" stage. During this stage, the component will shift from
51054 * its current transition state, to `'entering'` for the duration of the
51055 * transition and then to the `'entered'` stage once it's complete. Let's take
51056 * the following example (we'll use the
51057 * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
51058 *
51059 * ```jsx
51060 * function App() {
51061 *   const [inProp, setInProp] = useState(false);
51062 *   return (
51063 *     <div>
51064 *       <Transition in={inProp} timeout={500}>
51065 *         {state => (
51066 *           // ...
51067 *         )}
51068 *       </Transition>
51069 *       <button onClick={() => setInProp(true)}>
51070 *         Click to Enter
51071 *       </button>
51072 *     </div>
51073 *   );
51074 * }
51075 * ```
51076 *
51077 * When the button is clicked the component will shift to the `'entering'` state
51078 * and stay there for 500ms (the value of `timeout`) before it finally switches
51079 * to `'entered'`.
51080 *
51081 * When `in` is `false` the same thing happens except the state moves from
51082 * `'exiting'` to `'exited'`.
51083 */
51084
51085exports.EXITING = EXITING;
51086
51087var Transition =
51088/*#__PURE__*/
51089function (_React$Component) {
51090  _inheritsLoose(Transition, _React$Component);
51091
51092  function Transition(props, context) {
51093    var _this;
51094
51095    _this = _React$Component.call(this, props, context) || this;
51096    var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears
51097
51098    var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
51099    var initialStatus;
51100    _this.appearStatus = null;
51101
51102    if (props.in) {
51103      if (appear) {
51104        initialStatus = EXITED;
51105        _this.appearStatus = ENTERING;
51106      } else {
51107        initialStatus = ENTERED;
51108      }
51109    } else {
51110      if (props.unmountOnExit || props.mountOnEnter) {
51111        initialStatus = UNMOUNTED;
51112      } else {
51113        initialStatus = EXITED;
51114      }
51115    }
51116
51117    _this.state = {
51118      status: initialStatus
51119    };
51120    _this.nextCallback = null;
51121    return _this;
51122  }
51123
51124  var _proto = Transition.prototype;
51125
51126  _proto.getChildContext = function getChildContext() {
51127    return {
51128      transitionGroup: null // allows for nested Transitions
51129
51130    };
51131  };
51132
51133  Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
51134    var nextIn = _ref.in;
51135
51136    if (nextIn && prevState.status === UNMOUNTED) {
51137      return {
51138        status: EXITED
51139      };
51140    }
51141
51142    return null;
51143  }; // getSnapshotBeforeUpdate(prevProps) {
51144  //   let nextStatus = null
51145  //   if (prevProps !== this.props) {
51146  //     const { status } = this.state
51147  //     if (this.props.in) {
51148  //       if (status !== ENTERING && status !== ENTERED) {
51149  //         nextStatus = ENTERING
51150  //       }
51151  //     } else {
51152  //       if (status === ENTERING || status === ENTERED) {
51153  //         nextStatus = EXITING
51154  //       }
51155  //     }
51156  //   }
51157  //   return { nextStatus }
51158  // }
51159
51160
51161  _proto.componentDidMount = function componentDidMount() {
51162    this.updateStatus(true, this.appearStatus);
51163  };
51164
51165  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
51166    var nextStatus = null;
51167
51168    if (prevProps !== this.props) {
51169      var status = this.state.status;
51170
51171      if (this.props.in) {
51172        if (status !== ENTERING && status !== ENTERED) {
51173          nextStatus = ENTERING;
51174        }
51175      } else {
51176        if (status === ENTERING || status === ENTERED) {
51177          nextStatus = EXITING;
51178        }
51179      }
51180    }
51181
51182    this.updateStatus(false, nextStatus);
51183  };
51184
51185  _proto.componentWillUnmount = function componentWillUnmount() {
51186    this.cancelNextCallback();
51187  };
51188
51189  _proto.getTimeouts = function getTimeouts() {
51190    var timeout = this.props.timeout;
51191    var exit, enter, appear;
51192    exit = enter = appear = timeout;
51193
51194    if (timeout != null && typeof timeout !== 'number') {
51195      exit = timeout.exit;
51196      enter = timeout.enter; // TODO: remove fallback for next major
51197
51198      appear = timeout.appear !== undefined ? timeout.appear : enter;
51199    }
51200
51201    return {
51202      exit: exit,
51203      enter: enter,
51204      appear: appear
51205    };
51206  };
51207
51208  _proto.updateStatus = function updateStatus(mounting, nextStatus) {
51209    if (mounting === void 0) {
51210      mounting = false;
51211    }
51212
51213    if (nextStatus !== null) {
51214      // nextStatus will always be ENTERING or EXITING.
51215      this.cancelNextCallback();
51216
51217      var node = _reactDom.default.findDOMNode(this);
51218
51219      if (nextStatus === ENTERING) {
51220        this.performEnter(node, mounting);
51221      } else {
51222        this.performExit(node);
51223      }
51224    } else if (this.props.unmountOnExit && this.state.status === EXITED) {
51225      this.setState({
51226        status: UNMOUNTED
51227      });
51228    }
51229  };
51230
51231  _proto.performEnter = function performEnter(node, mounting) {
51232    var _this2 = this;
51233
51234    var enter = this.props.enter;
51235    var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;
51236    var timeouts = this.getTimeouts();
51237    var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
51238    // if we are mounting and running this it means appear _must_ be set
51239
51240    if (!mounting && !enter) {
51241      this.safeSetState({
51242        status: ENTERED
51243      }, function () {
51244        _this2.props.onEntered(node);
51245      });
51246      return;
51247    }
51248
51249    this.props.onEnter(node, appearing);
51250    this.safeSetState({
51251      status: ENTERING
51252    }, function () {
51253      _this2.props.onEntering(node, appearing);
51254
51255      _this2.onTransitionEnd(node, enterTimeout, function () {
51256        _this2.safeSetState({
51257          status: ENTERED
51258        }, function () {
51259          _this2.props.onEntered(node, appearing);
51260        });
51261      });
51262    });
51263  };
51264
51265  _proto.performExit = function performExit(node) {
51266    var _this3 = this;
51267
51268    var exit = this.props.exit;
51269    var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED
51270
51271    if (!exit) {
51272      this.safeSetState({
51273        status: EXITED
51274      }, function () {
51275        _this3.props.onExited(node);
51276      });
51277      return;
51278    }
51279
51280    this.props.onExit(node);
51281    this.safeSetState({
51282      status: EXITING
51283    }, function () {
51284      _this3.props.onExiting(node);
51285
51286      _this3.onTransitionEnd(node, timeouts.exit, function () {
51287        _this3.safeSetState({
51288          status: EXITED
51289        }, function () {
51290          _this3.props.onExited(node);
51291        });
51292      });
51293    });
51294  };
51295
51296  _proto.cancelNextCallback = function cancelNextCallback() {
51297    if (this.nextCallback !== null) {
51298      this.nextCallback.cancel();
51299      this.nextCallback = null;
51300    }
51301  };
51302
51303  _proto.safeSetState = function safeSetState(nextState, callback) {
51304    // This shouldn't be necessary, but there are weird race conditions with
51305    // setState callbacks and unmounting in testing, so always make sure that
51306    // we can cancel any pending setState callbacks after we unmount.
51307    callback = this.setNextCallback(callback);
51308    this.setState(nextState, callback);
51309  };
51310
51311  _proto.setNextCallback = function setNextCallback(callback) {
51312    var _this4 = this;
51313
51314    var active = true;
51315
51316    this.nextCallback = function (event) {
51317      if (active) {
51318        active = false;
51319        _this4.nextCallback = null;
51320        callback(event);
51321      }
51322    };
51323
51324    this.nextCallback.cancel = function () {
51325      active = false;
51326    };
51327
51328    return this.nextCallback;
51329  };
51330
51331  _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {
51332    this.setNextCallback(handler);
51333    var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
51334
51335    if (!node || doesNotHaveTimeoutOrListener) {
51336      setTimeout(this.nextCallback, 0);
51337      return;
51338    }
51339
51340    if (this.props.addEndListener) {
51341      this.props.addEndListener(node, this.nextCallback);
51342    }
51343
51344    if (timeout != null) {
51345      setTimeout(this.nextCallback, timeout);
51346    }
51347  };
51348
51349  _proto.render = function render() {
51350    var status = this.state.status;
51351
51352    if (status === UNMOUNTED) {
51353      return null;
51354    }
51355
51356    var _this$props = this.props,
51357        children = _this$props.children,
51358        childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]); // filter props for Transtition
51359
51360
51361    delete childProps.in;
51362    delete childProps.mountOnEnter;
51363    delete childProps.unmountOnExit;
51364    delete childProps.appear;
51365    delete childProps.enter;
51366    delete childProps.exit;
51367    delete childProps.timeout;
51368    delete childProps.addEndListener;
51369    delete childProps.onEnter;
51370    delete childProps.onEntering;
51371    delete childProps.onEntered;
51372    delete childProps.onExit;
51373    delete childProps.onExiting;
51374    delete childProps.onExited;
51375
51376    if (typeof children === 'function') {
51377      return children(status, childProps);
51378    }
51379
51380    var child = _react.default.Children.only(children);
51381
51382    return _react.default.cloneElement(child, childProps);
51383  };
51384
51385  return Transition;
51386}(_react.default.Component);
51387
51388Transition.contextTypes = {
51389  transitionGroup: PropTypes.object
51390};
51391Transition.childContextTypes = {
51392  transitionGroup: function transitionGroup() {}
51393};
51394Transition.propTypes =  true ? {
51395  /**
51396   * A `function` child can be used instead of a React element. This function is
51397   * called with the current transition status (`'entering'`, `'entered'`,
51398   * `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context
51399   * specific props to a component.
51400   *
51401   * ```jsx
51402   * <Transition in={this.state.in} timeout={150}>
51403   *   {state => (
51404   *     <MyComponent className={`fade fade-${state}`} />
51405   *   )}
51406   * </Transition>
51407   * ```
51408   */
51409  children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
51410
51411  /**
51412   * Show the component; triggers the enter or exit states
51413   */
51414  in: PropTypes.bool,
51415
51416  /**
51417   * By default the child component is mounted immediately along with
51418   * the parent `Transition` component. If you want to "lazy mount" the component on the
51419   * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
51420   * mounted, even on "exited", unless you also specify `unmountOnExit`.
51421   */
51422  mountOnEnter: PropTypes.bool,
51423
51424  /**
51425   * By default the child component stays mounted after it reaches the `'exited'` state.
51426   * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
51427   */
51428  unmountOnExit: PropTypes.bool,
51429
51430  /**
51431   * Normally a component is not transitioned if it is shown when the `<Transition>` component mounts.
51432   * If you want to transition on the first mount set `appear` to `true`, and the
51433   * component will transition in as soon as the `<Transition>` mounts.
51434   *
51435   * > Note: there are no specific "appear" states. `appear` only adds an additional `enter` transition.
51436   */
51437  appear: PropTypes.bool,
51438
51439  /**
51440   * Enable or disable enter transitions.
51441   */
51442  enter: PropTypes.bool,
51443
51444  /**
51445   * Enable or disable exit transitions.
51446   */
51447  exit: PropTypes.bool,
51448
51449  /**
51450   * The duration of the transition, in milliseconds.
51451   * Required unless `addEndListener` is provided.
51452   *
51453   * You may specify a single timeout for all transitions:
51454   *
51455   * ```jsx
51456   * timeout={500}
51457   * ```
51458   *
51459   * or individually:
51460   *
51461   * ```jsx
51462   * timeout={{
51463   *  appear: 500,
51464   *  enter: 300,
51465   *  exit: 500,
51466   * }}
51467   * ```
51468   *
51469   * - `appear` defaults to the value of `enter`
51470   * - `enter` defaults to `0`
51471   * - `exit` defaults to `0`
51472   *
51473   * @type {number | { enter?: number, exit?: number, appear?: number }}
51474   */
51475  timeout: function timeout(props) {
51476    var pt = _PropTypes.timeoutsShape;
51477    if (!props.addEndListener) pt = pt.isRequired;
51478
51479    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
51480      args[_key - 1] = arguments[_key];
51481    }
51482
51483    return pt.apply(void 0, [props].concat(args));
51484  },
51485
51486  /**
51487   * Add a custom transition end trigger. Called with the transitioning
51488   * DOM node and a `done` callback. Allows for more fine grained transition end
51489   * logic. **Note:** Timeouts are still used as a fallback if provided.
51490   *
51491   * ```jsx
51492   * addEndListener={(node, done) => {
51493   *   // use the css transitionend event to mark the finish of a transition
51494   *   node.addEventListener('transitionend', done, false);
51495   * }}
51496   * ```
51497   */
51498  addEndListener: PropTypes.func,
51499
51500  /**
51501   * Callback fired before the "entering" status is applied. An extra parameter
51502   * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
51503   *
51504   * @type Function(node: HtmlElement, isAppearing: bool) -> void
51505   */
51506  onEnter: PropTypes.func,
51507
51508  /**
51509   * Callback fired after the "entering" status is applied. An extra parameter
51510   * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
51511   *
51512   * @type Function(node: HtmlElement, isAppearing: bool)
51513   */
51514  onEntering: PropTypes.func,
51515
51516  /**
51517   * Callback fired after the "entered" status is applied. An extra parameter
51518   * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
51519   *
51520   * @type Function(node: HtmlElement, isAppearing: bool) -> void
51521   */
51522  onEntered: PropTypes.func,
51523
51524  /**
51525   * Callback fired before the "exiting" status is applied.
51526   *
51527   * @type Function(node: HtmlElement) -> void
51528   */
51529  onExit: PropTypes.func,
51530
51531  /**
51532   * Callback fired after the "exiting" status is applied.
51533   *
51534   * @type Function(node: HtmlElement) -> void
51535   */
51536  onExiting: PropTypes.func,
51537
51538  /**
51539   * Callback fired after the "exited" status is applied.
51540   *
51541   * @type Function(node: HtmlElement) -> void
51542   */
51543  onExited: PropTypes.func // Name the function so it is clearer in the documentation
51544
51545} : 0;
51546
51547function noop() {}
51548
51549Transition.defaultProps = {
51550  in: false,
51551  mountOnEnter: false,
51552  unmountOnExit: false,
51553  appear: false,
51554  enter: true,
51555  exit: true,
51556  onEnter: noop,
51557  onEntering: noop,
51558  onEntered: noop,
51559  onExit: noop,
51560  onExiting: noop,
51561  onExited: noop
51562};
51563Transition.UNMOUNTED = 0;
51564Transition.EXITED = 1;
51565Transition.ENTERING = 2;
51566Transition.ENTERED = 3;
51567Transition.EXITING = 4;
51568
51569var _default = (0, _reactLifecyclesCompat.polyfill)(Transition);
51570
51571exports["default"] = _default;
51572
51573/***/ }),
51574
vendor: 1,490 bytes, lines 51575-51612
51575/***/ "./node_modules/react-transition-group/utils/PropTypes.js":
51576/*!****************************************************************!*\
51577  !*** ./node_modules/react-transition-group/utils/PropTypes.js ***!
51578  \****************************************************************/
51579/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
51580
51581"use strict";
51582
51583
51584exports.__esModule = true;
51585exports.classNamesShape = exports.timeoutsShape = void 0;
51586
51587var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));
51588
51589function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
51590
51591var timeoutsShape =  true ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
51592  enter: _propTypes.default.number,
51593  exit: _propTypes.default.number,
51594  appear: _propTypes.default.number
51595}).isRequired]) : 0;
51596exports.timeoutsShape = timeoutsShape;
51597var classNamesShape =  true ? _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
51598  enter: _propTypes.default.string,
51599  exit: _propTypes.default.string,
51600  active: _propTypes.default.string
51601}), _propTypes.default.shape({
51602  enter: _propTypes.default.string,
51603  enterDone: _propTypes.default.string,
51604  enterActive: _propTypes.default.string,
51605  exit: _propTypes.default.string,
51606  exitDone: _propTypes.default.string,
51607  exitActive: _propTypes.default.string
51608})]) : 0;
51609exports.classNamesShape = classNamesShape;
51610
51611/***/ }),
51612
vendor: 72,479 bytes, lines 51613-53956
51613/***/ "./node_modules/react/cjs/react.development.js":
51614/*!*****************************************************!*\
51615  !*** ./node_modules/react/cjs/react.development.js ***!
51616  \*****************************************************/
51617/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
51618
51619"use strict";
51620/** @license React v17.0.2
51621 * react.development.js
51622 *
51623 * Copyright (c) Facebook, Inc. and its affiliates.
51624 *
51625 * This source code is licensed under the MIT license found in the
51626 * LICENSE file in the root directory of this source tree.
51627 */
51628
51629
51630
51631if (true) {
51632  (function() {
51633'use strict';
51634
51635var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
51636
51637// TODO: this is special because it gets imported during build.
51638var ReactVersion = '17.0.2';
51639
51640// ATTENTION
51641// When adding new symbols to this file,
51642// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
51643// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
51644// nor polyfill, then a plain number is used for performance.
51645var REACT_ELEMENT_TYPE = 0xeac7;
51646var REACT_PORTAL_TYPE = 0xeaca;
51647exports.Fragment = 0xeacb;
51648exports.StrictMode = 0xeacc;
51649exports.Profiler = 0xead2;
51650var REACT_PROVIDER_TYPE = 0xeacd;
51651var REACT_CONTEXT_TYPE = 0xeace;
51652var REACT_FORWARD_REF_TYPE = 0xead0;
51653exports.Suspense = 0xead1;
51654var REACT_SUSPENSE_LIST_TYPE = 0xead8;
51655var REACT_MEMO_TYPE = 0xead3;
51656var REACT_LAZY_TYPE = 0xead4;
51657var REACT_BLOCK_TYPE = 0xead9;
51658var REACT_SERVER_BLOCK_TYPE = 0xeada;
51659var REACT_FUNDAMENTAL_TYPE = 0xead5;
51660var REACT_SCOPE_TYPE = 0xead7;
51661var REACT_OPAQUE_ID_TYPE = 0xeae0;
51662var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
51663var REACT_OFFSCREEN_TYPE = 0xeae2;
51664var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
51665
51666if (typeof Symbol === 'function' && Symbol.for) {
51667  var symbolFor = Symbol.for;
51668  REACT_ELEMENT_TYPE = symbolFor('react.element');
51669  REACT_PORTAL_TYPE = symbolFor('react.portal');
51670  exports.Fragment = symbolFor('react.fragment');
51671  exports.StrictMode = symbolFor('react.strict_mode');
51672  exports.Profiler = symbolFor('react.profiler');
51673  REACT_PROVIDER_TYPE = symbolFor('react.provider');
51674  REACT_CONTEXT_TYPE = symbolFor('react.context');
51675  REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
51676  exports.Suspense = symbolFor('react.suspense');
51677  REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
51678  REACT_MEMO_TYPE = symbolFor('react.memo');
51679  REACT_LAZY_TYPE = symbolFor('react.lazy');
51680  REACT_BLOCK_TYPE = symbolFor('react.block');
51681  REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
51682  REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
51683  REACT_SCOPE_TYPE = symbolFor('react.scope');
51684  REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
51685  REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
51686  REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
51687  REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
51688}
51689
51690var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
51691var FAUX_ITERATOR_SYMBOL = '@@iterator';
51692function getIteratorFn(maybeIterable) {
51693  if (maybeIterable === null || typeof maybeIterable !== 'object') {
51694    return null;
51695  }
51696
51697  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
51698
51699  if (typeof maybeIterator === 'function') {
51700    return maybeIterator;
51701  }
51702
51703  return null;
51704}
51705
51706/**
51707 * Keeps track of the current dispatcher.
51708 */
51709var ReactCurrentDispatcher = {
51710  /**
51711   * @internal
51712   * @type {ReactComponent}
51713   */
51714  current: null
51715};
51716
51717/**
51718 * Keeps track of the current batch's configuration such as how long an update
51719 * should suspend for if it needs to.
51720 */
51721var ReactCurrentBatchConfig = {
51722  transition: 0
51723};
51724
51725/**
51726 * Keeps track of the current owner.
51727 *
51728 * The current owner is the component who should own any components that are
51729 * currently being constructed.
51730 */
51731var ReactCurrentOwner = {
51732  /**
51733   * @internal
51734   * @type {ReactComponent}
51735   */
51736  current: null
51737};
51738
51739var ReactDebugCurrentFrame = {};
51740var currentExtraStackFrame = null;
51741function setExtraStackFrame(stack) {
51742  {
51743    currentExtraStackFrame = stack;
51744  }
51745}
51746
51747{
51748  ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
51749    {
51750      currentExtraStackFrame = stack;
51751    }
51752  }; // Stack implementation injected by the current renderer.
51753
51754
51755  ReactDebugCurrentFrame.getCurrentStack = null;
51756
51757  ReactDebugCurrentFrame.getStackAddendum = function () {
51758    var stack = ''; // Add an extra top frame while an element is being validated
51759
51760    if (currentExtraStackFrame) {
51761      stack += currentExtraStackFrame;
51762    } // Delegate to the injected renderer-specific implementation
51763
51764
51765    var impl = ReactDebugCurrentFrame.getCurrentStack;
51766
51767    if (impl) {
51768      stack += impl() || '';
51769    }
51770
51771    return stack;
51772  };
51773}
51774
51775/**
51776 * Used by act() to track whether you're inside an act() scope.
51777 */
51778var IsSomeRendererActing = {
51779  current: false
51780};
51781
51782var ReactSharedInternals = {
51783  ReactCurrentDispatcher: ReactCurrentDispatcher,
51784  ReactCurrentBatchConfig: ReactCurrentBatchConfig,
51785  ReactCurrentOwner: ReactCurrentOwner,
51786  IsSomeRendererActing: IsSomeRendererActing,
51787  // Used by renderers to avoid bundling object-assign twice in UMD bundles:
51788  assign: _assign
51789};
51790
51791{
51792  ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
51793}
51794
51795// by calls to these methods by a Babel plugin.
51796//
51797// In PROD (or in packages without access to React internals),
51798// they are left as they are instead.
51799
51800function warn(format) {
51801  {
51802    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
51803      args[_key - 1] = arguments[_key];
51804    }
51805
51806    printWarning('warn', format, args);
51807  }
51808}
51809function error(format) {
51810  {
51811    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
51812      args[_key2 - 1] = arguments[_key2];
51813    }
51814
51815    printWarning('error', format, args);
51816  }
51817}
51818
51819function printWarning(level, format, args) {
51820  // When changing this logic, you might want to also
51821  // update consoleWithStackDev.www.js as well.
51822  {
51823    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
51824    var stack = ReactDebugCurrentFrame.getStackAddendum();
51825
51826    if (stack !== '') {
51827      format += '%s';
51828      args = args.concat([stack]);
51829    }
51830
51831    var argsWithFormat = args.map(function (item) {
51832      return '' + item;
51833    }); // Careful: RN currently depends on this prefix
51834
51835    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
51836    // breaks IE9: https://github.com/facebook/react/issues/13610
51837    // eslint-disable-next-line react-internal/no-production-logging
51838
51839    Function.prototype.apply.call(console[level], console, argsWithFormat);
51840  }
51841}
51842
51843var didWarnStateUpdateForUnmountedComponent = {};
51844
51845function warnNoop(publicInstance, callerName) {
51846  {
51847    var _constructor = publicInstance.constructor;
51848    var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
51849    var warningKey = componentName + "." + callerName;
51850
51851    if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
51852      return;
51853    }
51854
51855    error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
51856
51857    didWarnStateUpdateForUnmountedComponent[warningKey] = true;
51858  }
51859}
51860/**
51861 * This is the abstract API for an update queue.
51862 */
51863
51864
51865var ReactNoopUpdateQueue = {
51866  /**
51867   * Checks whether or not this composite component is mounted.
51868   * @param {ReactClass} publicInstance The instance we want to test.
51869   * @return {boolean} True if mounted, false otherwise.
51870   * @protected
51871   * @final
51872   */
51873  isMounted: function (publicInstance) {
51874    return false;
51875  },
51876
51877  /**
51878   * Forces an update. This should only be invoked when it is known with
51879   * certainty that we are **not** in a DOM transaction.
51880   *
51881   * You may want to call this when you know that some deeper aspect of the
51882   * component's state has changed but `setState` was not called.
51883   *
51884   * This will not invoke `shouldComponentUpdate`, but it will invoke
51885   * `componentWillUpdate` and `componentDidUpdate`.
51886   *
51887   * @param {ReactClass} publicInstance The instance that should rerender.
51888   * @param {?function} callback Called after component is updated.
51889   * @param {?string} callerName name of the calling function in the public API.
51890   * @internal
51891   */
51892  enqueueForceUpdate: function (publicInstance, callback, callerName) {
51893    warnNoop(publicInstance, 'forceUpdate');
51894  },
51895
51896  /**
51897   * Replaces all of the state. Always use this or `setState` to mutate state.
51898   * You should treat `this.state` as immutable.
51899   *
51900   * There is no guarantee that `this.state` will be immediately updated, so
51901   * accessing `this.state` after calling this method may return the old value.
51902   *
51903   * @param {ReactClass} publicInstance The instance that should rerender.
51904   * @param {object} completeState Next state.
51905   * @param {?function} callback Called after component is updated.
51906   * @param {?string} callerName name of the calling function in the public API.
51907   * @internal
51908   */
51909  enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
51910    warnNoop(publicInstance, 'replaceState');
51911  },
51912
51913  /**
51914   * Sets a subset of the state. This only exists because _pendingState is
51915   * internal. This provides a merging strategy that is not available to deep
51916   * properties which is confusing. TODO: Expose pendingState or don't use it
51917   * during the merge.
51918   *
51919   * @param {ReactClass} publicInstance The instance that should rerender.
51920   * @param {object} partialState Next partial state to be merged with state.
51921   * @param {?function} callback Called after component is updated.
51922   * @param {?string} Name of the calling function in the public API.
51923   * @internal
51924   */
51925  enqueueSetState: function (publicInstance, partialState, callback, callerName) {
51926    warnNoop(publicInstance, 'setState');
51927  }
51928};
51929
51930var emptyObject = {};
51931
51932{
51933  Object.freeze(emptyObject);
51934}
51935/**
51936 * Base class helpers for the updating state of a component.
51937 */
51938
51939
51940function Component(props, context, updater) {
51941  this.props = props;
51942  this.context = context; // If a component has string refs, we will assign a different object later.
51943
51944  this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
51945  // renderer.
51946
51947  this.updater = updater || ReactNoopUpdateQueue;
51948}
51949
51950Component.prototype.isReactComponent = {};
51951/**
51952 * Sets a subset of the state. Always use this to mutate
51953 * state. You should treat `this.state` as immutable.
51954 *
51955 * There is no guarantee that `this.state` will be immediately updated, so
51956 * accessing `this.state` after calling this method may return the old value.
51957 *
51958 * There is no guarantee that calls to `setState` will run synchronously,
51959 * as they may eventually be batched together.  You can provide an optional
51960 * callback that will be executed when the call to setState is actually
51961 * completed.
51962 *
51963 * When a function is provided to setState, it will be called at some point in
51964 * the future (not synchronously). It will be called with the up to date
51965 * component arguments (state, props, context). These values can be different
51966 * from this.* because your function may be called after receiveProps but before
51967 * shouldComponentUpdate, and this new state, props, and context will not yet be
51968 * assigned to this.
51969 *
51970 * @param {object|function} partialState Next partial state or function to
51971 *        produce next partial state to be merged with current state.
51972 * @param {?function} callback Called after state is updated.
51973 * @final
51974 * @protected
51975 */
51976
51977Component.prototype.setState = function (partialState, callback) {
51978  if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
51979    {
51980      throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
51981    }
51982  }
51983
51984  this.updater.enqueueSetState(this, partialState, callback, 'setState');
51985};
51986/**
51987 * Forces an update. This should only be invoked when it is known with
51988 * certainty that we are **not** in a DOM transaction.
51989 *
51990 * You may want to call this when you know that some deeper aspect of the
51991 * component's state has changed but `setState` was not called.
51992 *
51993 * This will not invoke `shouldComponentUpdate`, but it will invoke
51994 * `componentWillUpdate` and `componentDidUpdate`.
51995 *
51996 * @param {?function} callback Called after update is complete.
51997 * @final
51998 * @protected
51999 */
52000
52001
52002Component.prototype.forceUpdate = function (callback) {
52003  this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
52004};
52005/**
52006 * Deprecated APIs. These APIs used to exist on classic React classes but since
52007 * we would like to deprecate them, we're not going to move them over to this
52008 * modern base class. Instead, we define a getter that warns if it's accessed.
52009 */
52010
52011
52012{
52013  var deprecatedAPIs = {
52014    isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
52015    replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
52016  };
52017
52018  var defineDeprecationWarning = function (methodName, info) {
52019    Object.defineProperty(Component.prototype, methodName, {
52020      get: function () {
52021        warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
52022
52023        return undefined;
52024      }
52025    });
52026  };
52027
52028  for (var fnName in deprecatedAPIs) {
52029    if (deprecatedAPIs.hasOwnProperty(fnName)) {
52030      defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
52031    }
52032  }
52033}
52034
52035function ComponentDummy() {}
52036
52037ComponentDummy.prototype = Component.prototype;
52038/**
52039 * Convenience component with default shallow equality check for sCU.
52040 */
52041
52042function PureComponent(props, context, updater) {
52043  this.props = props;
52044  this.context = context; // If a component has string refs, we will assign a different object later.
52045
52046  this.refs = emptyObject;
52047  this.updater = updater || ReactNoopUpdateQueue;
52048}
52049
52050var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
52051pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
52052
52053_assign(pureComponentPrototype, Component.prototype);
52054
52055pureComponentPrototype.isPureReactComponent = true;
52056
52057// an immutable object with a single mutable value
52058function createRef() {
52059  var refObject = {
52060    current: null
52061  };
52062
52063  {
52064    Object.seal(refObject);
52065  }
52066
52067  return refObject;
52068}
52069
52070function getWrappedName(outerType, innerType, wrapperName) {
52071  var functionName = innerType.displayName || innerType.name || '';
52072  return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
52073}
52074
52075function getContextName(type) {
52076  return type.displayName || 'Context';
52077}
52078
52079function getComponentName(type) {
52080  if (type == null) {
52081    // Host root, text node or just invalid type.
52082    return null;
52083  }
52084
52085  {
52086    if (typeof type.tag === 'number') {
52087      error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
52088    }
52089  }
52090
52091  if (typeof type === 'function') {
52092    return type.displayName || type.name || null;
52093  }
52094
52095  if (typeof type === 'string') {
52096    return type;
52097  }
52098
52099  switch (type) {
52100    case exports.Fragment:
52101      return 'Fragment';
52102
52103    case REACT_PORTAL_TYPE:
52104      return 'Portal';
52105
52106    case exports.Profiler:
52107      return 'Profiler';
52108
52109    case exports.StrictMode:
52110      return 'StrictMode';
52111
52112    case exports.Suspense:
52113      return 'Suspense';
52114
52115    case REACT_SUSPENSE_LIST_TYPE:
52116      return 'SuspenseList';
52117  }
52118
52119  if (typeof type === 'object') {
52120    switch (type.$$typeof) {
52121      case REACT_CONTEXT_TYPE:
52122        var context = type;
52123        return getContextName(context) + '.Consumer';
52124
52125      case REACT_PROVIDER_TYPE:
52126        var provider = type;
52127        return getContextName(provider._context) + '.Provider';
52128
52129      case REACT_FORWARD_REF_TYPE:
52130        return getWrappedName(type, type.render, 'ForwardRef');
52131
52132      case REACT_MEMO_TYPE:
52133        return getComponentName(type.type);
52134
52135      case REACT_BLOCK_TYPE:
52136        return getComponentName(type._render);
52137
52138      case REACT_LAZY_TYPE:
52139        {
52140          var lazyComponent = type;
52141          var payload = lazyComponent._payload;
52142          var init = lazyComponent._init;
52143
52144          try {
52145            return getComponentName(init(payload));
52146          } catch (x) {
52147            return null;
52148          }
52149        }
52150    }
52151  }
52152
52153  return null;
52154}
52155
52156var hasOwnProperty = Object.prototype.hasOwnProperty;
52157var RESERVED_PROPS = {
52158  key: true,
52159  ref: true,
52160  __self: true,
52161  __source: true
52162};
52163var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
52164
52165{
52166  didWarnAboutStringRefs = {};
52167}
52168
52169function hasValidRef(config) {
52170  {
52171    if (hasOwnProperty.call(config, 'ref')) {
52172      var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
52173
52174      if (getter && getter.isReactWarning) {
52175        return false;
52176      }
52177    }
52178  }
52179
52180  return config.ref !== undefined;
52181}
52182
52183function hasValidKey(config) {
52184  {
52185    if (hasOwnProperty.call(config, 'key')) {
52186      var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
52187
52188      if (getter && getter.isReactWarning) {
52189        return false;
52190      }
52191    }
52192  }
52193
52194  return config.key !== undefined;
52195}
52196
52197function defineKeyPropWarningGetter(props, displayName) {
52198  var warnAboutAccessingKey = function () {
52199    {
52200      if (!specialPropKeyWarningShown) {
52201        specialPropKeyWarningShown = true;
52202
52203        error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
52204      }
52205    }
52206  };
52207
52208  warnAboutAccessingKey.isReactWarning = true;
52209  Object.defineProperty(props, 'key', {
52210    get: warnAboutAccessingKey,
52211    configurable: true
52212  });
52213}
52214
52215function defineRefPropWarningGetter(props, displayName) {
52216  var warnAboutAccessingRef = function () {
52217    {
52218      if (!specialPropRefWarningShown) {
52219        specialPropRefWarningShown = true;
52220
52221        error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
52222      }
52223    }
52224  };
52225
52226  warnAboutAccessingRef.isReactWarning = true;
52227  Object.defineProperty(props, 'ref', {
52228    get: warnAboutAccessingRef,
52229    configurable: true
52230  });
52231}
52232
52233function warnIfStringRefCannotBeAutoConverted(config) {
52234  {
52235    if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
52236      var componentName = getComponentName(ReactCurrentOwner.current.type);
52237
52238      if (!didWarnAboutStringRefs[componentName]) {
52239        error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
52240
52241        didWarnAboutStringRefs[componentName] = true;
52242      }
52243    }
52244  }
52245}
52246/**
52247 * Factory method to create a new React element. This no longer adheres to
52248 * the class pattern, so do not use new to call it. Also, instanceof check
52249 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
52250 * if something is a React Element.
52251 *
52252 * @param {*} type
52253 * @param {*} props
52254 * @param {*} key
52255 * @param {string|object} ref
52256 * @param {*} owner
52257 * @param {*} self A *temporary* helper to detect places where `this` is
52258 * different from the `owner` when React.createElement is called, so that we
52259 * can warn. We want to get rid of owner and replace string `ref`s with arrow
52260 * functions, and as long as `this` and owner are the same, there will be no
52261 * change in behavior.
52262 * @param {*} source An annotation object (added by a transpiler or otherwise)
52263 * indicating filename, line number, and/or other information.
52264 * @internal
52265 */
52266
52267
52268var ReactElement = function (type, key, ref, self, source, owner, props) {
52269  var element = {
52270    // This tag allows us to uniquely identify this as a React Element
52271    $$typeof: REACT_ELEMENT_TYPE,
52272    // Built-in properties that belong on the element
52273    type: type,
52274    key: key,
52275    ref: ref,
52276    props: props,
52277    // Record the component responsible for creating this element.
52278    _owner: owner
52279  };
52280
52281  {
52282    // The validation flag is currently mutative. We put it on
52283    // an external backing store so that we can freeze the whole object.
52284    // This can be replaced with a WeakMap once they are implemented in
52285    // commonly used development environments.
52286    element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
52287    // the validation flag non-enumerable (where possible, which should
52288    // include every environment we run tests in), so the test framework
52289    // ignores it.
52290
52291    Object.defineProperty(element._store, 'validated', {
52292      configurable: false,
52293      enumerable: false,
52294      writable: true,
52295      value: false
52296    }); // self and source are DEV only properties.
52297
52298    Object.defineProperty(element, '_self', {
52299      configurable: false,
52300      enumerable: false,
52301      writable: false,
52302      value: self
52303    }); // Two elements created in two different places should be considered
52304    // equal for testing purposes and therefore we hide it from enumeration.
52305
52306    Object.defineProperty(element, '_source', {
52307      configurable: false,
52308      enumerable: false,
52309      writable: false,
52310      value: source
52311    });
52312
52313    if (Object.freeze) {
52314      Object.freeze(element.props);
52315      Object.freeze(element);
52316    }
52317  }
52318
52319  return element;
52320};
52321/**
52322 * Create and return a new ReactElement of the given type.
52323 * See https://reactjs.org/docs/react-api.html#createelement
52324 */
52325
52326function createElement(type, config, children) {
52327  var propName; // Reserved names are extracted
52328
52329  var props = {};
52330  var key = null;
52331  var ref = null;
52332  var self = null;
52333  var source = null;
52334
52335  if (config != null) {
52336    if (hasValidRef(config)) {
52337      ref = config.ref;
52338
52339      {
52340        warnIfStringRefCannotBeAutoConverted(config);
52341      }
52342    }
52343
52344    if (hasValidKey(config)) {
52345      key = '' + config.key;
52346    }
52347
52348    self = config.__self === undefined ? null : config.__self;
52349    source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
52350
52351    for (propName in config) {
52352      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
52353        props[propName] = config[propName];
52354      }
52355    }
52356  } // Children can be more than one argument, and those are transferred onto
52357  // the newly allocated props object.
52358
52359
52360  var childrenLength = arguments.length - 2;
52361
52362  if (childrenLength === 1) {
52363    props.children = children;
52364  } else if (childrenLength > 1) {
52365    var childArray = Array(childrenLength);
52366
52367    for (var i = 0; i < childrenLength; i++) {
52368      childArray[i] = arguments[i + 2];
52369    }
52370
52371    {
52372      if (Object.freeze) {
52373        Object.freeze(childArray);
52374      }
52375    }
52376
52377    props.children = childArray;
52378  } // Resolve default props
52379
52380
52381  if (type && type.defaultProps) {
52382    var defaultProps = type.defaultProps;
52383
52384    for (propName in defaultProps) {
52385      if (props[propName] === undefined) {
52386        props[propName] = defaultProps[propName];
52387      }
52388    }
52389  }
52390
52391  {
52392    if (key || ref) {
52393      var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
52394
52395      if (key) {
52396        defineKeyPropWarningGetter(props, displayName);
52397      }
52398
52399      if (ref) {
52400        defineRefPropWarningGetter(props, displayName);
52401      }
52402    }
52403  }
52404
52405  return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
52406}
52407function cloneAndReplaceKey(oldElement, newKey) {
52408  var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
52409  return newElement;
52410}
52411/**
52412 * Clone and return a new ReactElement using element as the starting point.
52413 * See https://reactjs.org/docs/react-api.html#cloneelement
52414 */
52415
52416function cloneElement(element, config, children) {
52417  if (!!(element === null || element === undefined)) {
52418    {
52419      throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
52420    }
52421  }
52422
52423  var propName; // Original props are copied
52424
52425  var props = _assign({}, element.props); // Reserved names are extracted
52426
52427
52428  var key = element.key;
52429  var ref = element.ref; // Self is preserved since the owner is preserved.
52430
52431  var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
52432  // transpiler, and the original source is probably a better indicator of the
52433  // true owner.
52434
52435  var source = element._source; // Owner will be preserved, unless ref is overridden
52436
52437  var owner = element._owner;
52438
52439  if (config != null) {
52440    if (hasValidRef(config)) {
52441      // Silently steal the ref from the parent.
52442      ref = config.ref;
52443      owner = ReactCurrentOwner.current;
52444    }
52445
52446    if (hasValidKey(config)) {
52447      key = '' + config.key;
52448    } // Remaining properties override existing props
52449
52450
52451    var defaultProps;
52452
52453    if (element.type && element.type.defaultProps) {
52454      defaultProps = element.type.defaultProps;
52455    }
52456
52457    for (propName in config) {
52458      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
52459        if (config[propName] === undefined && defaultProps !== undefined) {
52460          // Resolve default props
52461          props[propName] = defaultProps[propName];
52462        } else {
52463          props[propName] = config[propName];
52464        }
52465      }
52466    }
52467  } // Children can be more than one argument, and those are transferred onto
52468  // the newly allocated props object.
52469
52470
52471  var childrenLength = arguments.length - 2;
52472
52473  if (childrenLength === 1) {
52474    props.children = children;
52475  } else if (childrenLength > 1) {
52476    var childArray = Array(childrenLength);
52477
52478    for (var i = 0; i < childrenLength; i++) {
52479      childArray[i] = arguments[i + 2];
52480    }
52481
52482    props.children = childArray;
52483  }
52484
52485  return ReactElement(element.type, key, ref, self, source, owner, props);
52486}
52487/**
52488 * Verifies the object is a ReactElement.
52489 * See https://reactjs.org/docs/react-api.html#isvalidelement
52490 * @param {?object} object
52491 * @return {boolean} True if `object` is a ReactElement.
52492 * @final
52493 */
52494
52495function isValidElement(object) {
52496  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
52497}
52498
52499var SEPARATOR = '.';
52500var SUBSEPARATOR = ':';
52501/**
52502 * Escape and wrap key so it is safe to use as a reactid
52503 *
52504 * @param {string} key to be escaped.
52505 * @return {string} the escaped key.
52506 */
52507
52508function escape(key) {
52509  var escapeRegex = /[=:]/g;
52510  var escaperLookup = {
52511    '=': '=0',
52512    ':': '=2'
52513  };
52514  var escapedString = key.replace(escapeRegex, function (match) {
52515    return escaperLookup[match];
52516  });
52517  return '$' + escapedString;
52518}
52519/**
52520 * TODO: Test that a single child and an array with one item have the same key
52521 * pattern.
52522 */
52523
52524
52525var didWarnAboutMaps = false;
52526var userProvidedKeyEscapeRegex = /\/+/g;
52527
52528function escapeUserProvidedKey(text) {
52529  return text.replace(userProvidedKeyEscapeRegex, '$&/');
52530}
52531/**
52532 * Generate a key string that identifies a element within a set.
52533 *
52534 * @param {*} element A element that could contain a manual key.
52535 * @param {number} index Index that is used if a manual key is not provided.
52536 * @return {string}
52537 */
52538
52539
52540function getElementKey(element, index) {
52541  // Do some typechecking here since we call this blindly. We want to ensure
52542  // that we don't block potential future ES APIs.
52543  if (typeof element === 'object' && element !== null && element.key != null) {
52544    // Explicit key
52545    return escape('' + element.key);
52546  } // Implicit key determined by the index in the set
52547
52548
52549  return index.toString(36);
52550}
52551
52552function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
52553  var type = typeof children;
52554
52555  if (type === 'undefined' || type === 'boolean') {
52556    // All of the above are perceived as null.
52557    children = null;
52558  }
52559
52560  var invokeCallback = false;
52561
52562  if (children === null) {
52563    invokeCallback = true;
52564  } else {
52565    switch (type) {
52566      case 'string':
52567      case 'number':
52568        invokeCallback = true;
52569        break;
52570
52571      case 'object':
52572        switch (children.$$typeof) {
52573          case REACT_ELEMENT_TYPE:
52574          case REACT_PORTAL_TYPE:
52575            invokeCallback = true;
52576        }
52577
52578    }
52579  }
52580
52581  if (invokeCallback) {
52582    var _child = children;
52583    var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
52584    // so that it's consistent if the number of children grows:
52585
52586    var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
52587
52588    if (Array.isArray(mappedChild)) {
52589      var escapedChildKey = '';
52590
52591      if (childKey != null) {
52592        escapedChildKey = escapeUserProvidedKey(childKey) + '/';
52593      }
52594
52595      mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
52596        return c;
52597      });
52598    } else if (mappedChild != null) {
52599      if (isValidElement(mappedChild)) {
52600        mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
52601        // traverseAllChildren used to do for objects as children
52602        escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
52603        mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
52604        escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
52605      }
52606
52607      array.push(mappedChild);
52608    }
52609
52610    return 1;
52611  }
52612
52613  var child;
52614  var nextName;
52615  var subtreeCount = 0; // Count of children found in the current subtree.
52616
52617  var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
52618
52619  if (Array.isArray(children)) {
52620    for (var i = 0; i < children.length; i++) {
52621      child = children[i];
52622      nextName = nextNamePrefix + getElementKey(child, i);
52623      subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
52624    }
52625  } else {
52626    var iteratorFn = getIteratorFn(children);
52627
52628    if (typeof iteratorFn === 'function') {
52629      var iterableChildren = children;
52630
52631      {
52632        // Warn about using Maps as children
52633        if (iteratorFn === iterableChildren.entries) {
52634          if (!didWarnAboutMaps) {
52635            warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
52636          }
52637
52638          didWarnAboutMaps = true;
52639        }
52640      }
52641
52642      var iterator = iteratorFn.call(iterableChildren);
52643      var step;
52644      var ii = 0;
52645
52646      while (!(step = iterator.next()).done) {
52647        child = step.value;
52648        nextName = nextNamePrefix + getElementKey(child, ii++);
52649        subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
52650      }
52651    } else if (type === 'object') {
52652      var childrenString = '' + children;
52653
52654      {
52655        {
52656          throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). If you meant to render a collection of children, use an array instead." );
52657        }
52658      }
52659    }
52660  }
52661
52662  return subtreeCount;
52663}
52664
52665/**
52666 * Maps children that are typically specified as `props.children`.
52667 *
52668 * See https://reactjs.org/docs/react-api.html#reactchildrenmap
52669 *
52670 * The provided mapFunction(child, index) will be called for each
52671 * leaf child.
52672 *
52673 * @param {?*} children Children tree container.
52674 * @param {function(*, int)} func The map function.
52675 * @param {*} context Context for mapFunction.
52676 * @return {object} Object containing the ordered map of results.
52677 */
52678function mapChildren(children, func, context) {
52679  if (children == null) {
52680    return children;
52681  }
52682
52683  var result = [];
52684  var count = 0;
52685  mapIntoArray(children, result, '', '', function (child) {
52686    return func.call(context, child, count++);
52687  });
52688  return result;
52689}
52690/**
52691 * Count the number of children that are typically specified as
52692 * `props.children`.
52693 *
52694 * See https://reactjs.org/docs/react-api.html#reactchildrencount
52695 *
52696 * @param {?*} children Children tree container.
52697 * @return {number} The number of children.
52698 */
52699
52700
52701function countChildren(children) {
52702  var n = 0;
52703  mapChildren(children, function () {
52704    n++; // Don't return anything
52705  });
52706  return n;
52707}
52708
52709/**
52710 * Iterates through children that are typically specified as `props.children`.
52711 *
52712 * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
52713 *
52714 * The provided forEachFunc(child, index) will be called for each
52715 * leaf child.
52716 *
52717 * @param {?*} children Children tree container.
52718 * @param {function(*, int)} forEachFunc
52719 * @param {*} forEachContext Context for forEachContext.
52720 */
52721function forEachChildren(children, forEachFunc, forEachContext) {
52722  mapChildren(children, function () {
52723    forEachFunc.apply(this, arguments); // Don't return anything.
52724  }, forEachContext);
52725}
52726/**
52727 * Flatten a children object (typically specified as `props.children`) and
52728 * return an array with appropriately re-keyed children.
52729 *
52730 * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
52731 */
52732
52733
52734function toArray(children) {
52735  return mapChildren(children, function (child) {
52736    return child;
52737  }) || [];
52738}
52739/**
52740 * Returns the first child in a collection of children and verifies that there
52741 * is only one child in the collection.
52742 *
52743 * See https://reactjs.org/docs/react-api.html#reactchildrenonly
52744 *
52745 * The current implementation of this function assumes that a single child gets
52746 * passed without a wrapper, but the purpose of this helper function is to
52747 * abstract away the particular structure of children.
52748 *
52749 * @param {?object} children Child collection structure.
52750 * @return {ReactElement} The first and only `ReactElement` contained in the
52751 * structure.
52752 */
52753
52754
52755function onlyChild(children) {
52756  if (!isValidElement(children)) {
52757    {
52758      throw Error( "React.Children.only expected to receive a single React element child." );
52759    }
52760  }
52761
52762  return children;
52763}
52764
52765function createContext(defaultValue, calculateChangedBits) {
52766  if (calculateChangedBits === undefined) {
52767    calculateChangedBits = null;
52768  } else {
52769    {
52770      if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
52771        error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
52772      }
52773    }
52774  }
52775
52776  var context = {
52777    $$typeof: REACT_CONTEXT_TYPE,
52778    _calculateChangedBits: calculateChangedBits,
52779    // As a workaround to support multiple concurrent renderers, we categorize
52780    // some renderers as primary and others as secondary. We only expect
52781    // there to be two concurrent renderers at most: React Native (primary) and
52782    // Fabric (secondary); React DOM (primary) and React ART (secondary).
52783    // Secondary renderers store their context values on separate fields.
52784    _currentValue: defaultValue,
52785    _currentValue2: defaultValue,
52786    // Used to track how many concurrent renderers this context currently
52787    // supports within in a single renderer. Such as parallel server rendering.
52788    _threadCount: 0,
52789    // These are circular
52790    Provider: null,
52791    Consumer: null
52792  };
52793  context.Provider = {
52794    $$typeof: REACT_PROVIDER_TYPE,
52795    _context: context
52796  };
52797  var hasWarnedAboutUsingNestedContextConsumers = false;
52798  var hasWarnedAboutUsingConsumerProvider = false;
52799  var hasWarnedAboutDisplayNameOnConsumer = false;
52800
52801  {
52802    // A separate object, but proxies back to the original context object for
52803    // backwards compatibility. It has a different $$typeof, so we can properly
52804    // warn for the incorrect usage of Context as a Consumer.
52805    var Consumer = {
52806      $$typeof: REACT_CONTEXT_TYPE,
52807      _context: context,
52808      _calculateChangedBits: context._calculateChangedBits
52809    }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
52810
52811    Object.defineProperties(Consumer, {
52812      Provider: {
52813        get: function () {
52814          if (!hasWarnedAboutUsingConsumerProvider) {
52815            hasWarnedAboutUsingConsumerProvider = true;
52816
52817            error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
52818          }
52819
52820          return context.Provider;
52821        },
52822        set: function (_Provider) {
52823          context.Provider = _Provider;
52824        }
52825      },
52826      _currentValue: {
52827        get: function () {
52828          return context._currentValue;
52829        },
52830        set: function (_currentValue) {
52831          context._currentValue = _currentValue;
52832        }
52833      },
52834      _currentValue2: {
52835        get: function () {
52836          return context._currentValue2;
52837        },
52838        set: function (_currentValue2) {
52839          context._currentValue2 = _currentValue2;
52840        }
52841      },
52842      _threadCount: {
52843        get: function () {
52844          return context._threadCount;
52845        },
52846        set: function (_threadCount) {
52847          context._threadCount = _threadCount;
52848        }
52849      },
52850      Consumer: {
52851        get: function () {
52852          if (!hasWarnedAboutUsingNestedContextConsumers) {
52853            hasWarnedAboutUsingNestedContextConsumers = true;
52854
52855            error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
52856          }
52857
52858          return context.Consumer;
52859        }
52860      },
52861      displayName: {
52862        get: function () {
52863          return context.displayName;
52864        },
52865        set: function (displayName) {
52866          if (!hasWarnedAboutDisplayNameOnConsumer) {
52867            warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
52868
52869            hasWarnedAboutDisplayNameOnConsumer = true;
52870          }
52871        }
52872      }
52873    }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
52874
52875    context.Consumer = Consumer;
52876  }
52877
52878  {
52879    context._currentRenderer = null;
52880    context._currentRenderer2 = null;
52881  }
52882
52883  return context;
52884}
52885
52886var Uninitialized = -1;
52887var Pending = 0;
52888var Resolved = 1;
52889var Rejected = 2;
52890
52891function lazyInitializer(payload) {
52892  if (payload._status === Uninitialized) {
52893    var ctor = payload._result;
52894    var thenable = ctor(); // Transition to the next state.
52895
52896    var pending = payload;
52897    pending._status = Pending;
52898    pending._result = thenable;
52899    thenable.then(function (moduleObject) {
52900      if (payload._status === Pending) {
52901        var defaultExport = moduleObject.default;
52902
52903        {
52904          if (defaultExport === undefined) {
52905            error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n  ' + // Break up imports to avoid accidentally parsing them as dependencies.
52906            'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
52907          }
52908        } // Transition to the next state.
52909
52910
52911        var resolved = payload;
52912        resolved._status = Resolved;
52913        resolved._result = defaultExport;
52914      }
52915    }, function (error) {
52916      if (payload._status === Pending) {
52917        // Transition to the next state.
52918        var rejected = payload;
52919        rejected._status = Rejected;
52920        rejected._result = error;
52921      }
52922    });
52923  }
52924
52925  if (payload._status === Resolved) {
52926    return payload._result;
52927  } else {
52928    throw payload._result;
52929  }
52930}
52931
52932function lazy(ctor) {
52933  var payload = {
52934    // We use these fields to store the result.
52935    _status: -1,
52936    _result: ctor
52937  };
52938  var lazyType = {
52939    $$typeof: REACT_LAZY_TYPE,
52940    _payload: payload,
52941    _init: lazyInitializer
52942  };
52943
52944  {
52945    // In production, this would just set it on the object.
52946    var defaultProps;
52947    var propTypes; // $FlowFixMe
52948
52949    Object.defineProperties(lazyType, {
52950      defaultProps: {
52951        configurable: true,
52952        get: function () {
52953          return defaultProps;
52954        },
52955        set: function (newDefaultProps) {
52956          error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
52957
52958          defaultProps = newDefaultProps; // Match production behavior more closely:
52959          // $FlowFixMe
52960
52961          Object.defineProperty(lazyType, 'defaultProps', {
52962            enumerable: true
52963          });
52964        }
52965      },
52966      propTypes: {
52967        configurable: true,
52968        get: function () {
52969          return propTypes;
52970        },
52971        set: function (newPropTypes) {
52972          error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
52973
52974          propTypes = newPropTypes; // Match production behavior more closely:
52975          // $FlowFixMe
52976
52977          Object.defineProperty(lazyType, 'propTypes', {
52978            enumerable: true
52979          });
52980        }
52981      }
52982    });
52983  }
52984
52985  return lazyType;
52986}
52987
52988function forwardRef(render) {
52989  {
52990    if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
52991      error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
52992    } else if (typeof render !== 'function') {
52993      error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
52994    } else {
52995      if (render.length !== 0 && render.length !== 2) {
52996        error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
52997      }
52998    }
52999
53000    if (render != null) {
53001      if (render.defaultProps != null || render.propTypes != null) {
53002        error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
53003      }
53004    }
53005  }
53006
53007  var elementType = {
53008    $$typeof: REACT_FORWARD_REF_TYPE,
53009    render: render
53010  };
53011
53012  {
53013    var ownName;
53014    Object.defineProperty(elementType, 'displayName', {
53015      enumerable: false,
53016      configurable: true,
53017      get: function () {
53018        return ownName;
53019      },
53020      set: function (name) {
53021        ownName = name;
53022
53023        if (render.displayName == null) {
53024          render.displayName = name;
53025        }
53026      }
53027    });
53028  }
53029
53030  return elementType;
53031}
53032
53033// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
53034
53035var enableScopeAPI = false; // Experimental Create Event Handle API.
53036
53037function isValidElementType(type) {
53038  if (typeof type === 'string' || typeof type === 'function') {
53039    return true;
53040  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
53041
53042
53043  if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
53044    return true;
53045  }
53046
53047  if (typeof type === 'object' && type !== null) {
53048    if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
53049      return true;
53050    }
53051  }
53052
53053  return false;
53054}
53055
53056function memo(type, compare) {
53057  {
53058    if (!isValidElementType(type)) {
53059      error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
53060    }
53061  }
53062
53063  var elementType = {
53064    $$typeof: REACT_MEMO_TYPE,
53065    type: type,
53066    compare: compare === undefined ? null : compare
53067  };
53068
53069  {
53070    var ownName;
53071    Object.defineProperty(elementType, 'displayName', {
53072      enumerable: false,
53073      configurable: true,
53074      get: function () {
53075        return ownName;
53076      },
53077      set: function (name) {
53078        ownName = name;
53079
53080        if (type.displayName == null) {
53081          type.displayName = name;
53082        }
53083      }
53084    });
53085  }
53086
53087  return elementType;
53088}
53089
53090function resolveDispatcher() {
53091  var dispatcher = ReactCurrentDispatcher.current;
53092
53093  if (!(dispatcher !== null)) {
53094    {
53095      throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
53096    }
53097  }
53098
53099  return dispatcher;
53100}
53101
53102function useContext(Context, unstable_observedBits) {
53103  var dispatcher = resolveDispatcher();
53104
53105  {
53106    if (unstable_observedBits !== undefined) {
53107      error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://reactjs.org/link/rules-of-hooks' : '');
53108    } // TODO: add a more generic warning for invalid values.
53109
53110
53111    if (Context._context !== undefined) {
53112      var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
53113      // and nobody should be using this in existing code.
53114
53115      if (realContext.Consumer === Context) {
53116        error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
53117      } else if (realContext.Provider === Context) {
53118        error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
53119      }
53120    }
53121  }
53122
53123  return dispatcher.useContext(Context, unstable_observedBits);
53124}
53125function useState(initialState) {
53126  var dispatcher = resolveDispatcher();
53127  return dispatcher.useState(initialState);
53128}
53129function useReducer(reducer, initialArg, init) {
53130  var dispatcher = resolveDispatcher();
53131  return dispatcher.useReducer(reducer, initialArg, init);
53132}
53133function useRef(initialValue) {
53134  var dispatcher = resolveDispatcher();
53135  return dispatcher.useRef(initialValue);
53136}
53137function useEffect(create, deps) {
53138  var dispatcher = resolveDispatcher();
53139  return dispatcher.useEffect(create, deps);
53140}
53141function useLayoutEffect(create, deps) {
53142  var dispatcher = resolveDispatcher();
53143  return dispatcher.useLayoutEffect(create, deps);
53144}
53145function useCallback(callback, deps) {
53146  var dispatcher = resolveDispatcher();
53147  return dispatcher.useCallback(callback, deps);
53148}
53149function useMemo(create, deps) {
53150  var dispatcher = resolveDispatcher();
53151  return dispatcher.useMemo(create, deps);
53152}
53153function useImperativeHandle(ref, create, deps) {
53154  var dispatcher = resolveDispatcher();
53155  return dispatcher.useImperativeHandle(ref, create, deps);
53156}
53157function useDebugValue(value, formatterFn) {
53158  {
53159    var dispatcher = resolveDispatcher();
53160    return dispatcher.useDebugValue(value, formatterFn);
53161  }
53162}
53163
53164// Helpers to patch console.logs to avoid logging during side-effect free
53165// replaying on render function. This currently only patches the object
53166// lazily which won't cover if the log function was extracted eagerly.
53167// We could also eagerly patch the method.
53168var disabledDepth = 0;
53169var prevLog;
53170var prevInfo;
53171var prevWarn;
53172var prevError;
53173var prevGroup;
53174var prevGroupCollapsed;
53175var prevGroupEnd;
53176
53177function disabledLog() {}
53178
53179disabledLog.__reactDisabledLog = true;
53180function disableLogs() {
53181  {
53182    if (disabledDepth === 0) {
53183      /* eslint-disable react-internal/no-production-logging */
53184      prevLog = console.log;
53185      prevInfo = console.info;
53186      prevWarn = console.warn;
53187      prevError = console.error;
53188      prevGroup = console.group;
53189      prevGroupCollapsed = console.groupCollapsed;
53190      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
53191
53192      var props = {
53193        configurable: true,
53194        enumerable: true,
53195        value: disabledLog,
53196        writable: true
53197      }; // $FlowFixMe Flow thinks console is immutable.
53198
53199      Object.defineProperties(console, {
53200        info: props,
53201        log: props,
53202        warn: props,
53203        error: props,
53204        group: props,
53205        groupCollapsed: props,
53206        groupEnd: props
53207      });
53208      /* eslint-enable react-internal/no-production-logging */
53209    }
53210
53211    disabledDepth++;
53212  }
53213}
53214function reenableLogs() {
53215  {
53216    disabledDepth--;
53217
53218    if (disabledDepth === 0) {
53219      /* eslint-disable react-internal/no-production-logging */
53220      var props = {
53221        configurable: true,
53222        enumerable: true,
53223        writable: true
53224      }; // $FlowFixMe Flow thinks console is immutable.
53225
53226      Object.defineProperties(console, {
53227        log: _assign({}, props, {
53228          value: prevLog
53229        }),
53230        info: _assign({}, props, {
53231          value: prevInfo
53232        }),
53233        warn: _assign({}, props, {
53234          value: prevWarn
53235        }),
53236        error: _assign({}, props, {
53237          value: prevError
53238        }),
53239        group: _assign({}, props, {
53240          value: prevGroup
53241        }),
53242        groupCollapsed: _assign({}, props, {
53243          value: prevGroupCollapsed
53244        }),
53245        groupEnd: _assign({}, props, {
53246          value: prevGroupEnd
53247        })
53248      });
53249      /* eslint-enable react-internal/no-production-logging */
53250    }
53251
53252    if (disabledDepth < 0) {
53253      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
53254    }
53255  }
53256}
53257
53258var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
53259var prefix;
53260function describeBuiltInComponentFrame(name, source, ownerFn) {
53261  {
53262    if (prefix === undefined) {
53263      // Extract the VM specific prefix used by each line.
53264      try {
53265        throw Error();
53266      } catch (x) {
53267        var match = x.stack.trim().match(/\n( *(at )?)/);
53268        prefix = match && match[1] || '';
53269      }
53270    } // We use the prefix to ensure our stacks line up with native stack frames.
53271
53272
53273    return '\n' + prefix + name;
53274  }
53275}
53276var reentry = false;
53277var componentFrameCache;
53278
53279{
53280  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
53281  componentFrameCache = new PossiblyWeakMap();
53282}
53283
53284function describeNativeComponentFrame(fn, construct) {
53285  // If something asked for a stack inside a fake render, it should get ignored.
53286  if (!fn || reentry) {
53287    return '';
53288  }
53289
53290  {
53291    var frame = componentFrameCache.get(fn);
53292
53293    if (frame !== undefined) {
53294      return frame;
53295    }
53296  }
53297
53298  var control;
53299  reentry = true;
53300  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
53301
53302  Error.prepareStackTrace = undefined;
53303  var previousDispatcher;
53304
53305  {
53306    previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
53307    // for warnings.
53308
53309    ReactCurrentDispatcher$1.current = null;
53310    disableLogs();
53311  }
53312
53313  try {
53314    // This should throw.
53315    if (construct) {
53316      // Something should be setting the props in the constructor.
53317      var Fake = function () {
53318        throw Error();
53319      }; // $FlowFixMe
53320
53321
53322      Object.defineProperty(Fake.prototype, 'props', {
53323        set: function () {
53324          // We use a throwing setter instead of frozen or non-writable props
53325          // because that won't throw in a non-strict mode function.
53326          throw Error();
53327        }
53328      });
53329
53330      if (typeof Reflect === 'object' && Reflect.construct) {
53331        // We construct a different control for this case to include any extra
53332        // frames added by the construct call.
53333        try {
53334          Reflect.construct(Fake, []);
53335        } catch (x) {
53336          control = x;
53337        }
53338
53339        Reflect.construct(fn, [], Fake);
53340      } else {
53341        try {
53342          Fake.call();
53343        } catch (x) {
53344          control = x;
53345        }
53346
53347        fn.call(Fake.prototype);
53348      }
53349    } else {
53350      try {
53351        throw Error();
53352      } catch (x) {
53353        control = x;
53354      }
53355
53356      fn();
53357    }
53358  } catch (sample) {
53359    // This is inlined manually because closure doesn't do it for us.
53360    if (sample && control && typeof sample.stack === 'string') {
53361      // This extracts the first frame from the sample that isn't also in the control.
53362      // Skipping one frame that we assume is the frame that calls the two.
53363      var sampleLines = sample.stack.split('\n');
53364      var controlLines = control.stack.split('\n');
53365      var s = sampleLines.length - 1;
53366      var c = controlLines.length - 1;
53367
53368      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
53369        // We expect at least one stack frame to be shared.
53370        // Typically this will be the root most one. However, stack frames may be
53371        // cut off due to maximum stack limits. In this case, one maybe cut off
53372        // earlier than the other. We assume that the sample is longer or the same
53373        // and there for cut off earlier. So we should find the root most frame in
53374        // the sample somewhere in the control.
53375        c--;
53376      }
53377
53378      for (; s >= 1 && c >= 0; s--, c--) {
53379        // Next we find the first one that isn't the same which should be the
53380        // frame that called our sample function and the control.
53381        if (sampleLines[s] !== controlLines[c]) {
53382          // In V8, the first line is describing the message but other VMs don't.
53383          // If we're about to return the first line, and the control is also on the same
53384          // line, that's a pretty good indicator that our sample threw at same line as
53385          // the control. I.e. before we entered the sample frame. So we ignore this result.
53386          // This can happen if you passed a class to function component, or non-function.
53387          if (s !== 1 || c !== 1) {
53388            do {
53389              s--;
53390              c--; // We may still have similar intermediate frames from the construct call.
53391              // The next one that isn't the same should be our match though.
53392
53393              if (c < 0 || sampleLines[s] !== controlLines[c]) {
53394                // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
53395                var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
53396
53397                {
53398                  if (typeof fn === 'function') {
53399                    componentFrameCache.set(fn, _frame);
53400                  }
53401                } // Return the line we found.
53402
53403
53404                return _frame;
53405              }
53406            } while (s >= 1 && c >= 0);
53407          }
53408
53409          break;
53410        }
53411      }
53412    }
53413  } finally {
53414    reentry = false;
53415
53416    {
53417      ReactCurrentDispatcher$1.current = previousDispatcher;
53418      reenableLogs();
53419    }
53420
53421    Error.prepareStackTrace = previousPrepareStackTrace;
53422  } // Fallback to just using the name if we couldn't make it throw.
53423
53424
53425  var name = fn ? fn.displayName || fn.name : '';
53426  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
53427
53428  {
53429    if (typeof fn === 'function') {
53430      componentFrameCache.set(fn, syntheticFrame);
53431    }
53432  }
53433
53434  return syntheticFrame;
53435}
53436function describeFunctionComponentFrame(fn, source, ownerFn) {
53437  {
53438    return describeNativeComponentFrame(fn, false);
53439  }
53440}
53441
53442function shouldConstruct(Component) {
53443  var prototype = Component.prototype;
53444  return !!(prototype && prototype.isReactComponent);
53445}
53446
53447function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
53448
53449  if (type == null) {
53450    return '';
53451  }
53452
53453  if (typeof type === 'function') {
53454    {
53455      return describeNativeComponentFrame(type, shouldConstruct(type));
53456    }
53457  }
53458
53459  if (typeof type === 'string') {
53460    return describeBuiltInComponentFrame(type);
53461  }
53462
53463  switch (type) {
53464    case exports.Suspense:
53465      return describeBuiltInComponentFrame('Suspense');
53466
53467    case REACT_SUSPENSE_LIST_TYPE:
53468      return describeBuiltInComponentFrame('SuspenseList');
53469  }
53470
53471  if (typeof type === 'object') {
53472    switch (type.$$typeof) {
53473      case REACT_FORWARD_REF_TYPE:
53474        return describeFunctionComponentFrame(type.render);
53475
53476      case REACT_MEMO_TYPE:
53477        // Memo may contain any component type so we recursively resolve it.
53478        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
53479
53480      case REACT_BLOCK_TYPE:
53481        return describeFunctionComponentFrame(type._render);
53482
53483      case REACT_LAZY_TYPE:
53484        {
53485          var lazyComponent = type;
53486          var payload = lazyComponent._payload;
53487          var init = lazyComponent._init;
53488
53489          try {
53490            // Lazy may contain any component type so we recursively resolve it.
53491            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
53492          } catch (x) {}
53493        }
53494    }
53495  }
53496
53497  return '';
53498}
53499
53500var loggedTypeFailures = {};
53501var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
53502
53503function setCurrentlyValidatingElement(element) {
53504  {
53505    if (element) {
53506      var owner = element._owner;
53507      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
53508      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
53509    } else {
53510      ReactDebugCurrentFrame$1.setExtraStackFrame(null);
53511    }
53512  }
53513}
53514
53515function checkPropTypes(typeSpecs, values, location, componentName, element) {
53516  {
53517    // $FlowFixMe This is okay but Flow doesn't know it.
53518    var has = Function.call.bind(Object.prototype.hasOwnProperty);
53519
53520    for (var typeSpecName in typeSpecs) {
53521      if (has(typeSpecs, typeSpecName)) {
53522        var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
53523        // fail the render phase where it didn't fail before. So we log it.
53524        // After these have been cleaned up, we'll let them throw.
53525
53526        try {
53527          // This is intentionally an invariant that gets caught. It's the same
53528          // behavior as without this statement except with a better message.
53529          if (typeof typeSpecs[typeSpecName] !== 'function') {
53530            var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
53531            err.name = 'Invariant Violation';
53532            throw err;
53533          }
53534
53535          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
53536        } catch (ex) {
53537          error$1 = ex;
53538        }
53539
53540        if (error$1 && !(error$1 instanceof Error)) {
53541          setCurrentlyValidatingElement(element);
53542
53543          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
53544
53545          setCurrentlyValidatingElement(null);
53546        }
53547
53548        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
53549          // Only monitor this failure once because there tends to be a lot of the
53550          // same error.
53551          loggedTypeFailures[error$1.message] = true;
53552          setCurrentlyValidatingElement(element);
53553
53554          error('Failed %s type: %s', location, error$1.message);
53555
53556          setCurrentlyValidatingElement(null);
53557        }
53558      }
53559    }
53560  }
53561}
53562
53563function setCurrentlyValidatingElement$1(element) {
53564  {
53565    if (element) {
53566      var owner = element._owner;
53567      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
53568      setExtraStackFrame(stack);
53569    } else {
53570      setExtraStackFrame(null);
53571    }
53572  }
53573}
53574
53575var propTypesMisspellWarningShown;
53576
53577{
53578  propTypesMisspellWarningShown = false;
53579}
53580
53581function getDeclarationErrorAddendum() {
53582  if (ReactCurrentOwner.current) {
53583    var name = getComponentName(ReactCurrentOwner.current.type);
53584
53585    if (name) {
53586      return '\n\nCheck the render method of `' + name + '`.';
53587    }
53588  }
53589
53590  return '';
53591}
53592
53593function getSourceInfoErrorAddendum(source) {
53594  if (source !== undefined) {
53595    var fileName = source.fileName.replace(/^.*[\\\/]/, '');
53596    var lineNumber = source.lineNumber;
53597    return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
53598  }
53599
53600  return '';
53601}
53602
53603function getSourceInfoErrorAddendumForProps(elementProps) {
53604  if (elementProps !== null && elementProps !== undefined) {
53605    return getSourceInfoErrorAddendum(elementProps.__source);
53606  }
53607
53608  return '';
53609}
53610/**
53611 * Warn if there's no key explicitly set on dynamic arrays of children or
53612 * object keys are not valid. This allows us to keep track of children between
53613 * updates.
53614 */
53615
53616
53617var ownerHasKeyUseWarning = {};
53618
53619function getCurrentComponentErrorInfo(parentType) {
53620  var info = getDeclarationErrorAddendum();
53621
53622  if (!info) {
53623    var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
53624
53625    if (parentName) {
53626      info = "\n\nCheck the top-level render call using <" + parentName + ">.";
53627    }
53628  }
53629
53630  return info;
53631}
53632/**
53633 * Warn if the element doesn't have an explicit key assigned to it.
53634 * This element is in an array. The array could grow and shrink or be
53635 * reordered. All children that haven't already been validated are required to
53636 * have a "key" property assigned to it. Error statuses are cached so a warning
53637 * will only be shown once.
53638 *
53639 * @internal
53640 * @param {ReactElement} element Element that requires a key.
53641 * @param {*} parentType element's parent's type.
53642 */
53643
53644
53645function validateExplicitKey(element, parentType) {
53646  if (!element._store || element._store.validated || element.key != null) {
53647    return;
53648  }
53649
53650  element._store.validated = true;
53651  var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
53652
53653  if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
53654    return;
53655  }
53656
53657  ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
53658  // property, it may be the creator of the child that's responsible for
53659  // assigning it a key.
53660
53661  var childOwner = '';
53662
53663  if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
53664    // Give the component that originally created this child.
53665    childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
53666  }
53667
53668  {
53669    setCurrentlyValidatingElement$1(element);
53670
53671    error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
53672
53673    setCurrentlyValidatingElement$1(null);
53674  }
53675}
53676/**
53677 * Ensure that every element either is passed in a static location, in an
53678 * array with an explicit keys property defined, or in an object literal
53679 * with valid key property.
53680 *
53681 * @internal
53682 * @param {ReactNode} node Statically passed child of any type.
53683 * @param {*} parentType node's parent's type.
53684 */
53685
53686
53687function validateChildKeys(node, parentType) {
53688  if (typeof node !== 'object') {
53689    return;
53690  }
53691
53692  if (Array.isArray(node)) {
53693    for (var i = 0; i < node.length; i++) {
53694      var child = node[i];
53695
53696      if (isValidElement(child)) {
53697        validateExplicitKey(child, parentType);
53698      }
53699    }
53700  } else if (isValidElement(node)) {
53701    // This element was passed in a valid location.
53702    if (node._store) {
53703      node._store.validated = true;
53704    }
53705  } else if (node) {
53706    var iteratorFn = getIteratorFn(node);
53707
53708    if (typeof iteratorFn === 'function') {
53709      // Entry iterators used to provide implicit keys,
53710      // but now we print a separate warning for them later.
53711      if (iteratorFn !== node.entries) {
53712        var iterator = iteratorFn.call(node);
53713        var step;
53714
53715        while (!(step = iterator.next()).done) {
53716          if (isValidElement(step.value)) {
53717            validateExplicitKey(step.value, parentType);
53718          }
53719        }
53720      }
53721    }
53722  }
53723}
53724/**
53725 * Given an element, validate that its props follow the propTypes definition,
53726 * provided by the type.
53727 *
53728 * @param {ReactElement} element
53729 */
53730
53731
53732function validatePropTypes(element) {
53733  {
53734    var type = element.type;
53735
53736    if (type === null || type === undefined || typeof type === 'string') {
53737      return;
53738    }
53739
53740    var propTypes;
53741
53742    if (typeof type === 'function') {
53743      propTypes = type.propTypes;
53744    } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
53745    // Inner props are checked in the reconciler.
53746    type.$$typeof === REACT_MEMO_TYPE)) {
53747      propTypes = type.propTypes;
53748    } else {
53749      return;
53750    }
53751
53752    if (propTypes) {
53753      // Intentionally inside to avoid triggering lazy initializers:
53754      var name = getComponentName(type);
53755      checkPropTypes(propTypes, element.props, 'prop', name, element);
53756    } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
53757      propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
53758
53759      var _name = getComponentName(type);
53760
53761      error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
53762    }
53763
53764    if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
53765      error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
53766    }
53767  }
53768}
53769/**
53770 * Given a fragment, validate that it can only be provided with fragment props
53771 * @param {ReactElement} fragment
53772 */
53773
53774
53775function validateFragmentProps(fragment) {
53776  {
53777    var keys = Object.keys(fragment.props);
53778
53779    for (var i = 0; i < keys.length; i++) {
53780      var key = keys[i];
53781
53782      if (key !== 'children' && key !== 'key') {
53783        setCurrentlyValidatingElement$1(fragment);
53784
53785        error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
53786
53787        setCurrentlyValidatingElement$1(null);
53788        break;
53789      }
53790    }
53791
53792    if (fragment.ref !== null) {
53793      setCurrentlyValidatingElement$1(fragment);
53794
53795      error('Invalid attribute `ref` supplied to `React.Fragment`.');
53796
53797      setCurrentlyValidatingElement$1(null);
53798    }
53799  }
53800}
53801function createElementWithValidation(type, props, children) {
53802  var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
53803  // succeed and there will likely be errors in render.
53804
53805  if (!validType) {
53806    var info = '';
53807
53808    if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
53809      info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
53810    }
53811
53812    var sourceInfo = getSourceInfoErrorAddendumForProps(props);
53813
53814    if (sourceInfo) {
53815      info += sourceInfo;
53816    } else {
53817      info += getDeclarationErrorAddendum();
53818    }
53819
53820    var typeString;
53821
53822    if (type === null) {
53823      typeString = 'null';
53824    } else if (Array.isArray(type)) {
53825      typeString = 'array';
53826    } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
53827      typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
53828      info = ' Did you accidentally export a JSX literal instead of a component?';
53829    } else {
53830      typeString = typeof type;
53831    }
53832
53833    {
53834      error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
53835    }
53836  }
53837
53838  var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
53839  // TODO: Drop this when these are no longer allowed as the type argument.
53840
53841  if (element == null) {
53842    return element;
53843  } // Skip key warning if the type isn't valid since our key validation logic
53844  // doesn't expect a non-string/function type and can throw confusing errors.
53845  // We don't want exception behavior to differ between dev and prod.
53846  // (Rendering will throw with a helpful message and as soon as the type is
53847  // fixed, the key warnings will appear.)
53848
53849
53850  if (validType) {
53851    for (var i = 2; i < arguments.length; i++) {
53852      validateChildKeys(arguments[i], type);
53853    }
53854  }
53855
53856  if (type === exports.Fragment) {
53857    validateFragmentProps(element);
53858  } else {
53859    validatePropTypes(element);
53860  }
53861
53862  return element;
53863}
53864var didWarnAboutDeprecatedCreateFactory = false;
53865function createFactoryWithValidation(type) {
53866  var validatedFactory = createElementWithValidation.bind(null, type);
53867  validatedFactory.type = type;
53868
53869  {
53870    if (!didWarnAboutDeprecatedCreateFactory) {
53871      didWarnAboutDeprecatedCreateFactory = true;
53872
53873      warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
53874    } // Legacy hook: remove it
53875
53876
53877    Object.defineProperty(validatedFactory, 'type', {
53878      enumerable: false,
53879      get: function () {
53880        warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
53881
53882        Object.defineProperty(this, 'type', {
53883          value: type
53884        });
53885        return type;
53886      }
53887    });
53888  }
53889
53890  return validatedFactory;
53891}
53892function cloneElementWithValidation(element, props, children) {
53893  var newElement = cloneElement.apply(this, arguments);
53894
53895  for (var i = 2; i < arguments.length; i++) {
53896    validateChildKeys(arguments[i], newElement.type);
53897  }
53898
53899  validatePropTypes(newElement);
53900  return newElement;
53901}
53902
53903{
53904
53905  try {
53906    var frozenObject = Object.freeze({});
53907    /* eslint-disable no-new */
53908
53909    new Map([[frozenObject, null]]);
53910    new Set([frozenObject]);
53911    /* eslint-enable no-new */
53912  } catch (e) {
53913  }
53914}
53915
53916var createElement$1 =  createElementWithValidation ;
53917var cloneElement$1 =  cloneElementWithValidation ;
53918var createFactory =  createFactoryWithValidation ;
53919var Children = {
53920  map: mapChildren,
53921  forEach: forEachChildren,
53922  count: countChildren,
53923  toArray: toArray,
53924  only: onlyChild
53925};
53926
53927exports.Children = Children;
53928exports.Component = Component;
53929exports.PureComponent = PureComponent;
53930exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
53931exports.cloneElement = cloneElement$1;
53932exports.createContext = createContext;
53933exports.createElement = createElement$1;
53934exports.createFactory = createFactory;
53935exports.createRef = createRef;
53936exports.forwardRef = forwardRef;
53937exports.isValidElement = isValidElement;
53938exports.lazy = lazy;
53939exports.memo = memo;
53940exports.useCallback = useCallback;
53941exports.useContext = useContext;
53942exports.useDebugValue = useDebugValue;
53943exports.useEffect = useEffect;
53944exports.useImperativeHandle = useImperativeHandle;
53945exports.useLayoutEffect = useLayoutEffect;
53946exports.useMemo = useMemo;
53947exports.useReducer = useReducer;
53948exports.useRef = useRef;
53949exports.useState = useState;
53950exports.version = ReactVersion;
53951  })();
53952}
53953
53954
53955/***/ }),
53956
vendor: 411 bytes, lines 53957-53972
53957/***/ "./node_modules/react/index.js":
53958/*!*************************************!*\
53959  !*** ./node_modules/react/index.js ***!
53960  \*************************************/
53961/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
53962
53963"use strict";
53964
53965
53966if (false) {} else {
53967  module.exports = __webpack_require__(/*! ./cjs/react.development.js */ "./node_modules/react/cjs/react.development.js");
53968}
53969
53970
53971/***/ }),
53972
vendor: 9,325 bytes, lines 53973-54330
53973/***/ "./node_modules/scheduler/cjs/scheduler-tracing.development.js":
53974/*!*********************************************************************!*\
53975  !*** ./node_modules/scheduler/cjs/scheduler-tracing.development.js ***!
53976  \*********************************************************************/
53977/***/ ((__unused_webpack_module, exports) => {
53978
53979"use strict";
53980/** @license React v0.20.2
53981 * scheduler-tracing.development.js
53982 *
53983 * Copyright (c) Facebook, Inc. and its affiliates.
53984 *
53985 * This source code is licensed under the MIT license found in the
53986 * LICENSE file in the root directory of this source tree.
53987 */
53988
53989
53990
53991if (true) {
53992  (function() {
53993'use strict';
53994
53995var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.
53996
53997var interactionIDCounter = 0;
53998var threadIDCounter = 0; // Set of currently traced interactions.
53999// Interactions "stack"–
54000// Meaning that newly traced interactions are appended to the previously active set.
54001// When an interaction goes out of scope, the previous set (if any) is restored.
54002
54003exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end.
54004
54005exports.__subscriberRef = null;
54006
54007{
54008  exports.__interactionsRef = {
54009    current: new Set()
54010  };
54011  exports.__subscriberRef = {
54012    current: null
54013  };
54014}
54015function unstable_clear(callback) {
54016
54017  var prevInteractions = exports.__interactionsRef.current;
54018  exports.__interactionsRef.current = new Set();
54019
54020  try {
54021    return callback();
54022  } finally {
54023    exports.__interactionsRef.current = prevInteractions;
54024  }
54025}
54026function unstable_getCurrent() {
54027  {
54028    return exports.__interactionsRef.current;
54029  }
54030}
54031function unstable_getThreadID() {
54032  return ++threadIDCounter;
54033}
54034function unstable_trace(name, timestamp, callback) {
54035  var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;
54036
54037  var interaction = {
54038    __count: 1,
54039    id: interactionIDCounter++,
54040    name: name,
54041    timestamp: timestamp
54042  };
54043  var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.
54044  // To do that, clone the current interactions.
54045  // The previous set will be restored upon completion.
54046
54047  var interactions = new Set(prevInteractions);
54048  interactions.add(interaction);
54049  exports.__interactionsRef.current = interactions;
54050  var subscriber = exports.__subscriberRef.current;
54051  var returnValue;
54052
54053  try {
54054    if (subscriber !== null) {
54055      subscriber.onInteractionTraced(interaction);
54056    }
54057  } finally {
54058    try {
54059      if (subscriber !== null) {
54060        subscriber.onWorkStarted(interactions, threadID);
54061      }
54062    } finally {
54063      try {
54064        returnValue = callback();
54065      } finally {
54066        exports.__interactionsRef.current = prevInteractions;
54067
54068        try {
54069          if (subscriber !== null) {
54070            subscriber.onWorkStopped(interactions, threadID);
54071          }
54072        } finally {
54073          interaction.__count--; // If no async work was scheduled for this interaction,
54074          // Notify subscribers that it's completed.
54075
54076          if (subscriber !== null && interaction.__count === 0) {
54077            subscriber.onInteractionScheduledWorkCompleted(interaction);
54078          }
54079        }
54080      }
54081    }
54082  }
54083
54084  return returnValue;
54085}
54086function unstable_wrap(callback) {
54087  var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;
54088
54089  var wrappedInteractions = exports.__interactionsRef.current;
54090  var subscriber = exports.__subscriberRef.current;
54091
54092  if (subscriber !== null) {
54093    subscriber.onWorkScheduled(wrappedInteractions, threadID);
54094  } // Update the pending async work count for the current interactions.
54095  // Update after calling subscribers in case of error.
54096
54097
54098  wrappedInteractions.forEach(function (interaction) {
54099    interaction.__count++;
54100  });
54101  var hasRun = false;
54102
54103  function wrapped() {
54104    var prevInteractions = exports.__interactionsRef.current;
54105    exports.__interactionsRef.current = wrappedInteractions;
54106    subscriber = exports.__subscriberRef.current;
54107
54108    try {
54109      var returnValue;
54110
54111      try {
54112        if (subscriber !== null) {
54113          subscriber.onWorkStarted(wrappedInteractions, threadID);
54114        }
54115      } finally {
54116        try {
54117          returnValue = callback.apply(undefined, arguments);
54118        } finally {
54119          exports.__interactionsRef.current = prevInteractions;
54120
54121          if (subscriber !== null) {
54122            subscriber.onWorkStopped(wrappedInteractions, threadID);
54123          }
54124        }
54125      }
54126
54127      return returnValue;
54128    } finally {
54129      if (!hasRun) {
54130        // We only expect a wrapped function to be executed once,
54131        // But in the event that it's executed more than once–
54132        // Only decrement the outstanding interaction counts once.
54133        hasRun = true; // Update pending async counts for all wrapped interactions.
54134        // If this was the last scheduled async work for any of them,
54135        // Mark them as completed.
54136
54137        wrappedInteractions.forEach(function (interaction) {
54138          interaction.__count--;
54139
54140          if (subscriber !== null && interaction.__count === 0) {
54141            subscriber.onInteractionScheduledWorkCompleted(interaction);
54142          }
54143        });
54144      }
54145    }
54146  }
54147
54148  wrapped.cancel = function cancel() {
54149    subscriber = exports.__subscriberRef.current;
54150
54151    try {
54152      if (subscriber !== null) {
54153        subscriber.onWorkCanceled(wrappedInteractions, threadID);
54154      }
54155    } finally {
54156      // Update pending async counts for all wrapped interactions.
54157      // If this was the last scheduled async work for any of them,
54158      // Mark them as completed.
54159      wrappedInteractions.forEach(function (interaction) {
54160        interaction.__count--;
54161
54162        if (subscriber && interaction.__count === 0) {
54163          subscriber.onInteractionScheduledWorkCompleted(interaction);
54164        }
54165      });
54166    }
54167  };
54168
54169  return wrapped;
54170}
54171
54172var subscribers = null;
54173
54174{
54175  subscribers = new Set();
54176}
54177
54178function unstable_subscribe(subscriber) {
54179  {
54180    subscribers.add(subscriber);
54181
54182    if (subscribers.size === 1) {
54183      exports.__subscriberRef.current = {
54184        onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
54185        onInteractionTraced: onInteractionTraced,
54186        onWorkCanceled: onWorkCanceled,
54187        onWorkScheduled: onWorkScheduled,
54188        onWorkStarted: onWorkStarted,
54189        onWorkStopped: onWorkStopped
54190      };
54191    }
54192  }
54193}
54194function unstable_unsubscribe(subscriber) {
54195  {
54196    subscribers.delete(subscriber);
54197
54198    if (subscribers.size === 0) {
54199      exports.__subscriberRef.current = null;
54200    }
54201  }
54202}
54203
54204function onInteractionTraced(interaction) {
54205  var didCatchError = false;
54206  var caughtError = null;
54207  subscribers.forEach(function (subscriber) {
54208    try {
54209      subscriber.onInteractionTraced(interaction);
54210    } catch (error) {
54211      if (!didCatchError) {
54212        didCatchError = true;
54213        caughtError = error;
54214      }
54215    }
54216  });
54217
54218  if (didCatchError) {
54219    throw caughtError;
54220  }
54221}
54222
54223function onInteractionScheduledWorkCompleted(interaction) {
54224  var didCatchError = false;
54225  var caughtError = null;
54226  subscribers.forEach(function (subscriber) {
54227    try {
54228      subscriber.onInteractionScheduledWorkCompleted(interaction);
54229    } catch (error) {
54230      if (!didCatchError) {
54231        didCatchError = true;
54232        caughtError = error;
54233      }
54234    }
54235  });
54236
54237  if (didCatchError) {
54238    throw caughtError;
54239  }
54240}
54241
54242function onWorkScheduled(interactions, threadID) {
54243  var didCatchError = false;
54244  var caughtError = null;
54245  subscribers.forEach(function (subscriber) {
54246    try {
54247      subscriber.onWorkScheduled(interactions, threadID);
54248    } catch (error) {
54249      if (!didCatchError) {
54250        didCatchError = true;
54251        caughtError = error;
54252      }
54253    }
54254  });
54255
54256  if (didCatchError) {
54257    throw caughtError;
54258  }
54259}
54260
54261function onWorkStarted(interactions, threadID) {
54262  var didCatchError = false;
54263  var caughtError = null;
54264  subscribers.forEach(function (subscriber) {
54265    try {
54266      subscriber.onWorkStarted(interactions, threadID);
54267    } catch (error) {
54268      if (!didCatchError) {
54269        didCatchError = true;
54270        caughtError = error;
54271      }
54272    }
54273  });
54274
54275  if (didCatchError) {
54276    throw caughtError;
54277  }
54278}
54279
54280function onWorkStopped(interactions, threadID) {
54281  var didCatchError = false;
54282  var caughtError = null;
54283  subscribers.forEach(function (subscriber) {
54284    try {
54285      subscriber.onWorkStopped(interactions, threadID);
54286    } catch (error) {
54287      if (!didCatchError) {
54288        didCatchError = true;
54289        caughtError = error;
54290      }
54291    }
54292  });
54293
54294  if (didCatchError) {
54295    throw caughtError;
54296  }
54297}
54298
54299function onWorkCanceled(interactions, threadID) {
54300  var didCatchError = false;
54301  var caughtError = null;
54302  subscribers.forEach(function (subscriber) {
54303    try {
54304      subscriber.onWorkCanceled(interactions, threadID);
54305    } catch (error) {
54306      if (!didCatchError) {
54307        didCatchError = true;
54308        caughtError = error;
54309      }
54310    }
54311  });
54312
54313  if (didCatchError) {
54314    throw caughtError;
54315  }
54316}
54317
54318exports.unstable_clear = unstable_clear;
54319exports.unstable_getCurrent = unstable_getCurrent;
54320exports.unstable_getThreadID = unstable_getThreadID;
54321exports.unstable_subscribe = unstable_subscribe;
54322exports.unstable_trace = unstable_trace;
54323exports.unstable_unsubscribe = unstable_unsubscribe;
54324exports.unstable_wrap = unstable_wrap;
54325  })();
54326}
54327
54328
54329/***/ }),
54330
vendor: 17,855 bytes, lines 54331-54987
54331/***/ "./node_modules/scheduler/cjs/scheduler.development.js":
54332/*!*************************************************************!*\
54333  !*** ./node_modules/scheduler/cjs/scheduler.development.js ***!
54334  \*************************************************************/
54335/***/ ((__unused_webpack_module, exports) => {
54336
54337"use strict";
54338/** @license React v0.20.2
54339 * scheduler.development.js
54340 *
54341 * Copyright (c) Facebook, Inc. and its affiliates.
54342 *
54343 * This source code is licensed under the MIT license found in the
54344 * LICENSE file in the root directory of this source tree.
54345 */
54346
54347
54348
54349if (true) {
54350  (function() {
54351'use strict';
54352
54353var enableSchedulerDebugging = false;
54354var enableProfiling = false;
54355
54356var requestHostCallback;
54357var requestHostTimeout;
54358var cancelHostTimeout;
54359var requestPaint;
54360var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
54361
54362if (hasPerformanceNow) {
54363  var localPerformance = performance;
54364
54365  exports.unstable_now = function () {
54366    return localPerformance.now();
54367  };
54368} else {
54369  var localDate = Date;
54370  var initialTime = localDate.now();
54371
54372  exports.unstable_now = function () {
54373    return localDate.now() - initialTime;
54374  };
54375}
54376
54377if ( // If Scheduler runs in a non-DOM environment, it falls back to a naive
54378// implementation using setTimeout.
54379typeof window === 'undefined' || // Check if MessageChannel is supported, too.
54380typeof MessageChannel !== 'function') {
54381  // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
54382  // fallback to a naive implementation.
54383  var _callback = null;
54384  var _timeoutID = null;
54385
54386  var _flushCallback = function () {
54387    if (_callback !== null) {
54388      try {
54389        var currentTime = exports.unstable_now();
54390        var hasRemainingTime = true;
54391
54392        _callback(hasRemainingTime, currentTime);
54393
54394        _callback = null;
54395      } catch (e) {
54396        setTimeout(_flushCallback, 0);
54397        throw e;
54398      }
54399    }
54400  };
54401
54402  requestHostCallback = function (cb) {
54403    if (_callback !== null) {
54404      // Protect against re-entrancy.
54405      setTimeout(requestHostCallback, 0, cb);
54406    } else {
54407      _callback = cb;
54408      setTimeout(_flushCallback, 0);
54409    }
54410  };
54411
54412  requestHostTimeout = function (cb, ms) {
54413    _timeoutID = setTimeout(cb, ms);
54414  };
54415
54416  cancelHostTimeout = function () {
54417    clearTimeout(_timeoutID);
54418  };
54419
54420  exports.unstable_shouldYield = function () {
54421    return false;
54422  };
54423
54424  requestPaint = exports.unstable_forceFrameRate = function () {};
54425} else {
54426  // Capture local references to native APIs, in case a polyfill overrides them.
54427  var _setTimeout = window.setTimeout;
54428  var _clearTimeout = window.clearTimeout;
54429
54430  if (typeof console !== 'undefined') {
54431    // TODO: Scheduler no longer requires these methods to be polyfilled. But
54432    // maybe we want to continue warning if they don't exist, to preserve the
54433    // option to rely on it in the future?
54434    var requestAnimationFrame = window.requestAnimationFrame;
54435    var cancelAnimationFrame = window.cancelAnimationFrame;
54436
54437    if (typeof requestAnimationFrame !== 'function') {
54438      // Using console['error'] to evade Babel and ESLint
54439      console['error']("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
54440    }
54441
54442    if (typeof cancelAnimationFrame !== 'function') {
54443      // Using console['error'] to evade Babel and ESLint
54444      console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
54445    }
54446  }
54447
54448  var isMessageLoopRunning = false;
54449  var scheduledHostCallback = null;
54450  var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
54451  // thread, like user events. By default, it yields multiple times per frame.
54452  // It does not attempt to align with frame boundaries, since most tasks don't
54453  // need to be frame aligned; for those that do, use requestAnimationFrame.
54454
54455  var yieldInterval = 5;
54456  var deadline = 0; // TODO: Make this configurable
54457
54458  {
54459    // `isInputPending` is not available. Since we have no way of knowing if
54460    // there's pending input, always yield at the end of the frame.
54461    exports.unstable_shouldYield = function () {
54462      return exports.unstable_now() >= deadline;
54463    }; // Since we yield every frame regardless, `requestPaint` has no effect.
54464
54465
54466    requestPaint = function () {};
54467  }
54468
54469  exports.unstable_forceFrameRate = function (fps) {
54470    if (fps < 0 || fps > 125) {
54471      // Using console['error'] to evade Babel and ESLint
54472      console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');
54473      return;
54474    }
54475
54476    if (fps > 0) {
54477      yieldInterval = Math.floor(1000 / fps);
54478    } else {
54479      // reset the framerate
54480      yieldInterval = 5;
54481    }
54482  };
54483
54484  var performWorkUntilDeadline = function () {
54485    if (scheduledHostCallback !== null) {
54486      var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync
54487      // cycle. This means there's always time remaining at the beginning of
54488      // the message event.
54489
54490      deadline = currentTime + yieldInterval;
54491      var hasTimeRemaining = true;
54492
54493      try {
54494        var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
54495
54496        if (!hasMoreWork) {
54497          isMessageLoopRunning = false;
54498          scheduledHostCallback = null;
54499        } else {
54500          // If there's more work, schedule the next message event at the end
54501          // of the preceding one.
54502          port.postMessage(null);
54503        }
54504      } catch (error) {
54505        // If a scheduler task throws, exit the current browser task so the
54506        // error can be observed.
54507        port.postMessage(null);
54508        throw error;
54509      }
54510    } else {
54511      isMessageLoopRunning = false;
54512    } // Yielding to the browser will give it a chance to paint, so we can
54513  };
54514
54515  var channel = new MessageChannel();
54516  var port = channel.port2;
54517  channel.port1.onmessage = performWorkUntilDeadline;
54518
54519  requestHostCallback = function (callback) {
54520    scheduledHostCallback = callback;
54521
54522    if (!isMessageLoopRunning) {
54523      isMessageLoopRunning = true;
54524      port.postMessage(null);
54525    }
54526  };
54527
54528  requestHostTimeout = function (callback, ms) {
54529    taskTimeoutID = _setTimeout(function () {
54530      callback(exports.unstable_now());
54531    }, ms);
54532  };
54533
54534  cancelHostTimeout = function () {
54535    _clearTimeout(taskTimeoutID);
54536
54537    taskTimeoutID = -1;
54538  };
54539}
54540
54541function push(heap, node) {
54542  var index = heap.length;
54543  heap.push(node);
54544  siftUp(heap, node, index);
54545}
54546function peek(heap) {
54547  var first = heap[0];
54548  return first === undefined ? null : first;
54549}
54550function pop(heap) {
54551  var first = heap[0];
54552
54553  if (first !== undefined) {
54554    var last = heap.pop();
54555
54556    if (last !== first) {
54557      heap[0] = last;
54558      siftDown(heap, last, 0);
54559    }
54560
54561    return first;
54562  } else {
54563    return null;
54564  }
54565}
54566
54567function siftUp(heap, node, i) {
54568  var index = i;
54569
54570  while (true) {
54571    var parentIndex = index - 1 >>> 1;
54572    var parent = heap[parentIndex];
54573
54574    if (parent !== undefined && compare(parent, node) > 0) {
54575      // The parent is larger. Swap positions.
54576      heap[parentIndex] = node;
54577      heap[index] = parent;
54578      index = parentIndex;
54579    } else {
54580      // The parent is smaller. Exit.
54581      return;
54582    }
54583  }
54584}
54585
54586function siftDown(heap, node, i) {
54587  var index = i;
54588  var length = heap.length;
54589
54590  while (index < length) {
54591    var leftIndex = (index + 1) * 2 - 1;
54592    var left = heap[leftIndex];
54593    var rightIndex = leftIndex + 1;
54594    var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
54595
54596    if (left !== undefined && compare(left, node) < 0) {
54597      if (right !== undefined && compare(right, left) < 0) {
54598        heap[index] = right;
54599        heap[rightIndex] = node;
54600        index = rightIndex;
54601      } else {
54602        heap[index] = left;
54603        heap[leftIndex] = node;
54604        index = leftIndex;
54605      }
54606    } else if (right !== undefined && compare(right, node) < 0) {
54607      heap[index] = right;
54608      heap[rightIndex] = node;
54609      index = rightIndex;
54610    } else {
54611      // Neither child is smaller. Exit.
54612      return;
54613    }
54614  }
54615}
54616
54617function compare(a, b) {
54618  // Compare sort index first, then task id.
54619  var diff = a.sortIndex - b.sortIndex;
54620  return diff !== 0 ? diff : a.id - b.id;
54621}
54622
54623// TODO: Use symbols?
54624var ImmediatePriority = 1;
54625var UserBlockingPriority = 2;
54626var NormalPriority = 3;
54627var LowPriority = 4;
54628var IdlePriority = 5;
54629
54630function markTaskErrored(task, ms) {
54631}
54632
54633/* eslint-disable no-var */
54634// Math.pow(2, 30) - 1
54635// 0b111111111111111111111111111111
54636
54637var maxSigned31BitInt = 1073741823; // Times out immediately
54638
54639var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
54640
54641var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
54642var NORMAL_PRIORITY_TIMEOUT = 5000;
54643var LOW_PRIORITY_TIMEOUT = 10000; // Never times out
54644
54645var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap
54646
54647var taskQueue = [];
54648var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
54649
54650var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
54651var currentTask = null;
54652var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.
54653
54654var isPerformingWork = false;
54655var isHostCallbackScheduled = false;
54656var isHostTimeoutScheduled = false;
54657
54658function advanceTimers(currentTime) {
54659  // Check for tasks that are no longer delayed and add them to the queue.
54660  var timer = peek(timerQueue);
54661
54662  while (timer !== null) {
54663    if (timer.callback === null) {
54664      // Timer was cancelled.
54665      pop(timerQueue);
54666    } else if (timer.startTime <= currentTime) {
54667      // Timer fired. Transfer to the task queue.
54668      pop(timerQueue);
54669      timer.sortIndex = timer.expirationTime;
54670      push(taskQueue, timer);
54671    } else {
54672      // Remaining timers are pending.
54673      return;
54674    }
54675
54676    timer = peek(timerQueue);
54677  }
54678}
54679
54680function handleTimeout(currentTime) {
54681  isHostTimeoutScheduled = false;
54682  advanceTimers(currentTime);
54683
54684  if (!isHostCallbackScheduled) {
54685    if (peek(taskQueue) !== null) {
54686      isHostCallbackScheduled = true;
54687      requestHostCallback(flushWork);
54688    } else {
54689      var firstTimer = peek(timerQueue);
54690
54691      if (firstTimer !== null) {
54692        requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
54693      }
54694    }
54695  }
54696}
54697
54698function flushWork(hasTimeRemaining, initialTime) {
54699
54700
54701  isHostCallbackScheduled = false;
54702
54703  if (isHostTimeoutScheduled) {
54704    // We scheduled a timeout but it's no longer needed. Cancel it.
54705    isHostTimeoutScheduled = false;
54706    cancelHostTimeout();
54707  }
54708
54709  isPerformingWork = true;
54710  var previousPriorityLevel = currentPriorityLevel;
54711
54712  try {
54713    if (enableProfiling) {
54714      try {
54715        return workLoop(hasTimeRemaining, initialTime);
54716      } catch (error) {
54717        if (currentTask !== null) {
54718          var currentTime = exports.unstable_now();
54719          markTaskErrored(currentTask, currentTime);
54720          currentTask.isQueued = false;
54721        }
54722
54723        throw error;
54724      }
54725    } else {
54726      // No catch in prod code path.
54727      return workLoop(hasTimeRemaining, initialTime);
54728    }
54729  } finally {
54730    currentTask = null;
54731    currentPriorityLevel = previousPriorityLevel;
54732    isPerformingWork = false;
54733  }
54734}
54735
54736function workLoop(hasTimeRemaining, initialTime) {
54737  var currentTime = initialTime;
54738  advanceTimers(currentTime);
54739  currentTask = peek(taskQueue);
54740
54741  while (currentTask !== null && !(enableSchedulerDebugging )) {
54742    if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || exports.unstable_shouldYield())) {
54743      // This currentTask hasn't expired, and we've reached the deadline.
54744      break;
54745    }
54746
54747    var callback = currentTask.callback;
54748
54749    if (typeof callback === 'function') {
54750      currentTask.callback = null;
54751      currentPriorityLevel = currentTask.priorityLevel;
54752      var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
54753
54754      var continuationCallback = callback(didUserCallbackTimeout);
54755      currentTime = exports.unstable_now();
54756
54757      if (typeof continuationCallback === 'function') {
54758        currentTask.callback = continuationCallback;
54759      } else {
54760
54761        if (currentTask === peek(taskQueue)) {
54762          pop(taskQueue);
54763        }
54764      }
54765
54766      advanceTimers(currentTime);
54767    } else {
54768      pop(taskQueue);
54769    }
54770
54771    currentTask = peek(taskQueue);
54772  } // Return whether there's additional work
54773
54774
54775  if (currentTask !== null) {
54776    return true;
54777  } else {
54778    var firstTimer = peek(timerQueue);
54779
54780    if (firstTimer !== null) {
54781      requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
54782    }
54783
54784    return false;
54785  }
54786}
54787
54788function unstable_runWithPriority(priorityLevel, eventHandler) {
54789  switch (priorityLevel) {
54790    case ImmediatePriority:
54791    case UserBlockingPriority:
54792    case NormalPriority:
54793    case LowPriority:
54794    case IdlePriority:
54795      break;
54796
54797    default:
54798      priorityLevel = NormalPriority;
54799  }
54800
54801  var previousPriorityLevel = currentPriorityLevel;
54802  currentPriorityLevel = priorityLevel;
54803
54804  try {
54805    return eventHandler();
54806  } finally {
54807    currentPriorityLevel = previousPriorityLevel;
54808  }
54809}
54810
54811function unstable_next(eventHandler) {
54812  var priorityLevel;
54813
54814  switch (currentPriorityLevel) {
54815    case ImmediatePriority:
54816    case UserBlockingPriority:
54817    case NormalPriority:
54818      // Shift down to normal priority
54819      priorityLevel = NormalPriority;
54820      break;
54821
54822    default:
54823      // Anything lower than normal priority should remain at the current level.
54824      priorityLevel = currentPriorityLevel;
54825      break;
54826  }
54827
54828  var previousPriorityLevel = currentPriorityLevel;
54829  currentPriorityLevel = priorityLevel;
54830
54831  try {
54832    return eventHandler();
54833  } finally {
54834    currentPriorityLevel = previousPriorityLevel;
54835  }
54836}
54837
54838function unstable_wrapCallback(callback) {
54839  var parentPriorityLevel = currentPriorityLevel;
54840  return function () {
54841    // This is a fork of runWithPriority, inlined for performance.
54842    var previousPriorityLevel = currentPriorityLevel;
54843    currentPriorityLevel = parentPriorityLevel;
54844
54845    try {
54846      return callback.apply(this, arguments);
54847    } finally {
54848      currentPriorityLevel = previousPriorityLevel;
54849    }
54850  };
54851}
54852
54853function unstable_scheduleCallback(priorityLevel, callback, options) {
54854  var currentTime = exports.unstable_now();
54855  var startTime;
54856
54857  if (typeof options === 'object' && options !== null) {
54858    var delay = options.delay;
54859
54860    if (typeof delay === 'number' && delay > 0) {
54861      startTime = currentTime + delay;
54862    } else {
54863      startTime = currentTime;
54864    }
54865  } else {
54866    startTime = currentTime;
54867  }
54868
54869  var timeout;
54870
54871  switch (priorityLevel) {
54872    case ImmediatePriority:
54873      timeout = IMMEDIATE_PRIORITY_TIMEOUT;
54874      break;
54875
54876    case UserBlockingPriority:
54877      timeout = USER_BLOCKING_PRIORITY_TIMEOUT;
54878      break;
54879
54880    case IdlePriority:
54881      timeout = IDLE_PRIORITY_TIMEOUT;
54882      break;
54883
54884    case LowPriority:
54885      timeout = LOW_PRIORITY_TIMEOUT;
54886      break;
54887
54888    case NormalPriority:
54889    default:
54890      timeout = NORMAL_PRIORITY_TIMEOUT;
54891      break;
54892  }
54893
54894  var expirationTime = startTime + timeout;
54895  var newTask = {
54896    id: taskIdCounter++,
54897    callback: callback,
54898    priorityLevel: priorityLevel,
54899    startTime: startTime,
54900    expirationTime: expirationTime,
54901    sortIndex: -1
54902  };
54903
54904  if (startTime > currentTime) {
54905    // This is a delayed task.
54906    newTask.sortIndex = startTime;
54907    push(timerQueue, newTask);
54908
54909    if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
54910      // All tasks are delayed, and this is the task with the earliest delay.
54911      if (isHostTimeoutScheduled) {
54912        // Cancel an existing timeout.
54913        cancelHostTimeout();
54914      } else {
54915        isHostTimeoutScheduled = true;
54916      } // Schedule a timeout.
54917
54918
54919      requestHostTimeout(handleTimeout, startTime - currentTime);
54920    }
54921  } else {
54922    newTask.sortIndex = expirationTime;
54923    push(taskQueue, newTask);
54924    // wait until the next time we yield.
54925
54926
54927    if (!isHostCallbackScheduled && !isPerformingWork) {
54928      isHostCallbackScheduled = true;
54929      requestHostCallback(flushWork);
54930    }
54931  }
54932
54933  return newTask;
54934}
54935
54936function unstable_pauseExecution() {
54937}
54938
54939function unstable_continueExecution() {
54940
54941  if (!isHostCallbackScheduled && !isPerformingWork) {
54942    isHostCallbackScheduled = true;
54943    requestHostCallback(flushWork);
54944  }
54945}
54946
54947function unstable_getFirstCallbackNode() {
54948  return peek(taskQueue);
54949}
54950
54951function unstable_cancelCallback(task) {
54952  // remove from the queue because you can't remove arbitrary nodes from an
54953  // array based heap, only the first one.)
54954
54955
54956  task.callback = null;
54957}
54958
54959function unstable_getCurrentPriorityLevel() {
54960  return currentPriorityLevel;
54961}
54962
54963var unstable_requestPaint = requestPaint;
54964var unstable_Profiling =  null;
54965
54966exports.unstable_IdlePriority = IdlePriority;
54967exports.unstable_ImmediatePriority = ImmediatePriority;
54968exports.unstable_LowPriority = LowPriority;
54969exports.unstable_NormalPriority = NormalPriority;
54970exports.unstable_Profiling = unstable_Profiling;
54971exports.unstable_UserBlockingPriority = UserBlockingPriority;
54972exports.unstable_cancelCallback = unstable_cancelCallback;
54973exports.unstable_continueExecution = unstable_continueExecution;
54974exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
54975exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
54976exports.unstable_next = unstable_next;
54977exports.unstable_pauseExecution = unstable_pauseExecution;
54978exports.unstable_requestPaint = unstable_requestPaint;
54979exports.unstable_runWithPriority = unstable_runWithPriority;
54980exports.unstable_scheduleCallback = unstable_scheduleCallback;
54981exports.unstable_wrapCallback = unstable_wrapCallback;
54982  })();
54983}
54984
54985
54986/***/ }),
54987
vendor: 439 bytes, lines 54988-55003
54988/***/ "./node_modules/scheduler/index.js":
54989/*!*****************************************!*\
54990  !*** ./node_modules/scheduler/index.js ***!
54991  \*****************************************/
54992/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
54993
54994"use strict";
54995
54996
54997if (false) {} else {
54998  module.exports = __webpack_require__(/*! ./cjs/scheduler.development.js */ "./node_modules/scheduler/cjs/scheduler.development.js");
54999}
55000
55001
55002/***/ }),
55003
vendor: 463 bytes, lines 55004-55019
55004/***/ "./node_modules/scheduler/tracing.js":
55005/*!*******************************************!*\
55006  !*** ./node_modules/scheduler/tracing.js ***!
55007  \*******************************************/
55008/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
55009
55010"use strict";
55011
55012
55013if (false) {} else {
55014  module.exports = __webpack_require__(/*! ./cjs/scheduler-tracing.development.js */ "./node_modules/scheduler/cjs/scheduler-tracing.development.js");
55015}
55016
55017
55018/***/ }),
55019
vendor: 1,993 bytes, lines 55020-55090
55020/***/ "./node_modules/warning/browser.js":
55021/*!*****************************************!*\
55022  !*** ./node_modules/warning/browser.js ***!
55023  \*****************************************/
55024/***/ ((module) => {
55025
55026"use strict";
55027/**
55028 * Copyright 2014-2015, Facebook, Inc.
55029 * All rights reserved.
55030 *
55031 * This source code is licensed under the BSD-style license found in the
55032 * LICENSE file in the root directory of this source tree. An additional grant
55033 * of patent rights can be found in the PATENTS file in the same directory.
55034 */
55035
55036
55037
55038/**
55039 * Similar to invariant but only logs a warning if the condition is not met.
55040 * This can be used to log issues in development environments in critical
55041 * paths. Removing the logging code for production environments will keep the
55042 * same logic and follow the same code paths.
55043 */
55044
55045var warning = function() {};
55046
55047if (true) {
55048  warning = function(condition, format, args) {
55049    var len = arguments.length;
55050    args = new Array(len > 2 ? len - 2 : 0);
55051    for (var key = 2; key < len; key++) {
55052      args[key - 2] = arguments[key];
55053    }
55054    if (format === undefined) {
55055      throw new Error(
55056        '`warning(condition, format, ...args)` requires a warning ' +
55057        'message argument'
55058      );
55059    }
55060
55061    if (format.length < 10 || (/^[s\W]*$/).test(format)) {
55062      throw new Error(
55063        'The warning format should be able to uniquely identify this ' +
55064        'warning. Please, use a more descriptive format than: ' + format
55065      );
55066    }
55067
55068    if (!condition) {
55069      var argIndex = 0;
55070      var message = 'Warning: ' +
55071        format.replace(/%s/g, function() {
55072          return args[argIndex++];
55073        });
55074      if (typeof console !== 'undefined') {
55075        console.error(message);
55076      }
55077      try {
55078        // This error was thrown as a convenience so that you can use this stack
55079        // to find the callsite that caused this warning to fire.
55080        throw new Error(message);
55081      } catch(x) {}
55082    }
55083  };
55084}
55085
55086module.exports = warning;
55087
55088
55089/***/ }),
55090
vendor: 858 bytes, lines 55091-55111
55091/***/ "./node_modules/@babel/runtime-corejs2/helpers/esm/assertThisInitialized.js":
55092/*!**********************************************************************************!*\
55093  !*** ./node_modules/@babel/runtime-corejs2/helpers/esm/assertThisInitialized.js ***!
55094  \**********************************************************************************/
55095/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
55096
55097"use strict";
55098__webpack_require__.r(__webpack_exports__);
55099/* harmony export */ __webpack_require__.d(__webpack_exports__, {
55100/* harmony export */   "default": () => (/* binding */ _assertThisInitialized)
55101/* harmony export */ });
55102function _assertThisInitialized(self) {
55103  if (self === void 0) {
55104    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
55105  }
55106
55107  return self;
55108}
55109
55110/***/ }),
55111
vendor: 1,294 bytes, lines 55112-55144
55112/***/ "./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js":
55113/*!********************************************************************!*\
55114  !*** ./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js ***!
55115  \********************************************************************/
55116/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
55117
55118"use strict";
55119__webpack_require__.r(__webpack_exports__);
55120/* harmony export */ __webpack_require__.d(__webpack_exports__, {
55121/* harmony export */   "default": () => (/* binding */ _extends)
55122/* harmony export */ });
55123/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/core-js/object/assign */ "./node_modules/@babel/runtime-corejs2/core-js/object/assign.js");
55124
55125function _extends() {
55126  _extends = _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_0__ || function (target) {
55127    for (var i = 1; i < arguments.length; i++) {
55128      var source = arguments[i];
55129
55130      for (var key in source) {
55131        if (Object.prototype.hasOwnProperty.call(source, key)) {
55132          target[key] = source[key];
55133        }
55134      }
55135    }
55136
55137    return target;
55138  };
55139
55140  return _extends.apply(this, arguments);
55141}
55142
55143/***/ }),
55144
vendor: 1,379 bytes, lines 55145-55167
55145/***/ "./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js":
55146/*!**************************************************************************!*\
55147  !*** ./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js ***!
55148  \**************************************************************************/
55149/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
55150
55151"use strict";
55152__webpack_require__.r(__webpack_exports__);
55153/* harmony export */ __webpack_require__.d(__webpack_exports__, {
55154/* harmony export */   "default": () => (/* binding */ _inheritsLoose)
55155/* harmony export */ });
55156/* harmony import */ var _babel_runtime_corejs2_core_js_object_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/core-js/object/create */ "./node_modules/@babel/runtime-corejs2/core-js/object/create.js");
55157/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime-corejs2/helpers/esm/setPrototypeOf.js");
55158
55159
55160function _inheritsLoose(subClass, superClass) {
55161  subClass.prototype = _babel_runtime_corejs2_core_js_object_create__WEBPACK_IMPORTED_MODULE_0__(superClass.prototype);
55162  subClass.prototype.constructor = subClass;
55163  (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_1__["default"])(subClass, superClass);
55164}
55165
55166/***/ }),
55167
vendor: 1,348 bytes, lines 55168-55199
55168/***/ "./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js":
55169/*!*****************************************************************************************!*\
55170  !*** ./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js ***!
55171  \*****************************************************************************************/
55172/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
55173
55174"use strict";
55175__webpack_require__.r(__webpack_exports__);
55176/* harmony export */ __webpack_require__.d(__webpack_exports__, {
55177/* harmony export */   "default": () => (/* binding */ _objectWithoutPropertiesLoose)
55178/* harmony export */ });
55179/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/core-js/object/keys */ "./node_modules/@babel/runtime-corejs2/core-js/object/keys.js");
55180
55181function _objectWithoutPropertiesLoose(source, excluded) {
55182  if (source == null) return {};
55183  var target = {};
55184
55185  var sourceKeys = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0__(source);
55186
55187  var key, i;
55188
55189  for (i = 0; i < sourceKeys.length; i++) {
55190    key = sourceKeys[i];
55191    if (excluded.indexOf(key) >= 0) continue;
55192    target[key] = source[key];
55193  }
55194
55195  return target;
55196}
55197
55198/***/ }),
55199
vendor: 1,161 bytes, lines 55200-55222
55200/***/ "./node_modules/@babel/runtime-corejs2/helpers/esm/setPrototypeOf.js":
55201/*!***************************************************************************!*\
55202  !*** ./node_modules/@babel/runtime-corejs2/helpers/esm/setPrototypeOf.js ***!
55203  \***************************************************************************/
55204/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
55205
55206"use strict";
55207__webpack_require__.r(__webpack_exports__);
55208/* harmony export */ __webpack_require__.d(__webpack_exports__, {
55209/* harmony export */   "default": () => (/* binding */ _setPrototypeOf)
55210/* harmony export */ });
55211/* harmony import */ var _babel_runtime_corejs2_core_js_object_set_prototype_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs2/core-js/object/set-prototype-of */ "./node_modules/@babel/runtime-corejs2/core-js/object/set-prototype-of.js");
55212
55213function _setPrototypeOf(o, p) {
55214  _setPrototypeOf = _babel_runtime_corejs2_core_js_object_set_prototype_of__WEBPACK_IMPORTED_MODULE_0__ || function _setPrototypeOf(o, p) {
55215    o.__proto__ = p;
55216    return o;
55217  };
55218
55219  return _setPrototypeOf(o, p);
55220}
55221
55222/***/ })
vendor: 4,790 bytes, lines 55222-55333
55222
55223
55224/******/ 	});
55225/************************************************************************/
55226/******/ 	// The module cache
55227/******/ 	var __webpack_module_cache__ = {};
55228/******/ 	
55229/******/ 	// The require function
55230/******/ 	function __webpack_require__(moduleId) {
55231/******/ 		// Check if module is in cache
55232/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
55233/******/ 		if (cachedModule !== undefined) {
55234/******/ 			return cachedModule.exports;
55235/******/ 		}
55236/******/ 		// Create a new module (and put it into the cache)
55237/******/ 		var module = __webpack_module_cache__[moduleId] = {
55238/******/ 			// no module.id needed
55239/******/ 			// no module.loaded needed
55240/******/ 			exports: {}
55241/******/ 		};
55242/******/ 	
55243/******/ 		// Execute the module function
55244/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
55245/******/ 	
55246/******/ 		// Return the exports of the module
55247/******/ 		return module.exports;
55248/******/ 	}
55249/******/ 	
55250/************************************************************************/
55251/******/ 	/* webpack/runtime/compat get default export */
55252/******/ 	(() => {
55253/******/ 		// getDefaultExport function for compatibility with non-harmony modules
55254/******/ 		__webpack_require__.n = (module) => {
55255/******/ 			var getter = module && module.__esModule ?
55256/******/ 				() => (module['default']) :
55257/******/ 				() => (module);
55258/******/ 			__webpack_require__.d(getter, { a: getter });
55259/******/ 			return getter;
55260/******/ 		};
55261/******/ 	})();
55262/******/ 	
55263/******/ 	/* webpack/runtime/define property getters */
55264/******/ 	(() => {
55265/******/ 		// define getter functions for harmony exports
55266/******/ 		__webpack_require__.d = (exports, definition) => {
55267/******/ 			for(var key in definition) {
55268/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
55269/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
55270/******/ 				}
55271/******/ 			}
55272/******/ 		};
55273/******/ 	})();
55274/******/ 	
55275/******/ 	/* webpack/runtime/global */
55276/******/ 	(() => {
55277/******/ 		__webpack_require__.g = (function() {
55278/******/ 			if (typeof globalThis === 'object') return globalThis;
55279/******/ 			try {
55280/******/ 				return this || new Function('return this')();
55281/******/ 			} catch (e) {
55282/******/ 				if (typeof window === 'object') return window;
55283/******/ 			}
55284/******/ 		})();
55285/******/ 	})();
55286/******/ 	
55287/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
55288/******/ 	(() => {
55289/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
55290/******/ 	})();
55291/******/ 	
55292/******/ 	/* webpack/runtime/make namespace object */
55293/******/ 	(() => {
55294/******/ 		// define __esModule on exports
55295/******/ 		__webpack_require__.r = (exports) => {
55296/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
55297/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
55298/******/ 			}
55299/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
55300/******/ 		};
55301/******/ 	})();
55302/******/ 	
55303/************************************************************************/
55304var __webpack_exports__ = {};
55305// This entry need to be wrapped in an IIFE because it need to be in strict mode.
55306(() => {
55307"use strict";
55308var __webpack_exports__ = {};
55309/*!************************!*\
55310  !*** ./src/js/core.js ***!
55311  \************************/
55312__webpack_require__.r(__webpack_exports__);
55313/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
55314/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
55315/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
55316/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_2__);
55317/* harmony import */ var bootstrap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! bootstrap */ "./node_modules/bootstrap/dist/js/bootstrap.js");
55318/* harmony import */ var bootstrap__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(bootstrap__WEBPACK_IMPORTED_MODULE_3__);
55319/* harmony import */ var _react_TruckLoader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./react/TruckLoader */ "./src/js/react/TruckLoader.js");
55320
55321
55322
55323
55324window.$ = window.jQuery = (jquery__WEBPACK_IMPORTED_MODULE_2___default());
55325
55326
55327jquery__WEBPACK_IMPORTED_MODULE_2___default()(document).on('react:init', function () {
55328  initLoader();
55329});
55330initLoader();
55331
55332function initLoader() {// let button_truck_loaders = document.querySelectorAll('.truck-loader-react');
55333  // if (button_truck_loaders) {
55334  //     button_truck_loaders.forEach((el, i) => {
55335  //
55336  //         let route = el.getAttribute('data-route');
55337  //         let run = el.getAttribute('data-run');
55338  //         let date = el.getAttribute('data-date');
55339  //
55340  //         if (route.length > 0 && run.length > 0 && date.length > 0) ReactDom.render(<TruckLoader date={date} run={run} route={route}/>, el);
55341  //     });
55342  // }
55343}
55344})();
55345
55346// This entry need to be wrapped in an IIFE because it need to be in strict mode.
55347(() => {
55348"use strict";
55349/*!***********************************!*\
55350  !*** ./src/style/scss/style.scss ***!
55351  \***********************************/
55352__webpack_require__.r(__webpack_exports__);
55353// extracted by mini-css-extract-plugin
55354
55355})();
55356
55357/******/ })()
55358;
55359//# sourceMappingURL=bundle.js.map

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